Commit Graph

2896 Commits

Author SHA1 Message Date
Tilghman Lesher f97dfd2278 Add contributed WaitUntil app.
Original code by pprindeville, updated for trunk by tilghman.
(Closes issue #11487)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-19 20:06:23 +00:00
Dwayne M. Hubbard 1de09e03cb add missing header file
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93827 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-19 00:09:05 +00:00
Luigi Rizzo fd88390af7 remove unnecessary (char *) casts for ast_config_AST_* variables.
There are some left in the .flex files, left to the maintainer...



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-18 09:46:18 +00:00
Olle Johansson f3471c1652 Merged revisions 93182 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r93182 | oej | 2007-12-17 08:15:13 +0100 (MÃ¥n, 17 Dec 2007) | 8 lines

Issue 11574: Add dependencies on res_monitor and res_features. 

I wonder if Asterisk can run at all without res_features. My guess is that 
there's propably a lot of more modules and the core that depends on it.

Reported by: caio1982
(closes issue #11574)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17 21:12:24 +00:00
Mark Michelson c3f89eab8f Removing some leftover debug messages from a while back.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93297 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17 20:42:08 +00:00
Mark Michelson 2a8a244447 Merged revisions 93291 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r93291 | mmichelson | 2007-12-17 13:53:48 -0600 (Mon, 17 Dec 2007) | 6 lines

We need to create the directory for a voicemail user even if they are using IMAP storage
since greetings are stored in the filesystem.

(closes issue #11388, reported by spditner, patch by me inspired by a patch by spditner)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93293 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17 20:20:32 +00:00
Kevin P. Fleming 100ef27af9 Merged revisions 93180 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r93180 | kpfleming | 2007-12-16 22:44:51 -0800 (Sun, 16 Dec 2007) | 23 lines

In http://lists.digium.com/pipermail/asterisk-dev/2007-December/031145.html,
rizzo brought up some issues related to the way that the metadata required
for menuselect and the rest of the build system is extracted from the source
files. Since I had a few hours to kill on an airplane today, I decided to
improve this situation... so now the system caches the extracted metadata
and uses it to build the menuselect 'tree' as much as it can. The result
of this is that when a single source file is changed, only the metadata for
that file needs to be extracted again, and the rest is used from the cache
files. I also reduced the number of forked processes required to do the
metadata extraction; it was actually possible to do most of what we needed
in the Makefiles themselves without using any shell scripts at all! On my
laptop, these changes resulted in an 80% decrease in the time required
for the 'menuselect.makeopts' automatic check to occur after editing a single
source file.

While doing this work I also cleaned up a few minor things in the Makefiles,
adding a check for 'awk' to the configure script and changed all remaining
places we use 'grep' or 'awk' to use the ones found by the configure script,
and changed the 'prep_tarball' script to build the menuselect metadata so
that tarballs of Asterisk will include it and won't require the user to
wait while it is extracted after unpacking.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93184 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17 07:25:35 +00:00
Mark Michelson 4155befbc0 Resolve a compiler warning
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93115 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-14 22:02:18 +00:00
Mark Michelson f848ebc895 Change places where the name "INBOX" was hardcoded to use the imapfolder
setting from voicemail.conf instead. This commit will help to get issue
#11415 moving towards commitment.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93094 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-14 21:40:34 +00:00
Tilghman Lesher 70cd3d0037 Remove use of privacy.conf by the Privacy app.
Reported by: eliel
Patch by: eliel
(Closes issue #11344)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93066 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-14 19:27:54 +00:00
Tilghman Lesher f5a9e958d1 gcc 4.1.3 wants a union used here.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93041 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-14 18:24:12 +00:00
Tilghman Lesher d5b454bf8d Convert ast_verbose to ast_verb.
Reported by: snuffy
Patch by: snuffy
(Closes issue #11547)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92913 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-14 14:48:38 +00:00
Tilghman Lesher 652ee40acb When working with dates, use numeric form whenever possible, as it's faster.
Also, a bunch of coding guidelines fixes.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92855 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-13 23:10:42 +00:00
Joshua Colp e941bbad0f Move usage of the old LOCAL_USER_* macros to the new ast_module_user_* functions in a few documentation places.
(closes issue #11533)
Reported by: IgorG
Patches:
      oldmacroclean.v1.diff uploaded by IgorG (license 20)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92811 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-13 20:23:48 +00:00
Mark Michelson 5e5c866cf3 Merged revisions 92807 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r92807 | mmichelson | 2007-12-13 14:03:20 -0600 (Thu, 13 Dec 2007) | 3 lines

Prevent another potential fd leak


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92808 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-13 20:12:37 +00:00
Mark Michelson 98ad4c80f5 Merged revisions 92803 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r92803 | mmichelson | 2007-12-13 13:49:55 -0600 (Thu, 13 Dec 2007) | 3 lines

Prevent a possible fd leak. 


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92806 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-13 19:53:21 +00:00
Doug Bailey 26c06f4745 Tag voicemails with UTC time as opposed to local time zone
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92737 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-13 15:40:19 +00:00
Jason Parker 7f6b2066f9 Merged revisions 92617 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

(closes issue #11048)
........
r92617 | qwell | 2007-12-12 15:15:45 -0600 (Wed, 12 Dec 2007) | 4 lines

Don't increment user count until after name has been recorded (if enabled).

Issue 11048, tested by pep.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92618 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-12 21:22:58 +00:00
Tilghman Lesher 99308dfb4e Conversions of free to ast_free, where applicable, and several other formatting fixes.
Reported by: eliel
Patch by: eliel,tilghman
(Closes issue #11209)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92594 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-12 20:05:13 +00:00
Mark Michelson a43dd8acb3 Merged revisions 92443 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r92443 | mmichelson | 2007-12-12 10:08:55 -0600 (Wed, 12 Dec 2007) | 3 lines

Removing an unused variable.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92444 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-12 16:11:13 +00:00
Jason Parker 21df42b35c Add variable to show which key was pressed to stop playback.
Issue #11377, initial patch by johan.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92401 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-11 21:17:37 +00:00
Mark Michelson dea49116ee Merged revisions 92323 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r92323 | mmichelson | 2007-12-11 11:42:25 -0600 (Tue, 11 Dec 2007) | 10 lines

Fixing autofill to be more accurate. Specifically, if calls ahead of the current
caller were ringing members (but not yet bridged) there could be available members
and waiting callers who would not get matched up. The member availability checker
was correctly determining the number of available members in this scenario, but
the queue itself did not parallelly reflect this status on the pending calls. This
commit corrects the issue.

(closes issue #11459, reported by equissoftware, patched by me)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92324 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-11 17:44:42 +00:00
Mark Michelson 8bf68432a0 Merged revisions 92202 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r92202 | mmichelson | 2007-12-10 10:29:44 -0600 (Mon, 10 Dec 2007) | 7 lines

If there are no members in a queue, then the loop where the datastore for detecting
duplicate dialed numbers will be skipped, meaning the datastore isn't created. This means
that when we try to free it, there's a crash. This stops that crash from occurring.

(closes issue #11499, reported by slavon, patched by eliel)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92203 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-10 16:30:46 +00:00
Olle Johansson e2a8a6f46a Add a few extra headers in the voicemail users listing in
manager 1.1. Update documentation too.

(closes issue #11495)
Reported by: caio1982
Patches: 
      extra_vm_manager_info1.diff uploaded by caio1982 (license 22)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92140 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-10 13:29:57 +00:00
Luigi Rizzo 5490889153 Put into Makefile.moddir_rules the common instructions used to
generate loadable and embedded module lists.

Individual Makefiles now are a lot simpler, possibly as simple as this:

    -include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/menuselect.makedeps
    MODULE_PREFIX=cdr_
    all: _all
    include $(ASTTOPDIR)/Makefile.moddir_rules

and also more flexible because in a single directory we can combine
various types of modules (app_, cdr_, func_, ... ) by simply
listing them in the MODULE_PREFIX variable.

The individual Makefiles can also create list of modules to be
excluded by listing them in the variablel MODULE_EXCLUDE (see an
example in channels/Makefile).

With this change it becomes trivial to integrate a directory with
locally created/modified sources into the main build.




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92082 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-10 03:50:38 +00:00
Luigi Rizzo d652be0930 normalize subdirs' Makefile by using ASTTOPDIR and not .. to reference
the top level directory.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92022 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-09 21:29:37 +00:00
Russell Bryant 3a4d1c852b Merged revisions 91783 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r91783 | russell | 2007-12-07 10:38:48 -0600 (Fri, 07 Dec 2007) | 6 lines

* Add channel locking around datastore operations that expect the channel
  to be locked.
* Document why we don't record Local channels in the dialed interfaces list.
* Remove the dialed variable as it isn't needed.
* Restructure some code for clarity and coding guidelines stuff

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@91784 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-07 16:40:41 +00:00
Russell Bryant bfd58d8c2a Merged revisions 91780 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r91780 | russell | 2007-12-07 10:25:25 -0600 (Fri, 07 Dec 2007) | 7 lines

* Add channel locking around datastore operations that expect the channel
  to be locked.
* Document why we don't record Local channels in the dialed interfaces list.
* Handle memory allocation failure.
* Remove the dialed variable, as it wasn't actually needed.
* Tweak some formatting to conform to coding guidelines.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@91781 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-07 16:28:36 +00:00
Russell Bryant 547083e21a Merged revisions 91693 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r91693 | russell | 2007-12-06 20:51:22 -0600 (Thu, 06 Dec 2007) | 2 lines

Don't unlock the dialed_interfaces list until we're done messing with the iterator.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@91700 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-07 02:52:38 +00:00
Russell Bryant c72fa81580 Merged revisions 91677 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r91677 | russell | 2007-12-06 20:38:40 -0600 (Thu, 06 Dec 2007) | 4 lines

Allow dialing local channels from Queue() and Dial() again.  There was a slight
flaw in the code to prevent call forwards from looping that caused this problem.
(related to issue #11486)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@91678 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-07 02:43:21 +00:00
Russell Bryant 135f315382 Merged revisions 91675 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r91675 | russell | 2007-12-06 20:19:45 -0600 (Thu, 06 Dec 2007) | 7 lines

Fix in an issue in the call forwarding handling code that was causing crashes
on every call into a queue.  I'm not entirely sure about the logic in this part
of the code, so I want to look at it some more tomorrow.  However, this makes
it safe and keeps it from crashing.

(closes issue #11486, reported by adamg, patched by me)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@91676 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-07 02:21:07 +00:00
Mark Michelson e797cd04dc Handle allocation failure of the heard and deleted arrays of the vm_state.
(closes issue #11408, reported and patched by jaroth)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@91579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-06 21:03:15 +00:00
Olle Johansson 807d5e1ef7 - Dial event
- Event Dial has new headers, to comply with other events
        - Source        -> Channel              Channel name (caller)
        - SrcUniqueID   -> UniqueID             Uniqueid
        (new)           -> Dialstring           Dialstring in app data


(moremanager)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@91407 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-06 15:04:34 +00:00
Olle Johansson 6765d5f758 Adding small missing but important comma...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@91406 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-06 14:55:31 +00:00
Olle Johansson 478df6c69f A big oops...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@91388 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-06 14:40:44 +00:00
Olle Johansson a545aaae53 The MeetmeJoin now has caller ID name and Caller ID number fields (like MeetMeLeave)
(Moremanager)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@91387 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-06 14:36:54 +00:00
Mark Michelson fe83f51186 Merged revisions 91292 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r91292 | mmichelson | 2007-12-05 16:57:13 -0600 (Wed, 05 Dec 2007) | 3 lines

Reverting extra stuff I didn't mean to commit


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@91293 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-05 22:57:57 +00:00
Mark Michelson b32e39cbda Merged revisions 91273 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r91273 | mmichelson | 2007-12-05 16:35:52 -0600 (Wed, 05 Dec 2007) | 11 lines

The 'G' option for Dial() did not properly handle the case where only a label was
provided. This was due to the fact that the answering channel did not have an extension
set, so ast_parseable_goto would fail. This fix eliminates the call to ast_parseable_goto
on the answering channel since it is a wasteful call. The answering channel and the calling
channel are both directed to the same extension and context, just different priorities, so
we can just copy the values from the calling channel to the answering channel and increment
the answering channel's priority.

(closes issue #11382, reported by jon, patch by me with correction by jon)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@91291 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-05 22:55:49 +00:00
Russell Bryant f82c42a22e Resolve compiler warnings.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@91193 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-05 17:44:59 +00:00
Tilghman Lesher d226c1d637 Added multiple name listing. (Closes issue #10413)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@91172 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-05 16:25:52 +00:00
Mark Michelson 0742acef39 Kevin suggested doing the reverse of my last commit, since imap_retrieve_file
does not modify the contents of the "mailbox" string. In other words, I'm changing
the imap_retrieve_file function to take a const char* as the third argument so that I
don't need to cast const char*'s as char*'s to suppress compiler warnings.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90930 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-04 18:29:35 +00:00
Mark Michelson 50ee083210 Suppress a compiler warning due to discarding a "const" qualifier
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90928 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-04 18:14:08 +00:00
Mark Michelson 5d1fb935ba Wrong locking style got merged from 1.4 to trunk. My mistake.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90899 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-04 17:51:59 +00:00
Jason Parker 814a7f66c0 Fix build in trunk. This was fixed in 1.4, but blocked in trunk since this hadn't been merged yet.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90877 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-04 17:35:40 +00:00
Mark Michelson c52d8a1cd5 Merged revisions 90735 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r90735 | mmichelson | 2007-12-03 17:12:17 -0600 (Mon, 03 Dec 2007) | 22 lines

A big one...

This is the merge of the forward-loop branch. The main change here is that call-forwards can no longer loop.
This is accomplished by creating a datastore on the calling channel which has a linked list of all devices
dialed. If a forward happens, then the local channel which is created inherits the datastore. If, through this
progression of forwards and datastore inheritance, a device is attempted to be dialed a second time, it will simply
be skipped and a warning message will be printed to the CLI. After the dialing has been completed, the datastore
is detached from the channel and destroyed.

This change also introduces some side effects to the code which I shall enumerate here:

1. Datastore inheritance has been backported from trunk into 1.4
2. A large chunk of code has been removed from app_dial. This chunk is the section of code
   which handles the call forward case after the channel has been requested but before it has
   been called. This was removed because call-forwarding still works fine without it, it makes the
   code less error-prone should it need changing, and it made this set of changes much less painful
   to just have the forwarding handled in one place in each module.
3. Two new files, global_datastores.h and .c have been added. These are necessary since the datastore
   which is attached to the channel may be created and attached in either app_dial or app_queue, so they
   need a common place to find the datastore info. This approach was taken in case similar datastores are
   needed in the future, there will be a common place to add them.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90873 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-04 17:08:36 +00:00
Olle Johansson 4d2368f202 (closes issue #11431)
Reported by: Laureano
Patches: 
      app_queue.c.patch uploaded by Laureano (license 265)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90854 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-04 15:16:03 +00:00
Jason Parker d3dd515072 Merged revisions 90696 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

(Closes issue #11383)
........
r90696 | qwell | 2007-12-03 16:06:36 -0600 (Mon, 03 Dec 2007) | 4 lines

Make sure we always close the conference fd if we have an open one.

Issue 11383, reported by markmhy, patch by eliel.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90697 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-03 22:07:57 +00:00
Mark Michelson 9c2b82c726 Replacing some calls to free() with ast_free().
(closes issue #11448, reported and patched by jaroth)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90670 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-03 21:24:56 +00:00
Joshua Colp 4201a5af8b Remove the file descriptors from the main poll channel when the channel is hung up during the dialing attempt, and make sure a channel exists before trying to remove it at the end.
(closes issue #11441)
Reported by: blitzrage


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90508 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-03 14:14:43 +00:00
Russell Bryant 0f5117be2e Merged revisions 90470 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r90470 | russell | 2007-12-02 12:18:52 -0600 (Sun, 02 Dec 2007) | 6 lines

The other day when I went through making changes as a result of the ao2_link()
change, I added some code to set pointers to NULL after they were unreferenced.
This pointed out that in this place, the object was unreferenced before the
code was done using it.  So, move the unref down a little bit.
(crash reported by jmls on IRC)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90471 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-02 18:20:13 +00:00
Mark Michelson 6b08c442c7 Adding support for the "automixmonitor" dial and queue options.
This works in much the same way as the automonitor, except that instead of using the monitor
app, it uses the mixmonitor app. By providing an 'x' or 'X' as a dial or queue option, a DTMF
sequence may be entered (as defined in features.conf) to start the one-touch mixmonitor.

This patch also introduces some new API calls to the audiohooks code for searching for an audiohook
by type and for searching for a running audiohook by type.

Big thanks to joetester for writing the initial patch, testing it and patiently waiting for it to 
be committed.

(closes issue #10185, reported and patched by xmarksthespot)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90388 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-30 21:19:57 +00:00
Russell Bryant fac7480820 Merged revisions 90348 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r90348 | russell | 2007-11-30 13:26:04 -0600 (Fri, 30 Nov 2007) | 8 lines

Change the behavior of ao2_link().  Previously, in inherited a reference.
Now, it automatically increases the reference count to reflect the reference
that is now held by the container.

This was done to be more consistent with ao2_unlink(), which automatically
releases the reference held by the container.  It also makes it so it is
no longer possible for a pointer to be invalid after ao2_link() returns.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90351 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-30 19:34:47 +00:00
Mark Michelson 4ed5336a45 Merged revisions 90163 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r90163 | mmichelson | 2007-11-29 13:38:39 -0600 (Thu, 29 Nov 2007) | 6 lines

This patch handles the case where a queue member with a negative penalty is added
via the manager. If a negative value is submitted for a member penalty, we set it to 0.

(closes issue #11411, reported and patched by Laureano)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90164 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-29 19:39:31 +00:00
Joshua Colp 48da910225 Merged revisions 90101 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r90101 | file | 2007-11-28 18:59:28 -0400 (Wed, 28 Nov 2007) | 6 lines

Fix a few memory leaks.
(closes issue #11405)
Reported by: eliel
Patches:
      load_realtime.patch uploaded by eliel (license 64)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90102 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-28 23:03:09 +00:00
Russell Bryant 972cacad4a Merge some little changes from team/russell/chan_refcount to help reduce
the diff to trunk.

This just removes some checks on the return value of alloca(), as behavior
is undefined if it runs out of stack space, and we don't check it anywhere else.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89947 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-28 00:49:55 +00:00
Russell Bryant 63bca744a2 Merged revisions 89844 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89844 | russell | 2007-11-27 17:21:13 -0600 (Tue, 27 Nov 2007) | 3 lines

Instead of depending on the return value of ast_true(), explicitly set the
eventwhencalled variable to 1.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89847 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-27 23:21:38 +00:00
Mark Michelson ba7f5fec38 Merged revisions 89837 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89837 | mmichelson | 2007-11-27 17:10:05 -0600 (Tue, 27 Nov 2007) | 12 lines

Two changes with regards to the 'eventwhencalled' option of queues.conf

1) Due to some signed vs. unsigned silliness, setting 'eventwhencalled' to 
   'vars' or 'yes' did exactly the same thing. Thus the sign change of the
   ast_true call.

2) The vars2manager function overwrote a \n for every channel variable it parsed, resulting
   in bizarre output for the channel variables. This patch remedies this.

(related to issue #11385, however I'm not sure if this will actually be enough to close it)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89838 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-27 23:11:12 +00:00
Steve Murphy 4d8932a6dc Merged revisions 89622 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89622 | murf | 2007-11-26 23:24:02 -0700 (Mon, 26 Nov 2007) | 1 line

closes issue #11379; OK, this is an attempt to make both sides happy. To the cdr.conf file, I added the option 'unanswered', which defaults to 'no'. In this mode, you will see a cdr for a call, whether it was answered or not. The disposition will be NO ANSWER or ANSWERED, as appropriate. The src is as you'd expect, the destination channel will be one of the channels from the Dial() call, usually the last in the list if more than one chan was specified. With unanswered set to 'yes', you will still see this cdr entry in both cases. But in the case where the dial timed out, you will also see a cdr for each line attempted, marked NO ANSWER, with no destination channel name. The new option defaults to 'no', so you don't see the pesky extra cdr's by default, and you will not see the irritating 'not posted' messages.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-27 06:47:08 +00:00
Mark Michelson 5f3a28e588 Merged revisions 89618 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89618 | mmichelson | 2007-11-26 17:10:49 -0600 (Mon, 26 Nov 2007) | 7 lines

After issuing a "say load new", if a caller hangs up during the middle of playback of a number,
app_playback will continue to try to play the remaining files. With this change, no more files will
be played back upon hangup.

(closes issue #11345, reported and patched by IgorG)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89619 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-26 23:11:29 +00:00
Olle Johansson 130a2051fa - Mark "concise" as deprecated
- Restructure other changes to UPGRADE.txt and CHANGES

We're still looking for scripts that replace 
	asterisk -rx "show shannels concise"
by using the manager interface, but still produces the same output.
Anyone?


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89606 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-26 19:24:23 +00:00
Joshua Colp 0619fb1248 Perform some module use counting audits. This is now done outside the scope of the application/dialplan function so they do not need to worry about it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89602 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-26 18:11:31 +00:00
Joshua Colp 9905034266 Merged revisions 89587 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89587 | file | 2007-11-26 13:20:58 -0400 (Mon, 26 Nov 2007) | 6 lines

Close the audio file before sending it to the post processing application.
(closes issue #11357)
Reported by: reformed
Patches:
      mixmonitor.patch uploaded by reformed (license 330)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89589 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-26 17:23:28 +00:00
Kevin P. Fleming 721b3c8a0e Merged revisions 89586 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89586 | kpfleming | 2007-11-26 11:20:36 -0600 (Mon, 26 Nov 2007) | 2 lines

when parsing application options that take arguments, don't indicate that the option was supplied unless a non-zero-length argument was found for it

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89588 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-26 17:21:37 +00:00
Mark Michelson 0b120dac62 Merged revisions 89580 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89580 | mmichelson | 2007-11-26 09:48:06 -0600 (Mon, 26 Nov 2007) | 6 lines

Revert vmu->email back to an empty string if it was empty when imap_store_file
was called. This prevents sending a duplicate e-mail. 

(closes issue #11204, reported by spditner, patched by me)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89581 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-26 15:50:37 +00:00
Joshua Colp 5303abd58d Merged revisions 89571 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89571 | file | 2007-11-26 10:41:03 -0400 (Mon, 26 Nov 2007) | 4 lines

When unloading app_meetme destroy any auto created contexts created by SLA.
(closes issue #11367)
Reported by: eliel

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89572 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-26 14:42:57 +00:00
Joshua Colp 2c223a4512 Don't crash if the 'o' option of ControlPlayback is used without any value.
(closes issue #11375)
Reported by: johan


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89570 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-26 14:31:32 +00:00
Tilghman Lesher b0d8378910 Merged revisions 89540 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89540 | tilghman | 2007-11-24 00:19:23 -0600 (Sat, 24 Nov 2007) | 9 lines

Currently, zero-length voicemail messages cause a hangup in VoicemailMain.
This change fixes the problem, with a multi-faceted approach.  First, we
do our best to avoid these messages from being created in the first place,
and second, if that fails, we detect when the voicemail message is
zero-length and avoid exiting at that point.
Reported by: dtyoo
Patch by: gkloepfer,tilghman
(Closes issue #11083)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89541 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-24 06:24:46 +00:00
Luigi Rizzo cda3df64d8 more header removal
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89524 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-22 04:37:08 +00:00
Luigi Rizzo 51391e6b09 shuffle a little bit the content of header files to reduce dependencies.
In this commit:
- move the ast_register/unregister_app functions to module.h
  to avoid the need to include pbx.h for the simpler apps;
- move the ast_group structure to channel.h to remove the
  dependency of app.h on linkedlists.h

Note, this is a long process that I am doing in small steps.

The main difficulty is that now for each subsystem we
have a single header (e.g. channel.h) included by the subsystem
provider (usually one file, e.g. channel.c) and by its clients
(dozens of them, e.g. we have some 70+ apps and 30+ functions).

This requires the clients to include all the extra headers
required by the provider (eg. lock.h, linkedlists.h, definitions
of substructures...) even though many of the clients would be
just happy with opaque struct declarations and function prototypes.

The long term plan is to eventually rectify this structure
so that the compilation can become faster, and also APIs
are more stable.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89522 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-22 03:50:04 +00:00
Luigi Rizzo 200f9c633b remove some useless includes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89521 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-22 02:30:58 +00:00
Luigi Rizzo ea2c54859d more removal of redundant headers
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-22 02:07:33 +00:00
Luigi Rizzo b1fe2d85d3 remove redundant headers
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89518 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-22 01:39:06 +00:00
Luigi Rizzo 3fc2646808 remove a number of #include <fcntl.h> which are either
useless or done elsewhere



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89516 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-22 01:03:02 +00:00
Steve Murphy 86476c607f closes issue #11285, where an unload of a module that creates a dialplan context, causes a crash when you do a 'dialplan show' of that context. This is because the registrar string is defined in the module, and the stale pointer is traversed. The reporter offered a patch that would always strdup the registrar string, which is practical, but I preferred to destroy the created contexts in each module where one is created. That seemed more symmetric. There were only 6 place in asterisk where this is done: chan_sip, chan_iax2, chan_skinny, res_features, app_dial, and app_queue. The two apps destroyed the context, but left the contexts. All is fixed now and unloads should be dialplan friendly.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89513 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-21 23:54:12 +00:00
Luigi Rizzo 7e8835e0d7 remove another set of redundant #include "asterisk/options.h"
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-21 23:24:55 +00:00
Mark Michelson ffa8035212 Merged revisions 89495 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89495 | mmichelson | 2007-11-21 13:27:51 -0600 (Wed, 21 Nov 2007) | 3 lines

Fix a small error I made in my previous commit


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89496 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-21 19:28:43 +00:00
Mark Michelson 9c275b0e51 Merged revisions 89493 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89493 | mmichelson | 2007-11-21 13:24:22 -0600 (Wed, 21 Nov 2007) | 5 lines

Changing an inaccurate debug message to be less inaccurate. Under the circumstances, this
message would always report that there were 0 members available, even though that may not be true.



........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89494 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-21 19:27:22 +00:00
Tilghman Lesher 1c295be7a0 Change Read to set READSTATUS as an indication of the result
Also, some cleanup to CHANGES.
Reported by: michael-fig
Patch by: michael-fig,tilghman
(Closes issue #11004)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89489 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-21 18:38:18 +00:00
Russell Bryant 6335b4b30d Merge changes from team/russell/sla_trunk_moh ...
* Added the ability to specify the music on hold class used to play into the
   conference when there is only one member and the M option is used.
* Added the ability to specify a music on hold class to play instead of ringing
   for the SLATrunk application.

(patched by me, and tested internally)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89470 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-21 00:21:38 +00:00
Tilghman Lesher cbfc6dcbea Make trunk build again
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89468 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-20 23:29:33 +00:00
Luigi Rizzo a23c055c3d move asterisk/paths.h outside asterisk.h and into those files
who really need it.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-20 23:16:15 +00:00
Luigi Rizzo 6938f4b2b0 Fix building of modules under cygwin.
After this commit we can actually load modules under windows,
and we can start debugging more interesting problems related
to the load order and functionality of modules.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89454 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-20 16:12:10 +00:00
Luigi Rizzo ffd86fc964 more errno.h removal
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89432 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-19 21:12:08 +00:00
Luigi Rizzo 0595b5e2aa include "logger.h" and errno.h from asterisk.h - usage shows that they
were included almost everywhere.
Remove some of the instances.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89424 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-19 18:52:04 +00:00
Joshua Colp 23cfef1cc9 Change warning messages (which are really debug messages) into debug messages.
(closes issue #11288)
Reported by: IgorG
Patches:
      saydebug-89394-1-trunk.patch uploaded by IgorG (license 20)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89410 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-19 14:03:30 +00:00
Luigi Rizzo 24c2e47e0d another cygwin compatibility fix.
This one must be handled in a better way in configure, also for other
architectures



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89374 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-17 11:08:58 +00:00
Luigi Rizzo d82a631f9c more removal of duplicate #include lines
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-17 00:02:33 +00:00
Luigi Rizzo 5490960453 remove a bunch of duplicate includes
Reproduce with

grep -r #include . | grep -v .svn | grep -v Binary | sort | uniq -c | sort -nr 



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16 23:54:45 +00:00
Luigi Rizzo fdb7f7ba3d Start untangling header inclusion in a way that does not affect
build times - tested, there is no measureable difference before and
after this commit.

In this change:

use asterisk/compat.h to include a small set of system headers:
inttypes.h, unistd.h, stddef.h, stddint.h, sys/types.h, stdarg.h,
stdlib.h, alloca.h, stdio.h

Where available, the inclusion is conditional on HAVE_FOO_H as determined
by autoconf.

Normally, source files should not include any of the above system headers,
and instead use either "asterisk.h" or "asterisk/compat.h" which does it
better. 

For the time being I have left alone second-level directories
(main/db1-ast, etc.).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16 20:04:58 +00:00
Mark Michelson 68a805b70b Adding confirmation playback when forwarding voicemail messages. This will attempt
to play the name(s) of the person(s) to whom you are forwarding the message prior to
prompting for prepending. If no name is found, the extension is read back verbatim.

(closes issue #9046, reported and patched by jaroth)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16 17:11:43 +00:00
Mark Michelson 2f7440932c Merged revisions 89323 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89323 | mmichelson | 2007-11-16 09:28:22 -0600 (Fri, 16 Nov 2007) | 5 lines

Make realtime queues accessible from the QUEUE_MEMBER_COUNT function.

(closes issue #11271, reported and patched by atis, with small modifications from me)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89324 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16 15:44:27 +00:00
Tilghman Lesher 8044dce3c0 Fix trunk breakage due to chan->lock being renamed.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89300 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15 18:15:48 +00:00
Russell Bryant 1bf63d1c5b Merged revisions 89296 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89296 | russell | 2007-11-15 11:19:28 -0600 (Thu, 15 Nov 2007) | 8 lines

Update the SLAStation application to account for the case where the SLA thread
has a call out to the station,  but the user has pressed a line button to answer
the call instead of picking up the handset.  If they do, the phone sends out a
new INVITE.  So, the SLAStation app must check to see if it is picking up a
ringing trunk, and ensure that the other stations stop ringing.

(reported internally, patched by me, tested by mogorman)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89297 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15 17:27:27 +00:00
Luigi Rizzo 09d9cce1d8 access channel locks through ast_channel_lock/unlock/trylock and not
through ast_mutex primitives.

To detect all occurrences, I have renamed the lock field in struct ast_channel
so it is clear that it shouldn't be used directly.

There are some uses in res/res_features.c (see details of the diff)
that are error prone as they try and lock two channels without
caring about the order (or without explaining why it is safe).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89293 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15 16:20:47 +00:00
Luigi Rizzo 7f8ecd2cd3 make the 'name' and 'value' fields in ast_variable const char *
This prevents modifying the strings in the stored variables, 
and catched a few instances where this was actually done.

Given the differences between trunk and 1.4 (and the fact that this
is effectively an API change) it is better to fix 1.4 independently.
These are

chan_sip.c::sip_register()
chan_skinny.c:: near line 2847
config.c:: near line 1774
logger.c::make_components()
res_adsi.c:: near line 1049

I may have missed some instances for modules that do not build here.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89268 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-14 13:18:40 +00:00
Russell Bryant 0df5e50e97 Use BEGIN_OPTIONS / END_OPTIONS to make the syntax highlighting in my editor happy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89264 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-14 01:40:47 +00:00
Russell Bryant 31512895ae Instead of reserving 800 bytes for periodic announcements, use an array of
ast_str pointers and only alloate space for the strings as needed.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89263 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-14 01:35:28 +00:00
Russell Bryant 76696ac65f Convert most of the strings in the call_queue struct to use stringfields.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-14 01:15:26 +00:00
Mark Michelson e4bb565530 Merged revisions 89241 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89241 | mmichelson | 2007-11-13 10:02:02 -0600 (Tue, 13 Nov 2007) | 5 lines

Reverting commit made in revision 89205 since it is unnecessary.

Thanks to Kevin for pointing this out


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89242 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-13 16:03:10 +00:00
Mark Michelson 13c49f6cce There is the potential to copy uninitialized memory into the mixmonitor->post_process
string. This fix prevents that.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89207 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-13 01:19:53 +00:00
Mark Michelson 1d4c579422 Merged revisions 89205 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89205 | mmichelson | 2007-11-12 18:56:46 -0600 (Mon, 12 Nov 2007) | 5 lines

Some sanity checking for MixMonitor. If only 1 argument is given, then the args.options
and args.post_process strings are uninitialized and could contain garbage. This change
handles this situation properly by only using arguments that we have parsed.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89206 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-13 00:57:34 +00:00
Steve Murphy 98429d37b2 Based on a note in asterisk-dev by Brian Capouch, I determined I too agressive in not initializing arrays passed to pbx_substitute_variables_xxxx; I reviewed the code (again) and hopefully found every possible spot where substitute_variables is called conditionally, and made sure the char array involved was set to a null string.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89186 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-12 18:44:36 +00:00
Mark Michelson 35d7946cda app_voicemail failed to build when compiling with IMAP_STORAGE
Now it does not.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89123 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 22:33:59 +00:00
Tilghman Lesher 3a70afbc3e Add the FILE() dialplan function and deprecate ReadFile.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89114 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 17:32:15 +00:00
Luigi Rizzo 01a1cfd262 use %f instead of %lf (the 'l' is ignored anyways).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89110 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 09:21:02 +00:00
Kevin P. Fleming edc78d6023 improve linked-list macros in two ways:
- the *_CURRENT macros no longer need the list head pointer argument
  - add AST_LIST_MOVE_CURRENT to encapsulate the remove/add operation when moving entries between lists


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89106 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 05:28:47 +00:00
Tilghman Lesher 97744f54e7 Merged revisions 89093 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89093 | tilghman | 2007-11-07 17:39:37 -0600 (Wed, 07 Nov 2007) | 7 lines

The member refcount must be incremented, to avoid using it after deallocation.
A huge thanks go to lvl- for patiently providing the necessary valgrind output
that was necessary to finding this problem of memory corruption.
Reported by: lvl-
Patch by: tilghman
Closes issue #11174

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89094 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-07 23:47:45 +00:00
Mark Michelson 4f34bc609b If imapfolder has been specified in voicemail.conf, we should not connect to INBOX...
ever. It may not exist.

(closes issue #11151, reported by selsky, patched by me)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89092 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-07 23:18:22 +00:00
Tilghman Lesher 6f3f010ca0 Suppress erroneous warnings on load.
Reported by: eliel
Patch by: eliel
Closes issue #11177


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89081 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-07 04:21:27 +00:00
Russell Bryant e309393920 Added the ability to do "meetme concise" with the "meetme" CLI command.
This extends the concise capabilities of this CLI command to include
listing all conferences, instead of an addition to the other sub commands
for the "meetme" command.

(closes issue #11078)
Reported by: jthomas
Patches: 
      meetme-concise.patch uploaded by jthomas (license 293)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89073 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-06 23:44:39 +00:00
Mark Michelson 0cd3118a62 Adding the queue strategy wrandom
(closes issue #10942, reported and patched by julianjm, documentation changes by me)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89070 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-06 22:36:55 +00:00
Russell Bryant a06218ee6d Added the S() and L() options to the MeetMe application. These are pretty
much identical to the S() and L() options to Dial().  They let you set
timeouts for the conference, as well as have warning sounds played to
let the caller know how much time is left, and when it is running out.

(closes issue #8030)
Reported by: areski
Patches: 
      meetme_timeout_timelimit_v2.patch uploaded by areski (license 29)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89069 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-06 22:15:32 +00:00
Mark Michelson 01e1f6cc94 Added CLI and manager commands for changing a queue member's penalty
(closes issue #9374, reported and initially patched by wuwu, intermediate patch by eliel, and final patch by me)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89068 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-06 22:05:56 +00:00
Mark Michelson 5a4867543d "show application <foo>" changes for clarity.
(closes issue #11171, reported and patched by blitzrage)

Many thanks!



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89044 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-06 19:04:45 +00:00
Luigi Rizzo 08b10da53b Simplify the implementation and the API for stringfields;
details and examples are in include/asterisk/stringfields.h.

Not applicable to older branches except for 1.4 which will
receive a fix for the routines that free memory pools.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@88454 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-04 19:44:31 +00:00
Steve Murphy 63f2f04cf4 This commits the performance mods that give the priority processing engine in the pbx, a 25-30% speed boost. The two updates used, are, first, to merge the ast_exists_extension() and the ast_spawn_extension() where they are called sequentially in a loop in the code, into a slightly upgraded version of ast_spawn_extension(), with a few extra args; and, second, I modified the substitute_variables_helper_full, so it zeroes out the byte after the evaluated string instead of demanding you pre-zero the buffer; I also went thru the code and removed the code that zeroed this buffer before every call to the substitute_variables_helper_full. The first fix provides about a 9% speedup, and the second the rest. These figures come from the 'PIPS' benchmark I describe in blogs, conf. reports, etc.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@88166 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-01 22:26:51 +00:00
Joshua Colp e3f3a640c0 Merged revisions 88026 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r88026 | file | 2007-11-01 10:27:37 -0300 (Thu, 01 Nov 2007) | 2 lines

Fix up commit for my Zap channel with spies in Meetme fix. (thanks Tony Mountifield!)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@88027 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-01 13:30:28 +00:00
Tilghman Lesher 97fe45ab93 Janitor: use ast_free to pair calls of ast_malloc and ast_calloc
Reported by: eliel
Patch by: eliel
Closes issue #11135


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@88008 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-01 06:07:18 +00:00
Joshua Colp 78cae359c8 Merged revisions 87970 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r87970 | file | 2007-10-31 22:53:55 -0300 (Wed, 31 Oct 2007) | 4 lines

If a Zap channel contains a spy or a spy is added take it out of the conference in kernel space and make it go through Asterisk so the spy gets audio from both sides.
(closes issue #10060)
Reported by: mparker

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@87971 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-01 01:55:38 +00:00
Joshua Colp df6237eac3 Add volume adjustment in.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@87851 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-31 18:03:17 +00:00
Joshua Colp f066bfc38a Restore operation of the option that only writes when the channel is bridged.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@87850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-31 17:56:21 +00:00
Joshua Colp d13f7d94b1 Add volume adjustment to spy audiohook in app_chanspy.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@87833 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-31 17:25:16 +00:00
Tilghman Lesher f595811265 If no '?' is found in the arguments, don't attempt to continue.
Reported by: blitzrage
Fixed by: tilghman
Closes issue #11111


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@87724 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-30 22:15:28 +00:00
Russell Bryant c1e08b1ae0 If a caller is listen-only, then don't bother with doing talker detection.
(closes issue #10911, reported by junky, patched by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@87428 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-29 21:34:47 +00:00
Mark Michelson 3ffc123db9 Adding the more flexible QUEUE_MEMBER function to replace the QUEUE_MEMBER_COUNT function.
A deprecation notice will be issued the first time QUEUE_MEMBER_COUNT is used.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@87395 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-29 20:13:23 +00:00
Jason Parker 98617d82a1 Make sure we set flags to a 0 value before trying to use it. Pointed out by seanbright while I was debugging issue 11109.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@87393 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-29 19:56:50 +00:00
Joshua Colp 34fd65ba3c Remove duplicate stdlib.h include.
(closes issue #11105)
Reported by: eliel
Patches:
      app_voicemail.c.patch uploaded by eliel (license 64)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@87327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-29 16:38:31 +00:00
Mark Michelson cf861b38c7 Added queue strategy "linear". This strategy is useful for those who always wish for their
phones to be rung in a specific order.

(closes issue #7279, reported and initially patched by diLLec, patch reworked by me)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@87154 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-26 15:19:46 +00:00
Russell Bryant adc9003fc5 Add support for a muted user to request to talk. The '2' option in the user
menu will adjust this status if a user is muted.  The talk request status will
be reflected in the CLI commands as well as the manager interface.

(closes issue #9418)
Reported by: imesper
Patches: 
      app_meetme_v2.patch uploaded by imesper (license 275)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@87040 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-25 18:59:22 +00:00
Mark Michelson a8cc80e36d Adding the general option "shared_lastcall" to queues so that a member's wrapuptime
may be used across multiple queues.

(closes issue #9777, reported and patched by eliel)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86985 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-24 21:26:27 +00:00
Russell Bryant 39ce390203 Convert some spaces to tabs and make it so the CLI command is only registered
once instead of 3 times.

(closes issue #11053)
Reported by: seanbright
Patches:
      app_playback.patch uploaded by seanbright (license 71)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86835 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-22 21:17:16 +00:00
Jason Parker ebe4050128 Switch from AST_CLI (formerly NEW_CLI) to AST_CLI_DEFINE, since the former didn't make much sense
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-22 20:05:18 +00:00
Joshua Colp 967466da29 Merged revisions 86754 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r86754 | file | 2007-10-22 13:15:18 -0300 (Mon, 22 Oct 2007) | 4 lines

Make sure res is a positive value before performing the check to determine whether the user stopped it or not.
(closes issue #11023)
Reported by: cfc

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86755 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-22 16:19:01 +00:00
Mark Michelson 2d5c98be1e Merged revisions 86694 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r86694 | mmichelson | 2007-10-22 09:48:46 -0500 (Mon, 22 Oct 2007) | 5 lines

Account for the fact that sometimes headers may be terminated with \r\n instead of just \n

(closes issue #11043, reported by yehavi)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86696 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-22 14:58:57 +00:00
Jason Parker b0f3e6097e Convert NEW_CLI to AST_CLI.
Closes issue #11039, as suggested by seanbright.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86536 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-19 18:29:40 +00:00
TransNexus OSP Development d667064268 Fixed a buffer size issue.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86439 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-19 01:56:47 +00:00
Mark Michelson 934b814add Merged revisions 86328 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r86328 | mmichelson | 2007-10-18 12:38:26 -0500 (Thu, 18 Oct 2007) | 5 lines

If a non-existent file is specified to be played either as a periodic announcement
or as a hold/position announcement, the caller would be kicked out of the queue.
No longer does this happen.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86329 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-18 17:40:45 +00:00
Mark Michelson 37c1943b87 Changed some spaces to tabs
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86298 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-18 16:16:51 +00:00
Mark Michelson d1a0d959a7 Merged revisions 86202 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r86202 | mmichelson | 2007-10-17 16:39:05 -0500 (Wed, 17 Oct 2007) | 6 lines

Changing the strategy field of the call_queue struct to be signed instead of unsigned,
since the code attempts to set the strategy to -1 if you specify a bogus strategy.
While this isn't a huge issue in 1.4, it could be a problem for someone who, say, tries
to use the roundrobin strategy in trunk (despite all the deprecation warnings in 1.4).


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86208 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-17 21:41:06 +00:00
Tilghman Lesher c853d3ab01 Enhancements to realtime (closes issue #9609)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86065 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-17 15:13:51 +00:00
Mark Michelson c438d76551 Removed the monitor-join option. If one wishes to mix audio, they should instead use
monitor-type=mixmonitor.

(related to issue #10885)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86030 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-16 22:54:37 +00:00
Mark Michelson a39404fed2 Fixing the build.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85992 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-16 21:51:26 +00:00
Mark Michelson dadfe716e2 Fixing app_read so that if a timeout of less than 1 ms is specified,
assume that 1 ms is desired.

(closes issue #11000, reported and patched by michael-fig, with a warning line added by me)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85965 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-16 21:38:05 +00:00
Mark Michelson bece7e24f2 Merged revisions 85958 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r85958 | mmichelson | 2007-10-16 16:14:34 -0500 (Tue, 16 Oct 2007) | 5 lines

Trying to remove a non-dynamic queue member via dynamic means can lead to some
interesting (read nasty) situations. This patch clears up the issue by making
only dynamic queue members removable via dynamic methods.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85959 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-16 21:16:00 +00:00
Russell Bryant 1f21e03746 Merged revisions 85896 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r85896 | russell | 2007-10-16 14:10:01 -0500 (Tue, 16 Oct 2007) | 2 lines

Remove a pointless lock.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85897 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-16 19:12:24 +00:00
Mark Michelson 227d678cc7 Fix IMAP compilation error.
(closes issue #10986, reported and patched by snuffy)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85883 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-16 16:40:24 +00:00
Russell Bryant a586d03231 Merged revisions 85720 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r85720 | russell | 2007-10-15 16:10:02 -0500 (Mon, 15 Oct 2007) | 3 lines

Ensure that no pending state changes are leaked when the device state change
thread gets stopped on module unload.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85721 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-15 21:11:06 +00:00
Russell Bryant 4765cf4553 Another major doc directory update from IgorG. This patch includes
- Many uses of the astlisting environment around verbatim text to ensure that
   it gets properly formatted and doesn't run off the page.
 - Update some things that have been deprecated.
 - Add escaping as needed
 - and more ...

(closes issue #10978)
Reported by: IgorG
Patches: 
      texdoc-85542-1.patch uploaded by IgorG (license 20)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85547 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-15 13:12:51 +00:00
Mark Michelson fbcd884e1b Allow for the position announcement to be turned off if desired.
(closes issue #8515, reported by bruno_rocha, initial patch by bruno_rocha, final patch by qwell)




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85527 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-12 20:06:37 +00:00
Matthew Fredrickson a4be521c89 Make sure we propogate ANI2 to the outbound channel
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85499 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-11 22:42:44 +00:00
Russell Bryant e97a723cf1 Merge a ton of NEW_CLI conversions. Thanks to everyone that helped out! :)
(closes issue #10724)
Reported by: eliel
Patches: 
      chan_skinny.c.patch uploaded by eliel (license 64)
      chan_oss.c.patch uploaded by eliel (license 64)
      chan_mgcp.c.patch2 uploaded by eliel (license 64)
      pbx_config.c.patch uploaded by seanbright (license 71)
      iax2-provision.c.patch uploaded by eliel (license 64)
      chan_gtalk.c.patch uploaded by eliel (license 64)
      pbx_ael.c.patch uploaded by seanbright (license 71)
      file.c.patch uploaded by seanbright (license 71)
      image.c.patch uploaded by seanbright (license 71)
      cli.c.patch uploaded by moy (license 222)
      astobj2.c.patch uploaded by moy (license 222)
      asterisk.c.patch uploaded by moy (license 222)
      res_limit.c.patch uploaded by seanbright (license 71)
      res_convert.c.patch uploaded by seanbright (license 71)
      res_crypto.c.patch uploaded by seanbright (license 71)
      app_osplookup.c.patch uploaded by seanbright (license 71)
      app_rpt.c.patch uploaded by seanbright (license 71)
      app_mixmonitor.c.patch uploaded by seanbright (license 71)
      channel.c.patch uploaded by seanbright (license 71)
      translate.c.patch uploaded by seanbright (license 71)
      udptl.c.patch uploaded by seanbright (license 71)
      threadstorage.c.patch uploaded by seanbright (license 71)
      db.c.patch uploaded by seanbright (license 71)
      cdr.c.patch uploaded by moy (license 222)
      pbd_dundi.c.patch uploaded by moy (license 222)
      app_osplookup-rev83558.patch uploaded by moy (license 222)
      res_clioriginate.c.patch uploaded by moy (license 222)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85460 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-11 19:03:06 +00:00
Mark Michelson 75c83fd851 Merged revisions 85276 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r85276 | mmichelson | 2007-10-10 09:26:31 -0500 (Wed, 10 Oct 2007) | 5 lines

A bunch of changes from sprintf to snprintf.

See security advisory AST-2002-022


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85279 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-10 14:38:15 +00:00
Joshua Colp dd04101f60 Merged revisions 85242 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r85242 | file | 2007-10-10 11:14:56 -0300 (Wed, 10 Oct 2007) | 6 lines

Close voicemail message description file if duration did not meet the minimum, or else we will eventually run out of file descriptors.
(closes issue #10918)
Reported by: brak2718
Patches:
      vm1.4.12.1.patch uploaded by brak2718 (license 279)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85254 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-10 14:17:08 +00:00
Mark Michelson 310cfd3280 Patch to add one-touch parking for queues.
(closes issue #10869, reported and patched by bluecrow76)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85177 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-09 22:35:11 +00:00
Tilghman Lesher 7adbd6bb16 Remove redundant includes (patch by snuffy) (Closes issue #10922)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85140 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-09 16:04:41 +00:00
Mark Michelson 23ebcbc370 A two-in-one patch from the bugtracker
1) Fix some bad logic in the counting of statistics for QueueSummary manager event. Variables were not being
   reset for each additional queue, so cumulative totals were reported on each successive queue.

2) Add a longest hold time stat to QueueSummary manager event.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84726 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-04 22:58:26 +00:00
Mark Michelson 43e2818750 Merged revisions 84692 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r84692 | mmichelson | 2007-10-04 16:57:03 -0500 (Thu, 04 Oct 2007) | 5 lines

Don't allocate space for queue members unless it's needed. You end up deleting dynamic members on a reload. Not good.

closes issue (#10879, reported by dazza76, patched by me)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84693 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-04 22:00:10 +00:00
Joshua Colp e835dd12e4 Merged revisions 84637 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r84637 | file | 2007-10-04 11:51:57 -0300 (Thu, 04 Oct 2007) | 4 lines

Create a duplicate of the channel's member name as the tab completion stuff will free it.
(closes issue #10884)
Reported by: adamg

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-04 14:54:30 +00:00
Russell Bryant d78463be1e Corydon posted this janitor project to the bug tracker and mvanbaak provided
a patch for it.  It replaces a bunch of simple calls to snprintf with ast_copy_string

(closes issue #10843)
Reported by: Corydon76
Patches: 
      2007092900_10843.diff uploaded by mvanbaak (license 7)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84173 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-01 15:23:19 +00:00
Russell Bryant bff784d509 Merged revisions 84166 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r84166 | russell | 2007-10-01 09:24:49 -0500 (Mon, 01 Oct 2007) | 2 lines

Simplify the CAN_EARLY_BRIDGE macro a bit.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84167 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-01 14:27:02 +00:00
Joshua Colp 3ed4d505b7 Merged revisions 84158 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r84158 | file | 2007-10-01 10:49:36 -0300 (Mon, 01 Oct 2007) | 4 lines

Only attempt early bridging if the options given to Dial() permit it.
(closes issue #10861)
Reported by: peekyb

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84159 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-01 13:53:09 +00:00
Mark Michelson 2d95565f53 interface_exists_global was never returning 1. Most likely an error from my merge on Friday.
(closes issue #10817, reported and patched by snar, patch simplified by me)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83656 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-24 17:00:57 +00:00
Tilghman Lesher 02c997c64c Add the MeetmeList and Reload manager commands, which supplement the need to have Command privilege. (closes issue #10736)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83532 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-22 14:03:48 +00:00
Tilghman Lesher b88902639a Fix some areas where we were still using '|' for an argument delimiter (closes issue #10793)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83484 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-21 18:41:36 +00:00
Russell Bryant e5c12bcf62 Update app_queue to use commas as application argument separators.
(closes issue #10793, snar)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83483 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-21 18:27:56 +00:00
Jason Parker 857f785a40 More NEW_CLI conversions.
(issue #10724)
Patches:
      app_playback.c.patch uploaded by moy (license 222)
      app_minivm.c.patch uploaded by eliel (license 64)
      astmm.c.patch uploaded by eliel (license 64)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83381 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-20 23:14:30 +00:00
Mark Michelson 25763e2573 Merging changes from queue_refcount_trunk into trunk. Refcounted queues now in place.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-20 21:21:28 +00:00
Jason Parker dfc4e39e47 Merged revisions 83246 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r83246 | qwell | 2007-09-20 12:09:14 -0500 (Thu, 20 Sep 2007) | 8 lines

If # is pressed after dialing an extension in DISA, stop trying to collect more digits.

(closes issue #10754)
Reported by: atis
Patches:
      app_disa.c.branch.patch uploaded by atis (license 242)
      app_disa.c.trunk.patch uploaded by atis (license 242)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83251 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-20 17:10:14 +00:00
Jason Parker ac5332c674 More conversions to NEW_CLI
(issue #10724)
Patches:
      chan_zap.c.patch uploaded by moy (license 222)
      app_queue.c.patch uploaded by eliel (license 64)
      app_voicemail.c.patch uploaded by eliel (license 64)
      app_meetme.c.patch uploaded by eliel (license 64)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83213 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-19 23:16:51 +00:00
Russell Bryant 3a31b40b6f Merged revisions 83179 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r83179 | russell | 2007-09-19 14:50:48 -0500 (Wed, 19 Sep 2007) | 5 lines

The System() and TrySystem() applications can take a substantial amount of
time to execute while not servicing the channel.  So, put the channel in
autoservice while the command is being executed.
(closes issue #10726, reported by mnicholson)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83180 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-19 19:51:47 +00:00
Joshua Colp d65b2ac1ee Fix indentation in app_db.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83157 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-19 17:22:42 +00:00
Joshua Colp 367b241620 Clean up code in app_authenticate.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83156 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-19 17:20:43 +00:00
Joshua Colp ed4b51a85e Clean up code in app_adsiprog.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83155 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-19 17:14:02 +00:00
Joshua Colp 463c49e345 DISA only needs to know about the end of DTMF, not the beginning/duration.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83114 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-19 15:08:43 +00:00
Joshua Colp d816e7352c Clean up app_disa code a bit.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83105 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-19 15:05:35 +00:00
Joshua Colp 39a6ecc228 Merged revisions 83074 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r83074 | file | 2007-09-19 10:47:59 -0300 (Wed, 19 Sep 2007) | 6 lines

Protect the CDR record from modification by pbx_exec so that the application data contains the Queue data.
(closes issue #10761)
Reported by: snar
Patches:
      app-queue-mixmonitor.patch uploaded by snar (license 245)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83075 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-19 13:49:47 +00:00
Russell Bryant 58c5afe390 Merged revisions 82992 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r82992 | russell | 2007-09-18 19:19:49 -0500 (Tue, 18 Sep 2007) | 4 lines

Change the description of app_flash to note how it can be a useful tool instead
of just saying that it is generally a worthless feature.
(Thanks to Jim Van Meggelen for pointing it out and providing the proposed text)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82993 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-19 00:21:41 +00:00
Joshua Colp bd8414eff6 Merged revisions 82961 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r82961 | file | 2007-09-18 20:41:02 -0300 (Tue, 18 Sep 2007) | 2 lines

Initialize a variable to NULL to make the world happy.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82962 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-18 23:42:24 +00:00
Jason Parker 0c8381a1f5 (closes issue #10739)
Reported by: ruffle
Patches:
      app_voicemail.c.diff uploaded by ruffle (license 201)
      10739-moveheard.diff uploaded by qwell (license 4)
Tested by: callguy, ruffle

Add an option to disable the automatic moving of "heard" messages to the Old folder.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82871 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-18 21:07:08 +00:00
Mark Michelson b33123cf87 Merged revisions 82865 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r82865 | mmichelson | 2007-09-18 15:09:02 -0500 (Tue, 18 Sep 2007) | 4 lines

Moving the logic for handling an empty membername to the create_member function so that there is a common place
where this occurs instead of being spread out to several different places.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82866 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-18 20:10:59 +00:00
Kevin P. Fleming ef87383055 Merged revisions 82834 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r82834 | kpfleming | 2007-09-18 13:59:52 -0500 (Tue, 18 Sep 2007) | 2 lines

there is no need for conditional logic to select ->interface or ->membername, snince ->membername will always be populated

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82835 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-18 19:06:34 +00:00
Jason Parker 9a5f7c5764 (closes issue #10755)
Reported by: snar
Patches:
      app-queue-cdr-trunk.patch uploaded by snar (license 245)
      queues.conf.patch uploaded by snar (license 245)

Add an updatecdr option to queues.conf, so that if a "member name" is specified,
 the cdr record will be updated with that, rather than the channel.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82800 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-18 16:16:36 +00:00
Russell Bryant ded76a8988 convert various places that access the channel lock directly to use the channel lock wrappers
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82728 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-17 22:59:36 +00:00
Russell Bryant 96d9f820e9 Merged revisions 82676 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r82676 | russell | 2007-09-17 15:16:25 -0500 (Mon, 17 Sep 2007) | 4 lines

Put a memset in ast_localtime() instead of a couple places in app_voicemail
to prevent the problem everywhere instead of just a couple of places.
(related to issue #10746)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82678 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-17 20:19:58 +00:00
Russell Bryant f498599e56 Merged revisions 82644 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r82644 | russell | 2007-09-17 15:00:32 -0500 (Mon, 17 Sep 2007) | 6 lines

Initialize some memory to fix crashes when leaving voicemail.  This problem
was fixed by running Asterisk under valgrind.
(closes issue #10746, reported by arcivanov, patched by me)

*** IMPORTANT NOTE:  We need to check to see if this same bug exists elsewhere.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82660 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-17 20:10:10 +00:00
Russell Bryant 9388173f85 Make the MALLOC_DEBUG output for free() useful again. After changing calls to
free to be ast_free, astmm said all calls to free were coming from utils.h


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82628 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-17 18:57:56 +00:00
Kevin P. Fleming 6cdc9ced97 Merged revisions 82590,82592 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r82590 | kpfleming | 2007-09-17 11:33:30 -0500 (Mon, 17 Sep 2007) | 2 lines

fix a couple of places where a logical member name (if specified) was not used, but instead the direct interface was listed

........
r82592 | kpfleming | 2007-09-17 11:40:12 -0500 (Mon, 17 Sep 2007) | 2 lines

revert a change that wasn't supposed to be committed... doh!

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82593 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-17 16:44:13 +00:00
Tilghman Lesher 6c97fd4cb4 Option maxmessage should be maxsecs per-folder, too (closes issue #10729)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82496 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-16 15:32:00 +00:00
Mark Michelson 38460271f2 Merged revisions 82396 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r82396 | mmichelson | 2007-09-14 13:28:36 -0500 (Fri, 14 Sep 2007) | 5 lines

Adding member name field to manager events where they were missing before

(closes issue #10721, reported by snar)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82397 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-14 18:34:53 +00:00
Mark Michelson 899ddcee92 Changed "in" to "queue" in "queue {pause|unpause} member" command to be more clear.
Also added check to be sure that sixth argument is the word "reason" if full command is given



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82352 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-13 21:53:01 +00:00
Mark Michelson eb39b71fba Added the ability to pause and unpause members via the CLI
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-13 21:23:32 +00:00
Mark Michelson c04887e428 Merged revisions 82346 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r82346 | mmichelson | 2007-09-13 15:16:37 -0500 (Thu, 13 Sep 2007) | 4 lines

Preemptively fixing a possible segfault. It is possible that queuename is NULL 
(meaning pause ALL queues), so use q->name instead.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-13 20:17:41 +00:00
Mark Michelson 10d22b6e13 Merged revisions 82326 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r82326 | mmichelson | 2007-09-13 11:25:59 -0500 (Thu, 13 Sep 2007) | 7 lines

Added logic to handle the unlikely case that someone has two queues with the same name.
Asterisk will log a warning message letting the user know that one was already defined with that
name and is it skipping all further instances. This also will work for realtime queues but in order
for that to happen, the user would have to trigger a perfectly timed reload as a realtime queue is being
looked up, which is highly unlikely (but taken care of nonetheless).


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-13 16:27:42 +00:00
Russell Bryant a0e8ee0a3d Fix a missing unref of a member struct. This was pointed out by Marta. Thanks!
This function in 1.4 didn't have the problem.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82311 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-13 13:34:24 +00:00
Tilghman Lesher 82cf384e03 Merged revisions 82285 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r82285 | tilghman | 2007-09-12 15:12:06 -0500 (Wed, 12 Sep 2007) | 4 lines

Working on issue #10531 exposed a rather nasty 64-bit issue on ast_mktime, so we
updated the localtime.c file from source.  Next we'll have to write ast_strptime
to match.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82290 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-12 21:25:57 +00:00
Mark Michelson 25e4377167 Removed an unneeded ao2_ref. This was a problem because unless get_member_status returned QUEUE_NORMAL, a NULL member
would be unreferenced. While this didn't cause any crashes or anything terrible, it still is incorrect



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82289 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-12 21:17:45 +00:00
Dwayne M. Hubbard 48ccbe253d Merged revisions 82286 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r82286 | dhubbard | 2007-09-12 15:24:24 -0500 (Wed, 12 Sep 2007) | 1 line

remove a race condition for the creation of recordthread's, and fix a small memory leak.  This closes issue# 10636
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82287 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-12 20:47:32 +00:00
Mark Michelson 8cd1f2effc Merged revisions 82274 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r82274 | mmichelson | 2007-09-12 09:24:53 -0500 (Wed, 12 Sep 2007) | 6 lines

We should only initialize a realtime queue when it is allocated, not every time we access it. This prevents the members ao2_container
from being reallocated every time the queue is accessed.

I also removed a debug message I had accidentally left in on a previous commit.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82275 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-12 14:29:15 +00:00
Russell Bryant 38c2cd05fa Merged revisions 82267 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r82267 | russell | 2007-09-11 17:37:17 -0500 (Tue, 11 Sep 2007) | 3 lines

Fix incorrect uses of ao2_find().  Every one of these calls was reading bogus
memory ...

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82269 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-11 22:38:02 +00:00
Russell Bryant c0bcb9f218 Merged revisions 82263 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r82263 | russell | 2007-09-11 15:49:34 -0500 (Tue, 11 Sep 2007) | 5 lines

Fix another missing unref of member objects.  This one was pointed out by Marta.
When building the outgoing list in try_calling(), a member reference is stored
in each outgoing entry.  However, when this list got destroyed, the reference
was not released.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82264 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-11 20:50:42 +00:00