Commit Graph

7601 Commits

Author SHA1 Message Date
Automerge script ad73fe2c9f Merged revisions 378634 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

........
  r378634 | wedhorn | 2013-01-06 15:37:59 -0600 (Sun, 06 Jan 2013) | 6 lines
  
  Skinny blob cleanup
  
  Cleanup of red blobs in chan_skinny and possible other small formatting issues.
  
  Review: https://reviewboard.asterisk.org/r/2262/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@378639 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-06 22:19:17 +00:00
Automerge script 00b40f6e2a Merged revisions 378623-378624 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r378623 | wedhorn | 2013-01-06 14:45:12 -0600 (Sun, 06 Jan 2013) | 12 lines
  
  Rewrite skinny dialing to remove threaded simpleswitch
  
  This rewrite changes skinny dialing from the threaded simpleswitch
  to a scheduled timeout approach. There were some underlying issues
  with the threaded simple switch with occasional corruption and
  possible segfaults.
  
  Review: https://reviewboard.asterisk.org/r/2240/
  ........
  
  Merged revisions 378622 from http://svn.asterisk.org/svn/asterisk/branches/11
................
  r378624 | wedhorn | 2013-01-06 15:09:43 -0600 (Sun, 06 Jan 2013) | 6 lines
  
  Add group and namedgroup pickup to skinny
  
  Above says it all. Code by snuff, cleaned up by me. 
  
  Review: https://reviewboard.asterisk.org/r/2246/
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@378629 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-06 21:20:13 +00:00
Automerge script 77150eecd9 Merged revisions 378565,378585 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r378565 | elguero | 2013-01-04 15:20:12 -0600 (Fri, 04 Jan 2013) | 27 lines
  
  Fix SIP Notify Messages To Have The Proper IP Address In The FROM Field
  
  On a multihomed server when sending a NOTIFY message, we were not figuring out
  which network should be used to contact the peer.
  
  This patch fixes the problem by calling ast_sip_ouraddrfor() and then
  build_via() so that our NOTIFY message contains the correct IP address.
  
  Also, a debug message is being added to help follow the call-id changes that
  occur.  This was helpful for confirming that the IP address was set properly
  since the call-id contains the IP address.  It also will be helpful for
  troubleshooting purposes when following a call in the debug logs.
  
  (closes issue ASTERISK-20805)
  Reported by: Bryan Hunt
  Tested by: Bryan Hunt, Michael L. Young
  Patches:
      asterisk-20805-notify-ip-v2.diff uploaded by Michael L. Young (license 5026)
  
  Review: https://reviewboard.asterisk.org/r/2255/
  ........
  
  Merged revisions 378554 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 378559 from http://svn.asterisk.org/svn/asterisk/branches/11
................
  r378585 | kmoore | 2013-01-04 16:19:16 -0600 (Fri, 04 Jan 2013) | 13 lines
  
  Fix pjproject compilation in certain circumstances
  
  On a fresh checkout of Asterisk 11, running make before ./configure
  could cause the pjproject subdirectory to get in an odd state that
  would prevent compilation. This patch by Tilghman prevents that from
  occurring.
  
  (closes issue ASTERISK-20681)
  Patch-by: Tilghman Lesher
  ........
  
  Merged revisions 378582 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@378586 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-04 22:19:35 +00:00
Automerge script d359e1225e Merged revisions 378488 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r378488 | rmudgett | 2013-01-03 13:42:54 -0600 (Thu, 03 Jan 2013) | 15 lines
  
  chan_agent: Fix wrapup time wait response.
  
  * Made agent_cont_sleep() and agent_ack_sleep() stop waiting if the wrapup 
  time expires.  agent_cont_sleep() had tried but returned the wrong value 
  to stop waiting.  
  
  * Made agent_ack_sleep() take a struct agent_pvt pointer instead of a void
  pointer for better type safety.
  ........
  
  Merged revisions 378486 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 378487 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@378495 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-03 20:19:37 +00:00
Automerge script f824b845ce Merged revisions 378458,378460 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r378458 | rmudgett | 2013-01-03 12:47:29 -0600 (Thu, 03 Jan 2013) | 18 lines
  
  chan_agent: Misc code cleanup.
  
  * Fix off-nominal path resource cleanup in agent_request().
  
  * Create agent_pvt_destroy() to eliminate inlined versions in many places.
  
  * Pull invariant code out of loop in add_agent().
  
  * Remove redundant module user references in login_exec().
  
  * Remove unused struct agent_pvt logincallerid[] member.
  ........
  
  Merged revisions 378456 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 378457 from http://svn.asterisk.org/svn/asterisk/branches/11
................
  r378460 | kmoore | 2013-01-03 12:51:43 -0600 (Thu, 03 Jan 2013) | 13 lines
  
  Add missing test event
  
  This test event was missing from channel.c causing the dial_LS_options
  test to fail intermittently because of a race condition where most code
  paths emitted the test event but this one did not. The dial_LS_options
  test should stop bouncing now.
  ........
  
  Merged revisions 378455 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 378459 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@378467 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-03 19:19:40 +00:00
Automerge script 06b4ef8317 Merged revisions 378429 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r378429 | rmudgett | 2013-01-03 11:48:14 -0600 (Thu, 03 Jan 2013) | 10 lines
  
  chan_agent: Fix agent_indicate() locking.
  
  Avoid deadlock potential with local channels and simplify the locking.
  ........
  
  Merged revisions 378427 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 378428 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@378436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-03 18:20:07 +00:00
Automerge script 675914bb17 Merged revisions 378322 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r378322 | mjordan | 2013-01-02 12:11:59 -0600 (Wed, 02 Jan 2013) | 33 lines
  
  Prevent exhaustion of system resources through exploitation of event cache
  
  Asterisk maintains an internal cache for devices in the event subsystem. The
  device state cache holds the state of each device known to Asterisk, such that
  consumers of device state information can query for the last known state for
  a particular device, even if it is not part of an active call. The concept of
  a device in Asterisk can include entities that do not have a physical
  representation. One way that this occurred was when anonymous calls are allowed
  in Asterisk. A device was automatically created and stored in the cache for
  each anonymous call that occurred; this was possible in the SIP and IAX2
  channel drivers and through channel drivers that utilized the
  res_jabber/res_xmpp resource modules (Gtalk, Jingle, and Motif). These devices
  are never removed from the system, allowing anonymous calls to potentially
  exhaust a system's resources.
  
  This patch changes the event cache subsystem and device state management to
  no longer cache devices that are not associated with a physical entity.
  
  (issue ASTERISK-20175)
  Reported by: Russell Bryant, Leif Madsen, Joshua Colp
  Tested by: kmoore
  patches:
    event-cachability-3.diff uploaded by jcolp (license 5000)
  ........
  
  Merged revisions 378303 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 378320 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........
  
  Merged revisions 378321 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@378329 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-02 18:20:03 +00:00
Automerge script 5966364588 Merged revisions 378288 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r378288 | mjordan | 2013-01-02 09:39:42 -0600 (Wed, 02 Jan 2013) | 36 lines
  
  Resolve crashes due to large stack allocations when using TCP
  
  Asterisk had several places where messages received over various network
  transports may be copied in a single stack allocation. In the case of TCP,
  since multiple packets in a stream may be concatenated together, this can
  lead to large allocations that overflow the stack.
  
  This patch modifies those portions of Asterisk using TCP to either
  favor heap allocations or use an upper bound to ensure that the stack will not
  overflow:
   * For SIP, the allocation now has an upper limit
   * For HTTP, the allocation is now a heap allocation instead of a stack
     allocation
   * For XMPP (in res_jabber), the allocation has been eliminated since it was
     unnecesary.
  
  Note that the HTTP portion of this issue was independently found by Brandon
  Edwards of Exodus Intelligence.
  
  (issue ASTERISK-20658)
  Reported by: wdoekes, Brandon Edwards
  Tested by: mmichelson, wdoekes
  patches:
    ASTERISK-20658_res_jabber.c.patch uploaded by mmichelson (license 5049)
    issueA20658_http_postvars_use_malloc2.patch uploaded by wdoekes (license 5674)
    issueA20658_limit_sip_packet_size3.patch uploaded by wdoekes (license 5674)
  ........
  
  Merged revisions 378269 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 378286 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........
  
  Merged revisions 378287 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@378296 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-02 16:20:01 +00:00
Automerge script 728b5b838c Merged revisions 378220 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r378220 | kmoore | 2012-12-31 08:46:06 -0600 (Mon, 31 Dec 2012) | 18 lines
  
  Ensure chan_sip rejects encrypted streams without crypto info
  
  This ensures that Asterisk rejects encrypted media streams (RTP/SAVP
  audio and video) that are missing cryptographic keys and ensures that
  the incoming SDP is consistent with RFC4568 as far as having a crypto
  attribute present for any SAVP streams.
  
  Review: https://reviewboard.asterisk.org/r/2204/
  ........
  
  Merged revisions 378217 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 378218 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........
  
  Merged revisions 378219 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@378228 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-31 15:21:42 +00:00
Automerge script 84e6a9847a Merged revisions 378091,378095 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r378091 | rmudgett | 2012-12-17 17:02:54 -0600 (Mon, 17 Dec 2012) | 22 lines
  
  Make chan_local module references tied to local_pvt lifetime.
  
  The chan_local module references were manually tied to the existence of
  the ;1 and ;2 channel links.
  
  * Made chan_local module references tied to the existence of the local_pvt
  structure as well as automatically take care of the module references.
  
  * Tweaked the wording of the local_fixup() failure warning message to make
  sense.
  
  Review: https://reviewboard.asterisk.org/r/2181/
  ........
  
  Merged revisions 378088 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 378089 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........
  
  Merged revisions 378090 from http://svn.asterisk.org/svn/asterisk/branches/11
................
  r378095 | rmudgett | 2012-12-17 17:10:42 -0600 (Mon, 17 Dec 2012) | 11 lines
  
  Fix potential double free when unloading a module.
  ........
  
  Merged revisions 378092 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 378093 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........
  
  Merged revisions 378094 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@378099 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-17 23:18:40 +00:00
Automerge script f1e6eefdba Merged revisions 378081 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

........
  r378081 | rmudgett | 2012-12-17 15:22:21 -0600 (Mon, 17 Dec 2012) | 7 lines
  
  chan_local: Parse dial string consistently.
  
  * Fix local_alloc() unexpected limitation of exten and context length from
  a combined length of 80 characters to a normal 80 characters each.
  
  * Made local_alloc() and local_devicestate() parse the same way.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@378083 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-17 22:17:57 +00:00
Automerge script be4cc7b20b Merged revisions 378072,378074 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r378072 | rmudgett | 2012-12-17 14:34:25 -0600 (Mon, 17 Dec 2012) | 9 lines
  
  chan_local: Misc lock and ref tweaks.
  
  * awesome_locking() does not need to thrash the pvt lock as much.
  
  * local_setoption() does not need to check for NULL pvt on cleanup since
  it will never be NULL.
  
  * Made ref the pvt before locking for consistency.
................
  r378074 | qwell | 2012-12-17 14:59:51 -0600 (Mon, 17 Dec 2012) | 10 lines
  
  Make libasteriskssl.so symlink use a relative path.
  
  This was causing issues when using DESTDIR, since the path to which the link
  pointed is not likely to exist (and not useful to exist) on the target system.
  
  (issue ASTNOW-284)
  ........
  
  Merged revisions 378073 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@378076 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-17 21:18:01 +00:00
Automerge script d4aeeecffa Merged revisions 378063-378064 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

........
  r378063 | jrose | 2012-12-14 16:34:18 -0600 (Fri, 14 Dec 2012) | 8 lines
  
  Features: BRIDGE_FEATURES variable automixmonitor support and use proper party
  
  BRIDGE_FEATURES did not previously support the automixmonitor feature. Now it
  does. In addition, the BRIDGE_FEATURES variable would not apply features to
  the proper party based on whether the feature option letter was in caps or
  in lowercase (both ways would apply it to the caller). Now uppercase applies
  to the caller while lowercase applies to the callee (like with the dial option)
........
  r378064 | rmudgett | 2012-12-14 16:45:03 -0600 (Fri, 14 Dec 2012) | 4 lines
  
  chan_agent: Remove some duplicated code.
  
  No need to check for an agent twice.  Santa does that.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@378066 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-14 23:17:59 +00:00
Automerge script 472dab8dd3 Merged revisions 378011 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r378011 | wedhorn | 2012-12-13 19:55:43 -0600 (Thu, 13 Dec 2012) | 15 lines
  
  Fix skinny to recognise vmexten in general section of conf
  
  Fixup the vmexten so if globally set in general section will be honored by
  chan_skinny. Also get rid of the 'global_' part of variable name to match
  regexten.
  
  (closes issue AST-20790)
  Reported by: snuffy
  Tested by: snuffy, myself
  Patches: 
      skinny-vm.diff uploaded by snuffy (license 5024)
  ........
  
  Merged revisions 378010 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@378012 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-14 02:17:34 +00:00
Automerge script c99f5359c6 Merged revisions 378006 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

........
  r378006 | wedhorn | 2012-12-13 19:02:15 -0600 (Thu, 13 Dec 2012) | 8 lines
  
  Add g722 codec support to skinny
  
  (closes issue AST-20788)
  Reported by: snuffy
  Tested by: snuffy, myself
  Patches: 
      skinny-g722.diff uploaded by snuffy (license 5024)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@378007 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-14 01:17:36 +00:00
Automerge script 5af578c022 Merged revisions 378000-378002 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r378000 | seanbright | 2012-12-13 15:20:32 -0600 (Thu, 13 Dec 2012) | 8 lines
  
  Make generate_exchange_uuid() always return the passed ast_str pointer.
  
  I changed this code earlier to return NULL if it wasn't able to generate a UUID,
  whereas the earlier code would always return the ast_str that was passed in.
  Switch back to returning the ast_str, only set it to the empty string instead if
  UUID generation fails.  We still do a validity check later which will catch this
  and blow up if necessary.
................
  r378001 | wedhorn | 2012-12-13 15:25:31 -0600 (Thu, 13 Dec 2012) | 9 lines
  
  Minor fixes for chan_skinny
  
  Whitespace, change SUBSTATE_ONHOOK to correct SKINNY_ONHOOK and 
  correct len of 2 strcmp in skinny_setdebug(). (see opticron's review
  on https://reviewboard.asterisk.org/r/2240/)
  ........
  
  Merged revisions 377991 from http://svn.asterisk.org/svn/asterisk/branches/11
................
  r378002 | rmudgett | 2012-12-13 15:28:15 -0600 (Thu, 13 Dec 2012) | 35 lines
  
  confbridge: Fix MOH on simultaneous user entry to a new conference.
  
  When two users entered a new conference simultaneously, one of the callers
  hears MOH.  This happened if two unmarked users entered simultaneously and
  also if a waitmarked and a marked user entered simultaneously.
  
  * Created a confbridge internal MOH API to eliminate the inlined MOH
  handling code.  Note that the conference mixing bridge needs to be locked
  when actually starting/stopping MOH because there is a small window
  between the conference join unsuspend MOH and actually joining the mixing
  bridge.
  
  * Created the concept of suspended MOH so it can be interrupted while
  conference join announcements to the user and DTMF features can operate.
  
  * Suspend any MOH until the user is about to actually join the mixing
  bridge of the conference.  This way any pre-join file playback does not
  need to worry about MOH.
  
  * Made post-join actions only play deferred entry announcement files.
  Changing the user/conference state during that time is not protected or
  controlled by the state machine.
  
  (closes issue ASTERISK-20606)
  Reported by: Eugenia Belova
  Tested by: rmudgett
  
  Review: https://reviewboard.asterisk.org/r/2232/
  ........
  
  Merged revisions 377992 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........
  
  Merged revisions 377993 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@378003 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-13 22:17:36 +00:00
Automerge script c765f4fa0a Merged revisions 377986 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r377986 | wedhorn | 2012-12-13 12:28:41 -0600 (Thu, 13 Dec 2012) | 14 lines
  
  Fix skinny debug tab completion
  
  Review the syntax of the 'skinny debug' command to show more than
  just 'show' for options to 'skinny debug' command.
  
  (closes issue ASTERISK-20789)
  Reported by: snuffy
  Tested by: snuffy, myself
  Patches:
      skinny-debug.diff uploaded by snuffy (license 5024)
  ........
  
  Merged revisions 377985 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377987 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-13 19:17:36 +00:00
Mark Michelson ece4c95798 Resolve conflict and reset automerge.
git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377980 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-13 16:39:40 +00:00
Automerge script 90c7ab4814 Merged revisions 377966 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r377966 | kmoore | 2012-12-13 08:28:57 -0600 (Thu, 13 Dec 2012) | 23 lines
  
  Ensure Min-SE is included in outbound INVITEs
  
  Asterisk now includes Min-SE in outbound INVITEs when the value is not
  90 (the default) and session timers are not disabled. This has the
  effect of Asterisk following RFC4028 more closely with regard to 422
  responses and preventing situations in which Asterisk would be forced
  to temporarily accept a call to tear it down based on a Session-Expires
  below the locally configured Min-SE.
  
  (issue SWP-5051)
  Review: https://reviewboard.asterisk.org/r/2222/
  Reported-by: Kinsey Moore
  Patch-by: Kinsey Moore
  ........
  
  Merged revisions 377946 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 377947 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........
  
  Merged revisions 377948 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377968 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-13 15:17:41 +00:00
Automerge script 7a7f9cba43 Merged revisions 377911 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r377911 | mmichelson | 2012-12-11 18:02:31 -0600 (Tue, 11 Dec 2012) | 22 lines
  
  Fix a potential deadlock in chan_sip during transfers.
  
  The issue comes from the fact that transfers may perform
  a redirecting update on a channel. The issue is that lock
  inversion between the channel and its tech_pvt occurs since
  the channel lock is released during the transfer process.
  
  The fix is to move when the redirecting update occurs to a
  place where neither the tech_pvt or the channel is locked so
  that the two can be locked in the proper order.
  
  (closes issue ASTERISK-20708)
  reported by Mark Michelson
  patches:
  	ASTERISK-20708-3.patch uploaded by Mark Michelson (License #5049)
  
  Tested by:
  	Tim Ringenbach at Asteria Solutions Group
  ........
  
  Merged revisions 377910 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377912 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-12 00:17:36 +00:00
Automerge script 81afbcca2c Merged revisions 377626 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r377626 | kmoore | 2012-12-10 08:45:52 -0600 (Mon, 10 Dec 2012) | 20 lines
  
  Handle Session-Expires less than local Min-SE in 200 OK
  
  Ensure that a call is immediately torn down if a Session-Expires value
  received in a 200 OK is less than the local Min-SE. This also prevents
  Asterisk from allowing calls with Session-Expires below the
  RFC4028-mandated minimum (90s).
  
  (closes issue ASTERISK-20653)
  Review: https://reviewboard.asterisk.org/r/2237/
  Patch-by: Kinsey Moore
  ........
  
  Merged revisions 377623 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 377624 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........
  
  Merged revisions 377625 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377633 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-10 15:21:05 +00:00
Automerge script 58f0ade4db Merged revisions 377594-377595 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r377594 | igorg | 2012-12-10 00:56:04 -0600 (Mon, 10 Dec 2012) | 15 lines
  
  Fix codec mismatch
  
  Fix code to send in both rx and tx open stream messages correct codecs. Found that on phase 0/1 phones wrong codecs cause to no audio in some situations. 
  
  (issue ASTERISK-20183)
  ........
  
  Merged revisions 377591 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 377592 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........
  
  Merged revisions 377593 from http://svn.asterisk.org/svn/asterisk/branches/11
................
  r377595 | igorg | 2012-12-10 01:03:48 -0600 (Mon, 10 Dec 2012) | 3 lines
  
  Add firmware information to CLI devices listing
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377602 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-10 07:19:34 +00:00
Automerge script db0e7049ac Merged revisions 377579 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r377579 | igorg | 2012-12-09 23:29:04 -0600 (Sun, 09 Dec 2012) | 7 lines
  
  Remove trailing whitespaces in number from incoming redial list. 
  
  Reported by: Igor Olhovskiy
  ........
  
  Merged revisions 377577 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-10 06:19:08 +00:00
Automerge script 75559a4c42 Merged revisions 377463 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r377463 | file | 2012-12-08 19:23:44 -0600 (Sat, 08 Dec 2012) | 9 lines
  
  Add missing support for "who hung up" to chan_motif.
  
  (closes issue ASTERISK-20671)
  Reported by: Matt Jordan
  Review: https://reviewboard.asterisk.org/r/2208/
  ........
  
  Merged revisions 377462 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377468 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-09 02:20:13 +00:00
Automerge script 7a203dc72c Merged revisions 377260,377263 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r377260 | file | 2012-12-05 10:51:58 -0600 (Wed, 05 Dec 2012) | 25 lines
  
  Fix a SIP request memory leak with TLS connections.
  
  During the TLS re-work in chan_sip some TLS specific code was moved
  into a separate function. This function operates on a copy of the
  incoming SIP request. This copy was never deinitialized causing a
  memory leak for each request processed.
  
  This function is now given a SIP request structure which it can use
  to copy the incoming request into. This reduces the amount of memory
  allocations done since the internal allocated components are reused
  between packets and also ensures the SIP request structure is
  deinitialized when the TLS connection is torn down.
  
  (closes issue ASTERISK-20763)
  Reported by: deti
  ........
  
  Merged revisions 377257 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 377258 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........
  
  Merged revisions 377259 from http://svn.asterisk.org/svn/asterisk/branches/11
................
  r377263 | jrose | 2012-12-05 11:17:06 -0600 (Wed, 05 Dec 2012) | 21 lines
  
  res_srtp: Fix a crash caused by srtp_dealloc on an already dealloced session
  
  When srtp_create fails, the session may be dealloced or just not alloced. At
  the same time though, the session pointer might not be set to NULL in this
  process and attempting to srtp_dealloc it again will cause a segfault. This
  patch checks for failure of srtp_create and sets the session pointer to NULL
  if it fails.
  
  (closes issue ASTERISK-20499)
  Reported by: tootai
  Review: https://reviewboard.asterisk.org/r/2228/
  ........
  
  Merged revisions 377256 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 377261 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........
  
  Merged revisions 377262 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-05 17:20:37 +00:00
Automerge script b44f72f794 Merged revisions 377018,377022 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r377018 | oej | 2012-12-03 08:46:02 -0600 (Mon, 03 Dec 2012) | 5 lines
  
  Move functions to AFTER the block of forward declarations of functions. 
  
  It was a mess. The first part of chan_sip.c is constants, declarations, structures and stuff,
  then forward declarations and then actual code. It's still a mess, but a bit less messy ;-)
................
  r377022 | file | 2012-12-03 08:56:36 -0600 (Mon, 03 Dec 2012) | 13 lines
  
  Fix an RTP instance reference count leak in chan_motif.
  
  When setting up an RTP instance the RTCP portion of the instance
  keeps a reference to the instance itself. In order to release this
  reference and stop RTCP the stop API call must be called before
  destroying the instance.
  
  (closes issue ASTERISK-20751)
  Reported by: joshoa
  ........
  
  Merged revisions 377021 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377028 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-03 15:19:37 +00:00
Automerge script 129b1fba48 Merged revisions 376998 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

........
  r376998 | oej | 2012-12-03 03:35:55 -0600 (Mon, 03 Dec 2012) | 4 lines
  
  Formatting changes
  
  Found a large amount of missing {} in the code before patching in another branch
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377003 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-03 10:20:59 +00:00
Automerge script f598d0eb74 Merged revisions 376984 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r376984 | file | 2012-11-30 18:47:42 -0600 (Fri, 30 Nov 2012) | 10 lines
  
  Tweak extension used for incoming calls received on Motif.
  
  Based on feedback from numerous individuals this patch tweaks incoming calls
  to first look for an extension with the name of the endpoint. If no such extension
  exists the call will silently fall back to the "s" extension as it previously
  did.
  ........
  
  Merged revisions 376983 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376989 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-01 01:19:10 +00:00
Automerge script 9820184db5 Merged revisions 376953 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r376953 | rmudgett | 2012-11-30 15:38:01 -0600 (Fri, 30 Nov 2012) | 24 lines
  
  chan_misdn: Fix sending RELEASE_COMPLETE in response to SETUP.
  
  Fix sending a RELEASE_COMPLETE in response to a SETUP if chan_misdn does
  not have a B channel available to assign to the call.
  
  (closes issue ABE-2869)
  Reported by: Guenther Kelleter
  Patches:
        setup-reject_2.diff (license #6372) patch uploaded by Guenther Kelleter
        Modified
  
  ........
  
  Merged revision 376949 from https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier
  ........
  
  Merged revisions 376950 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 376951 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........
  
  Merged revisions 376952 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376962 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-30 22:19:35 +00:00
Automerge script f10729c1a2 Merged revisions 376918,376922 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r376918 | mmichelson | 2012-11-30 10:56:53 -0600 (Fri, 30 Nov 2012) | 29 lines
  
  Fix potential crashes during SIP attended transfers.
  
  The principal behind this patch is simple. During a transfer,
  we manipulate channels that are owned by a separate thread than
  the one we currently are running in, so it makes sense that we
  need to grab a reference to the channels so that they cannot
  disappear out from under us.
  
  In the wild, crashes were sometimes seen when the transferring
  party would hang up the call before the transfer target answered
  the call. The most common place to see the crash occur was when
  attempting to send a connected line update to the transferer
  channel.
  
  (closes issue ASTERISK-20226)
  Reported by Jared Smith
  Patches:
  	ASTERISK-20226.patch uploaded by Mark Michelson (License #5049)
  Tested by: Jared Smith
  ........
  
  Merged revisions 376901 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 376916 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........
  
  Merged revisions 376917 from http://svn.asterisk.org/svn/asterisk/branches/11
................
  r376922 | seanbright | 2012-11-30 11:08:41 -0600 (Fri, 30 Nov 2012) | 11 lines
  
  Minor spelling fix to the VOLUME documentation.
  ........
  
  Merged revisions 376919 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 376920 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........
  
  Merged revisions 376921 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376929 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-30 17:20:20 +00:00
Automerge script b2df2488b6 Merged revisions 376867,376871 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r376867 | rmudgett | 2012-11-29 16:34:24 -0600 (Thu, 29 Nov 2012) | 13 lines
  
  Fix compile error.
  
  (issue ASTERISK-20724)
  ........
  
  Merged revisions 376864 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 376865 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........
  
  Merged revisions 376866 from http://svn.asterisk.org/svn/asterisk/branches/11
................
  r376871 | rmudgett | 2012-11-29 17:01:16 -0600 (Thu, 29 Nov 2012) | 13 lines
  
  chan_local: Fix local_pvt ref leak in local_devicestate().
  
  Regression introduced by ASTERISK-20390 fix.
  ........
  
  Merged revisions 376868 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 376869 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........
  
  Merged revisions 376870 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376878 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-29 23:19:44 +00:00
Automerge script f052e88b49 Merged revisions 376837 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r376837 | elguero | 2012-11-29 15:58:41 -0600 (Thu, 29 Nov 2012) | 25 lines
  
  Improve Code Readability And Fix Setting natdetected Flag
  
  For 1.8, 10, 11 and trunk we are are improving the code readability.
  
  For 11 and trunk, auto nat detection was added.  The natdetected flag was being
  set to 1 when the host address in the VIA header did not specifiy a port.  This
  patch fixes this by setting the port on the temporary sock address used to
  SIP_STANDARD_PORT in order for the sock address comparison to work properly.
  
  (closes issue ASTERISK-20724)
  Reported by: Michael L. Young
  Patches:
      asterisk-20724-set-port-v2.diff uploaded by Michael L. Young (license 5026)
  
  Review: https://reviewboard.asterisk.org/r/2206/
  ........
  
  Merged revisions 376834 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 376835 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........
  
  Merged revisions 376836 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376844 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-29 22:20:25 +00:00
Automerge script 93ec26e40a Merged revisions 376820-376821 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

........
  r376820 | pkiefer | 2012-11-29 10:44:42 -0600 (Thu, 29 Nov 2012) | 14 lines
  
  Fix chan_sip websocket payload handling
  
  Websocket by default doesn't return an ast_str for the payload received. When 
  converting it to an ast_str on chan_sip the last character was being omitted, 
  because ast_str functions expects that the given length includes the trailing 
  0x00. payload_len only has the actual string length without counting the 
  trailing zero.
  
  For most cases this passed unnoticed as most of SIP messages ends with \r\n.
  
  (closes issue ASTERISK-20745)
  Reported by: I?\195?\177aki Baz Castillo
  Review: https://reviewboard.asterisk.org/r/2219/
........
  r376821 | dlee | 2012-11-29 11:16:50 -0600 (Thu, 29 Nov 2012) | 5 lines
  
  Fixed ast_random's comment about locking.
  
  The original comment was separated from the code at some point, and didn't
  reflect the use of libc's other than glibc for Linux.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376827 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-29 17:19:50 +00:00
Automerge script d16d0200d2 Merged revisions 376575 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

........
  r376575 | rmudgett | 2012-11-21 12:33:16 -0600 (Wed, 21 Nov 2012) | 20 lines
  
  Add red-black tree container type to astobj2.
  
  * Add red-black tree container type.
  
  * Add CLI command "astobj2 container dump <name>"
  
  * Added ao2_container_dump() so the container could be dumped by other
  modules for debugging purposes.
  
  * Changed ao2_container_stats() so it can be used by other modules like
  ao2_container_check() for debugging purposes.
  
  * Updated the unit tests to check red-black tree containers.
  
  (closes issue ASTERISK-19970)
  Reported by: rmudgett
  Tested by: rmudgett
  
  Review: https://reviewboard.asterisk.org/r/2110/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-21 19:20:22 +00:00
Automerge script 898f9f853c Merged revisions 376551 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r376551 | mmichelson | 2012-11-20 13:09:37 -0600 (Tue, 20 Nov 2012) | 20 lines
  
  Add "Require: timer" to 200 OK responses when appropriate.
  
  The method by which the Require header is added to 200 responses is
  inspired by the method that Olle Johansson uses in his darjeeling-prack
  branch.
  
  (closes issue ASTERISK-20570)
  Reported by Matt Jordan, at the behest of Olle Johansson
  
  Review: https://reviewboard.asterisk.org/r/2172
  ........
  
  Merged revisions 376521 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 376522 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........
  
  Merged revisions 376550 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376556 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-20 19:19:31 +00:00
Automerge script ec170b1b9d Merged revisions 376541 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r376541 | alecdavis | 2012-11-20 11:39:11 -0600 (Tue, 20 Nov 2012) | 19 lines
  
  Reduce CLI spam of "Extension Changed" device state messages.
  
  Asterisk 11 follows RFC3265 that states that after every subscribe or resubscribe a notify should be sent.
  Thus the console if filled continuously with the following after every subscribe;
    == Extension Changed 8512[phones] new state IDLE for Notify User cisco1
   
  In Asterisk 1.8 only changes would be sent. Thus only when a device state changed was anything emitted to the console.
  
  fix:
  Only print to console when device state isn't forced.
  
  (closes ASTERISK-20706)
  Reported by: alecdavis
  Tested by: alecdavis
  alecdavis (license 585)
  ........
  
  Merged revisions 376540 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376546 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-20 18:19:37 +00:00
Automerge script abdfdf1cae Merged revisions 376472 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r376472 | wdoekes | 2012-11-19 14:03:56 -0600 (Mon, 19 Nov 2012) | 17 lines
  
  Fix most leftover non-opaque ast_str uses.
  
  Instead of calling str->str, one should use ast_str_buffer(str). Same
  goes for str->used as ast_str_strlen(str) and str->len as
  ast_str_size(str).
  
  Review: https://reviewboard.asterisk.org/r/2198
  ........
  
  Merged revisions 376469 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 376470 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........
  
  Merged revisions 376471 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376479 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-19 20:20:36 +00:00
Automerge script 096540c2c0 Merged revisions 376219 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

........
  r376219 | jrose | 2012-11-13 13:42:13 -0600 (Tue, 13 Nov 2012) | 12 lines
  
  chan_sip: Add SubscribeContext field to SIPshowpeer AMI response
  
  The new field is will show up within the response if the requested peer has a
  subscribe context set.
  
  (closes issue ASTERISK-20626)
  Reported by: Jaco Kroon
  Patches:
      asterisk-sip-ami-SubscrContext.patch uploaded by jkroon (license 5671)
          -with modifications by jrose to conform to style guidelines
  Review: https://reviewboard.asterisk.org/r/2195/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376224 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-13 20:19:49 +00:00
Automerge script 0874e3c825 Merged revisions 376131 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r376131 | file | 2012-11-11 11:15:47 -0600 (Sun, 11 Nov 2012) | 16 lines
  
  Remove a fixed size limitation for producing SDP and change how ICE support is disabled by default.
  
  With ICE support enabled in chan_sip and a large number of interfaces on the system it was
  possible for the produced SDP to be truncated due to some fixed size buffers. These buffers
  have now been changed so they will dynamically grow as needed.
  
  ICE support is now also enabled by default in res_rtp_asterisk to provide a smoother experience
  for chan_motif users where it is required. To maintain the previous behavior in chan_sip it is
  no longer enabled by default there.
  
  (closes issue ASTERISK-20643)
  Reported by: coopvr
  ........
  
  Merged revisions 376130 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376136 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-11 17:20:20 +00:00
Automerge script bf369f2018 Merged revisions 376061 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk

................
  r376061 | rmudgett | 2012-11-08 15:12:35 -0600 (Thu, 08 Nov 2012) | 22 lines
  
  chan_dahdi/SS7: Made reject incoming call for an in-alarm or blocked channel.
  
  If a SS7 call comes in requesting a CIC that is in-alarm, the call is
  accepted and connects if the extension exists in the dialplan.  The call
  does not have any audio.
  
  * Made release the call immediately with circuit congestion cause.
  
  (closes issue ASTERISK-20204)
  Reported by: Tuan Le
  Patches:
        jira_asterisk_20204_v1.8.patch (license #5621) patch uploaded by rmudgett
  ........
  
  Merged revisions 376058 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 376059 from http://svn.asterisk.org/svn/asterisk/branches/10
  ........
  
  Merged revisions 376060 from http://svn.asterisk.org/svn/asterisk/branches/11
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@376069 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-08 21:19:33 +00:00
Mark Michelson f2bb9afe17 Multiple revisions 375993-375994
........
  r375993 | mmichelson | 2012-11-07 11:01:13 -0600 (Wed, 07 Nov 2012) | 30 lines
  
  Fix misuses of timeouts throughout the code.
  
  Prior to this change, a common method for determining if a timeout
  was reached was to call a function such as ast_waitfor_n() and inspect
  the out parameter that told how many milliseconds were left, then use
  that as the input to ast_waitfor_n() on the next go-around.
  
  The problem with this is that in some cases, submillisecond timeouts
  can occur, resulting in the out parameter not decreasing any. When this
  happens thousands of times, the result is that the timeout takes much
  longer than intended to be reached. As an example, I had a situation where
  a 3 second timeout took multiple days to finally end since most wakeups
  from ast_waitfor_n() were under a millisecond.
  
  This patch seeks to fix this pattern throughout the code. Now we log the
  time when an operation began and find the difference in wall clock time
  between now and when the event started. This means that sub-millisecond timeouts
  now cannot play havoc when trying to determine if something has timed out.
  
  Part of this fix also includes changing the function ast_waitfor() so that it
  is possible for it to return less than zero when a negative timeout is given
  to it. This makes it actually possible to detect errors in ast_waitfor() when
  there is no timeout.
  
  (closes issue ASTERISK-20414)
  reported by David M. Lee
  
  Review: https://reviewboard.asterisk.org/r/2135/
........
  r375994 | mmichelson | 2012-11-07 11:08:44 -0600 (Wed, 07 Nov 2012) | 3 lines
  
  Remove some debugging that accidentally made it in the last commit.
........

Merged revisions 375993-375994 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 375995 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 376014 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376015 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-07 19:15:26 +00:00
Joshua Colp 82dc21e0e1 Fix a bug where our Motif ICE candidates were not quite proper, and make us more forgiving.
An issue was reported on the mailing list where calling would result in an "Incomplete
ICE-UDP candidate received on session" error message. This is the result of the ICE-UDP
candidate code not placing a "network" attribute within the candidates. This is now done.
To increase compatibility though I have removed the requirement for the "network" attribute
to exist within ICE-UDP candidates that are received since we don't actually require the
value.

Reported on the mailing list by Jean-Denis Girard.
........

Merged revisions 375925 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375926 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-06 12:15:31 +00:00
Matthew Jordan a0c363e227 Refactor ast_timer_ack to return an error and handle the error in timer users
Currently, if an acknowledgement of a timer fails Asterisk will not realize
that a serious error occurred and will continue attempting to use the timer's
file descriptor.  This can lead to situations where errors stream to the
CLI/log file.  This consumes significant resources, masks the actual problem
that occurred (whatever caused the timer to fail in the first place), and
can leave channels in odd states.

This patch propagates the errors in the timing resource modules up through
the timer core, and makes users of these timers handle acknowledgement
failures.  It also adds some defensive coding around the use of timers
to prevent using bad file descriptors in off nominal code paths.

Note that the patch created by the issue reporter was modified slightly for
this commit and backported to 1.8, as it was originally written for
Asterisk 10.

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

(issue ASTERISK-20032)
Reported by: Jeremiah Gowdy
patches:
  jgowdy-timerfd-6-22-2012.diff uploaded by Jeremiah Gowdy (license 6358)
........

Merged revisions 375893 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 375894 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 375895 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375896 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-05 23:10:14 +00:00
Damien Wedhorn 732767f230 Fix for chan_skinny leaving RTP ports open
Skinny wasn't closing RTP sockets. This patch includes ast_rtp_instance_stop before 
ast_rtp_instance_destroy which fixes the problem. Also add destroy for VRTP (which 
I believe is unused, but exists).

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

Merged revisions 375660 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375663 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-02 21:03:56 +00:00
Richard Mudgett f85db0e34d Things don't need to be that const.
........

Merged revisions 375658 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 375659 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 375661 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375662 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-02 21:01:33 +00:00
Richard Mudgett e950086daf Multiple revisions 375519-375524
........
  r375519 | rmudgett | 2012-10-30 16:06:15 -0500 (Tue, 30 Oct 2012) | 11 lines

  chan_misdn: Timer primitives must be handled first.

  The frm->addr is a different "address space" than the stack/instance
  address of other Lx primitives.  The test for B channel instance address
  could fail.

  Patches:
	patch01_timers.diff (license #6372) patch uploaded by Guenther Kelleter

  JIRA ABE-2888

  ........
  r375520 | rmudgett | 2012-10-30 16:14:58 -0500 (Tue, 30 Oct 2012) | 10 lines

  chan_misdn: Free memory in error paths and other memory leaks.

  The one line commented with BUG is not easily fixable because there is no
  de-init function one can call.

  Patches:
	patch02_memory.diff (license #6372) patch uploaded by Guenther Kelleter

  JIRA ABE-2888

  ........
  r375521 | rmudgett | 2012-10-30 16:38:41 -0500 (Tue, 30 Oct 2012) | 14 lines

  chan_misdn: ISDN NT L2 de-establish/establish

  * An NT-PTMP cannot de/establish L2 since it doesn't know the TEIs.
  * On NT-PTP L2 is started when L1 is finally active in handle_l1.
  * L2 deactivation logging cleanup.
  * L2 aggregate link status is unknown for NT-PTMP, show as "UNKN".
  * Removed unused functions and code for L2 handling.

  Patches:
	patch03_L2estab.diff (license #6372) patch uploaded by Guenther Kelleter
	Modified

  JIRA ABE-2888

  ........
  r375522 | rmudgett | 2012-10-30 16:56:14 -0500 (Tue, 30 Oct 2012) | 22 lines

  chan_misdn: Fix broken upper_id/lower_id usage.

  Sending PH prim via lower_id layer (3 or 1) simply does not work.  For TE
  (3) it returns an error (len=-6) which is not evaluated by handle_l1(), so
  the L1 layer status ends up wrong.  Instead PH must be sent via L4, only
  then does it reach L1 without an error message.

  And NT PH prims only reach L1 when they are sent to layer 2 id.
  --> use upper_id to send PH primitives.

  * Check for errors in PH_(DE)ACTIVATE | CONFIRM.
  * Debug messages are improved.

  * The lower_id is now not used for anything, except: Why is lower_id layer
  deleted when it wasn't created?  I removed this code since it looks very
  wrong.

  Patches:
	patch04_l1activation.diff (license #6372) patch uploaded by Guenther Kelleter

  JIRA ABE-2888

  ........
  r375523 | rmudgett | 2012-10-30 17:29:15 -0500 (Tue, 30 Oct 2012) | 31 lines

  chan_misdn: Fix loss of B channels if L1 is down.

  If you make 2 calls out an NT PTMP port which is not connected to any
  phone, the B channel associated with that call becomes unusable until
  Asterisk is restarted.

  The problem is the EVENT_SETUP is queued when L1 is not up in
  misdn_lib_send_event().  If L1 cannot be activated the event won't be
  dequeued.  It gets even worse when the call is hung up.  The queued
  EVENT_SETUP will be overwritten by an EVENT_DISCONNECT.  The reserved B
  channel then will never be freed.  If later someone connects a phone to
  the port, L1 will eventually activate and the queued EVENT_DISCONNECT is
  sent down the stack.  However, it is ignored because it is the wrong call
  state.

  The real fix would be that activation and queueing for a new SETUP is done
  by the NT stack.  But since it doesn't, the workaround must be removed
  because it doesn't always work.

  Fix: The event is no longer queued but immediately sent to the stack.  If
  L1 cannot be activated, the L3 state machine that was started by the
  EVENT_SETUP will do its work, i.e.  a timeout will release the B channel
  properly.  The SETUP possibly cannot be sent the first time but is resent
  by T303 in case L1 could be activated.

  Patches:
	patch05_bchan-loss.diff (license #6372) patch uploaded by Guenther Kelleter
	Modified

  JIRA ABE-2888

........
  r375524 | rmudgett | 2012-10-30 18:26:05 -0500 (Tue, 30 Oct 2012) | 13 lines

  chan_misdn: Remove some calls to exit().

  Try proper cleanup when something goes wrong in misdn_lib_init().
  Especially do not call exit()!

  * Fix memory leak because stack_destroy() does not free the stack struct.

  Patches:
	patch06_cleanup-init.diff (license #6372) patch uploaded by Guenther Kelleter
	Modified

  JIRA ABE-2888
........

Merged revisions 375519-375524 from https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier
........

Merged revisions 375625 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 375626 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 375627 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375628 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-02 18:46:58 +00:00
Michael L. Young 01526b2c3c Fix Wrong Result In Debug Message For SDP Origin Processing
While looking at some debug logs, I noticed that it was being reported that the
SDP origin line was unsupported or failed.  Upon looking into this on my local
machine, I found that I too was getting this debug message yet everything seemed
to be getting processed properly.  What was discovered is, that, the variable to
determine what is displayed in the debug message for the SDP line that was
processed, was not being set for the origin line when the result was successful.

This patch fixes this and was tested on local machine.
........

Merged revisions 375594 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 375601 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 375613 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375614 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-02 17:27:24 +00:00
Jonathan Rose d4a357b82f chan_sip: Fix a bug causing SIP reloads to remove all entries from the registry
A regression was introduced in chan_sip by changes to sip reload introduced by
r349097. That patch moved peer purging from the beginning of the reload to
after the general configuration was finished. This patch fixes that by undoing
the repositioning of the original peer purging code and using a similar
function after performing general configuration that purges only autocreated
peers that were created when persist mode isn't enabled.

(closes issue ASTERISK-20611)
Reported by: Alisher
Review: https://reviewboard.asterisk.org/r/2171/
........

Merged revisions 375575 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375576 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-01 15:03:04 +00:00
Mark Michelson 5f3f32c494 Prevent resetting of NATted realtime peer address on reload.
If a "sip reload" is issued for a SIP peer, then his
IP address will be cleared, thus resulting in forgetting the
public IP address. Asterisk will then attempt to route SIP
traffic to the private IP address.

The fix here is to make "sip reload" ignore realtime peers
when "host = dynamic" is spotted. Realtime peers can now only
have their IP address reset if they have gone from being not
dynamic to being dynamic.

(closes issue ASTERISK-18203)
reported by daren ferreira

(closes issue ASTERISK-20572)
reported by JoshE
Patches:
	fix_nat_realtime.diff uploaded by JoshE (license #6075)
........

Merged revisions 375415 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 375417 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 375437 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375443 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-29 21:38:40 +00:00
Mark Michelson da85f8489f Make evaluation of channel variables consistently case-sensitive.
Due to inconsistencies in how variable names were evaluated, the
decision was made to make all evaluations case-sensitive. See the
UPGRADE.txt file or https://wiki.asterisk.org/wiki/display/AST/Case+Sensitivity
for more details.

(closes issue ASTERISK-20163)
reported by Matt Jordan

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375442 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-29 21:27:09 +00:00