Richard Mudgett [Fri, 7 Dec 2012 00:00:39 +0000 (00:00 +0000)]
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.
........
Merged revisions 377354 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 377355 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377356
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Russell Bryant [Thu, 6 Dec 2012 17:29:13 +0000 (17:29 +0000)]
Recorded merge of revisions 377340 from svn.asterisk.org/svn/asterisk/branches/11
........
Add CLI tab completion to 'acl show'.
The 'acl show' CLI command allows you to show the details about a specific
named ACL in acl.conf. This patch adds tab completion to the command.
Review: https://reviewboard.asterisk.org/r/2230/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377341
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Russell Bryant [Thu, 6 Dec 2012 15:13:37 +0000 (15:13 +0000)]
Minor code cleanup in named_acl.c.
This patch makes a few little cleanups to named_acl.c. A couple non-public
functions were made static and an opening brace for a function was moved to
its own line, per the coding guidelines.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377330
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Russell Bryant [Thu, 6 Dec 2012 15:06:47 +0000 (15:06 +0000)]
Add CLI tab completion to 'acl show'.
The 'acl show' CLI command allows you to show the details about a specific
named ACL in acl.conf. This patch adds tab completion to the command.
Review: https://reviewboard.asterisk.org/r/2230/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377329
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Thu, 6 Dec 2012 14:26:13 +0000 (14:26 +0000)]
Fix memory leak in 'manager show event' when command entered incorrectly
When the CLI command 'manager show event' was run incorrectly and its usage
instructions returned, a reference to the event container was leaked. This
would prevent the container from being reclaimed when Asterisk exits. We now
properly decrement the count on the ao2 object using the nifty RAII_VAR macro.
Thanks to Russell for helping me stumble on this, and Terry for writing that
ridiculously helpful macro.
........
Merged revisions 377319 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377324
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jonathan Rose [Wed, 5 Dec 2012 17:17:06 +0000 (17:17 +0000)]
res_srtp: Fix a crash caused by srtp_dealloc on an already dealloced session
When srtp_create fails, the session may be dealloced or just not alloced. At
the same time though, the session pointer might not be set to NULL in this
process and attempting to srtp_dealloc it again will cause a segfault. This
patch checks for failure of srtp_create and sets the session pointer to NULL
if it fails.
(closes issue ASTERISK-20499)
Reported by: tootai
Review: https://reviewboard.asterisk.org/r/2228/
........
Merged revisions 377256 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 377261 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 377262 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377263
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Joshua Colp [Wed, 5 Dec 2012 16:51:58 +0000 (16:51 +0000)]
Fix a SIP request memory leak with TLS connections.
During the TLS re-work in chan_sip some TLS specific code was moved
into a separate function. This function operates on a copy of the
incoming SIP request. This copy was never deinitialized causing a
memory leak for each request processed.
This function is now given a SIP request structure which it can use
to copy the incoming request into. This reduces the amount of memory
allocations done since the internal allocated components are reused
between packets and also ensures the SIP request structure is
deinitialized when the TLS connection is torn down.
(closes issue ASTERISK-20763)
Reported by: deti
........
Merged revisions 377257 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 377258 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 377259 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377260
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Wed, 5 Dec 2012 02:23:10 +0000 (02:23 +0000)]
Remove init_framer(). It no longer does anything.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377246
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Wed, 5 Dec 2012 02:20:57 +0000 (02:20 +0000)]
Fix registering core show codecs/codec CLI commands twice.
........
Merged revisions 377241 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 377244 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377245
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Wed, 5 Dec 2012 01:11:26 +0000 (01:11 +0000)]
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().
(closes issue ASTERISK-20655)
Reported by: Birger "WIMPy" Harzenetter
........
Merged revisions 377227 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 377228 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377229
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Tue, 4 Dec 2012 22:34:05 +0000 (22:34 +0000)]
confbridge: Update online XML documentation.
........
Merged revisions 377212 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 377213 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377214
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Russell Bryant [Tue, 4 Dec 2012 13:01:23 +0000 (13:01 +0000)]
Add libuuid to install_prereq for Fedora.
I ran this script and my build failed. pjproject requires this.
........
Merged revisions 377195 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377196
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Mon, 3 Dec 2012 23:00:08 +0000 (23:00 +0000)]
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
........
Merged revisions 377166 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 377167 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377168
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Mon, 3 Dec 2012 20:46:11 +0000 (20:46 +0000)]
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
........
Merged revisions 377136 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 377137 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377138
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Mon, 3 Dec 2012 19:33:06 +0000 (19:33 +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
........
Merged revisions 377106 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377107
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Mon, 3 Dec 2012 19:17:24 +0000 (19:17 +0000)]
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
........
Merged revisions 377074 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 377075 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377077
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Mon, 3 Dec 2012 18:45:18 +0000 (18:45 +0000)]
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
........
Merged revisions 377070 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 377071 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377072
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Mon, 3 Dec 2012 17:10:40 +0000 (17:10 +0000)]
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
........
Merged revisions 377038 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 377039 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377040
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Olle Johansson [Mon, 3 Dec 2012 16:45:49 +0000 (16:45 +0000)]
Formatting fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377035
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Joshua Colp [Mon, 3 Dec 2012 14:56:36 +0000 (14:56 +0000)]
Fix an RTP instance reference count leak in chan_motif.
When setting up an RTP instance the RTCP portion of the instance
keeps a reference to the instance itself. In order to release this
reference and stop RTCP the stop API call must be called before
destroying the instance.
(closes issue ASTERISK-20751)
Reported by: joshoa
........
Merged revisions 377021 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377022
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Olle Johansson [Mon, 3 Dec 2012 14:46:02 +0000 (14:46 +0000)]
Move functions to AFTER the block of forward declarations of functions.
It was a mess. The first part of chan_sip.c is constants, declarations, structures and stuff,
then forward declarations and then actual code. It's still a mess, but a bit less messy ;-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377018
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Olle Johansson [Mon, 3 Dec 2012 09:35:55 +0000 (09:35 +0000)]
Formatting changes
Found a large amount of missing {} in the code before patching in another branch
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376998
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Joshua Colp [Sat, 1 Dec 2012 00:47:42 +0000 (00:47 +0000)]
Tweak extension used for incoming calls received on Motif.
Based on feedback from numerous individuals this patch tweaks incoming calls
to first look for an extension with the name of the endpoint. If no such extension
exists the call will silently fall back to the "s" extension as it previously
did.
........
Merged revisions 376983 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376984
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Fri, 30 Nov 2012 21:38:01 +0000 (21:38 +0000)]
chan_misdn: Fix sending RELEASE_COMPLETE in response to SETUP.
Fix sending a RELEASE_COMPLETE in response to a SETUP if chan_misdn does
not have a B channel available to assign to the call.
(closes issue ABE-2869)
Reported by: Guenther Kelleter
Patches:
setup-reject_2.diff (license #6372) patch uploaded by Guenther Kelleter
Modified
........
Merged revision 376949 from https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier
........
Merged revisions 376950 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 376951 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 376952 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376953
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Sean Bright [Fri, 30 Nov 2012 17:08:41 +0000 (17:08 +0000)]
Minor spelling fix to the VOLUME documentation.
........
Merged revisions 376919 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 376920 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 376921 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376922
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Mark Michelson [Fri, 30 Nov 2012 16:56:53 +0000 (16:56 +0000)]
Fix potential crashes during SIP attended transfers.
The principal behind this patch is simple. During a transfer,
we manipulate channels that are owned by a separate thread than
the one we currently are running in, so it makes sense that we
need to grab a reference to the channels so that they cannot
disappear out from under us.
In the wild, crashes were sometimes seen when the transferring
party would hang up the call before the transfer target answered
the call. The most common place to see the crash occur was when
attempting to send a connected line update to the transferer
channel.
(closes issue ASTERISK-20226)
Reported by Jared Smith
Patches:
ASTERISK-20226.patch uploaded by Mark Michelson (License #5049)
Tested by: Jared Smith
........
Merged revisions 376901 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 376916 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 376917 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376918
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Thu, 29 Nov 2012 23:01:16 +0000 (23:01 +0000)]
chan_local: Fix local_pvt ref leak in local_devicestate().
Regression introduced by ASTERISK-20390 fix.
(closes issue ASTERISK-20769)
Reported by: rmudgett
Tested by: rmudgett
........
Merged revisions 376868 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 376869 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 376870 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376871
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Thu, 29 Nov 2012 22:34:24 +0000 (22:34 +0000)]
Fix compile error.
(issue ASTERISK-20724)
........
Merged revisions 376864 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 376865 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 376866 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376867
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Michael L. Young [Thu, 29 Nov 2012 21:58:41 +0000 (21:58 +0000)]
Improve Code Readability And Fix Setting natdetected Flag
For 1.8, 10, 11 and trunk we are are improving the code readability.
For 11 and trunk, auto nat detection was added. The natdetected flag was being
set to 1 when the host address in the VIA header did not specifiy a port. This
patch fixes this by setting the port on the temporary sock address used to
SIP_STANDARD_PORT in order for the sock address comparison to work properly.
(closes issue ASTERISK-20724)
Reported by: Michael L. Young
Patches:
asterisk-20724-set-port-v2.diff uploaded by Michael L. Young (license 5026)
Review: https://reviewboard.asterisk.org/r/2206/
........
Merged revisions 376834 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 376835 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 376836 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376837
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Thu, 29 Nov 2012 17:16:50 +0000 (17:16 +0000)]
Fixed ast_random's comment about locking.
The original comment was separated from the code at some point, and didn't
reflect the use of libc's other than glibc for Linux.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376821
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Pedro Kiefer [Thu, 29 Nov 2012 16:44:42 +0000 (16:44 +0000)]
Fix chan_sip websocket payload handling
Websocket by default doesn't return an ast_str for the payload received. When
converting it to an ast_str on chan_sip the last character was being omitted,
because ast_str functions expects that the given length includes the trailing
0x00. payload_len only has the actual string length without counting the
trailing zero.
For most cases this passed unnoticed as most of SIP messages ends with \r\n.
(closes issue ASTERISK-20745)
Reported by: Iñaki Baz Castillo
Review: https://reviewboard.asterisk.org/r/2219/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376820
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Thu, 29 Nov 2012 00:48:12 +0000 (00:48 +0000)]
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
........
Merged revisions 376789 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 376790 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376791
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Thu, 29 Nov 2012 00:07:55 +0000 (00:07 +0000)]
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
........
Merged revisions 376759 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 376760 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376761
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jonathan Rose [Wed, 28 Nov 2012 16:47:44 +0000 (16:47 +0000)]
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
........
Merged revisions 376726 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 376727 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376728
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Wed, 28 Nov 2012 00:13:10 +0000 (00:13 +0000)]
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
........
Merged revisions 376689 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 376690 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376691
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Tue, 27 Nov 2012 20:39:51 +0000 (20:39 +0000)]
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
........
Merged revisions 376658 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 376659 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376660
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Tue, 27 Nov 2012 17:54:25 +0000 (17:54 +0000)]
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
........
Merged revisions 376628 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 376629 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376630
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Fri, 23 Nov 2012 00:02:23 +0000 (00:02 +0000)]
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
........
Merged revisions 376587 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 376588 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376589
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Wed, 21 Nov 2012 18:33:16 +0000 (18:33 +0000)]
Add red-black tree container type to astobj2.
* Add red-black tree container type.
* Add CLI command "astobj2 container dump <name>"
* Added ao2_container_dump() so the container could be dumped by other
modules for debugging purposes.
* Changed ao2_container_stats() so it can be used by other modules like
ao2_container_check() for debugging purposes.
* Updated the unit tests to check red-black tree containers.
(closes issue ASTERISK-19970)
Reported by: rmudgett
Tested by: rmudgett
Review: https://reviewboard.asterisk.org/r/2110/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376575
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Tue, 20 Nov 2012 22:06:05 +0000 (22:06 +0000)]
Added missing newlines to websocket ast_logs.
Without these newlines, log messages just continue tacking onto the same
line, and do not flush immediately.
........
Merged revisions 376561 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376562
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Mark Michelson [Tue, 20 Nov 2012 19:09:37 +0000 (19:09 +0000)]
Add "Require: timer" to 200 OK responses when appropriate.
The method by which the Require header is added to 200 responses is
inspired by the method that Olle Johansson uses in his darjeeling-prack
branch.
(closes issue ASTERISK-20570)
Reported by Matt Jordan, at the behest of Olle Johansson
Review: https://reviewboard.asterisk.org/r/2172
........
Merged revisions 376521 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 376522 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 376550 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376551
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Alec L Davis [Tue, 20 Nov 2012 17:39:11 +0000 (17:39 +0000)]
Reduce CLI spam of "Extension Changed" device state messages.
Asterisk 11 follows RFC3265 that states that after every subscribe or resubscribe a notify should be sent.
Thus the console if filled continuously with the following after every subscribe;
== Extension Changed 8512[phones] new state IDLE for Notify User cisco1
In Asterisk 1.8 only changes would be sent. Thus only when a device state changed was anything emitted to the console.
fix:
Only print to console when device state isn't forced.
(closes issue ASTERISK-20706)
Reported by: alecdavis
Tested by: alecdavis
alecdavis (license 585)
........
Merged revisions 376540 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376541
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Walter Doekes [Mon, 19 Nov 2012 20:03:56 +0000 (20:03 +0000)]
Fix most leftover non-opaque ast_str uses.
Instead of calling str->str, one should use ast_str_buffer(str). Same
goes for str->used as ast_str_strlen(str) and str->len as
ast_str_size(str).
Review: https://reviewboard.asterisk.org/r/2198
........
Merged revisions 376469 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 376470 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 376471 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376472
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Mon, 19 Nov 2012 02:14:54 +0000 (02:14 +0000)]
Fix uninitialized in this function error
With some versions of gcc, n_buckets will be flagged as being uninitialized
before use. While its technically impossible (since the switch statement,
even without a default, accounts for all possibilities), we'll initialize the
variable to 0 anyway.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376457
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Sun, 18 Nov 2012 20:27:45 +0000 (20:27 +0000)]
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
........
Merged revisions 376431 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 376441 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376447
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Sun, 18 Nov 2012 14:31:32 +0000 (14:31 +0000)]
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.
........
Merged revisions 376414 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 376415 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376416
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Fri, 16 Nov 2012 00:15:30 +0000 (00:15 +0000)]
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
........
Merged revisions 376342 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 376343 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376345
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Fri, 16 Nov 2012 00:14:00 +0000 (00:14 +0000)]
Somehow I put in svn-1.6 merge information. Oops.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376344
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Fri, 16 Nov 2012 00:08:00 +0000 (00:08 +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
........
Merged revisions 376315 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 376339 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376341
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jonathan Rose [Thu, 15 Nov 2012 23:10:13 +0000 (23:10 +0000)]
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
........
Merged revisions 376308 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 376310 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376312
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Brent Eagles [Thu, 15 Nov 2012 14:35:01 +0000 (14:35 +0000)]
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 376217 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376291
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Rusty Newton [Thu, 15 Nov 2012 02:29:40 +0000 (02:29 +0000)]
Patch to play correct sound file when a voicemail's urgent status is removed
We were attempting to play "vm-urgent-removed", which didn't exist. Now we play "vm-marked-nonurgent" which exists
and is the correct sound file. Previous behavior was silence and a warning on the CLI.
(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
........
Merged revisions 376263 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 376264 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376282
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Wed, 14 Nov 2012 19:55:39 +0000 (19:55 +0000)]
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
........
Merged revisions 376233 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 376234 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376235
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jonathan Rose [Tue, 13 Nov 2012 19:42:13 +0000 (19:42 +0000)]
chan_sip: Add SubscribeContext field to SIPshowpeer AMI response
The new field is will show up within the response if the requested peer has a
subscribe context set.
(closes issue ASTERISK-20626)
Reported by: Jaco Kroon
Patches:
asterisk-sip-ami-SubscrContext.patch uploaded by jkroon (license 5671)
-with modifications by jrose to conform to style guidelines
Review: https://reviewboard.asterisk.org/r/2195/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376219
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Joshua Colp [Mon, 12 Nov 2012 20:46:51 +0000 (20:46 +0000)]
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
........
Merged revisions 376167 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 376168 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376169
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Michael L. Young [Mon, 12 Nov 2012 20:18:47 +0000 (20:18 +0000)]
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
........
Merged revisions 376143 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 376144 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376148
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Joshua Colp [Sun, 11 Nov 2012 17:15:47 +0000 (17:15 +0000)]
Remove a fixed size limitation for producing SDP and change how ICE support is disabled by default.
With ICE support enabled in chan_sip and a large number of interfaces on the system it was
possible for the produced SDP to be truncated due to some fixed size buffers. These buffers
have now been changed so they will dynamically grow as needed.
ICE support is now also enabled by default in res_rtp_asterisk to provide a smoother experience
for chan_motif users where it is required. To maintain the previous behavior in chan_sip it is
no longer enabled by default there.
(closes issue ASTERISK-20643)
Reported by: coopvr
........
Merged revisions 376130 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376131
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Mark Michelson [Thu, 8 Nov 2012 22:10:29 +0000 (22:10 +0000)]
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
........
Merged revisions 376088 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 376089 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376092
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Thu, 8 Nov 2012 21:12:35 +0000 (21:12 +0000)]
chan_dahdi/SS7: Made reject incoming call for an in-alarm or blocked channel.
If a SS7 call comes in requesting a CIC that is in-alarm, the call is
accepted and connects if the extension exists in the dialplan. The call
does not have any audio.
* Made release the call immediately with circuit congestion cause.
(closes issue ASTERISK-20204)
Reported by: Tuan Le
Patches:
jira_asterisk_20204_v1.8.patch (license #5621) patch uploaded by rmudgett
........
Merged revisions 376058 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 376059 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 376060 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376061
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Thu, 8 Nov 2012 17:38:31 +0000 (17:38 +0000)]
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
........
Merged revisions 376030 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 376048 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376049
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Mark Michelson [Wed, 7 Nov 2012 19:15:26 +0000 (19:15 +0000)]
Multiple revisions 375993-375994
........
r375993 | mmichelson | 2012-11-07 11:01:13 -0600 (Wed, 07 Nov 2012) | 30 lines
Fix misuses of timeouts throughout the code.
Prior to this change, a common method for determining if a timeout
was reached was to call a function such as ast_waitfor_n() and inspect
the out parameter that told how many milliseconds were left, then use
that as the input to ast_waitfor_n() on the next go-around.
The problem with this is that in some cases, submillisecond timeouts
can occur, resulting in the out parameter not decreasing any. When this
happens thousands of times, the result is that the timeout takes much
longer than intended to be reached. As an example, I had a situation where
a 3 second timeout took multiple days to finally end since most wakeups
from ast_waitfor_n() were under a millisecond.
This patch seeks to fix this pattern throughout the code. Now we log the
time when an operation began and find the difference in wall clock time
between now and when the event started. This means that sub-millisecond timeouts
now cannot play havoc when trying to determine if something has timed out.
Part of this fix also includes changing the function ast_waitfor() so that it
is possible for it to return less than zero when a negative timeout is given
to it. This makes it actually possible to detect errors in ast_waitfor() when
there is no timeout.
(closes issue ASTERISK-20414)
reported by David M. Lee
Review: https://reviewboard.asterisk.org/r/2135/
........
r375994 | mmichelson | 2012-11-07 11:08:44 -0600 (Wed, 07 Nov 2012) | 3 lines
Remove some debugging that accidentally made it in the last commit.
........
Merged revisions 375993-375994 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 375995 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 376014 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376015
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Tue, 6 Nov 2012 19:05:11 +0000 (19:05 +0000)]
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
........
Merged revisions 375965 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 375966 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375967
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Joshua Colp [Tue, 6 Nov 2012 12:15:31 +0000 (12:15 +0000)]
Fix a bug where our Motif ICE candidates were not quite proper, and make us more forgiving.
An issue was reported on the mailing list where calling would result in an "Incomplete
ICE-UDP candidate received on session" error message. This is the result of the ICE-UDP
candidate code not placing a "network" attribute within the candidates. This is now done.
To increase compatibility though I have removed the requirement for the "network" attribute
to exist within ICE-UDP candidates that are received since we don't actually require the
value.
Reported on the mailing list by Jean-Denis Girard.
........
Merged revisions 375925 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375926
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Mon, 5 Nov 2012 23:10:14 +0000 (23:10 +0000)]
Refactor ast_timer_ack to return an error and handle the error in timer users
Currently, if an acknowledgement of a timer fails Asterisk will not realize
that a serious error occurred and will continue attempting to use the timer's
file descriptor. This can lead to situations where errors stream to the
CLI/log file. This consumes significant resources, masks the actual problem
that occurred (whatever caused the timer to fail in the first place), and
can leave channels in odd states.
This patch propagates the errors in the timing resource modules up through
the timer core, and makes users of these timers handle acknowledgement
failures. It also adds some defensive coding around the use of timers
to prevent using bad file descriptors in off nominal code paths.
Note that the patch created by the issue reporter was modified slightly for
this commit and backported to 1.8, as it was originally written for
Asterisk 10.
Review: https://reviewboard.asterisk.org/r/2178/
(issue ASTERISK-20032)
Reported by: Jeremiah Gowdy
patches:
jgowdy-timerfd-6-22-2012.diff uploaded by Jeremiah Gowdy (license 6358)
........
Merged revisions 375893 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 375894 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 375895 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375896
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Mon, 5 Nov 2012 21:42:49 +0000 (21:42 +0000)]
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
........
Merged revisions 375863 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 375864 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375865
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jonathan Rose [Mon, 5 Nov 2012 18:00:39 +0000 (18:00 +0000)]
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/
........
Merged revisions 375846 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 375847 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375848
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Sun, 4 Nov 2012 03:10:21 +0000 (03:10 +0000)]
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
........
Merged revisions 375801 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 375802 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375803
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Sun, 4 Nov 2012 02:44:35 +0000 (02:44 +0000)]
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)
........
Merged revisions 375797 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 375798 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375799
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Sun, 4 Nov 2012 02:38:19 +0000 (02:38 +0000)]
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
........
Merged revisions 375794 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 375795 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375796
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Sun, 4 Nov 2012 01:19:43 +0000 (01:19 +0000)]
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)
........
Merged revisions 375761 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 375763 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375770
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Sun, 4 Nov 2012 00:48:24 +0000 (00:48 +0000)]
Fix memory leaks in XML documentation
This patch fixes two memory leaks:
1) When building XML documentation items, the 'name' attribute was extracted
from XML elements but not properly freed after being copied into the item
being built.
2) When unloading XML documentation, the doctree container objects were not
properly freed.
This patch corrects these memory leaks. Note that this patch was modified
slightly for this commmit, as the case where the 'name' attribute doesn't
exist also wasn't handled in the item construction. This patch also checks
for that attribute not existing.
(closes issue ASTERISK-20648)
Reported by: Corey Farrell
Tested by: mjordan
patches:
xmldoc-memory_leak.patch uploaded by Corey Farrell (license 5909)
........
Merged revisions 375756 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375757
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Sun, 4 Nov 2012 00:02:06 +0000 (00:02 +0000)]
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
........
Merged revisions 375728 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 375729 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375730
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Andrew Latham [Sat, 3 Nov 2012 03:21:44 +0000 (03:21 +0000)]
Blocked revisions 375702
........
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
........
Merged revisions 375699 from http://svn.asterisk.org/svn/asterisk/branches/10
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375717
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Damien Wedhorn [Fri, 2 Nov 2012 21:03:56 +0000 (21:03 +0000)]
Fix for chan_skinny leaving RTP ports open
Skinny wasn't closing RTP sockets. This patch includes ast_rtp_instance_stop before
ast_rtp_instance_destroy which fixes the problem. Also add destroy for VRTP (which
I believe is unused, but exists).
Review: https://reviewboard.asterisk.org/r/2176/
........
Merged revisions 375660 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375663
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Fri, 2 Nov 2012 21:01:33 +0000 (21:01 +0000)]
Things don't need to be that const.
........
Merged revisions 375658 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 375659 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 375661 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375662
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Fri, 2 Nov 2012 18:46:58 +0000 (18:46 +0000)]
Multiple revisions 375519-375524
........
r375519 | rmudgett | 2012-10-30 16:06:15 -0500 (Tue, 30 Oct 2012) | 11 lines
chan_misdn: Timer primitives must be handled first.
The frm->addr is a different "address space" than the stack/instance
address of other Lx primitives. The test for B channel instance address
could fail.
Patches:
patch01_timers.diff (license #6372) patch uploaded by Guenther Kelleter
JIRA ABE-2888
........
r375520 | rmudgett | 2012-10-30 16:14:58 -0500 (Tue, 30 Oct 2012) | 10 lines
chan_misdn: Free memory in error paths and other memory leaks.
The one line commented with BUG is not easily fixable because there is no
de-init function one can call.
Patches:
patch02_memory.diff (license #6372) patch uploaded by Guenther Kelleter
JIRA ABE-2888
........
r375521 | rmudgett | 2012-10-30 16:38:41 -0500 (Tue, 30 Oct 2012) | 14 lines
chan_misdn: ISDN NT L2 de-establish/establish
* An NT-PTMP cannot de/establish L2 since it doesn't know the TEIs.
* On NT-PTP L2 is started when L1 is finally active in handle_l1.
* L2 deactivation logging cleanup.
* L2 aggregate link status is unknown for NT-PTMP, show as "UNKN".
* Removed unused functions and code for L2 handling.
Patches:
patch03_L2estab.diff (license #6372) patch uploaded by Guenther Kelleter
Modified
JIRA ABE-2888
........
r375522 | rmudgett | 2012-10-30 16:56:14 -0500 (Tue, 30 Oct 2012) | 22 lines
chan_misdn: Fix broken upper_id/lower_id usage.
Sending PH prim via lower_id layer (3 or 1) simply does not work. For TE
(3) it returns an error (len=-6) which is not evaluated by handle_l1(), so
the L1 layer status ends up wrong. Instead PH must be sent via L4, only
then does it reach L1 without an error message.
And NT PH prims only reach L1 when they are sent to layer 2 id.
--> use upper_id to send PH primitives.
* Check for errors in PH_(DE)ACTIVATE | CONFIRM.
* Debug messages are improved.
* The lower_id is now not used for anything, except: Why is lower_id layer
deleted when it wasn't created? I removed this code since it looks very
wrong.
Patches:
patch04_l1activation.diff (license #6372) patch uploaded by Guenther Kelleter
JIRA ABE-2888
........
r375523 | rmudgett | 2012-10-30 17:29:15 -0500 (Tue, 30 Oct 2012) | 31 lines
chan_misdn: Fix loss of B channels if L1 is down.
If you make 2 calls out an NT PTMP port which is not connected to any
phone, the B channel associated with that call becomes unusable until
Asterisk is restarted.
The problem is the EVENT_SETUP is queued when L1 is not up in
misdn_lib_send_event(). If L1 cannot be activated the event won't be
dequeued. It gets even worse when the call is hung up. The queued
EVENT_SETUP will be overwritten by an EVENT_DISCONNECT. The reserved B
channel then will never be freed. If later someone connects a phone to
the port, L1 will eventually activate and the queued EVENT_DISCONNECT is
sent down the stack. However, it is ignored because it is the wrong call
state.
The real fix would be that activation and queueing for a new SETUP is done
by the NT stack. But since it doesn't, the workaround must be removed
because it doesn't always work.
Fix: The event is no longer queued but immediately sent to the stack. If
L1 cannot be activated, the L3 state machine that was started by the
EVENT_SETUP will do its work, i.e. a timeout will release the B channel
properly. The SETUP possibly cannot be sent the first time but is resent
by T303 in case L1 could be activated.
Patches:
patch05_bchan-loss.diff (license #6372) patch uploaded by Guenther Kelleter
Modified
JIRA ABE-2888
........
r375524 | rmudgett | 2012-10-30 18:26:05 -0500 (Tue, 30 Oct 2012) | 13 lines
chan_misdn: Remove some calls to exit().
Try proper cleanup when something goes wrong in misdn_lib_init().
Especially do not call exit()!
* Fix memory leak because stack_destroy() does not free the stack struct.
Patches:
patch06_cleanup-init.diff (license #6372) patch uploaded by Guenther Kelleter
Modified
JIRA ABE-2888
........
Merged revisions 375519-375524 from https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier
........
Merged revisions 375625 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 375626 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 375627 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375628
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Michael L. Young [Fri, 2 Nov 2012 17:27:24 +0000 (17:27 +0000)]
Fix Wrong Result In Debug Message For SDP Origin Processing
While looking at some debug logs, I noticed that it was being reported that the
SDP origin line was unsupported or failed. Upon looking into this on my local
machine, I found that I too was getting this debug message yet everything seemed
to be getting processed properly. What was discovered is, that, the variable to
determine what is displayed in the debug message for the SDP line that was
processed, was not being set for the origin line when the result was successful.
This patch fixes this and was tested on local machine.
........
Merged revisions 375594 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 375601 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 375613 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375614
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jonathan Rose [Thu, 1 Nov 2012 15:03:04 +0000 (15:03 +0000)]
chan_sip: Fix a bug causing SIP reloads to remove all entries from the registry
A regression was introduced in chan_sip by changes to sip reload introduced by
r349097. That patch moved peer purging from the beginning of the reload to
after the general configuration was finished. This patch fixes that by undoing
the repositioning of the original peer purging code and using a similar
function after performing general configuration that purges only autocreated
peers that were created when persist mode isn't enabled.
(closes issue ASTERISK-20611)
Reported by: Alisher
Review: https://reviewboard.asterisk.org/r/2171/
........
Merged revisions 375575 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375576
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Joshua Colp [Wed, 31 Oct 2012 18:01:09 +0000 (18:01 +0000)]
Fix an issue with res_http_websocket where the chan_sip WebSocket handler could not be registered.
On some systems the optional API support uses the GCC compiler attribute "weakref" to provide its
functionality. This code changes the function names and prefixes "__" to the front. The
res_http_websocket exports file did not take this into account, thereby not allowing those functions
to be global and ultimately found.
(closes issue ASTERISK-20631)
Reported by: danjenkins
........
Merged revisions 375559 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375560
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Wed, 31 Oct 2012 14:58:44 +0000 (14:58 +0000)]
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
........
Merged revisions 375531 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 375532 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375533
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Tue, 30 Oct 2012 19:31:02 +0000 (19:31 +0000)]
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.
........
Merged revisions 375496 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 375506 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375511
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jonathan Rose [Tue, 30 Oct 2012 19:20:33 +0000 (19:20 +0000)]
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
........
Merged revisions 375485 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 375486 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375498
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jonathan Rose [Tue, 30 Oct 2012 15:10:38 +0000 (15:10 +0000)]
confbridge: Fix a bug which made conferences not record with AMI/CLI commands
When confbridge was changed to handle conference status with a state machine in
r374658. The function responsible for starting recording for a conference was
refactored with the function actually responsible for launching the recording
thread being split into a function with another name. The old function name was
still used for manually started recordings through AMI or CLI. This patch fixes
that by switching which function is used to start recording the conference.
(closes issue ASTERISK-20601)
Reported by: Vilius
Patches:
confbridge_mixmonitor.diff uploaded by Jonathan Rose (license 6182)
........
Merged revisions 375470 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 375471 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375472
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Mark Michelson [Mon, 29 Oct 2012 21:38:40 +0000 (21:38 +0000)]
Prevent resetting of NATted realtime peer address on reload.
If a "sip reload" is issued for a SIP peer, then his
IP address will be cleared, thus resulting in forgetting the
public IP address. Asterisk will then attempt to route SIP
traffic to the private IP address.
The fix here is to make "sip reload" ignore realtime peers
when "host = dynamic" is spotted. Realtime peers can now only
have their IP address reset if they have gone from being not
dynamic to being dynamic.
(closes issue ASTERISK-18203)
reported by daren ferreira
(closes issue ASTERISK-20572)
reported by JoshE
Patches:
fix_nat_realtime.diff uploaded by JoshE (license #6075)
........
Merged revisions 375415 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 375417 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 375437 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375443
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Mark Michelson [Mon, 29 Oct 2012 21:27:09 +0000 (21:27 +0000)]
Make evaluation of channel variables consistently case-sensitive.
Due to inconsistencies in how variable names were evaluated, the
decision was made to make all evaluations case-sensitive. See the
UPGRADE.txt file or https://wiki.asterisk.org/wiki/display/AST/Case+Sensitivity
for more details.
(closes issue ASTERISK-20163)
reported by Matt Jordan
Review: https://reviewboard.asterisk.org/r/2160
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375442
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Mon, 29 Oct 2012 21:02:20 +0000 (21:02 +0000)]
Ensure that CDRs for a caller in a Queue that is not answered is NO ANSWER.
When a caller enters a queue and no queue member answers the call, the current
behaviour can be a little odd depending on the paused status of the queue
members. If any queue member is paused, but not all, the CDR disposition
will be BUSY. If all queue members are paused, then the CDR disposition is
based instead on the disposition of the call prior to entering the Queue.
This patch modifies the behaviour in the following ways:
* If no queue members are paused, the CDR disposition is whatever the
disposition was prior to going into Queue. If the call was answered this
will be ANSWERED; otherwise, it is NO ANSWER.
* If some queue members are pused, the CDR result is NO ANSWER. (This is a
change in behaviour, as the result would previously have been BUSY)
* If all queue members are paused, the CDR result is whatever the result was
prior to going into Queue. This is the same as the behaviour prior to this
patch.
* If the caller hangs up, times out, or presses '*' with the 'h' option, the
CDR disposition is again not set and is dependent on whether or not the
caller was Answered prior to entering Queue.
This patch was based on one provided by Thomas Arimont, but has been modified
to accomodate findings by the reviewers.
Review: https://reviewboard.asterisk.org/r/2064/
(closes issue AST-906)
Reported by: Thomas Arimont
(closes issue ASTERISK-17776)
Reported by: Attila Megyeri
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375416
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Mon, 29 Oct 2012 19:31:36 +0000 (19:31 +0000)]
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
........
Merged revisions 375389 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 375390 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375391
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Mon, 29 Oct 2012 15:56:13 +0000 (15:56 +0000)]
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
........
Merged revisions 375362 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 375363 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375364
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jonathan Rose [Tue, 23 Oct 2012 16:22:44 +0000 (16:22 +0000)]
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
........
Merged revisions 375326 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 375327 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375328
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jonathan Rose [Mon, 22 Oct 2012 20:19:51 +0000 (20:19 +0000)]
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
........
Merged revisions 375300 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 375301 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375311
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jonathan Rose [Mon, 22 Oct 2012 17:31:20 +0000 (17:31 +0000)]
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
........
Merged revisions 375273 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 375288 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375291
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jonathan Rose [Thu, 18 Oct 2012 21:49:24 +0000 (21:49 +0000)]
app_queue: add upgrade notes for 375216
Adds UPGRADE 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/trunk@375249
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jonathan Rose [Thu, 18 Oct 2012 21:47:46 +0000 (21:47 +0000)]
Blocked revisions 375247
........
pp_queue: add upgrade notes for 375216
Adds UPGRADE 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/trunk@375248
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jonathan Rose [Thu, 18 Oct 2012 21:25:22 +0000 (21:25 +0000)]
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
........
Merged revisions 375217 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 375219 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375240
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Michael L. Young [Thu, 18 Oct 2012 20:31:05 +0000 (20:31 +0000)]
Fix XML Document Validation Failure
Fix documentation error when validating the xml in trunk caused by r375150.
Moved the description end tag down to below the variablelist element end tag.
Found when compiling with --dev-mode-enabled.
(issue ASTERISK-20289)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375215
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Thu, 18 Oct 2012 20:13:17 +0000 (20:13 +0000)]
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
........
Merged revisions 375190 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 375191 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375192
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Andrew Latham [Thu, 18 Oct 2012 14:17:40 +0000 (14:17 +0000)]
Doxygen Updates - Title update
Update and extend the configuration_file group and enable linking. Commit other cleanups from multi-version Doxygen testing. Update title that was left behind many years ago.
(issue ASTERISK-20259)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375182
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jonathan Rose [Wed, 17 Oct 2012 20:34:40 +0000 (20:34 +0000)]
manager: remove curses dependent stuff from r375103
Upon further examination, this code was causing compliation problems on
CentOS at the least (possibly on any machine without curses) and also
the local value of COLS is used even with a remote console, so it is
less than ideal.
(issue ASTERISK-20396)
Reported by: Johan Wilfer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375175
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Pedro Kiefer [Wed, 17 Oct 2012 19:02:46 +0000 (19:02 +0000)]
Adds new formats to app_alarmreceiver, ALAW calls support and enhanced protection.
Commiting this on behalf of Kaloyan Kovachev (license 5506).
AlarmReceiver now supports the following DTMF signaling types:
- ContactId
- 4x1
- 4x2
- High Speed
- Super Fast
We are also auto-detecting which signaling is being received. So support for
those protocols should work out-the-box. Correctly identify ALAW / ULAW calls.
Some enhanced protection for broken panels and malicious callers where added.
(closes issue ASTERISK-20289)
Reported by: Kaloyan Kovachev
Review: https://reviewboard.asterisk.org/r/2088/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375150
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kinsey Moore [Wed, 17 Oct 2012 19:01:27 +0000 (19:01 +0000)]
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)
Reported by: kmoore
Review: https://reviewboard.asterisk.org/r/2163/
........
Merged revisions 375146 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 375147 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 375148 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375149
65c4cc65-6c06-0410-ace0-
fbb531ad65f3