]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
11 years agosecurity: Inhibit execution of privilege escalating functions 10-digiumphones
David M. Lee [Mon, 16 Dec 2013 17:07:35 +0000 (17:07 +0000)] 
security: Inhibit execution of privilege escalating functions

This patch allows individual dialplan functions to be marked as
'dangerous', to inhibit their execution from external sources.

A 'dangerous' function is one which results in a privilege escalation.
For example, if one were to read the channel variable SHELL(rm -rf /)
Bad Things(TM) could happen; even if the external source has only read
permissions.

Execution from external sources may be enabled by setting
'live_dangerously' to 'yes' in the [options] section of asterisk.conf.
Although doing so is not recommended.

(closes issue ASTERISK-22905)
Review: http://reviewboard.digium.internal/r/432/
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@403916 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoapp_sms: BufferOverflow when receiving odd length 16 bit message
Scott Griepentrog [Mon, 16 Dec 2013 15:39:30 +0000 (15:39 +0000)] 
app_sms: BufferOverflow when receiving odd length 16 bit message

This patch prevents an infinite loop overwriting memory when
a message is received into the unpacksms16() function, where
the length of the message is an odd number of bytes.

(closes issue ASTERISK-22590)
Reported by: Jan Juergens
Tested by: Jan Juergens

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@403861 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoautomerge cancel
Automerge script [Fri, 30 Aug 2013 16:21:25 +0000 (16:21 +0000)] 
automerge cancel

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@398015 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoAST-2013-005: Fix crash caused by invalid SDP
Matthew Jordan [Tue, 27 Aug 2013 18:15:44 +0000 (18:15 +0000)] 
AST-2013-005: Fix crash caused by invalid SDP

If the SIP channel driver processes an invalid SDP that defines media
descriptions before connection information, it may attempt to reference
the socket address information even though that information has not yet
been set. This will cause a crash.

This patch adds checks when handling the various media descriptions that
ensures the media descriptions are handled only if we have connection
information suitable for that media.

Thanks to Walter Doekes, OSSO B.V., for reporting, testing, and providing
the solution to this problem.

(closes issue ASTERISK-22007)
Reported by: wdoekes
Tested by: wdoekes
patches:
  issueA22007_sdp_without_c_death.patch uploaded by wdoekes (License 5674)
........

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@397763 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoAST-2013-004: Fix crash when handling ACK on dialog that has no channel
Automerge script [Tue, 27 Aug 2013 16:27:31 +0000 (16:27 +0000)] 
AST-2013-004: Fix crash when handling ACK on dialog that has no channel

A remote exploitable crash vulnerability exists in the SIP channel driver if an
ACK with SDP is received after the channel has been terminated. The handling
code incorrectly assumed that the channel would always be present.

This patch adds a check such that the SDP will only be parsed and applied if
Asterisk has a channel present that is associated with the dialog.

Note that the patch being applied was modified only slightly from the patch
provided by Walter Doekes of OSSO B.V.

(closes issue ASTERISK-21064)
Reported by: Colin Cuthbertson
Tested by: wdoekes, Colin Cutherbertson
patches:
  issueA21064_fix.patch uploaded by wdoekes (License 5674)
........

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

Merged revisions 397711 from file:///srv/subversion/repos/asterisk/branches/10

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@397743 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFix compilation error introduced in r388815
Matthew Jordan [Tue, 27 Aug 2013 14:58:31 +0000 (14:58 +0000)] 
Fix compilation error introduced in r388815

r388815 didn't not cleanly apply the intended patch. As a result, app_voicemail
had a small issue in that it didn't compile. Whoops.

This patch pulls in the correct variable declarations such that gcc can figure
out what 'urgent_index' is all about.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@397704 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoreject call attempts when gatekeeper is configured but not registered
Automerge script [Fri, 31 May 2013 09:21:12 +0000 (09:21 +0000)] 
reject call attempts when gatekeeper is configured but not registered

(closes issue ASTERISK-21800)
Reported by: Dmitry Melekhov
Patches:
        ASTERISK-21800-1.patch
Tested by: Dmitry Melekhov
........

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

Merged revisions 390223 from file:///srv/subversion/repos/asterisk/branches/10

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@390227 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix VM snapshot handling for combined INBOX.
Jason Parker [Wed, 15 May 2013 14:25:08 +0000 (14:25 +0000)] 
Fix VM snapshot handling for combined INBOX.

The snapshot API contains an option that allow for combining of new
and old messages within a single snapshot. New messages, however,
include options beyond just 'INBOX' - it also includes the Urgent
folder. A previous patch that combined INBOX and Urgent accidentally
impacted snapshots that attempted to gain messages from just the Old
folder. This patch fixes the snapshot gathering such that the API
returns the appropriate messages for the folder selected, with and
without the combine option.

This should make it more clear about what's happening.

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@388815 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMultiple revisions 383977,383982
Automerge script [Wed, 27 Mar 2013 15:29:09 +0000 (15:29 +0000)] 
Multiple revisions 383977,383982

........
  r383977 | mjordan | 2013-03-27 09:36:22 -0500 (Wed, 27 Mar 2013) | 21 lines

  AST-2013-002: Prevent denial of service in HTTP server

  AST-2012-014, fixed in January of this year, contained a fix for Asterisk's
  HTTP server for a remotely-triggered crash. While the fix put in place fixed
  the possibility for the crash to be triggered, a denial of service vector still
  exists with that solution if an attacker sends one or more HTTP POST requests
  with very large Content-Length values. This patch resolves this by capping
  the Content-Length at 1024 bytes. Any attempt to send an HTTP POST with
  Content-Length greater than this cap will not result in any memory allocation.
  The POST will be responded to with an HTTP 413 "Request Entity Too Large"
  response.

  This issue was reported by Christoph Hebeisen of TELUS Security Labs

  (closes issue ASTERISK-20967)
  Reported by: Christoph Hebeisen
  patches:
    AST-2013-002-1.8.diff uploaded by mmichelson (License 5049)
    AST-2013-002-10.diff uploaded by mmichelson (License 5049)
    AST-2013-002-11.diff uploaded by mmichelson (License 5049)
........
  r383982 | mjordan | 2013-03-27 09:55:16 -0500 (Wed, 27 Mar 2013) | 32 lines

  AST-2013-003: Prevent username disclosure in SIP channel driver

  When authenticating a SIP request with alwaysauthreject enabled, allowguest
  disabled, and autocreatepeer disabled, Asterisk discloses whether a user
  exists for INVITE, SUBSCRIBE, and REGISTER transactions in multiple ways. The
  information is disclosed when:
   * A "407 Proxy Authentication Required" response is sent instead of a
     "401 Unauthorized" response
   * The presence or absence of additional tags occurs at the end of "403
     Forbidden" (such as "(Bad Auth)")
   * A "401 Unauthorized" response is sent instead of "403 Forbidden" response
     after a retransmission
   * Retransmission are sent when a matching peer did not exist, but not when a
     matching peer did exist.

  This patch resolves these various vectors by ensuring that the responses sent
  in all scenarios is the same, regardless of the presence of a matching peer.

  This issue was reported by Walter Doekes, OSSO B.V. A substantial portion of
  the testing and the solution to this problem was done by Walter as well - a
  huge thanks to his tireless efforts in finding all the ways in which this
  setting didn't work, providing automated tests, and working with Kinsey on
  getting this fixed.

  (closes issue ASTERISK-21013)
  Reported by: wdoekes
  Tested by: wdoekes, kmoore
  patches:
    AST-2013-003-1.8 uploaded by kmoore, wdoekes (License 6273, 5674)
    AST-2013-003-10 uploaded by kmoore, wdoekes (License 6273, 5674)
    AST-2013-003-11 uploaded by kmoore, wdoekes (License 6273, 5674)
........

Merged revisions 383977,383982 from file:///srv/subversion/repos/asterisk/branches/10

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@384025 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 379777 via svnmerge from
Automerge script [Mon, 21 Jan 2013 20:27:46 +0000 (20:27 +0000)] 
Merged revisions 379777 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r379777 | mjordan | 2013-01-21 14:24:24 -0600 (Mon, 21 Jan 2013) | 34 lines

  Update init.d scripts to handle stderr; readd splash screen for remote consoles

  When r376428 was commited to re-order start up sequences to be more tolerant of
  forking with thread primitives, a few items were changed that caused changes
  in behavior on some distros. This includes:
   * Not displaying the splash screen on a remote console.
   * Displaying an error message on stderr when a remote console cannot connect
     to a running instance of Asterisk.

  In the first case, the splash screen was re-added (thanks to Michael L. Young).
  In the second case, the various init.d scripts were modified to pipe stderr
  to /dev/null, as the error message is useful - if you execute a remote
  console or a remote console command execution and it fail, it should tell
  you. Note that the error message was always present, it just failed to be
  printed prior to r376428.

  Much thanks to the folks who quickly reported this problem, provided solutions,
  and promptly tested the various init.d scripts on a variety of distros.

  *** NOTE ***
  If you're wondering why this got merged into 10, it's because we're going to
  release a regression release with this in it. Might as well get it into the
  branch so the tag reflects some version of reality.

  (closes issue ASTERISK-20945)
  Reported by: Warren Selby
  Tested by: Michael L. Young, Jamuel Starkey, kaldemar, Danny Nicholas, mjordan
  patches:
    asterisk-20945-remote-intro-msg.diff uploaded by elguero (license 5026)
    ASTERISK-20945-1.8-mjordan.diff uploaded by mjordan (license 6283)
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@379788 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 379510 via svnmerge from
Automerge script [Sat, 19 Jan 2013 00:24:45 +0000 (00:24 +0000)] 
Merged revisions 379510 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r379510 | mjordan | 2013-01-18 18:07:52 -0600 (Fri, 18 Jan 2013) | 21 lines

  Fix astcanary startup problem due to wrong pid value from before daemon call

  When Asterisk forks itself into the background via a call to daemon, it must
  re-set the pid value of the new process. Otherwise, astcanary gets the pid
  value of the process before the fork, which prevents it from running. Asterisk
  eventually starts lowering its priority, as it can no longer communicate
  with the proverbial canary in the coal mine.

  This patch ensures that the correct process identifier is used by astcanary.

  Note that this is getting committed to 10 as a regression fix.

  (closes issue ASTERISK-20947)
  Reported by: Jakob Hirsch
  Tested by: mjordan
  patches:
    asterisk-10.12.0.astcanary_ppid.diff uploaded by Jakob Hirsch (license 6113)
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@379535 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix compile error, due to different var names on merge.
Jason Parker [Thu, 10 Jan 2013 22:10:30 +0000 (22:10 +0000)] 
Fix compile error, due to different var names on merge.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@378912 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 378689 via svnmerge from
Automerge script [Wed, 9 Jan 2013 00:23:42 +0000 (00:23 +0000)] 
Merged revisions 378689 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

........
  r378689 | rmudgett | 2013-01-08 17:55:57 -0600 (Tue, 08 Jan 2013) | 4 lines

  app_queue: Fix incorrect assertion.

  (issue ASTERISK-16115)
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@378705 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 378683 via svnmerge from
Automerge script [Tue, 8 Jan 2013 23:19:07 +0000 (23:19 +0000)] 
Merged revisions 378683 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r378683 | rmudgett | 2013-01-08 16:55:43 -0600 (Tue, 08 Jan 2013) | 29 lines

  app_queue: Fix multiple calls to a queue member that is in only one queue.

  When ringinuse=no queue members can receive more than one call if these
  calls happen at nearly the same time.

  * Fix so a queue member does not receive more than one call from a queue.

  NOTE: This fix does not prevent multiple calls to a member if the member
  is in more than one queue.

  * Did some refactoring to eliminate some code redundancy.

  (issue ASTERISK-16115)
  Reported by: nik600
  Patches:
        jira_asterisk_16115_single_q_v1.8.patch (license #5621) patch uploaded by rmudgett
        Modified

  * Revert the -r341580 and -r341599 changes adding the queues.conf
  check_state_unknown option as it was added in an attempt to fix this
  problem.  The fix did not need to be optional.  The fix should not have
  tried to explicitly set the device state.  Setting the device state by
  something other than the device introduces a race condition.  I also could
  not see how the change would be effective other than delaying the
  app_queue code long enough for the device state to propagate to app_queue.
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@378686 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoRe-enable automerge.
Jason Parker [Tue, 8 Jan 2013 19:13:16 +0000 (19:13 +0000)] 
Re-enable automerge.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@378662 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMultiple revisions 377838,377842,377848,377882,377923,377947,377992,378037,378089...
Jason Parker [Tue, 8 Jan 2013 19:12:38 +0000 (19:12 +0000)] 
Multiple revisions 377838,377842,377848,377882,377923,377947,377992,378037,378089,378093,378120,378218,378286,378320

........
  r377838 | rmudgett | 2012-12-11 14:42:59 -0600 (Tue, 11 Dec 2012) | 16 lines

  Cleanup taskprocessor on exit.

  * Cleanup CLI commands on exit.

  * v10 only: Merged v1.8 -r374177 change to taskprocessor.c missed in v10 -r374178.

  (issue ASTERISK-20649)
  Reported by: Corey Farrell
  Patches:
        taskprocessor-cleanup-1_8-11-trunk.patch (license #5909) patch uploaded by Corey Farrell
        taskprocessor-cleanup-10-only.patch (license #5909) patch uploaded by Corey Farrell
        Modified
  ........

  Merged revisions 377837 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r377842 | mmichelson | 2012-12-11 14:48:16 -0600 (Tue, 11 Dec 2012) | 13 lines

  Fix crash that can occur if CLI registration fails for an aliased command.

  A recent memory leak fix in main/cli.c causes an ast_cli_entry's command
  field to be freed and NULLed if ast_cli_register() fails. res_clialiases
  was ignoring the return value of ast_cli_register() and was then passing
  the NULL command off to a a hash function. This resulted in a crash.

  The fix is not to ignore the erroneous return value. If ast_cli_register()
  fails, then we do not continue trying to process the current alias.
  ........

  Merged revisions 377840 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r377848 | rmudgett | 2012-12-11 15:07:47 -0600 (Tue, 11 Dec 2012) | 14 lines

  Cleanup udptl on exit.

  * Cleanup CLI commands on exit.

  (issue ASTERISK-20649)
  Reported by: Corey Farrell
  Patches:
        udptl-shutdown-1_8-10.patch (license #5909) patch uploaded by Corey Farrell
        udptl-shutdown-11-trunk.patch (license #5909) patch uploaded by Corey Farrell
        Modified
  ........

  Merged revisions 377847 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r377882 | rmudgett | 2012-12-11 15:57:44 -0600 (Tue, 11 Dec 2012) | 10 lines

  Cleanup CLI commands on exit for several files.

  (issue ASTERISK-20649)
  Reported by: Corey Farrell
  Patches:
        unregister-cli-multiple-all.patch (license #5909) patch uploaded by Corey Farrell
  ........

  Merged revisions 377881 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r377923 | newtonr | 2012-12-12 16:41:24 -0600 (Wed, 12 Dec 2012) | 12 lines

  Incremented EXTRA_SOUNDS_VERSION in sounds/Makefile to 1.4.12 for new Extra Sounds releases

  See CHANGES-* files in English extra 1.4.12 tarballs for new sound prompts added.

  (closes ASTERISK-20328)
  Reported by: Matt Jordan
  (closes AST-755)
  Reported by: John Bigelow
  ........

  Merged revisions 377922 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r377947 | kmoore | 2012-12-13 07:48:32 -0600 (Thu, 13 Dec 2012) | 17 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
........
  r377992 | rmudgett | 2012-12-13 14:52:26 -0600 (Thu, 13 Dec 2012) | 29 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/
........
  r378037 | rmudgett | 2012-12-14 15:30:46 -0600 (Fri, 14 Dec 2012) | 20 lines

  app_queue: Revert bad ringinuse=no patch.

  With the option ringinuse=no set, the patch committed for ASTERISK-16115
  causes non-SIP queue members to never be called because the device state
  is checked after a channel is created to determine if the member is busy.
  These queue members always get the "Member %s is busy, cannot dial"
  message.

  Most channel drivers other than chan_sip use the default device state
  handling.  The default device-state state is considered in use or unknown
  if the channel exists or not respectively.

  (closes issue ASTERISK-20801)
  Reported by: rmudgett
  Patches:
        jira_asterisk_16115_revert_r370418_v1.8.patch (license #5621) patch uploaded by rmudgett
  ........

  Merged revisions 378036 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r378089 | rmudgett | 2012-12-17 16:57:10 -0600 (Mon, 17 Dec 2012) | 16 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
........
  r378093 | rmudgett | 2012-12-17 17:08:40 -0600 (Mon, 17 Dec 2012) | 5 lines

  Fix potential double free when unloading a module.
  ........

  Merged revisions 378092 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r378120 | kmoore | 2012-12-18 11:38:22 -0600 (Tue, 18 Dec 2012) | 11 lines

  Add test events for time limit-related hangups

  This patch adds hangup-related test events in order to support testing
  of time-limited bridges. This aids in testing the S() and L() bridge
  options.

  (issue SWP-4713)
  ........

  Merged revisions 378119 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r378218 | kmoore | 2012-12-31 08:43:26 -0600 (Mon, 31 Dec 2012) | 12 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
........
  r378286 | mjordan | 2013-01-02 09:23:57 -0600 (Wed, 02 Jan 2013) | 30 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
........
  r378320 | mjordan | 2013-01-02 11:40:28 -0600 (Wed, 02 Jan 2013) | 27 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 377838,377842,377848,377882,377923,377947,377992,378037,378089,378093,378120,378218,378286,378320 from http://svn.asterisk.org/svn/asterisk/branches/10

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@378661 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoCleanup pbx on exit.
Jason Parker [Tue, 8 Jan 2013 19:11:56 +0000 (19:11 +0000)] 
Cleanup pbx on exit.

* Cleanup CLI commands on exit.

* Unreference hints and statecbs containers on exit.

(issue ASTERISK-20649)
Reported by: Corey Farrell
Patches:
      pbx-cleanup-1_8.patch (license #5909) patch uploaded by Corey Farrell
      pbx-cleanup-10.patch (license #5909) patch uploaded by Corey Farrell
      pbx-cleanup-11-trunk.patch (license #5909) patch uploaded by Corey Farrell
      Modified
........

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@378660 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMultiple revisions 377136,377166,377212,377227,377241,377258,377261,377354,377382...
Jason Parker [Tue, 8 Jan 2013 19:09:11 +0000 (19:09 +0000)] 
Multiple revisions 377136,377166,377212,377227,377241,377258,377261,377354,377382,377399,377432,377504,377510,377558,377592,377624,377656,377705,377709,377741,377772

........
  r377136 | rmudgett | 2012-12-03 14:33:08 -0600 (Mon, 03 Dec 2012) | 17 lines

  Cleanup core main on exit.

  * Cleanup time zones on exit.

  * Make exit clean/unclean report consistent for AMI and CLI in
  really_quit().

  (issue ASTERISK-20649)
  Reported by: Corey Farrell
  Patches:
        core-cleanup-1_8-10.patch (license #5909) patch uploaded by Corey Farrell
        core-cleanup-11-trunk.patch (license #5909) patch uploaded by Corey Farrell
        Modified
  ........

  Merged revisions 377135 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r377166 | rmudgett | 2012-12-03 16:53:58 -0600 (Mon, 03 Dec 2012) | 15 lines

  Cleanup ast_run_atexits() atexits list.

  * Convert atexits list to a mutex instead of a rd/wr lock.  The lock is
  only write locked.

  * Move CLI verbose Asterisk ending message to where AMI message is output
  in really_quit() to avoid further surprises about using stuff already
  shutdown.

  (issue ASTERISK-20649)
  Reported by: Corey Farrell
  ........

  Merged revisions 377165 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r377212 | rmudgett | 2012-12-04 16:31:02 -0600 (Tue, 04 Dec 2012) | 1 line

  confbridge: Update online XML documentation.
........
  r377227 | rmudgett | 2012-12-04 18:49:53 -0600 (Tue, 04 Dec 2012) | 29 lines

  confbridge: Fix several small issues.

  * Made func_confbridge_helper() allow an empty value when setting options.
  You previously could not Set(CONFBRIDGE(user,pin)=) and clear the
  configured pin from the dialplan.

  * Made func_confbridge_helper() handle its datastore better if multiple
  threads attempt to set the first CONFBRIDGE option value on the channel.

  * Made the func_confbridge_helper() only output one diagnostic message
  concerning the option.

  * Made the bridge video_mode able to repeatedly change in the config file
  and CONFBRIDGE dialplan function.  The video_mode option values are an
  enum and not independent of each other.

  * Made handle_cli_confbridge_show_bridge_profile() better handle the
  video_mode option.

  * Simplified datastore handling code in conf_find_user_profile() and
  conf_find_bridge_profile().

  * Made parse_bridge(), parse_user(), and parse_menu() use var->file
  instead of CONFBRIDGE_CONFIG because the var could have been from an
  include file.

  (closes issue ASTERISK-20655)
  Reported by: Birger "WIMPy" Harzenetter
........
  r377241 | rmudgett | 2012-12-04 20:09:13 -0600 (Tue, 04 Dec 2012) | 4 lines

  * Fix registering core show codecs/codec CLI commands twice.

  * Fix registering atexit format_attr_shutdown() more than once.
........
  r377258 | file | 2012-12-05 10:49:33 -0600 (Wed, 05 Dec 2012) | 19 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
........
  r377261 | jrose | 2012-12-05 10:57:26 -0600 (Wed, 05 Dec 2012) | 15 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
........
  r377354 | rmudgett | 2012-12-06 17:56:45 -0600 (Thu, 06 Dec 2012) | 24 lines

  confbridge: Fix some resource leaks on conference teardown.

  * Made destroy_conference_bridge() destroy a missed ast_mutex_t and ast_cond_t.

  * Made join_conference_bridge() init the ast_mutex_t's and ast_cond_t so
  destroy_conference_bridge() can destroy them unconditionally.

  * Made join_conference_bridge() abort if the new conference could not be
  added to the conferences container.

  * Made leave_conference() discard any post-join actions if
  join_conference_bridge() had to abort early.

  * Made the join_conference_bridge() diagnostic messages better describe
  what happened.

  * Renamed leave_conference_bridge() to leave_conference() and made it only
  take a conference user pointer.  The conference pointer was redundant.

  * Made conf_bridge_profile_copy() use struct copy instead of memcpy().

  * No need to lock the conference in start_conf_record_thread() since all
  of the callers already have it locked.
........
  r377382 | kmoore | 2012-12-07 15:58:21 -0600 (Fri, 07 Dec 2012) | 17 lines

  codec_dahdi: Fix output of "transcoder show" CLI command.

  In r306010 "Asterisk media architecture conversion - no more format
  bitfields", the logic for incrementing encoders and decoders when
  opening transcoder channels was changed without making the corresponding
  change when decrementing encoder / decoder channels.  The result being
  that when a channel was destroyed, codec_dahdi couldn't properly tell if
  it was an encoder or decoder, and the default case is to assume it was a
  decoder.

  This could result in negative numbers for decoders in use like in:
    VOIP6*CLI> transcoder show
    2/-2 encoders/decoders of 92 channels are in use.

  (closes issue ASTERISK-19921)
Patch-by: Shaun Ruffell
........
  r377399 | rmudgett | 2012-12-07 17:42:03 -0600 (Fri, 07 Dec 2012) | 5 lines

  MALLOC_DEBUG: Only wait if we want atexit allocation dumps.
  ........

  Merged revisions 377398 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r377432 | rmudgett | 2012-12-07 18:29:23 -0600 (Fri, 07 Dec 2012) | 14 lines

  Fix order of SIP allow/disallow in MySQL contrib script.

  Using the contrib sippeers.sql script to create the sippeers MySQL table
  would result in being unable to place calls if you set the disallow value
  to all.

  (closes issue ASTERISK-20756)
  Reported by: Andre Luis
  Patches:
        sippeers.patch patch uploaded by Andre Luis
  ........

  Merged revisions 377431 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r377504 | tilghman | 2012-12-09 19:24:41 -0600 (Sun, 09 Dec 2012) | 5 lines

  Remove some dead code and additionally handle a case that wasn't handled.
  ........

  Merged revisions 377487 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r377510 | tilghman | 2012-12-09 19:39:58 -0600 (Sun, 09 Dec 2012) | 16 lines

  Improve documentation by making all of the colors used readable,
  no matter what the background color is.

  Dark blue on a black background is unreadable, as is yellow on a
  light background.  This patch turns on the bright attribute for
  colors when on a dark background and turns *off* the bright
  attribute when the -W command line option is used (indicating a
  _light_ background).  This ensures that text is readable in both
  cases.

  Patch by: tilghman
  Review: https://reviewboard.asterisk.org/r/2224
  ........

  Merged revisions 377509 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r377558 | igorg | 2012-12-09 23:04:36 -0600 (Sun, 09 Dec 2012) | 8 lines

  Fix crash on transfer initiated from insreeen menu on Unistim phones. Removed CDR-related code that moved to do_masquarade before.

  (closes issue ASTERISK-20417)
  Reported by: Rudolf Migalin
  ........

  Merged revisions 377557 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r377592 | igorg | 2012-12-10 00:41:47 -0600 (Mon, 10 Dec 2012) | 9 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
........
  r377624 | kmoore | 2012-12-10 08:40:26 -0600 (Mon, 10 Dec 2012) | 14 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
........
  r377656 | kmoore | 2012-12-10 10:53:16 -0600 (Mon, 10 Dec 2012) | 14 lines

  Ensure ReceiveFax provides a CED tone via T.38

  When using res_fax_digium, the T.38 CED tone was not being provided
  properly which would cause some incoming faxes to fail. This was not an
  issue with res_fax_spandsp since it does not strictly honor the
  send_ced flag and sends the CED tone whenever receiving a T.38 fax.

  (closes issue FAX-343)
Reported-by: Benjamin Tietz
Patch-by: Kinsey Moore
  ........

  Merged revisions 377655 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r377705 | rmudgett | 2012-12-10 18:32:40 -0600 (Mon, 10 Dec 2012) | 14 lines

  Cleanup dnsmgr on exit.

  * Cleanup dnsmgr thread and CLI commands on exit.

  (issue ASTERISK-20649)
  Reported by: Corey Farrell
  Patches:
        dnsmgr-cleanup-1_8.patch (license #5909) patch uploaded by Corey Farrell
        dnsmgr-cleanup-10-11-trunk.patch (license #5909) patch uploaded by Corey Farrell
        Modified
  ........

  Merged revisions 377704 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r377709 | rmudgett | 2012-12-10 19:00:05 -0600 (Mon, 10 Dec 2012) | 15 lines

  Cleanup event on exit.

  * Cleanup CLI commands on exit.

  * v10 only: Merged v1.8 -r374177 change to event.c missed in v10 -r374178.

  (issue ASTERISK-20649)
  Reported by: Corey Farrell
  Patches:
        event_shutdown-10-only.patch (license #5909) patch uploaded by Corey Farrell
        event_shutdown-1_8-11-trunk.patch (license #5909) patch uploaded by Corey Farrell
  ........

  Merged revisions 377708 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r377741 | rmudgett | 2012-12-10 20:11:29 -0600 (Mon, 10 Dec 2012) | 19 lines

  Cleanup indications on exit.

  * Made ast_unregister_indication_country() unlink the found tone zone
  before selecting a new default_tone_zone to make it impossible to select
  the tone zone being unregistered again.

  * Ringcadence is no longer parsed twice in store_config_tone_zone().

  * Cleanup CLI commands and destroy default_tone_zone on exit.

  (issue ASTERISK-20649)
  Reported by: Corey Farrell
  Patches:
        indications-cleanup-all.patch (license #5909) patch uploaded by Corey Farrell
        Modified
  ........

  Merged revisions 377740 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r377772 | rmudgett | 2012-12-10 20:42:34 -0600 (Mon, 10 Dec 2012) | 13 lines

  Cleanup logger on exit.

  * Cleanup CLI commands, destroy verbosers and logchannels lists on exit.

  (issue ASTERISK-20649)
  Reported by: Corey Farrell
  Patches:
        logger-cleanup-all.patch (license #5909) patch uploaded by Corey Farrell
        Modified
  ........

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

Merged revisions 377136,377166,377212,377227,377241,377258,377261,377354,377382,377399,377432,377504,377510,377558,377592,377624,377656,377705,377709,377741,377772 from http://svn.asterisk.org/svn/asterisk/branches/10

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@378659 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoCleanup config cache on exit.
Jason Parker [Tue, 8 Jan 2013 19:06:30 +0000 (19:06 +0000)] 
Cleanup config cache on exit.

(issue ASTERISK-20649)
Reported by: Corey Farrell
Patches:
      config-cleanup-all.patch (license #5909) patch uploaded by Corey Farrell
........

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@378658 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoFix incorrect pointer manipulation that caused mixmonitor recording to fail.
Mark Michelson [Tue, 8 Jan 2013 15:51:27 +0000 (15:51 +0000)] 
Fix incorrect pointer manipulation that caused mixmonitor recording to fail.

(closes ASTERISK-20834)
reported by Philippe Lindheimer
Patches:
ASTERISK-20834.patch uploaded by Mark Michelson (License #5049)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@378655 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoautomerge cancel
Automerge script [Mon, 3 Dec 2012 20:25:34 +0000 (20:25 +0000)] 
automerge cancel

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@377134 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 377070,377074 via svnmerge from
Automerge script [Mon, 3 Dec 2012 19:25:40 +0000 (19:25 +0000)] 
Merged revisions 377070,377074 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r377070 | rmudgett | 2012-12-03 12:41:28 -0600 (Mon, 03 Dec 2012) | 15 lines

  Cleanup CDR resources on exit.

  * Simplify do_reload() return handling since it never returned anything
  other than 0.

  (issue ASTERISK-20649)
  Reported by: Corey Farrell
  Patches:
        cdr-cleanup-1_8.patch (license #5909) patch uploaded by Corey Farrell
        cdr-cleanup-10-11-trunk.patch (license #5909) patch uploaded by Corey Farrell
        Modified
  ........

  Merged revisions 377069 from http://svn.asterisk.org/svn/asterisk/branches/1.8
................
  r377074 | rmudgett | 2012-12-03 13:14:14 -0600 (Mon, 03 Dec 2012) | 12 lines

  Cleanup CLI resources on exit and CLI command registration errors.

  (issue ASTERISK-20649)
  Reported by: Corey Farrell
  Patches:
        cli-leaks-1_8-10.patch (license #5909) patch uploaded by Corey Farrell
        cli-leaks-11-trunk.patch (license #5909) patch uploaded by Corey Farrell
        Modified
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@377103 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 377038 via svnmerge from
Automerge script [Mon, 3 Dec 2012 17:26:31 +0000 (17:26 +0000)] 
Merged revisions 377038 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r377038 | rmudgett | 2012-12-03 11:06:44 -0600 (Mon, 03 Dec 2012) | 10 lines

  Fix CCSS CLI commands and logger level not unregistered.

  (issue ASTERISK-20649)
  Reported by: Corey Farrell
  Patches:
        ccss-cleanup-all.patch (license #5909) patch uploaded by Corey Farrell
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@377068 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 376951 via svnmerge from
Automerge script [Fri, 30 Nov 2012 22:25:29 +0000 (22:25 +0000)] 
Merged revisions 376951 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r376951 | rmudgett | 2012-11-30 15:33:38 -0600 (Fri, 30 Nov 2012) | 18 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
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@376982 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 376916,376920 via svnmerge from
Automerge script [Fri, 30 Nov 2012 17:26:20 +0000 (17:26 +0000)] 
Merged revisions 376916,376920 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r376916 | mmichelson | 2012-11-30 10:23:46 -0600 (Fri, 30 Nov 2012) | 23 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
................
  r376920 | seanbright | 2012-11-30 11:06:21 -0600 (Fri, 30 Nov 2012) | 5 lines

  Minor spelling fix to the VOLUME documentation.
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@376948 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 376865,376869 via svnmerge from
Automerge script [Thu, 29 Nov 2012 23:25:48 +0000 (23:25 +0000)] 
Merged revisions 376865,376869 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r376865 | rmudgett | 2012-11-29 16:30:26 -0600 (Thu, 29 Nov 2012) | 7 lines

  Fix compile error.

  (issue ASTERISK-20724)
  ........

  Merged revisions 376864 from http://svn.asterisk.org/svn/asterisk/branches/1.8
................
  r376869 | rmudgett | 2012-11-29 16:58:28 -0600 (Thu, 29 Nov 2012) | 7 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
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@376897 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 376835 via svnmerge from
Automerge script [Thu, 29 Nov 2012 22:28:06 +0000 (22:28 +0000)] 
Merged revisions 376835 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r376835 | elguero | 2012-11-29 15:51:50 -0600 (Thu, 29 Nov 2012) | 19 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
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@376863 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 376789 via svnmerge from
Automerge script [Thu, 29 Nov 2012 01:28:16 +0000 (01:28 +0000)] 
Merged revisions 376789 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r376789 | rmudgett | 2012-11-28 18:45:11 -0600 (Wed, 28 Nov 2012) | 26 lines

  Add MALLOC_DEBUG atexit unreleased malloc memory summary.

  * Adds the following CLI commands to control MALLOC_DEBUG reporting of
  unreleased malloc memory when Asterisk is shut down.
  memory atexit list on
  memory atexit list off
  memory atexit summary byline
  memory atexit summary byfunc
  memory atexit summary byfile
  memory atexit summary off

  * Made check all remaining allocated region blocks atexit for fence
  violations.

  * Increased the allocated region hash table size by about three times.  It
  still isn't large enough considering the number of malloced blocks
  Asterisk uses.

  * Made CLI "memory show allocations anomalies" use
  regions_check_all_fences().

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@376817 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 376759 via svnmerge from
Automerge script [Thu, 29 Nov 2012 00:28:11 +0000 (00:28 +0000)] 
Merged revisions 376759 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r376759 | rmudgett | 2012-11-28 18:05:25 -0600 (Wed, 28 Nov 2012) | 19 lines

  Enhance MALLOC_DEBUG CLI commands.

  * Fixed CLI "memory show allocations" misspelling of anomalies option.
  The command will still accept the original misspelling.

  * Miscellaneous tweaks to CLI "memory show allocations" command output
  format.

  * Made CLI "memory show summary" summarize by line number instead of by
  function if a filename is given.

  * Made CLI "memory show summary" sort its output by filename or
  function-name/line-number depending upon request.

  * Miscellaneous tweaks to CLI "memory show summary" command output format.
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@376787 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 376726 via svnmerge from
Automerge script [Wed, 28 Nov 2012 17:27:09 +0000 (17:27 +0000)] 
Merged revisions 376726 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r376726 | jrose | 2012-11-28 10:30:27 -0600 (Wed, 28 Nov 2012) | 16 lines

  manager: Make challenge work with allowmultiplelogin=no

  Prior to this patch, challenge would yield a multiple logins error if used
  without providing the username (which isn't really supposed to be an argument
  to challenge) if allowmultiplelogin was set to no because allowmultiplelogin
  finds a user with a zero length login name. This check is simply disabled for
  the challenge action when the username is empty by this patch.

  (closes issue ASTERISK-20677)
  Reported by: Vladimir
  Patches:
      challenge_action_nomultiplelogin.diff uploaded by Jonathan Rose (license 6182)
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@376754 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 376689 via svnmerge from
Automerge script [Wed, 28 Nov 2012 00:26:38 +0000 (00:26 +0000)] 
Merged revisions 376689 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r376689 | rmudgett | 2012-11-27 17:58:23 -0600 (Tue, 27 Nov 2012) | 33 lines

  Fix extension matching with the '-' char.

  The '-' char is supposed to be ignored by the dialplan extension matching.
  Unfortunately, it's treatment is not handled consistently throughout the
  extension matching code.

  * Made the old exten matching code consistently ignore '-' chars.

  * Made the old exten matching code consistently handle case in the
  matching.

  * Made ignore empty character sets.

  * Fixed ast_extension_cmp() to return -1, 0, or 1 as documented.  The only
  user of it in pbx_lua.c was testing for -1.  It was originally returning
  the strcmp() value for less than which is not usually going to be -1.

  * Fix character set sorting if the sets have the same number of characters
  and start with the same character.  Character set [0-9] now sorts before
  [02-9a] as originally intended.

  * Updated some extension label and priority already in use warnings to
  also indicate if the extension is aliased.

  (closes issue ASTERISK-19205)
  Reported by: Philippe Lindheimer, Birger "WIMPy" Harzenetter
  Tested by: rmudgett

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@376717 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 376658 via svnmerge from
Automerge script [Tue, 27 Nov 2012 21:25:37 +0000 (21:25 +0000)] 
Merged revisions 376658 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r376658 | rmudgett | 2012-11-27 14:36:45 -0600 (Tue, 27 Nov 2012) | 21 lines

  Remove unnecessary channel module references.

  * Removed call to ast_module_user_hangup_all() in res_config_mysql.c since
  it is effectively a noop.  No channels can attach a reference to that
  module.

  * Removed call to ast_module_user_hangup_all() in app_celgenuserevent.c.
  The caller of unload_module() has already called it.

  * Removed redundant channel module references in pbx_dundi.c.  The
  registered dialplan function callback dispatchers for the read/read2/write
  callbacks already reference the module before calling.

  * pbx_dundi: Moved unregistering CLI commands, DUNDi switch, and dialplan
  functions to the first thing the unload_module() does.  This will reduce
  the chance of new channels using DUNDi services while the module is being
  torn down.
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@376686 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 376628 via svnmerge from
Automerge script [Tue, 27 Nov 2012 18:26:50 +0000 (18:26 +0000)] 
Merged revisions 376628 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r376628 | rmudgett | 2012-11-27 11:35:54 -0600 (Tue, 27 Nov 2012) | 7 lines

  Made AST_LIST_REMOVE() simpler and use better names.

  * Update doxygen of AST_LIST_REMOVE().
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@376656 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 376587 via svnmerge from
Automerge script [Fri, 23 Nov 2012 00:27:27 +0000 (00:27 +0000)] 
Merged revisions 376587 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r376587 | mjordan | 2012-11-22 17:56:00 -0600 (Thu, 22 Nov 2012) | 23 lines

  Re-initialize logmsgs mutex upon logger initialization to prevent lock errors

  Similar to the patch that moved the fork earlier in the startup sequence to
  prevent mutex errors in the recursive mutex surrounding the read/write thread
  registration lock, this patch re-initializes the logmsgs mutex.  Part of the
  start up sequence before forking the process into the background includes
  reading asterisk.conf; this has to occur prior to the call to daemon in order
  to read startup parameters.  When reading in a conf file, log statements can
  be generated.  Since this can't be avoided, the mutex instead is
  re-initialized to ensure a reset of any thread tracking information.

  This patch also includes some additional debugging to catch errors when
  locking or unlocking the recursive mutex that surrounds locks when the
  DEBUG_THREADS build option is enabled.  DO_CRASH or THREAD_CRASH will
  cause an abort() if a mutex error is detected.

  (issue ASTERISK-19463)
  Reported by: mjordan
  Tesetd by: mjordan
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@376614 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 376522 via svnmerge from
Automerge script [Tue, 20 Nov 2012 17:24:48 +0000 (17:24 +0000)] 
Merged revisions 376522 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r376522 | mmichelson | 2012-11-20 11:01:04 -0600 (Tue, 20 Nov 2012) | 14 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
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@376539 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 376470 via svnmerge from
Automerge script [Mon, 19 Nov 2012 20:28:26 +0000 (20:28 +0000)] 
Merged revisions 376470 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r376470 | wdoekes | 2012-11-19 13:44:58 -0600 (Mon, 19 Nov 2012) | 11 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
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@376497 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 376431 via svnmerge from
Automerge script [Sun, 18 Nov 2012 20:23:50 +0000 (20:23 +0000)] 
Merged revisions 376431 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r376431 | mjordan | 2012-11-18 14:18:24 -0600 (Sun, 18 Nov 2012) | 49 lines

  Reorder startup sequence to prevent lockups when process is sent to background

  Although it is very rare and timing dependent, the potential exists for the
  call to 'daemon' to cause what appears to be a deadlock in Asterisk during
  startup.  This can occur when a recursive mutex is obtained prior to the
  daemon call executing.  Since daemon uses fork to send the process into the
  background, any threading primitives are unsafe to re-use after the call.
  Implementations of pthread recursive mutexes are highly likely to store the
  thread identifier of the thread that previously obtained the mutex.  If
  the mutex was locked prior to the fork, a subsequent unlock operation will
  potentially fail as the thread identifier is no longer valid.  Since the
  mutex is still locked, all subsequent attempts to grab the mutex by other
  threads will block.

  This behavior exhibited itself most often when DEBUG_THREADS was enabled, as
  this compile time option surrounds the mutexes in Asterisk with another
  recursive mutex that protects the storage of thread related information.  This
  made it much more likely that a recursive mutex would be obtained prior to
  daemon and unlocked after the call.

  This patch does the following:
  a) It backports a patch from Asterisk 11 that prevents the spawning of the
     localtime monitoring thread.  This thread is now spawned after Asterisk has
     fully booted.
  b) It re-orders the startup sequence to call daemon earlier during Asterisk
     startup.  This limits the potential of threading primitives being accessed
     by initialization calls before daemon is called.
  c) It removes calls to ast_verbose/ast_log/etc. prior to daemon being called.
     Developers should send error messages directly to stderr prior to daemon,
     as calls to ast_log may access recursive mutexes that store thread related
     information.
  d) It reorganizes when thread local storage is created for storing lock
     information during the creation of threads.  Prior to this patch, the
     read/write lock protecting the list of threads in ast_register_thread would
     utilize the lock in the thread local storage prior to it being initialized;
     this patch prevents that.

  On a very related note, this patch will *greatly* improve the stability of the
  Asterisk Test Suite.

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

  (closes issue ASTERISK-19463)
  Reported by: mjordan
  Tested by: mjordan
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@376446 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 376414 via svnmerge from
Automerge script [Sun, 18 Nov 2012 15:23:23 +0000 (15:23 +0000)] 
Merged revisions 376414 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

........
  r376414 | mjordan | 2012-11-18 08:22:39 -0600 (Sun, 18 Nov 2012) | 8 lines

  Add a test event that reports changes in ConfBridge state

  This patch adds a test event to ConfBridge that reports transitions between
  states in ConfBridge.  This is used by tests in the Asterisk Test Suite
  that verify state changes based on the entering/leaving of conference
  participants.
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@376427 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 376390 via svnmerge from
Automerge script [Fri, 16 Nov 2012 20:23:32 +0000 (20:23 +0000)] 
Merged revisions 376390 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r376390 | jrose | 2012-11-16 13:41:55 -0600 (Fri, 16 Nov 2012) | 17 lines

  monitor: prevent attempts to move/remove recordings skipped with 'i' and 'o'.

  The i and o options for monitor skip the input and output sides of a recording
  respectively. This patch addresses a problem in those options when monitor is
  called without specifying a specific filename where monitor will try to move
  the recording that was skipped. Since this usually doesn't exist when these
  options are used, it would produce a warning when it does this in most cases,
  but it is conceivable that there are use cases where this could result in
  moving/removing a file unintentionally.

  (closes issue ASTERISK-20641)
  Reported by: Jonathan Rose
  Review: https://reviewboard.asterisk.org/r/2190/
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@376408 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 376342 via svnmerge from
Automerge script [Fri, 16 Nov 2012 00:25:23 +0000 (00:25 +0000)] 
Merged revisions 376342 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r376342 | dlee | 2012-11-15 18:08:56 -0600 (Thu, 15 Nov 2012) | 9 lines

  Fixed extconf.c breakage introduced in r376306.

  To quote wdoekes:
  > Note that I'm not confirming legitimacy of having that file in tree at
  > all. Is anyone using aelparse/conf2ael?
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@376370 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 376308,376315 via svnmerge from
Automerge script [Thu, 15 Nov 2012 23:27:35 +0000 (23:27 +0000)] 
Merged revisions 376308,376315 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r376308 | jrose | 2012-11-15 16:55:04 -0600 (Thu, 15 Nov 2012) | 17 lines

  app_meetme: Fix channels lingering when hung up under certain conditions

  Channels would get stuck and MeetMe would repeatedly display an Unable
  to write frame to channel error in the conf_run function if hung up
  during certain sound prompts such as during user count announcements.
  This patch fixes that by reintroducing a hangup check in the meetme's
  main loop (also in conf_run).

  (closes issue ASTERISK-20486)
  Reported by: Michael Cargile
  Review: https://reviewboard.asterisk.org/r/2187/
  Patches:
      meetme_hangup_patch_ASTERISK-20486_v3.diff uploaded by Jonathan Rose (license 6182)
  ........

  Merged revisions 376307 from http://svn.asterisk.org/svn/asterisk/branches/1.8
................
  r376315 | dlee | 2012-11-15 17:17:54 -0600 (Thu, 15 Nov 2012) | 28 lines

  Migrate hashtest/hashtest2 to be unit tests.

  Both hashtest and hashtest2 are manual testing apps that thrash hash
  tables (hashtab and ao2 containers, respectively), by spinning up
  several threads that randomly insert, delete, lookup and iterate over
  the hash table. If the app doesn't crash, the hash table probably passes
  the test. Those utils are not a part of the typical Asterisk build, so
  they do not usually get compiled. This all makes them less that useful.

  This patch removes those manual test programs and replaces them with
  Asterisk unit test modules (test_{hashtab,astobj2}_thrash.so). It also
  attempts to make the tests more deterministic.

  * Rather than spinning up some number of threads that operate on the
    hash table randomly, spin up four threads that concurrenly add,
    remove, lookup and iterate over the hash table.
  * Each thread checks the state of the hash table both during and after
    execution, and indicates a test failure if things are not as expected.
  * Each thread times out after 60 seconds to prevent deadlocking the unit
    test run.

  (closes issue ASTERISK-20505)
  Reported by: Matt Jordan
  Review: https://reviewboard.asterisk.org/r/2189/
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@376338 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoReverted r376309; merged to wrong branch
David M. Lee [Thu, 15 Nov 2012 23:06:56 +0000 (23:06 +0000)] 
Reverted r376309; merged to wrong branch

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@376311 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMigrate hashtest/hashtest2 to be unit tests.
David M. Lee [Thu, 15 Nov 2012 22:58:49 +0000 (22:58 +0000)] 
Migrate hashtest/hashtest2 to be unit tests.

Both hashtest and hashtest2 are manual testing apps that thrash hash
tables (hashtab and ao2 containers, respectively), by spinning up
several threads that randomly insert, delete, lookup and iterate over
the hash table. If the app doesn't crash, the hash table probably passes
the test. Those utils are not a part of the typical Asterisk build, so
they do not usually get compiled. This all makes them less that useful.

This patch removes those manual test programs and replaces them with
Asterisk unit test modules (test_{hashtab,astobj2}_thrash.so). It also
attempts to make the tests more deterministic.

* Rather than spinning up some number of threads that operate on the
  hash table randomly, spin up four threads that concurrenly add,
  remove, lookup and iterate over the hash table.
* Each thread checks the state of the hash table both during and after
  execution, and indicates a test failure if things are not as expected.
* Each thread times out after 60 seconds to prevent deadlocking the unit
  test run.

(closes issue ASTERISK-20505)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2189/
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@376309 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 376263 via svnmerge from
Automerge script [Thu, 15 Nov 2012 02:22:09 +0000 (02:22 +0000)] 
Merged revisions 376263 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r376263 | newtonr | 2012-11-14 19:50:54 -0600 (Wed, 14 Nov 2012) | 10 lines

  (issue ASTERISK-20280)
  (closes issue ASTERISK-20280)
  Reported by: Tomo Takebe
  Tested by: Rusty Newton
  Patches:
      asterisk20280.patch uploaded by Rusty Newton (license 5829)
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@376281 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 376233 via svnmerge from
Automerge script [Wed, 14 Nov 2012 20:26:38 +0000 (20:26 +0000)] 
Merged revisions 376233 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r376233 | rmudgett | 2012-11-14 13:50:52 -0600 (Wed, 14 Nov 2012) | 19 lines

  Fix call files when astspooldir is relative.

  Future dated call files are ignored when astspooldir is relative to the
  current directory.  The queue_file() assumed that the qdir needed to be
  prepended if the given filename did not start with a '/'.  If astspooldir
  is relative it is not going to start from the root directory obviously so
  it will not start with a '/'.  The filename used in queue_file()
  ultimately results in qdir prepended multiple times.

  * Made queue_file() not prepend qdir if the filename contains a '/'.

  (closes issue ASTERISK-20593)
  Reported by: James Le Cuirot
  Patches:
        0004-Fix-future-call-files-from-relative-directories.patch (license #6439) patch uploaded by James Le Cuirot
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@376260 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 376208 via svnmerge from
Automerge script [Tue, 13 Nov 2012 18:22:46 +0000 (18:22 +0000)] 
Merged revisions 376208 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r376208 | beagles | 2012-11-13 12:20:13 -0600 (Tue, 13 Nov 2012) | 14 lines

  Patch to prevent stopping the active generator when it is not the silence
  generator.

  This patch introduces an internal helper function to safely check whether the
  current generator is the one that is expected before deactivating it. The
  current externally accessible ast_channel_stop_generator() function has been
  modified to be implemented in terms of the new function.

  (closes issue ASTERISK-19918)
  Reported by: Eduardo Abad
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@376216 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 376167 via svnmerge from
Automerge script [Mon, 12 Nov 2012 21:25:47 +0000 (21:25 +0000)] 
Merged revisions 376167 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r376167 | file | 2012-11-12 14:44:56 -0600 (Mon, 12 Nov 2012) | 14 lines

  Properly check if the "Context" and "Extension" headers are empty in a ShowDialPlan action.

  The code which handles the ShowDialPlan action wrongly assumed that a non-NULL return value
  from the function which retrieves headers from an action indicates that the header has a
  value. This is incorrect and the contents must be checked to see if they are blank.

  (closes issue ASTERISK-20628)
  Reported by: jkroon
  Patches:
       asterisk-showdialplan-incorrect-error.patch uploaded by jkroon
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@376194 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 376143 via svnmerge from
Automerge script [Mon, 12 Nov 2012 20:25:29 +0000 (20:25 +0000)] 
Merged revisions 376143 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r376143 | elguero | 2012-11-12 14:15:27 -0600 (Mon, 12 Nov 2012) | 20 lines

  Fix Dynamic Hints Variable Substition - Underscore Problem

  When adding a dynamic hint, if an extension contains an underscore no variable
  subsitution is being performed.

  This patch changes from checking if the extension contains an underscore to
  checking if the extension begins with an underscore.

  (closes issue ASTERISK-20639)
  Reported by: Steven T. Wheeler
  Tested by: Steven T. Wheeler, Michael L. Young
  Patches:
    asterisk-20639-dynamic-hint-underscore.diff
                                       uploaded by Michael L. Young (license 5026)

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@376165 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 376088 via svnmerge from
Automerge script [Thu, 8 Nov 2012 22:25:04 +0000 (22:25 +0000)] 
Merged revisions 376088 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r376088 | mmichelson | 2012-11-08 15:59:13 -0600 (Thu, 08 Nov 2012) | 12 lines

  Fix a "set but not used" warning on newer gccs.

  Turns out the "helpful" setting of ms and res in this
  macro is completely useless after the timeout antipattern
  fix.

  If you're a new guy looking to write code, don't write
  a macro like this one.
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@376117 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 376059 via svnmerge from
Automerge script [Thu, 8 Nov 2012 21:24:34 +0000 (21:24 +0000)] 
Merged revisions 376059 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r376059 | rmudgett | 2012-11-08 15:07:09 -0600 (Thu, 08 Nov 2012) | 16 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
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@376086 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 376030 via svnmerge from
Automerge script [Thu, 8 Nov 2012 17:24:07 +0000 (17:24 +0000)] 
Merged revisions 376030 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r376030 | rmudgett | 2012-11-08 11:08:39 -0600 (Thu, 08 Nov 2012) | 35 lines

  Add MALLOC_DEBUG enhancements.

  * Makes malloc() behave like calloc().  It will return a memory block
  filled with 0x55.  A nonzero value.

  * Makes free() fill the released memory block and boundary fence's with
  0xdeaddead.  Any pointer use after free is going to have a pointer
  pointing to 0xdeaddead.  The 0xdeaddead pointer is usually an invalid
  memory address so a crash is expected.

  * Puts the freed memory block into a circular array so it is not reused
  immediately.

  * When the circular array rotates out a memory block to the heap it checks
  that the memory has not been altered from 0xdeaddead.

  * Made the astmm_log message wording better.

  * Made crash if the DO_CRASH menuselect option is enabled and something is
  found.

  * Fixed a potential alignment issue on 64 bit systems.
  struct ast_region.data[] should now be aligned correctly for all
  platforms.

  * Extracted region_check_fences() from __ast_free_region() and
  handle_memory_show().

  * Updated handle_memory_show() CLI usage help.

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@376047 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 375995 via svnmerge from
Automerge script [Wed, 7 Nov 2012 17:25:46 +0000 (17:25 +0000)] 
Merged revisions 375995 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r375995 | mmichelson | 2012-11-07 11:16:24 -0600 (Wed, 07 Nov 2012) | 41 lines

  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
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@376013 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 375965 via svnmerge from
Automerge script [Tue, 6 Nov 2012 19:28:10 +0000 (19:28 +0000)] 
Merged revisions 375965 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r375965 | rmudgett | 2012-11-06 12:27:19 -0600 (Tue, 06 Nov 2012) | 21 lines

  Fix stuck DTMF when bridge is broken.

  When a bridge is broken by an AMI Redirect action or the ChannelRedirect
  application, an in progress DTMF digit could be stuck sending forever.

  * Made simulate a DTMF end event when a bridge is broken and a DTMF digit
  was in progress.

  (closes issue ASTERISK-20492)
  Reported by: Jeremiah Gowdy
  Patches:
        bridge_end_dtmf-v3.patch.txt (license #6358) patch uploaded by Jeremiah Gowdy
        Modified to jira_asterisk_20492_v1.8.patch
        jira_asterisk_20492_v1.8.patch (license #5621) patch uploaded by rmudgett
  Tested by: rmudgett

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@375992 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 375894 via svnmerge from
Automerge script [Mon, 5 Nov 2012 23:26:27 +0000 (23:26 +0000)] 
Merged revisions 375894 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r375894 | mjordan | 2012-11-05 17:00:32 -0600 (Mon, 05 Nov 2012) | 28 lines

  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
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@375921 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 375863 via svnmerge from
Automerge script [Mon, 5 Nov 2012 22:25:47 +0000 (22:25 +0000)] 
Merged revisions 375863 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r375863 | rmudgett | 2012-11-05 15:39:00 -0600 (Mon, 05 Nov 2012) | 10 lines

  Add safety NULL pointer check in module user references.

  Made __ast_module_user_remove() check for NULL pointers.
  ........

  Merged revision 375860 from C.3
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@375892 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 375846 via svnmerge from
Automerge script [Mon, 5 Nov 2012 18:22:45 +0000 (18:22 +0000)] 
Merged revisions 375846 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

........
  r375846 | jrose | 2012-11-05 11:55:13 -0600 (Mon, 05 Nov 2012) | 9 lines

  chan_sip: Document a change to user-field encoding introduced with r303509

  The change in question was added to improve compliance with RFC3261, but at
  the time of commit, it wasn't adequately documented in the UPGRADE notes.

  (closes issue ASTERISK-20561)
  Reported by: Deniz
  Review: https://reviewboard.asterisk.org/r/2177/
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@375858 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 375794,375797,375801 via svnmerge from
Automerge script [Sun, 4 Nov 2012 03:25:02 +0000 (03:25 +0000)] 
Merged revisions 375794,375797,375801 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r375794 | mjordan | 2012-11-03 21:30:30 -0500 (Sat, 03 Nov 2012) | 15 lines

  Properly clean up manager resources on exit

  This patch does two things:
  1) It properly unregisters the manager CLI commands
  2) It cleans up AMI users on exit.  Prior to this patch, the AMI users
     were not being disposed of properly, resulting in a memory leak.

  (closes issue ASTERISK-20646)
  Reported by: Corey Farrell
  patches:
    manager_shutdown.patch uploaded by Corey Farrell (license 5909)
  ........

  Merged revisions 375793 from http://svn.asterisk.org/svn/asterisk/branches/1.8
................
  r375797 | mjordan | 2012-11-03 21:42:43 -0500 (Sat, 03 Nov 2012) | 9 lines

  Only deref a reserved gateway session if we actually reserved one

  Its perfectly acceptable to have a gateway session unreserved when we go to
  first allocate one.  Unreffing the reserved gateway session - when its NULL -
  will result in an assertion error.

  This problem was caught by the Asterisk Test Suite (once we had enough of the
  debugging flags enabled)
................
  r375801 | mjordan | 2012-11-03 22:08:12 -0500 (Sat, 03 Nov 2012) | 17 lines

  Don't attempt to purge sessions when no sessions exist

  Manager's tcp/tls objects have a periodic function that purge old manager
  sessions periodically.  During shutdown, the underlying container holding
  those sessions can be disposed of and set to NULL before the tcp/tls periodic
  function is stopped.  If the periodic function fires, it will attempt to
  iterate over a NULL container.

  This patch checks for whether or not the sessions container exists before
  attempting to purge sessions out of it.  If the sessions container is NULL,
  we simply return.

  Note that this error was also caught by the Asterisk Test Suite.
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@375828 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 375759,375761 via svnmerge from
Automerge script [Sun, 4 Nov 2012 01:24:59 +0000 (01:24 +0000)] 
Merged revisions 375759,375761 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r375759 | mjordan | 2012-11-03 19:55:19 -0500 (Sat, 03 Nov 2012) | 18 lines

  Fix memory leak when unloading XML documentation

  This patch is a modified version of a patch originally committed for the
  Asterisk 11 branch in r375756.  A portion of that patch, that fixed the
  memory leak during unloading XML documentation, applies to branches 1.8
  and 10 as well.

  The patch for this issue was modified for these two branches.

  (issue ASTERISK-20648)
  Reported by: Corey Farrell
  Tested by: mjordan
  patches:
    xmldoc-memory_leak.patch uploaded by Corey Farrell (license 5909)
  ........

  Merged revisions 375758 from http://svn.asterisk.org/svn/asterisk/branches/1.8
................
  r375761 | mjordan | 2012-11-03 20:13:37 -0500 (Sat, 03 Nov 2012) | 15 lines

  Properly finalize prepared SQLite3 statements to prevent memory leak

  The AstDB uses prepared SQLite3 statements to retrieve data from the SQLite3
  database.  These statements should be finalized during Asterisk shutdown so
  that the SQLite3 database can be properly closed.  Failure to finalize the
  statements results in a memory leak and a failure when closing the database.

  This patch fixes those issues by ensuring that all prepared statements are
  properly finalized at shutdown.

  (closes issue ASTERISK-20647)
  Reported by: Corey Farrell
  patches:
    astdb-sqlite3_close.patch uploaded by Corey Farrell (license 5909)
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@375788 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 375728 via svnmerge from
Automerge script [Sun, 4 Nov 2012 00:26:10 +0000 (00:26 +0000)] 
Merged revisions 375728 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r375728 | mjordan | 2012-11-03 18:51:43 -0500 (Sat, 03 Nov 2012) | 16 lines

  Prevent multiple CDR batches from conflicting when scheduling the CDR write

  The Asterisk Test Suite caught an error condition where a scheduled CDR batch
  write can be deleted twice if two channels attempt to post their CDRs at the
  same time.  The batch CDR mutex is locked while the CDRs are appended to the
  current batch list; however, it is unlocked prior to actually scheduling the
  CDR write.  As such, two threads can attempt to remove the currently scheduled
  batch write at the same time, resulting in an assertion error.

  This patch extends the time that the mutex is locked to encompass actually
  scheduling the write.  This prevents two threads from unscheduling the
  currently scheduled write at the same time.
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@375755 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 375699 via svnmerge from
Automerge script [Sat, 3 Nov 2012 03:22:10 +0000 (03:22 +0000)] 
Merged revisions 375699 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r375699 | lathama | 2012-11-02 22:15:30 -0500 (Fri, 02 Nov 2012) | 9 lines

  Doxygen Updates

  Replace links to missing text files removed in the 1.6.x series with links to the wiki.  Doxygen can handle URLs fine, don't atempt to quote them.  Also update the wiki link in the Readme to get everyone on the same page.

  (issue ASTERISK-20259)
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@375719 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 375659 via svnmerge from
Automerge script [Fri, 2 Nov 2012 21:26:01 +0000 (21:26 +0000)] 
Merged revisions 375659 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r375659 | rmudgett | 2012-11-02 15:53:53 -0500 (Fri, 02 Nov 2012) | 5 lines

  Things don't need to be that const.
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@375688 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 375626 via svnmerge from
Automerge script [Fri, 2 Nov 2012 19:25:05 +0000 (19:25 +0000)] 
Merged revisions 375626 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r375626 | rmudgett | 2012-11-02 13:42:23 -0500 (Fri, 02 Nov 2012) | 127 lines

  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
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@375657 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 375601 via svnmerge from
Automerge script [Fri, 2 Nov 2012 17:23:10 +0000 (17:23 +0000)] 
Merged revisions 375601 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r375601 | elguero | 2012-11-02 12:19:33 -0500 (Fri, 02 Nov 2012) | 14 lines

  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
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@375612 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 375531 via svnmerge from
Automerge script [Wed, 31 Oct 2012 15:26:04 +0000 (15:26 +0000)] 
Merged revisions 375531 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r375531 | mjordan | 2012-10-31 09:34:42 -0500 (Wed, 31 Oct 2012) | 24 lines

  Properly extract the Body information of an EWS calendar item

  Unlike all other calendar modules, res_calendar_ews fails to extract the Body
  information for a calendar item.  This is due, in part, to a quirk in the
  schema in the XML - not only does a CalendarItem contain a Body element, but
  the CalendarItem exists as a descendant of a different Body element.  The neon
  parser was erroneously skipping all Body elements.

  This patch fixes that by bypassing Body elements that are not a child of
  CalendarItem, and parsing the Body element out if it is a child.

  Note that the original patch by Terry Wilson only needed slight modifications
  to make it properly pull the Body information out; as such, while I've linked
  to the patch that I uploaded for Dmitry, I've attributed the patch to Terry.

  (closes issue ASTERISK-19738)
  Reported by: Dmitry Burilov
  Tested by: Dmitry Burilov
  patches:
    calendar_ews_body_2012_10_29.diff uploaded by Terry Wilson (license 6283)
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@375558 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 375485,375496 via svnmerge from
Automerge script [Tue, 30 Oct 2012 19:24:15 +0000 (19:24 +0000)] 
Merged revisions 375485,375496 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r375485 | jrose | 2012-10-30 13:55:58 -0500 (Tue, 30 Oct 2012) | 8 lines

  mixmonitor: Add a test event

  This test event is being used to fix the  mixmonitor_audiohook_inherit
  test.
  ........

  Merged revisions 375484 from http://svn.asterisk.org/svn/asterisk/branches/1.8
................
  r375496 | rmudgett | 2012-10-30 14:20:28 -0500 (Tue, 30 Oct 2012) | 8 lines

  Fix ConfBridge crash if no timing module loaded.

  (closes issue ASTERISK-19448)
  Reported by: feyfre
  Patches:
        smfix.patch (license #6099) patch uploaded by feyfre
        Modified for coding guidelines.
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@375510 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 375470 via svnmerge from
Automerge script [Tue, 30 Oct 2012 15:22:12 +0000 (15:22 +0000)] 
Merged revisions 375470 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

........
  r375470 | jrose | 2012-10-30 09:42:29 -0500 (Tue, 30 Oct 2012) | 7 lines

  confbridge: Fix a bug which made conferences not record with AMI/CLI commands

  (closes issue ASTERISK-20601)
  Reported by: Vilius
  Patches:
      confbridge_mixmonitor.diff uploaded by Jonathan Rose (license 6182)
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@375481 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 375451 via svnmerge from
Automerge script [Tue, 30 Oct 2012 02:22:01 +0000 (02:22 +0000)] 
Merged revisions 375451 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r375451 | mjordan | 2012-10-29 21:14:01 -0500 (Mon, 29 Oct 2012) | 14 lines

  Ensure that the Queue application tracks busy members in off nominal situations

  There are a few code paths where the Queue application fails to count a paused
  or in use queue member as being 'busy'.  This can cause callers to get stuck
  in the Queue until a paused agent unpauses themselves.

  (closes issue ASTERISK-20623)
  Reported by: Bryan Walters
  patches:
    app_queue.patch uploaded by Bryan Walters (license 5851)
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@375468 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 375417 via svnmerge from
Automerge script [Mon, 29 Oct 2012 21:24:55 +0000 (21:24 +0000)] 
Merged revisions 375417 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r375417 | mmichelson | 2012-10-29 16:09:18 -0500 (Mon, 29 Oct 2012) | 23 lines

  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
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@375441 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 375389 via svnmerge from
Automerge script [Mon, 29 Oct 2012 20:25:32 +0000 (20:25 +0000)] 
Merged revisions 375389 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r375389 | rmudgett | 2012-10-29 14:28:38 -0500 (Mon, 29 Oct 2012) | 16 lines

  Fix the Park 'r' option when a channel parks itself.

  When a channel uses the Park appliation to park itself with the 'r'
  option, the channel hears music-on-hold instead of the requested ringing.

  * Added a missing check for the 'r' option when a channel parks itself.

  (closes issue ASTERISK-19382)
  Reported by: James Stocks
  Patches by: dsessions

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@375414 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 375362 via svnmerge from
Automerge script [Mon, 29 Oct 2012 16:27:16 +0000 (16:27 +0000)] 
Merged revisions 375362 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r375362 | rmudgett | 2012-10-29 10:51:24 -0500 (Mon, 29 Oct 2012) | 15 lines

  chan_dahdi: Fix segfault dereferencing a NULL tech_pvt.

  The tech support customer was using the AMI Redirect action shortly after
  a call was placed.  While the channel tried to do an ast_read(), the
  masquerade resulting from the channel redirect took place.  The masquerade
  in the middle of the ast_read() resulted in the segfault.

  (closes issue AST-1025)
  Reported by: Trey Blancher
  Patches:
        jira_ast_1025_v1.8_v2.patch (license #5621) patch uploaded by rmudgett
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@375387 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 375326 via svnmerge from
Automerge script [Tue, 23 Oct 2012 17:25:23 +0000 (17:25 +0000)] 
Merged revisions 375326 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r375326 | jrose | 2012-10-23 11:21:22 -0500 (Tue, 23 Oct 2012) | 10 lines

  ast_tls_cert script: Better response for various exit conditions to openssl

  (closes issue ASTERISK-20260)
  Reported by: Daniel O'Connor
  Patches:
   ast_tls_cert-update.diff uploaded by Daniel O'Connor (license 6419)
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@375350 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 375300 via svnmerge from
Automerge script [Mon, 22 Oct 2012 20:22:59 +0000 (20:22 +0000)] 
Merged revisions 375300 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r375300 | jrose | 2012-10-22 14:56:20 -0500 (Mon, 22 Oct 2012) | 14 lines

  core: Fix a memory leak in app.c from an early return

  ast_app_group_match_get_count allocates memory with the regcomp
  function and we previously forgot to free it when bailing out
  due to a regex compilation failure against category.

  (closes issue AST-1018)
  Reported by: Guenther Kelleter
  Patches:
   regcomp_memleak.diff uploaded by Guenther Kelleter (license 6372)
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@375321 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 375273 via svnmerge from
Automerge script [Mon, 22 Oct 2012 17:22:38 +0000 (17:22 +0000)] 
Merged revisions 375273 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r375273 | jrose | 2012-10-22 12:08:49 -0500 (Mon, 22 Oct 2012) | 10 lines

  GSM: Fix encoding problems with GSM

  (closes issue ASTERISK-20457)
  Reported by: Richard Miller
  Patches:
   code.patch uploaded by Richard Miller (license 5685)
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@375290 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 375243,375245 via svnmerge from
Automerge script [Thu, 18 Oct 2012 22:24:16 +0000 (22:24 +0000)] 
Merged revisions 375243,375245 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r375243 | jrose | 2012-10-18 16:35:20 -0500 (Thu, 18 Oct 2012) | 11 lines

  Blocked revisions 375242

  ........
  app_queue: add upgrade notes for 375216

  Adds notes describing behavioral changes to rrmemory strategy caused by
  375216

  (issue AST-989)
  Reported by: Thomas Arimont
................
  r375245 | jrose | 2012-10-18 16:39:14 -0500 (Thu, 18 Oct 2012) | 8 lines

  app_queue: add upgrade notes for 375216

  Adds notes describing behavioral changes to rrmemory strategy caused by
  375216

  (issue AST-989)
  Reported by: Thomas Arimont
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@375271 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 375217 via svnmerge from
Automerge script [Thu, 18 Oct 2012 21:25:38 +0000 (21:25 +0000)] 
Merged revisions 375217 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r375217 | jrose | 2012-10-18 16:09:29 -0500 (Thu, 18 Oct 2012) | 15 lines

  app_queue: Make ordering of rrmemory/rrordered persist over add/remove members

  Prior to this patch, adding, removing or reloading  members to rrmemory would
  cause the order to become completely jumbled. Now it behaves more or less like
  rrordered other than the fact that it stores the members on a hash table rather
  than a linked list. This patch also prevents removal of members and member
  reloads from jumbling rrordered queues.

  (issue AST-989)
  Reported by: Thomas Arimont
  Review: https://reviewboard.asterisk.org/r/2164/
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@375241 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 375190 via svnmerge from
Automerge script [Thu, 18 Oct 2012 20:25:26 +0000 (20:25 +0000)] 
Merged revisions 375190 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r375190 | rmudgett | 2012-10-18 14:53:08 -0500 (Thu, 18 Oct 2012) | 36 lines

  build_tools: Allow Asterisk to report git SHAs in version string.

  Make git more attractive for managing work-in-progress.  Especially
  convenient when a potential patch set needs to be tested on multiple
  platforms since one can use git to keep all the test environments in sync
  independent of a subversion server.

  Now the Asterisk version will show the exact git SHA5 that was used when
  building (still appended by "M" if there are local modifications) from a
  git clone of the Asterisk repository so the developer can more easily know
  what is actually under test.

  You will now get this:

    $ asterisk -V
    Asterisk GIT-1698298

  Instead of this:

    $ asterisk -V
    Asterisk UNKNOWN__and_probably_unsupported

  This has zero impact for those not using git with the exception of an
  extra test in the configure script to gather git's path.  This is
  necessary to prevent "sudo make install" from failing since git may not be
  in the path in make's shell environment.

  (closes issue ASTERISK-20483)
  Reported by: Shaun Ruffell
  Patches:
        0001-build_tools-Allow-Asterisk-to-report-git-SHAs-in-ver.patch (license #5417) patch uploaded by Shaun Ruffell
        Modified
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@375214 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 375147 via svnmerge from
Automerge script [Wed, 17 Oct 2012 19:26:07 +0000 (19:26 +0000)] 
Merged revisions 375147 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r375147 | kmoore | 2012-10-17 13:58:52 -0500 (Wed, 17 Oct 2012) | 15 lines

  Ensure Asterisk fails TCP/TLS SIP calls when certificate checking fails

  When placing a call to a TCP/TLS SIP endpoint whose certificate is not
  signed by a configured CA certificate, Asterisk would issue a warning
  and continue to process the call as if there was not an issue with the
  certificate.  Asterisk now properly fails the call if the certificate
  fails verification or if the certificate does not exist when
  certificate checking is enabled (the default behavior).

  (closes issue ASTERISK-20559)
  Review: https://reviewboard.asterisk.org/r/2163/
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@375173 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 375112 via svnmerge from
Automerge script [Tue, 16 Oct 2012 22:25:30 +0000 (22:25 +0000)] 
Merged revisions 375112 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r375112 | wdoekes | 2012-10-16 16:43:29 -0500 (Tue, 16 Oct 2012) | 10 lines

  Fixes to the fd-oriented SIP TCP reads.

  Don't crash on large user input. Allow SIP headers without space.
  Optimize code a bit.

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@375136 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 375078 via svnmerge from
Automerge script [Tue, 16 Oct 2012 20:24:24 +0000 (20:24 +0000)] 
Merged revisions 375078 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r375078 | wdoekes | 2012-10-16 14:22:44 -0500 (Tue, 16 Oct 2012) | 7 lines

  Update sip_request_call SIP dial string documentation.

  This was missed when merging review r1859.
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@375102 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 375060 via svnmerge from
Automerge script [Tue, 16 Oct 2012 19:22:36 +0000 (19:22 +0000)] 
Merged revisions 375060 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r375060 | tzafrir | 2012-10-16 14:16:43 -0500 (Tue, 16 Oct 2012) | 10 lines

  autosupport: fix bashism

  '==' is bashism (bashspecific, fails when dash is /bin/sh). Anyway, a
  'case' works better there.

  (closes issue ASTERISK-20567)
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@375077 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 375026 via svnmerge from
Automerge script [Mon, 15 Oct 2012 21:23:46 +0000 (21:23 +0000)] 
Merged revisions 375026 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r375026 | mmichelson | 2012-10-15 16:06:42 -0500 (Mon, 15 Oct 2012) | 22 lines

  Fix some potential misuses of ast_str in the code.

  Passing an ast_str pointer by value that then calls
  ast_str_set(), ast_str_set_va(), ast_str_append(), or
  ast_str_append_va() can result in the pointer originally
  passed by value being invalidated if the ast_str had
  to be reallocated.

  This fixes places in the code that do this. Only the
  example in ccss.c could result in pointer invalidation
  though since the other cases use a stack-allocated ast_str
  and cannot be reallocated.

  I've also updated the doxygen in strings.h to include
  notes about potential misuse of the functions mentioned
  previously.

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@375043 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 374991 via svnmerge from
Automerge script [Sun, 14 Oct 2012 10:20:03 +0000 (10:20 +0000)] 
Merged revisions 374991 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r374991 | tzafrir | 2012-10-14 04:40:24 -0500 (Sun, 14 Oct 2012) | 12 lines

  Update config.guess and config.sub: 2012-10-10

  Update config.guess and config.sub to revision
  fb456b34ef4aa02b95dc6be69aaa66fa94a844fb from the savannah.gnu.org git
  repo. Adds support for e.g. aarch64 (ARM 64bit).

  config.guess:timestamp='2012-09-25'
  config.sub:timestamp='2012-10-10'
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@374994 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoAvoid a segfault on invalid format names
Kinsey Moore [Fri, 12 Oct 2012 21:56:59 +0000 (21:56 +0000)] 
Avoid a segfault on invalid format names

If a format name was not found by ast_getformatbyname, a NULL pointer
would be passed into ast_format_rate and immediately dereferenced.
This ensures that a valid pointer is used since the structure is
already allocated on the stack.

(closes issue DPH-523)
Reported-by: Steve Pitts
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@374931 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 374906 via svnmerge from
Automerge script [Fri, 12 Oct 2012 16:23:56 +0000 (16:23 +0000)] 
Merged revisions 374906 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r374906 | mmichelson | 2012-10-12 11:11:30 -0500 (Fri, 12 Oct 2012) | 28 lines

  Do not use a FILE handle when doing SIP TCP reads.

  This is used to solve an issue where a poll on a file
  descriptor does not necessarily correspond to the readiness
  of a FILE handle to be read.

  This change makes it so that for TCP connections, we do a
  recv() on the file descriptor instead.

  Because TCP does not guarantee that an entire message or even
  just one single message will arrive during a read, a loop has
  been introduced to ensure that we only attempt to handle a
  single message at a time. The tcptls_session_instance structure
  has also had an overflow buffer added to it so that if more
  than one TCP message arrives in one go, there is a place to
  throw the excess.

  Huge thanks goes out to Walter Doekes for doing extensive review
  on this change and finding edge cases where code could fail.

  (closes issue ASTERISK-20212)
  reported by Phil Ciccone

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@374923 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 374844 via svnmerge from
Automerge script [Thu, 11 Oct 2012 16:25:48 +0000 (16:25 +0000)] 
Merged revisions 374844 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r374844 | mjordan | 2012-10-11 10:43:19 -0500 (Thu, 11 Oct 2012) | 29 lines

  Fix incorrect billing duration reported when batch mode is enabled

  Similar to r369351, the billing duration can be skewed when batch mode is
  enabled.  This happened much more rarely than the duration, as it only
  occured when the call was answered (thereby indicating an actual answer
  time) and immediately hung up on (indicating a billsec of 0).  Since
  a billing time of '0' can either mean that the call immediately ended
  or that the CDR was improperly answered, we have to use additional information
  to know whether or not we can trust the CDR billsec value.  Prior to this
  patch, we looked to see if we had a valid answer time.  If we did, and
  billsec was zero, we used the current time to calculate what billsec value
  we could from the CDR being written.  If batch mode is enabled, this will
  incorrectly report a billsec value being much greater than the actual
  duration of the call.

  Instead of relying on the presence of an answer time to know whether or not
  we can re-calculate the billsec for the CDR, we now also use the presence
  of the CDR's end time to know if we need to re-calculate or whether we can
  trust the billsec value that we have.  This prevents erroneous jumps in the
  billsec value, while still making sure that in the worst case, some billing
  time will be calculated.

  (closes issue AST-1016)
  Reported by: Thomas Arimont
  Tested by: Thomas Arimont
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@374876 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 374803 via svnmerge from
Automerge script [Wed, 10 Oct 2012 21:25:47 +0000 (21:25 +0000)] 
Merged revisions 374803 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r374803 | rmudgett | 2012-10-10 15:55:44 -0500 (Wed, 10 Oct 2012) | 30 lines

  app_queue: Made pass connected line updates from the caller to ringing queue members.

  Party A calls Party B
  Party B puts Party A on hold.
  Party B calls a queue.
  Ringing queue member D sees Party B identification.
  Party B transfers Party A to the queue.
  Queue member D does not get a connected line update for Party A.
  Queue member D answers the call and still sees Party B information.

  However, if Party A later transfers the call to Party C then queue member
  D gets a connected line update for Party C.

  * Made pass connected line updates from the caller to queue members while
  the queue members are ringing.

  (closes issue AST-1017)
  Reported by: Thomas Arimont

  (closes issue ABE-2886)
  Reported by: Thomas Arimont
  Tested by: rmudgett

  ........

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@374831 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 374763 via svnmerge from
Automerge script [Tue, 9 Oct 2012 22:25:47 +0000 (22:25 +0000)] 
Merged revisions 374763 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r374763 | rmudgett | 2012-10-09 17:19:26 -0500 (Tue, 09 Oct 2012) | 15 lines

  Fix execution of 'i' extension due to uninitialized variable.

  The fix for ASTERISK-18243 added code that could potentially use
  dst_exten[] uninitialized.  As a result the 'i' exten may not be executed
  when it should.

  (closes issue ASTERISK-20455)
  Reported by: Richard Miller
  Patches:
        pbx-1.8.16.0.diff (license #5685) patch uploaded by Richard Miller
        Made some cosmetic modifications.
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@374783 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 374728 via svnmerge from
Automerge script [Mon, 8 Oct 2012 23:24:21 +0000 (23:24 +0000)] 
Merged revisions 374728 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r374728 | rmudgett | 2012-10-08 17:29:47 -0500 (Mon, 08 Oct 2012) | 15 lines

  dahdi.conf.sample: Add description for "buffers" setting.

  This contains an edited version of the patch originally uploaded by John
  Bigelow.

  (closes issue ASTERISK-14435)
  Reported by: John Bigelow
  Patches:
        buffers.patch (license #5091) patch uploaded by John Bigelow
        0001-dahdi.conf.sample-Add-description-for-buffers-settin.patch (license #5417) patch uploaded by Shaun Ruffell
        Modified
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@374753 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 374695 via svnmerge from
Automerge script [Mon, 8 Oct 2012 21:25:01 +0000 (21:25 +0000)] 
Merged revisions 374695 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r374695 | rmudgett | 2012-10-08 16:11:41 -0500 (Mon, 08 Oct 2012) | 34 lines

  Fix deletion of unopenable spool files.

  If scan_service() cannot open the spool file, it logs a message saying
  that it will delete the file and calls remove_from_queue() to do it.
  However, remove_from_queue() fails to delete the spool file because struct
  outgoing has not yet been fully initialized.

  * Merged allocating a new struct outgoing and init_outgoing() into
  new_outgoing().  Allocation is initialization.

  * Made apply_outgoing() not initialize the spool filename in struct
  outgoing.

  * Made apply_outgoing() call ast_trim_blanks() and ast_skip_blanks()
  rather than manually inlining them.

  * Reduced indentation levels in apply_outgoing().

  * Fixed a garbled comment in remove_from_queue().

  * Reworked scan_service() to simplify it.

  (closes issue ASTERISK-17231)
  Reported by: David Chappell
  Patches:
        spool_open_failure.diff (license #4997) patch uploaded by David Chappell
        Started with this patch.
  ........

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

  * Fixed some memory leaks on of nominal paths in init_outgoing() when
  merging into the new_outgoing() function dealing with o->capabilities.
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@374720 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 374652 via svnmerge from
Automerge script [Mon, 8 Oct 2012 14:19:23 +0000 (14:19 +0000)] 
Merged revisions 374652 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

........
  r374652 | mjordan | 2012-10-08 08:46:27 -0500 (Mon, 08 Oct 2012) | 46 lines

  Resolve issues in ConfBridge regarding marked, waitmarked, and unmarked users

  Thank's to Neil Tallim (flan)'s tireless testing, issue reporting, and patches
  it became clear that app_confbridge had some complex logic in how it handled
  interactions between marked, waitmarked, and unmarked users.  In particular,
  there were some areas in which the interactions between the users resulted
  in inconsistent behavior, and app_confbridge was missing logic in how to handle
  some corner cases.  Some areas included:
   * Poor handling of mixing unmarked and waitmarked users
   * Inconsistencies in how MOH and muting was applied to various users
   * Handling of various announcements for different user profile options
  flan's patches seem to fix the various issues, but highlighted how hard the
  code could be to maintain.  In an attempt to make things easier to maintain and
  to more fully enumerate the various cases that exist, this patch breaks up the
  logic into a state machine-like setup.

  Please note that the various state transitioned are documented on the Asterisk
  wiki:

  https://wiki.asterisk.org/wiki/display/AST/Confbridge+state+changes

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

  Note that for the following issues, mjordan uploaded the patch, although it
  was written by twilson.  Any contributor license discrepency is due to that.

  (closes issue ASTERISK-19562)
  Reported by: flan
  Tested by: flan, mjordan, jrose
  patches:
    bugASTERISK-19562_ASTERISK-19726_ASTERISK-20181.patch uploaded by twilson (license 6283)

  (closes issue ASTERISK-19726)
  Reported by: flan
  Tested by: flan
  patches:
    bugASTERISK-19562_ASTERISK-19726_ASTERISK-20181.patch uploaded by twilson (license 6283)

  (closes issue ASTERISK-20181)
  Reported by: Jonathan White
  Tested by: Jonathan White
  patches:
    bugASTERISK-19562_ASTERISK-19726_ASTERISK-20181.patch uploaded by twilson (license 6283)
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@374656 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 374586 via svnmerge from
Automerge script [Fri, 5 Oct 2012 21:25:19 +0000 (21:25 +0000)] 
Merged revisions 374586 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r374586 | dlee | 2012-10-05 15:23:14 -0500 (Fri, 05 Oct 2012) | 34 lines

  Multiple revisions 374570,374581

  ........
    r374570 | dlee | 2012-10-05 15:14:41 -0500 (Fri, 05 Oct 2012) | 22 lines

    Improve AMI long line error handling

    In AMI's parser, when it receives a long line (> 1024 characters), it discards
    that line, but continues to process the message normally.

    Typically, this is not a problem because a) who has lines that long and b)
    usually a discarded line results in an invalid message. But if that line is
    specifying an optional field, then the message will be processed, you get a
    'Response: Success', but things don't work the way you expected them to.

    This patch changes the behavior when a line-too-long parse error occurs.

    * Changes the log message to avoid way-too-long (and truncated anyways) log
      messages
    * Adds a 'parsing' status flag to Response: Success
    * Sets parsing = MESSAGE_LINE_TOO_LONG if, well, a line is too long
    * Responds with an appropriate error if parsing != MESSAGE_OKAY

    (closes issue AST-961)
    Reported by: John Bigelow
    Review: https://reviewboard.asterisk.org/r/2142/
  ........
    r374581 | dlee | 2012-10-05 15:20:28 -0500 (Fri, 05 Oct 2012) | 1 line

    I've committed too much. Reverting part of r374570.
  ........

  Merged revisions 374570,374581 from http://svn.asterisk.org/svn/asterisk/branches/1.8
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@374610 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 374537 via svnmerge from
Automerge script [Fri, 5 Oct 2012 19:27:28 +0000 (19:27 +0000)] 
Merged revisions 374537 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r374537 | rmudgett | 2012-10-05 13:25:20 -0500 (Fri, 05 Oct 2012) | 162 lines

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

  ................
    r374515 | rmudgett | 2012-10-04 17:52:36 -0500 (Thu, 04 Oct 2012) | 10 lines

    chan_misdn: Remove some deadcode

    * Made setup_bc() static.

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

    JIRA ABE-2882

  ................
    r374516 | rmudgett | 2012-10-04 18:01:01 -0500 (Thu, 04 Oct 2012) | 7 lines

    chan_misdn: Remove unused bchan states

    Patches:
   patch2_unused-states.diff (license #6372) patch uploaded by Guenther Kelleter

    JIRA ABE-2882

  ................
    r374517 | rmudgett | 2012-10-04 18:17:51 -0500 (Thu, 04 Oct 2012) | 16 lines

    chan_misdn: Remove unnecessary null pointer checks and checks for stack->nt

    * cleanup_bc() is always called with valid bc (or it would've crashed
    before).

    * Value of stack->nt is known in advance at some places.

    * Rename handle_event() to handle_event_te(), handle_frm() to
    handle_frm_te().

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

    JIRA ABE-2882

  ................
    r374518 | rmudgett | 2012-10-04 18:21:59 -0500 (Thu, 04 Oct 2012) | 7 lines

    chan_misdn: Fix spelling in log messages

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

    JIRA ABE-2882

  ................
    r374519 | rmudgett | 2012-10-04 18:31:59 -0500 (Thu, 04 Oct 2012) | 15 lines

    chan_misdn: Don't cleanup a bc twice.

    In handle_frm_te() after calling misdn_lib_send_event(bc,
    EVENT_RELEASE_COMPLETE) bc is emptied, cleaned and set not in use,
    although misdn_lib_send_event() already did the same.  This is bad.  When
    it's not in use we are not allowed to touch it.

    * Moved log message in front of the resulting actions and fixed it to
    match the case.

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

    JIRA ABE-2882

  ................
    r374520 | rmudgett | 2012-10-04 18:43:56 -0500 (Thu, 04 Oct 2012) | 12 lines

    chan_misdn: Fix memory leaks, bc, chan not cleaned up etc., really bad stuff.

    * Fix return codes of cb_events() for EVENT_SETUP to use caller's cleanup
    mechanisms.

    * Move cl_queue_chan() call after bearer check.

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

    JIRA ABE-2882

  ................
    r374521 | rmudgett | 2012-10-04 18:48:38 -0500 (Thu, 04 Oct 2012) | 11 lines

    chan_misdn: We must initialize cause on sending a DISCONNECT.

    We must initialize cause on sending a DISCONNECT, so it is later correctly
    indicated to ast_channel in case the answer (RELEASE/RELEASE_COMPLETE)
    does not include one.

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

    JIRA ABE-2882

  ................
    r374522 | rmudgett | 2012-10-04 19:03:56 -0500 (Thu, 04 Oct 2012) | 7 lines

    chan_misdn: Remove unused code for upqueue

    Patches:
   patch8_unused-upqueue.diff (license #6372) patch uploaded by Guenther Kelleter

    JIRA ABE-2882

  ................
    r374523 | rmudgett | 2012-10-04 19:11:50 -0500 (Thu, 04 Oct 2012) | 7 lines

    chan_misdn: Improve debugging (port number, messages fixed, dups removed)

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

    JIRA ABE-2882

  ................
    r374533 | rmudgett | 2012-10-05 12:17:18 -0500 (Fri, 05 Oct 2012) | 8 lines

    chan_misdn: Better debug: we can print_bc_info even if there's no ast leg.

    Patches:
   patch10_debug-bc-2.diff (license #6372) patch uploaded by Guenther Kelleter
   Modified.

    JIRA ABE-2882

  ................
    r374534 | rmudgett | 2012-10-05 12:34:10 -0500 (Fri, 05 Oct 2012) | 16 lines

    chan_misdn: setup_bc() is called too early for an incoming SETUP on TE.

    This prevents the B channel from being setup for HDLC mode when requested
    by the bearer capability and config option hdlc=yes.  It violates
    ETS300102 Ch.5.2.3.2: "The user, in any case, must not connect to the
    channel until a CONNECT ACKNOWLEDGE message has been received."

    * Call setup_bc() on receipt of CONNECT_ACKNOWLEGDE for PTMP, and on first
    response to SETUP for PTP.

    Patches:
   abe-2881-2.diff (license #6372) patch uploaded by Guenther Kelleter
   Modified.

    JIRA ABE-2881

  ................
    r374535 | rmudgett | 2012-10-05 12:41:05 -0500 (Fri, 05 Oct 2012) | 2 lines

    chan_misdn: Remove some more deadcode.

  ................
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@374568 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 374476,374481 via svnmerge from
Automerge script [Thu, 4 Oct 2012 20:27:21 +0000 (20:27 +0000)] 
Merged revisions 374476,374481 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r374476 | alecdavis | 2012-10-04 15:05:14 -0500 (Thu, 04 Oct 2012) | 13 lines

  dsp.c fix incorrect DTMF Digit_Duration.

  it's always short by 'hits_to_begin*DTMF_GSIZE', or 25.5ms if hitstobegin=2

  (issue ASTERISK-16003)
  Tested by: alecdavis
  alecdavis (license 585)

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

  Merged revisions 374475 from http://svn.asterisk.org/svn/asterisk/branches/1.8
................
  r374481 | alecdavis | 2012-10-04 15:17:16 -0500 (Thu, 04 Oct 2012) | 17 lines

  dsp.c User Configurable DTMF_HITS_TO_BEGIN and DTMF_MISSES_TO_END

  Instead of a recompile, allow values to be adjusted in dsp.conf

  For binary distributions allows easy adjustment for wobbly GSM calls, and other reasons.

  Defaults to DTMF_HITS_TO_BEGIN=2 and DTMF_MISSES_TO_END=3

  (closes issue ASTERISK-17493)
  Tested by: alecdavis
  alecdavis (license 585)

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@374508 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 374457 via svnmerge from
Automerge script [Thu, 4 Oct 2012 18:23:00 +0000 (18:23 +0000)] 
Merged revisions 374457 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r374457 | file | 2012-10-04 12:44:38 -0500 (Thu, 04 Oct 2012) | 17 lines

  Fix a regression from direct media ACLs where the directrtpsetup option no longer works.

  A check was added for direct media ACLs that immediately forbid remote bridging if there
  was no bridged channel. This caused directrtpsetup to no longer function as it needs this
  information before bridging actually occurs.

  Logic has now been adjusted so if there is no bridged channel a remote bridge will still
  be attempted.

  (closes issue ASTERISK-20511)
  Reported by: kristoff

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@374474 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 374427 via svnmerge from
Automerge script [Thu, 4 Oct 2012 16:27:35 +0000 (16:27 +0000)] 
Merged revisions 374427 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r374427 | dlee | 2012-10-04 10:37:11 -0500 (Thu, 04 Oct 2012) | 25 lines

  Fix DBDelTree error codes for AMI, CLI and AGI

  The AMI DBDelTree command will return Success/Key tree deleted successfully even
  if the given key does not exist. The CLI command 'database deltree' had a
  similar problem, but was saved because it actually responded with '0 database
  entries removed'. AGI had a slightly different error, where it would return
  success if the database was unavailable.

  This came from confusion about the ast_db_deltree retval, which is -1 in the
  event of a database error, or number of entries deleted (including 0 for
  deleting nothing).

  * Changed some poorly named res variables to num_deleted
  * Specified specific errors when calling ast_db_deltree (database unavailable
    vs. entry not found vs. success)
  * Fixed similar bug in AGI database deltree, where 'Database unavailable'
    results in successful result

  (closes issue AST-967)
  Reported by: John Bigelow
  Review: https://reviewboard.asterisk.org/r/2138/
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@374455 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 374385 via svnmerge from
Automerge script [Thu, 4 Oct 2012 05:26:42 +0000 (05:26 +0000)] 
Merged revisions 374385 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r374385 | alecdavis | 2012-10-03 23:41:19 -0500 (Wed, 03 Oct 2012) | 36 lines

  dsp.c User configuration of DTMF_NORMAL_TWIST and DTMF_REVERSE_TWIST values

  Asterisk's DTMF Specifications are based on AT&T specs, which may not be compatible in other countries.

  Various countries have different specifications for the maximum power level differences
  between the DTMF low group and high group of frequencies.

  Power level difference between frequencies for different Administrations/RPOAs
   NTT        = Max. 5 dB
   AT&T       = 4dB(reverse) to 8dB(normal)
   Danish     = Max. 6 dB
   Australian = Max. 10 dB
   Brazilian  = Max. 9 dB
   ETSI       = Max. 6 dB from ETSI ES 201 235-3 V1.3.1 (2006-03)

  Now allow 4 variables to be individually configured in dsp.conf, with reasonable min/max of 2dB to 20dB.
  Default is AT&T specifications

  Add's the following variables to dsp.conf
  ;dtmf_normal_twist=6.31
  ;dtmf_reverse_twist=2.51
  ;relax_dtmf_normal_twist=6.31
  ;relax_dtmf_reverse_twist=3.98

  (closes issue ASTERISK-20442)
  Reported by: tbsky
  Tested by: tbsky,alecdavis

  alecdavis (license 585)

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@374413 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 374370 via svnmerge from
Automerge script [Thu, 4 Oct 2012 04:22:35 +0000 (04:22 +0000)] 
Merged revisions 374370 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r374370 | alecdavis | 2012-10-03 23:18:44 -0500 (Wed, 03 Oct 2012) | 15 lines

  _dsp_init: bring inline with trunk

  preparation for clean merge of DTMF TWIST patch

  No functional changes, just style.

  alecdavis (license 585)
  Reported by: Alec Davis
  Tested by: alecdavis

  related https://reviewboard.asterisk.org/r/2141
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@374383 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 374336 via svnmerge from
Automerge script [Thu, 4 Oct 2012 02:25:29 +0000 (02:25 +0000)] 
Merged revisions 374336 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r374336 | mjordan | 2012-10-03 21:11:05 -0500 (Wed, 03 Oct 2012) | 31 lines

  Check for presence of buddy in info/dinfo handlers

  The res_jabber resource module uses the ASTOBJ library for managing its ref
  counted objects.  After calling ASTOBJ_CONTAINER_FIND to locate a buddy object,
  the pointer to the object has to be checked to see if the buddy existed.
  Prior to this patch, the buddy object was not checked for NULL; with this patch
  in both aji_client_info_handler and aji_dinfo_handler the pointer is checked
  before used and, if no buddy object was found, the handlers return an error
  code.

  This patch does not take the approach that our JID can be used to log in from
  another resource.  If that approach is desired, an improvement could be made to
  this patch to create the buddy on the fly.  This patch seeks only to prevent
  Asterisk from crashing.

  Note that multiple people have proposed patches for this issue; the patch being
  committed here is based on those.

  (closes issue ASTERISK-19532)
  Reported by: Karsten Wemheuer
  Tested by: Byron Clark
  patches:
    fix-jabber uploaded by Karsten Wemheuer (license #5930)
    xmpp_no_crash_with_ejabberd.patch uploaded by Byron Clark (license #6157)

  (closes issue ASTERISK-19557)
  Reported by: ulugutz
  ........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@374364 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 374317 via svnmerge from
Automerge script [Wed, 3 Oct 2012 19:22:34 +0000 (19:22 +0000)] 
Merged revisions 374317 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

................
  r374317 | mjordan | 2012-10-03 13:59:06 -0500 (Wed, 03 Oct 2012) | 13 lines

  Blocked revisions 374316

  ........
  Destroy the generic_monitors container after the core_instances in ccss

  For each item in core_instances disposed of in the shutdown of ccss, any
  generic monitor instances referenced by the objects will be removed from
  generic_monitors during their destruction.  Hilarity ensues if
  generic_monitors no longer exists.

  Thanks to the Asterisk Test Suite's generic_ccss test for complaining loudly
  when it ran into this.
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@374334 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoMerged revisions 374300 via svnmerge from
Automerge script [Wed, 3 Oct 2012 18:23:35 +0000 (18:23 +0000)] 
Merged revisions 374300 via svnmerge from
file:///srv/subversion/repos/asterisk/branches/10

........
  r374300 | mjordan | 2012-10-03 12:25:36 -0500 (Wed, 03 Oct 2012) | 10 lines

  Destroy the generic_monitors container after the core_instances in ccss

  For each item in core_instances disposed of in the shutdown of ccss, any
  generic monitor instances referenced by the objects will be removed from
  generic_monitors during their destruction.  Hilarity ensues if
  generic_monitors no longer exists.

  Thanks to the Asterisk Test Suite's generic_ccss test for complaining loudly
  when it ran into this.
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10-digiumphones@374315 65c4cc65-6c06-0410-ace0-fbb531ad65f3