Commit Graph

3916 Commits

Author SHA1 Message Date
Matthew Nicholson 8d1f4fa5ea Merged revisions 231614 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r231614 | mnicholson | 2009-11-30 15:11:44 -0600 (Mon, 30 Nov 2009) | 8 lines
  
  Remove duplicate entries from voicemail format lists. This prevents app_voicemail from entering an infinite loop when the same format is specified twice in the format list.
  
  (closes issue #15625)
  Reported by: Shagg63
  Tested by: mnicholson
  
  Review: https://reviewboard.asterisk.org/r/429/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@231616 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-30 21:13:42 +00:00
David Vossel 4f5dd10749 app_queue crashes randomly, often during call-transfers
This patch adds a ref to the queue_ent object's parent call_queue
in queue_exec() so the call_queue won't be destroyed
while the the queue_ent still holds a pointer to it.

(closes issue 0015686)
Tested by: dvossel, aragon




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@231556 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-30 18:55:07 +00:00
TransNexus OSP Development 0a4942633b 1. Modified exported variable names.
2. Added destination port support.
3. Added new protocols.
4. Added QoS.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@231401 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-27 08:47:18 +00:00
Tilghman Lesher baca4c6437 Found a few places where queue refcounts were counted incorrectly. Also add debug statements.
(closes issue #15982, closes issue #15984)
 Reported by: atis
 Patches: 
       20091111__issue15982.diff.txt uploaded by tilghman (license 14)
 Tested by: atis


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@231134 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-24 20:31:28 +00:00
Matthew Nicholson 606276ec48 Add an option to app_followme to disable the "please hold" announcement.
(closes issue #14155)
Reported by: junky
Patches:
      M14555-trunk.diff uploaded by junky (license 177) (modified)
Tested by: junky


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@230964 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-23 22:37:39 +00:00
David Ruggles 6e27759d33 Fix/Implement error events for non-existing files
also include a better cmd define for S command

Review: https://reviewboard.asterisk.org/r/430/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@230584 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-20 17:28:01 +00:00
David Vossel eb6025a49a Merged revisions 230508 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r230508 | dvossel | 2009-11-19 15:22:46 -0600 (Thu, 19 Nov 2009) | 10 lines
  
  fixes MixMonitor thread not exiting when StopMixMonitor is used
  
  (closes issue #16152)
  Reported by: AlexMS
  Patches:
        stopmixmonitor_1.4.diff uploaded by dvossel (license 671)
  Tested by: dvossel, AlexMS
  
  Review: https://reviewboard.asterisk.org/r/424/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@230509 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-19 21:26:21 +00:00
David Ruggles 8d9a12a60a Basic cleanup of ExternalIVR: cleaned up argument parsing; implemented good coding practices where applicable; replaced most notice level logging with verbose logging; replaced warning messages that terminated with error messages; fixed memory leak identified by russellb
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@230438 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-19 14:53:58 +00:00
Kevin P. Fleming 80fc9540f9 Fix another buglet in T.38 session teardown at the end of FAX sessions.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@230381 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-16 16:40:25 +00:00
Kevin P. Fleming 237795f6d7 Ensure that only one end of a T.38 session initiates teardown at completion.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@230343 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-16 12:51:59 +00:00
TransNexus OSP Development 9a707c9b37 1. Added SIP Diversion support.
2. Fixed compile warning for UUID.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@230314 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-16 01:49:41 +00:00
Tilghman Lesher 5e2aa190fe Display a list of channel variables in each channel-oriented event.
(Closes AST-33)
Reviewboard:	https://reviewboard.asterisk.org/r/368/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@230111 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-13 20:42:03 +00:00
Joshua Colp f62d03a8f3 Store the cause code that is returned when trying to create a channel in ChanIsAvail in the
AVAILCAUSECODE dialplan variable instead of overwriting the device state in AVAILSTATUS.

(closes issue #14426)
Reported by: macli


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@229970 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-13 17:22:47 +00:00
TransNexus OSP Development 8016a55636 Added full number portability parameter support.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@229788 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-13 03:16:39 +00:00
David Brooks c5990d41bb Flags not initialized in app_softhangup.c, causing undefined behavior
Trivial patch [kobaz] to initialize an ast_flags = {0}

(closes issue #16129)
Reported by: kobaz


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@229460 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-11 18:13:56 +00:00
Tilghman Lesher 423d4b8278 When GOSUB is invoked within an AGI, it may not exit correctly.
(closes issue #16216)
 Reported by: atis
 Patches: 
       20091110__atis_work.diff.txt uploaded by tilghman (license 14)
 Tested by: atis


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@229351 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-10 21:22:50 +00:00
Matthew Nicholson aabff54c4b Add the 'relative-periodic-announce' option to app_queue to allow for calculating the time of announcments from the end of the previous announcment rather than from the beginning.
(closes issue #15260)
Reported by: tonils


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@228947 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-09 16:28:31 +00:00
Tilghman Lesher bcb09043b8 Yet another error message in the dialplan (thanks, rmudgett/russellb)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@228196 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-05 22:12:45 +00:00
Tilghman Lesher 8b447d9063 MEETME_INFO should not return a literal error message to the dialplan.
(closes issue #15450)
 Reported by: JimVanM
 Patches: 
       meetmeinfopatch.diff.txt uploaded by dbrooks (license 790)
 Tested by: JimVanM


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@228191 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-05 21:24:21 +00:00
Jeff Peeler 6aaa119e84 Fix the fix for chanspy option o
In 224178, I assumed the uploaded patch was correct as it had received positive
feedback. The flags were being checked in the incorrect location. Upon testing
the fix this time it was also found that the flags from the dialplan weren't
being copied to the chanspy_translation_helper.

(closes issue #16167)
Reported by: marhbere



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@228189 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-05 21:23:06 +00:00
Tilghman Lesher 8ee06c6c3b Don't crash if no arguments are passed.
(closes issue #16119)
 Reported by: thedavidfactor


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@228015 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-05 17:08:02 +00:00
Matthew Nicholson 317435a932 Added the 'a' option to app dial and modified app_dial to set the answertime when the called channel answers.
This change causes answertime to be correct even if the called channel hangs up during an announcement triggered by the A() option.

(closes issue #15936)
Reported by: falves11
Patches:
      dial-macro-billsec-fix1.diff uploaded by mnicholson (license 96)
      dial-caller-answer1.diff uploaded by mnicholson (license 96)
Tested by: falves11, mnicholson


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@227897 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-04 21:39:33 +00:00
Matthew Nicholson ed2ed2717a Merged revisions 227827 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r227827 | mnicholson | 2009-11-04 14:52:27 -0600 (Wed, 04 Nov 2009) | 10 lines
  
  This patch modifies the Dial application to monitor the calling channel for hangups while playing back announcements.
  
  (closes issue #16005)
  Reported by: falves11
  Patches:
        dial-announce-hangup-fix1.diff uploaded by mnicholson (license 96)
  Tested by: mnicholson, falves11
  
  Review: https://reviewboard.asterisk.org/r/407/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@227829 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-04 21:03:33 +00:00
Tilghman Lesher d8e0c58437 Expand codec bitfield from 32 bits to 64 bits.
Reviewboard: https://reviewboard.asterisk.org/r/416/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@227580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-04 14:05:12 +00:00
Tilghman Lesher 206d2cbc16 Don't crash when state_interface is NULL.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@227509 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-04 03:15:10 +00:00
Matthew Nicholson 7ed425ec80 This patch adds a sequence field to CDRs that can be combined with the linkedid or uniqueid field to uniquely identify a CDR.
(closes issue #15180)
Reported by: Nick_Lewis
Patches:
      cdr-sequence10.diff uploaded by mnicholson (license 96)
Tested by: mnicholson


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@227435 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-03 21:21:09 +00:00
Joshua Colp 2263ced9dd Add support for using a hint when configuring a state interface using the format hint:<extension>@<context>.
(closes issue #15168)
Reported by: p_lindheimer
Patches:
      queue_extenstate5_1.4.svn.patch uploaded by GameGamer43 (license 894)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@227424 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-03 21:16:14 +00:00
Leif Madsen f457dfecd1 Change warning message to debug message.
app_controlplayback outputs a warning, when in fact it is normal.

(closes issue #16071)
Reported by: atis
Patches:
      controlplayback_warning.patch uploaded by atis (license 242)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@227368 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-03 19:48:53 +00:00
Joshua Colp 7a17d87740 Merged revisions 226889 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r226889 | file | 2009-11-02 14:08:11 -0400 (Mon, 02 Nov 2009) | 11 lines
  
  Fix a bug where the recorded privacy introduction file would not get removed if the caller hung up
  while the called party had not yet answered.
  
  This was fixed by introducing an argument to the 'n' option which, when enabled, removes the introduction
  file under all scenarios. This was done to preserve the behavior that has existed for quite some time.
  
  (closes issue #14674)
  Reported by: ulogic
  Patches:
        bug14674.patch uploaded by jpeeler (license 325)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@226890 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-02 18:08:54 +00:00
David Vossel 776a14386a SIP TCP/TLS: move client connection setup/write into tcp helper thread, various related locking/memory fixes.
What this patch fixes
1.Moves sip TCP/TLS connection setup into the TCP helper thread:
  Connection setup takes awhile and before this it was being
  done while holding the monitor lock.
2.Moves TCP/TLS writing to the TCP helper thread:  Through the
  use of a packet queue and an alert pipe, the TCP helper thread
  can now be woken up to write data as well as read data.
3.Locking error: sip_xmit returned an XMIT_ERROR without giving
  up the tcptls_session lock.  This lock has been completely removed
  from sip_xmit and placed in the new sip_tcptls_write() function.
4.Memory leak:  When creating a tcptls_client the tls_cfg was alloced
  but never freed unless the tcptls_session failed to start.  Now the
  session_args for a sip client are an ao2 object which frees the
  tls_cfg on destruction.
5.Pointer to stack variable: During sip_prepare_socket the creation
  of a client's ast_tcptls_session_args was done on the stack and
  stored as a pointer in the newly created tcptls_session.  Depending
  on the events that followed, there was a slight possibility that
  pointer could have been accessed after the stack returned.  Given
  the new changes, it is always accessed after the stack returns
  which is why I found it.

Notable code changes
1.I broke tcptls.c's ast_tcptls_client_start() function into two
  functions.  One for creating and allocating the new tcptls_session,
  and a separate one for starting and handling the new connection.
  This allowed me to create the tcptls_session, launch the helper
  thread, and then establish the connection within the helper thread.
2.Writes to a tcptls_session are now done within the helper thread.
  This is done by using an alert pipe to wake up the thread if new
  data needs to be sent.  The thread's sip_threadinfo object contains
  the alert pipe as well as the packet queue.
3.Since the threadinfo object contains the alert pipe, it must now be
  accessed outside of the helper thread for every write (queuing of a
  packet).  For easy lookup, I moved the threadinfo objects from a
  linked list to an ao2_container.

(closes issue #13136)
Reported by: pabelanger
Tested by: dvossel, whys

(closes issue #15894)
Reported by: dvossel
Tested by: dvossel

Review: https://reviewboard.asterisk.org/r/380/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@225445 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-22 19:55:51 +00:00
Tilghman Lesher d9f72c1893 Permit storage of voicemail secrets in a separate file, located within the spool directory.
(closes issue #14276)
 Reported by: klaus3000
 Patches: 
       app_voicemail.c-svn-trunk-r214898.txt uploaded by klaus3000 (license 65)
 Tested by: jamesgolovich


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@225406 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-22 19:10:04 +00:00
Tilghman Lesher 496282194c Merged revisions 225105 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r225105 | tilghman | 2009-10-21 11:02:12 -0500 (Wed, 21 Oct 2009) | 4 lines
  
  Fix documentation for ast_softhangup() and correct the misuse thereof.
  (closes issue #16103)
   Reported by: majorbloodnok
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@225360 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-22 17:11:23 +00:00
Kevin P. Fleming cdd1f9e296 Finish implementaton of astobj2 OBJ_MULTIPLE, and convert ast_channel_iterator to use it.
This patch finishes the implementation of OBJ_MULTIPLE in astobj2 (the
case where multiple results need to be returned; OBJ_NODATA mode
already was supported). In addition, it converts ast_channel_iterators
(only the targeted versions, not the ones that iterate over all
channels) to use this method.

During this work, I removed the 'ao2_flags' arguments to the
ast_channel_iterator constructor functions; there were no uses of that
argument yet, there is only one possible flag to pass, and it made the
iterators less 'opaque'. If at some point in the future someone really
needs an ast_channel_iterator that does not lock the container, we can
provide constructor(s) for that purpose.

Review: https://reviewboard.asterisk.org/r/379/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@225244 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-21 21:08:47 +00:00
Tilghman Lesher 0776bcff64 Apparently, I don't need to specify the ".so" suffix to get a match
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@225102 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-21 15:42:47 +00:00
Tilghman Lesher a2f809c127 Turn on DENOISE filter for all conference participants.
(Fixes SWP-238)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@225048 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-21 15:21:30 +00:00
Joshua Colp b7a50aeddc Merged revisions 224565 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r224565 | file | 2009-10-19 16:47:50 -0300 (Mon, 19 Oct 2009) | 5 lines
  
  Do not attempt early media bridging (ie: direct RTP setup) if options are enabled that should prevent it.
  
  (closes issue #14763)
  Reported by: cupotka
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@224567 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-19 19:49:09 +00:00
Tilghman Lesher 8f9edddc27 Allow ODBC storage to be queried with multiple mailboxes, and remove multiple goto's.
This corrects an issue reported on the -users list.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@224448 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-19 00:05:56 +00:00
Jeff Peeler a39f3a7521 Readd removed ability to allow listening to one side of the call in app_chanspy
(Option o)

(closes issue #15675)
Reported by: john8675309
Patches:
      issue15675patchtrunk.txt uploaded by dbrooks (license 790)
Tested by: jgutierrez on users list:
 http://lists.digium.com/pipermail/asterisk-users/2009-October/239155.html


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@224178 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-15 15:57:14 +00:00
Terry Wilson 1f9f1562ba Revert inadvertant code commit to app_originate
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@223875 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-13 01:58:09 +00:00
Terry Wilson a8034cd770 Fix handling of notification calls w/ the dialing api
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@223874 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-13 01:51:46 +00:00
Jeff Peeler 832be82dfb Merged revisions 223804 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r223804 | jpeeler | 2009-10-12 18:12:50 -0500 (Mon, 12 Oct 2009) | 8 lines
  
  Ensure ringing continues for branched calls after progress is received
  
  While waiting for an answer, don't send progress for branched calls
  for which ringing was sent.
  
  (closes issue #15028)
  Reported by: fnordian
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@223832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-12 23:48:09 +00:00
Kevin P. Fleming e197f85b8c Remove automatic switching from T.38 to voice mode in chan_sip.
chan_sip has some code to automatically switch from T.38 mode to voice mode when
a voice frame is written to the channel while it is in T.38 mode; this was
intended to handle the situation when a FAX transmission has ended and the channel
is not yet hung up, but is causing problems at the beginning of FAX sessions as
well when there are still voice frames 'in flight' at the time the T.38 negotiation
completes. This patch removes the automatic switchover, and changes app_fax to
explicitly switch off T.38 mode when the FAX transmission process ends.

(closes issue #16025)
Reported by: jamicque


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@223652 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-12 14:25:29 +00:00
Kevin P. Fleming 7c71e98879 Initiate T.38 switchover when acting as called party, regardless of FAX direction.
SendFAX() and ReceiveFAX() can be given options to indicate whether they should
act as the calling or called party; this mode should be used to decide whether
to initiate a switchover to T.38, not the direction that the FAX transfer will
take place.

(closes issue #16039)
Reported by: jamicque


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@223330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-09 20:58:44 +00:00
Mark Michelson 66e993de95 Fix potential memory leaks.
ABE-1998



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@223211 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-09 18:13:57 +00:00
Kevin P. Fleming 1c9fe00920 Recorded merge of revisions 222152 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r222152 | kpfleming | 2009-10-05 20:16:36 -0500 (Mon, 05 Oct 2009) | 20 lines
  
  Fix ao2_iterator API to hold references to containers being iterated.
  
  See Mantis issue for details of what prompted this change.
  
  Additional notes:
  
  This patch changes the ao2_iterator API in two ways: F_AO2I_DONTLOCK
  has become an enum instead of a macro, with a name that fits our
  naming policy; also, it is now necessary to call
  ao2_iterator_destroy() on any iterator that has been
  created. Currently this only releases the reference to the container
  being iterated, but in the future this could also release other
  resources used by the iterator, if the iterator implementation changes
  to use additional resources.
  
  (closes issue #15987)
  Reported by: kpfleming
  
  Review: https://reviewboard.asterisk.org/r/383/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@222176 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-06 01:24:24 +00:00
Matthias Nick 00bb578898 Prevents from division by zero
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@221436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-30 21:15:01 +00:00
Sean Bright 0e805a51ec Modify VoiceMailMain()'s a() argument to allow mailboxes to be specified by name.
(closes issue #14740)
Reported by: pj
Patches:
      issue14740_09022009.diff uploaded by seanbright (license 71)
Tested by: seanbright, lmadsen


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@221090 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-30 15:11:21 +00:00
Sean Bright 3ac28f1e0f Clarify documentation for VoiceMailMain()'s a() option.
We require box numbers, not names as the documentation implies.
(issue #14740)
Reported by: pj
Patches:
      __20090729-app_voicemail-documentation.patch uploaded by lmadsen (license 10)
Tested by: seanbright, lmadsen


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@221085 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-30 14:47:58 +00:00
Matthew Nicholson 4b4432b67e Fix options 'm' and 's'. They were swapped in the code. Also document the fact that app_confbridge does not automatically answer the channel.
(closes issue #15964)
Reported by: shrift


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@220904 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-29 19:49:02 +00:00
Jeff Peeler a9154a905a Make deletion of temporary greetings work properly with IMAP_STORAGE
When imapgreetings was set to yes, the message was being deleted but wasn't
actually being expunged. When imapgreetings was set to no, the file based
message was not being deleted at all. All good now!

(closes issue #14949)
Reported by: noahisaac
Patches:
      vm_tempgreeting_removal.patch uploaded by noahisaac (license 748), 
      modified by me


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@220833 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-29 16:58:29 +00:00
Jeff Peeler f150b48bc0 Add bridge related dial flags to the bridge app
Most of the functionality here is gained simply by setting the feature flag
on the bridge config. However, the dial limit functionality has been moved from
app_dial to the features code and has been made public so both app_dial and
the bridge app can use it.

(closes issue #13165)
Reported by: tim_ringenbach
Patches:
      app_bridge_options_r138998.diff uploaded by tim ringenbach (license 540),
      modified by me


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@220344 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-24 20:29:51 +00:00
Tilghman Lesher 1cf5422dc8 Merged revisions 220288 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r220288 | tilghman | 2009-09-24 14:39:41 -0500 (Thu, 24 Sep 2009) | 6 lines
  
  Implicitly sending a progress signal breaks some applications.
  Call Progress() in your dialplan if you explicitly want progress to be sent.
  (Reverts change 216430, closes issue #15957)
  Reported by: Pavel Troller on the Asterisk-Dev mailing list
  http://lists.digium.com/pipermail/asterisk-dev/2009-September/039897.html
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@220289 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-24 19:41:02 +00:00
Tilghman Lesher 9298b2602a Fix two possible crashes, one only in 1.6.1 and one in 1.6.1 forward.
(closes issue #15739)
 Reported by: DLNoah, jeffg
 Patches: 
       20090914__issue15739.diff.txt uploaded by tilghman (license 14)
       20090922__issue15739.diff.txt uploaded by tilghman (license 14)
 Tested by: DLNoah, jeffg


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@219987 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-24 07:39:44 +00:00
Tilghman Lesher 6c3a3dabe0 Merged revisions 219816 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r219816 | tilghman | 2009-09-22 16:37:03 -0500 (Tue, 22 Sep 2009) | 10 lines
  
  When IMAP variables were changed during a reload, Voicemail did not use the new values.
  This change introduces a configuration version variable, which ensures that
  connections with the old values are not reused but are allowed to expire
  normally.
  (closes issue #15934)
   Reported by: viniciusfontes
   Patches: 
         20090922__issue15934.diff.txt uploaded by tilghman (license 14)
   Tested by: viniciusfontes
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@219818 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-22 21:43:22 +00:00
Tilghman Lesher 340d4b1a93 Missing value setting line for maxsecs/maxmessage
(closes issue #15696)
 Reported by: fhackenberger
 Patches: 
       maxsecs.patch uploaded by fhackenberger (license 592)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@219412 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-18 13:54:51 +00:00
Sean Bright a48d489568 Get this compiling under dev-mode.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@219230 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-17 16:25:38 +00:00
Tilghman Lesher cd88adfc6a Add the 'E' option to exit ChanSpy, once the single channel it spied upon hangs up.
In addition, there's a bit of cleanup to the arguments and documentation, in which
I discovered that the last feature added to this application duplicated an option
(oops!) and changed that option so that it now works.
(closes issue #14909)
 Reported by: junky
 Patches: 
       __20090901-spy_hangup_trunk.diff uploaded by lmadsen (license 10)
 Tested by: amilcar, junky, flujan, lmadsen


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@219105 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-17 00:58:10 +00:00
Tilghman Lesher e876206693 Merged revisions 218730 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r218730 | tilghman | 2009-09-15 17:27:41 -0500 (Tue, 15 Sep 2009) | 6 lines
  
  If the user enters the same password as before, don't signal an error when the change does nothing.
  (closes issue #15492)
   Reported by: cbbs70a
   Patches: 
         20090713__issue15492.diff.txt uploaded by tilghman (license 14)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@218731 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-15 22:33:10 +00:00
Tilghman Lesher 95da50292e Merged revisions 218577 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r218577 | tilghman | 2009-09-15 11:01:17 -0500 (Tue, 15 Sep 2009) | 9 lines
  
  Ensure FollowMe sets language in channels it creates.
  Also, not in the original bug report, but related fields are accountcode and
  musicclass, and the inheritance of datastores.
  (closes issue #15372)
   Reported by: Romik
   Patches: 
         20090828__issue15372.diff.txt uploaded by tilghman (license 14)
   Tested by: cervajs
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@218579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-15 16:04:41 +00:00
Tilghman Lesher a873ad7a9b Recorded merge of revisions 218331 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r218331 | tilghman | 2009-09-14 14:16:35 -0500 (Mon, 14 Sep 2009) | 4 lines
  
  Don't say "Please try again" if we don't give the user another chance to try again.
  (issue #15055, SWP-129)
   Reported by: jthurman
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@218361 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-14 19:29:48 +00:00
Matthew Nicholson 3b2023290f Merged revisions 218223 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r218223 | mnicholson | 2009-09-14 09:53:57 -0500 (Mon, 14 Sep 2009) | 8 lines
  
  Ensure we don't pickup ourselves when doing pickup by exten.
  
  (closes issue #15100)
  Reported by: lmsteffan
  Patches:
        (modified) pickup.patch uploaded by lmsteffan (license 779)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@218224 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-14 14:57:23 +00:00
Tilghman Lesher 85f18fcb8f Merged revisions 217989 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r217989 | tilghman | 2009-09-10 18:52:22 -0500 (Thu, 10 Sep 2009) | 3 lines
  
  Don't ring another channel, if there's not enough time for a queue member to answer.
  (Fixes AST-228)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@217990 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-10 23:54:51 +00:00
Sean Bright 245b163755 Fix compilation of app_meetme.
Reported by ebroad in #asterisk-bugs


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@217286 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-08 22:17:08 +00:00
Tilghman Lesher 555ed0464f Merged revisions 217156 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r217156 | tilghman | 2009-09-08 15:01:45 -0500 (Tue, 08 Sep 2009) | 7 lines
  
  When MOH is playing on the channel, announcements sent through the conference are not heard.
  (closes issue #14588)
   Reported by: voipas
   Patches: 
         20090716__issue14588__2.diff.txt uploaded by tilghman (license 14)
   Tested by: lmadsen, twisted, tilghman
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@217199 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-08 20:28:41 +00:00
Sean Bright 40d83cf748 Use ast_free() instead of free().
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@216593 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-04 19:29:02 +00:00
Olle Johansson 98f18d56b8 Merged revisions 216430 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r216430 | oej | 2009-09-04 15:45:48 +0200 (Fre, 04 Sep 2009) | 27 lines

Make apps send PROGRESS control frame for early media and fix too early media issue in SIP

The issue at hand is that some legacy (dying) PBX systems send empty media frames on PRI
links *before* any call progress. The SIP channel receives these frames and by default
signals 183 Session progress and starts sending media. This will cause phones to 
play silence and ignore the later 180 ringing message. A bad user experience.

The fix is twofold:
- We discovered that asterisk apps that support early media ("noanswer") did not send
  any PROGRESS frame to indicate early media. Fixed.
- We introduce a setting in chan_sip so that users can disable any relay of media frames
  before the outbound channel actually indicates any sort of call progress.
  In 1.4, 1.6.0 and 1.6.1, this will be disabled for backward compatibility. In later versions
  of Asterisk, this will be enabled. We don't assume that it will change your Asterisk
  phone experience - only for the better.

We encourage third-party application developers to make sure that if they have applications
that wants to send early media, add a PROGRESS control frame transmission to make sure that
all channel drivers actually will start sending early media. This has not been the default
in Asterisk previous to this patch, so if you got inspiration from our code, you need to
update accordingly. Sorry for the trouble and thanks for your support.

This code has been running for a few months in a large scale installation (over 250
servers with PRI and/or BRI links to old PBX systems). 
That's no proof that this is an excellent patch, but, well, it's tested :-)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@216438 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-04 14:02:34 +00:00
Dwayne M. Hubbard b5c89b7d0c Merged revisions 215270 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r215270 | dhubbard | 2009-09-01 18:04:52 -0500 (Tue, 01 Sep 2009) | 12 lines
  
  Use strrchr() so SoftHangup will correctly truncate multi-hyphen channel names
  
  In general channel names are in the form Foo/Bar-Z, but the channel name
  could have multiple hyphens and look like Foo/B-a-r-Z.  Use strrchr to
  truncate the channel name at the last hyphen.
  
  (closes issue #15810)
  Reported by: dhubbard
  Patches:
        dw-softhangup-1.4.patch uploaded by dhubbard (license 733)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@215338 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-02 01:16:59 +00:00
Jeff Peeler 72365bdede Fix storage of greetings when using IMAP_STORAGE
The store macro was not getting called preventing storage of IMAP greetings
at all. This has been corrected along with fixing checking if the
imapgreetings option is turned on to store the greeting in IMAP. Lastly,
the attachment filename was incorrectly using the full path instead of just
the basename, which was causing problems with retrieval of the greeting.

(closes issue #14950)
Reported by: noahisaac

(closes issue #15729)
Reported by: lmadsen


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@213833 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-24 16:43:57 +00:00
Kevin P. Fleming 89e87e32d2 Ensure that realtime mailboxes properly report status on subscription.
This patch modifies app_voicemail's response to mailbox status subscriptions
(via the internal event system) to ensure that a subscription triggers an
explicit poll of the mailbox, so the subscriber can get an immediate cached
event with that status. Previously, the cache was only populated with the
status of non-realtime mailboxes.

(closes issue #15717)
Reported by: natmlt



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@213697 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-21 21:39:51 +00:00
Tilghman Lesher 1b08c27c1a Add original position, when logging a caller entering a queue.
(closes issue #15146)
 Reported by: arabe
 Patches: 
       asterisk-trunk.patch uploaded by arabe (license 786)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@213414 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-20 22:13:26 +00:00
Jeff Peeler b8e571fb44 Fix greeting retrieval from IMAP
Properly check for the current voicemail state and if it doesn't exist,
create it.

(closes issue #14597)
Reported by: wtca
Patches:
      14597_v2.patch uploaded by mmichelson (license 60)
Tested by: jpeeler



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@213404 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-20 21:33:11 +00:00
Jeff Peeler f6a10614a4 Merged revisions 213283 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r213283 | jpeeler | 2009-08-20 14:53:34 -0500 (Thu, 20 Aug 2009) | 2 lines
  
  Make all the symbols for the C-client callbacks global
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@213284 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-20 19:56:14 +00:00
David Vossel 3d0314d5c0 Merged revisions 213103 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r213103 | dvossel | 2009-08-19 16:18:37 -0500 (Wed, 19 Aug 2009) | 8 lines
  
  Fixes memory leak caused by incorrectly freeing mixmonitor
  
  (closes issue #15699)
  Reported by: edantie
  Patches:
        mixmonitor.patch uploaded by edantie (license 862)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@213113 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-19 21:21:00 +00:00
Olle Johansson 80cdd9b61d Small doxygen changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@212844 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-18 18:57:28 +00:00
Tilghman Lesher c2612973d0 Check the return value of opendir(3), or we may crash.
(closes issue #15720)
 Reported by: tobias_e


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@212627 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-17 19:57:42 +00:00
Matthew Nicholson 160eb55c47 Merged revisions 211953 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r211953 | mnicholson | 2009-08-12 18:04:02 -0500 (Wed, 12 Aug 2009) | 10 lines
  
  This patch adds additional checking when generating queue log TRANSFER events.
  
  The additional checks prevent generation of false TRANSFER events in certain situations.
  
  (closes issue #14536)
  Reported by: aragon
  Patches:
        queue-log-xfer-fix1.diff uploaded by mnicholson (license 96)
  Tested by: aragon, mnicholson
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@211957 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-12 23:14:36 +00:00
Tilghman Lesher 642bec4d6f AST-2009-005
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@211539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-10 19:20:57 +00:00
Tilghman Lesher e05992889b Check for NULL frame, before dereferencing pointer.
(closes issue #15617)
 Reported by: rain


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@211232 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-09 07:11:22 +00:00
Tilghman Lesher 20102765bf Merged revisions 211038 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r211038 | tilghman | 2009-08-07 13:16:28 -0500 (Fri, 07 Aug 2009) | 14 lines
  
  QUEUE_MEMBER_LIST _really_ wants the interface name, not the membername.
  
  This is a partial revert of revision 82590, which was an attempted cleanup,
  but in reality, it broke QUEUE_MEMBER_LIST, which has always been intended
  as a method by which component interfaces could be queried from the queue.
  Membername isn't useful here, because that field cannot be used to obtain
  further information about the member.  See the documentation on
  QUEUE_MEMBER_LIST, RemoveQueueMember, QUEUE_MEMBER_PENALTY, and the various
  AMI commands which take a member argument for further justification.
  (closes issue #15664)
   Reported by: rain
   Patches: 
         app_queue-queue_member_list.diff uploaded by rain (license 327)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@211040 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-07 18:17:41 +00:00
Tilghman Lesher a737df8603 Allow Gosub to recognize quote delimiters without consuming them.
(closes issue #15557)
 Reported by: rain
 Patches: 
       20090723__issue15557.diff.txt uploaded by tilghman (license 14)
 Tested by: rain
 
Review: https://reviewboard.asterisk.org/r/316/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@210908 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-06 21:29:26 +00:00
Kevin P. Fleming eb449d514e Minor improvements to app_fax.
This patch makes some small changes to handle watchdog timeouts in a better way,
and also uses a 'cleaner' method of including the spandsp header files.

(closes issue #14769)
Reported by: andrew
Patches:
      app_fax-20090406.diff uploaded by andrew (license 240)
      v1-14769.patch uploaded by dimas (license 88)
Tested by: freh, deti, caspy, dimas, sgimeno, Dovid


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@210777 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-06 16:07:15 +00:00
Russell Bryant 104974cdb4 Merged revisions 209838 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r209838 | russell | 2009-08-01 05:59:05 -0500 (Sat, 01 Aug 2009) | 13 lines
  
  Modify how Playtones() is used in Milliwatt() to resolve gain issue.
  
  When Milliwatt() was changed internally to use Playtones() so that the proper
  tone was used, it introduced a drop in gain in the output signal.  So, use
  the playtones API directly and specify a volume argument such that the output
  matches the gain of the original Milliwatt() code.
  
  (closes issue #15386)
  Reported by: rue_mohr
  Patches:
        issue_15386.rev2.diff uploaded by russell (license 2)
  Tested by: rue_mohr
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@209839 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-01 11:02:07 +00:00
David Brooks 48363c16e1 Fixes numerous spelling errors. Patch submitted by alecdavis.
(closes issue #15595)
Reported by: alecdavis



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@209554 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-30 16:07:05 +00:00
Kevin P. Fleming 7c5f20e46b Cleanup T.38 negotiation changes.
Convert LOG_NOTICE messages about T.38 negotiation in debug level 1 messages,
clean up some looping logic, and correct an improper use of ast_free() for 
freeing an ast_frame.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@209279 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-27 21:43:36 +00:00
Kevin P. Fleming b6b3fed0c7 Make T.38 switchover in ReceiveFAX synchronous.
In receive mode, if the channel that ReceiveFAX is running on supports T.38,
we should *always* attempt to switch T.38, rather than listening for an incoming
CNG tone and only triggering on that. The channel may be using a low-bitrate
codec that distorts the CNG tone, the sending FAX endpoint may not send CNG
at all, or there could be a variety of other reasons that we don't detect it,
but in all those cases if T.38 is available we certainly want to use it.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@209256 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-27 21:21:43 +00:00
David Brooks d81d6d3415 Fixing typos. Replaces "recieved" with "received" and "initilize" with "initialize"
(closes issue #15571)
Reported by: alecdavis



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@209098 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-27 16:33:50 +00:00
Russell Bryant 0b2b01a1fa Merged revisions 208592 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r208592 | russell | 2009-07-24 13:38:24 -0500 (Fri, 24 Jul 2009) | 7 lines
  
  Do not log an ERROR if autoservice_stop() returns -1.
  
  This does not indicate an error.  A return of -1 just means that the channel
  has been hung up.
  
  (reported in #asterisk-dev)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@208593 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-24 18:42:32 +00:00
Kevin P. Fleming 0a6e06c7ff Rework of T.38 negotiation and UDPTL API to address interoperability problems
Over the past couple of months, a number of issues with Asterisk
negotiating (and successfully completing) T.38 sessions with various
endpoints have been found. This patch attempts to address many of
them, primarily focused around ensuring that the endpoints'
MaxDatagram size is honored, and in addition by ensuring that T.38
session parameter negotiation is performed correctly according to the
ITU T.38 Recommendation.

The major changes here are:

1) T.38 applications in Asterisk (app_fax) only generate/receive IFP
packets, they do not ever work with UDPTL packets. As a result of
this, they cannot be allowed to generate packets that would overflow
the other endpoints' MaxDatagram size after the UDPTL stack adds any
error correction information. With this patch, the application is told
the maximum *IFP* size it can generate, based on a calculation using
the far end MaxDatagram size and the active error correction mode on
the T.38 session. The same is true for sending *our* MaxDatagram size
to the remote endpoint; it is computed from the value that the
application says it can accept (for a single IFP packet) combined with
the active error correction mode.

2) All treatment of T.38 session parameters as 'capabilities' in
chan_sip has been removed; these parameters are not at all like
audio/video stream capabilities. There are strict rules to follow for
computing an answer to a T.38 offer, and chan_sip now follows those
rules, using the desired parameters from the application (or channel)
that wants to accept the T.38 negotiation.

3) chan_sip now stores and forwards ast_control_t38_parameters
structures for tracking 'our' and 'their' T.38 session parameters;
this greatly simplifies negotiation, especially for pass-through
calls.

4) Since T.38 negotiation without specifying parameters or receiving
the final negotiated parameters is not very worthwhile, the
AST_CONTROL_T38 control frame has been removed. A note has been added
to UPGRADE.txt about this removal, since any out-of-tree applications
that use it will no longer function properly until they are upgraded
to use AST_CONTROL_T38_PARAMETERS.

Review: https://reviewboard.asterisk.org/r/310/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@208464 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-23 21:57:24 +00:00
Jason Parker d009896670 Restore an int declaration on PPC platforms.
This x is one crafty little bugger...
It was used for 2 different things (one of which was only done on PPC) in 1.4.
One of the uses were removed in trunk, and with it went the declaration.

(closes issue #14038)
Reported by: ffloimair


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@208113 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-22 21:43:57 +00:00
Mark Michelson 33852cfaf6 Fix the crash in directed pickups. For real this time.
A shallow pointer copy was causing an ast_party_connected_line
structure to be freed multiple times, thus causing a crash.

(closes issue #15441)
Reported by: lmsteffan
Patches:
      15441.patch uploaded by mmichelson (license 60)
Tested by: lmsteffan	  



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@208017 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-22 14:35:01 +00:00
Mark Michelson d040266a17 Okay, that didn't fix the crash. It didn't really do anything useful.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@207551 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-20 23:08:56 +00:00
Mark Michelson b276189912 Initialize connected line instance when doing a directed pickup.
This helps to prevent a crash which may occur due to our freeing
garbage due to a struct being uninitialized.




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@207522 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-20 22:13:34 +00:00
Tilghman Lesher 98e4ab5716 Flag field in wrong position.
Reported by "Hoggins!" on asterisk-dev list.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@207317 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-18 04:16:44 +00:00
Tilghman Lesher b13740d1b1 Document all meetme realtime fields, and in the process, make some field lengths more consistent.
(closes issue #15493)
 Reported by: lasko
 Patches: 
       meetme.diff uploaded by lasko (license 833)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@206567 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-14 20:14:45 +00:00
Mark Michelson 5e51a6bb1e I AM A TERRIBLE PERSON
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@206490 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-14 17:03:58 +00:00
Mark Michelson b25242a819 Reset the sentringing indication when redirects occur.
If a redirecting control frame is processed or a call forward occurs,
we need to reset the sentringing flag so that we can send another ringing
indication to the phone that may contain a connected line update.

AST-164



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@206455 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-14 16:09:38 +00:00
Tilghman Lesher 76b48c5dae Remove reference to non-existent help file
(closes issue #15427)
 Reported by: brushtyler
 Patches: 
       app_voicemail.c.diff uploaded by brushtyler (license 821)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@206185 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-13 16:23:07 +00:00
Kevin P. Fleming 44af00a28f Eliminate extraneous LOG_DEBUG messages generated by app_fax.
The transmit_audio() and transmit_t38() functions in app_fax have processing
loops that are supposed to wait for frames to arrive on the channel and then
handle them, but they also have short timeouts so that the loops can have
watchdog timers and do other required processing. This commit changes the loops
to not actually call ast_read() and attempt to process the returned frame
unless a frame actually arrived, eliminating hundreds of LOG_DEBUG messages
and slightly improving performance.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@205780 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-10 16:00:44 +00:00
Kevin P. Fleming c75a129323 Fix some remaining T.38 negotiation problems in app_fax.
Revision 205696 did not quite fix all the issues with the T.38 negotiation
changes and app_fax; this patch corrects them, along with a couple of other
minor issues.

(closes issue #15480)
Reported by: dimas
Patches:
      test2-15480.patch uploaded by dimas (license 88)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@205770 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-10 15:28:11 +00:00
Kevin P. Fleming 67d1957e60 Repair ability of SendFAX/ReceiveFAX to respond to T.38 switchover.
Recent changes in T.38 negotiation in Asterisk caused these applications to
not respond when the other endpoint initiated a switchover to T.38; this
resulted in the T.38 switchover failing, and the FAX attempt to be made
using an audio connection, instead of T.38 (which would usually cause the
FAX to fail completely).

This patch corrects this problem, and the applications will now correctly
respond to the T.38 switchover request. In addition, the response will include
the appopriate T.38 session parameters based on what the other end offered
and what our end is capable of.

(closes issue #14849)
Reported by: afosorio


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@205696 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-09 21:20:23 +00:00
Mark Michelson fd52c5834e Merged revisions 205349 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r205349 | mmichelson | 2009-07-08 14:26:13 -0500 (Wed, 08 Jul 2009) | 14 lines
  
  Prevent phantom calls to queue members.
  
  If a caller were to hang up while a periodic announcement or position
  were being said, the return value for those functions would incorrectly
  indicate that the caller was still in the queue. With these changes,
  the problem does not occur.
  
  (closes issue #14631)
  Reported by: latinsud
  Patches:
        queue_announce_ghost_call2.diff uploaded by latinsud (license 745)
  	  (with small modification from me)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@205350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-08 19:26:55 +00:00
Sean Bright d2c67ee8e5 A bunch of CODING_GUIDELINES related fixes. Not even close to done.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@204622 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-01 16:06:18 +00:00
Sean Bright fa1f156dba Remove an unnecessary #ifdef
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@204561 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-30 20:39:39 +00:00
Tilghman Lesher 34d0143955 Recorded merge of revisions 204469 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r204469 | tilghman | 2009-06-30 13:23:35 -0500 (Tue, 30 Jun 2009) | 11 lines
  
  "tw" is the language specification for Twi (from Ghana) not Taiwanese.
  (closes issue #15346)
   Reported by: volivier
   Patches: 
         20090617__issue15346__1.4.diff.txt uploaded by tilghman (license 14)
         20090617__issue15346__trunk.diff.txt uploaded by tilghman (license 14)
         20090617__issue15346__1.6.0.diff.txt uploaded by tilghman (license 14)
         20090617__issue15346__1.6.1.diff.txt uploaded by tilghman (license 14)
         20090617__issue15346__1.6.2.diff.txt uploaded by tilghman (license 14)
   Tested by: volivier
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@204470 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-30 18:36:24 +00:00
Sean Bright 62d3f1dfd9 A few const changes in app_meetme.c that I noticed while browsing the source.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@204355 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-29 23:50:46 +00:00
Sean Bright 97f9b68cd7 Get app_rpt compiling again. I doubt seriously that it actually works.
Also, the code in this module is horrendous and we should remove it from the
tree.  I'm not sure who is supposed to be maintaning this thing, but they
clearly are not.  I don't see the sense of leaving it in the main tree.  If it
lives *anywhere* it should be in addons.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@204143 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-29 18:44:44 +00:00
Russell Bryant bb1fc3e12f Add 's' option to ChanSpy, which makes the app exit when no channels are left to spy on.
(closes issue #14594)
Reported by: JimDickenson
Patches:
      chanspy.diff uploaded by JimDickenson (license 710)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@203842 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-26 21:48:41 +00:00
David Brooks 9c6f164227 Fixing voicemail's error in checking max silence vs min message length
Max silence was represented in milliseconds, yet vmminsecs (minmessage) was represented
as seconds.

Also, the inequality was reversed. The warning, if triggered, was "Max silence should 
be less than minmessage or you may get empty messages", which should have been logged 
if max silence was greater than minmessage, but the check was for less than.

Also, conforming if statement to coding guidelines.

closes issue #15331)
Reported by: markd

Review: https://reviewboard.asterisk.org/r/293/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@203721 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-26 20:13:51 +00:00
Joshua Colp 59c1998d67 Improve T.38 negotiation by exchanging session parameters between application and channel.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@203699 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-26 19:27:24 +00:00
Russell Bryant 0264eef115 Merge the new Channel Event Logging (CEL) subsystem.
CEL is the new system for logging channel events.  This was inspired after
facing many problems trying to represent what is possible to happen to a call
in Asterisk using CDR records.  For more information on CEL, see the built in
HTML or PDF documentation generated from the files in doc/tex/.

Many thanks to Steve Murphy (murf) and Brian Degenhardt (bmd) for their hard
work developing this code.  Also, thanks to Matt Nicholson (mnicholson) and
Sean Bright (seanbright) for their assistance in the final push to get this
code ready for Asterisk trunk.

Review: https://reviewboard.asterisk.org/r/239/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@203638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-26 15:28:53 +00:00
Sean Bright 2fc4832e85 Fix version detection for API changes in spandsp.
(closes issue #15355)
Reported by: deuffy


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@202183 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-20 19:09:47 +00:00
Tilghman Lesher f341418988 One of the changes in 1.6.1 was to allow app_directory to use functionality
within app_voicemail for directory functions.  It is therefore no longer
necessary for app_directory to be linked against the ODBC libraries (and it
never was necessary for app_directory to be linked against IMAP, though it
was).


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@201783 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-18 20:52:36 +00:00
David Vossel dcfe69ec64 fixes some memory leaks and redundant conditions
(closes issue #15269)
Reported by: contactmayankjain
Patches:
      patch.txt uploaded by contactmayankjain (license 740)
      memory_leak_stuff.trunk.diff uploaded by dvossel (license 671)
Tested by: contactmayankjain, dvossel




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@201678 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-18 16:37:42 +00:00
Tilghman Lesher 7b37a60418 Initialize additional variables, to prevent a possible crash.
(closes issue #15186)
 Reported by: ajohnson
 Patches: 
       20090528__issue15186.diff.txt uploaded by tilghman (license 14)
 Tested by: ajohnson


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@201531 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-17 21:31:39 +00:00
David Vossel de8fae17d4 Merged revisions 201423 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r201423 | dvossel | 2009-06-17 14:28:12 -0500 (Wed, 17 Jun 2009) | 19 lines
  
  StopMixMonitor race condition (not giving up file immediately)
  
  StopMixMonitor only indicates to the MixMonitor thread to stop
  writing to the file.  It does not guarantee that the recording's
  file handle is available to the dialplan immediately after execution.
  This results in a race condition.  To resolve this, the filestream
  pointer is placed in a datastore on the channel. When StopMixMonitor
  is called, the datastore is retrieved from the channel and the
  filestream is closed immediately before returning to the dialplan.
  Documentation indicating the use of StopMixMonitor to free files
  has been updated as well.
  
  (closes issue #15259)
  Reported by: travisghansen
  Tested by: dvossel
  
  Review: https://reviewboard.asterisk.org/r/283/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@201445 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-17 19:45:35 +00:00
Kevin P. Fleming f1dc620467 Enable applications to enable/disable digit and tone detection.
Some applications (notably app_fax) do not need digit detection nor FAX tone
detection while they are running, and if Asterisk is using software DSPs to provide
the detection, this consumes extra CPU cycles that could be better spent on the
actual application. This patch allows applications to query and control the state
of digit and tone detection on a channel, and modifies app_fax to disable them
while the FAX operations are occurring (and re-enable digit detection afterwards).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@201139 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-16 21:10:15 +00:00
Kevin P. Fleming 4c0265664e Merged revisions 200991 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r200991 | kpfleming | 2009-06-16 12:05:38 -0500 (Tue, 16 Jun 2009) | 11 lines
  
  Improve support for media paths that can generate multiple frames at once.
  
  There are various media paths in Asterisk (codec translators and UDPTL, primarily)
  that can generate more than one frame to be generated when the application calling
  them expects only a single frame. This patch addresses a number of those cases,
  at least the primary ones to solve the known problems. In addition it removes the
  broken TRACE_FRAMES support, fixes a number of bugs in various frame-related API
  functions, and cleans up various code paths affected by these changes.
  
  https://reviewboard.asterisk.org/r/175/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@201056 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-16 18:54:30 +00:00
Michiel van Baak 4271603247 add FILE_STORAGE to Voicemail Build Options
Voicemail can only use one storage module at the moment.
Because it's unclear that selecting one of the storage modules
in menuselect will disable filesystem storage we now have
a FILE_STORAGE option that conflicts with the other modules.

(closes issue #15333)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@200943 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-16 15:51:36 +00:00
Kevin P. Fleming aaeec3b40f Last batch of 'static' qualifiers for module-level global variables.
Fix up modules in the 'apps' directory, and also correct the bad example of
enum definitions in include/asterisk/app.h, which many developers followed
(thanks for reading the documentation!). In addition, add some basic usage
examples of the 'pahole' and 'pglobal' tools to the coding guidelines.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@200656 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-15 19:10:10 +00:00
Kevin P. Fleming 6c5987811c Redesigned 'optional API' support.
This patch provides a new implementation of the optional API support defined
in asterisk/optional_api.h; this new version provides solves compatibility
issues with the use of linker version scripts for suppressing global symbols.
In addition, there is now a functional (and tested!) implementation for Mac OS/X,
so module writers no longer need to use special tests before calling optional
API functions. All future implementations must provide these same semantics,
so that module writers can rely on them.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@200519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-15 16:07:23 +00:00
Mark Michelson e1c03cbf1a Fix some bad locking stemming from trying to forward a call to a non-existent
extension from a queue.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@200326 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-12 15:37:30 +00:00
Mark Michelson d222361a29 Fix a potential crash from trying to access a NULL channel pointer.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@200290 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-12 14:55:07 +00:00
Eliel C. Sardanons 17fd9651fb Move OSP* applications static documentation to XML.
Move OSP* applications static documentation to the new AstXML form.

(closes issue #15245)
Reported by: eliel
Patches:
      app_osplookup_static_conversion.txt uploaded by lmadsen (license 10)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@199547 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-07 19:15:41 +00:00
Eliel C. Sardanons e18eae86c9 Move application ExternalIVR static documentation to XML.
Move application ExternalIVR static documentation to the new AstXML form.

(issue #15245)
Reported by: eliel
Patches:
      app_externalivr.diff uploaded by eliel (license 64)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@199514 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-07 17:29:44 +00:00
Russell Bryant 12ff77f975 Global var cleanup - constification and removing unused vars.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@199479 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-07 14:55:51 +00:00
Eliel C. Sardanons d03fbf2ec5 Move AGI command 'gosub' static documentation to XML.
Move AGI command 'gosub' statis documentation to the new AstXML form.

(issue #15245)
Reported by: eliel
Patches:
      app_stack_static_conversion.txt uploaded by lmadsen (license 10)
      (with minor changes by me)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@199446 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-06 23:28:38 +00:00
Eliel C. Sardanons d8e2ef0f30 Move function MEETME_INFO documentation to XML.
Move function MEETME_INFO static documentation to the new AstXML form.

(issue #15245)
Reported by: eliel
Patches:
      app_meetme_static_conversion.txt uploaded by lmadsen (license 10)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@199409 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-06 22:27:48 +00:00
Eliel C. Sardanons 7cced65370 Move function MINIVMACCOUNT and MINIVMCOUNTER static documentation to XML.
Move function MINIVMACCOUNT and MINIVMCOUNTER statis documentation to the new
AstXML form.

(issue #15245)
Reported by: eliel
Patches:
      app_minivm_static_conversion.txt uploaded by lmadsen (license 10)
      (with minor changes by me)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@199376 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-06 22:16:47 +00:00
Russell Bryant a05f90e709 minor tweak
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@199372 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-06 21:42:31 +00:00
Russell Bryant 338e22b866 Constify a string and strip trailing whitespace.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@199370 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-06 21:40:56 +00:00
David Vossel c42344b319 ast_call_forward() todo notes and originate flag copy.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198954 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-03 20:30:10 +00:00
Mark Michelson 298d745fb4 Add the ability to execute connected line interception macros.
When connected line updates are received or generated in the middle
of an application call, it is now possible to execute a macro to
manipulate the connected line data. This way, phone numbers may be
manipulated to be more presentable to users, names may be changed 
for...whatever reason, or whatever else needs to be done may be.

Review: https://reviewboard.asterisk.org/r/256

AST-165



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198727 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-01 20:57:31 +00:00
Mark Michelson 4c7c13d574 Remove extra lock from app_queue.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198530 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-01 14:45:43 +00:00
Sean Bright 9241877c10 Merged revisions 198251 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r198251 | seanbright | 2009-05-29 22:46:41 -0400 (Fri, 29 May 2009) | 8 lines
  
  Treat an empty FORWARD_CONTEXT the same way we treat a missing one.
  
  (closes issue #15056)
  Reported by: p_lindheimer
  Patches:
        05292009_bug15056.diff uploaded by seanbright (license 71)
  Tested by: p_lindheimer
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198285 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-30 03:26:06 +00:00
Leif Madsen 1d00714496 Update documentation in MixMonitor.
Updated the MixMonitor documentation for the 'b' option so that
it is more obvious that you must not optimize away the Local
channel when using this option.

(closes issue #14829)
Reported by: licedey
Tested by: mmichelson, licedey, lmadsen

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197828 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-28 22:04:00 +00:00
Tilghman Lesher 98ce0e5b6c Eliminate several needless checks and fix a few memory leaks
(closes issue #14833)
 Reported by: contactmayankjain
 Patches: 
       all_changes.patch uploaded by contactmayankjain (license 740)
       slightly modified by me


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197616 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-28 15:35:23 +00:00
Mark Michelson a7fd763ecc Merged revisions 197537 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r197537 | mmichelson | 2009-05-28 09:49:13 -0500 (Thu, 28 May 2009) | 21 lines
  
  Add flags to chanspy audiohook so that audio stays in sync.
  
  There are two flags being added to the chanspy audiohook here. One
  is the pre-existing AST_AUDIOHOOK_TRIGGER_SYNC flag. With this set,
  we ensure that the read and write slinfactories on the audiohook do
  not skew beyond a certain tolerance.
  
  In addition, there is a new audiohook flag added here,
  AST_AUDIOHOOK_SMALL_QUEUE. With this flag set, we do not allow for
  a slinfactory to build up a substantial amount of audio before 
  flushing it. For this particular issue, this means that the person 
  spying on the call will hear the conversations in real time with very 
  little delay in the audio.
  
  (closes issue #13745)
  Reported by: geoffs
  Patches:
        13745.patch uploaded by mmichelson (license 60)
  Tested by: snblitz
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197543 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-28 14:58:06 +00:00
Mark Michelson 83500e9b06 Remove some redundant or unnecessary connected line-related function calls.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196893 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-26 19:50:07 +00:00
Sean Bright 7ee6e9f4ce Add a missing unref for queues in handle_statechange.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196792 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-26 16:38:54 +00:00
Eliel C. Sardanons d6759e0117 Unregister every registered application by MiniVM.
The MinivmMWI application was not being unregistered on unload and we were not
able to load again the module or reload it.

(closes issue #15174)
Reported by: junky
Patches:
      unregister_minivm_mwi.diff uploaded by junky (license 177)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196377 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-22 19:38:33 +00:00
Eliel C. Sardanons 2c882626a0 Implement a new element in AstXML for AMI actions documentation.
A new xml element was created to manage the AMI actions documentation,
using AstXML.
To register a manager action using XML documentation it is now possible
using ast_manager_register_xml().
The CLI command 'manager show command' can be used to show the parsed
documentation.

Example manager xml documentation:
<manager name="ami action name" language="en_US">
    <synopsis>
        AMI action synopsis.
    </synopsis>
    <syntax>
        <xi:include xpointer="xpointer(...)" /> <-- for ActionID
        <parameter name="header1" required="true">
	    <para>Description</para>
	</parameter>
	...
    </syntax>
    <description>
        <para>AMI action description</para>
    </description>
    <see-also>
    	...
    </see-also>
</manager>



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196308 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-22 17:52:35 +00:00
Richard Mudgett 0510be3564 Fix constify the world compile problem.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196188 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-22 15:07:48 +00:00
Kevin P. Fleming e6b2e9a750 Const-ify the world (or at least a good part of it)
This patch adds 'const' tags to a number of Asterisk APIs where they are appropriate (where the API already demanded that the function argument not be modified, but the compiler was not informed of that fact). The list includes:

- CLI command handlers
- CLI command handler arguments
- AGI command handlers
- AGI command handler arguments
- Dialplan application handler arguments
- Speech engine API function arguments

In addition, various file-scope and function-scope constant arrays got 'const' and/or 'static' qualifiers where they were missing.

Review: https://reviewboard.asterisk.org/r/251/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-21 21:13:09 +00:00
Tilghman Lesher 873a46ded5 If a variable had a blank value upon the initial setting, then it would do nothing.
Identified by Dmitry Andrianov via private email, fixed by me.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195839 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-20 23:30:05 +00:00
Mark Michelson 8139c8ed4e Plug a memory leak in app_dial.
Since we may have copied connected line info into the chanlist struct prior
to placing an outbound call, we need to be sure to free the allocated data
when we hang the call up.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195763 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-20 20:14:28 +00:00
Joshua Colp 4da3a150f3 Merged revisions 195635 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r195635 | file | 2009-05-20 14:14:00 -0300 (Wed, 20 May 2009) | 5 lines
  
  Fix a bug where the MeetMe option 'D' did not actually prompt for the pin.
  
  (closes issue #15050)
  Reported by: pmhaddad
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195636 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-20 17:14:42 +00:00
Tilghman Lesher c1cb7b078e Merged revisions 195520 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r195520 | tilghman | 2009-05-19 15:12:20 -0500 (Tue, 19 May 2009) | 7 lines
  
  Ensure thread keys are initialized before attempting to access them.
  (closes issue #14889)
   Reported by: jaroth
   Patches: 
         app_voicemail.c.patch uploaded by msirota (license 758)
   Tested by: msirota, BlargMaN
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195521 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-19 20:16:01 +00:00
Tilghman Lesher bdcafc1ab4 Recorded merge of revisions 195366 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r195366 | tilghman | 2009-05-18 15:24:13 -0500 (Mon, 18 May 2009) | 8 lines
  
  Add a similar dependency on SMDI for voicemail as already exists for ADSI.
  (closes issue #14846)
   Reported by: pj
   Patches: 
         20090413__bug14846__1.4.diff.txt uploaded by tilghman (license 14)
         20090507__issue14846__1.6.0.diff.txt uploaded by tilghman (license 14)
         20090507__issue14846__1.6.1.diff.txt uploaded by tilghman (license 14)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195370 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-18 20:52:33 +00:00
Mark Michelson 1413e48fca Fix externalivr's setvariable command so that it properly sets multiple variables.
The command had a for loop that was guaranteed to only execute once since
the continuation operation of the loop would set the input buffer NULL. I rewrote
the loop so that its operation was more obvious, and it would set multiple variables
correctly.

I also reduced stack space required for the function, constified the input string,
and modified the function so that it would not modify the input string while I was
at it.

(closes issue #15114)
Reported by: chris-mac
Patches:
      15114.patch uploaded by mmichelson (license 60)
Tested by: chris-mac



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195316 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-18 18:58:26 +00:00
Eliel C. Sardanons d24179825f Warn about the use of the application WaitExten() within a Macro().
Update applications documentation to warn the user about the use of the
WaitExten() application within a Macro(). Recommend the use of Read()
instead.

(closes issue #14444)
Reported by: ewieling


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195162 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-18 14:45:23 +00:00
Joshua Colp 5ff58c1ff9 Fix a bug where the 'T' option to Meetme did not work.
(closes issue #15031)
Reported by: Stochastic
(closes issue #13801)
Reported by: justdave


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@194434 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-14 17:05:33 +00:00
Matthew Nicholson 69976640f5 Merged revisions 194028 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r194028 | mnicholson | 2009-05-12 17:15:45 -0500 (Tue, 12 May 2009) | 16 lines
  
  This change modifies app_queue to properly generate CDR records in failure
  situations.
  
  This involves setting a proper cdr disposition coresponding to the given
  failure condition and ensuring the proper information is stored in the cdr
  record.
  
  (closes issue #13691)
  Reported by: dferrer
  Tested by: mnicholson
  
  (closes issue #13637)
  Reported by: atis
  Tested by: atis
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@194057 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-12 22:32:13 +00:00
Tilghman Lesher 84a4d2484d Merged revisions 193955 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r193955 | tilghman | 2009-05-12 15:39:21 -0500 (Tue, 12 May 2009) | 6 lines
  
  Avoid initializing routines if the authentication fails.  Fixes a crash (RR) issue.
  (closes issue #14508)
   Reported by: tiziano
   Patches: 
         20090221_2_wrongmailbox.diff.txt uploaded by tiziano (license 377)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193956 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-12 20:40:22 +00:00
Tilghman Lesher 39ed871d95 Convert a THREADSTORAGE object into a simple malloc'd object (as suggested by Russell on -dev)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193870 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-12 17:29:33 +00:00
Kevin P. Fleming 1c988d8996 add 'const' qualifiers in various places where they should have been
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-12 13:59:35 +00:00
Tilghman Lesher 59e8829e36 Found and fixed a memory leak
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193757 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-11 23:04:14 +00:00
Tilghman Lesher 52541f5aeb Don't nullify an ast_str pointer.
(closes issue #15061)
 Reported by: alecdavis


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193678 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-11 19:32:13 +00:00
Mark Michelson 7a2a6a073f Reset the members' call counts when resetting queue statistics.
This helps to prevent odd scenarios where a queue will claim to have
taken 0 calls, but the members appear to have taken a non-zero amount.

(closes issue #15068)
Reported by: sum
Patches:
      patchreset.patch uploaded by sum (license 766)
Tested by: sum



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-08 19:50:44 +00:00
Richard Mudgett 7019ff68db Fixed crashes from issue8824 review board channel locking changes.
The local struct ast_party_connected_line connected_caller variable
was uninitialized when the copy function was called.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192590 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-05 20:54:07 +00:00
Joshua Colp 1ed5422fa9 Merged revisions 192429 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r192429 | file | 2009-05-05 14:43:30 -0300 (Tue, 05 May 2009) | 5 lines
  
  Fix a bug where the followme application would continue trying numbers after the caller hung up.
  
  (closes issue #13624)
  Reported by: sgenyuk
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192430 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-05 17:46:51 +00:00
Leif Madsen 17dad4e5b0 Commit documentation changes related to issue #14801.
(issue #14801)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192096 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-04 17:42:56 +00:00
Kevin P. Fleming a3af213506 Remove rarely-used event_log/LOG_EVENT support
In discussions today at the Europe Asterisk Developer Meet-Up, we determined that
the event_log was used in only 9 places in the entire tree, and really was not needed
at all. The users have been converted to use LOG_NOTICE, or the messages have been
removed since other messages were already in place that provided the same information.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191785 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-02 19:02:22 +00:00
TransNexus OSP Development 8612c7ac8a Made security features optional.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191418 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-01 09:50:11 +00:00
TransNexus OSP Development 38720ccd3b Added routing number support.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191332 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-30 09:11:23 +00:00
TransNexus OSP Development 236920485d Fixed not report source network ID and not export destination network ID issues.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191300 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-30 07:20:59 +00:00
Tilghman Lesher a866a75900 Merge str_substitution branch.
This branch adds additional methods to dialplan functions, whereby the result
buffers are now dynamic buffers, which can be expanded to the size of any
result.  No longer are variable substitutions limited to 4095 bytes of data.
In addition, the common case of needing buffers much smaller than that will
enable substitution to only take up the amount of memory actually needed.
The existing variable substitution routines are still available, but users
of those API calls should transition to using the dynamic-buffer APIs.
Reviewboard: http://reviewboard.digium.com/r/174/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191140 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-29 18:53:01 +00:00
Russell Bryant 1e016da893 Fix app_queue XML documentation.
I think it would behoove us to force "make validate-docs" to be run after the
XML documentation has been generated if dev-mode is enabled.

(closes issue #14989)
Reported by: tzafrir
Patches:
      app_queue_xml.diff uploaded by tzafrir (license 46)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-29 08:56:13 +00:00
TransNexus OSP Development 2e0f8bcbc8 Updated for OSP Toolkit 3.5.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190830 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-28 09:10:42 +00:00
Mark Michelson 1d941ad821 Allow for a position to be specified when entering a queue.
This would allow for one to add a caller to a specific place in the
queue instead of just placing the caller in the back every time. To help
facilitate some interesting manipulations, a new channel variable called
QUEUEPOSITION has been added. When a caller is removed from a queue, his
position in that queue is stored in the QUEUEPOSITION variable. One such
strategy an administrator can employ is to allow for the removal of a caller
from one queue followed by the insertion of the same caller into a separate
queue in the same position.

Review: http://reviewboard.digium.com/r/189



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190626 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-27 16:37:51 +00:00
Mark Michelson 09cde5a40c Update warning message to not have pipes and contain all options.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190622 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-27 16:26:14 +00:00
Russell Bryant cba19c8a67 Convert the ast_channel data structure over to the astobj2 framework.
There is a lot that could be said about this, but the patch is a big 
improvement for performance, stability, code maintainability, 
and ease of future code development.

The channel list is no longer an unsorted linked list.  The main container 
for channels is an astobj2 hash table.  All of the code related to searching 
for channels or iterating active channels has been rewritten.  Let n be 
the number of active channels.  Iterating the channel list has gone from 
O(n^2) to O(n).  Searching for a channel by name went from O(n) to O(1).  
Searching for a channel by extension is still O(n), but uses a new method 
for doing so, which is more efficient.

The ast_channel object is now a reference counted object.  The benefits 
here are plentiful.  Some benefits directly related to issues in the 
previous code include:

1) When threads other than the channel thread owning a channel wanted 
   access to a channel, it had to hold the lock on it to ensure that it didn't 
   go away.  This is no longer a requirement.  Holding a reference is 
   sufficient.

2) There are places that now require less dealing with channel locks.

3) There are places where channel locks are held for much shorter periods 
   of time.

4) There are places where dealing with more than one channel at a time becomes 
   _MUCH_ easier.  ChanSpy is a great example of this.  Writing code in the 
   future that deals with multiple channels will be much easier.

Some additional information regarding channel locking and reference count 
handling can be found in channel.h, where a new section has been added that 
discusses some of the rules associated with it.

Mark Michelson also assisted with the development of this patch.  He did the 
conversion of ChanSpy and introduced a new API, ast_autochan, which makes it 
much easier to deal with holding on to a channel pointer for an extended period 
of time and having it get automatically updated if the channel gets masqueraded.
Mark was also a huge help in the code review process.

Thanks to David Vossel for his assistance with this branch, as well.  David 
did the conversion of the DAHDIScan application by making it become a wrapper 
for ChanSpy internally.

The changes come from the svn/asterisk/team/russell/ast_channel_ao2 branch.

Review: http://reviewboard.digium.com/r/203/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-24 14:04:26 +00:00
Mark Michelson 8f81deab25 Fix reversed behavior of leavewhenempty option in queues.conf.
(closes issue #14650)
Reported by: alecdavis
Patches:
      14650.patch uploaded by mmichelson (license 60)
Tested by: mmichelson, lmadsen



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190250 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-23 17:45:35 +00:00
Joshua Colp ada8ae56e1 Fix a double free issue with the Pickup dialplan application.
As part of the pickup process the connected line information is updated.
Part of this process does a shallow copy of the target channel's connected line
information to a local structure. Once complete the structure contents are freed.
As a result any information in the target channel's connected line information
structure is no longer valid. This change will now set the contents back to a clean
state so that the freeing of the target channel's connected line information structure
when the channel is destroyed will no longer try to double free things.

(closes issue #14839)
Reported by: lmsteffan


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190217 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-23 16:55:48 +00:00
Terry Wilson 7164958d9d Merged revisions 189465 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r189465 | twilson | 2009-04-20 16:10:27 -0500 (Mon, 20 Apr 2009) | 2 lines
  
  Update CDR appropriately when AST_CAUSE_NO_ANSWER is set
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@189516 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-20 21:29:29 +00:00
Terry Wilson f505cb43bf Merged revisions 189463 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r189463 | twilson | 2009-04-20 16:00:52 -0500 (Mon, 20 Apr 2009) | 2 lines
  
  Don't treat a NOANSWER like a CHANUNAVAIL
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@189495 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-20 21:24:34 +00:00
Tilghman Lesher 0adb04fbbb Merged revisions 188773 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r188773 | tilghman | 2009-04-16 16:02:29 -0500 (Thu, 16 Apr 2009) | 4 lines
  
  Umask should not be exported into global namespace.
  (closes issue #14912)
   Reported by: jcapp
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@188774 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-16 21:03:31 +00:00
Mark Michelson fd833f14ed Make the cancellation of the dial timeout on a call forward optional.
This introduces the 'z' option to app_dial. With it set, a call forward
will cancel any timeout originally set for this instance of the Dial
application.

AST-207



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@188544 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-15 15:24:50 +00:00
Mark Michelson f26878feb2 Fix a couple of queue member reference leaks.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@188470 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-14 23:28:13 +00:00
Olle Johansson bb03eef676 Making sure we have references to external libraries.
Note: Update h.323 with the recent changes too


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@188283 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-14 14:20:10 +00:00
Mark Michelson b6a2f40793 Set all queue variables on both the caller and member channels.
This allows for the variables to be accessed if a member macro is run.
Thanks to Grigoriy Puzankin for bringing this up on the -dev list.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@188032 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-13 14:17:56 +00:00
Mark Michelson df28954a84 Make sure tc is unlocked before calling ast_call since calling a Local
channel could result in a deadlock.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@187770 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-10 17:32:25 +00:00
David Vossel bd23adbc8a Even more changes concerning r187426. Revised where locks are placed yet once again. ast_call() should not be called with a channel locked. could cause deadlock issues with local channels.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@187673 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-10 15:49:16 +00:00
Kevin P. Fleming 2f048030bd revert addition of LOG_SECURITY log channel; after further discussion, a much better solution will be used
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@187636 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-10 15:11:16 +00:00
David Vossel e6052e79d0 More changes concerning r187426. Revised where locks are placed.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@187556 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-09 20:40:34 +00:00
Jeff Peeler de4af72f9f Add ability for dialplan execution to continue when caller hangs up.
The F option to app_dial has been modified to accept no parameters and perform
the above functionality. I don't see anywhere else that is doing function
overloading, but this really is the best place for this operation because:

- It makes it close to the 'g' option in the argument list which provides
similar functionality.
- The existing code to support the current F option provides a very
convienient location to add this new feature.

(closes issue #12381)
Reported by: michael-fig



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@187491 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-09 19:10:02 +00:00
David Vossel 19f381b484 Fixes deadlock caused by calling get_cid_name with chan locked.
get_cid_name should not be called with a channel lock.  get_cid_name calls ast_get_hint which eventually calls pbx_find_extension.  pbx_find_extension starts and stops autoservice which should not be done with a channel lock, so get_cid_name should not be called with one.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@187426 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-09 17:39:10 +00:00
Tilghman Lesher 3a220874cc Merged revisions 187362 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r187362 | tilghman | 2009-04-09 11:38:37 -0500 (Thu, 09 Apr 2009) | 3 lines
  
  Permit zero-length text messages in SIP.
  (Related to an issue posted to the -users list, subject "AEL2, BASE64_DECODE and hexadecimal")
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@187363 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-09 16:39:43 +00:00
Kevin P. Fleming b5f8c632df add a dedicated log channel for modules to be able report security-related events, so that they can be fed into external processes for analysis and possible mitigation efforts
(inspired by this evening's Toronto Asterisk Users Group meeting and previous dicussions amongst various community members)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@187269 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-09 02:44:27 +00:00
Tilghman Lesher e36b632b4a Merged revisions 186775 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r186775 | tilghman | 2009-04-07 17:16:50 -0500 (Tue, 07 Apr 2009) | 3 lines
  
  Fix Macro documentation to match current (and intended) behavior.
  (See -dev mailing list)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@186799 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-07 22:23:46 +00:00
Mark Michelson 6f53ed4c67 This commit introduces COLP/CONP and Redirecting party information into Asterisk.
The channel drivers which have been most heavily tested with these enhancements are
chan_sip and chan_misdn. Further work is being done to add Q.SIG support and will be
introduced in a later commit. chan_skinny has code added to it here, but according
to user pj, the support on chan_skinny is not working as of now. This will be fixed in
a later commit.

A special thanks goes out to bugtracker user gareth for getting the ball rolling and
providing the initial support for this work. Without his initial work on this, this would
not have been nearly as painless as it was.

This functionality has been tested by Digium's product quality department, as well as a
customer site running thousands of calls every day. In addition, many many many many bugtracker
users have tested this, too.

(closes issue #8824)
Reported by: gareth

Review: http://reviewboard.digium.com/r/201



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@186525 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-03 22:41:46 +00:00
Tilghman Lesher a3c84f9575 Merged revisions 186445 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r186445 | tilghman | 2009-04-03 14:56:48 -0500 (Fri, 03 Apr 2009) | 2 lines
  
  Found a conflict in the last commit, due to multiple targets
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@186447 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-03 19:59:55 +00:00
Tilghman Lesher 06061491ba Merged revisions 186415 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r186415 | tilghman | 2009-04-03 14:06:58 -0500 (Fri, 03 Apr 2009) | 7 lines
  
  Distinguish in a sent email between simple sends and forwards.
  (closes issue #11678)
   Reported by: jamessan
   Patches: 
         20090330__bug11678.diff.txt uploaded by tilghman (license 14)
   Tested by: tilghman, lmadsen
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@186444 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-03 19:30:34 +00:00
Mark Michelson 5c53b2226d Fix the ability to retrieve voicemail messages from IMAP.
A recent change made interactive vm_states no longer get
added to the list of vm_states and instead get stored in
thread-local storage.

In trunk and all the 1.6.X branches, the problem is that
when we search for messages in a voicemail box, we would
attempt to update the appropriate vm_state struct by directly
searching in the list of vm_states instead of using the
get_vm_state_by_imap_user function. This meant we could not
find the interactive vm_state that we wanted.

(closes issue #14685)
Reported by: BlargMaN
Patches:
      14685.patch uploaded by mmichelson (license 60)
Tested by: BlargMaN, qualleyiv, mmichelson



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@186286 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-03 14:32:05 +00:00
Joshua Colp 63de834395 Merge in the RTP engine API.
This API provides a generic way for multiple RTP stacks to be
integrated into Asterisk. Right now there is only one present, res_rtp_asterisk,
which is the existing Asterisk RTP stack. Functionality wise this commit
performs the same as previously. API documentation can be viewed in the
rtp_engine.h header file.

Review: http://reviewboard.digium.com/r/209/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@186078 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-02 17:20:52 +00:00
Mark Michelson f43159ba31 Fix trunk's compilation.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@185604 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-31 22:12:52 +00:00
Mark Michelson 5c0d934e6b Merged revisions 185599 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r185599 | mmichelson | 2009-03-31 17:00:01 -0500 (Tue, 31 Mar 2009) | 6 lines
  
  Fix crash that would occur if an empty member was specified in queues.conf.
  
  (closes issue #14796)
  Reported by: pida
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@185600 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-31 22:02:48 +00:00
Mark Michelson de8a0946c8 Merged revisions 185468 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r185468 | mmichelson | 2009-03-31 14:45:30 -0500 (Tue, 31 Mar 2009) | 8 lines
  
  Fix Russian voicemail intro to say the word "messages" properly.
  
  (closes issue #14736)
  Reported by: chappell
  Patches:
        voicemail_no_messages.diff uploaded by chappell (license 8)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@185469 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-31 19:46:18 +00:00
Russell Bryant c9c8758d6d Don't free() an astobj2 object.
(closes issue #14672)
Reported by: makoto


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@185261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-31 14:53:45 +00:00
Mark Michelson c4e3bfb74c Merged revisions 185031 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r185031 | mmichelson | 2009-03-30 11:17:35 -0500 (Mon, 30 Mar 2009) | 39 lines
  
  Fix queue weight behavior so that calls in low-weight queues are not inappropriately blocked.
  
  (This is copied and pasted from the review request I made for this patch)
  
  Asterisk has some odd behavior when queue weights are used. The current logic used when
  potentially calling a queue member is:
  
  If the member we are going to call is part of another queue and _that other queue has any 
  callers in it_ and has a higher weight than the queue we are calling from, then don't try 
  to contact that member. The issue here is what I have marked with underscores. If the 
  higher-weighted queue has any callers in it at all, then the queue member will be unreachable 
  from the lower-weighted queue. This has the potential to be really really bad if using a 
  queue strategy, such as leastrecent or fewestcalls, with the potential to call the same 
  member repeatedly.
  
  The fix proposed by garychen on issue 13220 is very simple and, as far as I can see, works 
  well for this situation. With this set of changes, the logic used becomes:
  
  If the member we are going to call is part of another queue, the other queue has a higher 
  weight than the queue we are calling from, and the higher weight queue has at least as many 
  callers as available members, then do not try to contact the queue member. If the higher 
  weighted queue has fewer callers than available members, then there is no reason to deny 
  the call to this member since the other queue can afford to spare a member.
  
  Since the fix involved writing a generic function for determining the number of available 
  members in the queue, I also modified the is_our_turn function to make use of the new 
  num_available_members function to determine if it is our turn to try calling a member. There 
  is one small behavior change. Before writing this patch, if you had autofill disabled, then 
  if you were the head caller in a queue, you would automatically be told that it was your 
  turn to try calling a member. This did not take into account whether there were actually any 
  queue members available to take the call. Now we actually make sure there is at least one 
  member available to take the call if autofill is disabled.
  
  (closes issue #13220)
  Reported by: garychen
  
  Review: http://reviewboard.digium.com/r/202/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@185072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-30 16:26:48 +00:00
Russell Bryant 47c3799c99 Merged revisions 184842 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r184842 | russell | 2009-03-29 00:51:55 -0500 (Sun, 29 Mar 2009) | 5 lines

Ensure targs variable is fully initialized.

(closes issue #14758)
Reported by: tim_ringenbach

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184843 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-29 05:52:20 +00:00
Leif Madsen 383d4fa05b Fix a typo in app_ices.
(closes issue #14765)
Reported by: timeshell
Patches:
      app_ices.svn-1.6.0.diff uploaded by timeshell (license 399)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184801 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-27 20:08:44 +00:00
Russell Bryant f745326750 Use ast_random() instead of rand() to ensure we use the best RNG available.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184726 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-27 18:04:43 +00:00
Russell Bryant 2a4f9f7181 Change global_app_buf to ast_str_thread_global_buf.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184693 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-27 16:21:10 +00:00
David Vossel ba0ce88b1e Merged revisions 184388 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r184388 | dvossel | 2009-03-26 16:07:32 -0500 (Thu, 26 Mar 2009) | 8 lines
  
  pri loop TestClient/TestServer fails: server SEND DTMF 8
  
  app_test was failing when sending the last DTMF digit, 8, because of the 100ms pause issued after DTMF is sent.  During this pause the other side would hang up causing the test to look like it failed. Now the other side waits a second before hanging up.
  
  (closes issue #12442)
  Reported by: tzafrir
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184389 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-26 21:09:37 +00:00
Russell Bryant ee77b475f2 Improve performance of the ast_event cache functionality.
This code comes from svn/asterisk/team/russell/event_performance/.

Here is a summary of the changes that have been made, in order of both
invasiveness and performance impact, from smallest to largest.

1) Asterisk 1.6.1 introduces some additional logic to be able to handle
   distributed device state.  This functionality comes at a cost.
   One relatively minor change in this patch is that the extra processing
   required for distributed device state is now completely bypassed if
   it's not needed.

2) One of the things that I noticed when profiling this code was that a
   _lot_ of time was spent doing string comparisons.  I changed the way
   strings are represented in an event to include a hash value at the front.
   So, before doing a string comparison, we do an integer comparison on the
   hash.

3) Finally, the code that handles the event cache has been re-written.
   I tried to do this in a such a way that it had minimal impact on the API.
   I did have to change one API call, though - ast_event_queue_and_cache().
   However, the way it works now is nicer, IMO.  Each type of event that
   can be cached (MWI, device state) has its own hash table and rules for
   hashing and comparing objects.  This by far made the biggest impact on
   performance.

For additional details regarding this code and how it was tested, please see the
review request.

(closes issue #14738)
Reported by: russell

Review: http://reviewboard.digium.com/r/205/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184339 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-25 21:57:19 +00:00
Mark Michelson a7028f2bc6 Merged revisions 184078 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r184078 | mmichelson | 2009-03-24 17:34:45 -0500 (Tue, 24 Mar 2009) | 9 lines
  
  Change NULL pointer check to be ast_strlen_zero.
  
  The 'digit' variable is guaranteed to be non-NULL, so the if
  statement could never evaluate true. Changing to ast_strlen_zero
  makes the logic correct.
  
  This was found while reviewing ast_channel_ao2 code review.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184079 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-24 22:40:39 +00:00
David Vossel 9d3527bddf Merged revisions 183386 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r183386 | dvossel | 2009-03-19 14:40:07 -0500 (Thu, 19 Mar 2009) | 6 lines
  
  Cleaning up a few things in detect disconnect patch
  
  Initialized ast_call_feature in detect_disconnect to avoid accessing uninitialized memory.  Cleaned up /param tags in features.h.  No longer send dynamic features in ast_feature_detect. 
  
  issue #11583
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@183436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-19 20:30:39 +00:00
Mark Michelson b52d2dae2e Fix a memory leak associated with queues.
For every attempt that app_queue made to place an outbound call to a queue member,
we would allocate a queue_end_bridge structure. When the bridge for the call had
completed, we would free the structure. Unfortunately not all call attempts actually
end up bridged to a member, so we need to be more selective of when to allocate
the structure. With this change, the allocation occurs in an area where we can
guarantee that the call will be bridged.

(closes issue #14680)
Reported by: caspy
Patches:
      14680.patch uploaded by mmichelson (license 60)
Tested by: caspy



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@183244 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-19 18:10:34 +00:00
David Vossel 2764c2821f Merged revisions 183126 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r183126 | dvossel | 2009-03-19 11:15:16 -0500 (Thu, 19 Mar 2009) | 17 lines
  
  Allow disconnect feature before a call is bridged
  
  feature.conf has a disconnect option.  By default this option is set to '*', but it could be anything.  If a user wishes to disconnect a call before the other side answers, only '*' will work, regardless if the disconnect option is set to something else.  This is because features are unavailable until bridging takes place.  The default disconnect option, '*', was hardcoded in app_dial, which doesn't make any sense from a user perspective since they may expect it to be something different.  This patch allows features to be detected from outside of the bridge, but not operated on.  In this case, the disconnect feature can be detected before briding and handled outside of features.c.
  
  (closes issue #11583)
  Reported by: sobomax
  Patches:
  	patch-apps__app_dial.c uploaded by sobomax (license 359)
  	11583.latest-patch uploaded by murf (license 17)
  	detect_disconnect.diff uploaded by dvossel (license 671)
  Tested by: sobomax, dvossel
  Review: http://reviewboard.digium.com/r/195/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@183172 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-19 16:28:33 +00:00
Russell Bryant 0bdd99ad64 Merged revisions 182810 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r182810 | russell | 2009-03-17 21:09:13 -0500 (Tue, 17 Mar 2009) | 44 lines

Fix cases where the internal poll() was not being used when it needed to be.

We have seen a number of problems caused by poll() not working properly on 
Mac OSX.  If you search around, you'll find a number of references to using 
select() instead of poll() to work around these issues.  In Asterisk, we've 
had poll.c which implements poll() using select() internally.  However, we 
were still getting reports of problems.

vadim investigated a bit and realized that at least on his system, even 
though we were compiling in poll.o, the system poll() was still being used.  
So, the primary purpose of this patch is to ensure that we're using the 
internal poll() when we want it to be used.

The changes are:

1) Remove logic for when internal poll should be used from the Makefile.  
   Instead, put it in the configure script.  The logic in the configure 
   script is the same as it was in the Makefile.  Ideally, we would have 
   a functionality test for the problem, but that's not actually possible, 
   since we would have to be able to run an application on the _target_ 
   system to test poll() behavior.

2) Always include poll.o in the build, but it will be empty if AST_POLL_COMPAT
   is not defined.

3) Change uses of poll() throughout the source tree to ast_poll().  I feel 
   that it is good practice to give the API call a new name when we are 
   changing its behavior and not using the system version directly in all cases.
   So, normally, ast_poll() is just redefined to poll().  On systems where 
   AST_POLL_COMPAT is defined, ast_poll() is redefined to ast_internal_poll().

4) Change poll() in main/poll.c to be ast_internal_poll().

It's worth noting that any code that still uses poll() directly will work fine 
(if they worked fine before).  So, for example, out of tree modules that are 
using poll() will not stop working or anything.  However, for modules to work 
properly on Mac OSX, ast_poll() needs to be used.

(closes issue #13404)
Reported by: agalbraith
Tested by: russell, vadim

http://reviewboard.digium.com/r/198/

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@182847 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-18 02:28:55 +00:00
David Vossel e559cae4ec Option to send DTMF when receiving PROGRESS status
The D() option in app_dial is only able to send DTMF after the call has been answered.  A progress option has been added to D() to allow DTMF to be sent upon receiving PROGRESS.  This allows DTMF to be sent before the call is answered.

(closes issue #12123)
Reported by: VoipForces
Patches:
	app_dial.c_patch_trunk_valid uploaded by VoipForces (license 419)
	dtmf_progress.patch uploaded by dvossel (license 671)
Tested by: VoipForces, dvossel



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@182596 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-17 17:17:51 +00:00
Mark Michelson b4fcc4a098 Change faulty comparison used when announcing average hold minutes and seconds
(closes issue #14227)
Reported by: caspy



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@182121 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-13 21:26:20 +00:00
Mark Michelson a1a9006163 Run the macro on the queue member's channel when he answers, not the caller's channel.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@181846 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-12 21:43:51 +00:00
Joshua Colp 499ca8de65 Fix crash when sleep and retries argument was not given to RetryDial application.
(closes issue #14647)
Reported by: sherpya


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@181612 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-12 13:24:12 +00:00
Mark Michelson d7d817d687 Fix segfault when dialing a typo'd queue
If trying to dial a non-existent queue, there would
be a segfault when attempting to access q->weight, even
though q was NULL. This problem was introduced during
the queue-reset merge and thus only affects trunk.

(closes issue #14643)
Reported by: alecdavis



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@181244 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-11 14:28:40 +00:00
Joshua Colp 3a92673356 Don't play the "you are about to be placed into the conference" and "the leader has left the conference" sounds if the quiet
option is enabled. (reported by Vadim Lebedev on the asterisk-dev list)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@181210 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-11 13:44:42 +00:00
Mark Michelson 09df92d485 Merged revisions 180567 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r180567 | mmichelson | 2009-03-06 12:23:09 -0600 (Fri, 06 Mar 2009) | 2 lines
  
  Make compilation succeed in dev-mode when IMAP storage is enabled.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@180579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-06 18:25:44 +00:00
Mark Michelson 96405af1a8 Merged revisions 180464 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r180464 | mmichelson | 2009-03-05 17:26:11 -0600 (Thu, 05 Mar 2009) | 16 lines
  
  [IMAP] Fix message retrieval issues when identical mailbox names were defined in separate contexts.
  
  There was a fix put in a while back so that an X-Asterisk-VM-Context message header was
  added to stored IMAP voicemails. This would allow for us to differentiate if the same
  mailbox name was used in multiple contexts. The problem still left was that not all places
  where messages were retrieved actually attempted to use this header for information when
  retrieving messages. This commit fixes that so that MWI and message retrieval from VoiceMailMain
  work as expected.
  
  (closes issue #13853)
  Reported by: vicks1
  Patches:
        13853_v2.patch uploaded by mmichelson (license 60)
  Tested by: lmadsen
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@180465 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-05 23:26:58 +00:00
Mark Michelson e69803a2be Merged revisions 180380 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r180380 | mmichelson | 2009-03-05 12:58:48 -0600 (Thu, 05 Mar 2009) | 25 lines
  
  Fix broken mailbox parsing when searchcontexts option is enabled.
  
  When using the searchcontexts option in voicemail.conf, the code
  made the assumption that all mailbox names defined were unique across
  all contexts. However, the code did nothing to actually enforce this
  assumption, nor did it do anything to alert a user that he may have
  created an ambiguity in his voicemail.conf file by defining the same
  mailbox name in multiple contexts.
  
  With this change, we now will issue a nice long warning if searchcontexts
  is on and we encounter the same mailbox name in multiple contexts and ignore
  any duplicates after the first box. Whether searchcontexts is enabled or not,
  if we come across a duplicate mailbox in the same context, then we will issue
  a warning and ignore the duplicated mailbox. I have also added a small note
  to voicemail.conf.sample in the explanation for searchcontexts explaining
  that you cannot define the same mailbox in multiple contexts if you have
  enabled the option.
  
  (closes issue #14599)
  Reported by: lmadsen
  Patches:
        14599.patch uploaded by mmichelson (license 60) (with slight modification)
  Tested by: lmadsen
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@180383 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-05 19:14:14 +00:00
Joshua Colp 4c9ab0df8c Merge phase 1 support for the new bridging architecture.
This commit brings in the bridging core, bridging technologies,
and the ConfBridge application.

For usage information on the ConfBridge application please see
the output of "core show application ConfBridge" from the CLI.

For API documentation please see the doxygen page describing the
architecture and the documentation for each API call.

Review: http://reviewboard.digium.com/r/93/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@180369 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-05 18:18:27 +00:00
Joshua Colp 15090ba1df Remove duplicate 'k' and 'K' Dial options.
(closes issue #14601)
Reported by: alecdavis
Patches:
      app_dial.optionk.diff.txt uploaded by alecdavis (license 585)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@180120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-04 14:39:28 +00:00
David Vossel 979eb709ae app_read does not break from prompt loop with user terminated empty string
In app.c, ast_app_getdata is called to stream the prompts and receive DTMF input.  If ast_app_getdata() receives an empty string caused by the user inputing the end of string character, in this case '#', it should break from the prompt loop and return to app_read, but instead it cycles through all the prompts.  I've added a return value for this special case in ast_readstring() which uses an enum I've delcared in apps.h.  This enum is now used as a return value for ast_app_getdata().

(closes issue #14279)
Reported by: Marquis
Patches:
	fix_app_read.patch uploaded by Marquis (license 32)
	read-ampersanmd.patch2 uploaded by dvossel (license 671)
Tested by: Marquis, dvossel
Review: http://reviewboard.digium.com/r/177/




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@180032 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-03 23:21:18 +00:00
Mark Michelson 8970f8caaa Merged revisions 180006 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r180006 | mmichelson | 2009-03-03 16:48:18 -0600 (Tue, 03 Mar 2009) | 17 lines
  
  Clarify some documentation of queues.conf.sample
  
  It had always been possible to explicitly specify a "blank"
  value for a sound file in queues.conf and have no sound played
  back. The problem with this is that it would result in some ugly
  CLI warnings from file.c.
  
  This commit introduces a check when playing a file in app_queue
  to see if the name of the file is zero-length and return early if
  that is the case. Also, the ability to specify the blank sound
  files in queues.conf is now mentioned more clearly in queues.conf.sample
  
  (closes issue #14227)
  Reported by: caspy
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@180007 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-03 22:49:07 +00:00
David Vossel ae786501f1 app_meetme not setting filename and fileformat correctly for realtime
When app_meetme finds a realtime conference, it doesn't get the filename and fileformat correctly when 'r' is set.  Now app_meetme first checks to see if fileformat and filename are declared in the db, if they're not it checks the .conf file, if its not declared there either it then uses defaults. 

(closes issue #14545)
Reported by: dalbaech
Patches:
	app_meetme-realtime5.patch uploaded by dvossel (license 671)
	Realtime_Conference_Record_workaround.txt uploaded by dalbaech (license 705)
Tested by: dvossel, dalbaech
Review: http://reviewboard.digium.com/r/180/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@179972 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-03 22:01:24 +00:00
Brian Degenhardt a7092f0acc fix a leaked channel lock (and future deadlock) when we try to pick up our own channel
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@179903 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-03 20:02:20 +00:00
Russell Bryant 8f6a933e30 Merged revisions 179532 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r179532 | russell | 2009-03-02 17:34:13 -0600 (Mon, 02 Mar 2009) | 40 lines

Move ast_waitfor() down to avoid the results of the API call becoming stale.

This call to ast_waitfor() was being done way too soon in this section of code.
Specifically, there was code in between the call to waitfor and the code that
uses the result that puts the channel in autoservice.  By putting the channel
in autoservice, the previous results of ast_waitfor() become meaningless,
as the autoservice thread will do it's own ast_waitfor() and ast_read()
on the channel.

So, when we came back out of autoservice and eventually hit the block of code
that calls ast_read() on the channel, there may not actually be any input on
the channel available.  Even though the previous call to ast_waitfor() in
app_meetme said there was input, the autoservice thread has since serviced
the channel for some period of time.

This bug manifested itself while dvossel was doing some testing of MeetMe in
Asterisk trunk.  He was using the timerfd timing module.  When the code hit
ast_read() erroneously, it determined that it must have been called because of
input on the timer fd, as chan->fdno was set to AST_TIMING_FD, since that was 
the cause of the last legitimate call to ast_read() done by autoservice.  

In this test, an IAX2 channel was calling into the MeetMe conference.  It was
_much_ more likely to be seen with an IAX2 channel because of the way audio
is handled.  Every audio frame that comes in results in a call to
ast_queue_frame(), which then uses ast_timer_enable_continuous() to notify
the channel thread that a frame is waiting to be handled.  So, the chances
of ast_waitfor() indicating that a channel needs servicing due to a timer
event on an IAX2 event is very high.

Finally, it is interesting to note that if a different timing interface was
being used, this bug would probably not be noticed.  When ast_read() is called
and erroneously thinks that there is a timer event to handle, it calls the
ast_timer_ack() function.  The pthread and dahdi timing modules handle the
ack() function being called when there is no event by simply ignoring it.
In the case of the timerfd module, it results in a read() on the timer fd
that will block forever, as there is no data to read.  This caused Asterisk
to lock up very quickly.

Thanks to dvossel and mmichelson for the fun debugging session.  :-)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@179533 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-02 23:36:38 +00:00
Mark Michelson 932cef55fd Swap reversed timevals.
This was pointed out by ScribbleJ in #asterisk-dev. Thanks very much, ScribbleJ!



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@179254 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-01 23:25:23 +00:00
Steve Murphy 22ea970494 These small fixes prevent compiler warnings with ubuntu 8.10's gcc-4.3.2, which tend to break my dev-mode build. Not a problem in 1.6.x.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@178870 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-26 17:45:22 +00:00
Tilghman Lesher 345a6fd1cb Permit emailsubject and emailbody to be set per mailbox.
(closes issue #14372)
 Reported by: fhackenberger
 Patches: 
       voicemail_individual_subject_and_body_1.6.1 uploaded by fhackenberger (license 592)
       with additional fixes by Corydon76 (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@178107 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-23 21:02:18 +00:00
Dwayne M. Hubbard 83bbf83f49 Make app_fax compatible with spandsp-0.0.6pre4
Prior to spandsp-0.0.6pre4 the t30_stats_t structure used a pages_transferred
integer to indicate the number of pages transferred (so far) during the fax
session.  The spandsp-0.0.6pre4 release removed the pages_transferred integer
and replaced it with two different integers - pages_tx and pages_rx.  This
revision uses the new integers for spandsp-0.0.6pre4 while maintaining backwards
compatibility for previous spandsp releases.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@177699 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-20 20:29:00 +00:00
Tilghman Lesher 3af1c558df Allow semicolons to be escaped, when passing arguments to the System command.
(closes issue #14231)
 Reported by: jcovert
 Patches: 
       20090113__bug14231__2.diff.txt uploaded by Corydon76 (license 14)
       corrected_20090113__bug14231__2.diff.txt uploaded by jcovert (license 551)
 Tested by: jcovert


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@177664 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-20 17:29:51 +00:00
Tilghman Lesher fefa97001a Oops, merge broke trunk
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@177661 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-20 17:22:19 +00:00
Tilghman Lesher 306f229d64 Merged revisions 177536 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r177536 | tilghman | 2009-02-19 16:26:01 -0600 (Thu, 19 Feb 2009) | 7 lines
  
  Fix up potential crashes, by reducing the sharing between interactive and non-interactive threads.
  (closes issue #14253)
   Reported by: Skavin
   Patches: 
         20090219__bug14253.diff.txt uploaded by Corydon76 (license 14)
   Tested by: Skavin
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@177537 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-19 22:33:00 +00:00
Joshua Colp 2e2494591e Merged revisions 177383 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r177383 | file | 2009-02-19 12:37:25 -0400 (Thu, 19 Feb 2009) | 3 lines
  
  If we are able to create a speech structure unset the ERROR variable in case it was previously set.
  (issue #LUMENVOX-13)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@177384 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-19 16:38:41 +00:00
Russell Bryant 8065dc57af Re-add 'o' option to MeetMe, reverting rev 62297.
Enabling this option by default proved to be a bad idea, as the talker detection
is not very reliable.  So, make it optional again, and off by default.

(issue #13801)
Reported by: justdave


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@177101 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-18 19:12:49 +00:00
Russell Bryant d13cdd43a4 Remove a dependency that no longer exists.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176771 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-17 22:52:43 +00:00
Russell Bryant 4ec301360c Merge a large set of updates to the Asterisk indications API.
This patch includes a number of changes to the indications API.  The primary
motivation for this work was to improve stability.  The object management
in this API was significantly flawed, and a number of trivial situations could
cause crashes.

The changes included are:

1) Remove the module res_indications.  This included the critical functionality
   that actually loaded the indications configuration.  I have seen many people
   have Asterisk problems because they accidentally did not have an
   indications.conf present and loaded.  Now, this code is in the core,
   and Asterisk will fail to start without indications configuration.

   There was one part of res_indications, the dialplan applications, which did
   belong in a module, and have been moved to a new module, app_playtones.

2) Object management has been significantly changed.  Tone zones are now
   managed using astobj2, and it is no longer possible to crash Asterisk by
   issuing a reload that destroys tone zones while they are in use.

3) The API documentation has been filled out.

4) The API has been updated to follow our naming conventions.

5) Various bits of code throughout the tree have been updated to account
   for the API update.

6) Configuration parsing has been mostly re-written.

7) "Code cleanup"

The code is from svn/asterisk/team/russell/indications/.

Review: http://reviewboard.digium.com/r/149/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176627 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-17 20:41:24 +00:00
Russell Bryant 184872fdfd Fix a race condition that caused device states to become incorrect for hints.
The problem here is that the hint processing code was subscribed to the wrong
event type.  So, it started processing state for a hint too soon, before the
device state cache had been updated.

Also, fix a similar bug in app_queue, as it was also subscribed to the wrong
event type.

(closes issue #14461)
Reported by: alecdavis


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-17 17:33:38 +00:00
Mark Michelson 20c5bad34b Merged revisions 176249,176252 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r176249 | mmichelson | 2009-02-16 15:34:27 -0600 (Mon, 16 Feb 2009) | 14 lines
  
  Open the DAHDI pseudo device and set it to be nonblocking atomically
  
  Apparently on FreeBSD, attempting to set the O_NONBLOCKING flag separately
  from opening the file was causing an "inappropriate ioctl for device" error.
  While I cannot fathom why this would be happening, I certainly am not opposed
  to making the code a bit more compact/efficient if it also fixes a bug.
  
  (closes issue #14482)
  Reported by: ys
  Patches:
        meetme.patch uploaded by ys (license 281)
  Tested by: ys
........
  r176252 | mmichelson | 2009-02-16 15:39:21 -0600 (Mon, 16 Feb 2009) | 3 lines
  
  Remove unused variable and make dev-mode compilation happy
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176253 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-16 21:40:40 +00:00
Mark Michelson 3c9667ae12 Merge queue-reset branch to Asterisk
From a user point-of-view, this adds new CLI commands and Manager Actions to
better facilitate the reloading of queues and the resetting of their statistics.

The new CLI commands are the "queue reload" and "queue reset stats" commands.

The new manager actions are the QueueReload and QueueReset commands.

Review: http://reviewboard.digium.com/r/115



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175663 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-13 20:57:37 +00:00
Mark Michelson b5bde28d9f Add manager events for chanspy starting or stopping
(closes issue #14469)
Reported by: caio1982
Patches:
      chanspy_events2.diff uploaded by caio1982 (license 22)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-13 20:35:26 +00:00
Mark Michelson 10281bf183 Merged revisions 175590 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r175590 | mmichelson | 2009-02-13 13:47:48 -0600 (Fri, 13 Feb 2009) | 16 lines
  
  Fix a potential crash situation when using IMAP voicemail
  
  If calling into VoiceMailMain when using IMAP storage, it was
  possible to crash Asterisk by hanging up the phone when prompted
  for a voicemail mailbox. This patch fixes the issue.
  
  While it may appear that this patch is superficial, it allows code
  execution to continue to the failure case just below the IMAP_STORAGE
  code block where this patch has been applied
  
  (closes issue #14473)
  Reported by: dwpaul
  Patches:
        voicemail_imap_crash_no_mailbox.patch uploaded by dwpaul (license 689)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175591 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-13 19:49:38 +00:00
Joshua Colp 0cfdaa2dc0 Add an option to keep the recorded file upon hangup.
(closes issue #14341)
Reported by: fnordian


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@175549 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-13 16:41:15 +00:00
Mark Michelson 0d5da5f436 Fix a bit of odd logic for announcing position. Sync with 1.6.0's logic
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@174951 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-11 23:12:57 +00:00
Mark Michelson 34161542e9 Fix odd "thank you" sound playing behavior in app_queue.c
If someone has configured the queue to play an position or holdtime
announcement, then it is odd and potentially unexpected to hear a 
"Thank you for your patience" sound when no position or holdtime
was actually announced.

This fixes the announcement so that the "thanks" sound is only played
in the case that a position or holdtime was actually announced.

There is a way that the "thank you" sound can be played without a
position or holdtime, and that is to set announce-frequency to a value
but keep announce-position and announce-holdtime both turned off.

(closes issue #14227)
Reported by: caspy
Patches:
      14227_v3.patch uploaded by putnopvut (license 60)
Tested by: caspy


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@174948 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-11 23:03:08 +00:00
Mark Michelson 47ebea6a8d Fix 'd' option for app_dial and add new option to Answer application
The 'd' option would not work for channel types which use RTP to transport
DTMF digits. The only way to allow for this to work was to answer the channel
if we saw that this option was enabled.

I realized that this may cause issues with CDRs, specifically with giving false
dispositions and answer times. I therefore modified ast_answer to take another
parameter which would tell if the CDR should be marked answered.

I also extended this to the Answer application so that the channel may be answered
but not CDRified if desired.

I also modified app_dictate and app_waitforsilence to only answer the channel if it
is not already up, to help not allow for faulty CDR answer times.

All of these changes are going into Asterisk trunk. For 1.6.0 and 1.6.1, however, all
the changes except for the change to the Answer application will go in since we do
not introduce new features into stable branches

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

Review: http://reviewboard.digium.com/r/145



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@174945 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-11 22:41:01 +00:00
Mark Michelson c9670b24a4 Fix potential for stack overflows in app_chanspy.c
When using the 'g' or 'e' options, the stack allocations that
were used could cause a stack overflow if a spyer stayed on the
line long enough without actually successfully spying on anyone.

The problem has been corrected by using static buffers and copying
the contents of the appropriate strings into them instead of using
functions like alloca or ast_strdupa



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@174805 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-10 23:17:03 +00:00
Tilghman Lesher d4df1c6a78 Fix0ring build
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@174503 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-10 07:06:29 +00:00
Tilghman Lesher 51c80f5b40 Remove the usage of the KeepAlive app, as it no longer exists.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@174470 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-10 05:39:33 +00:00
Steve Murphy 3084e9ce93 This patch removes the use of AST_PBX_KEEPALIVE
from app_rpt.c.


(closes issue #14435)
Reported by: D_McNaul



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@174435 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-10 04:49:02 +00:00
Steve Murphy 43462557c0 More intptr_t work.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@174432 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-10 04:36:22 +00:00
Steve Murphy dbe56b6647 Merged revisions 174369 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r174369 | murf | 2009-02-09 19:27:40 -0700 (Mon, 09 Feb 2009) | 5 lines
  
  This patch solves some compiler complaints
  in both 32 and 64-bit environments.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@174370 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-10 02:45:56 +00:00
David Vossel 829b14fc3e Fixes issue with hangups not being sent and external process never terminating.
The ignore_hangup, run_dead, and noanswer flags were never initilized to zero causing hangups to never be issued.  If the external script expects to be notified of a hangup and never receives one, it runs indefinitely. 

(closes issue #14251)
Reported by: chris-mac
Tested by: dvossel



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@174325 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-09 17:26:02 +00:00
Joshua Colp b2484d7db9 Always detach and destroy the whisper and barge audiohooks. Additionally also allow an audiohook to be detached if it has not been attached.
(closes issue #14414)
Reported by: bluecrow76


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@173902 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-06 15:59:17 +00:00
Mark Michelson 8f9c8f8b40 Properly set "seen" and "unseen" flags when moving messages from the new to the old folder when using IMAP for voicemail storage
(closes issue #13905)
Reported by: jaroth
Patches:
      foldermove_v2.patch uploaded by jaroth (license 50)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@173773 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-05 23:28:19 +00:00
Jeff Peeler 4ac807845d Merged revisions 173696 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r173696 | jpeeler | 2009-02-05 14:47:51 -0600 (Thu, 05 Feb 2009) | 12 lines
  
  Add new configuration option to make shared IMAP mailboxes function as expected.
  
  The new option is "imapvmshareid" which is an ID to tag multiple mailboxes
  using the same IMAP storage location to function as one mailbox. This allows
  all messages to be retrieved for any user in the group. The patch alters the
  'X-Asterisk-VM-Extension' header that is responsible for matching voicemails
  for a given user.
  
  (closes issue #13673)
  Reported by: howardwilkinson
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@173697 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-05 21:00:26 +00:00
Mark Michelson 2e1d9f9a21 Merged revisions 173692 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r173692 | mmichelson | 2009-02-05 14:29:09 -0600 (Thu, 05 Feb 2009) | 12 lines

Fix situations where queue members could be autopaused unexpectedly

Specifically, this patch prevents us from autopausing members when
we receive a busy or congestion frame from them.

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


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@173693 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-05 20:30:45 +00:00
Mark Michelson 5d3fc1ee3a Merged revisions 173592 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r173592 | mmichelson | 2009-02-05 12:47:24 -0600 (Thu, 05 Feb 2009) | 3 lines

Add some missing cleanup to app_mixmonitor


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@173593 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-05 18:48:55 +00:00
Mark Michelson 5f83636af4 Merged revisions 173559 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r173559 | mmichelson | 2009-02-05 11:34:33 -0600 (Thu, 05 Feb 2009) | 25 lines

Fix a problem where a channel pointer becomes invalid due to masquerading or hanging up.

app_mixmonitor runs its own thread to monitor the channel's activity and write the mixed
audio to a file. Since this thread runs independently of the channel, it is possible that
the mixmonitor thread's channel pointer will point to freed memory when the channel either
is masqueraded or hangs up (technically, both cases are hangups, but we need to handle the
cases slightly differently).

The solution for this is to employ a datastore, which has the nice benefit of allowing us 
to hook into channel masquerades and hangups and update our pointer as necessary. If this
looks familiar, this same technique is employed in app_chanspy. app_chanspy is a bit more
involved since it does a lot more operations on the channel that is being spied upon.

app_mixmonitor does have an extra touch that app_chanspy doesn't have, though. Since there
is a thread race between the channel's thread and the mixmonitor thread on a hangup, we em-
ploy a condition-and-boolean combination to ensure that the channel thread finishes with
our structure before the mixmonitor thread attempts to free it. No crashes!

(closes issue #14374)
Reported by: aragon
Patches:
	  14374.patch uploaded by putnopvut (license 60)
Tested by: aragon, putnopvut


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@173589 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-05 18:34:06 +00:00
Mark Michelson 172777bd02 Fix some areas where the incorrect interface was passed to ast_device_state
I swear it feels like I already did this once...

(closes issue #14359)
Reported by: francesco_r


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@173507 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-04 22:16:19 +00:00
Mark Michelson e04e940a71 Merged revisions 173396 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r173396 | mmichelson | 2009-02-04 11:44:48 -0600 (Wed, 04 Feb 2009) | 3 lines

Revert my previous change because it was stupid


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@173397 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-04 17:45:14 +00:00
Mark Michelson 668f9f4e31 Merged revisions 173392 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r173392 | mmichelson | 2009-02-04 11:40:29 -0600 (Wed, 04 Feb 2009) | 3 lines

Add a missing unlock. Extremely unlikely to ever matter, but it's needed.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@173393 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-04 17:41:02 +00:00
Tilghman Lesher e179e613f7 1. Make OS X compile cleanly with app_stack.
2. Use curl to download sound files, as curl is installed natively on OS X,
whereas wget and fetch are not.
(closes issue #14332)
 Reported by: oej
 Tested by: Corydon76


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@173130 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-03 00:29:49 +00:00
Steve Murphy 53d9b77898 This reverts the changes I made for 11583; will
reviewboard this before committing again...
reopened 11583 until all Russell's issues are
resolved.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@172929 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-02 19:02:24 +00:00
Steve Murphy c61e8a7865 This change allows the disconnect feature (as in "one-touch" in features.c)
to be used within the dial app, before a call is bridged.

Many thanks to sobomax for submitting this patch. 

Quoting from bug 11582:

  "So the goal of the patch was to use the user configured feature code during the 
   call setup phase. The original ast_feature_interpret() function is not well suited 
   for this purpose as it uses much call bridge specific data and doesn't separate a 
   detection of feature from a feature handler call. So a new function ast_feature_detect() 
   has been extracted off the ast_feature_interpret() function but keeping the original 
   logic intact except some insignificant changes to locking.

  "Having created the ast_feature_detect() function the possibility to use feature detection 
   in almost any place of the asterisk code. So a call to this function has been added to 
   wait_for_answer() function of app_dial.so module. This code doesn't call the feature handler 
   however and uses old call leg disconnect logic to make the changes as small and simple as 
   possible to prevent unexpected problems. A disconnect feature currently is the only one 
   supported during call setup as other features as call parking and call transfer don't make much 
   sense during call setup. However if need in some of the features would arise it is much easier to 
   implement as the infrastructure changes are already in place with this patch."

I have cleaned up the patch somewhat, and verified that the existing functionality is not
harmed, and that the new functionality works. Terry has committed his stuff, and there were
no conflicts (see 14274).

(closes issue #11583)
Reported by: sobomax
Patches:
      patch-apps__app_dial.c uploaded by sobomax (license 359)
      patch-include__asterisk__features.h uploaded by sobomax (license 359)
      patch-res__res_features.c uploaded by sobomax (license 359)
      enable-features-during-call-setup.diff uploaded by sobomax (license 359)
      11583.newdiff uploaded by murf (license 17)
      enable-features-during-call-setup-1.diff uploaded by sobomax (license 359)
      11583.latest-patch uploaded by murf (license 17)
Tested by: sobomax, murf




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@172890 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-02 17:37:15 +00:00
Tilghman Lesher 317e4e7313 Blank argument crashes Asterisk
(closes issue #14377)
 Reported by: amorsen


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@172741 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-01 02:44:23 +00:00
Terry Wilson 8d782f96b8 Merged revisions 172517 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r172517 | twilson | 2009-01-30 11:47:41 -0600 (Fri, 30 Jan 2009) | 37 lines
  
  Fix feature inheritance with builtin features
  
  When using builtin features like parking and transfers, the AST_FEATURE_* flags
  would not be set correctly for all instances when either performing a builtin
  attended transfer, or parking a call and getting the timeout callback.  Also,
  there was no way on a per-call basis to specify what features someone should
  have on picking up a parked call (since that doesn't involve the Dial() command).
  There was a global option for setting whether or not all users who pickup a
  parked call should have AST_FEATURE_REDIRECT set, but nothing for DISCONNECT,
  AUTOMON, or PARKCALL.
  
  This patch:
  1) adds the BRIDGE_FEATURES dialplan variable which can be set either in the
  dialplan or with setvar in channels that support it.  This variable can be set
  to any combination of 't', 'k', 'w', and 'h' (case insensitive matching of the
  equivalent dial options), to set what features should be activated on this
  channel.  The patch moves the setting of the features datastores into the
  bridging code instead of app_dial to help facilitate this.
  
  2) adds global options parkedcallparking, parkedcallhangup, and
  parkedcallrecording to be similar to the parkedcalltransfers option for
  globally setting features.
  
  3) has builtin_atxfer call builtin_parkcall if being transfered to the parking
  extension since tracking everything through multiple masquerades, etc. is
  difficult and error-prone
  
  4) attempts to fix all cases of return calls from parking and completed builtin
  transfers not having the correct permissions
  (closes issue #14274)
  Reported by: aragon
  Patches: 
        fix_feature_inheritence.diff.txt uploaded by otherwiseguy (license 396)
  Tested by: aragon, otherwiseguy
  
  Review http://reviewboard.digium.com/r/138/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@172580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-30 21:29:12 +00:00
Tilghman Lesher 80f91f6ab7 Merged revisions 172438 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r172438 | tilghman | 2009-01-29 16:54:29 -0600 (Thu, 29 Jan 2009) | 9 lines
  
  Lose the CAP_NET_ADMIN at every fork, instead of at startup.  Otherwise, if
  Asterisk runs as a non-root user and the administrator does a 'restart now',
  Asterisk loses the ability to set QOS on packets.
  (closes issue #14004)
   Reported by: nemo
   Patches: 
         20090105__bug14004.diff.txt uploaded by Corydon76 (license 14)
   Tested by: Corydon76
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@172441 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-29 23:15:40 +00:00
Olle Johansson 7ecda45482 Fix "cancel answered elsewhere" through app_queue with members in chan_local.
Also, implement a private cause code (as suggested by Tilghman). This works with
chan_sip, but doesn't propagate through chan_local.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@172318 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-29 17:08:22 +00:00
Steve Murphy 268ac221a2 Merged revisions 172030 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r172030 | murf | 2009-01-28 11:51:16 -0700 (Wed, 28 Jan 2009) | 46 lines
  
  This patch fixes h-exten running misbehavior in manager-redirected 
  situations.
  
  What it does:
  1. A new Flag value is defined in include/asterisk/channel.h,
   AST_FLAG_BRIDGE_HANGUP_DONT, which used as a messenge to the
   bridge hangup exten code not to run the h-exten there (nor
   publish the bridge cdr there). It will done at the pbx-loop
   level instead.
  2. In the manager Redirect code, I set this flag on the channel
   if the channel has a non-null pbx pointer. I did the same for the
   second (chan2) channel, which gets run if name2 is set...
   and the first succeeds.
  3. I restored the ending of the cdr for the pbx loop h-exten
   running code. Don't know why it was removed in the first place.
  4. The first attempt at the fix for this bug was to place code
     directly in the async_goto routine, which was called from a
     large number of places, and could affect a large number of
     cases, so I tested that fix against a fair number of transfer
     scenarios, both with and without the patch. In the process,
     I saw that putting the fix in async_goto seemed not to affect
     any of the blind or attended scenarios, but still, I was
     was highly concerned that some other scenarios I had not tested
     might be negatively impacted, so I refined the patch to 
     its current scope, and jmls tested both. In the process, tho,
     I saw that blind xfers in one situation, when the one-touch
     blind-xfer feature is used by the peer, we got strange 
     h-exten behavior.  So, I  inserted code to swap CDRs and
     to set the HANGUP_DONT field, to get uniform behavior.
  5. I added code to the bridge to obey the HANGUP_DONT flag,
     skipping both publishing the bridge CDR, and running
     the h-exten; they will be done at the pbx-loop (higher)
     level instead.
  6. I removed all the debug logs from the patch before committing.
  7. I moved the AUTOLOOP set/reset in the h-exten code in res_features
     so it's only done if the h-exten is going to be run. A very
     minor performance improvement, but technically correct.
  
  
  (closes issue #14241)
  Reported by: jmls
  Patches:
        14241_redirect_no_bridgeCDR_or_h_exten_via_transfer uploaded by murf (license 17)
  Tested by: murf, jmls
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@172063 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-28 20:31:06 +00:00
Olle Johansson 097822966b Add final part of previously committed work for answered elsewhere in queue - the missing piece that started with app_dial() earlier on.
This is to avoid having the list and counter of missed calls being touched by queue calls. Add the C option to queue() and nothing 
will be logged on phones that support the Reason: header on SIP cancel, like the SNOM phones.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@171924 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-28 14:37:16 +00:00
Mark Michelson 04e56bde03 Fix queue crashes that would occur after the calling channel was masqueraded.
The data passed to the end_bridge_callback was assumed to be data which was
still stack'd. The problem was that with some call features, attended transfers
in particular, a new bridge thread is started once the feature completes, meaning
that when the end_bridge_callback is called, the end_bridge_callback_data was
invalid.

To fix this problem, there are two measures taken

1. Instead of pointing to stacked data, we now used heap-allocated data for
passing to the end_bridge_callback in app_queue
2. Since bridges can end multiple times on a single logical call, we wait until
the final bridge is broken to actually set any queue variables. This is accomplished
through reference-counting and the use of an end_bridge_callback_data_fixup function
in app_queue.c

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@171618 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-27 19:30:54 +00:00
Sean Bright ec5aa59105 Merged revisions 170979 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r170979 | seanbright | 2009-01-25 08:33:20 -0500 (Sun, 25 Jan 2009) | 9 lines
  
  Resolve a logic error that was causing Page() to crash when more than one
  channel was specified.
  
  (closes issue #14308)
  Reported by: bluefox
  Patches:
        20090124__bug14308.diff.txt uploaded by seanbright (license 71)
  Tested by: kc0bvu
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@170980 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-25 13:35:48 +00:00
Joshua Colp 665bba38f1 Merged revisions 170568 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r170568 | file | 2009-01-23 15:06:54 -0400 (Fri, 23 Jan 2009) | 4 lines
  
  When a call is forwarded stop any active indications. The new channel will provide an indication, if need be, itself.
  (closes issue #14310)
  Reported by: RadicAlish
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@170569 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-23 19:09:18 +00:00
Joshua Colp fcf4d42cde Reset the ast_str used for escape substitution. We need to do this since it is a thread local variable that may contain the value of a previous substitution.
(closes issue #14312)
Reported by: pj


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@170498 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-23 17:32:26 +00:00
Joshua Colp f6f5197e63 Merged revisions 170147 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r170147 | file | 2009-01-22 12:50:54 -0400 (Thu, 22 Jan 2009) | 4 lines
  
  If we are unable to request a DAHDI pseudo channel and we are using the user introduction without review option make sure it gets unset so other code does not blindly assume a DAHDI pseudo channel exists.
  (closes issue #14282)
  Reported by: cheesegrits
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@170148 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-22 16:52:21 +00:00
Joshua Colp 9ee6a741dc Clear the autoloop flag when parsing and setting the context/extension/priority to go back to. When the channel executes a PBX again we want it to start out at the point we explicitly say and at that point it will not yet be doing autoloop.
(closes issue #14304)
Reported by: jcovert


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@170047 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-22 15:01:54 +00:00
Mark Michelson 4263503bd5 Fix device state parsing issues for channel names with multiple slashes
The fix being applied is a bit different for trunk and the 1.6.X branches.
For trunk, we only wish to strip off the characters beyond the second slash
if the channel is a Local channel (i.e. we are removing the /n from the device
name). Other channel technologies with multiple slashes (e.g. DAHDI) need the
information after the second slash in order to get the proper device state
information.

In addition to this fix, the 1.6.X branches are receiving a much more important
fix as well. The problem in 1.6.X is that the member's device name was being directly
changed instead of having a copy changed. This meant that we would strip off the
second slash and trailing characters and then leave the member's device name like
that permanently thereafter.

(closes issue #14014)
Reported by: kebl0155
Patches:
      14014_number2.patch uploaded by putnopvut (license 60)
Tested by: kebl0155



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@169611 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-21 00:33:32 +00:00
Mark Michelson b52253d590 Use the default timeout for a queue instead of -1
(closes issue #14272)
Reported by: timking



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@169574 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-20 21:57:24 +00:00
Tilghman Lesher 071301029c Merged revisions 169364 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r169364 | tilghman | 2009-01-19 13:49:25 -0600 (Mon, 19 Jan 2009) | 4 lines
  
  Truncate userevents at the end of a line, when the command exceeds the buffer.
  (closes issue #14278)
   Reported by: fnordian
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@169365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-19 20:05:52 +00:00
Tilghman Lesher 3728c3aa92 Merged revisions 168828 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r168828 | tilghman | 2009-01-16 12:41:35 -0600 (Fri, 16 Jan 2009) | 6 lines
  
  Fix the conjugation of Russian and Ukrainian languages.
  (related to issue #12475)
   Reported by: chappell
   Patches: 
         vm_multilang.patch uploaded by chappell (license 8)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@168832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-16 18:49:09 +00:00
Kevin P. Fleming 9a7efae8fd remove the PBX_ODBC logic from the configure script, and add GENERIC_ODCB logic that includes copying the relevant LIB and INCLUDE data from either UnixODBC or iODBC, based on which was found; if both were found, prefer UnixODBC
this stops modules from being linked against both sets of libraries on systems that have both installed



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@168734 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-15 20:18:53 +00:00
Sean Bright fcb69e6f9d Add a missing unlock and properly handle the 'maxusers' setting on MeetMe
conferences.  We were using the 'user number' field to compare against the
maximum allowed users, which works assuming users with lower user numbers
didn't leave the conference.

(closes issue #14117)
Reported by: sergedevorop
Patches:
      20090114__bug14117-2.diff.txt uploaded by seanbright (license 71)
Tested by: sergedevorop


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@168705 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-15 15:33:18 +00:00
Olle Johansson 526cc089a9 Add support for setting the Reason header when cancelling a call in the queue
because someone else answered. Previously, only dial() was supported.

EDV-102


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@168636 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-15 13:01:52 +00:00
Mark Michelson b9060d4435 Merged revisions 168628 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r168628 | mmichelson | 2009-01-14 18:11:01 -0600 (Wed, 14 Jan 2009) | 16 lines

Fix some crashes from bad datastore handling in app_queue.c

* The queue_transfer_fixup function was searching for and removing
  the datastore from the incorrect channel, so this was fixed.

* Most datastore operations regarding the queue_transfer datastore
  were being done without the channel locked, so proper channel locking
  was added, too.

(closes issue #14086)
Reported by: ZX81
Patches:
      14086v2.patch uploaded by putnopvut (license 60)
Tested by: ZX81, festr


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@168629 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-15 00:14:17 +00:00
Steve Murphy a474341105 Merged revisions 168608 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r168608 | murf | 2009-01-14 12:34:35 -0700 (Wed, 14 Jan 2009) | 1 line
  
  app_page was failing to compile in dev-mode on my gcc-4.2.4 system. This change gets rid of the warning.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@168613 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-14 20:51:26 +00:00
Terry Wilson 2015f9c980 Merged revisions 168593 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r168593 | twilson | 2009-01-13 19:27:18 -0600 (Tue, 13 Jan 2009) | 20 lines
  
  Don't overflow when paging more than 128 extensions
  
  The number of available slots for calls in app_page was hardcoded to 128.
  Proper bounds checking was not in place to enforce this limit, so if more than
  128 extensions were passed to the Page() app, Asterisk would crash.  This patch
  instead dynamically allocates memory for the ast_dial structures and removes
  the (non-functional) arbitrary limit.
  
  This issue would have special importance to anyone who is dynamically creating
  the argument passed to the Page application and allowing more than 128
  extensions to be added by an outside user via some external interface.
  
  The patch posted by a_villacis was slightly modified for some coding guidelines
  and other cleanups.  Thanks, a_villacis!
  (closes issue #14217)
  Reported by: a_villacis
  Patches: 
        20080912-asterisk-app_page-fix-buffer-overflow.patch uploaded by a (license 660)
  Tested by: otherwiseguy
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@168594 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-14 02:00:40 +00:00
Mark Michelson ec0f18405e Clarify a message that app_queue prints and change to a debug-level message
The "No one is answering..." verbose message contained 3 numbers that were not
explained in any way to whoever was viewing the message. It is more helpful now
since the message explains what the numbers mean. Also, the message has been
downgraded to "DEBUG" level.

(closes issue #14172)
Reported by: caio1982
Patches:
      queue_answering_debug.diff uploaded by caio1982 (license 22)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@168579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-13 22:30:59 +00:00
Russell Bryant ef6ad2b53c Merged revisions 168561 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r168561 | russell | 2009-01-13 13:13:05 -0600 (Tue, 13 Jan 2009) | 2 lines

Revert unnecessary indications API change from rev 122314

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@168562 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-13 19:22:13 +00:00
Olle Johansson 64e564aa55 Better to use the proper app name
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@168497 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-12 16:31:27 +00:00
Terry Wilson 1253c8aa0d Set ORIGINATE_STATUS instead of OUTGOING_STATUS to match the documentation
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@167973 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-09 01:15:43 +00:00
Terry Wilson c37aa68d77 Set peer context and exten values so MACRO_EXTEN and MACRO_CONTEXT will be set
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@167935 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-09 00:13:12 +00:00
Tilghman Lesher 6dbe101045 Fix variables to comply with documentation changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@167837 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-08 21:40:28 +00:00
Tilghman Lesher 31a3307245 Textual changes, consistency in status variable naming, and other minor bugs.
(closes issue #13943)
 Reported by: Marquis
 Patches: 
       minivm_trunk_fixes3.patch uploaded by Marquis (license 32)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@167835 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-08 21:32:45 +00:00
Mark Michelson 454241dd58 Add the average talk time for a queue
This patch adds the functionality to app_queue of calculating
the average amount of time that channels are bridged for a
queue. The algorithm used to calculate the average is the same
exponential average currently used to calculate the average holdtime.
See the CHANGES file to see the methods you may use to view this
information.

(closes issue #13960)
Reported by: coolmig
Patches:
      app_queue.c.diff.trunk-r158840 uploaded by coolmig (license 621)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@167792 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-08 19:48:42 +00:00
BJ Weschke 3a4e3df193 Answer the channel if it has not already been answered and we've already found a valid profile for followme.
(closes issue #14140)
 Reported by: dimas
 Patches:
       14140.patch uploaded by dimas



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@167478 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-07 18:20:31 +00:00
Mark Michelson ff20b9116a Update app_queue to deal with the removal of AST_PBX_KEEPALIVE
When placing a call to a queue which ran a gosub on the member's
channel, Asterisk would crash every time, stemming from the fact
that the member's channel was being hung up unexpectedly when the
Gosub completed. The necessary change was pretty much copied and
pasted from app_dial's similar changes made last week.

I also took the opportunity to change a LOG_DEBUG message in
app_dial to use ast_debug. I am guessing this was due to a direct
merge from 1.4 that was not corrected to use trunk's preferred
syntax.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@166861 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-29 18:04:52 +00:00
Steve Murphy aa905e347e Merged revisions 166093 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

In order to merge this 1.4 patch into trunk,
I had to resolve some conflicts and wait for
Russell to make some changes to res_agi.
I re-ran all the tests; 39 calls in all, and
made fairly careful notes and comparisons: I
don't want this to blow up some aspect of 
asterisk; I completely removed the KEEPALIVE
from the pbx.h decls. The first 3 scenarios
involving feature park; feature xfer to 700;
hookflash park to Park() app call all behave
the same, don't appear to leave hung channels,
and no crashes.

........
  r166093 | murf | 2008-12-19 15:30:32 -0700 (Fri, 19 Dec 2008) | 131 lines
  
  This merges the masqpark branch into 1.4
  
  These changes eliminate the need for (and use of)
  the KEEPALIVE return code in res_features.c;
  There are other places that use this result code
  for similar purposes at a higher level, these appear
  to be left alone in 1.4, but attacked in trunk.
  
  The reason these changes are being made in 1.4, is
  that parking ends a channel's life, in some situations,
  and the code in the bridge (and some other places),
  was not checking the result code properly, and dereferencing
  the channel pointer, which could lead to memory corruption
  and crashes.
  
  Calling the masq_park function eliminates this danger 
  in higher levels.
  
  A series of previous commits have replaced some parking calls
  with masq_park, but this patch puts them ALL to rest,
  (except one, purposely left alone because a masquerade
  is done anyway), and gets rid of the code that tests
  the KEEPALIVE result, and the NOHANGUP_PEER result codes.
  
  While bug 13820 inspired this work, this patch does
  not solve all the problems mentioned there.
  
  I have tested this patch (again) to make sure I have
  not introduced regressions. 
  
  Crashes that occurred when a parked party hung up
  while the parking party was listening to the numbers
  of the parking stall being assigned, is eliminated.
  
  These are the cases where parking code may be activated:
  
  1. Feature one touch (eg. *3)
  2. Feature blind xfer to parking lot (eg ##700)
  3. Run Park() app from dialplan (eg sip xfer to 700)
     (eg. dahdi hookflash xfer to 700)
  4. Run Park via manager.
  
  The interesting testing cases for parking are:
  I. A calls B, A parks B
      a. B hangs up while A is getting the numbers announced.
      b. B hangs up after A gets the announcement, but 
         before the parking time expires
      c. B waits, time expires, A is redialed,
         A answers, B and A are connected, after
         which, B hangs up.
      d. C picks up B while still in parking lot.
  
  II. A calls B, B parks A
      a. A hangs up while B is getting the numbers announced.
      b. A hangs up after B gets the announcement, but 
         before the parking time expires
      c. A waits, time expires, B is redialed,
         B answers, A and B are connected, after
         which, A hangs up.
      d. C picks up A while still in parking lot.
  
  Testing this throroughly involves acting all the permutations
  of I and II, in situations 1,2,3, and 4.
  
  Since I added a few more changes (ALL references to KEEPALIVE in the bridge
  code eliimated (I missed one earlier), I retested
  most of the above cases, and no crashes.
  
  H-extension weirdness.
  
  Current h-extension execution is not completely
  correct for several of the cases.
  
  For the case where A calls B, and A parks B, the
  'h' exten is run on A's channel as soon as the park
  is accomplished. This is expected behavior.
  
  But when A calls B, and B parks A, this will be
  current behavior:
  
  After B parks A, B is hung up by the system, and
  the 'h' (hangup) exten gets run, but the channel
  mentioned will be a derivative of A's...
  
  Thus, if A is DAHDI/1, and B is DAHDI/2,
  the h-extension will be run on channel
  Parked/DAHDI/1-1<ZOMBIE>, and the 
  start/answer/end info will be those 
  relating to Channel A.
  
  And, in the case where A is reconnected to
  B after the park time expires, when both parties
  hang up after the joyful reunion, no h-exten
  will be run at all.
  
  In the case where C picks up A from the 
  parking lot, when either A or C hang up,
  the h-exten will be run for the C channel.
  
  CDR's are a separate issue, and not addressed
  here.
  
  As to WHY this strange behavior occurs, 
  the answer lies in the procedure followed
  to accomplish handing over the channel
  to the parking manager thread. This procedure
  is called masquerading. In the process,
  a duplicate copy of the channel is created,
  and most of the active data is given to the
  new copy. The original channel gets its name
  changed to XXX<ZOMBIE> and keeps the PBX
  information for the sake of the original
  thread (preserving its role as a call 
  originator, if it had this role to begin
  with), while the new channel is without
  this info and becomes a call target (a
  "peer").
  
  In this case, the parking lot manager
  thread is handed the new (masqueraded)
  channel. It will not run an h-exten
  on the channel if it hangs up while
  in the parking lot. The h exten will
  be run on the original channel instead,
  in the original thread, after the bridge
  completes.
  
  See bug 13820 for our intentions as
  to how to clean up the h exten behavior.

Review: http://reviewboard.digium.com/r/29/

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@166665 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-23 18:13:49 +00:00
Eliel C. Sardanons 340d22ab39 Fix the XML documentation for Record().
<value> tags inside <variable> elements must have CDATA and no
another XML node.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@165954 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-19 18:20:46 +00:00
Russell Bryant 37d8f255e4 Merged revisions 165889 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r165889 | russell | 2008-12-19 09:03:02 -0600 (Fri, 19 Dec 2008) | 9 lines

Ensure that the chanspy datastore is fully initialized.

This patch resolved some random crash issues observed by a user on a BSD system

(closes issue #14111)
Reported by: ys
Patches:
      app_chanspy.c.diff uploaded by ys (license 281)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@165890 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-19 15:05:09 +00:00
Tilghman Lesher a117714b88 Merged revisions 165767 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r165767 | tilghman | 2008-12-18 15:14:47 -0600 (Thu, 18 Dec 2008) | 8 lines
  
  Add mutexes around accesses to the IMAP library interface.  This prevents
  certain crashes, especially when shared mailboxes are used.
  (closes issue #13653)
   Reported by: howardwilkinson
   Patches: 
         asterisk-1.4.21.2-appvoicemail-sharedimap-lock.patch uploaded by howardwilkinson (license 590)
   Tested by: jpeeler
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@165797 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-18 21:41:02 +00:00
Joshua Colp 654ea55a65 Numerous documentation updates.
(closes issue #13970)
Reported by: pkempgen
Patches:
      __20081217_cli_usage_fixes.patch.txt uploaded by blitzrage (license 10)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@165792 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-18 21:21:44 +00:00
Russell Bryant 50a25ac847 Remove the need for AST_PBX_KEEPALIVE with the GoSub option from Dial.
This is part of an effort to completely remove AST_PBX_KEEPALIVE and other
similar return codes from the source.  While this usage was perfectly safe,
there are others that are problematic.  Since we know ahead of time that
we do not want to PBX to destroy the channel, the PBX API has been changed
so that information can be provided as an argument, instead, thus removing
the need for the KEEPALIVE return value.

Further changes to get rid of KEEPALIVE and related code is being done by
murf.  There is a patch up for that on review 29.

Review: http://reviewboard.digium.com/r/98/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@165723 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-18 19:33:42 +00:00
Tilghman Lesher 665b55e6f8 Fix 2 resource leaks and fix another pipe-to-comma conversion
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@165658 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-18 18:36:48 +00:00
Russell Bryant 9e3ecac5ab Add a \todo note for app_originate.
Jared Smith suggested that we add a way to be able to set variables
and functions on the outbound channel.  I think that it's a great idea, so I
have added it as a todo so that it gets done at some point.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@165469 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-18 14:23:22 +00:00
Russell Bryant aecde42abb Add a new application, Originate.
(closes issue #14075)
Reported by: rcasas
Patches:
      app_originate.c uploaded by rcasas (license 641), heavily modified by me
Tested by: russell
Review: http://reviewboard.digium.com/r/95/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@165433 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-18 13:33:34 +00:00
Tilghman Lesher 08ae164b58 Add RECORD_STATUS variable, as requested on the -users list.
Patch by me (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@165397 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-17 23:39:48 +00:00
Mark Michelson 7c1bd94231 Fix the build
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@165326 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-17 21:29:30 +00:00
Tilghman Lesher 6c521ba21f Oops, broke trunk
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@165325 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-17 21:28:51 +00:00
Tilghman Lesher f09b0b3a83 Merged revisions 165317 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r165317 | tilghman | 2008-12-17 15:14:37 -0600 (Wed, 17 Dec 2008) | 4 lines
  
  Reverse the fix from issue #6176 and add proper handling for that issue.
  (Closes issue #13962, closes issue #13363)
  Fixed by myself (license 14)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@165319 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-17 21:18:57 +00:00
Mark Michelson a7829044ec Merged revisions 165255 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r165255 | mmichelson | 2008-12-17 14:51:38 -0600 (Wed, 17 Dec 2008) | 7 lines

Fix some memory leaks found while looking at how realtime
configs are handled.

Also cleaned up some coding guidelines violations in app_realtime.c,
mostly related to spacing


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@165318 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-17 21:17:20 +00:00
Mark Michelson 93a51114cb And actually assign the function to a pointer...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@165143 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-17 17:53:37 +00:00
Mark Michelson d0671d8d30 Use the create_vm_state_from_user function in a place where
it was not being used before. Also, I've moved the urgent
folder check in messagecount() up a bit so that the flow is
a bit better.

This was something I noticed while taking a look at issue
#13973, although I don't think this is the underlying cause
of the issue.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@165142 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-17 17:52:50 +00:00
Jeff Peeler 91b4a30be8 (closes issue #13669)
Reported by: pj

Delete file recording if recording terminated from a hangup.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164942 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16 22:45:39 +00:00
Russell Bryant cf502aa246 Merged revisions 164876 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r164876 | russell | 2008-12-16 15:10:44 -0600 (Tue, 16 Dec 2008) | 6 lines

Do not dereference the channel if AST_PBX_KEEPALIVE has been returned.

This is a bug I noticed while looking at the code for app_macro.  This return code
means that another thread has assumed ownership of the channel and it can no longer
be touched.  (I hate this return code with a passion, by the way.)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164877 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16 21:12:49 +00:00
Russell Bryant c76bd59354 Set MINIVM_ACCMESS_STATUS in all cases. Also, remove a variable that was not needed.
(closes issue #14081)
Reported by: pkempgen


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16 15:00:27 +00:00
Mark Michelson 763d4dcabb Add an 'i' option to app_page. This option works the same as
the 'i' options for app_dial and app_queue, in that they will ignore
any attempts by phones to forward the call.

(closes issue #13977)
Reported by: putnopvut
Patches:
      page_ignore_forwards.patch uploaded by putnopvut (license 60)
Tested by: putnopvut, acunningham



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164428 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 20:07:03 +00:00
Mark Michelson 00c40264b7 Fix a compile warning and a logic error that could have been bad
for non-realtime queues



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 16:16:47 +00:00
Mark Michelson 8a2cf30830 Fix up a few issues with regards to queues
* Fix reference counting used in the __queues_show function
* Add code to be sure that the "queue show" command does not
  print information for a realtime queue which has been deleted
  from the backend
* Add a missing unref to the realtime queue loading function for
  the case where a queue is in the module's container but has been
  deleted from the realtime backend

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164268 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 16:10:43 +00:00
Joshua Colp 8be6bc5f67 Make app_fax compatible with newer versions of spandsp. This remains backwards compatible with earlier versions though so do not fret.
(closes issue #14073)
Reported by: seandarcy


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164257 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 15:41:22 +00:00
Russell Bryant bca058070e Fix build WRT ast_str_opaque
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164202 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 14:40:08 +00:00
Tilghman Lesher c8223fc957 Merge ast_str_opaque branch (discontinue usage of ast_str internals)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@163991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-13 08:36:35 +00:00
Joshua Colp d6b70deee5 Only detach and destroy the whisper audiohooks if they are actually in use.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@163912 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-13 00:59:24 +00:00
Terry Wilson 74de8fdaa7 When using realtime queues, app_queue wasn't updating the strategy if it was changed in the realtime backend. This patch resolves the issue for almost all situations. It is currently not supported to switch to the linear strategy via realtime since the ao2_container for members will have been set to have multiple buckets and therefore the members would be unordered.
(closes issue #14034)
Reported by: cristiandimache
Tested by: otherwiseguy, cristiandimache


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@163873 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-12 23:48:26 +00:00
Mark Michelson 81b642c8c3 Add an option to voicemail.conf to allow urgent messages to be
forwarded as not urgent.

(closes issue #14063)
Reported by: jaroth
Patches:
      urgfwd_v2.patch uploaded by jaroth (license 50)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@163213 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-11 20:57:44 +00:00
Mark Michelson 1772fc56f0 Merged revisions 163084 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r163084 | mmichelson | 2008-12-11 10:46:22 -0600 (Thu, 11 Dec 2008) | 4 lines

Revert this cast to long. Using time_t here causes build failures on a 
FreeBSD 32-bit build.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@163085 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-11 16:47:34 +00:00
Mark Michelson cda010c3b7 Merged revisions 163080 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r163080 | mmichelson | 2008-12-11 10:24:43 -0600 (Thu, 11 Dec 2008) | 14 lines

Fix a potential crash due to unsafe datastore handling.

This patch also contains a conversion from using long to time_t
for representing times for a queue, as well as some whitespace
fixes.

(closes issue #14060)
Reported by: nivek
Patches:
      datastore_fixup.patch.corrected uploaded by nivek (license 636)
	  with slight modification from me
Tested by: nivek


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@163081 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-11 16:33:16 +00:00
Joshua Colp 135bb29ba6 Finish conversion to using ARRAY_LEN and remove it as a janitor project.
(closes issue #14032)
Reported by: bkruse
Patches:
      14032.patch uploaded by bkruse (license 132)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@162542 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-10 01:09:06 +00:00
Tilghman Lesher fd484690ce Merged revisions 162463 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r162463 | tilghman | 2008-12-09 17:08:53 -0600 (Tue, 09 Dec 2008) | 2 lines
  
  Oops, should be "tz", not "zonetag".
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@162466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-09 23:10:34 +00:00
Tilghman Lesher 73b6cbf66c Merged revisions 162348 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r162348 | tilghman | 2008-12-09 15:53:25 -0600 (Tue, 09 Dec 2008) | 4 lines
  
  We appear to have documented tz= in the [general] section of voicemail.conf,
  without actually having implemented it.  Oops.
  (Reported by Olivier on the -users list)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@162355 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-09 21:57:09 +00:00
Joshua Colp f56edec570 Merged revisions 162341 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r162341 | file | 2008-12-09 17:14:29 -0400 (Tue, 09 Dec 2008) | 4 lines
  
  Add 'down' as a valid state for directed call pickup. This creeps up when we receive session progress when dialing a device and not ringing.
  (closes issue #14005)
  Reported by: ddl
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@162342 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-09 21:16:37 +00:00
Russell Bryant 92f7bae3df Merged revisions 162286 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r162286 | russell | 2008-12-09 14:57:35 -0600 (Tue, 09 Dec 2008) | 9 lines

Fix an issue where callers on an incoming call on an SLA trunk would not hear ringback.

We need to make sure that we don't start writing audio to the trunk channel until we're
actually ready to answer it.  Otherwise, the channel driver will treat it as inband
progress, even though all they are getting is silence.

(closes issue #12471)
Reported by: mthomasslo

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@162291 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-09 20:59:54 +00:00
Joshua Colp 4c1bb21fa1 Merged revisions 162273 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r162273 | file | 2008-12-09 16:44:32 -0400 (Tue, 09 Dec 2008) | 4 lines
  
  Fix double declaration of 'x' on the PPC platform.
  (closes issue #14038)
  Reported by: ffloimair
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@162275 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-09 20:46:11 +00:00
Russell Bryant e1ff75c37c Merged revisions 162014 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r162014 | russell | 2008-12-09 10:46:53 -0600 (Tue, 09 Dec 2008) | 5 lines

Allow DISA to handle extensions that start with #.

(closes issue #13330)
Reported by: jcovert

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@162016 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-09 16:47:39 +00:00
Eliel C. Sardanons 5e9dc5e1f3 Add voicemail related applications and functions XML documentation:
applications:
      - VoiceMail()
      - VoiceMailMain()
      - MailboxExists()
      - VMAuthenticate()
    functions:
      - MAILBOX_EXISTS()



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@161604 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-08 03:35:55 +00:00
Eliel C. Sardanons e9ab875265 Introduce SMS() application XML documentation.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@161571 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-07 22:43:46 +00:00
Eliel C. Sardanons 206fe71680 Move Speech* applications and functions documentation to XML.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@161536 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-06 21:18:51 +00:00
Mark Michelson 07311720f2 If the autoloop flag is set on a channel, then we need to
add 1 to the priority when checking if the extension exists. Otherwise,
gosubs will fail.

This was discovered when investigating an asterisk-users mailing list post
made by Gary Hawkins.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@161493 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-05 23:24:38 +00:00
Sean Bright 3eee1dbb9b Use ast_free() instead of free(), pointed out by eliel on IRC.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@161350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-05 16:04:36 +00:00
Sean Bright 9d2a8810e6 When using IMAP_STORAGE, it's important to convert bare newlines (\n) in
emailbody and pagerbody to CR-LF so that the IMAP server doesn't spit out an
error.  This was informally reported on #asterisk-dev a few weeks ago.  Reviewed
by Mark M. on IRC.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@161349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-05 15:56:15 +00:00
Russell Bryant 7d0c1f40fb Resolve a compiler warning from buildbot about a NULL format string.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@161252 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-05 13:46:01 +00:00
Eliel C. Sardanons 1e8e12efcf Janitor, use ARRAY_LEN() when possible.
(closes issue #13990)
Reported by: eliel
Patches:
      array_len.diff uploaded by eliel (license 64)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@161218 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-05 10:31:25 +00:00
Sean Bright 2afd7a09a7 Check the return value of fread/fwrite so the compiler doesn't complain. Only a
problem when IMAP_STORAGE is enabled.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@161147 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-05 02:47:54 +00:00
Tilghman Lesher c42aef2ebb Merged revisions 160770 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r160770 | tilghman | 2008-12-03 15:54:07 -0600 (Wed, 03 Dec 2008) | 2 lines
  
  Some compilers warn on null format strings; some don't (caught by buildbot)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@160791 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-03 21:58:21 +00:00
Mark Michelson a53877b469 Add some safety measures when using gosub, especially when using the options
for app_dial and app_queue to run a gosub when the call is answered.

* Check for the existence of the gosub target in gosub_exec. If it is nonexistent,
  then this will cause errors when we attempt to actually run the gosub, including
  a definite memory leak and potential crashes. Return an error in this situation
* Check the return value of pbx_exec in app_dial and app_queue before attempting
  to actually run the gosub routine. If there was an error, we should not attempt
  to run the gosub.
* Change a '|' to a ',' in app_queue.
* Add some extra curly braces where they had been missing previously.

(closes issue #13548)
Reported by: fiddur



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@160626 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-03 18:37:46 +00:00
Eliel C. Sardanons d635ee0f43 - Add <variable /> tags when naming a channel variable.
- Add <filename /> tags when naming a filename.
- Simplify the xml formatting putting some enters.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@160562 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-03 17:48:47 +00:00
Mark Michelson ac1b520de6 When investigating issue #13548, I found that gosub
handling in app_queue was just completely wrong, mostly
because the channel operations being performed were being
done on the incorrect channel.

With this set of changes, a gosub will correctly run on
the answering queue member's channel. There are still crash
issues which occur if there are dialplan syntax errors, so
I cannot yet close the referenced issue.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@160555 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-03 17:07:09 +00:00
Eliel C. Sardanons bfe0c6c714 - Avoid setting .synopsis and .syntax if we are using XML documentation (or the
xml documentation wont be loaded).
- Use <variable></variable> to refer to a dialplan variable.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@160447 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-03 11:01:23 +00:00
Tilghman Lesher 29502d3bac Add LOCAL_PEEK function, as requested by lmadsen.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@160344 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-02 18:39:12 +00:00
Tilghman Lesher 3d4c0cd421 Merged revisions 160207 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r160207 | tilghman | 2008-12-01 18:25:16 -0600 (Mon, 01 Dec 2008) | 3 lines
  
  Ensure that Asterisk builds with --enable-dev-mode, even on the latest gcc
  and glibc.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@160208 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-02 00:37:21 +00:00