]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
11 years agounit tests: test_voicemail_api leaks stringfields from snapshots
Jonathan Rose [Wed, 4 Sep 2013 21:33:08 +0000 (21:33 +0000)] 
unit tests: test_voicemail_api leaks stringfields from snapshots

(closes issue ASTERISK-22414)
Reported by: Corey Farrell
Patches:
    test_voicemail_api-leaks-11.patch uploaded by coreyfarrell (license 5909)

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

11 years agoapp_voicemail: Fix leaking config objects when msg_id doesn't match
Jonathan Rose [Wed, 4 Sep 2013 21:11:48 +0000 (21:11 +0000)] 
app_voicemail: Fix leaking config objects when msg_id doesn't match

(issues ASTERISK-22414)
Reported by: Corey Farrell
Patch:
    test_voicemail_api-leaks-11.patch uploaded by coreyfarrell (license 5909)

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

11 years agochan_misdn: Fix misdn debug output printed with arbitrary verbose levels.
Richard Mudgett [Wed, 4 Sep 2013 15:57:03 +0000 (15:57 +0000)] 
chan_misdn: Fix misdn debug output printed with arbitrary verbose levels.

Fix the misdn debug output to remote consoles.  chan_misdn uses
ast_console_puts() which doesn't know about verbose levels.  Better to use
ast_verbose() instead.  Without this patch the misdn debug messages are
appended to the verbose level which ever was set by the message sent to
the console before, i.e.  any undefined level.

(closes issue AST-1218)
Reported by: Guenther Kelleter
Patches:
      misdnlog.patch (license #6372) patch uploaded by Guenther Kelleter
........

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

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

11 years agoFix remote tcs sequence handling on empty tcs received
Alexandr Anikin [Tue, 3 Sep 2013 19:45:44 +0000 (19:45 +0000)] 
Fix remote tcs sequence handling on empty tcs received

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

11 years agoBe a little more verbose when loading cel_custom.conf.
Walter Doekes [Mon, 2 Sep 2013 07:28:04 +0000 (07:28 +0000)] 
Be a little more verbose when loading cel_custom.conf.

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

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

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

11 years agoFix various memory leaks
Kevin Harwell [Fri, 30 Aug 2013 19:16:20 +0000 (19:16 +0000)] 
Fix various memory leaks

main/config.c - cleanup cache fie includes
res/res_security_log.c - unregister logger level
channesl/chan_sip.c - cleanup io context and notify_types
main/translator.c - cleanup at shutdown
main/named_acl.c - cleanup cli commands
main/indications.c - ast_get_indication_tone() unref default_tone_zone if used

(closes issues ASTERISK-22378)
Reported by: Corey Farrell
Patches:
     config_shutdown.patch uploaded by coreyfarrell (license 5909)
     res_security_log.patch uploaded by coreyfarrell (license 5909)
     chan_sip-11.patch uploaded by coreyfarrell (license 5909)
     indications_refleak.patch uploaded by coreyfarrell (license 5909)
     named_acl-cli_unreg-11.patch uploaded by coreyfarrell (license 5909)
     translate_shutdown.patch uploaded by coreyfarrell (license 5909)

........

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

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

11 years agoMemory leak fix
Kevin Harwell [Fri, 30 Aug 2013 17:53:56 +0000 (17:53 +0000)] 
Memory leak fix

ast_xmldoc_printable returns an allocated block that must be freed by the
caller.  Fixed manager.c and res_agi.c to stop leaking these results.

(closes issue ASTERISK-22395)
Reported by: Corey Farrell
Patches:
     manager-leaks-11.patch uploaded by coreyfarrell (license 5909)
     res_agi-xmldoc-leaks.patch uploaded by coreyfarrell (license 5909)
........

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

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

11 years agoFix memory leak
Kevin Harwell [Fri, 30 Aug 2013 17:00:26 +0000 (17:00 +0000)] 
Fix memory leak

Fixed a features.c test that leaked a reference to a parked call.  This caused
chancount to never reach 0, so graceful shutdown stops.  Also added an
unregister test.

(closes issue ASTERISK-22413)
Reported by: Corey Farrell
Patches:
     features-TEST_FRAMEWORK.patch uploaded by coreyfarrell (license 5909)
........

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

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

11 years agotest_substituition: Fix failed test reporting to actually report failure.
Richard Mudgett [Fri, 30 Aug 2013 16:57:00 +0000 (16:57 +0000)] 
test_substituition: Fix failed test reporting to actually report failure.

You cannot put the "Testing <blah> pass/fail" on a single line before
actually performing the test.  Now any additional failure information is
logged before the test pass/fail announcement.

* Added an additional CDR(answer,u) test.
........

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

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

11 years agoFix memory leaks
Kevin Harwell [Fri, 30 Aug 2013 16:20:21 +0000 (16:20 +0000)] 
Fix memory leaks

(closes issue ASTERISK-22368)
Reported by: Corey Farrell
Patches:
     issueA22368_mixmonitor_free_filename.patch uploaded by wdoekes (license 5674)
........

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

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

11 years agoCheck return value on fwrite
Kevin Harwell [Fri, 30 Aug 2013 15:22:35 +0000 (15:22 +0000)] 
Check return value on fwrite

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

11 years agoVerbose logging discrepancies
Kevin Harwell [Thu, 29 Aug 2013 22:16:41 +0000 (22:16 +0000)] 
Verbose logging discrepancies

Refactored cases where a combination of ast_verbose/options_verbose were
present.  Also in general tried to eliminate, in as many places as possible,
where the options_verbose global variable was being used.  Refactored the way
local and remote consoles handle verbose message logging in an attempt to
solve the various discrepancies that sometimes would show between the two.

(closes issue AST-1193)
Reported by: Guenther Kelleter
Review: https://reviewboard.asterisk.org/r/2798/

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

11 years agoAST-2013-005: Fix crash caused by invalid SDP
Matthew Jordan [Tue, 27 Aug 2013 18:03:08 +0000 (18:03 +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/11@397758 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFix uninitialized value in struct ast_control_pvt_cause_code usage.
Richard Mudgett [Tue, 27 Aug 2013 16:40:46 +0000 (16:40 +0000)] 
Fix uninitialized value in struct ast_control_pvt_cause_code usage.

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

11 years agoAST-2013-004: Fix crash when handling ACK on dialog that has no channel
Matthew Jordan [Tue, 27 Aug 2013 15:55:16 +0000 (15:55 +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 http://svn.asterisk.org/svn/asterisk/branches/10

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

11 years agoMake libuuid an optional dependency for res_rtp_asterisk instead of a requirement.
Joshua Colp [Fri, 23 Aug 2013 21:57:14 +0000 (21:57 +0000)] 
Make libuuid an optional dependency for res_rtp_asterisk instead of a requirement.

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

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

11 years agoFix memory corruption when trying to get "core show locks".
Richard Mudgett [Fri, 23 Aug 2013 16:07:18 +0000 (16:07 +0000)] 
Fix memory corruption when trying to get "core show locks".

Review https://reviewboard.asterisk.org/r/2580/ tried to fix the mismatch
in memory pools but had a math error determining the buffer size and
didn't address other similar memory pool mismatches.

* Effectively reverted the previous patch to go in the same direction as
trunk for the returned memory pool of ast_bt_get_symbols().

* Fixed memory leak in ast_bt_get_symbols() when BETTER_BACKTRACES is
defined.

* Fixed some formatting in ast_bt_get_symbols().

* Fixed sig_pri.c freeing memory allocated by libpri when MALLOC_DEBUG is
enabled.

* Fixed __dump_backtrace() freeing memory from ast_bt_get_symbols() when
MALLOC_DEBUG is enabled.

* Moved __dump_backtrace() because of compile issues with the utils
directory.

(closes issue ASTERISK-22221)
Reported by: Matt Jordan

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

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

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

11 years agoAdd _IO_stdin_used in version-script to fix SIGBUSes on Sparc.
Walter Doekes [Thu, 22 Aug 2013 08:22:39 +0000 (08:22 +0000)] 
Add _IO_stdin_used in version-script to fix SIGBUSes on Sparc.

The --version-script,asterisk.exports linker flag (and the module
exports) didn't provide _IO_stdin_used in the list of exported symbols.
That causes some kind of libc compatibility mode to kick in, where
stdio file structures (stdout/stderr) land somewhere else. In the
case of the Sparc, they landed on misaligned memory.

This became apparent first after r376428 (Reorder startup sequence)
when a lot of ast_log's were replaced with fprintf's. Writing to
stderr triggered a SIGBUS. (Compared to x86 and amd64 architectures,
the Sparc is very picky about memory alignment.)

(issue ASTERISK-21763)
(issue ASTERISK-21665)

Reported by: Jeremy Kister
Review: https://reviewboard.asterisk.org/r/2760/
........

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

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

11 years agoUDPTL: Fix a regression where UDPTL won't load default settings
Jonathan Rose [Wed, 21 Aug 2013 23:02:35 +0000 (23:02 +0000)] 
UDPTL: Fix a regression where UDPTL won't load default settings

If the file udptl.conf is unavailable at startup, UDPTL will fail to
initialize and while it makes some noise, it isn't immediately
obvious why consumers start to fail when using it. This patch makes
UDPTL load as though an empty config was provided  when udptl is
unavailable at startup.

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

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

11 years agoComplete http_shutdown.
David M. Lee [Wed, 21 Aug 2013 17:07:06 +0000 (17:07 +0000)] 
Complete http_shutdown.

This patch frees up some resources allocated in http.c.
 * tcp listeners stopped
 * tls settings freed
 * uri redirects freed
 * unregister internal http.c uri's

(closes issue ASTERISK-22237)
Reported by: Corey Farrell

Patches:
    http.patch uploaded by Corey Farrell (license 5909)
........

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

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

11 years agoSet 14400 as the default max bit rate if T38MaxBitRate is not specified
Matthew Jordan [Wed, 21 Aug 2013 15:12:57 +0000 (15:12 +0000)] 
Set 14400 as the default max bit rate if T38MaxBitRate is not specified

If an endpoint fails to include the T38MaxBitRate attribute during negotiation,
Asterisk will negotiate a bit rate of 2400 instead of the ITU recommended
bit rate of 14400. This patch fixes this by making AST_T38_RATE_14400 the
'default' value of the enum by assigning it a value of 0, such that if an
endpoint fails to include the attribute, the default will be 14400.

Note that Walter Doekes included the nice comment in frame.h about why we are
purposefully assigning AST_T38_RATE_14400 a value of 0.

(closes issue ASTERISK-22275)
Reported by: Andreas Steinmetz
patches:
  fax-fix.patch uploaded by anstein (License 6523)
........

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

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

11 years agoPrevent a crash on outbound SIP MESSAGE requests.
Mark Michelson [Wed, 21 Aug 2013 14:36:39 +0000 (14:36 +0000)] 
Prevent a crash on outbound SIP MESSAGE requests.

If a From header on an outbound out-of-call SIP MESSAGE were
malformed, the result could crash Asterisk.

In addition, if a From header on an incoming out-of-call SIP
MESSAGE request were malformed, the message was happily accepted
rather than being rejected up front. The incoming message path
would not result in a crash, but the behavior was bad nonetheless.

(closes issue ASTERISK-22185)
reported by Zhang Lei

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

11 years agoFix Not Storing Current Incoming Recv Address
Michael L. Young [Wed, 21 Aug 2013 02:11:26 +0000 (02:11 +0000)] 
Fix Not Storing Current Incoming Recv Address

In 1.8, r384779 introduced a regression by retrieving an old dialog and keeping
the old recv address since recv was already set.  This has caused a problem when
a proxy is involved since responses to incoming requests from the proxy server,
after an outbound call is established, are never sent to the correct recv
address.

In 11, r382322 introduced this regression.

The fix is to revert that change and always store the recv address on incoming
requests.

Thank you Walter Doekes for helping to point out this error and Mark Michelson
for your input/review of the fix.

(closes issue ASTERISK-22071)
Reported by: Alex Zarubin
Tested by: Alex Zarubin, Karsten Wemheuer
Patches:
    asterisk-22071-store-recvd-address.diff by Michael L. Young (license 5026)
........

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

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

11 years agoRemove REF_DEBUG definition.
Mark Michelson [Tue, 20 Aug 2013 17:41:39 +0000 (17:41 +0000)] 
Remove REF_DEBUG definition.
........

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

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

11 years agoFix refcounting of sip_pvt in test_sip_rtpqos test and unlink it from the list of...
Mark Michelson [Tue, 20 Aug 2013 16:23:11 +0000 (16:23 +0000)] 
Fix refcounting of sip_pvt in test_sip_rtpqos test and unlink it from the list of pvts.

(closes issue ASTERISK-22248)
reported by Corey Farrell
patches:
test_sip_rtpqos.patch uploaded by Corey Farrell (license #5909)
........

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

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

11 years agoUnregister CLI commands on exit
Kinsey Moore [Tue, 20 Aug 2013 15:27:16 +0000 (15:27 +0000)] 
Unregister CLI commands on exit

This patch ensures that CLI commands enabled by DEBUG_FD_LEAKS and
DEBUG_THREADLOCALS are cleaned up properly on exit.

(closes issue ASTERISK-22238)
Reported by: Corey Farrell
Tested by: Corey Farrell
Patches:
    debug_cli_unregister.patch uploaded by Corey Farrell
........

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

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

11 years agoFix xmldoc memory leak
Kinsey Moore [Tue, 20 Aug 2013 14:25:30 +0000 (14:25 +0000)] 
Fix xmldoc memory leak

This fixes a single-attribute memory leak that was occurring when the
"required" attribute was not true.

(closes issue ASTERISK-22249)
Reported by: Corey Farrell
Tested by: Corey Farrell
Patches:
    xmldoc-free_attr_required.patch uploaded by Corey Farrell
........

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

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

11 years agoProtect CEL from an invalid config on reload
Kinsey Moore [Tue, 20 Aug 2013 14:07:45 +0000 (14:07 +0000)] 
Protect CEL from an invalid config on reload

This patch fixes CEL to properly handle an invalid config on reload.

(closes issue ASTERISK-22259)
Reported by: Corey Farrell
Tested by: Corey Farrell
Patches:
    cel-config.patch uploaded by Corey Farrell
........

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

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

11 years agoAdd "autoframing" option to sip.conf.sample and h323.conf.sample.
Walter Doekes [Tue, 20 Aug 2013 11:47:16 +0000 (11:47 +0000)] 
Add "autoframing" option to sip.conf.sample and h323.conf.sample.

The autoframing option was added to chan_sip.c in r43243 (mogorman,
2006-09-19 01:32:57), but never made its way into the sample configs.

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

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

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

11 years agoFix invalid access to disposed memory in main/data unit test
Matthew Jordan [Tue, 20 Aug 2013 01:18:34 +0000 (01:18 +0000)] 
Fix invalid access to disposed memory in main/data unit test

It is not safe to iterate over a macro'd list of ao2 objects, deref them such
that the item's destructor is called, and leave them in the list. The list
macro to iterate over items requires the item to be a valid allocated object
in order to proceed to the next item; with MALLOC_DEBUG on the corruption of
the linked list is caught in the crash.

This patch fixes the invalid access to free'd memory by removing the ao2 item
from the list before de-refing it.

Note that this is a backport of r396915 from Asterisk trunk.
........

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

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

11 years agoLet Queue wrap up time influence member availability
Matthew Jordan [Tue, 20 Aug 2013 00:06:37 +0000 (00:06 +0000)] 
Let Queue wrap up time influence member availability

Queue members who happen to be in multiple queues at the same time may not
have any wrap up time. This problem occurred due to a code change in Asterisk
11.3.0 that unified device state tracking of Queue members in multiple
Queues (which fixed some other problems, but unfortunately caused this one).

This patch fixes the behavior by having the is_member_available function
check the queue's wrap up time and the time of the member's last call, such
that for a particular queue, the member won't be considered available if their
last call is within the wrap up time.

(closes issue ASTERISK-22189)
Reported by: Tony Lewis
Tested by: Tony Lewis

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

11 years agoResolve conflicts between CONFFLAG_DONT_DENOISE and CONFFLAG_INTROUSER_VMREC
Matthew Jordan [Mon, 19 Aug 2013 23:53:55 +0000 (23:53 +0000)] 
Resolve conflicts between CONFFLAG_DONT_DENOISE and CONFFLAG_INTROUSER_VMREC

When r382230 added an option to not denoise the MeetMe conference (if a user
had a channel whose format's sample rate changed frequently, for example),
the value added was the maximum allowed value for the constants that define
the options for MeetMe in 1.8. Not so in 11 - unfortunately, the option
CONFFLAG_DONT_DENOISE conflicts with CONFFLAG_INTROUESR_VMREC. This patch
fixes that, and also tweaks one of the way in which the constants was
declared for consistency.

Thanks to Tony Mountifield for pointing out the problem and solution.

(closes issue ASTERISK-22269)
Reported by: Tony Mountifield

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

11 years agoAdd test suite events to indicate when a feature is detected or not
John Bigelow [Fri, 16 Aug 2013 22:45:10 +0000 (22:45 +0000)] 
Add test suite events to indicate when a feature is detected or not

These are needed by the bridge test suite tests for them to be able to run
against Asterisk 11.

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

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

11 years agoRemove leading spaces from the CLI command before parsing
Kinsey Moore [Thu, 15 Aug 2013 16:29:56 +0000 (16:29 +0000)] 
Remove leading spaces from the CLI command before parsing

If you've mistakenly put a space before typing in a command, the
leading space will be included as part of the command, and the command
parser will not find the corresponding command. This patch rectifies
that situation by stripping the leading spaces on commands.

Review: https://reviewboard.asterisk.org/r/2709/
Patch-by: Tilghman Lesher
........

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

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

11 years agoTweak comment for why usleep is used.
Joshua Colp [Wed, 14 Aug 2013 19:06:28 +0000 (19:06 +0000)] 
Tweak comment for why usleep is used.
........

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

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

11 years agoTweak test_hashtab_thrash test to allow the critical threads to execute.
Joshua Colp [Wed, 14 Aug 2013 18:08:27 +0000 (18:08 +0000)] 
Tweak test_hashtab_thrash test to allow the critical threads to execute.

Depending on certain conditions it was possible for the hashtab counting thread
to starve other threads, preventing them from executing in the expected fashion.
This change adds a sleep to allow the others to do what they need to do. While
this doesn't thrash the hashtab as much as previously, it at least works.

(closes issue ASTERISK-22276)
Reported by: Matt Jordan
........

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

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

11 years agochan_sip: Convert 'just did sched_add waitid...' from warning to debug message.
Walter Doekes [Tue, 13 Aug 2013 18:45:55 +0000 (18:45 +0000)] 
chan_sip: Convert 'just did sched_add waitid...' from warning to debug message.

Patches:
    reviewboard-2377.patch uploaded by Paul Belanger
Review: https://reviewboard.asterisk.org/r/2377/
........

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

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

11 years agochan_sip: Fix IP-addr in warning when rejecting a contact ACL.
Walter Doekes [Tue, 13 Aug 2013 18:34:39 +0000 (18:34 +0000)] 
chan_sip: Fix IP-addr in warning when rejecting a contact ACL.

Patches:
    reviewboard-2155.patch uploaded by Paul Belanger
Review: https://reviewboard.asterisk.org/r/2155/
........

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

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

12 years agoConsistent memory allocation by ast_bt_get_symbols.
Walter Doekes [Thu, 8 Aug 2013 20:21:52 +0000 (20:21 +0000)] 
Consistent memory allocation by ast_bt_get_symbols.

Always use ast_alloc/ast_free. This is handled differently in trunk (r391012).

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

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

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

12 years ago - Fix different issues with call transfer cancel. In case 3rd party busy or congesti...
Igor Goncharovskiy [Thu, 8 Aug 2013 07:03:50 +0000 (07:03 +0000)] 
 - Fix different issues with call transfer cancel. In case 3rd party busy or congestion call was not returned.
 - Fix displaying soft button 'Redial' in case of no redial number exists

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

12 years agoCheck result of ast_var_assign() calls for memory allocation failure (2).
Walter Doekes [Tue, 6 Aug 2013 08:37:37 +0000 (08:37 +0000)] 
Check result of ast_var_assign() calls for memory allocation failure (2).

Missed a spot in the previous commit.

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

12 years agoCheck result of ast_var_assign() calls for memory allocation failure.
Walter Doekes [Tue, 6 Aug 2013 08:19:42 +0000 (08:19 +0000)] 
Check result of ast_var_assign() calls for memory allocation failure.

We try to keep the system running even when all available memory is
spent.

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

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

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

12 years agoFix Registration Failure When A Peer And TLS Are Used
Michael L. Young [Mon, 5 Aug 2013 20:19:41 +0000 (20:19 +0000)] 
Fix Registration Failure When A Peer And TLS Are Used

If a peer is used in a register line and TLS is defined as the transport, the
registration fails since the transport on the dialog is never set properly
resulting in UDP being used instead of TLS.

This patch sets the dialog's transport based on the transport that was defined
in the register line.  If the register line does not specify a transport, the
parsing function for the register line always defaults back to UDP.

(closes issue ASTERISK-21964)
Reported by: Doug Bailey
Tested by: Doug Bailey
Patches:
    asterisk-21964-set-reg-dialog-transport.diff
by Michael L. Young (license 5026)
........

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

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

12 years agoBlocked revisions 396236
Michael L. Young [Mon, 5 Aug 2013 19:48:22 +0000 (19:48 +0000)] 
Blocked revisions 396236

........
Restore Extra Line Break Between Peers When Running AMI Action SIPPeers

The commit (r387133) for fixing ASTERISK-21466 accidentally removed an extra
line break between the peers returned by the AMI action SIPPeers.  This
results in some parsers breaking because they expect this extra line break.

This patch restores that extra line break.

(closes issue ASTERISK-22239)
Reported by: Jacek Konieczny
Tested by: Jacek Konieczny, Michael L. Young
Patches:
    asterisk-ami_sippeers_separator.patch by Jacek Konieczny (license 6298)

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

12 years agoChange "from" to "From".
Michael L. Young [Mon, 5 Aug 2013 18:48:31 +0000 (18:48 +0000)] 
Change "from" to "From".

(related to issue ASTERISK-21903)

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

12 years agoAdding a note to UPGRADE.txt about a change made to res_agi in order to
Michael L. Young [Mon, 5 Aug 2013 18:42:58 +0000 (18:42 +0000)] 
Adding a note to UPGRADE.txt about a change made to res_agi in order to
indicate when streaming an audio file fails like it is done in other parts
of the code to indicate an error.

Note was requested by Paul Belanger:
http://lists.digium.com/pipermail/asterisk-dev/2013-July/061420.html

(related to issue ASTERISK-21903)
........

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

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

12 years agoUpdate copyright year to 2013 in asterisk.c; some whitespace fixes
Matthew Jordan [Mon, 22 Jul 2013 13:50:54 +0000 (13:50 +0000)] 
Update copyright year to 2013 in asterisk.c; some whitespace fixes

(closes issue ASTERISK-22179)
Reported by: Malcolm Davenport
........

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

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

12 years agoAdd an upgrade note for libuuid dependency; remove note in CHANGES
Matthew Jordan [Sun, 21 Jul 2013 22:51:58 +0000 (22:51 +0000)] 
Add an upgrade note for libuuid dependency; remove note in CHANGES

This patch notes that libuuid is now a dependency for res_rtp_asterisk; this
was introduced in between 11.4.0 and 11.5.0 to resolve a dependency for
pjproject, which res_rtp_asterisk uses for ICE/STUN/TURN support.

It also removes a conflicting note from CHANGES. While support for playing
prompts to the first participant was added for app_queue, it was disabled
by default and an option added to enable it. That was properly noted in the
UPGRADE.txt file.

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

12 years agoClean up documentation
Matthew Jordan [Sun, 21 Jul 2013 22:08:33 +0000 (22:08 +0000)] 
Clean up documentation

This patch cleans up documentation in func_channel for the following items:
* rtpsource
* secure_signaling
* secure_media
* various OOH323 parameters

(closes issue ASTERISK-20969)
Reported by: snuffy
patches:
  func_chan-update.diff uploaded by snuffy (License 5024)
........

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

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

12 years agoProvide proper ring tone in indications.conf for Malaysia
Matthew Jordan [Sun, 21 Jul 2013 18:16:36 +0000 (18:16 +0000)] 
Provide proper ring tone in indications.conf for Malaysia

The ring tone provided in the sample indications.conf was incorrect. This patch
modifies the sample ring tone to be what it should:
  ring = 425/400,0/200,425/400,0/2000

This brings it in line with the tone definition in DAHDI 2.7.0. (zonedata.c)

(closes issue ASTERISK-21997)
Reported by: Filip Jenicek
patches:
  malaysia_ring.patch uploaded by phill (License 6277)
........

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

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

12 years agoTolerate presence of RFC2965 Cookie2 header by ignoring it
Matthew Jordan [Sun, 21 Jul 2013 03:09:59 +0000 (03:09 +0000)] 
Tolerate presence of RFC2965 Cookie2 header by ignoring it

This patch modifies parsing of cookies in Asterisk's http server by doing an
explicit comparison of the "Cookie" header instead of looking at the first
6 characters to determine if the header is a cookie header. This avoids
parsing "Cookie2" headers and overwriting the previously parsed "Cookie"
header.

Note that we probably should be appending the cookies in each "Cookie"
header to the parsed results; however, while clients can send multiple
cookie headers they never really do. While this patch doesn't improve
Asterisk's behavior in that regard, it shouldn't make it any worse either.

Note that the solution in this patch was pointed out on the issue by the
issue reporter, Stuart Henderson.

(closes issue ASTERISK-21789)
Reported by: Stuart Henderson
Tested by: mjordan, Stuart Henderson
........

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

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

12 years agoUpdate PostgreSQL realtime scripts with schema for queue_log table
Matthew Jordan [Sun, 21 Jul 2013 02:38:43 +0000 (02:38 +0000)] 
Update PostgreSQL realtime scripts with schema for queue_log table

This patch updates the realtime SQL scripts with an entry that will create the
queue_log table. This brings the PostgreSQL scripts inline with the MySQL
scripts, with respect to what tables they will create.

(closes issue ASTERISK-21021)
Reported by: Eugene
patches:
  queue_log.sql uploaded by varnav (license 6360)
........

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

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

12 years agoDocument connectedline parameter for chan_iax2
Matthew Jordan [Sun, 21 Jul 2013 02:20:36 +0000 (02:20 +0000)] 
Document connectedline parameter for chan_iax2

The connectedline parameter for a chan_iax2 peer was undocumented. This patch
documents the options in the sample configuration file.

(closes issue ASTERISK-21953)
Reported by: Birger "WIMPy" Harzenetter
........

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

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

12 years agoProperly indicate failure to open an audio stream in res_agi
Michael L. Young [Thu, 18 Jul 2013 12:52:33 +0000 (12:52 +0000)] 
Properly indicate failure to open an audio stream in res_agi

If there is an error streaming an audio file, the current return status makes it
difficult for an AGI script to determine that there was an error with the audio
file.

This patches changes the result to return -1 and the function returns
RESULT_FAILURE instead of RESULT_SUCCESS.  From looking at other parts of
res_agi, this would appear to be the proper way to handle an error.

(closes issue ASTERISK-21903)
Reported by: Ariel Wainer
Tested by: Ariel Wainer
Patches:
asterisk-21903-return-stream-res_1.8.diff
by Michael L. Young (license 5026)

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

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

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

12 years agoProvide error message for QUEUE_MEMBER when member is not in queue
Matthew Jordan [Sun, 14 Jul 2013 02:34:43 +0000 (02:34 +0000)] 
Provide error message for QUEUE_MEMBER when member is not in queue

When QUEUE_MEMBER is used and the member specified is not in the queue,
Asterisk provides an ERROR message that indicates that the option specified
is not valid. This patch now properly displays an ERROR message that the
member is not in the queue if an interface is specified.

(closes issue ASTERISK-21980)
Reported by: Avraam David

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

12 years agoClarify documentation for function PASSTHRU
Matthew Jordan [Sun, 14 Jul 2013 01:59:19 +0000 (01:59 +0000)] 
Clarify documentation for function PASSTHRU

It is not apparent to the average user that the PASSTHRU function should not
be passed as ${PASSTHRU(string)} but just as PASSTHRU(string) to functions
which take a variable name and not its contents.

This patch clarifies the behavior in the documentation and provides an example.

(closes issue ASTERISK-21717)
Reported by: Richard Miller
patches:
  func_strings.diff uploaded by Richard Miller (license 5685)
........

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

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

12 years agoFix a longstanding issue with MFC-R2 configuration that prevented users
Moises Silva [Thu, 11 Jul 2013 21:28:07 +0000 (21:28 +0000)] 
Fix a longstanding issue with MFC-R2 configuration that prevented users
from mixing different variants or general MFC-R2 settings within the same E1 line.

Most users do not have a problem with this since MFC-R2 lines are usually fractional E1s, or
the whole E1 has the same country variant and R2 settings.

In Venezuela however is common to have inbound MFC-R2 and outbound DTMF-R2 within the same E1.

This fix now properly parses the chan_dahdi.conf file to generate a new openr2 context every
time a new channel => section is found and the configuration was changed.

(closes issue ASTERISK-21117)
Reported by: Rafael Angulo
Related Elastix issue: http://bugs.elastix.org/view.php?id=1612
........

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

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

12 years agoastobj2-ify the SLA code
Russell Bryant [Wed, 10 Jul 2013 01:49:41 +0000 (01:49 +0000)] 
astobj2-ify the SLA code

The SLA code within app_meetme was written before asotbj2 had been
merged into Asterisk.  Worse, support for reloads did not exist at first
and was added later as a bolt-on feature.  I knew at the time that
reloading was not safe at all while SLA was in use, so the reload would
be queued up to execute when the system was idle.  Unfortunately, this
approach was still prone to errors beyond the fact that this was the
only place in Asterisk where configuration was not reloaded
instantly when requested.

This patch converts various SLA objects to be reference counted objects
using astobj2.  This allows reloads to be processed while the system is
in use.  The code ensures that the objects will not disappear while one
of the other threads is using them.  However, they will be immediately
removed from the global trunk and station containers so no new calls
will use them if removed from configuration.

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

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

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

12 years agoMixMonitor: Fix refleak in manager_stop_mixmonitor() if could not stop monitoring.
Richard Mudgett [Wed, 3 Jul 2013 23:52:04 +0000 (23:52 +0000)] 
MixMonitor: Fix refleak in manager_stop_mixmonitor() if could not stop monitoring.

........

Merged revisions 393490 from http://svn.asterisk.org/svn/asterisk/trunk

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

12 years agochan_dahdi: Fix segfault reloading chan_dahdi when round robin is used.
Richard Mudgett [Wed, 3 Jul 2013 23:30:20 +0000 (23:30 +0000)] 
chan_dahdi: Fix segfault reloading chan_dahdi when round robin is used.

* Clear round_robin[] in dahdi_restart().

(closes issue ASTERISK-21847)
Reported by: Ivo Andonov
Patches:
      jira_asterisk_21847_v1.8.patch (license #5621) patch uploaded by rmudgett
........

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

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

12 years agoFix issue with inability to cancell call transfer made by on-sceen menus.
Igor Goncharovskiy [Tue, 2 Jul 2013 10:14:09 +0000 (10:14 +0000)] 
Fix issue with inability to cancell call transfer made by on-sceen menus.

Reported by: Igor Olhovskiy

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

12 years agoFix memory/ref counting leaks in a variety of locations
Matthew Jordan [Tue, 25 Jun 2013 01:07:29 +0000 (01:07 +0000)] 
Fix memory/ref counting leaks in a variety of locations

This patch fixes the following memory leaks:
 * http.c: The structure containing the addresses to bind to was not being
   deallocated when no longer used
 * named_acl.c: The global configuration information was not disposed of
 * config_options.c: An invalid read was occurring for certain option types.
 * res_calendar.c: The loaded calendars on module unload were not being
   properly disposed of.
 * chan_motif.c: The format capabilities needed to be disposed of on module
   unload. In addition, this now specifies the default options for the
   maxpayloads and maxicecandidates in such a way that it doesn't cause the
   invalid read in config_options.c to occur.

(issue ASTERISK-21906)
Reported by: John Hardin
patches:
  http.patch uploaded by jhardin (license 6512)
  named_acl.patch uploaded by jhardin (license 6512)
  config_options.patch uploaded by jhardin (license 6512)
  res_calendar.patch uploaded by jhardin (license 6512)
  chan_motif.patch uploaded by jhardin (license 6512)

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

12 years agoapp_mixmonitor: Fix crashes caused by unloading app_mixmonitor
Jonathan Rose [Fri, 14 Jun 2013 16:21:41 +0000 (16:21 +0000)] 
app_mixmonitor: Fix crashes caused by unloading app_mixmonitor

Unloading app_mixmonitor while active mixmonitors were running would
cause a segfault. This patch fixes that by making it impossible to
unload app_mixmonitor while mixmonitors are active.

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

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

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

12 years agoapp_confbridge: Fix memory leak on reload.
Richard Mudgett [Thu, 13 Jun 2013 18:47:48 +0000 (18:47 +0000)] 
app_confbridge: Fix memory leak on reload.

The config framework options should not be registered multiple times.
Instead the configuration just needs to be reprocessed by the config
framework.

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

12 years agoFix segfault for certain invalid WebSocket input.
David M. Lee [Wed, 12 Jun 2013 21:00:38 +0000 (21:00 +0000)] 
Fix segfault for certain invalid WebSocket input.

The WebSocket code would allocate, on the stack, a string large enough
to hold a key provided by the client, and the WEBSOCKET_GUID. If the key
is NULL, this causes a segfault. If the key is too large, it could
overflow the stack.

This patch checks the key for NULL and checks the length of the key to
avoid stack smashing nastiness.

(closes issue ASTERISK-21825)
Reported by: Alfred Farrugia
Tested by: Alfred Farrugia, David M. Lee
Patches:
    issueA21825_check_if_key_is_sent.patch uploaded by Walter Doekes (license 5674)

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

12 years agoFix memory leak while loading priority modules and adding formats
Matthew Jordan [Wed, 12 Jun 2013 02:25:23 +0000 (02:25 +0000)] 
Fix memory leak while loading priority modules and adding formats

This patch fixes two memory leaks:
 * When we load a module with the LOAD_PRIORITY flag, we remove its entry from
   the load order list. Unfortunately, we don't free the memory associated with
   entry in the list. This patch corrects that and properly frees the memory
   for the module in the list.

 * When adding a custom format (such as SILK or CELT), the routine for adding
   the format was leaking a reference. RAII_VAR cleans this up properly.

........

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

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

12 years agoFix issue with no sound in both way in case of previous call to chan_unistim phone...
Igor Goncharovskiy [Tue, 11 Jun 2013 10:22:00 +0000 (10:22 +0000)] 
Fix issue with no sound in both way in case of previous call to chan_unistim phone was canceled.

(related to ASTERISK-20183)

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

12 years agoIAX2: Transfer Reject: Lock bridgecallno before touching it, refactor
Alec L Davis [Tue, 11 Jun 2013 08:10:12 +0000 (08:10 +0000)] 
IAX2: Transfer Reject: Lock bridgecallno before touching it, refactor

1). When touching the bridgecallno, we need to lock it.

2). Remove magic number '0' and replace with TRANSFER_NONE.

3). Exit early if no bridgecallno.

4). Reduce indentation.

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

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

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

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

12 years agoAdd announce-to-first-user option for app_queue
Matthew Jordan [Mon, 10 Jun 2013 14:25:23 +0000 (14:25 +0000)] 
Add announce-to-first-user option for app_queue

In r386792, the ability to play prompts to the first caller in a call queue was
added. While this is arguably a bug fix for those who expect the first caller
to continue receiving prompts while the agent is dialed, it has the side effect
of preventing the first caller from hearing the agent immediately upon
bridging. This may not be a problem for those who really want this option, but
for those who didn't care whether or not the first caller in queue heard their
position, it was an issue.

This patch disables the ability for the first caller in the queue to hear
prompts and adds a new option, announce-to-first-user, to queues.conf. Those
who the behavior can enable it by setting this value to True.

Note that if we ever implement the ability to have the prompts be stopped
upon bridging, this option can be removed.

(closes issue ASTERISK-21782)
Reported by: Remi Quezada
........

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

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

12 years agochan_iax2: nativebridge refactor, missed unlock bridgecallno
Alec L Davis [Mon, 10 Jun 2013 09:32:01 +0000 (09:32 +0000)] 
chan_iax2: nativebridge refactor, missed unlock bridgecallno
........

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

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

12 years agofix bad edit after conflict resolution
Alec L Davis [Mon, 10 Jun 2013 08:34:46 +0000 (08:34 +0000)] 
fix bad edit after conflict resolution
........

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

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

12 years agoIAX2: refactor nativebridge transfer
Alec L Davis [Mon, 10 Jun 2013 08:23:52 +0000 (08:23 +0000)] 
IAX2: refactor nativebridge transfer

remove triple checking of iaxs[fr->callno]->transferring

reduce indentation.

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

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

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

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

12 years agoIAX2: fix race condition with nativebridge transfers.
Alec L Davis [Mon, 10 Jun 2013 07:32:51 +0000 (07:32 +0000)] 
IAX2: fix race condition with nativebridge transfers.

1). When touching the bridgecallno, we need to lock it.

2). stop_stuff() which calls iax2_destroy_helper()
    Assumes the lock on the pvt is already held, when iax2_destroy_helper() is called.
    Thus we need to lock the bridgecallno pvt before we call stop_stuff(iaxs[fr->callno]->bridgecallno);

3).   When evaluating the state of 'callno->transferring' of the current leg,
    we can't change it to READY unless the bridgecallno is locked.
      Why, if we are interrupted by the other call leg before 'transferring = TRANSFER_RELEASED',
    the interrupt will find that it is READY and that the bridgecallno is also READY so Releases the legs.

(closes issue ASTERISK-21409)

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

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

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

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

12 years agoremove unnecessary declarations
Alexandr Anikin [Fri, 31 May 2013 10:34:20 +0000 (10:34 +0000)] 
remove unnecessary declarations
(issue ASTERISK-21800)

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

12 years agoreject call attempts when gatekeeper is configured but not registered
Alexandr Anikin [Fri, 31 May 2013 10:19:52 +0000 (10:19 +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 http://svn.asterisk.org/svn/asterisk/branches/10

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

12 years agoFix segfault when dealing with chan_agent channels.
Richard Mudgett [Wed, 29 May 2013 20:18:01 +0000 (20:18 +0000)] 
Fix segfault when dealing with chan_agent channels.

Check the returned bridged pointer for NULL to avoid a crash.  It looks
like chan_agent is returning a NULL pointer when it probably should be
returning a pointer to the channel the Agent channel is pretending to be.

(closes issue ASTERISK-21793)
Reported by: Rodrigo P. Telles
Patches:
      jira_asterisk_21793_v1.8.patch (license #5621) patch uploaded by rmudgett
Tested by: Rodrigo P. Telles
........

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

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

12 years agoFix a memory copying bug in slinfactory which was causing mixmonitor issues.
Jonathan Rose [Tue, 28 May 2013 17:43:23 +0000 (17:43 +0000)] 
Fix a memory copying bug in slinfactory which was causing mixmonitor issues.

Reported by: Michael Walton
Tested by: Jonathan Rose
Patches:
    slinfactory.c.ASTERISK-21799.patch uploaded by Michael Walton (license 6502)
(closes issue ASTERISK-21799)
........

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

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

12 years agoPrint all logger messages on shutdown
Matthew Jordan [Fri, 24 May 2013 11:49:08 +0000 (11:49 +0000)] 
Print all logger messages on shutdown

When Asterisk shuts down and shuts down the loggin gsubsystem, any
messages currently in flight will not get logged. This patch prevents the
loop writing messages from breaking out prematurely, such that all of the
messages are logged.

(closes issue ASTERISK-21716)
Reported by: Corey Farrell
patches:
  logger-process-all-messages.patch uploaded by Corey Farrell (license 5909)
........

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

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

12 years agoFix several problems caused by multiple line usage with i2004 phones.
Igor Goncharovskiy [Fri, 24 May 2013 10:12:01 +0000 (10:12 +0000)] 
Fix several problems caused by multiple line usage with i2004 phones.
Reported by: Daniel Bohling, MihaiMircea

(closes issue ASTERISK-21061)
(closes issue ASTERISK-21120)

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

12 years agoAdd doxygen.log to svn:ignore property.
Jason Parker [Mon, 20 May 2013 17:43:51 +0000 (17:43 +0000)] 
Add doxygen.log to svn:ignore property.
........

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

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

12 years agoFix for segfault in __ast_rwlock_destroy with DEBUG_THREADS
Kevin Harwell [Wed, 15 May 2013 15:57:25 +0000 (15:57 +0000)] 
Fix for segfault in __ast_rwlock_destroy with DEBUG_THREADS

If DEBUG_THREADS is enabled __ast_rwlock_destroy causes a segfault while trying
to access a possible NULL t->track object.  A NULL check has been added before
trying to access the memory.

(closes issue ASTERISK-21724)
Reported by: Corey Farrell
Fixed by: Corey Farrell
Patches:
ast_rwlock_destroy-segv.patch uploaded by Corey Farrell (license 5909)
........

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

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

12 years agoFix VM snapshot handling for combined INBOX.
Jason Parker [Wed, 15 May 2013 14:25:35 +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/11@388816 65c4cc65-6c06-0410-ace0-fbb531ad65f3

12 years agoUse srtp_shutdown when available
Kinsey Moore [Wed, 15 May 2013 12:39:55 +0000 (12:39 +0000)] 
Use srtp_shutdown when available

This allows the SRTP library to be shut down properly when the
functionality is offered by libsrtp.

Review: https://reviewboard.asterisk.org/r/2538/
(closes issue ASTERISK-21719)
........

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

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

12 years agoMake ao2 global objects not always use the debug version of the ao2_ref() calls.
Richard Mudgett [Tue, 14 May 2013 18:55:57 +0000 (18:55 +0000)] 
Make ao2 global objects not always use the debug version of the ao2_ref() calls.

The debug versions of ao2_ref() should only be used if REF_DEBUG is
enabled so nothing is written to /tmp/refs unexpectedly.

(closes issue ASTERISK-21785)
Reported by: abelbeck
Patches:
      jira_asterisk_21785_v11.patch (license #5621) patch uploaded by rmudgett
Tested by: abelbeck

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

12 years agoFix Missing CALL-ID When Logging Through Syslog
Michael L. Young [Mon, 13 May 2013 21:17:44 +0000 (21:17 +0000)] 
Fix Missing CALL-ID When Logging Through Syslog

The CALL-ID (ie [C-00000074]) is missing when logging to syslog.  This was just
an oversight when this feature was added.

* Add CALL-IDs when using syslog

(closes issue ASTERISK-21430)
Reported by: Nikola Ciprich
Tested by: Nikola Ciprich, Michael L. Young
Patches:
    asterisk-21430-syslog-callid_trunk.diff by Michael L. Young (license 5026)

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

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

12 years agoFix Crash Caused By One-way Audio With auto_* NAT Settings Fix
Michael L. Young [Mon, 13 May 2013 21:05:38 +0000 (21:05 +0000)] 
Fix Crash Caused By One-way Audio With auto_* NAT Settings Fix

The prior code committed, r385473, failed to take into consideration that not
all outgoing calls will be to a peer.  My fault.

This patch does the following:

* Check if there is a related peer involved.  If there is, check and set NAT
  settings according to the peer's settings.

* Fix a problem with realtime peers.  If the global setting has auto_force_rport
  set and we issued a "sip reload" while a peer is still registered, the peer's
  flags for NAT are reset to off.  When this happens, we were always setting the
  contact address of the peer to that of the full contact info that we had.

(closes issue ASTERISK-21374)
Reported by: jmls
Tested by: Michael L. Young
Patches:
   asterisk-21374-fix-crash-and-rt-peers.diff by Michael L. Young (license 5026)

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

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

12 years agoRevert r388529 for now
Kinsey Moore [Mon, 13 May 2013 20:35:28 +0000 (20:35 +0000)] 
Revert r388529 for now

Adding the cleanup function needs some deeper thought since it
apparently doesn't exist for all variants of libsrtp.
........

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

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

12 years agopbx: Fix lack of cleanup on macrolock and context_table
Jonathan Rose [Mon, 13 May 2013 19:24:59 +0000 (19:24 +0000)] 
pbx: Fix lack of cleanup on macrolock and context_table

(closes issue ASTERISK-21723)
Reported by: Corey Farrell
Patches:
    core-pbx-cleanup.patch uploaded by Correy Farrell (license 5909)
........

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

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

12 years agoClose libsrtp properly
Kinsey Moore [Mon, 13 May 2013 18:09:21 +0000 (18:09 +0000)] 
Close libsrtp properly

Ensure that libsrtp is shutdown properly when res_srtp is unloaded.

(closes issue ASTERISK-21719)
Reported by: Corey Farrell
Patches:
    res_srtp-library-shutdown.patch uploaded by Corey Farrell
........

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

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

12 years agoFix SendText AMI action to never return non-zero.
Richard Mudgett [Mon, 13 May 2013 14:26:57 +0000 (14:26 +0000)] 
Fix SendText AMI action to never return non-zero.

AMI actions must never return non-zero unless they intend to close the AMI
connection.  (Which is almost never.)

(closes issue ASTERISK-21779)
Reported by: Paul Goldbaum
........

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

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

12 years agoAllow mISDN to send PROGRESS messsage.
Richard Mudgett [Fri, 10 May 2013 22:11:12 +0000 (22:11 +0000)] 
Allow mISDN to send PROGRESS messsage.

* Made isdn_msg_parser.c build a progress message with the mandatory
progress indicator IE.  (The mISDNuser NT state machine rejected sending
the incomplete message.)

Note: The associated mISDN and mISDNuser patches respectively are viewable
here:
http://svnview.digium.com/svn/thirdparty?view=rev&rev=200
http://svnview.digium.com/svn/thirdparty?view=rev&rev=201

(closes issue AST-1153)
Reported by: Guenther Kelleter
Patches:
      progress-chan_misdn.diff (license #6372) patch uploaded by Guenther Kelleter
      progress-misdn.diff (license #6372) mISDN patch uploaded by Guenther Kelleter
      progress-misdnuser.diff (license #6372) mISDNuser patch uploaded by Guenther Kelleter
........

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

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

12 years agoAdd version.c to list of ignored files in the utils directory.
Richard Mudgett [Fri, 10 May 2013 21:49:27 +0000 (21:49 +0000)] 
Add version.c to list of ignored files in the utils directory.
........

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

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

12 years agoFix memory leak in pbx_dundi
Mark Michelson [Fri, 10 May 2013 20:41:44 +0000 (20:41 +0000)] 
Fix memory leak in pbx_dundi

pbx_dundi added an io context without removing
it. This caused a memory leak when the module was
unloaded.

(closes ASTERISK-21718)
Reported by Corey Farrell
Patches:
pbx_dundi-ast_io_remove.patch uploaded by Corey Farrell (License #5909)
........

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

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

12 years agoFix copy/paste error in one-touch-recording implementation.
Sean Bright [Fri, 10 May 2013 11:46:00 +0000 (11:46 +0000)] 
Fix copy/paste error in one-touch-recording implementation.

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

12 years agoFix The Payload Being Set On CN Packets And Do Not Set Marker Bit
Michael L. Young [Thu, 9 May 2013 04:10:27 +0000 (04:10 +0000)] 
Fix The Payload Being Set On CN Packets And Do Not Set Marker Bit

When we send out a CN packet (for instance, in the case of using rtpkeepalives),
we are not setting the payload code properly.  Also, we are setting the marker
bit when we shouldn't be according to RFC 3389, section 4.

AST_RTP_CN is not defined by AST_FORMAT codes.  Therefore, we should be using
ast_rtp_codecs_payload_code() rather than ast_rtp_codecs_payload_lookup().

11 and trunk already use the appropriate function.

* In 1.8, use ast_rtp_codecs_payload_code()

* Remove the setting of the marker bit

* Fix the debug message by incrementing the seqno after the debug message is set
  in order to display the correct seqno that was sent out

(closes issue ASTERISK-21246)
Reported by: Peter Katzmann
Tested by: Peter Katzmann, Michael L. Young
Patches:
    asterisk-21246-rtp-cng-payload-error_1.8_v2.diff
                                     uploaded by Michael L. Young (license 5026)

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

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

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

12 years agoFix Segfault In app_queue When "persistentmembers" Is Enabled And Using Realtime
Michael L. Young [Thu, 9 May 2013 03:30:49 +0000 (03:30 +0000)] 
Fix Segfault In app_queue When "persistentmembers" Is Enabled And Using Realtime

When the "ignorebusy" setting was deprecated, we added some code to allow us to
be compatible with older setups that are still using the "ignorebusy" setting
instead of "ringinuse".  We set a char *variable with the column name to use,
which helps the realtime functions to use the correct column in their SQL
queries.  When "persistentmembers" is enabled, we are not setting this variable
before the realtime functions were called to load members.  This results in the
variable being NULL and therefore causing a segfault when loading members during
the module's process of loading.

The solution was to move the code that sets that variable to be before these
realtime functions are called during the loading of the module.

(closes issue ASTERISK-21738)
Reported by: JoshE
Tested by: JoshE
Patches:
    asterisk-21738-rt-ringinuse-field-not-set.diff
                                     uploaded by Michael L. Young (license 5026)

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

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

12 years agochan_sip: NOTIFYs for BLF start queuing up and fail to be sent out after retries...
Alec L Davis [Wed, 8 May 2013 07:19:11 +0000 (07:19 +0000)] 
chan_sip: NOTIFYs for BLF start queuing up and fail to be sent out after retries fail

RFC6665 4.2.2: ... after a failed State NOTIFY transaction remove the subscription

The problem is that the State Notify requests rely on the 200OK reponse for pacing control
and to not confuse the notify susbsystem.
The issue is, the pendinginvite isn't cleared if a response isn't received,
thus further notify's are never sent.

The solution, follow RFC 6665 4.2.2's 'SHOULD' and remove the subscription after failure.

(closes issue ASTERISK-21677)

Reported by: Dan Martens
Tested by: Dan Martens, David Brillert, alecdavis
alecdavis (license 585)

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

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

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

12 years agoMinor fixups to Doxygen comments.
David M. Lee [Tue, 7 May 2013 18:29:30 +0000 (18:29 +0000)] 
Minor fixups to Doxygen comments.

The \example tags marks an entire file as an example, not a code snippet.

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

12 years agoMake SLA reload more paranoid.
Russell Bryant [Mon, 6 May 2013 15:55:27 +0000 (15:55 +0000)] 
Make SLA reload more paranoid.

Reload support was originally not included for SLA.  It was added later,
but in a fairly non-traditional way.  It basically sets a flag
indicating that a reload is pending, and then waits for a time where it
thinks everything SLA related is idle and unused, and *then* executes
the reload.  It does this because the reload process is destructive.  It
starts by throwing everything away and starting over.

There are a number of problems with this approach.  One of them is that
the check to see if anything in use was incomplete.  This patch makes it
more complete and thus less likely for a crash to occur during reload
processing.  However, this approach still has problems so some much more
significant reworking of this code will need to come in as a next step.

Patch credit and testing by CoreDial, LLC.
........

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

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

12 years agoUpdate utils Makefile to handle r387294
Matthew Jordan [Thu, 2 May 2013 17:15:04 +0000 (17:15 +0000)] 
Update utils Makefile to handle r387294

Alec's patch that added the Asterisk version to 'core show locks' angered the
items in utils, as they exist somewhat outside of the Asterisk build system.
Some day, this Makefile should get nuked from high orbit, but for now, include
version.c in its list of stuff to pile in.
........

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

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