Commit Graph

3376 Commits

Author SHA1 Message Date
Richard Mudgett 9d785ca5f3 Merged revisions 331462 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r331462 | rmudgett | 2011-08-10 15:41:35 -0500 (Wed, 10 Aug 2011) | 37 lines
  
  Merged revisions 331461 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r331461 | rmudgett | 2011-08-10 15:29:59 -0500 (Wed, 10 Aug 2011) | 30 lines
    
    Output of queue log not started until logger reloaded.
    
    ASTERISK-15863 caused a regression with queue logging.  The output of the
    queue log is not started until the logger configuration is reloaded.
    
    * Queue log initialization is completely delayed until the first message
    is posted to the queue log system.  Including the initial opening of the
    queue log file.
    
    * Fixed rotate_file() ROTATE strategy to give the file just rotated out to
    the configured exec function after rotate.  Just like the other strategies.
    
    * Fixed logger reload to always post the queue reload entry instead of
    just if there is a queue log file.
    
    * Refactored some code to eliminate some redundancy and to reduce stack
    utilization.
    
    (closes issue ASTERISK-17036)
    JIRA SWP-2952
    Reported by: Juan Carlos Valero
    Patches:
          jira_asterisk_17036_v1.8.patch (license #5621) patch uploaded by rmudgett
    Tested by: rmudgett
    
    (closes issue ASTERISK-18208)
    Reported by: Christian Pinedo
    
    Review: https://reviewboard.asterisk.org/r/1333/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@331463 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-10 20:51:07 +00:00
Richard Mudgett fa794d8f7a Merged revisions 331420 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

........
  r331420 | rmudgett | 2011-08-10 14:07:53 -0500 (Wed, 10 Aug 2011) | 2 lines
  
  Make sure feature_request_and_dial() initializes outstate if passed in.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@331421 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-10 19:08:22 +00:00
Richard Mudgett 02ecb12f64 Merged revisions 331418 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

........
  r331418 | rmudgett | 2011-08-10 13:25:08 -0500 (Wed, 10 Aug 2011) | 6 lines
  
  Revert -r318141.  It was a band-aid that only partially fixed parking.
  
  A better fix is on reviewboard review 1358.
  
  (issue ASTERISK-17374)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@331419 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-10 18:27:16 +00:00
Kinsey Moore 0208f0ac71 Merged revisions 331316 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r331316 | kmoore | 2011-08-10 08:48:41 -0500 (Wed, 10 Aug 2011) | 15 lines
  
  Merged revisions 331315 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r331315 | kmoore | 2011-08-10 08:47:46 -0500 (Wed, 10 Aug 2011) | 8 lines
    
    AMI action ModuleReload returns Error if Module: missing or empty
    
    An empty string was not being checked for properly causing identification of
    the module to be reloaded to fail and return an Error with message
    "No such module."
    
    (closes issue AST-616)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@331317 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-10 13:49:31 +00:00
Richard Mudgett b99b1116be Merged revisions 331265 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r331265 | rmudgett | 2011-08-09 18:12:49 -0500 (Tue, 09 Aug 2011) | 22 lines
  
  Merged revisions 331248 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r331248 | rmudgett | 2011-08-09 17:12:59 -0500 (Tue, 09 Aug 2011) | 15 lines
    
    Misc minor items found in code.
    
    * Add some reentrancy protection in pbx.c when creating the contexts_table
    hash table.
    
    * Fix inverted test in chan_sip.c conditional code.
    
    * Fix uninitialized variable and use of the wrong variable in chan_iax2.c.
    
    * Fix test of return value in app_parkandannounce.c.  Explicitly testing
    for -1 is bad if the function does not actually return that value when it
    fails.
    
    * Fixup some comments and add some curly braces in features.c.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@331266 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-09 23:17:13 +00:00
Kinsey Moore c3bd5892a6 Allow ENUM query functions to report lookup errors
The ENUM dialplan functions do not report DNS query errors properly. It is
useful to differentiate between failed query (e.g. non-existent domain) vs. no
data records of the appropriate type. This is required to make overlapped
dialing work.

(closes issue ASTERISK-13769)
Review: https://reviewboard.asterisk.org/r/1355/
Patch-by: Timo Teras


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@331201 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-09 17:08:33 +00:00
Terry Wilson 5901f2d0b1 Merged revisions 331041 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

........
  r331041 | twilson | 2011-08-08 16:12:51 -0500 (Mon, 08 Aug 2011) | 6 lines
  
  Replace AMI Unlink events with Bridge events
  
  A previous update converted some of the Link and Unlink events to
  Bridge events, but a couple of Unlink events were missed. This patch
  rectifies the situation.

  (closes issues ASTERISK-17455)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@331042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-08 21:16:25 +00:00
Kinsey Moore 276c795486 Merged revisions 330763 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r330763 | kmoore | 2011-08-03 10:15:26 -0500 (Wed, 03 Aug 2011) | 16 lines
  
  Merged revisions 330762 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r330762 | kmoore | 2011-08-03 10:14:36 -0500 (Wed, 03 Aug 2011) | 9 lines
    
    editing files in main/editline does not ensure rebuild of libedit.a
    
    When editing a source file in main/editline, the build system does not rebuild
    libedit.a and uses the already existing one instead.  Adding a PHONY to
    CHECK_SUBDIR fixes this problem.
    
    (closes issue ASTERISK-16221)
    Patch-by: Walter Doekes
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@330764 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-03 15:16:25 +00:00
Kinsey Moore dc8df80e56 Merged revisions 330434 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r330434 | kmoore | 2011-08-01 10:23:29 -0500 (Mon, 01 Aug 2011) | 16 lines
  
  Merged revisions 330433 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r330433 | kmoore | 2011-08-01 10:22:10 -0500 (Mon, 01 Aug 2011) | 9 lines
    
    Incorrect playback for Spanish in some circumstances
    
    When you say the time in spanish and it is 01:00 - 01:59 or 13:00 - 13:59 you
    must use female pronunciation "1F". The function "say_date_with_format_es" does
    not take this in account.
    
    (closes ASTERISK-15016)
    Patch-by: Luis Jimenez
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@330435 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-01 15:24:21 +00:00
Richard Mudgett 6cf345e023 Fixed compiler warning and a couple prototype mismatches.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@330379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-31 00:19:11 +00:00
Richard Mudgett a5be6a0f85 Merged revisions 330369 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r330369 | rmudgett | 2011-07-30 18:57:56 -0500 (Sat, 30 Jul 2011) | 11 lines
  
  Merged revisions 330368 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r330368 | rmudgett | 2011-07-30 18:56:29 -0500 (Sat, 30 Jul 2011) | 4 lines
    
    Remove some redundant locking code in ast_do_masquerade().
    
    Also updated some comments.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@330370 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-31 00:05:55 +00:00
Gregory Nietsky 1c0078286e Merged revisions 330312 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r330312 | irroot | 2011-07-30 17:34:41 +0200 (Sat, 30 Jul 2011) | 15 lines
  
  Merged revisions 330311 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r330311 | irroot | 2011-07-30 17:25:16 +0200 (Sat, 30 Jul 2011) | 9 lines
    
    prevent double masqurading channels when one is been hung up and deadlock avoidance is used.
    
    There is a race condition in ast_do_masquerade / ast_hangup (at least)
    
    Reported by me signed off by schmidts with input from David Vossel
    
    Review: https://reviewboard.asterisk.org/r/1323/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@330313 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-30 15:54:23 +00:00
Russell Bryant 6a15e95a32 astobj2: Avoid using temporary objects + ao2_find() with OBJ_POINTER.
There is a fairly common pattern making its way through the code base where we
put a temporary object on the stack so we can call ao2_find() with OBJ_POINTER.
The purpose is so that it can be passed into the object hash function.
However, this really seems like a hack and potentially error prone.  This patch
is a first stab at approach to avoid having to do that.

It adds a new flag, OBJ_KEY, which can be used instead of OBJ_POINTER in these
situations.  Then, the hash function can know whether it was given an object or
some custom data to hash.

The patch also changes some uses of ao2_find() for iax2_user and iax2_peer
objects to reflect how OBJ_KEY would be used.

So long, and thanks for all the fish.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@330273 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-29 19:34:36 +00:00
Terry Wilson be38ebe316 Merged revisions 330108 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r330108 | twilson | 2011-07-28 16:44:31 -0500 (Thu, 28 Jul 2011) | 9 lines
  
  Merged revisions 330107 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r330107 | twilson | 2011-07-28 16:42:41 -0500 (Thu, 28 Jul 2011) | 2 lines
    
    Make console colors work for TERM=xterm-256color
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@330109 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-28 21:46:27 +00:00
Jonathan Rose d170e5e829 reverting 329840 due to failing tests. Going to change this feature to be purely optional.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@329856 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-27 21:22:12 +00:00
Jonathan Rose 3ee80d6a90 Adds cdr logging of calls resulting in CONGESTION
Applies a patch made a long time ago by alecdavis which adds a CDR feature for logging
calls that failed due to congestion.

(closes issue #15907)
Reported by: alecdavis
Patches: 
      cdr_congestion.diff.txt uploaded by alecdavis (license #5546)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@329835 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-27 20:42:18 +00:00
Sean Bright 5858e755e4 Merged revisions 329670 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

........
  r329670 | seanbright | 2011-07-27 11:25:53 -0400 (Wed, 27 Jul 2011) | 2 lines
  
  Sort the module list so that 'module show' is alphabetical.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@329671 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-27 15:26:31 +00:00
Jonathan Rose 462e0fe530 Merged revisions 329528 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r329528 | jrose | 2011-07-26 08:52:34 -0500 (Tue, 26 Jul 2011) | 24 lines
  
  Merged revisions 329527 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r329527 | jrose | 2011-07-26 08:25:35 -0500 (Tue, 26 Jul 2011) | 17 lines
    
    Fixes some voicemail forwarding behavior based around prepend mode.
    
    Formerly, prepend forwarding would have the user record a message with no useful prompt
    and an expectation for the user to push a button on the phone when finished recording.
    If a length of silence was detected instead, the recording would be canceled and the user
    would re-enter the voicemail forwarding menu. Subsequent time-outs in prepend recording
    would also bug out in the sense that they would write over the original message and get
    sent to the recipient regardless of whether they timed out or were accepted. This patch
    fixes this issue and adds a prompt which will be played after a timeout informing the
    user that they needed to press a button. Currently, the sound files that we have are
    somewhat inadquate for this, so after the call we simply have Allison say "Please try
    again. Then press pound." which actually relies on two separate sound files. Just one
    would be more appropriate.
    
    reporter: Vlad Povorozniuc
    Review: https://reviewboard.asterisk.org/r/1327/ 
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@329530 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-26 14:17:13 +00:00
Paul Belanger 06343443e1 Merged revisions 329472 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r329472 | pabelanger | 2011-07-25 15:55:33 -0400 (Mon, 25 Jul 2011) | 9 lines
  
  Merged revisions 329471 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r329471 | pabelanger | 2011-07-25 15:49:40 -0400 (Mon, 25 Jul 2011) | 2 lines
    
    Decrease verbose messages to debug, to help clean up CLI.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@329473 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-25 19:57:27 +00:00
Gregory Nietsky 3b1cc6de8d dsp_process was enhanced to work with alaw and ulaw in addition to slin.
noticed that some functions could be refactored here it is.

Reported by: irroot
Tested by: irroot, mnicholson
Review: https://reviewboard.asterisk.org/r/1304/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@329432 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-25 14:07:01 +00:00
Richard Mudgett c0f592df46 Merged revisions 329334 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

........
  r329334 | rmudgett | 2011-07-22 16:14:22 -0500 (Fri, 22 Jul 2011) | 1 line
  
  Make use less redundant loop construct for iterating over hints.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@329335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-22 21:15:28 +00:00
Richard Mudgett a5c65bb939 Merged revisions 329331 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r329331 | rmudgett | 2011-07-22 15:43:07 -0500 (Fri, 22 Jul 2011) | 55 lines
  
  Merged revisions 329299 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r329299 | rmudgett | 2011-07-22 10:44:58 -0500 (Fri, 22 Jul 2011) | 48 lines
    
    Deadlocks dealing with dialplan hints during reload.
    
    There are two remaining different deadlocks reported dealing with dialplan
    hints.
    
    The deadlock in ASTERISK-17666 is caused by invalid locking order in
    ast_remove_hint().  The hints container must be locked before the hint
    object.
    
    The deadlock in ASTERISK-17760 is caused by a catch-22 situation in
    handle_statechange().  The deadlock is caused by not having the conlock
    before calling the watcher callbacks.  Unfortunately, having that lock
    causes a different deadlock as reported in ASTERISK-16961.
    
    * Fixed ast_remove_hint() locking order.
    
    * Made handle_statechange() no longer call the watcher callbacks holding
    any locks that matter.
    
    * Made hint ao2 destructor do the watcher callbacks for extension
    deactivation to guarantee that they get called.
    
    * Fixed hint reference leak in ast_add_hint() if the callback container
    constructor failed.
    
    * Fixed hint reference leak in complete_core_show_hint() for every hint it
    found for CLI tab completion.
    
    * Adjusted locking in ast_merge_contexts_and_delete() for safety.
    
    * Added context_merge_lock to prevent ast_merge_contexts_and_delete() and
    handle_statechange() from interfering with each other.
    
    * Fixed ast_change_hint() not taking into account that the extension is
    used for the hash key.
    
    (closes issue ASTERISK-17666)
    Reported by: irroot
    Tested by: irroot
    JIRA SWP-3318
    
    (closes issue ASTERISK-17760)
    Reported by: Byron Clark
    Tested by: irroot
    JIRA SWP-3393
    
    Review: https://reviewboard.asterisk.org/r/1313/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@329332 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-22 20:46:36 +00:00
Russell Bryant f243d129c9 Merged revisions 329257 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

........
  r329257 | russell | 2011-07-21 15:22:36 -0500 (Thu, 21 Jul 2011) | 2 lines
  
  s/1.10/10.0/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@329258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-21 20:26:44 +00:00
Richard Mudgett 3b80737787 Merged revisions 329145 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r329145 | rmudgett | 2011-07-21 11:52:17 -0500 (Thu, 21 Jul 2011) | 16 lines
  
  Merged revisions 329144 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r329144 | rmudgett | 2011-07-21 11:46:21 -0500 (Thu, 21 Jul 2011) | 9 lines
    
    Dialplan bridge() app mutex 'current_dest_chan' freed more times than we've locked!
    
    This appears to be a leftover from when ast_channel was converted to ao2
    objects.
    
    Simply removed the extraneous unlock.
    
    (closes issue ASTERISK-17772)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@329146 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-21 16:59:38 +00:00
Kinsey Moore 1dc97eb69b Merged revisions 328824 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.10

................
  r328824 | kmoore | 2011-07-19 13:05:21 -0500 (Tue, 19 Jul 2011) | 18 lines
  
  Merged revisions 328823 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r328823 | kmoore | 2011-07-19 12:57:18 -0500 (Tue, 19 Jul 2011) | 11 lines
    
    RTP bridge away with inband DTMF and feature detection
    
    When deciding whether Asterisk was allowed to bridge the call away from the
    core, chan_sip did not take into account the usage of features on dialed
    channels that require monitoring of DTMF on channels utilizing inband DTMF.
    This would cause Asterisk to allow the call to be locally or remotely bridged, 
    preventing access to the data required to detect activations of such features.
    
    (closes 17237)
    Review: https://reviewboard.asterisk.org/r/1302/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328825 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-19 18:07:22 +00:00
Mark Murawki 23140a044e Merged revisions 328609 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.10

................
  r328609 | markm | 2011-07-18 08:37:53 -0400 (Mon, 18 Jul 2011) | 15 lines
  
  Merged revisions 328593 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r328593 | markm | 2011-07-18 08:06:50 -0400 (Mon, 18 Jul 2011) | 8 lines
    
    Fixed invalid read and null pointer deref on asterisk shutdown.
    
    In some cases when starting asterisk with -c and hitting control-c to shutdown, there will be an invalid read and null pointer deref causing a crash.
    
    (closes issue ASTERISK-17927)
    Reported by: Mark Murawski
    Tested by: Mark Murawski, Kinsey Moore, Tilghman Lesher
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328610 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-18 12:54:29 +00:00
Richard Mudgett 145c174565 Merged revisions 328329 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.10

........
  r328329 | rmudgett | 2011-07-14 19:19:32 -0500 (Thu, 14 Jul 2011) | 2 lines
  
  Make hint watcher callback take const strings for context and exten parameters.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328344 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-15 00:23:14 +00:00
Leif Madsen a525edea59 Merged revisions 328247 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.10

................
  r328247 | lmadsen | 2011-07-14 16:25:31 -0400 (Thu, 14 Jul 2011) | 14 lines
  
  Merged revisions 328209 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r328209 | lmadsen | 2011-07-14 16:13:06 -0400 (Thu, 14 Jul 2011) | 6 lines
    
    Introduce <support_level> tags in MODULEINFO.
    This change introduces MODULEINFO into many modules in Asterisk in order to show
    the community support level for those modules. This is used by changes committed
    to menuselect by Russell Bryant recently (r917 in menuselect). More information about
    the support level types and what they mean is available on the wiki at
    https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-14 20:28:54 +00:00
Matthew Nicholson e46aea196c Merged revisions 328162 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.10

........
  r328162 | mnicholson | 2011-07-14 12:46:32 -0500 (Thu, 14 Jul 2011) | 3 lines
  
  tune the v21 preamble detector to properly detect the desired sequence of hits
  and misses
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328163 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-14 17:47:40 +00:00
Kevin P. Fleming d37ac6a8a0 Merged revisions 327950 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r327950 | kpfleming | 2011-07-12 17:53:53 -0500 (Tue, 12 Jul 2011) | 14 lines
  
  Correct double-free situation in manager output processing.
  
  The process_output() function calls ast_str_append() and xml_translate() on its
  'out' parameter, which is a pointer to an ast_str buffer. If either of these
  functions need to reallocate the ast_str so it will have more space, they will
  free the existing buffer and allocate a new one, returning the address of the
  new one. However, because process_output only receives a pointer to the ast_str,
  not a pointer to its caller's variable holding the pointer, if the original
  ast_str is freed, the caller will not know, and will continue to use it (and
  later attempt to free it).
  
  (reported by jkroon on #asterisk-dev)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@327953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-12 23:02:31 +00:00
Matthew Nicholson 3f44b08b7b do v21 detection instead of CED detection for the fax gateway
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@327769 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-12 15:23:24 +00:00
David Vossel 3e272bb0b6 Send video update frame to new video source in follow_talker correctly.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@327749 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-12 14:55:51 +00:00
David Vossel 881173268c Updates follow_talker video_mode in confbridge application.
follow_talker mode originally echoed the same video stream
to all participants. As the primary talker switched around, the
video stream would result in the talker seeing themselves.  Now
the primary talker sees the last person who was talking rather than
themselves.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@327640 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-11 18:44:06 +00:00
Matthew Nicholson 7eda60dca1 Merged revisions 327512 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r327512 | mnicholson | 2011-07-11 08:53:59 -0500 (Mon, 11 Jul 2011) | 2 lines
  
  reset our buffer each iteration when doing variable substitution
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@327513 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-11 13:55:28 +00:00
Tzafrir Cohen 55eaa8568c Merged revisions 327411 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r327411 | tzafrir | 2011-07-11 13:46:34 +0300 (ב', 11 יול 2011) | 5 lines
  
  fix building the Debian armhf (HardFloat) port
  
  Fixes http://buildd.debian-ports.org/status/fetch.php?pkg=asterisk&arch=armhf&ver=1%3A1.8.4.4~dfsg-2&stamp=1309935385
  (Missing pthreads)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@327413 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-11 10:57:26 +00:00
Matthew Nicholson 2ac180275d Merged revisions 327106 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r327106 | mnicholson | 2011-07-08 14:52:51 -0500 (Fri, 08 Jul 2011) | 11 lines
  
  Reset our ast_str before passing it on to dialplan function backends.
  
  It is possible for a dialplan backend to not modify the given buffer or ast_str
  and still return success. This causes any previous value stored in the buffer
  to be used as if the new function call provided it. Some functions also append
  to the given buffer assuming it is empty.
  
  The test_substitution unit test has also been modified to detect this problem.
  
  (closes issue ASTERISK-17878)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@327107 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-08 19:54:23 +00:00
Richard Mudgett a0cbad527c Merged revisions 326985 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r326985 | rmudgett | 2011-07-07 20:08:05 -0500 (Thu, 07 Jul 2011) | 12 lines
  
  Some code cleanup in pbx.c
  
  * Mostly comment and format changes.
  
  * ast_context_remove_extension_callerid() and ast_add_extension_nolock()
  will write lock the found specific context.
  
  * ast_context_find() will now tolerate a NULL name.
  
  * Eliminated some inlined versions of find_context() and
  find_context_locked().
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@327000 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-08 01:26:01 +00:00
David Vossel 513c680b8c Adds pass-through support for codec CELT.
This patch adds pass-through support for CELT.  CELT
formats are defined in codecs.conf and can be configured
to any sample rate a CELT endpoint supports.  This patch also
addresses a crash in channel.c resulting from a frame list being
freed incorrectly.  This crash was discovered while testing a CELT
translator which had to split encoded audio into multiple frames.
The codec translator is not a part of this patch, but may be
contributed in the future.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@326855 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-07 19:39:17 +00:00
Terry Wilson f0c8b18c18 Use older functions out of deference to older distros
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@326750 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-07 16:50:54 +00:00
Terry Wilson efd040cd11 Replace Berkeley DB with SQLite 3
There were some bugs in the very ancient version of Berkeley DB that Asterisk
used. Instead of spending the time tracking down the bugs in the Berkeley code
we move to the much better documented SQLite 3.

Conversion of the old astdb happens at runtime by running the included
astdb2sqlite3 utility. The ast_db API with SQLite 3 backend should behave
identically to the old Berkeley backend, but in the future we could offer a
much more robust interface.

We do not include the SQLite 3 library in the source tree, but instead rely
upon the distribution-provided libraries. SQLite is so ubiquitous that this
should not place undue burden on administrators.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@326589 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-06 20:58:12 +00:00
Mark Murawki 8b20d4ffe8 New feature: AMI Action FilterAdd
This adds a new action, FilterAdd to the manager interface that allows control over event filters for the current session

(closes issue ASTERISK-16795)
Reported by: kobaz
Tested by: kobaz,loloski



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@326267 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-05 16:46:17 +00:00
Matthew Jordan 67945ce627 Merged revisions 326209 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r326209 | mjordan | 2011-07-05 08:23:57 -0500 (Tue, 05 Jul 2011) | 7 lines
  
  Updated filestream destructor to block until move is complete when cache is used
  
  When a cache directory is used, the process is forked and a mv command is executed to move the temporary file to the permanent location.  This caused issues with voicemail, where a race condition occurred when the parent expected the file to be in the permanent location prior to the mv command completing.  The parent process is now blocked until the mv command completes.
  
  (closes issue ASTERISK-17724)
  Reported by: Adiren P.
  Tested by: mjordan
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@326210 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-05 13:38:37 +00:00
David Vossel 1339a0a535 Video support for ConfBridge.
Review: https://reviewboard.asterisk.org/r/1288/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@325931 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-30 20:33:15 +00:00
Matthew Nicholson 82d28452ca copy all flags on asterisk frames instead of just the timing flag
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@325815 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-30 18:19:31 +00:00
Matthew Nicholson 1da3304813 Merged revisions 325545 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r325545 | mnicholson | 2011-06-29 11:18:39 -0500 (Wed, 29 Jun 2011) | 2 lines
  
  make framehooks prevent native bridging (for real this time)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@325547 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-29 16:19:01 +00:00
Matthew Nicholson 6c7d437287 Merged revisions 325537 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r325537 | mnicholson | 2011-06-29 10:34:47 -0500 (Wed, 29 Jun 2011) | 2 lines
  
  don't do native/remote bridging if a framehook is active on the channel
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@325538 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-29 15:36:20 +00:00
Tilghman Lesher db15b0010c Merged revisions 324955 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r324955 | tilghman | 2011-06-27 11:30:50 -0500 (Mon, 27 Jun 2011) | 5 lines
  
  Save and restore errno from within signal handlers.
  
  This is recommended by the POSIX standard, as well as by the sigaction(2) manpage
  for various platforms that we support (e.g. Mac OS X).
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@324961 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-27 16:32:19 +00:00
David Vossel d5ea9e5ae2 Merged revisions 324652 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r324652 | dvossel | 2011-06-23 13:23:21 -0500 (Thu, 23 Jun 2011) | 20 lines
  
  Merged revisions 324634 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r324634 | dvossel | 2011-06-23 13:18:46 -0500 (Thu, 23 Jun 2011) | 13 lines
    
    Merged revisions 324627 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r324627 | dvossel | 2011-06-23 13:16:52 -0500 (Thu, 23 Jun 2011) | 7 lines
      
      Addresses AST-2011-010, remote crash in IAX2 driver
      
      Thanks to twilson for identifying the issue and providing the patches.
      
      AST-2011-010
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@324664 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-23 18:26:09 +00:00
Terry Wilson 385b8c6f8b Merged revisions 324484 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r324484 | twilson | 2011-06-22 13:52:04 -0500 (Wed, 22 Jun 2011) | 20 lines
  
  Stop sending IPv6 link-local scope-ids in SIP messages
  
  The idea behind the patch listed below was used, but in a more targeted manner.
  There are now address stringification functions for addresses that are meant to
  be sent to a remote party. Link-local scope-ids only make sense on the machine
  from which they originate and so are stripped in the new functions.
  
  There is also a host sanitization function added to chan_sip which is used
  for when peer and dialog tohost fields or sip_registry hostnames are used to
  craft a SIP message.
  
  Also added are some basic unit tests for netsock2 address parsing.
  
  (closes issue ASTERISK-17711)
  Reported by: ch_djalel
  Patches:
        asterisk-1.8.3.2-ipv6_ll_scope.patch uploaded by ch_djalel (license 1251)
  
  Review: https://reviewboard.asterisk.org/r/1278/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@324487 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-22 19:12:24 +00:00
David Vossel 09a359449e Merged revisions 324364 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r324364 | dvossel | 2011-06-21 15:11:52 -0500 (Tue, 21 Jun 2011) | 10 lines
  
  Fixes locking inversion issue in ast_async_goto()
  
  During this function we can not hold the "chan" lock while
  doing the masquerade, the explicit goto on the tmp chan, or
  the channel alloc.  Instead we need to get the channel lock,
  store off information about the channel that we need, and
  then let the channel lock go for the remainder of the function.
  
  Review: https://reviewboard.asterisk.org/r/1275/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@324365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-21 20:15:41 +00:00
Leif Madsen 3d6c1ccd91 Merged revisions 324178 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r324178 | lmadsen | 2011-06-17 14:51:16 -0400 (Fri, 17 Jun 2011) | 2 lines
  
  Add Username and Secret fields to manager Login action.
  Pointed out by Vlad Povorozniuc
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@324179 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-17 18:52:33 +00:00
Leif Madsen 71e4b2a5d1 Merged revisions 324115 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r324115 | lmadsen | 2011-06-17 11:14:54 -0400 (Fri, 17 Jun 2011) | 3 lines
  
  Fix grammar in documentation for Goto() and GotoIf()
  (closes issue ASTERISK-18023)
  Reported by: Tim Osman
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@324131 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-17 15:32:08 +00:00
Terry Wilson 34e2305ae7 Merged revisions 324048 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r324048 | twilson | 2011-06-16 17:35:41 -0500 (Thu, 16 Jun 2011) | 8 lines
  
  Lock the channel before calling the setoption callback
  
  The channel needs to be locked before calling these callback functions. Also,
  sip_setoption needs to lock the pvt and a check p->rtp is non-null before using
  it.
  
  Review: https://reviewboard.asterisk.org/r/1220/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@324050 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-16 22:49:49 +00:00
Terry Wilson c33e1b0e27 Merged revisions 323754 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r323754 | twilson | 2011-06-15 13:21:52 -0500 (Wed, 15 Jun 2011) | 23 lines
  
  Merged revisions 323733 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r323733 | twilson | 2011-06-15 13:13:00 -0500 (Wed, 15 Jun 2011) | 16 lines
    
    Merged revisions 323732 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r323732 | twilson | 2011-06-15 13:06:24 -0500 (Wed, 15 Jun 2011) | 9 lines
      
      Fix DYNAMIC_FEATURES
      
      DYNAMIC_FEATURES were broken by a recent DTMF change. This patch makes
      sure that dynamic features are also checked when deciding whether or not
      to pass DTMF through or store it for interpreting.
      
      (closes issue ASTERISK-17914)
      Reported by: vrban
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@323760 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-15 18:23:20 +00:00
Richard Mudgett b2d0ea5fea Merged revisions 323669-323670 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r323669 | rmudgett | 2011-06-15 11:43:18 -0500 (Wed, 15 Jun 2011) | 21 lines
  
  [regression] Voicemail MWI is no longer sent.
  
  When leaving a voicemail, the MWI message is never sent.  The same thing
  happens when checking a voicemail and marking it as read.
  
  If you restart Asterisk, everything comes up at that state correctly, but
  changes to the messages in voicemail causes the light to not be set
  appropriately.  Very easy to reproduce.
  
  * Made ast_event_check_subscriber() return TRUE if there are ANY
  subscribers to an event type when there are no restricting ie values
  passed.  This allows an event being queued to be queued.
  
  (closes issue ASTERISK-18002)
  Reported by: lmadsen
  Tested by: lmadsen, irroot
  Patches:
       jira_asterisk_18002_v1.8.patch uploaded by rmudgett (License #5621)
  
  (closes issue ASTERISK-18019)
........
  r323670 | rmudgett | 2011-06-15 11:43:31 -0500 (Wed, 15 Jun 2011) | 7 lines
  
  Add a test to the event unit tests to catch ASTERISK-18002.
  
  The new tests check to see if there are ANY subscribers to the event type
  when ast_event_check_subscriber() is not passed any specific ie values.
  
  (issue ASTERISK-18002)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@323671 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-15 16:49:34 +00:00
Sean Bright affae67cd2 Merged revisions 323608 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r323608 | seanbright | 2011-06-15 11:31:53 -0400 (Wed, 15 Jun 2011) | 39 lines
  
  Merged revisions 323579 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r323579 | seanbright | 2011-06-15 11:22:50 -0400 (Wed, 15 Jun 2011) | 32 lines
    
    Merged revisions 323559 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r323559 | seanbright | 2011-06-15 11:15:30 -0400 (Wed, 15 Jun 2011) | 25 lines
      
      Resolve a segfault/bus error when we try to map memory that falls on a page
      boundary.
      
      The fix for ASTERISK-15359 was incorrect in that it added 1 to the length of the
      mmap'd region.  The problem with this is that reading/writing to that extra byte
      outside of the bounds of the underlying fd causes a bus error.
      
      The real issue is that we are working with both a FILE * and the raw fd
      underneath it and not synchronizing between them.  The code that was removed in
      ASTERISK-15359 was correct, but we weren't flushing the FILE * before mapping
      the fd.
      
      Looking at the manager code in 1.4 reveals that the FILE * in 'struct
      mansession' is never used except to create a temporary file that we immediately
      fdopen.  This means we just need to write a 0 byte to the fd and everything will
      just work.  The other branches require a call to fflush() which, while not a
      guaranteed fix, should reduce the likelihood of a crash.
      
      This all makes sense in my head.
      
      (closes issue ASTERISK-16460)
      Reported by: Ravelomanantsoa Hoby (hoby)
      Patches:
      		issue17747_1.4_svn_markII.patch uploaded by Sean Bright (license #5060)
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@323609 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-15 15:33:57 +00:00
Richard Mudgett 70d9527951 Merged revisions 323456 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r323456 | rmudgett | 2011-06-14 19:50:20 -0500 (Tue, 14 Jun 2011) | 1 line
  
  Add missing break in ast_event_get_cached().
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@323457 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-15 00:51:01 +00:00
Richard Mudgett 9ff8844c7f Merged revisions 323392,323394 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r323392 | rmudgett | 2011-06-14 12:21:24 -0500 (Tue, 14 Jun 2011) | 6 lines
  
  Add more strict hostname checking to ast_dnsmgr_lookup().
  
  Change suggested in review.
  
  Review: https://reviewboard.asterisk.org/r/1240/
........
  r323394 | rmudgett | 2011-06-14 12:21:39 -0500 (Tue, 14 Jun 2011) | 2 lines
  
  Made ast_sockaddr_split_hostport() port warning msgs more meaningful.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@323397 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-14 17:22:26 +00:00
Terry Wilson abd7ef817e Merged revisions 323370 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r323370 | twilson | 2011-06-14 09:33:55 -0700 (Tue, 14 Jun 2011) | 10 lines
  
  Add rtpkeepalives back to 1.8
  
  The RTP-engine conversion left out support for handling rtpkeepalives.
  This patch adds them back.
  
  (closes issue ASTERISK-17304)
  Reported by: lmadsen
  
  Review: https://reviewboard.asterisk.org/r/1226/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@323374 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-14 17:03:37 +00:00
Leif Madsen dafa8a659b Merged revisions 323213 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r323213 | lmadsen | 2011-06-13 15:51:52 -0400 (Mon, 13 Jun 2011) | 6 lines
  
  Avoid dividing by zero with L() option to Dial()
  
  Reported by: nicolasom
  Patches:
      
  issue-17995.patch - nicolasom (License #5994)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@323214 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-13 19:54:27 +00:00
Terry Wilson 58ca560291 Merged revisions 322981 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r322981 | twilson | 2011-06-10 08:29:00 -0700 (Fri, 10 Jun 2011) | 11 lines
  
  Avoid a DB1 infinite loop bug
  
  Explicity check the last entry in the DB and make sure that we don't iterate
  past it. Since there can be no duplicates, this just makes sure that we stop
  after matching the last key.
  
  This patch also refactors the code to get away from some code duplication. A
  previous patch added many astdb tests and this patch passed them.
  
  Review: https://reviewboard.asterisk.org/r/1259/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@322982 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-10 15:30:50 +00:00
Richard Mudgett 0a8f9d2cf0 Merged revisions 322749 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r322749 | rmudgett | 2011-06-09 11:31:53 -0500 (Thu, 09 Jun 2011) | 15 lines
  
  Remove potential deadlock in call pickup race.
  
  Deadlock is possible in ast_do_pickup() when holding the target channel
  lock and trying to get the chan channel lock.  Also, holding the target
  lock when calling ast_channel_masquerade() is not a good idea because that
  routine does deadlock avoidance.
  
  * Removed the need to hold the target lock after marking the target with a
  datastore and getting the connected line data off of the target channel.
  
  * Moved can_pickup() to ast_can_pickup() in features.c.  Now all the call
  pickup methods use the same basic call pickup availability check.
  
  Review: https://reviewboard.asterisk.org/r/1234/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@322750 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-09 16:47:07 +00:00
Richard Mudgett 4b773e2ed9 Merged revisions 322425 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r322425 | rmudgett | 2011-06-08 13:46:30 -0500 (Wed, 08 Jun 2011) | 16 lines
  
  SRV lookup attempted for SIP peers listed as an IP address.
  
  Asterisk attempts to SRV lookup a host name even if the host name is an IP
  address.  Regression introduced when IPv6 support was added.
  
  * Restored the check in ast_dnsmgr_lookup() to see if the given host name
  is an IP address.  The IP address could be in either IPv4 or IPv6 formats.
  
  (closes issue ASTERISK-17815)
  Reported by: Byron Clark
  Tested by: Byron Clark, Richard Mudgett
  Patches:
       issue19248_v1.8.patch - uploaded by Richard Mudgett (License #5621)
  
  Review: https://reviewboard.asterisk.org/r/1240/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@322426 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-08 18:48:16 +00:00
Jonathan Rose 4ab3825fe4 Merged revisions 322069 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r322069 | jrose | 2011-06-06 14:07:56 -0500 (Mon, 06 Jun 2011) | 8 lines
  
  Fixes level toggling for logger set levels since it was reversed
   
  (closes issue ASTERISK-17850)
  Reported by: Luke H
  Tested by: jrose, Luke H
    
  Review: https://reviewboard.asterisk.org/r/1244/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@322070 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-06 19:15:10 +00:00
Richard Mudgett 31bcafab5b Merged revisions 321924 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r321924 | rmudgett | 2011-06-03 16:49:17 -0500 (Fri, 03 Jun 2011) | 5 lines
  
  Be more explicit for CCSS generic device state event subscription.
  
  Make CCSS generic device state event subscription specify the
  AST_EVENT_IE_STATE ie exists to be safe.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@321925 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-03 21:49:58 +00:00
Richard Mudgett 85aa126b34 Merged revisions 321871 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r321871 | rmudgett | 2011-06-03 15:58:13 -0500 (Fri, 03 Jun 2011) | 27 lines
  
  Event subscription fixes.
  
  Must commit the subscription fixes together with the integration
  subscription tests.  The subscription fixes cause an erroneously passing
  test to fail.  The new subscription tests detect errors without the
  subscription fixes.
  
  * Added missing event_names[] table entry.
  
  * Reworked ast_event_check_subscriber()/match_sub_ie_val_to_event() to
  correctly detect if a subscriber exists for the proposed event.
  
  * Made match_ie_val() and match_sub_ie_val_to_event() check the buffer
  length for RAW payload types.
  
  * Fixed error handling memory leak in ast_event_sub_activate(),
  ast_event_unsubscribe(), and ast_event_queue().
  
  * Made ast_event_new() and ast_event_check_subscriber() better protect
  themselves from an invalid payload type.
  
  * Added container lock protection between removing old cache events and
  adding the new cached event in
  ast_event_queue_and_cache()/event_update_cache().
  
  * Added new event subscription tests.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@321872 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-03 21:02:32 +00:00
Richard Mudgett 397c379a7d Merged revisions 321812-321813 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r321812 | rmudgett | 2011-06-03 14:55:21 -0500 (Fri, 03 Jun 2011) | 1 line
  
  Correct IAX2 and SIP event subscription description string.
........
  r321813 | rmudgett | 2011-06-03 14:56:09 -0500 (Fri, 03 Jun 2011) | 1 line
  
  Constify subscription description parameter string.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@321814 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-03 19:57:03 +00:00
Russell Bryant 6357719a82 Fix some astobj2 iterator breakage, add another unit test.
Review: https://reviewboard.asterisk.org/r/1254/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@321752 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-03 18:25:11 +00:00
Richard Mudgett 49927bcbb8 Merged revisions 321547 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r321547 | rmudgett | 2011-06-01 18:11:55 -0500 (Wed, 01 Jun 2011) | 1 line
  
  CDR comment tweaks.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@321548 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-01 23:12:25 +00:00
Russell Bryant 3f4d0e8743 Support routing text messages outside of a call.
Asterisk now has protocol independent support for processing text messages
outside of a call.  Messages are routed through the Asterisk dialplan.
SIP MESSAGE and XMPP are currently supported.  There are options in sip.conf
and jabber.conf that enable these features.

There is a new application, MessageSend().  There are two new functions,
MESSAGE() and MESSAGE_DATA().  Documentation will be available on
the project wiki, wiki.asterisk.org.

Thanks to Terry Wilson for the assistance with development and to David Vossel
for helping with some additional testing.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@321546 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-01 21:31:40 +00:00
Richard Mudgett 9d8943868c Merged revisions 321392 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r321392 | rmudgett | 2011-05-27 18:45:41 -0500 (Fri, 27 May 2011) | 12 lines

  Crash when using hagi and no servers are available.

  When none of the servers returned by the SRV querey respond, asterisk
  crashes.  The problem is that if the loop over all the SRV entries
  finishes then the srv_context has already been cleaned up.

  * Make ast_srv_cleanup() check to see if the context is already cleaned
  up.

  (closes issue #19256)
  Reported by: byronclark
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@321393 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-27 23:46:07 +00:00
Leif Madsen a2ca0997a6 Merged revisions 321333 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r321333 | lmadsen | 2011-05-27 17:40:23 -0400 (Fri, 27 May 2011) | 7 lines
  
  Allow parking lot hints and musicclass to be set.
  
  (closes issue #19378)
  Reported by: sboily_proformatique
  Patches:
        pf_parkinghint_music_fix uploaded by sboily proformatique (license 206)
  Tested by: russell
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@321334 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-27 21:40:52 +00:00
Alec L Davis 7cc83a9018 Merged revisions 321211 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r321211 | alecdavis | 2011-05-27 20:31:15 +1200 (Fri, 27 May 2011) | 16 lines
  
  Fix *8 directed pickup locks system during pickupsound play out
  
  move playout from sip_pickup_thread to bridge using BRIDGE_PLAY_SOUND method,
  This stop the clash of 2 threads trying to write audio to same channel.
  In addition fixes choppy audio beep in issue 19177.
   
   (issue #18654)
   (issue #19177)
   Reported by: Docent
   Patches: 
        review1232-1.8.diff.txt alecdavis (license 585)
   Tested by: alecdavis
   
  Review: https://reviewboard.asterisk.org/r/1232/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@321212 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-27 08:37:59 +00:00
Mark Murawki 0648d9595b Merged revisions 321100 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r321100 | markm | 2011-05-26 16:09:35 -0400 (Thu, 26 May 2011) | 11 lines
  
  ast_sockaddr_resolve() in netsock2.c may deref a null pointer
  
  Added a null check in netsock2 ast_sockaddr_resolve() as well as added default initalizers in chan_sip parse_uri_legacy_check() to make sure that invalid uris will make null (and not undefined) user,pass,domain,transport variables
  
  (closes issue #19346)
  Reported by: kobaz
  Patches: 
        netsock2.patch uploaded by kobaz (license 834)
  Tested by: kobaz, Marquis
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@321101 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-26 20:16:28 +00:00
Terry Wilson 0c34e54d1a Merged revisions 321042 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r321042 | twilson | 2011-05-26 10:29:54 -0700 (Thu, 26 May 2011) | 6 lines
  
  Initialize stack-allocated ast_sockaddrs before use
  
  It is important to always initialize ast_sockaddrs before use--even if they
  are passed to ast_sockaddr_copy as the underlying storage could be bigger
  than what ends up being copied--leaving part of the data unitialized.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@321043 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-26 17:35:55 +00:00
Terry Wilson fc8d4e823c Use va_copy for stringfields
The ast_string_field_build_va functions were written to take to separate
va_lists to work around FreeBSD 4 not having va_copy defined.

In the end, we don't support anything using gcc < 3 anyway because we use
va_copy all over the place anyway. This patch just simplifies things by
removing the second va_list function arguments in favor of va_copy.

Review: https://reviewboard.asterisk.org/r/1233/
--This line, and those below, will be ignored--

M    include/asterisk/stringfields.h
M    main/utils.c
M    main/channel.c


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@320946 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-26 15:55:22 +00:00
Richard Mudgett 0096238b52 Merged revisions 320823 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r320823 | rmudgett | 2011-05-25 12:06:38 -0500 (Wed, 25 May 2011) | 18 lines
  
  The AMI Newstate event contains different information between v1.4 and v1.8.
  
  The addition of connected line support in v1.8 changes the behavior of the
  channel caller ID somewhat.  The channel caller ID value no longer time
  shares with the connected line ID on outgoing call legs.  The timing of
  some AMI events/responses output the connected line ID as caller ID.
  These party ID's are now separate.
  
  * The ConnectedLineNum and ConnectedLineName headers were added to many
  AMI events/responses if the CallerIDNum/CallerIDName headers were also
  present.
  
  (closes issue #18252)
  Reported by: gje
  Tested by: rmudgett
  
  Review: https://reviewboard.asterisk.org/r/1227/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@320825 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-25 17:14:11 +00:00
Richard Mudgett a42bf8cc92 Merged revisions 320796 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r320796 | rmudgett | 2011-05-25 11:23:11 -0500 (Wed, 25 May 2011) | 17 lines
  
  Give zombies a safe channel driver to use.
  
  Recent crashes from zombie channels suggests that they need a safe home to
  goto.  When a masquerade happens, the physical part of the zombie channel
  is hungup.  The hangup normally sets the channel private pointer to NULL.
  If someone then blindly does a callback to the channel driver, a crash is
  likely because the private pointer is NULL.
  
  The masquerade now sets the channel technology of zombie channels to the
  kill channel driver.
  
  Related to the following issues:
  (issue #19116)
  (issue #19310)
  
  Review: https://reviewboard.asterisk.org/r/1224/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@320820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-25 16:50:38 +00:00
Richard Mudgett 024e4bd0f7 Merged revisions 320650 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r320650 | rmudgett | 2011-05-23 12:53:44 -0500 (Mon, 23 May 2011) | 16 lines
  
  Add ConnectedLineNum/Name headers to output of AMI action Status.
  
  * Add ConnectedLineNum and ConnectedLineName headers to the output of the
  AMI action Status.  This makes it easier to find out who the channel is
  connected to without having to lookup BridgedChannel or when they are
  connected to an application (e.g.: VoiceMail) which has no bridged
  channel.
  
  * Bridged channels with no CallerID had "" instead of "<unknown>" output,
  that might be a bug as "<unknown>" was what older versions used.
  
  (closes issue #18158)
  Reported by: gareth
  Patches:
        svn-292308.diff uploaded by gareth (license 208)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@320651 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-23 18:00:02 +00:00
David Vossel 181e91a213 Merged revisions 320568 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r320568 | dvossel | 2011-05-23 11:18:33 -0500 (Mon, 23 May 2011) | 14 lines
  
  Merged revisions 320562 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r320562 | dvossel | 2011-05-23 11:15:18 -0500 (Mon, 23 May 2011) | 9 lines
    
    Adds missing part to the ast_tcptls_server_start fails second attempt to bind patch.
    
    (closes issue #19289)
    Reported by: wdoekes
    Patches: 
          issue19289_delay_old_address_setting_tcptls_2.patch uploaded by wdoekes (license 717)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@320606 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-23 16:28:14 +00:00
David Vossel 67637652f4 Merged revisions 320338 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r320338 | dvossel | 2011-05-20 16:39:36 -0500 (Fri, 20 May 2011) | 14 lines
  
  Merged revisions 320271 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r320271 | dvossel | 2011-05-20 16:24:48 -0500 (Fri, 20 May 2011) | 8 lines
    
    Fixes issue with ast_tcptls_server_start failing on second attempt to bind.
    
    (closes issue #19289)
    Reported by: wdoekes
    Patches: 
          issue19289_delay_old_address_setting_tcptls.patch uploaded by wdoekes (license 717)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@320340 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-20 21:40:19 +00:00
Richard Mudgett 2af231dd91 Merged revisions 320059 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r320059 | rmudgett | 2011-05-20 12:03:49 -0500 (Fri, 20 May 2011) | 1 line
  
  Misc comment cleanup in features.c.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@320060 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-20 17:04:53 +00:00
Richard Mudgett ae091d166a Merged revisions 320057 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r320057 | rmudgett | 2011-05-20 11:43:02 -0500 (Fri, 20 May 2011) | 19 lines
  
  Crash while transferring a call during DTMF feature timeout.
  
  When a call is being attended transferred during the time between
  AST_FRAME_DTMF_BEGIN and AST_FRAME_DTMF_END, the transferred channel
  becomes a zombie (so tech data is not available), making ast_dtmf_stream()
  segfault when it tries to send the DTMF digit (at least with SIP
  channels).
  
  Patch based on feature-end-zombie.patch uploaded by Irontec (license 1256)
  
  * Check for zombies when ast_channel_bridge() returns.
  
  * Guarantee that the fo parameter value is initialized in
  ast_channel_bridge() before any returns.
  
  (closes issue #19116)
  Reported by: Irontec
  Tested by: rmudgett
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@320058 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-20 16:46:02 +00:00
Richard Mudgett b1cfd0e059 Merged revisions 320007 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r320007 | rmudgett | 2011-05-20 11:19:01 -0500 (Fri, 20 May 2011) | 2 lines
  
  Change some variable names to make pickup code easier to understand.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@320013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-20 16:20:25 +00:00
Richard Mudgett 0436c501c9 Merged revisions 319997 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r319997 | rmudgett | 2011-05-20 10:48:25 -0500 (Fri, 20 May 2011) | 25 lines
  
  Crash when using directed pickup applications.
  
  The directed pickup applications can cause a crash if the pickup was
  successful because the dialplan keeps executing.
  
  This patch does the following:
  
  * Completes the channel masquerade on a successful pickup before the
  application returns.  The channel is now guaranteed a zombie and must not
  continue executing the dialplan.
  
  * Changes the return value of the directed pickup applications to return
  zero if the pickup failed and nonzero(-1) if the pickup succeeded.
  
  * Made some code optimizations that no longer require re-checking the
  pickup channel to see if it is still available to pickup.
  
  (closes issue #19310)
  Reported by: remiq
  Patches:
        issue19310_v1.8_v2.patch uploaded by rmudgett (license 664)
  Tested by: alecdavis, remiq, rmudgett
  
  Review: https://reviewboard.asterisk.org/r/1221/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@319998 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-20 15:52:20 +00:00
Jonathan Rose 87004f0d9f Merged revisions 319866 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r319866 | jrose | 2011-05-19 13:32:38 -0500 (Thu, 19 May 2011) | 11 lines
  
  Fix Randomize option on Park()
  
  The randomize option was generally not working like it should have at all on Park().
  This patch restores intended functionality.
  
  (closes issue #18862)
  Reported by: davidw
  Tested by: jrose
  
  Review: https://reviewboard.asterisk.org/r/1222/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@319867 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-19 18:36:38 +00:00
Richard Mudgett b33fc4db48 Merged revisions 319758 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r319758 | rmudgett | 2011-05-19 11:50:48 -0500 (Thu, 19 May 2011) | 21 lines
  
  CCSS generic agent with POTS and ISDN phones fail caller busy call-back test.
  
  If the following is true after a CCSS activation:
  * The generic agent is for an analog phone or ISDN phone.  (Caller party)
  * The called party becomes available.
  * The caller party is not available.
  
  When the caller party becomes available, the caller is not alerted to the
  called party being available.  The generic agent still thinks the caller
  is busy.
  
  * Fixed the generic agent device state event subscription to look for all
  device states that are considered available.
  
  * Encapsulated the device state test for CCSS generic device available in
  cc_generic_is_device_available().  Made the generic agent and monitor use
  the new function instead of the manually coded inline equivalent.
  
  JIRA AST-559
  JIRA SWP-3462
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@319759 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-19 16:52:47 +00:00
Jonathan Rose 1de75f0a4d Merged revisions 319261 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r319261 | jrose | 2011-05-16 16:00:55 -0500 (Mon, 16 May 2011) | 2 lines
  
  Makes busy detection in dsp.c always allow for at least one frame (20ms) of error so that 200ms tone lengths don't get ignored by single frame error lengths.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@319262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-16 21:08:50 +00:00
Richard Mudgett eddc32a3b3 Merged revisions 319259 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r319259 | rmudgett | 2011-05-16 15:33:37 -0500 (Mon, 16 May 2011) | 13 lines
  
  Deadlock between generic CCSS agent and native ISDN CCSS.
  
  Deadlock can occur when the generic CCSS agent is deleting duplicate CC
  offers and the native ISDN CC driver is processing an incoming CC message.
  The cc_core_instances container lock cannot be held when an agent or
  monitor callback is invoked without the possibility of a deadlock.
  
  * Make kill_duplicate_offers() remove the reference in cc_core_instances
  outside of the container lock.
  
  JIRA AST-566
  JIRA SWP-3469
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@319260 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-16 20:41:31 +00:00
Brett Bryant 475ef22b20 Merged revisions 318921 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r318921 | bbryant | 2011-05-13 14:09:34 -0400 (Fri, 13 May 2011) | 8 lines
  
  Fixes a segmentation fault in dynamic hints when a channel technology isn't
  loaded for a hint.
  
  (closes issue #18495)
  Reported by: bertrand
  Tested by: bertrand
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@318922 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-13 18:10:45 +00:00
Richard Mudgett db89abf0bd Merged revisions 318868 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r318868 | rmudgett | 2011-05-13 11:28:26 -0500 (Fri, 13 May 2011) | 19 lines
  
  CDR's are being written immediately on caller hangup.
  
  CDR's are being written immediately on caller hangup.  The dialplan is not
  able to modify it in the h exten.  The h exten in the initial context is
  not run before closing CDR's when the bridge is unlinked if a macro is
  active and does not have an h exten.
  
  * Make ast_bridge_call() check for an h exten in the current context and
  if a macro is active then the initial context.  The first h exten found is
  then run before closing the CDR.
  
  (closes issue #18212)
  Reported by: leearcher
  Patches:
        issue18212_v1.8.patch uploaded by rmudgett (license 664)
  Tested by: rmudgett
  
  Review: https://reviewboard.asterisk.org/r/1206/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@318869 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-13 16:30:29 +00:00
Alec L Davis 892b7a2efd Merged revisions 318671 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r318671 | alecdavis | 2011-05-13 10:52:08 +1200 (Fri, 13 May 2011) | 30 lines
  
  Fix directed group pickup feature code *8 with pickupsounds enabled 
  
  Since 1.6.2, the new pickupsound and pickupfailsound in features.conf cause many issues.
  
  1). chan_sip:handle_request_invite() shouldn't be playing out the fail/success audio, as it has 'netlock' locked.
  2). dialplan applications for directed_pickups shouldn't beep.
  3). feature code for directed pickup should beep on success/failure if configured.
  
  Created a sip_pickup() thread to handle the pickup and playout the audio, spawned from handle_request_invite.
  
  Moved app_directed:pickup_do() to features:ast_do_pickup().
  
  Functions below, all now use the new ast_do_pickup()
  app_directed_pickup.c:
     pickup_by_channel()
     pickup_by_exten()
     pickup_by_mark()
     pickup_by_part()
  features.c:
     ast_pickup_call()
  
  (closes issue #18654)
  Reported by: Docent
  Patches: 
        ast_do_pickup_1.8_trunk.diff.txt uploaded by alecdavis (license 585)
  Tested by: lmadsen, francesco_r, amilcar, isis242, alecdavis, irroot, rymkus, loloski, rmudgett
  
  Review: https://reviewboard.asterisk.org/r/1185/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@318672 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-12 22:56:43 +00:00
Richard Mudgett bf57bb3c89 Merged revisions 318282 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r318282 | rmudgett | 2011-05-09 14:07:01 -0500 (Mon, 09 May 2011) | 24 lines
  
  Hangup extension executed twice.
  
  When a user hangs up a call, in certain circumstances, the hangup
  extension can end up being executed twice:
  
  1) If a call is bridged and the 'h' extension executes the Hangup
  application, then the 'h' extension will be executed twice.
  
  2) If a call is bridged within a macro (Dial or Queue), it has its own 'h'
  extension, the main context also has an 'h' extension, and the macro 'h'
  extension executes the Hangup application, then both 'h' extensions will
  be executed.
  
  * Revert originally commited fix for #16106 and just set
  AST_FLAG_BRIDGE_HANGUP_RUN unconditionally in ast_bridge_call().  The
  bridge code just executed an 'h' extension so the main PBX loop does not
  need to execute one as well.
  
  (issue #16106)
  Reported by: ajohnson
  
  (issue #16548)
  Reported by: hajekd
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@318283 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-09 19:09:16 +00:00
Leif Madsen f2df0ed9f1 Increase prepend filename length.
(closes issue #19238)
Reported by: byronclark
Patches: 
      increase_prepend_filename_length.patch uploaded by byronclark (license 1200)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@318194 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-09 14:41:33 +00:00
Jonathan Rose ff4c7d46c0 Minor change to 318141 to improve parsing behavior.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@318193 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-09 14:37:10 +00:00
Matthew Nicholson 5b77bb5060 Merged revisions 318142 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r318142 | mnicholson | 2011-05-09 09:09:38 -0500 (Mon, 09 May 2011) | 9 lines
  
  Make indicate/control frames WRITE events on framehooks.  Also, if a framehook
  returns a non-control frame, don't forward it to the channel.
  
  (closes issue #19251)
  Reported by: irroot
  Patches:
        (modified) framehook_indicate.patch2 uploaded by irroot (license 52)
  Tested by: irroot
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@318143 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-09 14:11:57 +00:00
Jonathan Rose 229e066dcb Allows ParkedCall application to specify a parkinglot.
When invoking the app parkedcall, the argument can now include '@parkinglot' after the
extension.

(closes issue #18777)
Reported by: cartama
Patches:
      0018777.diff uploaded by cartama (license 1157)

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@318141 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-09 13:56:32 +00:00
Russell Bryant c73ea18012 Merged revisions 317917 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r317917 | russell | 2011-05-06 16:06:33 -0500 (Fri, 06 May 2011) | 7 lines
  
  Fix calculation of free RAM to make minmemfree option work.
  
  (closes issue #17124)
  Reported by: loic
  Patches:
        pbx_c.diff uploaded by loic (license 1020)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@317919 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-06 21:07:49 +00:00
Russell Bryant c28e2d380c Merged revisions 317429 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r317429 | russell | 2011-05-05 17:11:19 -0500 (Thu, 05 May 2011) | 5 lines
  
  Only display inband DTMF warning if inband DTMF detection is enabled.
  
  (closes issue #18901)
  Reported by: irroot
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@317430 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-05 22:12:10 +00:00
Russell Bryant 19b45ad446 Merged revisions 317425 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r317425 | russell | 2011-05-05 16:53:13 -0500 (Thu, 05 May 2011) | 7 lines
  
  Add missing ActioID handling to Events action.
  
  (closes issue #18949)
  Reported by: edersohe
  Patches:
        0018949.patch uploaded by edersohe (license 1228)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@317426 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-05 21:54:17 +00:00
Sean Bright d508a921bf Add some new editline bindings by default, and allow for user specified configuration.
I excluded the part of this patch that used the HOME environment variable since
the built-in editline library goes to great lengths to disallow that.  Instead
only settings the EDITRC environment variable will use a user specified file.

Also, the default environment variable use to determine the edit more is
AST_EDITMODE instead of AST_EDITOR (although the latter is still supported).

(closes issue #15929)
Reported by: kkm
Patches:
      astcli-editrc-v2.diff uploaded by kkm (license 888)
      015929-astcli-editrc-trunk.240324.diff uploaded by kkm (license 888)
Tested by: seanbright


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@317395 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-05 21:20:00 +00:00
Stefan Schmidt 19eb6c7384 Adding the Move to Front Hash functionality
Moving a found object to the front of its bucket to reduce the necessary traversal steps to find an object. This change improves the search time on large system with many data or in link lists.

(closes issue #19233)
Reported by: schmidts

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@316962 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-05 07:09:20 +00:00
Sean Bright fe5938c51e Merged revisions 316917-316919 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r316917 | seanbright | 2011-05-04 22:23:28 -0400 (Wed, 04 May 2011) | 5 lines
  
  Make sure that tcptls_session is properly initialized.
  
  (issue #18598)
  Reported by: ksn
........
  r316918 | seanbright | 2011-05-04 22:25:20 -0400 (Wed, 04 May 2011) | 5 lines
  
  Look at the correct buffer for our digest info instead of an empty one.
  
  (issue #18598)
  Reported by: ksn
........
  r316919 | seanbright | 2011-05-04 22:30:45 -0400 (Wed, 04 May 2011) | 10 lines
  
  Use the correct HTTP method when generating our digest, otherwise we always fail.
  
  When calculating the 'A2' portion of our digest for verification, we need the
  HTTP method that is currently in use.  Unfortunately our mapping function was
  incorrect, resulting in invalid hashes being generated and, in turn, failures
  in authentication.
  
  (closes issue #18598)
  Reported by: ksn
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@316920 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-05 02:34:29 +00:00
Sean Bright 34734f727f Merged revisions 316663 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r316663 | seanbright | 2011-05-04 10:35:05 -0400 (Wed, 04 May 2011) | 8 lines
  
  Only return a single error via AMI when requesting a forbidden action.
  
  (closes issue #19216)
  Reported by: oej
  Patches:
        issue19216-1.8-r316204.patch uploaded by seanbright (license 71)
  Tested by: seanbright
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@316664 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-04 14:40:08 +00:00
David Vossel f4417923ce Merged revisions 316334 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r316334 | dvossel | 2011-05-03 17:05:59 -0500 (Tue, 03 May 2011) | 8 lines
  
  Fixes framehook segfault on indicate
  
  (closes issue #19215)
  Reported by: irroot
  Patches: 
        framehook_indicate.patch uploaded by irroot (license 52)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@316335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-03 22:07:18 +00:00
Russell Bryant 37aa52fd78 Merged revisions 316265 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r316265 | russell | 2011-05-03 14:55:49 -0500 (Tue, 03 May 2011) | 5 lines
  
  Fix a bunch of compiler warnings generated by gcc 4.6.0.
  
  Most of these are -Wunused-but-set-variable, but there were a few others
  mixed in here, as well.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@316293 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-03 20:45:32 +00:00
Sean Bright a52395aaee Merged revisions 316206 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r316206 | seanbright | 2011-05-03 14:17:36 -0400 (Tue, 03 May 2011) | 8 lines
  
  If we aren't interested in events, don't generate the FullyBooted event on AMI login.
  
  (closes issue #19089)
  Reported by: bklang
  Patches:
        issue19089-1.8-r316204.patch uploaded by seanbright (license 71)
  Tested by: seanbright
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@316213 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-03 18:23:03 +00:00
David Vossel 237d47b010 Clears exception flag during ast_read when func_jitterbuffer is enabled
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@315855 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-27 17:44:02 +00:00
Russell Bryant 98f94daf88 Merged revisions 315810 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r315810 | russell | 2011-04-27 10:55:48 -0500 (Wed, 27 Apr 2011) | 2 lines
  
  Set the copyright year to 2011 in the startup message.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@315811 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-27 15:56:44 +00:00
Terry Wilson 8d2a71877a Merged revisions 315644 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r315644 | twilson | 2011-04-26 14:39:01 -0700 (Tue, 26 Apr 2011) | 32 lines
  
  Merged revisions 315643 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r315643 | twilson | 2011-04-26 14:27:44 -0700 (Tue, 26 Apr 2011) | 25 lines
    
    Merged revisions 315596 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r315596 | twilson | 2011-04-26 14:16:10 -0700 (Tue, 26 Apr 2011) | 18 lines
      
      Allow transfer loops without allowing forwarding loops
      
      We try to avoid the situation where two phones may be forwarded to each other
      causing an infinite loop by storing each dialed interface in a channel
      datastore and checking the list before dialing out. This works, but currently
      breaks situations like A calls B, A transfers B to C, B transfers C to A, and A
      transfers C to B. Since human interaction is happening here and not an
      automated forwarding loop, it should be allowed.
      
      This patch removes the dialed_interfaces datastore when a call is bridged (a
      suggestion from the brilliant mmichelson). If a call is being bridged, it
      should be safe to assume that we aren't stuck in a loop.
      
      Since we are now handling this is the bridge code, the previous attempts at
      handling it in app_dial and app_queue are removed.
      
      Review: https://reviewboard.asterisk.org/r/1195/
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@315670 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-26 22:26:37 +00:00
Richard Mudgett 24b6939496 Merged revisions 315645 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r315645 | rmudgett | 2011-04-26 17:14:31 -0500 (Tue, 26 Apr 2011) | 21 lines
  
  The 'e' special extension fails to trigger in at least two cases.
  
  The 'e' extension is a fall back for the 'i', 't', or 'T' extensions if
  any of them do not exist.  Many of the places the 'e' extension was
  supposed to be invoked fail because the priority was set wrong.  There
  were two places where the 'e' extension was not even checked for fall
  back.
  
  * Made invoke the 'e' extension similarly to the previous 'i', 't', or 'T'
  extension check and added the 'e' extension as a fall back to the two
  missing locations.
  
  * Prioritized and optimized some hangup tests associated with the 'e'
  extension.
  
  (closes issue #19136)
  Reported by: kshumard
  Tested by: rmudgett
  
  Review: https://reviewboard.asterisk.org/r/1196/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@315649 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-26 22:18:41 +00:00
Matthew Nicholson 079e794b1c Merged revisions 314628 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r314628 | mnicholson | 2011-04-21 13:24:05 -0500 (Thu, 21 Apr 2011) | 27 lines
  
  Merged revisions 314620 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r314620 | mnicholson | 2011-04-21 13:22:19 -0500 (Thu, 21 Apr 2011) | 20 lines
    
    Merged revisions 314607 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r314607 | mnicholson | 2011-04-21 13:19:21 -0500 (Thu, 21 Apr 2011) | 14 lines
      
      Added limits to the number of unauthenticated sessions TCP based protocols are allowed to have open simultaneously.  Also added timeouts for unauthenticated sessions where it made sense to do so.
      
      Unrelated, the manager interface now properly checks if the user has the "system" privilege before executing shell commands via the Originate action. 
      
      AST-2011-005
      AST-2011-006
      
      (closes issue #18787)
      Reported by: kobaz
      
      (related to issue #18996)
      Reported by: tzafrir
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@314666 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-21 18:32:50 +00:00
David Vossel 7f23115ad2 New HD ConfBridge conferencing application.
Includes a new highly optimized and customizable
ConfBridge application capable of mixing audio at
sample rates ranging from 8khz-192khz.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@314598 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-21 18:11:40 +00:00
David Vossel 18d591cb48 Introduction of the JITTERBUFFER dialplan function.
Review: https://reviewboard.asterisk.org/r/1157/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@314509 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-20 20:52:15 +00:00
Terry Wilson 632cd26411 Merged revisions 314358 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r314358 | twilson | 2011-04-19 22:25:15 -0700 (Tue, 19 Apr 2011) | 4 lines
  
  Initialize track pointer
  
  ast_reentrancy_init checks to see if it is NULL before initializing with calloc
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@314359 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-20 05:28:36 +00:00
Leif Madsen 02821fc5b4 Merged revisions 314251 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r314251 | lmadsen | 2011-04-19 10:42:10 -0500 (Tue, 19 Apr 2011) | 8 lines
  
  Use SSLv23_client_method instead of old SSLv2 only.
  
  (closes issue #19095)
  (closes issue #19138)
  Reported by: tzafrir
  Patches: 
        no_ssl2.diff uploaded by tzafrir (license 46)
  Tested by: russell, chazzam
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@314252 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-19 15:42:32 +00:00
David Vossel 4b4549106b Merged revisions 314017 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r314017 | dvossel | 2011-04-18 08:41:06 -0500 (Mon, 18 Apr 2011) | 17 lines
  
  sip codec negotiation of dynamic rtp payloads error fix
  
  This patch fixes how chan_sip handles dynamic rtp payload types
  it does not understand.  At the moment if a dynamic payload's mime
  type does not match one we understand, the payload does not get
  removed from our payload table.  As a result of this, the payload
  is set to whatever dynamic codec we use internally for that payload
  number on outgoing INVITES.  This is incorrect.
  
  This patch fixes this by properly checking the rtpmap set function's
  return code to make sure it was found.  The function can return both
  -1 and -2 depending on the source of the mismatch.  We were just
  checking -1 explicitly.
  
  Review: https://reviewboard.asterisk.org/r/1169/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@314018 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-18 13:42:51 +00:00
Jonathan Rose 05ddffccc4 Merged revisions 313860 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r313860 | jrose | 2011-04-15 10:08:05 -0500 (Fri, 15 Apr 2011) | 17 lines
  
  Merged revisions 313859 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r313859 | jrose | 2011-04-15 09:58:37 -0500 (Fri, 15 Apr 2011) | 10 lines
    
    Fix a Tab Completion bug that occurs due to multiple matches on a substring.
    
    Makes word_match function in cli.c repeat a search for a command string until
    a proper match is found or the string is searched to the last point.
    
    (closes issue #17494)
    Reported by: ffossard
    
    Review: https://reviewboard.asterisk.org/r/1180/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@313867 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-15 15:20:46 +00:00
Richard Mudgett ae2926b5d0 Add Device State Information CCSS for Generic Devices.
Add Asterisk Device State information and callbacks to the Call Completion
Supplemental Services for generic agents.

There are currently not many devices that have native support for CCSS.
Even as the devices become available there may be other reasons why one
may choose to not take advantage of the native abilities and stick with
the generic implementation.  The generic implementation is quite capable
and could be greatly enhanced by adding device state capabilities.  A
phone could then subscribe to the device state with a BLF key in
conjunction with Asterisk hints.

The advantages of the device state information would allow a single button
to: request CCSS, cancel a CCSS request, and display the current state of
a CCSS request.

For example, you may have a single button that when not lit, there is no
active CCSS request.  When you press that button, the dialplan can query
the DEVICE_STATE() associated with that caller to determine whether they
should be calling CallCompletionRequest() or CallCompletionCancel().  If
there is currently a pending request, then the dialplan would cancel it.
This also has the advantage of showing the true state of a request, which
is an asynchronous call, even when CallCompletionRequest() thinks it was
successful.  The actual request could ultimately fail.  Once lit, further
feedback can be provided to the caller about the current state of their
request since it will be updated by the CCSS State Machine as appropriate.

The DEVICE_STATE mapping is configurable since the BLF being used on a
given phone type may vary.  The idea is to allow some level of
customization as to the phone's behavior.

As an example, you may want the BLF key to go solid once you have
requested a callback.  You may then want the LED to blink (typically
ringing) when either the callback is in process, which is a visual
indication that the incoming call is the desired callback.  You may want
it to blink when the callee is ready but you are busy, giving you a visual
indication that the target is available as you may want to get off the
line so that the callback can be successful.

Device state information is sent back via the ast_devstate_prov_add()
callback for any generic CCSS device as it traverses through the state
machine.  You simply provide a map between CC_STATE values and the
corresponding AST_DEVICE state values.

You could then generate hints against these states similar to what is
possible today with Custom Devstates or MeetMe states.  For example, you
may have an extension 3000 that is currently associated with device
SIP/3000.  You could then create a feature code for that extension that
may look something like:

exten => *823000,hint,ccss:sip/3000

You would then subscribe a BLF button to *823000 which would point to the
dialplan that handled CCSS requests/cancels using the available
DEVICE_STATE() information about ccss:sip/3000 to make the decision about
what to do.

(closes issue #18788)
Reported by: p_lindheimer
Patches:
      ccss.trunk.18788.patch uploaded by p lindheimer (license 558)
      Modified with final reviewboard comments.
Tested by: p_lindheimer, loloski

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@313744 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-14 18:22:35 +00:00
Richard Mudgett c16d39ea83 Merged revisions 313588 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r313588 | rmudgett | 2011-04-13 11:31:50 -0500 (Wed, 13 Apr 2011) | 55 lines
  
  Merged revisions 313579 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r313579 | rmudgett | 2011-04-13 11:29:49 -0500 (Wed, 13 Apr 2011) | 48 lines
    
    Merged revisions 313545 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r313545 | rmudgett | 2011-04-13 11:21:24 -0500 (Wed, 13 Apr 2011) | 41 lines
      
      Asterisk does not hangup a channel after endpoint hangs up.
      
      If the call that the dialplan started an AGI script for is hungup while
      the AGI script is in the middle of a command then the AGI script is not
      notified of the hangup.  There are many AGI Exec commands that this can
      happen with.  The reported applications have been: Background, Wait, Read,
      and Dial.  Also the AGI Get Data command.
      
      * Don't wait on the Asterisk channel after it has hung up.  The channel is
      likely to never need servicing again.
      
      * Restored the AGI script's ability to return the AGI_RESULT_HANGUP value
      in run_agi().  It previously only could return AGI_RESULT_SUCCESS or
      AGI_RESULT_FAILURE after the DeadAGI and AGI applications were merged.
      
      (closes issue #17954)
      Reported by: mn3250
      Patches:
            issue17954_v1.8.patch uploaded by rmudgett (license 664)
            issue17954_v1.6.2.patch uploaded by rmudgett (license 664)
            issue17954_v1.4.patch uploaded by rmudgett (license 664)
      Tested by: rmudgett
      JIRA SWP-2171
      
      (closes issue #18492)
      Reported by: devmod
      Tested by: rmudgett
      JIRA SWP-2761
      
      (closes issue #18935)
      Reported by: nvitaly
      Tested by: astmiv, rmudgett
      JIRA SWP-3216
      
      (closes issue #17393)
      Reported by: siby
      Tested by: rmudgett
      JIRA SWP-2727
      
      Review: https://reviewboard.asterisk.org/r/1165/
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@313606 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-13 16:37:06 +00:00
Richard Mudgett 530afe7d97 Merged revisions 313366 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r313366 | rmudgett | 2011-04-11 17:27:25 -0500 (Mon, 11 Apr 2011) | 2 lines
  
  Added "Connected Line ID" and "Connected Line ID Name" to "core show channel" output.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@313367 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-11 22:28:43 +00:00
Jonathan Rose 68dd87ef0d Merged revisions 313048 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r313048 | jrose | 2011-04-07 08:35:33 -0500 (Thu, 07 Apr 2011) | 16 lines
  
  Merged revisions 313047 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r313047 | jrose | 2011-04-07 08:23:01 -0500 (Thu, 07 Apr 2011) | 9 lines
    
    Makes parking lots clear and rebuild properly when features reload is invoked from CLI
    
    Before, default parkinglot in context parkedcalls with ext 700 would always be present and when reload was invoked, the previous parkinglots would not be cleared.
    
    (closes issue #18801)
    Reported by: mickecarlsson
    
    Review: https://reviewboard.asterisk.org/r/1161/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@313049 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-07 13:42:13 +00:00
Matthew Nicholson a77fd545ab Merged revisions 312766 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r312766 | mnicholson | 2011-04-05 09:14:50 -0500 (Tue, 05 Apr 2011) | 22 lines
  
  Merged revisions 312764 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r312764 | mnicholson | 2011-04-05 09:13:07 -0500 (Tue, 05 Apr 2011) | 15 lines
    
    Merged revisions 312761 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r312761 | mnicholson | 2011-04-05 09:10:34 -0500 (Tue, 05 Apr 2011) | 8 lines
      
      Limit the number of unauthenticated manager sessions and also limit the time they have to authenticate.
      
      AST-2011-005
      
      (closes issue #18996)
      Reported by: tzafrir
      Tested by: mnicholson
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@312767 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-05 14:16:21 +00:00
Richard Mudgett 75594e6e4a Merged revisions 312461 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r312461 | rmudgett | 2011-04-01 16:31:39 -0500 (Fri, 01 Apr 2011) | 25 lines
  
  CallCompletionRequest()/CallCompletionCancel() exit non-zero if fail.
  
  The CallCompletionRequest()/CallCompletionCancel() dialplan applications
  exit nonzero on normal failure conditions.  The nonzero exit causes the
  dialplan to hangup immediately.  The dialplan author has no opportunity to
  report success/failure to the user.
  
  * Made always return zero so the dialplan can continue.
  
  * Made set CC_REQUEST_RESULT/CC_REQUEST_REASON and
  CC_CANCEL_RESULT/CC_CANCEL_REASON channel variables respectively.  Also
  documented the values set.
  
  * Reduced the warning about no core instance in CallCompletionCancel() to
  a debug message.  It is a normal event and should not be output at the
  WARNING level.
  
  (closes issue #18763)
  Reported by: p_lindheimer
  Patches:
        ccss.patch uploaded by p lindheimer (license 558) Modified
  Tested by: p_lindheimer, rmudgett
  
  JIRA SWP-3042
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@312462 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-01 21:36:53 +00:00
Jonathan Rose 846cfa0ef0 New Feature for chan_dahdi. 4 length pattern matching.
In chan_dahdi.conf, the user can now use length 4 patterns in addition to the usual length 2 patterns.  The s
ntax remains the same and the method used to track the pattern history will only change when using the length
 4 patterns.

(closes issue SWP-3250)
Code:
        jrose
        rmudgett


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@312384 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-01 17:01:01 +00:00
Tilghman Lesher 3731fd9ccc Merged revisions 312286,312288 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r312286 | tilghman | 2011-04-01 05:44:33 -0500 (Fri, 01 Apr 2011) | 2 lines
  
  Reload must react correctly against a possibly changed table, so dropping the conditional reload flag.
................
  r312288 | tilghman | 2011-04-01 05:58:45 -0500 (Fri, 01 Apr 2011) | 21 lines
  
  Merged revisions 312287 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r312287 | tilghman | 2011-04-01 05:51:24 -0500 (Fri, 01 Apr 2011) | 14 lines
    
    Merged revisions 312285 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r312285 | tilghman | 2011-04-01 05:36:42 -0500 (Fri, 01 Apr 2011) | 7 lines
      
      Found some leaking file descriptors while looking at ast_FD_SETSIZE dead code.
      
      (issue #18969)
       Reported by: oej
       Patches: 
             20110315__issue18969__14.diff.txt uploaded by tilghman (license 14)
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@312289 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-01 10:59:32 +00:00
Matthew Nicholson 581bfad2f3 Merged revisions 311141 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r311141 | mnicholson | 2011-03-17 10:00:33 -0500 (Thu, 17 Mar 2011) | 11 lines
  
  Merged revisions 311140 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r311140 | mnicholson | 2011-03-17 09:58:52 -0500 (Thu, 17 Mar 2011) | 4 lines
    
    Don't write items to the manager socket twice.
    
    AST-2011-003
    
    (closes issue 0018987)
    Reported by: ks-steven
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@311142 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-17 15:02:12 +00:00
Terry Wilson 4ae1cb9456 Merged revisions 310999 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r310999 | twilson | 2011-03-16 14:47:59 -0500 (Wed, 16 Mar 2011) | 18 lines
  
  Merged revisions 310998 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r310998 | twilson | 2011-03-16 14:46:36 -0500 (Wed, 16 Mar 2011) | 11 lines
    
    Fix crash on fdopen failure
    
    See security advisory AST-2011-004
    
    (closes issue #18845)
    Reported by: cmaj
    Patches: 
        patch-main-tcptls-1.8.3-rc2-open-session-crash-take2.diff.txt uploaded by cmaj (license 830)
        patch-main-tcptls-1.8.3-rc2-open-session-crash-take3.diff.txt uploaded by cmaj (license 830)
    Tested by: cmaj, twilson
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@311001 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-16 19:51:55 +00:00
Terry Wilson d0846ea207 Merged revisions 310993 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r310993 | twilson | 2011-03-16 14:26:57 -0500 (Wed, 16 Mar 2011) | 11 lines
  
  Merged revisions 310992 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r310992 | twilson | 2011-03-16 14:23:03 -0500 (Wed, 16 Mar 2011) | 4 lines
    
    Don't keep trying to write to a closed connection
    
    See security advisory AST-2011-003.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@311000 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-16 19:51:04 +00:00
Terry Wilson d958ca6953 Merged revisions 310902 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r310902 | twilson | 2011-03-16 12:19:57 -0500 (Wed, 16 Mar 2011) | 43 lines
  
  Merged revisions 310889 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r310889 | twilson | 2011-03-16 12:03:27 -0500 (Wed, 16 Mar 2011) | 36 lines
    
    Merged revisions 310888 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r310888 | twilson | 2011-03-16 11:58:42 -0500 (Wed, 16 Mar 2011) | 29 lines
      
      Don't delay DTMF in core bridge while listening for DTMF features
      
      This patch is mostly the work of Olle Johansson. I did some cleanup and
      added the silence generating code if transmit_silence is set.
      
      When a channel listens for DTMF in the core bridge, the outbound DTMF is not
      sent until we have received DTMF_END. For a long DTMF, this is a disaster. We
      send 4 seconds of DTMF to Asterisk, which sends no audio for those 4 seconds.
      Some products see this delay and the time skew on RTP packets that results and
      start ignoring the audio that is sent afterward.
      
      With this change, the DTMF_BEGIN frame is inspected and checked. If it matches
      a feature code, we wait for DTMF_END and activate the feature as before. If
      transmit_silence=yes in asterisk.conf, silence is sent if we paritally match a
      multi-digit feature. If it doesn't match a feature, the frame is forwarded
      along with the DTMF_END without delay. By doing it this way, DTMF is not delayed.
      
      (closes issue #15642)
      Reported by: jasonshugart
      Patches: 
            issue_15652_dtmf_ast-1.4.patch.txt uploaded by twilson (license 396)
      Tested by: globalnetinc, jde
      
      (closes issue #16625)
      Reported by: sharvanek
      
      Review: https://reviewboard.asterisk.org/r/1092/
      Review: https://reviewboard.asterisk.org/r/1125/
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@310941 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-16 17:29:16 +00:00
Alec L Davis 858c11f075 Merged revisions 310781 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r310781 | alecdavis | 2011-03-15 14:00:55 +1300 (Tue, 15 Mar 2011) | 10 lines
  
  core show locks: display ThreadID in hexadecimal
  
  Allow easier cross referencing of thread ID's with GDB backtraces
  
  (closes issue #18968)
  Reported by: alecdavis
  Patches: 
        bug18968.diff.txt uploaded by alecdavis (license 585)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@310833 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-15 01:36:26 +00:00
Richard Mudgett de7280fc7d Merged revisions 310636 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r310636 | rmudgett | 2011-03-14 11:50:59 -0500 (Mon, 14 Mar 2011) | 39 lines
  
  Merged revisions 310635 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r310635 | rmudgett | 2011-03-14 11:47:54 -0500 (Mon, 14 Mar 2011) | 32 lines
    
    Merged revisions 310633 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r310633 | rmudgett | 2011-03-14 11:38:24 -0500 (Mon, 14 Mar 2011) | 25 lines
      
      "Caller*ID failed checksum" on Wildcard TDM2400P and TDM410
      
      The last character in the caller id message is getting a framing error.
      
      The checksum is the last character in the message.  A framing error in the
      checksum could be because:
      1) The sender did not send a full stop bit.
      2) The sender cut off the FSK carrier too soon.
      3) The sender opted to send zero of the specified zero to 10 trailing mark
      bits and round-off errors in the code resulted in the code not being where
      it thought it was in the demodulated bit stream.
      
      Bit 8 of 'b' is set when parity error.
      Bit 9 of 'b' is set when framing error.
      
      Made ignore the framing and parity error bits if the errored character is
      the checksum.  We can tolerate a framing/parity error there.  The checksum
      character validates the message.
      
      (closes issue #18474)
      Reported by: nivek
      Patches:
            callerid.c.1.patch uploaded by nivek (license 636) (with modifications)
      Tested by: nivek
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@310637 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-14 16:55:30 +00:00
Jonathan Rose 16c5dda8ab Fixes null reference bug introduced by audio hook changes that affects various OS distributions. Thanks David.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@310547 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-14 13:12:51 +00:00
Jonathan Rose 6e36042f64 Mix Monitor: Now with r and t options.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@310373 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-11 18:54:45 +00:00
Alec L Davis c7c0664bc4 Merged revisions 310287 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r310287 | alecdavis | 2011-03-11 19:47:44 +1300 (Fri, 11 Mar 2011) | 17 lines
  
  remote_bridge_loop: prevent segfault when after transfer of IAX2 of DAHDI call 
  
  If the channel condition is one of the following after breaking out of the loop, don't try to update_peer
  (where x = 0/1)
   1). ZOMBIE
   2). cx->tech_pvt != pvtx
   3). gluex != ast_rtp_instance_get_glue(cx->tech->type))
  
  (closes issue #18781)
  Reported by: alecdavis
  Patches: 
        bug18781.diff3.txt uploaded by alecdavis (license 585)
  Tested by: alecdavis, ZX81
  
  Review: https://reviewboard.asterisk.org/r/1128/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@310288 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-11 06:56:06 +00:00
Terry Wilson 254092f8f6 Merged revisions 310240 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r310240 | twilson | 2011-03-10 10:05:45 -0600 (Thu, 10 Mar 2011) | 13 lines
  
  Add \r\n to remaining http headers passed to ast_http_send
  
  r309204 changed the behavior of ast_http_send. It now requires headers
  to be passed with trailing \r\n. This change updates the remaining
  instances in the code that did not pass the \r\n.
  
  (closes issue #18186)
  Reported by: nivaldomjunior
  Patches: 
        res_phoneprov.c.diff uploaded by lathama (license 1028)
        manager.diff.txt uploaded by twilson (license 396)
  Tested by: lathama
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@310241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-10 16:09:09 +00:00
Tilghman Lesher 6de1332214 Merged revisions 309808 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r309808 | tilghman | 2011-03-06 18:54:42 -0600 (Sun, 06 Mar 2011) | 14 lines
  
  Merged revisions 309251 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r309251 | tilghman | 2011-03-01 19:06:02 -0600 (Tue, 01 Mar 2011) | 7 lines
    
    Revert previous 2 commits, and instead conditionally redefine the same macro used in flex 2.5.35 that clashed with our workaround.
    
    Not surprisingly, the workaround was exactly the same code as was provided by
    the Flex maintainers, albeit in two different places, in different macros.
    
    This should fix the FreeBSD builds, which have an older version of Flex.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@309809 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-07 01:01:08 +00:00
Tilghman Lesher 798212c828 Merged revisions 309678 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r309678 | tilghman | 2011-03-05 04:29:30 -0600 (Sat, 05 Mar 2011) | 14 lines
  
  Merged revisions 309677 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r309677 | tilghman | 2011-03-05 04:28:24 -0600 (Sat, 05 Mar 2011) | 7 lines
    
    Missed part of the conversion when we started passing ppid to astcanary.
    
    (closes issue #18850)
     Reported by: viraptor
     Patches: 
           canary_ppid.patch uploaded by viraptor (license 543)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@309679 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-05 10:30:28 +00:00
Jason Parker a7bfa10472 Add HangupRequest manager event, to specify when/where a channel gets hung up.
(closes issue #18226)
Reported by: clegall_proformatique
Patches: 
      asterisk_1.8_293157_hanguprequests.svn.patch uploaded by clegall proformatique (license 1139)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@309300 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-02 21:08:39 +00:00
Jason Parker dc616cfe2c Merged revisions 309204 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r309204 | qwell | 2011-03-01 16:25:44 -0600 (Tue, 01 Mar 2011) | 7 lines
  
  Fix consistency of CRLFs on HTTP headers that get sent out.
  
  (closes issue #18186)
  Reported by: nivaldomjunior
  Patches: 
        18186-httpheadernewline.diff uploaded by qwell (license 4)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@309209 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-01 22:26:37 +00:00
Tilghman Lesher e5dc4c2d8e Merged revisions 309035 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r309035 | tilghman | 2011-02-28 05:10:28 -0600 (Mon, 28 Feb 2011) | 15 lines
  
  Merged revisions 309033-309034 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r309033 | tilghman | 2011-02-28 04:43:12 -0600 (Mon, 28 Feb 2011) | 4 lines
    
    A later version of flex already includes the fwrite workaround code, which if used twice causes a compilation error.
    
    Detect whether Flex will compile without the workaround; if so, suppress our workaround code.
  ........
    r309034 | tilghman | 2011-02-28 05:07:52 -0600 (Mon, 28 Feb 2011) | 2 lines
    
    Clarify meaning, removing double negative (stupid!)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@309036 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-28 11:16:06 +00:00
Richard Mudgett 642d6c306c Merged revisions 308903 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r308903 | rmudgett | 2011-02-24 15:38:41 -0600 (Thu, 24 Feb 2011) | 9 lines
  
  Invalid read in ast_channel_set_caller_event().
  
  Valgrind reported that ast_channel_set_caller_event() was reading data
  from a freed buffer when using the pre_set structure.
  
  Rearange things to pre-calculate the name and number pointer before
  updating the caller party structure to see if the name or number was
  changed.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@308904 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-24 21:43:32 +00:00
Terry Wilson f88ef55d74 Merged revisions 308815 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r308815 | twilson | 2011-02-24 11:57:18 -0600 (Thu, 24 Feb 2011) | 26 lines
  
  Merged revisions 308814 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r308814 | twilson | 2011-02-24 11:54:49 -0600 (Thu, 24 Feb 2011) | 19 lines
    
    Merged revisions 308813 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r308813 | twilson | 2011-02-24 11:42:16 -0600 (Thu, 24 Feb 2011) | 12 lines
      
      Don't broadcast FullyBooted to every AMI connection
      
      The FullyBooted event should not be sent to every AMI connection every
      time someone connects via AMI. It should only be sent to the user who
      just connected.
      
      (closes issue #18168)
      Reported by: FeyFre
      Patches: 
            bug0018168.patch uploaded by FeyFre (license 1142)
      Tested by: FeyFre, twilson
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@308816 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-24 17:59:32 +00:00
Matthew Nicholson 0658c5ec2e Merged revisions 308723 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r308723 | mnicholson | 2011-02-24 09:06:14 -0600 (Thu, 24 Feb 2011) | 16 lines
  
  Merged revisions 308722 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r308722 | mnicholson | 2011-02-24 08:59:41 -0600 (Thu, 24 Feb 2011) | 9 lines
    
    Merged revisions 308721 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r308721 | mnicholson | 2011-02-24 08:54:56 -0600 (Thu, 24 Feb 2011) | 2 lines
      
      silence gcc 4.2 compiler warning
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@308724 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-24 15:10:58 +00:00
Richard Mudgett 79e041f856 Fix compiler warning.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@308624 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-23 23:55:58 +00:00
David Vossel d760e81f37 Media Project Phase2: SILK 8khz-24khz, SLINEAR 8khz-192khz, SPEEX 32khz, hd audio ConfBridge, and other stuff
-Functional changes
1. Dynamic global format list build by codecs defined in codecs.conf
2. SILK 8khz, 12khz, 16khz, and 24khz with custom attributes defined in codecs.conf
3. Negotiation of SILK attributes in chan_sip.
4. SPEEX 32khz with translation
5. SLINEAR 8khz, 12khz, 24khz, 32khz, 44.1khz, 48khz, 96khz, 192khz with translation
   using codec_resample.c
6. Various changes to RTP code required to properly handle the dynamic format list
   and formats with attributes.
7. ConfBridge now dynamically jumps to the best possible sample rate.  This allows
   for conferences to take advantage of HD audio (Which sounds awesome)
8. Audiohooks are no longer limited to 8khz audio, and most effects have been
   updated to take advantage of this such as Volume, DENOISE, PITCH_SHIFT.
9. codec_resample now uses its own code rather than depending on libresample.

-Organizational changes
Global format list is moved from frame.c to format.c
Various format specific functions moved from frame.c to format.c

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@308582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-22 23:04:49 +00:00
Andrew Latham 736133f874 Use ast_debug for console logging
Guessed the log levels based on info that level 3
is the soft roof.  Can we create a page / document
to define the levels?



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@308527 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-22 15:33:56 +00:00
Matthew Nicholson dad4fecc03 Merged revisions 308416 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r308416 | mnicholson | 2011-02-21 09:02:20 -0600 (Mon, 21 Feb 2011) | 19 lines
  
  Merged revisions 308414 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r308414 | mnicholson | 2011-02-21 09:00:22 -0600 (Mon, 21 Feb 2011) | 12 lines
    
    Merged revisions 308413 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r308413 | mnicholson | 2011-02-21 08:57:15 -0600 (Mon, 21 Feb 2011) | 5 lines
      
      Properly check the bounds of arrays when decoding UDPTL packets.  Also, remove broken support for receiving UDPTL packets larger than 16k.  That shouldn't ever happen anyway.
      
      AST-2011-002
      FAX-281
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@308417 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-21 15:04:19 +00:00
Andrew Latham 3a0af560c8 Add HTTP URI Debug logging and update notice
enable reporting of the request URI / URL in debugging
change funny debug note to a serious note.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@308372 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-21 14:14:41 +00:00
Tzafrir Cohen 54802a099c fix a memory leak in device state
The callback handle_statechange (pbx.c) fails to release its data
pointer, leaking memory in the process.

Reported by: tzafrir
Patches:
      18735_pbx_free_callback.diff uploaded by tzafrir (license 46)

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@308371 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-21 13:58:18 +00:00
Andrew Latham 83035fdf68 Add CSS MIME Type
Modern browsers are checking for the MIME Type of pages
and in some cases will not load a file if the type is
wrong.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@308331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-19 14:07:38 +00:00
Richard Mudgett b2ef13cb60 Merged revisions 307879 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r307879 | rmudgett | 2011-02-15 10:13:55 -0600 (Tue, 15 Feb 2011) | 37 lines
  
  No response sent for SIP CC subscribe/resubscribe request.
  
  Asterisk does not send a response if we try to subscribe for call
  completion after we have received a 180 Ringing.  You can only subscribe
  for call completion when the call has been cleared.
  
  When we receive the 180 Ringing, for this call, its call-completion state
  is 'CC_AVAILABLE'.  If we then send a subscribe message to Asterisk, it
  trys to change the call-completion state to 'CC_CALLER_REQUESTED'.
  Because this is an invalid state change, it just ignores the message.  The
  only state Asterisk will accept our subscribe message is in the
  'CC_CALLER_OFFERED' state.
  
  Asterisk will go into the 'CC_CALLER_OFFERED' when the SIP client clears
  the call by sending a CANCEL.
  
  Asterisk should always send a response.  Even if its a negative one.
  
  
  The fix is to allow for the CCSS core to notify a CC agent that a failure
  has occurred when CC is requested.  The "ack" callback is replaced with a
  "respond" callback.  The "respond" callback has a parameter indicating
  either a successful response or a specific type of failure that may need
  to be communicated to the requester.
  
  (closes issue #18336)
  Reported by: GeorgeKonopacki
  Tested by: mmichelson, rmudgett
  
  JIRA SWP-2633
  
  (closes issue #18337)
  Reported by: GeorgeKonopacki
  Tested by: mmichelson
  
  JIRA SWP-2634
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@307883 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-15 16:18:43 +00:00
Jason Parker 96cbd4ffcd Merged revisions 307536 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r307536 | qwell | 2011-02-10 16:39:30 -0600 (Thu, 10 Feb 2011) | 22 lines
  
  Merged revisions 307535 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r307535 | qwell | 2011-02-10 16:35:49 -0600 (Thu, 10 Feb 2011) | 15 lines
    
    Merged revisions 307534 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r307534 | qwell | 2011-02-10 16:33:09 -0600 (Thu, 10 Feb 2011) | 8 lines
      
      Remove color when executing commands via a remote console.
      
      Essentially this makes '-x' imply '-n' on rasterisk.  This was done in a
      different and incomplete way previously, which I'm reverting here.
      
      (issue #18776)
      Reported by: alecdavis
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@307537 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-10 22:43:51 +00:00
David Vossel 08460fc094 Fixes bug in chan_sip where nativeformats are not set correctly.
The nativeformats field was being overwritten when it should have been
appended too.  This caused some format capabilities to be lost briefly and
some log warnings to be output.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@307433 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-10 17:12:10 +00:00
Jeff Peeler 10362292ef Merged revisions 307273 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r307273 | jpeeler | 2011-02-09 15:06:33 -0600 (Wed, 09 Feb 2011) | 8 lines
  
  Add missing debug info for ao2_link for use with REF_DEBUG in ao2 callback.
  
  (closes issue #18758)
  Reported by: rgagnon
  Patches: 
        branch-1.8-r306540-astobj-fix.diff uploaded by rgagnon (license 1202)
        trunk-r306540-astobj-fix.diff uploaded by rgagnon (license 1202)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@307274 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-09 21:08:22 +00:00
Jeff Peeler e2df246636 Allow parkedmusicclass to be settable for non-default parking lots.
(closes issue #17946)
Reported by: bluecrow76
Patches:
      asterisk-1.8.0-beta4-multipark-fixes-2010SEP02.diff


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@307231 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-09 20:11:11 +00:00
Jeff Peeler 6b0fa46103 Merged revisions 307228 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r307228 | jpeeler | 2011-02-09 13:52:51 -0600 (Wed, 09 Feb 2011) | 17 lines
  
  Merged revisions 307227 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r307227 | jpeeler | 2011-02-09 13:52:12 -0600 (Wed, 09 Feb 2011) | 11 lines
    
    Make sure to set parking dial context for non-default parking lots.
    
    Since parking_con_dial isn't settable, set all parking lots to "park-dial".
    
    (closes issue #17946)
    Reported by: bluecrow76
    Patches:
          asterisk-1.8.0-beta4-multipark-fixes-2010SEP02.diff uploaded by bluecrow76 (license 270)
          modified by me
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@307229 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-09 19:53:28 +00:00
Tzafrir Cohen 1540401a4a clarify warning when no loadable module support
Clarify warning message when LOADABLE_MODULES is disabled but we still
try to load a module.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@307192 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-09 19:17:01 +00:00
Tilghman Lesher fc4df44bd8 Merged revisions 307142 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r307142 | tilghman | 2011-02-08 23:39:39 -0600 (Tue, 08 Feb 2011) | 3 lines
  
  Initialize tracking variable in structure properly.  Fixes a memory leak.
  (Reported by The_Boy_Wonder on IRC, fixed by me.)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@307143 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-09 05:53:29 +00:00
Jason Parker f01e9568d2 Merged revisions 307092 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r307092 | qwell | 2011-02-08 15:24:01 -0600 (Tue, 08 Feb 2011) | 9 lines
  
  Fix issue with verbose messages not showing on remote console.
  
  This code was reworked recently, and since the logchannel list hadn't been
  created yet at this point, and it was a verbose message, it was being dropped
  on the floor.  Now it'll continue on to where it should be handled.
  
  (closes issue #18580)
  Reported by: pabelanger
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@307097 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-08 21:24:57 +00:00
Mark Michelson 0074165356 Merged revisions 307065 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r307065 | mmichelson | 2011-02-08 15:13:08 -0600 (Tue, 08 Feb 2011) | 6 lines
  
  Add a couple of useful channel variables for the CC recall macro.
  
  CC_EXTEN and CC_CONTEXT will allow you to determine the channel
  and context that will be called when the recall occurs.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@307071 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-08 21:18:26 +00:00
Richard Mudgett 49feb747ba Pass a MCID request to the bridged channel.
Pass a MCID request to the bridged channel so the bridged channel can send
it to the network.

The ability to send the MCID request on an ISDN span is enabled with the
new chan_dahdi.conf mcid_send option.

JIRA SWP-2845
JIRA ABE-2736


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306755 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-07 23:33:44 +00:00
Terry Wilson 1277a80a5b Merged revisions 306674 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r306674 | twilson | 2011-02-07 14:43:22 -0800 (Mon, 07 Feb 2011) | 24 lines
  
  Merged revisions 306673 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r306673 | twilson | 2011-02-07 14:40:20 -0800 (Mon, 07 Feb 2011) | 17 lines
    
    Merged revisions 306672 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r306672 | twilson | 2011-02-07 14:35:20 -0800 (Mon, 07 Feb 2011) | 10 lines
      
      Don't try to pickup a call in the middle of a masquerade
      
      If A calls B which doesn't answer and C & D both try to do a call pickup, it is
      possible for ast_pickup_call to answer the call, then fail to masquerade one of
      the calls because the other one is already in the process of masquerading. This
      patch checks to see if the channel is in the process of masquerading before
      call before selecting it for a pickup.
      
      Review: https://reviewboard.asterisk.org/r/1094/
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306675 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-07 22:46:07 +00:00
Mark Michelson f4ea670a6a Merged revisions 306575 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r306575 | mmichelson | 2011-02-07 11:36:56 -0600 (Mon, 07 Feb 2011) | 9 lines
  
  Rearrange a bit of code in the generic CC recall operation.
  
  By waiting to call the callback macro after the CC_INTERFACES,
  extension, priority, and context have been set, this information
  can be accessed more easily within the callback macro.
  
  Reported by Philippe Lindheimer.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306576 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-07 17:55:38 +00:00
Jeff Peeler 3d667d7c0f Send manager event for blackfilter only if it DOES NOT match.
The logic got reversed, oops. Works properly now when multiple blackfilters are
present.

(closes issue #18283)
Reported by: telecos82
Patches: 
      ast_managereventfilter.patch uploaded by telecos82 (license 687)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306432 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-04 22:37:11 +00:00
Paul Belanger 3556e4c2d4 Replace ast_log(LOG_DEBUG, ...) with ast_debug()
(closes issue #18556)
Reported by: kkm

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-04 16:55:39 +00:00
Jeff Peeler fed10ed35d Merged revisions 306124 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r306124 | jpeeler | 2011-02-03 14:50:48 -0600 (Thu, 03 Feb 2011) | 17 lines
  
  Merged revisions 306123 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r306123 | jpeeler | 2011-02-03 14:49:48 -0600 (Thu, 03 Feb 2011) | 10 lines
    
    Set exception on channel in parking thread when POLLPRI event detected.
    
    This is done just to make the code be equivalent to the old select code. As
    noted in 303106 the same issue was already fixed in this branch, but the
    exception was not set on the channel in the case of POLLPRI. The reason that
    this did not cause a problem here is because in 122923 the check in __ast_read
    to check the exception flag was removed.
    
    (related to #18637)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306125 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-03 20:51:09 +00:00
Jason Parker 7f76b3d573 Modify alignment of 'core show codecs', since the ID is no longer a huge int.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306086 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-03 18:37:06 +00:00
David Vossel 63f5a80a3b Fixes output of "core show codecs" to display image types correctly.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306053 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-03 18:12:57 +00:00
David Vossel c26c190711 Asterisk media architecture conversion - no more format bitfields
This patch is the foundation of an entire new way of looking at media in Asterisk.
The code present in this patch is everything required to complete phase1 of my
Media Architecture proposal.  For more information about this project visit the link below.
https://wiki.asterisk.org/wiki/display/AST/Media+Architecture+Proposal

The primary function of this patch is to convert all the usages of format
bitfields in Asterisk to use the new format and format_cap APIs.  Functionally
no change in behavior should be present in this patch.  Thanks to twilson
and russell for all the time they spent reviewing these changes.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-03 16:22:10 +00:00
Richard Mudgett f71322f239 Merged revisions 305923 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r305923 | rmudgett | 2011-02-02 18:24:40 -0600 (Wed, 02 Feb 2011) | 24 lines
  
  Merged revisions 305889 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r305889 | rmudgett | 2011-02-02 18:15:07 -0600 (Wed, 02 Feb 2011) | 17 lines
    
    Merged revisions 305888 via svnmerge from
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r305888 | rmudgett | 2011-02-02 18:02:43 -0600 (Wed, 02 Feb 2011) | 8 lines
    
      Minor AST_FRAME_TEXT related issues.
    
      * Include the null terminator in the buffer length.  When the frame is
      queued it is copied.  If the null terminator is not part of the frame
      buffer length, the receiver could see garbage appended onto it.
    
      * Add channel lock protection with ast_sendtext().
    
      * Fixed AMI SendText action ast_sendtext() return value check.
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@305939 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-03 00:29:46 +00:00
Andrew Latham 9f1a17f137 Replacing doc/* with wiki links
Adding links to http(s)://wiki.asterisk.org



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@305799 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-02 18:59:29 +00:00
Jason Parker 14c1585645 Merged revisions 305247 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r305247 | qwell | 2011-01-31 16:25:23 -0600 (Mon, 31 Jan 2011) | 7 lines
  
  Add alternative name for config option.
  
  The SIP sample configuration had "tlscadir" as the option name, but chan_sip
  used the more correct "tlscapath".  Now both are accepted.
  
  Discovered (sort of) by a user on IRC in #asterisk
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@305248 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-31 22:26:06 +00:00
Andrew Latham 25691c31b3 Asterisk HTTP response Content-type
Address content type for BSD and other platforms

(closes issue #18456)
Reported by: alexo
Patches:
    asterisk18_http.patch uploaded by alexo (license 1175)
Tested by: alexo



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@305084 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-31 13:57:53 +00:00
Tilghman Lesher 16c3ea3d42 Merged revisions 304950 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r304950 | tilghman | 2011-01-31 00:41:36 -0600 (Mon, 31 Jan 2011) | 18 lines
  
  Change mutex tracking so that it only consumes memory in the core mutex object when it's actually being used.
  
  This reduces the overall size of a mutex which was 3016 bytes before this back
  down to 216 bytes (this is on 64-bit Linux with a glibc-implemented mutex).
  The exactness of the numbers here may vary slightly based upon how mutexes are
  implemented on a platform, but the long and short of it is that prior to this
  commit, chan_iax2 held down 98MB of memory on a 64-bit system for nothing more
  than a table of 32767 locks.  After this commit, the same table occupies a mere
  7MB of memory.
  
  (closes issue #18194)
   Reported by: job
   Patches: 
         20110124__issue18194.diff.txt uploaded by tilghman (license 14)
   Tested by: tilghman
   
  Review: https://reviewboard.asterisk.org/r/1066
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@304951 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-31 06:50:49 +00:00
Sean Bright 64dfc6e735 Merged revisions 304638 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r304638 | seanbright | 2011-01-28 15:19:08 -0500 (Fri, 28 Jan 2011) | 11 lines
  
  Restore some conditionals that we lost in r277814.
  
  There are some cases where ast_append_ha() is called with a NULL instead of a
  valid int pointer.  So if we get a NULL, don't try to dereference it.
  
  (closes issue #18162)
  Reported by: imcdona
  Patches:
        issue0018162.patch uploaded by pabelanger (license 224)
  Tested by: enegaard
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@304639 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-28 20:19:57 +00:00
Richard Mudgett 4e354aebc9 Merged revisions 304554 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r304554 | rmudgett | 2011-01-27 13:08:14 -0600 (Thu, 27 Jan 2011) | 4 lines
  
  Warning message if CALLCOMPLETION(cc_callback_macro or cc_agent_dialstring) are empty.
  
  Test if the value pointer is not NULL instead of not ast_strlen_zero().
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@304555 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-27 19:12:32 +00:00
Jeff Peeler 8677f0424e Merged revisions 304339 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r304339 | jpeeler | 2011-01-26 16:27:30 -0600 (Wed, 26 Jan 2011) | 9 lines
  
  Merged revisions 304338 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r304338 | jpeeler | 2011-01-26 16:26:37 -0600 (Wed, 26 Jan 2011) | 2 lines
    
    Change delimiter used internally for GOTO_ON_BLINDXFR to commas to match 76703.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@304340 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-26 22:27:51 +00:00
Mark Michelson 3efc46080a Merged revisions 304250 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r304250 | mmichelson | 2011-01-26 15:02:10 -0600 (Wed, 26 Jan 2011) | 9 lines
  
  Merged revisions 304242 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r304242 | mmichelson | 2011-01-26 14:38:37 -0600 (Wed, 26 Jan 2011) | 3 lines
    
    Get rid of unused 'verbose' field in ast_udptl
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@304252 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-26 21:03:44 +00:00
Matthew Nicholson 48a9694ed0 Merged revisions 304245 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r304245 | mnicholson | 2011-01-26 14:43:27 -0600 (Wed, 26 Jan 2011) | 20 lines
  
  Merged revisions 304244 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r304244 | mnicholson | 2011-01-26 14:42:16 -0600 (Wed, 26 Jan 2011) | 13 lines
    
    Merged revisions 304241 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r304241 | mnicholson | 2011-01-26 14:38:22 -0600 (Wed, 26 Jan 2011) | 6 lines
      
      This patch modifies chan_sip to route responses to the address the request came from.  It also modifies chan_sip to respect the maddr parameter in the Via header.
      
      ABE-2664
      
      Review: https://reviewboard.asterisk.org/r/1059/
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@304246 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-26 20:44:47 +00:00
Sean Bright 50a023add5 Merged revisions 304097 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r304097 | seanbright | 2011-01-25 20:26:26 -0500 (Tue, 25 Jan 2011) | 19 lines
  
  Merged revisions 304096 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r304096 | seanbright | 2011-01-25 20:24:58 -0500 (Tue, 25 Jan 2011) | 12 lines
    
    Per the man page, setvbuf() must be called before any other operation on an open file.
    
    We use setvbuf() to associate a buffer with a stream, but we have already written
    to the open file.  This works (by chance) on Linux, but fails on other platforms,
    such as OpenSolaris.
    
    (closes issue #16610)
    Reported by: bklang
    Patches:
          setvbuf.patch uploaded by crjw (license 963)
    Tested by: bklang, asgaroth, efutch
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@304098 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-26 01:27:39 +00:00
Richard Mudgett ca014f49a2 Merged revisions 304007 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r304007 | rmudgett | 2011-01-25 17:28:25 -0600 (Tue, 25 Jan 2011) | 22 lines
  
  Merged revisions 304006 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r304006 | rmudgett | 2011-01-25 17:25:32 -0600 (Tue, 25 Jan 2011) | 15 lines
    
    Merged revisions 304005 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r304005 | rmudgett | 2011-01-25 17:21:09 -0600 (Tue, 25 Jan 2011) | 8 lines
      
      DTMF attended transfers sometimes fail for no apparent reason.
      
      The loop in feature_request_and_dial() can exit when Party C has answered
      without processing an AST_CONTROL_ANSWER.  Also sometimes an
      AST_CONTROL_ANSWER never happens even though Party C has answered.
      
      Don't hangup Party C if he is up or we receive an AST_CONTROL_ANSWER.
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@304008 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-25 23:31:40 +00:00
Matthew Nicholson 2686253f16 Use unsigned char in comparison for UTF8 check to quiet a compiler warning.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@303638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-25 15:52:42 +00:00
Russell Bryant 092134399c Merged revisions 303549 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r303549 | russell | 2011-01-24 14:51:37 -0600 (Mon, 24 Jan 2011) | 45 lines
  
  Merged revisions 303548 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r303548 | russell | 2011-01-24 14:49:53 -0600 (Mon, 24 Jan 2011) | 38 lines
    
    Merged revisions 303546 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r303546 | russell | 2011-01-24 14:32:21 -0600 (Mon, 24 Jan 2011) | 31 lines
      
      Fix channel redirect out of MeetMe() and other issues with channel softhangup.
      
      Mantis issue #18585 reports that a channel redirect out of MeetMe() stopped
      working properly.  This issue includes a patch that resolves the issue by
      removing a call to ast_check_hangup() from app_meetme.c.  I left that in my
      patch, as it doesn't need to be there.  However, the rest of the patch fixes
      this problem with or without the change to app_meetme.
      
      The key difference between what happens before and after this patch is the
      effect of the END_OF_Q control frame.  After END_OF_Q is hit in ast_read(),
      ast_read() will return NULL.  With the ast_check_hangup() removed, app_meetme
      sees this which causes it to exit as intended.  Checking ast_check_hangup()
      caused app_meetme to exit earlier in the process, and the target of the
      redirect saw the condition where ast_read() returned NULL.
      
      Removing ast_check_hangup() works around the issue in app_meetme, but doesn't
      solve the issue if another application did the same thing.  There are also
      other edge cases where if an application finishes at the same time that a
      redirect happens, the target of the redirect will think that the channel hung
      up.  So, I made some changes in pbx.c to resolve it at a deeper level.  There
      are already places that unset the SOFTHANGUP_ASYNCGOTO flag in an attempt to
      abort the hangup process.  My patch extends this to remove the END_OF_Q frame
      from the channel's read queue, making the "abort hangup" more complete.  This
      same technique was used in every place where a softhangup flag was cleared.
      
      (closes issue #18585)
      Reported by: oej
      Tested by: oej, wedhorn, russell
      
      Review: https://reviewboard.asterisk.org/r/1082/
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@303551 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-24 20:57:28 +00:00
Matthew Nicholson e706b5706e According to section 19.1.2 of RFC 3261:
For each component, the set of valid BNF expansions defines exactly
  which characters may appear unescaped.  All other characters MUST be
  escaped.

This patch modifies ast_uri_encode() to encode strings in line with this recommendation.  This patch also adds an ast_escape_quoted() function which escapes '"' and '\' characters in quoted strings in accordance with section 25.1 of RFC 3261.  The ast_uri_encode() function has also been modified to take an ast_flags struct describing the set of rules it should use when escaping characters to allow for it to escape SIP URIs in addition to HTTP URIs and other types of URIs or variations of those two URI types in the future.

The ast_uri_decode() function has also been modified to accept an ast_flags struct describing the set of rules to use when decoding to enable decoding '+' as ' ' in legacy http URLs.

The unit tests for these functions have also been updated.

ABE-2705

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@303509 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-24 18:59:22 +00:00
Richard Mudgett 9974f89a7d Merged revisions 303153 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r303153 | rmudgett | 2011-01-20 14:31:20 -0600 (Thu, 20 Jan 2011) | 22 lines
  
  Merged revision 303098 from
  https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier
  
  ..........
    r303098 | rmudgett | 2011-01-20 12:11:45 -0600 (Thu, 20 Jan 2011) | 15 lines
  
    CC_INTERFACES does not get built correctly with local channels.
  
    If local channels are used with CCSS, CC_INTERFACES gets garbage prepended
    to it so the CC recall fails.  Also CC_INTERFACES gets "&(null)" appended
    to it.
  
    * Initialize the buffer to eliminate the prepended garbage.
  
    * Filter out the empty interface strings to eliminate the latter.
  
    * Added a diagnostic message if the CC_INTERFACES is ever empty.
  
    JIRA ABE-2740
    JIRA SWP-2848
  ..........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@303154 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-20 20:35:50 +00:00
Shaun Ruffell 80f6848ca3 Merged revisions 303107 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r303107 | sruffell | 2011-01-20 13:57:31 -0600 (Thu, 20 Jan 2011) | 23 lines
  
  Merged revisions 303106 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r303106 | sruffell | 2011-01-20 13:56:34 -0600 (Thu, 20 Jan 2011) | 15 lines
    
    main/features: Use POLLPRI when waiting for events on parked channels.
    
    This change resolves a regression in the 1.6.2 when converting from
    select to poll.  The DAHDI timers use POLLPRI to indicate that the timer
    fired, but features was not waiting for that flag.  The result was no
    audio for MOH when a call was parked and res_timing_dahdi was in use.
    
    This patch is slightly modified from the one on the mantis issue.  It does
    not set an exception on the channel if the POLLPRI flag is set.
    
    (closes issue #18262)
    Reported by: francesco_r
    Patches:
          patch_park_moh-trunk-2.txt uploaded by cjacobsen (license 1029)
          Tested by: francesco_r, rfrantik, one47
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@303108 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-20 19:58:54 +00:00
Russell Bryant 1c469717a4 Merged revisions 302837 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r302837 | russell | 2011-01-19 17:56:48 -0600 (Wed, 19 Jan 2011) | 2 lines
  
  Only check container count if it exists.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@302838 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-19 23:57:27 +00:00
Sean Bright 6abfc32125 Clarify a source comment about configuration template categories.
(closes issue #18578)
Reported by: astmiv
Patches:
      asterisk.main.config.2.patch uploaded by astmiv (license 1189)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@302836 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-19 23:53:44 +00:00
Russell Bryant b822431266 Merged revisions 302789 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r302789 | russell | 2011-01-19 17:06:46 -0600 (Wed, 19 Jan 2011) | 11 lines
  
  Merged revisions 302788 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r302788 | russell | 2011-01-19 17:06:14 -0600 (Wed, 19 Jan 2011) | 4 lines
    
    Turn a noisy verbose message into a debug message.
    
    This can drown your console if you're using the AMI over HTTP.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@302790 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-19 23:07:22 +00:00
Russell Bryant 0a6082c45a Merged revisions 302785 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r302785 | russell | 2011-01-19 16:35:15 -0600 (Wed, 19 Jan 2011) | 15 lines
  
  Resolve a memory leak with the manager interface is disabled.
  
  The intent of this check as it stands in previous versions of Asterisk was to
  check if there are any active sessions.  If there were no sessions, then the
  function would return immediately and not bother with queueing up the manager
  event to be processed.  Since the conversion of storing sessions in an astobj2
  container, this check will always pass.  I changed it to go back to checking
  what was intended.
  
  The side effect of this was that if the AMI is disabled, the manager event
  queue is populated anyway, but the code that runs to clear out the queue
  never runs.  A producer with no consumer is a bad thing.
  
  Reported internally by kmorgan.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@302786 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-19 22:36:30 +00:00
Richard Mudgett c8e57f82bf Merged revisions 302713 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r302713 | rmudgett | 2011-01-19 15:29:22 -0600 (Wed, 19 Jan 2011) | 29 lines
  
  Merged revisions 302693 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r302693 | rmudgett | 2011-01-19 15:25:41 -0600 (Wed, 19 Jan 2011) | 22 lines
    
    Merged revisions 302671 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r302671 | rmudgett | 2011-01-19 15:21:56 -0600 (Wed, 19 Jan 2011) | 15 lines
      
      DTMF transfer plays the wrong sounds for wrong number or other call failure.
      
      * Set the default for features.conf.sample xferfailsound option to "beeperr"
      as documented instead of "pbx-invalid" and corrected the use of it in DTMF
      blind transfer (#1).
      
      * Improved DTMF blind transfer handling of wrong numbers.
      
      Most of the concerns in this issue were taken care of by the patch for
      issue 17999: Issues with DTMF triggered attended transfers.
      
      (closes issue #18379)
      Reported by: gincantalupo
      Tested by: rmudgett
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@302732 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-19 21:35:28 +00:00
Tilghman Lesher f8bbf4bfa2 Merged revisions 302634 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r302634 | tilghman | 2011-01-19 14:24:57 -0600 (Wed, 19 Jan 2011) | 22 lines
  
  Merged revisions 302599 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r302599 | tilghman | 2011-01-19 14:13:24 -0600 (Wed, 19 Jan 2011) | 15 lines
    
    Kill zombies.
    
    When we ast_safe_fork() with a non-zero argument, we're expected to reap our
    own zombies.  On a zero argument, however, the zombies are only reaped when
    there aren't any non-zero forked children alive.  At other times, we
    accumulate zombies.  This code is forward ported from res_agi in 1.4, so that
    forked children are always reaped, thus preventing an accumulation of zombie
    processes.
    
    (closes issue #18515)
    Reported by: ernied
    Patches: 
          20101221__issue18515.diff.txt uploaded by tilghman (license 14)
    Tested by: ernied
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@302644 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-19 20:33:30 +00:00
Sean Bright 5943a34463 Merged revisions 302555 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r302555 | seanbright | 2011-01-19 14:03:32 -0500 (Wed, 19 Jan 2011) | 14 lines
  
  Merged revisions 302554 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r302554 | seanbright | 2011-01-19 14:02:29 -0500 (Wed, 19 Jan 2011) | 7 lines
    
    Don't call strlen() when we only need to look at the next character or two.
    
    (closes issue #18042)
    Reported by: wdoekes
    Patches:
          astsvn-inefficient-ast-uri-decode.patch uploaded by wdoekes (license 717)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@302556 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-19 19:04:25 +00:00
Sean Bright f4d63bf918 Merged revisions 302552 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r302552 | seanbright | 2011-01-19 13:54:47 -0500 (Wed, 19 Jan 2011) | 14 lines
  
  Merged revisions 302551 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r302551 | seanbright | 2011-01-19 13:54:03 -0500 (Wed, 19 Jan 2011) | 7 lines
    
    Remove an extraneous \r\n at the end of a parking manager events.
    
    (closes issue #18363)
    Reported by: clegall_proformatique
    Patches:
          asterisk_1.8_295998_parking_manager_events_format.patch uploaded by clegall proformatique (license 1139)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@302553 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-19 18:55:43 +00:00
Sean Bright bd26287e88 Merged revisions 302505 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r302505 | seanbright | 2011-01-19 12:58:11 -0500 (Wed, 19 Jan 2011) | 14 lines
  
  Merged revisions 302504 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r302504 | seanbright | 2011-01-19 12:56:32 -0500 (Wed, 19 Jan 2011) | 7 lines
    
    Make sure that h_length is set when we short-circuit out of ast_gethostbyname.
    
    (closes issue #16135)
    Reported by: thedavidfactor
    Patches:
          utils.patch uploaded by thedavidfactor (license 903)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@302507 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-19 17:59:18 +00:00
Richard Mudgett 8cd1ac534b Merged revisions 302318 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r302318 | rmudgett | 2011-01-18 16:04:14 -0600 (Tue, 18 Jan 2011) | 1 line
  
  Use the expanded format type instead of plain int.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@302319 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-18 22:06:55 +00:00
Jeff Peeler b1f9f1e78f Merged revisions 302266 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r302266 | jpeeler | 2011-01-18 14:19:57 -0600 (Tue, 18 Jan 2011) | 34 lines
  
  Merged revisions 302265 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r302265 | jpeeler | 2011-01-18 14:13:52 -0600 (Tue, 18 Jan 2011) | 27 lines
    
    Convert device state callbacks to ao2 objects to fix a deadlock in chan_sip.
    
    Lock scenario presented here:
    Thread 1
     holds ast_rdlock_contexts &conlock
     holds handle_statechange hints
     holds handle_statechange hint
      waiting for cb_extensionstate
       Locked Here: chan_sip.c line 7428 (find_call)
    Thread 2
     holds handle_request_do &netlock
     holds find_call sip_pvt_ptr
      waiting for ast_rdlock_contexts &conlock
       Locked Here: pbx.c line 9911 (ast_rdlock_contexts)
    
    Chan_sip has an established locking order of locking the sip_pvt and then
    getting the context lock. So the as stated by the summary, the operations in
    thread 2 have been modified to no longer require the context lock.
    
    (closes issue #18310)
    Reported by: one47
    Patches: 
          statecbs_ao2.mk2.patch uploaded by one47 (license 23),
          modified by me
    
    Review: https://reviewboard.asterisk.org/r/1072/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@302270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-18 20:40:59 +00:00
Russell Bryant 519b766cd4 Merged revisions 302267 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r302267 | russell | 2011-01-18 14:19:57 -0600 (Tue, 18 Jan 2011) | 5 lines
  
  Don't enable AO2_DEBUG by default if AST_DEVMODE is on.
  
  AO2_DEBUG is not important and is causing a false compiler warning to be
  generated on my Ubuntu Natty dev box.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@302268 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-18 20:21:29 +00:00
Richard Mudgett a05aeff312 Merged revisions 302174 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r302174 | rmudgett | 2011-01-18 12:11:43 -0600 (Tue, 18 Jan 2011) | 102 lines
  
  Merged revisions 302173 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r302173 | rmudgett | 2011-01-18 12:07:15 -0600 (Tue, 18 Jan 2011) | 95 lines
    
    Merged revisions 302172 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r302172 | rmudgett | 2011-01-18 12:04:36 -0600 (Tue, 18 Jan 2011) | 88 lines
      
      Issues with DTMF triggered attended transfers.
      
      Issue #17999
      1) A calls B. B answers.
      2) B using DTMF dial *2 (code in features.conf for attended transfer).
      3) A hears MOH. B dial number C
      4) C ringing. A hears MOH.
      5) B hangup. A still hears MOH. C ringing.
      6) A hangup. C still ringing until "atxfernoanswertimeout" expires.
      For v1.4 C will ring forever until C answers the dead line. (Issue #17096)
      
      Problem: When A and B hangup, C is still ringing.
      
      Issue #18395
      SIP call limit of B is 1
      1. A call B, B answered
      2. B *2(atxfer) call C
      3. B hangup, C ringing
      4. Timeout waiting for C to answer
      5. Recall to B fails because B has reached its call limit.
      
      Because B reached its call limit, it cannot do anything until the transfer
      it started completes.
      
      Issue #17273
      Same scenario as issue 18395 but party B is an FXS port.  Party B cannot
      do anything until the transfer it started completes.  If B goes back off
      hook before C answers, B hears ringback instead of the expected dialtone.
      
      **********
      Note for the issue #17273 and #18395 fix:
      
      DTMF attended transfer works within the channel bridge.  Unfortunately,
      when either party A or B in the channel bridge hangs up, that channel is
      not completely hung up until the transfer completes.  This is a real
      problem depending upon the channel technology involved.
      
      For chan_dahdi, the channel is crippled until the hangup is complete.
      Either the channel is not useable (analog) or the protocol disconnect
      messages are held up (PRI/BRI/SS7) and the media is not released.
      
      For chan_sip, a call limit of one is going to block that endpoint from any
      further calls until the hangup is complete.
      
      For party A this is a minor problem.  The party A channel will only be in
      this condition while party B is dialing and when party B and C are
      conferring.  The conversation between party B and C is expected to be a
      short one.  Party B is either asking a question of party C or announcing
      party A.  Also party A does not have much incentive to hangup at this
      point.
      
      For party B this can be a major problem during a blonde transfer.  (A
      blonde transfer is our term for an attended transfer that is converted
      into a blind transfer.  :)) Party B could be the operator.  When party B
      hangs up, he assumes that he is out of the original call entirely.  The
      party B channel will be in this condition while party C is ringing, while
      attempting to recall party B, and while waiting between call attempts.
      
      WARNING:
      The ATXFER_NULL_TECH conditional is a hack to fix the problem.  It will
      replace the party B channel technology with a NULL channel driver to
      complete hanging up the party B channel technology.  The consequences of
      this code is that the 'h' extension will not be able to access any channel
      technology specific information like SIP statistics for the call.
      
      ATXFER_NULL_TECH is not defined by default.
      **********
      
      (closes issue #17999)
      Reported by: iskatel
      Tested by: rmudgett
      JIRA SWP-2246
      
      (closes issue #17096)
      Reported by: gelo
      Tested by: rmudgett
      JIRA SWP-1192
      
      (closes issue #18395)
      Reported by: shihchuan
      Tested by: rmudgett
      
      (closes issue #17273)
      Reported by: grecco
      Tested by: rmudgett
      
      Review: https://reviewboard.asterisk.org/r/1047/
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@302178 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-18 18:17:01 +00:00