Commit Graph

3124 Commits

Author SHA1 Message Date
Mark Michelson 9bd9421c83 Fix a crash that happened due to accessing free'd memory
(closes issue #12396)
Reported by: tcalosi
Patches:
      12396.patch uploaded by putnopvut (license 60)
	  Tested by: tcalosi


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@113980 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-09 22:32:32 +00:00
Tilghman Lesher 137c02a020 Permit message wrap-around during message retrieval.
(closes issue #12254)
 Reported by: andrew
 Patches: 
       bug-12253.diff uploaded by snuffy (license 35)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@113731 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-09 16:16:44 +00:00
Tilghman Lesher 1c691646a9 Permit callee to continue in the dialplan, after caller has hung up.
(closes issue #11954)
 Reported by: johan
 Patches: 
       app_dial_rev104031.patch uploaded by johan (license 334)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@113649 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-09 13:55:28 +00:00
Mark Michelson a83661d39c This is a "fix" for something that's been bugging the crap out of me for a while.
The variable name "flag" to distinguish between whether a message is being forwarded or
is new is not a helpful name. The newly added doxygen documentation to app_voicemail is
tremendously helpful, but I still just...hate this variable name. I think is_new_message
is more indicative of what its purpose is.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@113207 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-07 20:22:06 +00:00
Mark Michelson b95d24ea47 Merged revisions 112393 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r112393 | mmichelson | 2008-04-02 09:32:00 -0500 (Wed, 02 Apr 2008) | 6 lines

Ensure that there is no timeout if none is specified.

(closes issue #12349)
Reported by: johnlange


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112394 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-02 14:32:43 +00:00
Jason Parker a734470a2b Minor formatting cleanup.
(closes issue #12343)
Reported by: travishein
Patches:
      app_voicemail_code_convention.patch uploaded by travishein (license 385)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112252 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-01 18:27:08 +00:00
Jason Parker 9f1e663935 More voicemail doxygen additions/cleanup.
(issue #12343)
Reported by: travishein
Patches:
      app_voicemail_code_documentation.patch uploaded by travishein (license 385)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-01 18:24:56 +00:00
Jason Parker 4edaf04348 Merged revisions 112068 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r112068 | qwell | 2008-03-31 16:48:05 -0500 (Mon, 31 Mar 2008) | 5 lines

Fix a silly infinite loop when choosing an invalid option.

(closes issue #12315)
Reported by: jmls

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112069 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-31 21:48:30 +00:00
Jason Parker ed9e3ef23e Replace magic number size from msgArray array with a define.
(same patch as before, I just split this part out)
(close issue #12326)
Reported by: travishein
Patches:
      app_voicemail_code_documentation.patch uploaded by travishein (license 385)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111774 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-28 19:08:35 +00:00
Jason Parker 1f8cb622bb Add a bit of doxygen documentation for app_voicemail.
(issue #12326)
Reported by: travishein
Patches:
      app_voicemail_code_documentation.patch uploaded by travishein (license 385)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111773 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-28 19:06:54 +00:00
Joshua Colp cafce80cd5 Forgetting to unregister a manager action is bad, mmmk?
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111565 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-28 00:55:47 +00:00
Mark Michelson 0f8f6e239e Fix a crash that would happen when attempting to unload the app_queue module.
The problem was that when the refcount on the queue hit 0, the destructor was
called, and inside the destructor, another function was called which would increase
the refcount back to 1 again and then decrease it again back to 0 for every member
in the queue. This meant that the destructor was being recursively called, leading
to a double free of the queue. This is now fixed by making sure to unlink the
queue from the queues container prior to the final unref of the queue.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111533 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-28 00:12:52 +00:00
Steve Murphy 6928ccfa02 Merged revisions 111391 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r111391 | murf | 2008-03-27 07:03:28 -0600 (Thu, 27 Mar 2008) | 9 lines

These small documentation updates made in response to a query in
asterisk-users, where a user was using Playback, but needed the
features of Background, and had no idea that Background existed,
or that it might provide the features he needed. I thought the
best way to avert these kinds of queries was to provide "See Also"
references in all three of "Background", "Playback", "WaitExten".
Perhaps a project to do this with all related apps is in order.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111410 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-27 13:29:41 +00:00
Mark Michelson e94d06b83c Merged revisions 111121 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r111121 | mmichelson | 2008-03-26 14:37:36 -0500 (Wed, 26 Mar 2008) | 4 lines

This code change is made just for clarification. It does exactly
the same thing as before. It just doesn't look as wrong.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111123 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-26 19:39:23 +00:00
Mark Michelson 5278d1d62b Merged revisions 111049 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r111049 | mmichelson | 2008-03-26 14:22:16 -0500 (Wed, 26 Mar 2008) | 9 lines

Add a lock to the vm_state structure and use the lock around mail_open calls
to prevent concurrent access of the same mailstream. This, along with trunk's
ability to configure TCP timeouts for IMAP storage will help to prevent
crashes and hangs when using voicemail with IMAP storage.

(closes issue #10487)
Reported by: ewilhelmsen


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111067 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-26 19:26:23 +00:00
Russell Bryant bccebdd21f Remove astobj.h from some places where it wasn't needed
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@110270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-20 17:45:29 +00:00
Tilghman Lesher 3826278d38 Upgrade the sounds version; add several directory enhancements:
1) Number of digits to enter can now be configured
	2) The digits can now match on both first AND last name, instead of only one or the other
(Closes issue #7151)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@110237 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-20 05:06:12 +00:00
Russell Bryant 013db1d42f Merged revisions 110163 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r110163 | russell | 2008-03-19 17:57:59 -0500 (Wed, 19 Mar 2008) | 5 lines

Fix a bug where when calls on the trunk side hang up while on hold, the state
is not properly reflected.

(closes issue #11990, reported by anakaoka, patched by me)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@110164 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-19 22:58:33 +00:00
Mark Michelson 96c674a6f4 Merged revisions 110083 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r110083 | mmichelson | 2008-03-19 15:33:03 -0500 (Wed, 19 Mar 2008) | 4 lines

Add a missing unlock in the case that memory allocation fails in app_chanspy.
Thanks to Russell for confirming that this was an issue.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@110084 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-19 20:34:13 +00:00
Russell Bryant d0edd39023 Merged revisions 109763 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r109763 | russell | 2008-03-18 17:34:42 -0500 (Tue, 18 Mar 2008) | 3 lines

Fix one place where the chanspy datastore isn't removed from a channel.
(issue #12243, reported by atis, patch by me)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109764 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 22:36:02 +00:00
Mark Michelson 994d025523 Merged revisions 109713 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r109713 | mmichelson | 2008-03-18 15:52:15 -0500 (Tue, 18 Mar 2008) | 12 lines

This patch makes it so that all queue member status changes are handled through device state
code. This removes several problems people were seeing where their queue members would get into
an "unknown" state. Huge props go to atis on this one since he was the one who found the code
section that was causing the problem and proposed the solution. I just wrote what he suggested :)

(closes issue #12127)
Reported by: atis
Patches:
      12127v3.patch uploaded by putnopvut (license 60)
Tested by: atis, jvandal


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109714 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 20:59:02 +00:00
Mark Michelson cd7efcf4e7 Add option 'randomperiodicannounce' to queues.conf. Setting this will
allow the list of periodic announcments specified to be played in a random
order instead of being played sequentially.

(closes issue #6681)
Reported by: alt_phil
Tested by: putnopvut



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109621 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 18:58:42 +00:00
Terry Wilson b02bc230af Go through and fix a bunch of places where character strings were being interpreted as format strings. Most of these changes are solely to make compiling with -Wsecurity and -Wformat=2 happy, and were not
actual problems, per se.  I also added format attributes to any printf wrapper functions I found that didn't have them.  -Wsecurity and -Wmissing-format-attribute added to --enable-dev-mode.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109447 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 15:43:34 +00:00
Mark Michelson 2c67438ebe Merged revisions 109012 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r109012 | mmichelson | 2008-03-17 09:18:26 -0500 (Mon, 17 Mar 2008) | 6 lines

Make sure that we release the lock on the spyee channel if the spyee or spy has hung up

(closes issue #12232)
Reported by: atis


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109024 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-17 14:21:14 +00:00
Russell Bryant dfe03485a6 Remove an unnecessary thread attribute instance
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108929 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-16 17:55:53 +00:00
Russell Bryant 7ccd146656 Fix polling for mailbox changes in mailboxes that are not in the default vm context.
(closes issue #12223)
Reported by: DEA
Patches: 
      vm-polled-imap.txt uploaded by DEA (license 3)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108927 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-16 17:53:46 +00:00
Jeff Peeler 3c4c3c0dd2 documenting changes as a result of adding TCP functionality to ExternalIVR
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108639 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-13 23:12:59 +00:00
Russell Bryant 835df7d30f Merged revisions 108583 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108583 | russell | 2008-03-13 16:38:16 -0500 (Thu, 13 Mar 2008) | 11 lines

Fix another issue that was causing crashes in chanspy.  This introduces a new
datastore callback, called chan_fixup().  The concept is exactly like the
fixup callback that is used in the channel technology interface.  This callback
gets called when the owning channel changes due to a masquerade.  Before this
was introduced, if a masquerade happened on a channel being spyed on, the
channel pointer in the datastore became invalid.

(closes issue #12187)
(reported by, and lots of testing from atis)
(props to file for the help with ideas)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108584 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-13 21:40:43 +00:00
Jeff Peeler 5aba7c1cbe set variable to NULL to prevent uninitialized warning
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108523 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-13 20:38:56 +00:00
Russell Bryant 906a28ad5d Fix a place where configuration values could cause an overflow of a buffer.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108508 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-13 20:35:28 +00:00
Russell Bryant 432cb90411 Merged revisions 108469 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108469 | russell | 2008-03-13 15:26:28 -0500 (Thu, 13 Mar 2008) | 4 lines

Fix a couple uses of sprintf.  The second one could actually cause an overflow
of a stack buffer.  It's not a security issue though, it only depends on your
configuration.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108472 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-13 20:26:59 +00:00
Jeff Peeler b2cad9d925 (closes issue #11827)
Reported by: ctooley
Patches:
      eivr_tcp_generic.patch uploaded by jpeeler (license 325)
This change adds the ability to communicate over a TCP socket instead of forking a child process.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108404 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-13 18:59:04 +00:00
Russell Bryant b38cb44acd Merged revisions 108135 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108135 | russell | 2008-03-12 14:57:42 -0500 (Wed, 12 Mar 2008) | 40 lines

(closes issue #12187, reported by atis, fixed by me after some brainstorming
 on the issue with mmichelson)

- Update copyright info on app_chanspy.

- Fix a race condition that caused app_chanspy to crash.  The issue was that
  the chanspy datastore magic that was used to ensure that spyee channels did
  not disappear out from under the code did not completely solve the problem.
  It was actually possible for chanspy to acquire a channel reference out of
  its datastore to a channel that was in the middle of being destroyed.  That
  was because datastore destruction in ast_channel_free() was done near the
  end.  So, this left the code in app_chanspy accessing a channel that was
  partially, or completely invalid because it was in the process of being free'd
  by another thread.  The following sort of shows the code path where the race 
  occurred:

  =============================================================================
  Thread 1 (PBX thread for spyee chan)  ||   Thread 2 (chanspy)
  --------------------------------------||-------------------------------------
  ast_channel_free()                    ||
    - remove channel from channel list  ||
    - lock/unlock the channel to ensure ||
      that no references retrieved from ||
      the channel list exist.           ||
  --------------------------------------||-------------------------------------
                                        || channel_spy()
    - destroy some channel data         ||  - Lock chanspy datastore
                                        ||  - Retrieve reference to channel
                                        ||  - lock channel
                                        ||  - Unlock chanspy datastore
  --------------------------------------||-------------------------------------
     - destroy channel datastores       ||
        - call chanspy datastore d'tor  ||  
          which NULL's out the ds'      ||  - Operate on the channel ...
          reference to the channel      ||     
                                        ||
    - free the channel                  || 
                                        ||
                                        ||  - unlock the channel
  --------------------------------------||-------------------------------------
  =============================================================================

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108137 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-12 19:59:05 +00:00
Joshua Colp 5fc569f5f5 Merged revisions 108083 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r108083 | file | 2008-03-12 15:26:37 -0300 (Wed, 12 Mar 2008) | 4 lines

Add a trigger mode that triggers on both read and write. The actual function that returns the combined audio frame though will wait until both sides have fed in audio, or until one side stops (such as the case when you call Wait).
(closes issue #11945)
Reported by: xheliox

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@108084 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-12 18:29:33 +00:00
Tilghman Lesher 10609251f9 Revert several changes from revision 102525, as the changes were not
compatible, and, in fact, introduced regressions.
(Closes issue #12190)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107960 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-12 05:46:39 +00:00
Russell Bryant a29d862631 This patch adds support for extended help prompts in voicemail. These prompts
are in the 1.4.9 sounds release.

(closes issue #11705)
Reported by: jaroth
Patches:
      helpprompts.patch uploaded by jaroth (license 50)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107719 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 20:54:32 +00:00
Joshua Colp b9a6dbf587 Dial a device even if it's state is unknown.
(closes issue #12184)
Reported by: bluecrow76
Patches:
      asterisk-svn-app_page.c.devicestate_unknown.diff uploaded by bluecrow76 (license 270)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107710 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 20:36:14 +00:00
Joshua Colp b5003a1943 Merged revisions 107637 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107637 | file | 2008-03-11 15:47:33 -0300 (Tue, 11 Mar 2008) | 4 lines

Add an additional check for setting conference parameter when using the marked user options. It was possible for it to return to a no listen/no talk state if a masquerade happened.
(closes issue #12136)
Reported by: aragon

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 18:48:59 +00:00
Mark Michelson 5176911dfe Remove some redundant logic from wait_for_answer. This also let's us get rid of one of
those XXX comments from the code.

The redundancy occurs because the 'single' flag implies that the 'r' and 'm' flags are
not set, so there's no need to explicitly check them again.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107530 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 15:59:32 +00:00
Kevin P. Fleming 4925e7b835 Merged revisions 107464 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107464 | kpfleming | 2008-03-11 09:53:03 -0500 (Tue, 11 Mar 2008) | 2 lines

fix various other problems found by gcc 4.3

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 15:13:38 +00:00
Kevin P. Fleming 5875146526 Merged revisions 107461 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107461 | kpfleming | 2008-03-11 09:33:45 -0500 (Tue, 11 Mar 2008) | 2 lines

stop checking for mktime() in the configure script... we don't use it, and the test is buggy under gcc 4.3

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107462 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 14:37:03 +00:00
Mark Michelson 9c876e801f app_queue has now been doxygenified thanks to snuffy! The ony thing I changed
was the way that locks are referenced, since the old 1.2 names were still used
in the comments.

(closes issue #11997)
Reported by: snuffy
Patches:
      bug_11997_queue_doxy.diff uploaded by snuffy (license 35)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107068 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-10 15:45:13 +00:00
Joshua Colp af7e1964f2 Merged revisions 107016 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107016 | file | 2008-03-10 11:33:02 -0300 (Mon, 10 Mar 2008) | 7 lines

Move where unanswered CDRs are dropped to the CDR core, not everything uses app_dial.
(closes issue #11516)
Reported by: ys
Patches:
      branch_1.4_cdr.diff uploaded by ys (license 281)
Tested by: anest, jcapp, dartvader

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107017 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-10 14:36:16 +00:00
Russell Bryant dbc74f0dd0 Merged revisions 106895 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r106895 | russell | 2008-03-07 16:51:23 -0600 (Fri, 07 Mar 2008) | 2 lines

Only start the SLA thread if SLA has actually been configured.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106896 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-07 22:52:46 +00:00
Steve Murphy 377e51c4d4 (closes issue #6002)
Reported by: rizzo
Tested by: murf

Proposal of the changes to be made, and then an announcement of how they were accomplished:

http://lists.digium.com/pipermail/asterisk-dev/2008-February/032065.html

and:

http://lists.digium.com/pipermail/asterisk-dev/2008-March/032124.html

Here is a recap, file by file, of what I have done:

pbx/pbx_config.c
pbx/pbx_ael.c

All funcs that were passed a ptr to the context list, now will ALSO be passed a hashtab ptr to the same set.
Why? because (for the time being), the dialplan is stored in both, to facilitate a quick, low-cost move to
hash-tables to speed up dialplan processing. If it was deemed necessary to pass the context LIST, well, it
is just as necessary to have the TABLE available. This is because the list/table in question might not be
the global one, but temporary ones we would use to stage the dialplan on, and then swap into the global
position when things are ready.

We now have one external function for apps to use, "ast_context_find_or_create()" instead of the pre-existing
"find" and "create", as all existing usages used both in tandem anyway.

pbx_config, and pbx_ael, will stage the reloaded dialplan into local lists and tables, and 
then call merge_contexts_and_delete, which will merge (now) existing contexts and 
priorities from other registrars into this local set by copying them. Then, merge_contexts_and_delete will
lock down the contexts, swap the lists and tables, and unlock (real quick), and then 
destroy the old dialplan.



chan_sip.c
chan_iax.c
chan_skinny.c

All the channel drivers that would add regcontexts now use the ast_context_find_or_create now.

chan_sip also includes a small fix to get rid of warnings about removing priorities that never got entered.


apps/app_meetme.c
apps/app_dial.c
apps/app_queue.c

All the apps that added a context/exten/priority were also modified to use ast_context_find_or_create instead.


include/asterisk/pbx.h

ast_context_create() is removed. Find_or_create_ is the new method.
ast_context_find_or_create()  interface gets the hashtab added.
ast_merge_contexts_and_delete() gets the local hashtab arg added.
ast_wrlock_contexts_version() is added so you can detect if someone else got a writelock between your readlocking and writelocking.
ast_hashtab_compare_contexts was made public for use in pbx_config/pbx_ael
ast_hashtab_hash_contexts was in like fashion make public.


include/asterisk/pval.h

ast_compile_ael2() interface changed to include the local hashtab table ptr.


main/features.c

For the sake of the parking context, we use ast_context_find_or_create().



main/pbx.c

I changed all the "tree" names to "table" instead. That's because the original
implementation was based on binary trees. (had a free library). Then I moved
to hashtabs. Now, the names move forward too.

refcount field added to contexts, so you can keep track of how many modules
wanted this context to exist.

Some log messages that are warnings were inflated from LOG_NOTICE to LOG_WARNING.

Added some calls to ast_verb(3,...) for debug messages

Lots of little mods to ast_context_remove_extension2, which is now excersized in ways
it was not previously; one definite bug fixed.

find_or_create was upgraded to handle both local lists/tables as well as the globals.

context_merge() was added to do the per-context merging of the old/present contexts/extens/prios into the new/proposed local list/tables

ast_merge_contexts_and_delete() was heavily modified.

ast_add_extension2() was also upgraded to handle changes. 

the context_destroy() code was re-engineered to handle the new way of doing things,
by exten/prio instead of by context.



res/ael/pval.c
res/ael/ael.tab.c
res/ael/ael.tab.h
res/ael/ael.y
res/ael/ael_lex.c
res/ael/ael.flex
utils/ael_main.c
utils/extconf.c
utils/conf2ael.c
utils/Makefile

Had to change the interface to ast_compile_ael2(), to include the hashtab ptr.
This ended up involving several external apps.  The main gotcha was I had to 
include lock.h and hashtab.h in several places.


As a side note, I tested this stuff pretty thoroughly, I replicated the problems
originally reported by Luigi, and made triply sure that reloads worked, and everything
worked thru "stop gracefully". I found a and fixed a few bugs as I was merging into
trunk, that did not appear in my tests of bug6002.

How's this for verbose commit messages?




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106757 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-07 18:57:57 +00:00
Tilghman Lesher 0b8bccb5ce Merged revisions 106635 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r106635 | tilghman | 2008-03-07 10:22:11 -0600 (Fri, 07 Mar 2008) | 3 lines

Warn the user when a temporary greeting exists
(Closes issue #11409)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106654 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-07 16:26:07 +00:00
Tilghman Lesher 8718878490 Merged revisions 106552 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r106552 | tilghman | 2008-03-07 00:36:33 -0600 (Fri, 07 Mar 2008) | 6 lines

Safely use the strncat() function.
(closes issue #11958)
 Reported by: norman
 Patches: 
       20080209__bug11958.diff.txt uploaded by Corydon76 (license 14)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106553 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-07 06:54:47 +00:00
Joshua Colp 496adc6fc0 Merged revisions 106235 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r106235 | file | 2008-03-05 18:32:10 -0400 (Wed, 05 Mar 2008) | 4 lines

Add a control frame to indicate the source of media has changed. Depending on the underlying technology it may need to change some things.
(closes issue #12148)
Reported by: jcomellas

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106239 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-05 22:43:22 +00:00
Tilghman Lesher f6bb68fd56 Should check these values for non-NULL before scanning.
(Closes issue #12147)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106139 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-05 17:40:42 +00:00
Tilghman Lesher 8a411ccf83 Create a centralized configuration option for silencethreshold
(closes issue #11236)
 Reported by: philipps
 Patches: 
       20080218__bug11236.diff.txt uploaded by Corydon76 (license 14)
 Tested by: philipps


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@106072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-05 16:23:44 +00:00
Russell Bryant 5403b28778 - simplify a few statements with ARRAY_LEN()
- constify the stregy int to string mappings array


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105984 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-05 04:34:29 +00:00
Tilghman Lesher 7007c565fe Fix minor misuses of snprintf
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105841 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-04 23:10:45 +00:00
Terry Wilson 7d1891d5c3 Asterisk, when parking can drop rights a caller when a parking timeout occurs. Also, when doing built-in attended transfers, sometimes incorrectly passes rights from the transferrer to the transferee. This patch tries to fixes the parking issue and lays some groundwork for later fixing the transfer issue.
(closes issue #11520)
Reported by: pliew
Tested by: otherwiseguy


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105477 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-01 01:30:37 +00:00
Joshua Colp 0e5d9f53cc Merged revisions 105261 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r105261 | file | 2008-02-29 09:48:13 -0400 (Fri, 29 Feb 2008) | 4 lines

Bump up the size of the uniqueid variable.
(closes issue #12107)
Reported by: asgaroth

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-29 13:55:22 +00:00
Mark Michelson f0379886c5 Merged revisions 105059 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r105059 | mmichelson | 2008-02-28 14:11:57 -0600 (Thu, 28 Feb 2008) | 6 lines

When using autofill, members who are in use should be counted towards the 
number of available members to call if ringinuse is set to yes.

Thanks to jmls who brought this issue up on IRC


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105061 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-28 20:14:38 +00:00
Joshua Colp 9080a65bec Merged revisions 104787 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r104787 | file | 2008-02-27 16:56:23 -0400 (Wed, 27 Feb 2008) | 2 lines

Don't loop around infinitely trying to spy on our own channel, and don't forget to free/detach the datastore upon hangup of the spy.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104788 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-27 21:02:08 +00:00
Jason Parker 0723f79313 Remove useless 's' and 'key' variables, in favor of 'val', which serves the exact same purpose.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104756 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-27 19:36:34 +00:00
Russell Bryant ce29e46767 Merged revisions 104625 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r104625 | russell | 2008-02-27 11:33:04 -0600 (Wed, 27 Feb 2008) | 4 lines

Fix a problem in ChanSpy where it could get stuck in an infinite loop without
being able to detect that the calling channel hung up.
(closes issue #12076, reported by junky, patched by me)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104643 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-27 17:36:50 +00:00
Tilghman Lesher ca76b2fb3e Whitespace changes only
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104388 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-27 02:05:36 +00:00
Russell Bryant c1fb44537b Merged revisions 104334 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r104334 | russell | 2008-02-26 19:15:02 -0600 (Tue, 26 Feb 2008) | 3 lines

Avoid some recursion in the cleanup code for the chanspy datastore
(closes issue #12076, reported by junky, patched by me)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-27 01:16:06 +00:00
Russell Bryant 3a8756c9b4 Merged revisions 104119 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r104119 | russell | 2008-02-25 18:25:29 -0600 (Mon, 25 Feb 2008) | 33 lines

Merge changes from team/russell/smdi-1.4

This commit brings in a significant set of changes to the SMDI support in Asterisk.
There were a number of bugs in the current implementation, most notably being that
it was very likely on busy systems to pop off the wrong message from the SMDI message
queue.  So, this set of changes fixes the issues discovered as well as introducing
some new ways to use the SMDI support which are required to avoid the bugs with
grabbing the wrong message off of the queue.

This code introduces a new interface to SMDI, with two dialplan functions.  First,
you get an SMDI message in the dialplan using SMDI_MSG_RETRIEVE() and then you access
details in the message using the SMDI_MSG() function.  A side benefit of this is that
it now supports more than just chan_zap.

For example, with this implementation, you can have some FXO lines being terminated 
on a SIP gateway, but the SMDI link in Asterisk.

Another issue with the current implementation is that it is quite common that the
station ID that comes in on the SMDI link is not necessarily the same as the Asterisk
voicemail box.  There are now additional directives in the smdi.conf configuration
file which let you map SMDI station IDs to Asterisk voicemail boxes.

Yet another issue with the current SMDI support was related to MWI reporting over
the SMDI link.  The current code could only report a MWI change when the change
was made by someone calling into voicemail.  If the change was made by some other
entity (such as with IMAP storage, or with a web interface of some kind), then the
MWI change would never be sent.  The SMDI module can now poll for MWI changes if
configured to do so.

This work was inspired by and primarily done for the University of Pennsylvania.

(also related to issue #9260)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-26 00:31:40 +00:00
Russell Bryant 6554a7bf3a Merged revisions 104106 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r104106 | russell | 2008-02-25 17:42:42 -0600 (Mon, 25 Feb 2008) | 10 lines

This patch fixes some pretty significant problems with how app_chanspy handles
pointers to channels that are being spied upon.  It was very likely that a
crash would occur if the channel being spied upon hung up.  This was because
the current ast_channel handling _requires_ that the object is locked or else
it could disappear at any time (except in the owning channel thread).  So, this
patch uses some channel datastore magic on the spied upon channel to be able to
detect if and when the channel goes away.
(closes issue #11877)
(patch written by me, but thanks to kpfleming for the idea, and to file for review)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104107 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-25 23:48:16 +00:00
Tilghman Lesher 4da977e01e Merged revisions 104094 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r104094 | tilghman | 2008-02-25 15:31:47 -0600 (Mon, 25 Feb 2008) | 5 lines

If the destination folder is full, don't delete a message when exiting.
(closes issue #12065)
 Reported by: selsky
 Patch by: (myself)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@104097 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-25 21:53:36 +00:00
Mark Michelson caeb435271 Merged revisions 103956 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r103956 | mmichelson | 2008-02-20 16:32:22 -0600 (Wed, 20 Feb 2008) | 8 lines

Clear up confusion when viewing the QUEUE_WAITING_COUNT of a 
"dead" realtime queue. Since from the user's perspective, the queue
does exist, we shouldn't tell them we couldn't find the queue. Instead
since it is a dead queue, report a 0 waiting count

This issue was brought up on IRC by jmls


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103957 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-20 22:34:12 +00:00
Mark Michelson d2d397f861 Fix a crash due to the wrong variable being used when building a directory string.
(closes issue #12027)
Reported by: jaroth
Patches:
      forward.patch uploaded by jaroth (license 50)
Tested by: jaroth



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103902 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-20 21:08:46 +00:00
Mark Michelson ca2cfc8e47 When using IMAP storage, if the folder you attempt to save to does not exist,
create it first.

(closes issue #12032)
Reported by: jaroth
Patches:
      createfolder.patch uploaded by jaroth (license 50)
Tested by: jaroth




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103833 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-20 00:49:38 +00:00
Joshua Colp a966ef74b7 len already contains the position we want to examine, if we move one left again we'll actually probably be looking at a digit.
(issue #12030)
Reported by: alligosh


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-19 19:27:50 +00:00
Joshua Colp 3e0f3915a5 Add CHANNELREDIRECT_STATUS variable to ChannelRedirect() dialplan application. This will either be set to NOCHANNEL if the given channel was not found or SUCCESS if it worked.
(closes issue #11553)
Reported by: johan
Patches:
      UPGRADE.txt.channelredirect.patch uploaded by johan (license 334)
      CHANGES.channelredirect.patch uploaded by johan (license 334)
      app_channelredirect-20080219.patch uploaded by johan (license 334)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103819 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-19 18:40:22 +00:00
Joshua Colp e6a260c747 Add an API call (ast_async_parseable_goto) which parses a goto string and does an async goto instead of an explicit goto.
(closes issue #11753)
Reported by: johan


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103765 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-18 15:47:00 +00:00
Mark Michelson 30c0e089f6 Fix redeclaration of variables when using IMAP storage
(closes issue #11988)
Reported by: jaroth
Patches:
      variable_cleanup.patch uploaded by jaroth (license 50)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103737 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-15 22:56:14 +00:00
Jason Parker 72bc8a7c7d Fix up some doxygen issues.
(closes issue #11996)
Patches:
      bug_11996_doxygen.diff uploaded by snuffy (license 35)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103723 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-15 17:29:08 +00:00
Mark Michelson 8f625a4664 Merged revisions 103690 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r103690 | mmichelson | 2008-02-14 15:03:02 -0600 (Thu, 14 Feb 2008) | 3 lines

Fix build for non-IMAP builds


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103691 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-14 21:04:37 +00:00
Mark Michelson 235aa41c6d Merged revisions 103688 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r103688 | mmichelson | 2008-02-14 14:55:48 -0600 (Thu, 14 Feb 2008) | 9 lines

Fix the new message count if delete=yes when using IMAP storage.

(closes issue #11406)
Reported by: jaroth
Patches:
      deleteflag_v2.patch uploaded by jaroth (license 50)
	  Tested by: jaroth


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103689 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-14 20:58:30 +00:00
Mark Michelson 44810652d6 Change the queue holdtime announcement to happen at any interval (not just greater than two minutes). Remove
the saying of less-than for holdtime announcements since it can lead to awkward holdtime announcements. Using
'1' as a queue-round-seconds value is no longer valid.

(closes issue #9736)
Reported by: caio1982
Patches:
      queue_announce5.diff uploaded by caio1982 (license 22)
	  Tested by: caio1982, putnopvut


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103687 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-14 20:46:00 +00:00
Jeff Peeler 5404ab35e2 a few syntax changes and safer code
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103682 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-14 19:47:39 +00:00
Olle Johansson 9cf6138725 Formatting fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103668 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-14 10:19:09 +00:00
Jeff Peeler 8e4c97bf0a (closes issue #11825)
Reported by: ctooley
Patches:
      additional_eivr_commands.patch uploaded by ctooley (license 136)
Tested by: ctooley


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103662 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-13 21:04:31 +00:00
Joshua Colp 3f99a1b4bf Merged revisions 103324 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r103324 | file | 2008-02-11 18:09:07 -0400 (Mon, 11 Feb 2008) | 4 lines

If entering a conference with the 'w' option ensure that we can't listen or speak until the marked user appears.
(closes issue #11835)
Reported by: alanmcmillan

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103325 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-11 22:10:55 +00:00
Mark Michelson 84ecef76b8 Fix improper indentation. Thanks again to snuffy for pointing it out.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103284 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-11 03:03:58 +00:00
Mark Michelson cd02fd2763 Add a couple of comments to clarify the unreffing of queues.
Thanks to snuffy for the idea.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103283 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-11 02:59:14 +00:00
Michiel van Baak 4dccb58fb7 whitespace fixes only.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103249 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-09 11:27:10 +00:00
Tilghman Lesher 9d4d240b94 Merged revisions 103197 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r103197 | tilghman | 2008-02-09 00:23:49 -0600 (Sat, 09 Feb 2008) | 4 lines

Commit fix for being unable to send voicemail from VoiceMailMain
 Reported by: William F Acker (via the -users mailing list)
 Patch by: Corydon76 (license 14)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103198 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-09 06:33:10 +00:00
Russell Bryant 1ec8cb41a8 Merge changes from team/mvanbaak/cli-command-audit
(closes issue #8925)

About a year ago, as Leif Madsen and Jim van Meggelen were going over the CLI
commands in Asterisk 1.4 for the next version of their book, they documented
a lot of inconsistencies.  This set of changes addresses all of these issues
and has been reviewed by Leif.

While this does introduce even more changes to the CLI command structure, it
makes everything consistent, which is the most important thing.

Thanks to all that helped with this one!


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103171 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-08 21:26:32 +00:00
Mark Michelson 52595c5d30 Forgot that AST_LIST_REMOVE_CURRENT takes different arguments in trunk than 1.4.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103122 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-08 18:58:25 +00:00
Mark Michelson ba003e415b Merged revisions 103120 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r103120 | mmichelson | 2008-02-08 12:48:17 -0600 (Fri, 08 Feb 2008) | 10 lines

Prevent a potential three-thread deadlock. Also added a comment block
to explicitly state the locking order necessary inside app_queue.

(closes issue #11862)
Reported by: flujan
Patches:
      11862.patch uploaded by putnopvut (license 60)
	  Tested by: flujan


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103121 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-08 18:54:53 +00:00
Mark Michelson 6e23729a73 This is a combination new feature/bug fix for app_chanspy.
New feature: Add the 'e' option, which takes as an argument a list of
interfaces separated by colons. This way, you will only be able to spy
on this limited list of interfaces.

Bug fix: change some pointer checks to ast_strlen_zero so that spying
would work properly even if no channel was specified as the first argument
to chanspy.


(closes issue #10072)
Reported by: xmarksthespot
Patches:
      bugfix+newfeature10072patchtotrunkrev102726.diff uploaded by xmarksthespot (license 16)
	  Tested by: xmarksthespot, mvanbaak



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@102933 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-07 21:37:00 +00:00
Michiel van Baak 408497916b whitespace fixes only
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@102908 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-07 21:08:46 +00:00
Michiel van Baak d251bacacc There she goes! First commit from me to trunk \o/
Make app_alarmreceiver honor code guidelines and fix whitespace errors.
No functional changes.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@102906 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-07 20:42:59 +00:00
Mark Michelson f26fd8dac4 Add the channel's unique id to the AgentCalled manager event to make it more consistent
with other manager events.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@102777 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-06 20:12:43 +00:00
Tilghman Lesher ee3cc80284 Merged revisions 102576 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r102576 | tilghman | 2008-02-05 18:26:02 -0600 (Tue, 05 Feb 2008) | 4 lines

Move around some defines to unbreak ODBC storage.
(closes issue #11932)
 Reported by: snuffy

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@102602 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-06 03:05:00 +00:00
Mark Michelson 267220d043 Remove an extra debug message I left in
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@102550 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-06 00:08:58 +00:00
Mark Michelson fe9821cc10 Get rid of any remaining ast_verbose calls in the code in favor of
ast_verb

(closes issue #11934)
Reported by: mvanbaak
Patches:
      20080205_astverb-2.diff.txt uploaded by mvanbaak (license 7)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@102525 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-05 23:00:15 +00:00
Mark Michelson bb156b5cb5 Change verbose messages to use the ast_verb macro.
(closes issue #11931)
Reported by: snuffy
Patches:
      bug-11931.diff uploaded by snuffy (license 35)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@102501 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-05 20:54:53 +00:00
Tilghman Lesher ab5a1a6c8c Merged revisions 101942 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r101942 | tilghman | 2008-02-01 15:54:28 -0600 (Fri, 01 Feb 2008) | 8 lines

Fix the VM_DUR variable for forwarded voicemail, and fixed several other bugs
while I'm in the area.
(closes issue #11615)
 Reported by: jamessan
 Patches: 
       20071226__bug11615__2.diff.txt uploaded by Corydon76 (license 14)
 Tested by: Corydon76, jamessan

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@101943 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-01 22:12:55 +00:00
Jason Parker a47b20bdcd Comparison, not set :) Thanks mvanbaak.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@101869 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-01 18:24:52 +00:00
Jason Parker 03a95a20db Move an feof() call to before the fgets().
This would have exited the loop early if you had an authentication file with no newline at the end.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@101823 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-01 17:44:32 +00:00
Russell Bryant 99c36129a5 Merged revisions 101818 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r101818 | russell | 2008-02-01 11:23:47 -0600 (Fri, 01 Feb 2008) | 4 lines

Don't overwrite the last character of a line if it's not a newline.  This would
happen if the last line in the file doesn't have a newline.
(pointed out by Qwell)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@101819 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-01 17:26:31 +00:00
Russell Bryant 1d016d21e4 simplify some code, tweak formatting, and reduce indentation
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@101746 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-01 06:27:41 +00:00
Russell Bryant 574b5e2a2e reduce a level of indentation
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@101745 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-01 06:20:24 +00:00
Russell Bryant 7382e9425f Get rid of a goto where there was no extra cleanup happening at the exit point
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@101739 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-01 06:14:29 +00:00
Mark Michelson 41cf37844e Merged revisions 101649 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r101649 | mmichelson | 2008-01-31 18:06:37 -0600 (Thu, 31 Jan 2008) | 9 lines

From bugtracker: "fix totalAnalysisTime to handle periods of no channel activity"

(closes issue #9256)
Reported by: cmaj
Patches:
      amd-dont-wait-too-long-for-frames-take3.diff.txt uploaded by cmaj (license 111)
Tested by: cmaj, skygreg, ZX81, rjain


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@101650 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-01 00:08:17 +00:00
Mark Michelson b0999f3bfa Forgot an !
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@101580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-31 22:12:50 +00:00
Mark Michelson 19d8ce4033 A change I made to accommodate the "linear" strategy in trunk caused queue strategies to
not be loaded from realtime queues. This commit fixes that.

Thanks to jmls for pointing this problem out to me on IRC.

This also contains some changes to S_OR where it should be used. Thanks to Qwell for pointing
these out.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@101578 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-31 22:04:52 +00:00
Mark Michelson 815658d35e Handle the case of a NULL state_interface when checking a realtime member.
Thanks to jmls for finding this issue.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@101576 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-31 21:31:15 +00:00
Jason Parker c6635ef6c2 Allow disabling the default ffwd/rewind keys in the ControlPlayback application.
This is done in a backward compat way.
If the "default" key for ffwd/rew is used for another option (such as stop), the "default" is removed.

(closes issue #11754)
Reported by: johan
Patches:
      app_controlplayback.c.option3.patch uploaded by johan (license 334)
Tested by: johan, qwell


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@101296 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-30 19:03:16 +00:00
Olle Johansson a1bf177286 Removing applications that wasn't ready for svn trunk, as trunk now has
pre-release status.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@101271 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-30 17:12:06 +00:00
Tilghman Lesher 0d9a551f30 Make the VoicemailUsersList AMI command consistent with other manager list functions.
(closes issue #11874)
 Reported by: srt
 Patches: 
       voicemail_ami-11847.patch uploaded by srt (license 378)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@101269 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-30 16:54:20 +00:00
Mark Michelson 7bf09615a8 Get trunk to compile
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@101224 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-30 15:42:54 +00:00
Olle Johansson 11455c0898 Add rtppage() application to do multicast or unicast RTP paging to SIP phones.
(closes issue #11797)
Reported by: macbrody
Patches: 
      app_rtppage-20080130.c uploaded by macbrody (license 352)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@101218 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-30 15:30:38 +00:00
Mark Michelson 28b48d2214 Merged revisions 101216 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r101216 | mmichelson | 2008-01-30 09:23:00 -0600 (Wed, 30 Jan 2008) | 5 lines

Fix a logic error with regards to autofill. Prior to this change, it was possible
for a caller to go out of turn if autofill were enabled and callers ahead in the queue were attempting
to call a member. This change fixes this.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@101217 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-30 15:27:14 +00:00
Russell Bryant 22fae48e3c Add the 'n' option to SpeechBackground, which has the application not answer the
channel if it has not already been answered.

(closes SPD-51)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@101082 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-30 00:04:17 +00:00
Mark Michelson b719c2e5d2 Merged revisions 101035 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r101035 | mmichelson | 2008-01-29 17:02:03 -0600 (Tue, 29 Jan 2008) | 3 lines

Remove a memory leak from updating realtime queues


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@101036 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-29 23:02:48 +00:00
Mark Michelson 105e0f6cf8 Merged revisions 100973 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r100973 | mmichelson | 2008-01-29 13:39:00 -0600 (Tue, 29 Jan 2008) | 6 lines

Fixing an erroneous return value returned when attempting to pause or unpause a queue member
fails.

Fixes BE-366, thanks to John Bigelow for writing the patch.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100974 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-29 19:41:42 +00:00
Jason Parker 4688907e17 Merged revisions 100672 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

(closes issue #11795)
........
r100672 | qwell | 2008-01-28 14:42:43 -0600 (Mon, 28 Jan 2008) | 7 lines

When using ODBC_STORAGE, make sure we put greeting files into the database like we do with the others.

Issue #11795
Reported by: dimas
Patches:
      vmgreet.patch uploaded by dimas (license 88)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100676 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-28 21:02:11 +00:00
Kevin P. Fleming e6d54b68fa correct a real problem and silence an annoying compiler warning
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100361 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-25 20:51:47 +00:00
Mark Michelson 81fb790419 Insure that we are not going to pass a NULL pointer to add_to_interfaces.
(closes issue #11840)
Reported by: junky



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100344 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-25 14:53:09 +00:00
Mark Michelson 64b5fceb32 Merged revisions 99975 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r99975 | mmichelson | 2008-01-23 14:25:00 -0600 (Wed, 23 Jan 2008) | 3 lines

Fixing a typo.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99976 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-23 20:26:19 +00:00
Russell Bryant 1194f91214 Merged revisions 99923 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r99923 | russell | 2008-01-23 11:46:55 -0600 (Wed, 23 Jan 2008) | 8 lines

ChanSpy issues a beep when it starts at the beginning of a list of channels to
potentially spy on.  However, if there were no matching channels, it would beep
at you over and over, which is pretty annoying.  Now, it will only beep once in
the case that there are no channels to spy on, but it will still beep again once
it reaches the beginning of the channel list again.

(closes issue #11738, patched by me)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99924 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-23 17:48:08 +00:00
Tilghman Lesher 6139e1ed82 Coding guidelines fixups
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99818 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-23 05:29:28 +00:00
Tilghman Lesher 6df535971b Merged revisions 99777 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r99777 | tilghman | 2008-01-22 22:31:51 -0600 (Tue, 22 Jan 2008) | 8 lines

When we reset the password via an external command, we should also reset the
password stored in the in-memory list, too (otherwise it doesn't really take
effect).
(closes issue #11809)
 Reported by: davetroy
 Patches: 
       fix_externpass.diff uploaded by davetroy (license 384)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99778 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-23 04:35:04 +00:00
Olle Johansson 949bb30d03 Merged revisions 99594 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r99594 | oej | 2008-01-22 18:41:57 +0100 (Tis, 22 Jan 2008) | 3 lines

Add more dependencies on chan_local and add a note to the description of chan_local
so that people don't disable it in menuselect just to clean up.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99596 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-22 17:46:43 +00:00
Olle Johansson cc648a40ae Merged revisions 99592 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r99592 | oej | 2008-01-22 18:31:17 +0100 (Tis, 22 Jan 2008) | 5 lines

Add dependency on chan_local to app_dial.

Dial still runs without chan_local, but will be missing forwarding functionality.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99595 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-22 17:42:27 +00:00
Mark Michelson 6d57a8c873 Adding the QUEUENAME variable to the variables set using the setqueuevar option
in queues.conf.

Suggestion comes from Shaun2222 on IRC.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99406 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-21 22:32:13 +00:00
Mark Michelson fdc76e87bf Fixing trunk IMAP build
(closes issue #11788)
Reported by: DEA
Patches:
      vm-imap-build-fix.txt uploaded by DEA (license 3)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99002 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-17 22:22:02 +00:00
Mark Michelson 3d022ccfec state_interface could be NULL, so use the never-NULL cur->state_interface for this check
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98994 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-17 16:33:24 +00:00
Mark Michelson 9c39ec55d8 Get the device state of the state interface instead of the interface when creating a new queue member.
Thanks to Atis Lezdins for bringing this up on the Asterisk-Dev mailing list.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98993 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-17 16:26:41 +00:00
Jason Parker b875d0df01 Add backupdeleted option to app_voicemail
(closes issue #10740)
Reported by: ruffle
Patches:
      app_voicemail.diff uploaded by ruffle (license 201)
      10740-voicemail.diff uploaded by qwell (license 4)
      20080113_bug10740.diff.txt uploaded by mvanbaak (license 7)
Tested by: blitzrage, mvanbaak, qwell


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98889 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-14 22:19:40 +00:00
Mark Michelson e34fc8282c Big improvement for app_directory. This patch breaks the do_directory function up
so that it is more easily parsed by the human brain. It also fixes some errors. I'll quote
dimas from the original bug description:

"app_directory contained some duplicate code even before addition of 'm' option. Addition of that option doubled amount of that code. Worst of all, there are minor differences between these code block and bugs caused by these differences.

1. There is a memory leak. In the 'menu' mode, result of the convert(pos) function is not freed while it should be.
2. In the 'menu' mode check for OPT_LISTBYFIRSTNAME flag ('f' option) is not negated as result, application works in the mode opposite to what user expect (checking last name when user wants the first nd vice versa).
3. select_item function plays message for user using res = func1() || func2() || func3()... construct. This construct loses the actual value returned by ast_waitstream() for example so at the end, res does not contain digit user dialed while listening to the message.
4. (also in 1.4) application announces entries from voicemail.conf/realtime separately from entries from users.conf. I see no reason why doing so instead of building combined list.
5. Alot of duplicated code as already mentioned."

This was tested by dimas and I (I tested under valgrind). A word of caution: any bug fixes that happen
in app_directory in 1.4 will almost certainly not merge cleanly into trunk as a result of this, but it is
well worth it. 

Huge thanks to dimas for this wonderful submission.

(closes issue #11744)
Reported by: dimas
Patches:
      dir3.patch uploaded by dimas (license 88)
	  Tested by: putnopvut, dimas


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98888 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-14 22:11:50 +00:00
Mark Michelson 7cd98338fd Merged revisions 98737 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r98737 | mmichelson | 2008-01-14 10:35:12 -0600 (Mon, 14 Jan 2008) | 3 lines

Fixing another compilation error. I'm a bit off today :(


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98738 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-14 16:36:41 +00:00
Mark Michelson ef7c382507 Merged revisions 98733 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r98733 | mmichelson | 2008-01-14 10:21:28 -0600 (Mon, 14 Jan 2008) | 8 lines

Adding explicit defaults for missing options to init_queue. This is necessary because
if a user either removes or comments one of these options and reloads their queues, the
option will not reset to its default, instead maintaining the value from prior to the 
reload. 

Thanks to John Bigelow for pointing this error out to me.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98735 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-14 16:33:06 +00:00
Joshua Colp 95605d1c10 Update documentation.
(closes issue #11763)
Reported by: IgorG
Patches:
      docupd.v1.diff uploaded by IgorG (license 20)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98695 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-14 14:33:17 +00:00
Russell Bryant 577666bca0 Add another small option for the JACK app and JACK_HOOK function. The 'n'
option tells JACK not to start jackd automatically if it is not already
running.  Otherwise, the default is that jackd will get started for you if
it isn't running already.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98676 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-14 04:53:08 +00:00
Russell Bryant f32aec9f8f Bring in the code from team/russell/jack/.
Add a new module, app_jack, which provides interfaces to JACK, the Jack
Audio Connection Kit (http://www.jackaudio.org/).  Two interfaces are
provided; there is a JACK() application, and a JACK_HOOK() function.  Both
interfaces create an input and output JACK port.  The application makes
these ports the endpoint of the call.  The audio coming from the channel
goes out the output port and whatever comes back in on the input port is
what gets sent to the channel.  The JACK_HOOK() function turns on a JACK
audiohook on the channel.  This lets you run the audio coming from a
channel through JACK, and whatever comes back in is what gets forwarded
on as the channel's audio.  This is very useful for building custom
vocoders or doing recording or analysis of the channel's audio in another
application.

In case anyone is curious, the platform that inspired me to write this is
PureData (http://puredata.info/).  I wrote these JACK interfaces so that I
could use Pd to do interesting things with the audio of phone calls ...


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98628 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-13 19:19:57 +00:00
Joshua Colp 38da1d3afc Merged revisions 98219 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r98219 | file | 2008-01-11 13:22:53 -0400 (Fri, 11 Jan 2008) | 4 lines

Ensure the return value of ast_bridge_call is passed back up as the application return value. This is needed for transfers to function so the PBX core knows to continue execution.
(closes issue #10327)
Reported by: kkiely

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98220 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11 17:27:58 +00:00
Mark Michelson 45634bab41 Merged revisions 97925 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r97925 | mmichelson | 2008-01-10 15:57:06 -0600 (Thu, 10 Jan 2008) | 6 lines

Let us leave a voicemail for ourself if we have logged into VoiceMailMain and chosen
to leave a message.

(closes issue #11735, reported and patched by jamessan)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97933 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10 21:58:47 +00:00
Mark Michelson 8f9f9246ce Use the appropriate line ending for the X-Asterisk-VM-Message-Type header.
(closes issue #11734, reported and patched by jaroth)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97846 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10 20:05:43 +00:00
Tilghman Lesher 857e3412f4 Several manager changes:
1) Add the Dialplan class, for NewExten and VarSet events, which should cut
down on the volume of traffic in the Call class.
2) Permit some commands to be run from multiple classes, such as allowing
DBGet to be run from either the System or the Reporting class.
3) Heavily document each class in the sample config, as there were several
that made no sense to be in the write= line, and two that made no sense to be
in the read= line (since they controlled no permissions there).

(Closes issue #10386)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97651 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10 00:12:35 +00:00
Mark Michelson 87b92b1020 Merged revisions 97575 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r97575 | mmichelson | 2008-01-09 12:48:15 -0600 (Wed, 09 Jan 2008) | 3 lines

Part 2 of app_queue doxygen improvements. Some smaller functions this time


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97577 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-09 18:53:29 +00:00
Joshua Colp 2ad2f92405 Merged revisions 97450 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r97450 | file | 2008-01-09 12:11:17 -0400 (Wed, 09 Jan 2008) | 6 lines

Don't do conferencing totally in Zaptel if Monitor is running on the channel.
(closes issue #11709)
Reported by: BigJimmy
Patches:
      patch-meetmerec uploaded by BigJimmy (license 371)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97451 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-09 16:13:24 +00:00
Mark Michelson c1eaacc3df Merged revisions 97308 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r97308 | mmichelson | 2008-01-08 18:17:40 -0600 (Tue, 08 Jan 2008) | 3 lines

use the \retval doxygen command properly


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97309 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-09 00:18:15 +00:00
Mark Michelson 925d9ffa47 Merged revisions 97304 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r97304 | mmichelson | 2008-01-08 17:49:11 -0600 (Tue, 08 Jan 2008) | 5 lines

Part 1 of N of adding doxygen comments to app_queue. I picked some of the most common functions
used (which also happen to be some the biggest/ugliest functions too) to document first. I'm pretty
new to doxygen so criticism is welcome.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-08 23:56:24 +00:00
Tilghman Lesher 19ff8f7f74 Add a new flag 'd' (with optional context) permitting any extension within
that context to be entered as a new extension during the playback of a
voicemail greeting.
Patch inspired by bluecrow76, by tilghman.
(Closes issue #7063)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97305 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-08 23:51:51 +00:00
Terry Wilson 12964661f2 Initialize new variable to NULL
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97248 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-08 21:56:57 +00:00
Mark Michelson 427f17fd9d Adding the option of specifying a second interface in a member definition for a queue. app_queue
will monitor this second device's state for the member, even though it actually calls the first
interface. This ability has been added for statically defined queue members, realtime queue members,
and dynamic queue members added through the CLI, dialplan, or manager.

(closes issue #11603, reported by acidv)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97203 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-08 21:18:32 +00:00
Mark Michelson 190306a23f Merged revisions 97192 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r97192 | mmichelson | 2008-01-08 14:42:07 -0600 (Tue, 08 Jan 2008) | 9 lines

Making some changes designed to not allow for a corrupted mailstream for a vm_state.

1. Add locking to the vm_state retrieval functions so that no linked list corruption occurs.
2. Make sure to always grab the persistent vm_state when mailstream access is necessary.
3. Correct an incorrect return value in the init_mailstream function.

(closes issue #11304, reported by dwhite)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97193 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-08 20:45:59 +00:00
Joshua Colp fb2aef67b9 Merged revisions 97093 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r97093 | file | 2008-01-08 14:36:40 -0400 (Tue, 08 Jan 2008) | 4 lines

Make app_queue calls work with directed pickup.
(closes issue #11700)
Reported by: jbauer

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97103 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-08 18:42:39 +00:00
Mark Michelson 52fb517bf9 Explicitly make literal constants long where they are expected to be.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@96987 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-07 22:31:03 +00:00
Mark Michelson 19b18414f5 Document some weird casting magic that's necessary to interface
with the c-client



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@96935 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-07 21:10:59 +00:00
Mark Michelson 905fc559d1 Adding user-configurable TCP timeout settings to IMAP voicemail. This could
go a long way towards preventing unexplainable hangs experienced by people. In the
case of MWI hangs, this also will mean that the SIP port isn't blocked anymore.

(closes issue #11665, reported by yehavi)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@96934 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-07 21:04:09 +00:00
Tilghman Lesher 77ecc4a46a Compatibility fix for OpenBSD
Report and fix by: mvanbaak
(Closes issue #11669)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@96147 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-03 01:59:27 +00:00
Mark Michelson b7f3b78031 Merged revisions 96102 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r96102 | mmichelson | 2008-01-02 17:46:02 -0600 (Wed, 02 Jan 2008) | 4 lines

We need to reset the membername to NULL on each iteration of this loop, otherwise the result is that
multiple members can have the same name, since the variable was not reset on each iteration of the loop.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@96103 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-02 23:48:43 +00:00
Mark Michelson 5107c5474c Change instances of AST_NONSTANDARD_APP_ARGS(foo, bar, ',') to AST_STANDARD_APP_ARGS(foo, bar)
(closes issue #11668, reported and patched by mvanbaak)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95994 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-02 21:08:33 +00:00
Mark Michelson 80c479f94e Since ',' is the standard argument separator in trunk, change app_queue
to use AST_STANDARD_APP_ARGS instead of AST_NONSTANDARD_APP_ARGS for determining
member data.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95945 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-02 20:23:23 +00:00
Mark Michelson e0e6e81477 Merged revisions 95890 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r95890 | mmichelson | 2008-01-02 11:51:22 -0600 (Wed, 02 Jan 2008) | 9 lines

A change to improve the accuracy of queue logging in the case where a member does not
answer during the specified timeout period. Prior to this change, there was a small chance
that the member name recorded in this case would be blank. Also prior to this change, if using
the ringall strategy, if no one answered the call during the specified timeout, the member name
listed in the queue log would randomly be one of the members that was rung.

(closes issue #11498, reported and tested by hloubser, patched by me)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95891 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-02 18:05:57 +00:00
Jason Parker 70ddf2735d Update osplookup documentation to use commas instead of pipes.
Closes issue #11666, patch by Laureano.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95888 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-02 17:38:02 +00:00
Russell Bryant e77af16996 fix a spacing issue introduced in revision 95443.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95723 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-02 03:36:39 +00:00
Mark Michelson 3051807efa Fix a compiler warning
(closes issue #11658, reported and patched by eliel)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95443 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-31 18:46:12 +00:00
Mark Michelson c540b02f6f The diff for this change looks really bad, but all I did here was decrease the indentation of most
of the queue_exec function by reversing the logic of an if statement. This change makes the function
comply better with the coding guidelines. Since this change is purely a cosmetic change to the code, I am
only committing the change to trunk.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95233 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-28 18:39:29 +00:00
Mark Michelson d9e0bb0e84 Some changes to app_amd.
The channel name is printed in verbose messages
maximumWordLength option added.
Duration of words that do not meet the minimum word duration will be logged
The duration of pre-greeting silence will be logged
Only consider us in the greeting if we actually detected a valid word duration.

(closes issue #11650, reported and patched by davevg)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95167 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-28 16:12:06 +00:00
Mark Michelson af080add62 Merged revisions 95095 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r95095 | mmichelson | 2007-12-27 18:16:15 -0600 (Thu, 27 Dec 2007) | 8 lines

I found a bug while browsing the queue code and managed to reproduce it in a small setup.

If a queue uses the ringall strategy, it was possible through unfortunate coincidence for a single member at a given penalty level to
make app_queue think that all members at that penalty level were unavailable and cause the members at the
next penalty level to be rung. With this patch, we will only move to the next penalty level if ALL the members
at a given penalty level are unreachable.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95096 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-28 00:17:41 +00:00
Luigi Rizzo c8f970936d remove more unnecessary casts for NULL.
main/say.c is a big offender in this respect.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95073 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-27 23:32:18 +00:00
Luigi Rizzo 5e041a46dc NULL does not need to be cast to (char *)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95069 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-27 23:13:15 +00:00
Olle Johansson aa9c6e297f - Add Copyright
- Doxygen fixes

Note:
- This application needs better documentation and a RESULT code in the
  dialplan.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94826 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-27 09:08:23 +00:00
Jason Parker f573e85ecc Make 'else' argument to ExecIf optional. Clean up the description and usage text a bit.
Closes issue #11564, patch by pnlarsson (with some extra cleanup by me).


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94814 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-26 22:14:21 +00:00
Jason Parker eea428cf76 Use defined return values in load_module in more places.
(closes issue #11096)
Patches:
      pbx_config.c.patch uploaded by moy (license 222)
      pbx_dundi.c.patch uploaded by moy (license 222)
      pbx_gtkconsole.c.patch uploaded by moy (license 222)
      pbx_loopback.c.patch uploaded by moy (license 222)
      pbx_realtime.c.patch uploaded by moy (license 222)
      pbx_spool.c.patch uploaded by moy (license 222)
      app_adsiprog.c.patch uploaded by moy (license 222)
      app_alarmreceiver.c.patch uploaded by moy (license 222)
      app_amd.c.patch uploaded by moy (license 222)
      app_authenticate.c.patch uploaded by moy (license 222)
      app_cdr.c.patch uploaded by moy (license 222)
      app_zapateller.c.patch uploaded by moy (license 222)
      app_zapbarge.c.patch uploaded by moy (license 222)
      app_zapras.c.patch uploaded by moy (license 222)
      app_zapscan.c.patch uploaded by moy (license 222)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94806 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-26 20:02:27 +00:00
Tilghman Lesher 32289c32f5 Add pickup by channel
(Closes issue #11161)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94773 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-25 04:10:57 +00:00
Mark Michelson eb10026dba Something I've been itching to do for a while now. A minor optimization in app_voicemail.
Since the dtable in base_encode always gets populated with the same values every time and never
changes, make it static and const and only initialize it once. Also, there's no reason to 
define BASEMAXINLINE twice, so remove the redundant #define.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94593 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-21 21:19:19 +00:00
Mark Michelson e0b9943818 Fix a memory leak when reloading queue rules.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94547 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-21 20:30:05 +00:00
Mark Michelson 4c8ad19825 Lots of coding guidelines cleanup.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94545 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-21 20:24:24 +00:00
Mark Michelson 42803ef6e4 Merged revisions 94540 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r94540 | mmichelson | 2007-12-21 14:11:34 -0600 (Fri, 21 Dec 2007) | 8 lines

Better quota support for using IMAP storage voicemail

(closes issue #11415, reported by jaroth)
(closes issue #11152, reported by selsky)

Patch provided by jaroth


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94542 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-21 20:18:26 +00:00
Mark Michelson 590a70a9cd Merged revisions 94538 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r94538 | mmichelson | 2007-12-21 13:59:45 -0600 (Fri, 21 Dec 2007) | 5 lines

The mail_copy c-client function does not expect a full imap mailbox string, just the name of the mailbox.

(closes issue #11419, reported and patched by jaroth, with additional patchwork from me)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-21 20:01:10 +00:00
Mark Michelson c1fac2d834 Merged revisions 94464 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r94464 | mmichelson | 2007-12-21 10:11:44 -0600 (Fri, 21 Dec 2007) | 3 lines

Removing a debug message I accidentally just committed


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94465 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-21 16:12:14 +00:00
Mark Michelson 2e6431c42a Merged revisions 94420 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r94420 | mmichelson | 2007-12-21 09:45:14 -0600 (Fri, 21 Dec 2007) | 5 lines

Fixing Portuguese syntax for saying dates and times. Also some coding guidelines cleanup.

(closes issue #11599, reported and patched by caio1982, coding guidelines cleanup by me)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94463 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-21 16:10:21 +00:00
Mark Michelson 88f27c8279 Moved the update of the queue_ent's rule list to just before we try to call
queue members. This allows for the change in penalty levels to be executed at
the most logical time frame.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94396 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-21 01:14:32 +00:00
Mark Michelson b489558138 Merging the queue-penalty branch. In short, this allows one to dynamically adjust
the QUEUE_MAX_PENALTY and the newly introduced QUEUE_MIN_PENALTY during a call depending
on the amount of time passed. The purpose is to allow the call to open up to more (or maybe
just different) members without the caller's losing his place in the queue. See 
configs/queuerules.conf.sample for an example of how to set up queue rules and configs/queues.conf.sample
for how to associate a rule with a queue.

Along with the functional changes, new CLI and manager commands exist to show the rules defined and
there is an additional CLI command to reload the queue rules.

Future enhancements that may be made: support for realtime queue rules and support for dynamically adding
a rule through the manager or CLI. Also a manager command to reload the queue rules (I'll probably write
this myself very soon).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94370 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-21 00:44:17 +00:00
Mark Michelson 51a48a2ed9 The changes to header inclusion in trunk broke compilation of app_voicemail when using
IMAP storage. The reason is that c-client has its own definitions for LOG_WARNING
and LOG_DEBUG, so we need to be sure to include asterisk's definitions last so that
we use the proper values in app_voicemail.

(closes issue #11437, reported by blitzrage, patch suggested by blitzrage)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94345 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-20 23:43:24 +00:00
Mark Michelson c848e480c9 1. Unify the check for a penalty < 0 into the set_member_penalty code.
2. Fix an error when checking the CLI command for setting a member's penalty.
3. Fix a logging error if the incorrect parameter was the queue name or interface.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-19 23:17:42 +00:00
Tilghman Lesher d36381e629 Add 'voicemail reload' command.
Reported by: eliel
Patch by: eliel
(Closes issue #11365)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94053 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-19 20:20:55 +00:00
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