Mark Michelson [Fri, 13 Sep 2013 14:50:38 +0000 (14:50 +0000)]
Create more accurate Contact headers for dialogs when we are the UAS.
(closes issue AST-1207)
reported by John Bigelow
Review: https://reviewboard.asterisk.org/r/2842
........
Merged revisions 399083 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399084
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Mark Michelson [Fri, 13 Sep 2013 14:44:43 +0000 (14:44 +0000)]
Change how realms are handled for outbound authentication.
With this change, if no realm is specified in an outbound auth
section, then we will simply match the realm that was present
in the 401/407 challenge.
(closes issue ASTERISK-22471)
Reported by George Joseph
(closes issue ASTERISK-22386)
Reported by Rusty Newton
Patches:
outbound_auth_realm_v4.patch uploaded by George Joseph (License #6322)
........
Merged revisions 399059 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399082
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Fri, 13 Sep 2013 14:43:56 +0000 (14:43 +0000)]
Recorded merge of revisions 399035,399049 from svn.asterisk.org/svn/asterisk/branches/12
These were lost in r399071
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399081
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Fri, 13 Sep 2013 14:34:43 +0000 (14:34 +0000)]
Put merge tracking for r399039 back.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399080
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Rusty Newton [Fri, 13 Sep 2013 14:27:54 +0000 (14:27 +0000)]
Broke the build! Forgot para tags within my description.
https://bamboo.asterisk.org/bamboo/browse/AST-ATRUNKBUILD-304
........
Merged revisions 399064 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399071
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Fri, 13 Sep 2013 14:22:07 +0000 (14:22 +0000)]
res_pjsip: Forward PJSIP logging to Asterisk logging
This patch uses PJSIP's pj_log_set_log_func() to forward PJSIP's log
messages to Asterisk's logger. This is done in a new module:
res_pjsip_log_forwarder.so.
This patch sets defaultenabled on the existing res_pjsip_logger.so to
no, since logging every SIP packet seems a bit odd to do by default, and
is (hopefully) less necessary with regular PJSIP logging.
It also removes res_rtp_asterisk's disabling of PJSIP logging.
(closes issue ASTERISK-22360)
Reported by: Joshua Colp
Review: https://reviewboard.asterisk.org/r/2830/
........
Merged revisions 399049 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399051
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Fri, 13 Sep 2013 14:19:19 +0000 (14:19 +0000)]
ARI: Fix WebSocket response when subprotocol isn't specified
When I moved the ARI WebSocket from /ws to /ari/events, I added code to
allow a WebSocket to connect without specifying the subprotocol if
there's only one subprotocol handler registered for the WebSocket.
Naively, I coded it to always respond with the subprotocol in use.
Unfortunately, according to RFC 6455, if the server's response includes
a subprotocol header field that "indicates the use of a subprotocol that
was not present in the client's handshake [...], the client MUST _Fail
the WebSocket Connection_.", emphasis theirs.
This patch correctly omits the Sec-WebSocket-Protocol if one is not
specified by the client.
(closes issue ASTERISK-22441)
Review: https://reviewboard.asterisk.org/r/2828/
........
Merged revisions 399039 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399042
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kinsey Moore [Fri, 13 Sep 2013 14:17:15 +0000 (14:17 +0000)]
Fix several crashes in MeetMeAdmin
This change ensures that MeetMeAdmin commands requiring a user actually
get a user and fixes another issue where an extra dereference could
occur for a last-entered user being ejected if a user identifier was
also provided.
(closes issue ASTERISK-21907)
Reported by: Alex Epshteyn
Review: https://reviewboard.asterisk.org/r/2844/
........
Merged revisions 399033 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 399034 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 399035 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399036
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Rusty Newton [Fri, 13 Sep 2013 13:28:26 +0000 (13:28 +0000)]
'identify' configObject doesn't have a synopsis
Add a straightforward synopsis and description to the identify config object
in XML documentation.
(issue ASTERISK-22311)
(closes issue ASTERISK-22311)
Reported By: Rusty Newton
........
Merged revisions 399031 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399032
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Thu, 12 Sep 2013 23:42:23 +0000 (23:42 +0000)]
CLI bridge: Fix "bridge destroy <id>" and "bridge kick <id> <chan>" tab completion.
These two commands must deal with the live bridges container for tab
completion and not the stasis cache.
........
Merged revisions 399021 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399022
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Thu, 12 Sep 2013 23:36:33 +0000 (23:36 +0000)]
astobj2: Register the bridges container for debug inspection.
........
Merged revisions 399019 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399020
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Rusty Newton [Thu, 12 Sep 2013 23:23:12 +0000 (23:23 +0000)]
Documentation fix and improvements to XML configuration help res_pjsip_acl
* One bug fix. Made the synopsis for "type" to accurate.
* changing the usage of "IP-domains" to "IP addresses"
* clarifying the usage for the options, by adding a relevant description for
each
* modified other areas of the XML help for clarity, such as the module
description and a few synopsis changes here and there. See the patch.
(issue ASTERISK-22458)
(closes issue ASTERISK-22458)
Reported By: Rusty Newton
Review: https://reviewboard.asterisk.org/r/2823/
........
Merged revisions 399017 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399018
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jonathan Rose [Thu, 12 Sep 2013 20:27:56 +0000 (20:27 +0000)]
chan_sip: Revert r398835 due to failing tests involving originate
(issue ASTERISK-22424)
Reported by: Jonathan Rose
........
Merged revisions 398977 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 398986 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 398991 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399006
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Thu, 12 Sep 2013 16:44:34 +0000 (16:44 +0000)]
core_local: Fix memory corruption race condition.
The masquerade super test is failing on v12 with high fence violations and
crashing. The fence violations are showing that party id allocated memory
strings are somehow getting corrupted in the
bridge_reconfigured_connected_line_update() function. The invalid string
values happen to be the freed memory fill pattern.
After much puzzling, I deduced that the
bridge_reconfigured_connected_line_update() is copying a string out of the
source channel's caller party id struct just as another thread is updating
it with a new value. The copying thread is using the old string pointer
being freed by the updating thread. A search of the code found the
unreal_colp_redirect_indicate() routine updating the caller party id's
without holding the channel lock.
A latent bug in v1.8 and v11 hatched in v12 because of the bridging and
connected line changes. :)
(issue ASTERISK-22221)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2839/
........
Merged revisions 398938 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398939
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Thu, 12 Sep 2013 15:23:54 +0000 (15:23 +0000)]
Fix symbol collision with pjsua.
We shouldn't be exporting any symbols that start with pjsip_.
........
Merged revisions 398927 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398928
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Rusty Newton [Thu, 12 Sep 2013 00:04:57 +0000 (00:04 +0000)]
'queue add member' help text correction
You are adding dial strings to the queue, not channels. An aribitrary string
could be used, but you are typically referencing a channel. Correcting the
command help text.
(issue ASTERISK-22263)
(closes issue ASTERISK-22263)
Reported By: Rusty Newton
........
Merged revisions 398884 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 398885 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 398886 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398887
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Rusty Newton [Wed, 11 Sep 2013 23:52:49 +0000 (23:52 +0000)]
Documentation fix - waitfordialtone is not boolean, it's time in milliseconds
Changing text in chan_dahdi.conf sample to be accurate.
(issue ASTERISK-22308)
(closes issue ASTERISK-22308)
Reported By: Malcolm Davenport
........
Merged revisions 398880 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 398881 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 398882 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398883
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jonathan Rose [Wed, 11 Sep 2013 20:03:19 +0000 (20:03 +0000)]
chan_sip: Reject calls without prior SDP on 200 OK
If we receive a 200 OK without SDP, we will now check to see if
the remote address has been established for that channel's RTP
session and if the to tag for that channel has changed from
the most recent to tag in a response less than 200.
If either a change has been made since the last to-tag was
received or the remote address is unset, then we will drop
the call.
(closes issue ASTERISK-22424)
Reported by: Jonathan Rose
Review: https://reviewboard.asterisk.org/r/2827/diff/#index_header
........
Merged revisions 398835 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 398836 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 398837 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398838
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Russell Bryant [Wed, 11 Sep 2013 18:03:30 +0000 (18:03 +0000)]
Fix typo in confbridge.conf.sample
The denoise filter requires func_speex, not codec_speex. Fix this in the
description of the denoise=yes option in confbridge.conf.
........
Merged revisions 398820 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 398821 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398822
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kevin Harwell [Wed, 11 Sep 2013 14:23:28 +0000 (14:23 +0000)]
pjsip: reinvite for connected line updates occurs when it should not
Connected line updates are now only sent out if an actual update needs to occur.
This happens under the following conditions:
1. The endpoint we are sending to is trusted.
2. Either a P-Asserted-Identity or Remote Party-ID header needs to be added/sent.
3. The connected id's number and name are valid.
Also added an SDP when an update is sent out.
(closes issue AST-1212)
Reported by: John Bigelow
Review: https://reviewboard.asterisk.org/r/2831/
........
Merged revisions 398806 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398808
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Tue, 10 Sep 2013 18:05:47 +0000 (18:05 +0000)]
Fix incorrect usages of ast_realloc().
There are several locations in the code base where this is done:
buf = ast_realloc(buf, new_size);
This is going to leak the original buf contents if the realloc fails.
Review: https://reviewboard.asterisk.org/r/2832/
........
Merged revisions 398757 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 398758 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 398759 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398760
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Tue, 10 Sep 2013 17:50:13 +0000 (17:50 +0000)]
Fixed utils directory breakage from r398748, this time with extra hate.
........
Merged revisions 398752 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 398753 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 398754 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398755
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Tue, 10 Sep 2013 17:26:19 +0000 (17:26 +0000)]
Fixed utils directory breakage from r398648
........
Merged revisions 398748 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 398749 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 398750 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398751
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Mon, 9 Sep 2013 23:29:44 +0000 (23:29 +0000)]
MALLOC_DEBUG: Change fence magic number to be completely different from the freed magic number.
Race conditions between freeing a nul terminated string and
ast_strdup()'ing it are more likely to be detected if the fence and freed
magic numbers are completely different.
........
Merged revisions 398703 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 398721 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 398726 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398732
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Mark Michelson [Mon, 9 Sep 2013 22:00:44 +0000 (22:00 +0000)]
Add extra debugging to res_pjsip_endpoint_identifier_ip
........
Merged revisions 398694 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398695
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Mon, 9 Sep 2013 20:13:40 +0000 (20:13 +0000)]
Fix DEBUG_THREADS when lock is acquired in __constructor__
This patch fixes some long-standing bugs in debug threads that were
exacerbated with recent Optional API work in Asterisk 12.
With debug threads enabled, on some systems, there's a lock ordering
problem between our mutex and glibc's mutex protecting its module list
(Ubuntu Lucid, glibc 2.11.1 in this instance). In one thread, the module
list will be locked before acquiring our mutex. In another thread, our
mutex will be locked before locking the module list (which happens in
the depths of calling backtrace()).
This patch fixes this issue by moving backtrace() calls outside of
critical sections that have the mutex acquired. The bigger change was to
reentrancy tracking for ast_cond_{timed,}wait, which wrongly assumed
that waiting on the mutex was equivalent to a single unlock (it actually
suspends all recursive locks on the mutex).
(closes issue ASTERISK-22455)
Review: https://reviewboard.asterisk.org/r/2824/
........
Merged revisions 398648 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 398649 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 398651 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398652
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Mon, 9 Sep 2013 19:09:21 +0000 (19:09 +0000)]
Multiple revisions 398638-398639
........
r398638 | dlee | 2013-09-09 14:01:54 -0500 (Mon, 09 Sep 2013) | 1 line
Added note about expected behavior of originate
........
r398639 | dlee | 2013-09-09 14:02:27 -0500 (Mon, 09 Sep 2013) | 1 line
Added note about expected behavior of originate (the rest of the commit)
........
Merged revisions 398638-398639 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398641
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Mon, 9 Sep 2013 19:08:15 +0000 (19:08 +0000)]
Blocked revisions 398559,398578
........
Multiple revisions 398559,398578
........
r398559 | kmoore | 2013-09-06 14:32:03 -0500 (Fri, 06 Sep 2013) | 20 lines
Blocked revisions 398558
........
Fix Jabber/XMPP distributed MWI
The mailbox and context are swapped on the receiving end for all users
of Jabber and XMPP distributed MWI in Asterisk 1.8 and all more recent
versions. This swaps those values to be correct when publishing to the
internal event system from Jabber/XMPP distributed MWI state.
(closes issue ASTERISK-22435)
Reported by: abelbeck
Tested by: Michael Keuter
Patches:
asterisk-1.8-res_jabber-aji_handle_pubsub_event.patch uploaded by abelbeck
asterisk-11-res_xmpp-xmpp_pubsub_handle_event.patch uploaded by abelbeck
........
Merged revisions 398523 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
r398578 | kmoore | 2013-09-06 16:03:45 -0500 (Fri, 06 Sep 2013) | 1 line
Unblock r398558
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398640
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Sun, 8 Sep 2013 23:30:39 +0000 (23:30 +0000)]
Update CDR Unit tests to reflect container changes in r398579
When a channel joins a multi-party bridge, the ordering of the CDRs that is
created is determined by the ordering of the channels who happen to be in that
bridge. When r398579 changed the number of buckets in the container to
something sensible, it changed the ordering that the CDRs was created in,
causing one of the multiparty tests to fail. This fixes the test with the
now expected ordering.
........
Merged revisions 398628 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398629
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kinsey Moore [Sat, 7 Sep 2013 01:03:07 +0000 (01:03 +0000)]
Prevent XMPP timeout on blank responses
Sometimes the Google Voice servers have a bad habit of sending out 1
byte replies to the xmpp resource. When a blank 1 byte reply is
received from the socket the buffer attempts to wait (endlessly) for
the rest of the reply from google which effectively blocks the socket
and google voice calls will no longer come into the server.
This patch allows the xmpp module to correctly detect empty packets and
send out ping replies to google. It also sets a socket timeout on the
default socket which prevents the xmpp socket from closing and
preventing future google voice calls from coming into the server.
Furthermore instead of sending an empty reply back to google we send a
proper xmpp ping reply back. This also adds several more
socket messages.
(closes issue ASTERISK-22347)
Reported by: Andrew Nagy
Review: https://reviewboard.asterisk.org/r/2771
Patches:
xmpp_fix_1.diff uploaded by Andrew Nagy (License #6524)
........
Merged revisions 398618 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 398619 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398620
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kinsey Moore [Fri, 6 Sep 2013 21:23:02 +0000 (21:23 +0000)]
Multiple revisions 398558,398577
........
r398558 | kmoore | 2013-09-06 14:28:16 -0500 (Fri, 06 Sep 2013) | 17 lines
Fix Jabber/XMPP distributed MWI
The mailbox and context are swapped on the receiving end for all users
of Jabber and XMPP distributed MWI in Asterisk 1.8 and all more recent
versions. This swaps those values to be correct when publishing to the
internal event system from Jabber/XMPP distributed MWI state.
(closes issue ASTERISK-22435)
Reported by: abelbeck
Tested by: Michael Keuter
Patches:
asterisk-1.8-res_jabber-aji_handle_pubsub_event.patch uploaded by abelbeck
asterisk-11-res_xmpp-xmpp_pubsub_handle_event.patch uploaded by abelbeck
........
Merged revisions 398523 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
r398577 | kmoore | 2013-09-06 16:00:56 -0500 (Fri, 06 Sep 2013) | 10 lines
Commit the remainder of r398523
This is a missing part of the commit in revision 398523 that corrects
the name of a variable.
(issue ASTERISK-22435)
........
Merged revisions 398576 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 398558,398577 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 398580 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398603
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Fri, 6 Sep 2013 21:17:45 +0000 (21:17 +0000)]
cdr: Change the number of container buckets to be similar to the channels container.
* Fix the temporary cdr candidate containers to use a prime number of
buckets.
........
Merged revisions 398579 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398583
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Fri, 6 Sep 2013 20:21:21 +0000 (20:21 +0000)]
core_local: Fix LocalOptimizationBegin AMI event missing Source channel snapshot.
* Fix the LocalOptimizationBegin AMI event by eliminating an artificial
buffer size limitation that is too small anyway.
........
Merged revisions 398572 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398574
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Fri, 6 Sep 2013 20:03:01 +0000 (20:03 +0000)]
cdr: Fix some ref leaks.
* Added missing unregister of the cdr container in cdr_engine_shutdown().
* Fixed ref leak in off nominal path of cdr_object_alloc().
* Removed some unnecessary NULL checks in cdr_object_dtor().
........
Merged revisions 398562 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398564
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Fri, 6 Sep 2013 19:26:48 +0000 (19:26 +0000)]
astobj2: Add warn unused attribute to some functions.
* Fixed resulting warnings with improper use of ao2_global_obj_replace().
* Made a couple uses of ao2_global_obj_replace_unref(x, NULL) into the
equivalent and more appropriate ao2_global_obj_release() call.
........
Merged revisions 398533 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398557
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kinsey Moore [Fri, 6 Sep 2013 18:53:32 +0000 (18:53 +0000)]
Fix build warnings
When AST_DEVMODE is not defined, ast_asserts are not compiled into the
binary. In some cases, this means variables are not referenced or are
set but unused which causes warnings to show up.
(closes issue ASTERISK-22446)
Reported by: Jason Parker (qwell)
........
Merged revisions 398521 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398522
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kinsey Moore [Fri, 6 Sep 2013 16:01:05 +0000 (16:01 +0000)]
Fix chan_h323 compilation
This fixes the things in chan_h323 that were missed or ignored in the
great channel opaquification and gets chan_h323 back into a compiling
state.
(closes issue ASTERISK-22365)
Reported by: Dmitry Melekhov
Patches:
chan_h323.patch uploaded by Dmitry Melekhov
........
Merged revisions 398510 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 398511 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398512
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Thu, 5 Sep 2013 21:48:02 +0000 (21:48 +0000)]
astobj2: Only define ao2_bt() once.
* Make ao2_bt() not use single char variable names.
* Fix ao2_bt() formatting.
........
Merged revisions 398498 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398499
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Thu, 5 Sep 2013 19:18:10 +0000 (19:18 +0000)]
chan_iax2: Reduce indentation in __attempt_transmit().
* Reduce indentation in __attempt_transmit().
* Don't update the static last error time variable every time in
__schedule_action() and socket_read().
........
Merged revisions 398456 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 398457 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 398458 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398462
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Thu, 5 Sep 2013 17:31:29 +0000 (17:31 +0000)]
chan_iax2: Fix stray reference to worker thread idle_list.
* Fix stray reference to idle_list in cleanup_thread_list(). This may be
the reason for the note in iax2_process_thread() about threads not being
removed from the task lists.
* Move cleanup_thread_list(&idle_list) to after the other lists are
cleaned up.
........
Merged revisions 398416 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 398417 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 398418 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398419
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Thu, 5 Sep 2013 17:17:53 +0000 (17:17 +0000)]
chan_iax2: Fix bridgecallno deadlock avoidance.
* Fix bridgecallno deadlock avoidance. When doing deadlock avoidance, you
need to retest the status of values for each loop to see if you still need
the lock for bridgecallno.
* As a safety check, after acquiring the bridgecallno lock you should
check if iaxs[bridgecallno] is NULL just like the current callno checks.
* Move setting thread->iostate to IAX_IOSTATE_IDLE to after processing any
deferred frames to ensure that the iostate is IDLE when it is placed back
into the idle list. defer_full_frame() tries to ensure
iax2_process_thread() wakes up to process the frame.
........
Merged revisions 398379 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 398380 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 398381 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398384
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Mark Michelson [Thu, 5 Sep 2013 14:10:45 +0000 (14:10 +0000)]
Clarify server_uri and client_uri registration settings.
Used some of Rusty's suggested language plus also included
more SIPesque descriptions of where the URIs are actually
used in an outgoing REGISTER.
(closes issue ASTERISK-22390)
reported by Rusty Newton
........
Merged revisions 398368 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398369
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Wed, 4 Sep 2013 23:07:41 +0000 (23:07 +0000)]
chan_iax2: Add missing control frame names to debug frame decode output.
........
Merged revisions 398301 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 398302 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 398303 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398304
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Mark Michelson [Wed, 4 Sep 2013 22:49:25 +0000 (22:49 +0000)]
Give more detail regarding failures to create request with auth credentials.
(issue ASTERISK-22386)
........
Merged revisions 398299 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398300
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jonathan Rose [Wed, 4 Sep 2013 21:37:01 +0000 (21:37 +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)
........
Merged revisions 398285 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 398286 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398287
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jonathan Rose [Wed, 4 Sep 2013 21:20:02 +0000 (21:20 +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)
........
Merged revisions 398281 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 398283 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398284
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Wed, 4 Sep 2013 16:03:14 +0000 (16:03 +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
........
Merged revisions 398236 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 398237 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398238
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kevin Harwell [Wed, 4 Sep 2013 14:32:25 +0000 (14:32 +0000)]
Debug messages for pjsip outbound registration
Added debug messages indicating that an outbound registration attempt was made
and it was successful in pjsip.
(closes issue ASTERISK-22388)
Reported by: Rusty Newton
........
Merged revisions 398226 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398227
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Alexandr Anikin [Tue, 3 Sep 2013 20:28:01 +0000 (20:28 +0000)]
Fix remote tcs sequence handling on empty tcs received
........
Merged revisions 398214 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 398215 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398217
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kinsey Moore [Tue, 3 Sep 2013 18:09:02 +0000 (18:09 +0000)]
Prevent a crash in res_pjsip_dtmf_info.c
This change makes sure that a content type header exists before
checking the contents of the header against known SIP INFO DTMF content
types.
........
Merged revisions 398206 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398207
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Tue, 3 Sep 2013 17:19:30 +0000 (17:19 +0000)]
Fixed 'make clean' for wiki docs
........
Merged revisions 398198 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398205
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Walter Doekes [Tue, 3 Sep 2013 14:29:52 +0000 (14:29 +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
........
Merged revisions 398168 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 398196 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398197
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Fri, 30 Aug 2013 20:58:59 +0000 (20:58 +0000)]
Fix graceful shutdown crash.
The cleanup code for optional_api needs to happen after all of the optional
API users and providers have unused/unprovided. Unfortunately, regsitering the
atexit() handler at the beginning of main() isn't soon enough, since module
destructors run after that.
........
Merged revisions 398149 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398150
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Rusty Newton [Fri, 30 Aug 2013 20:37:54 +0000 (20:37 +0000)]
New pjsip.conf.sample
(issue ASTERISK-22145)
(closes issue ASTERISK-22145)
Reported By: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2811/
........
Merged revisions 398147 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398148
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kevin Harwell [Fri, 30 Aug 2013 19:55:56 +0000 (19:55 +0000)]
Add a reloadable option for sorcery type objects
Some configuration objects currently won't place nice if reloaded.
Specifically, in this case the pjsip transport objects. Now when
registering an object in sorcery one may specify that the object is
allowed to be reloaded or not. If the object is set to not reload
then upon reloading of the configuration the objects of that type
will not be reloaded. The initially loaded objects of that type
however will remain.
While the transport objects will not longer be reloaded it is still
possible for a user to configure an endpoint to an invalid transport.
A couple of log messages were added to help diagnose this problem if
it occurs.
(closes issue ASTERISK-22382)
Reported by: Rusty Newton
(closes issue ASTERISK-22384)
Reported by: Rusty Newton
Review: https://reviewboard.asterisk.org/r/2807/
........
Merged revisions 398139 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398140
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kevin Harwell [Fri, 30 Aug 2013 19:22:59 +0000 (19:22 +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-trunk.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
........
Merged revisions 398103 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 398116 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398124
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Fri, 30 Aug 2013 18:38:00 +0000 (18:38 +0000)]
Update UPGRADE.txt file for Asterisk 12
This simply pulls in the changes that were breaking from the CHANGES file
and updates a few other areas accordingly. It also removes the 10 => 11
notes, which are traditionally removed from each major version and stored
in the appropriate UPGRADE-X.txt file.
........
Merged revisions 398100 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398101
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jonathan Rose [Fri, 30 Aug 2013 18:30:01 +0000 (18:30 +0000)]
features_config: Ignore parkinglots in features.conf instead of failing to load
Parkinglots are defined in res_features.conf now, but this patch fixes
features_config so that features don't fail to load when parkinglots
are present in features.conf
Review: https://reviewboard.asterisk.org/r/2801/
........
Merged revisions 398068 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398099
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jonathan Rose [Fri, 30 Aug 2013 18:04:41 +0000 (18:04 +0000)]
features_config: Don't require features.conf to be present for Asterisk to load
(closes issue ASTERISK-22426)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2806/
........
Merged revisions 398020 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398064
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kevin Harwell [Fri, 30 Aug 2013 17:59:06 +0000 (17:59 +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-12.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
........
Merged revisions 398061 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 398062 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398063
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Fri, 30 Aug 2013 17:11:06 +0000 (17:11 +0000)]
test_substitution: Fix failing test.
Revert the -r392190 change. The original test was correct. The CDR code
was actually returning an unititialized buffer.
........
Merged revisions 398025 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398026
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Fri, 30 Aug 2013 17:03:09 +0000 (17:03 +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
........
Merged revisions 398019 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 398023 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398024
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kevin Harwell [Fri, 30 Aug 2013 16:27:57 +0000 (16:27 +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
........
Merged revisions 398011 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 398016 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398017
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kevin Harwell [Fri, 30 Aug 2013 15:39:09 +0000 (15:39 +0000)]
Check return value on fwrite
........
Merged revisions 398000 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 398002 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398003
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Fri, 30 Aug 2013 13:40:27 +0000 (13:40 +0000)]
optional_api: Fix linking problems between modules that export global symbols
With the new work in Asterisk 12, there are some uses of the
optional_api that are prone to failure. The details are rather involved,
and captured on [the wiki][1].
This patch addresses the issue by removing almost all of the magic from
the optional API implementation. Instead of relying on weak symbol
resolution, a new optional_api.c module was added to Asterisk core.
For modules providing an optional API, the pointer to the implementation
function is registered with the core. For modules that use an optional
API, a pointer to a stub function, along with a optional_ref function
pointer are registered with the core. The optional_ref function pointers
is set to the implementation function when it's provided, or the stub
function when it's now.
Since the implementation no longer relies on magic, it is now supported
on all platforms. In the spirit of choice, an OPTIONAL_API flag was
added, so we can disable the optional_api if needed (maybe it's buggy on
some bizarre platform I haven't tested on)
The AST_OPTIONAL_API*() macros themselves remained unchanged, so
existing code could remain unchanged. But to help with debugging the
optional_api, the patch limits the #include of optional API's to just
the modules using the API. This also reduces resource waste maintaining
optional_ref pointers that aren't used.
Other changes made as a part of this patch:
* The stubs for http_websocket that wrap system calls set errno to
ENOSYS.
* res_http_websocket now properly increments module use count.
* In loader.c, the while() wrappers around dlclose() were removed. The
while(!dlclose()) is actually an anti-pattern, which can lead to
infinite loops if the module you're attempting to unload exports a
symbol that was directly linked to.
* The special handling of nonoptreq on systems without weak symbol
support was removed, since we no longer rely on weak symbols for
optional_api.
[1]: https://wiki.asterisk.org/wiki/x/wACUAQ
(closes issue ASTERISK-22296)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2797/
........
Merged revisions 397989 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397990
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Fri, 30 Aug 2013 13:28:50 +0000 (13:28 +0000)]
ARI: Implement /recordings/stored API's
his patch implements the ARI API's for stored recordings. While the
original task only specified deleting a recording, it was simple
enough to implement the GET for all recordings, and for an individual
recording.
The recording playback operation was modified to use the same code for
accessing the recording as the REST API, so that they will behave
consistently.
There were several problems with the api-docs that were also fixed,
bringing the ARI spec in line with the implementation. There were some
'wishful thinking' fields on the stored recording model (duration and
timestamp) that were removed, because I ended up not implementing a
metadata file to go along with the recording to store such information.
The GET /recordings/live operation was removed, since it's not really
that useful to get a list of all recordings that are currently going
on in the system. (At least, if we did that, we'd probably want to
also list all of the current playbacks. Which seems weird.)
(closes issue ASTERISK-21582)
Review: https://reviewboard.asterisk.org/r/2693/
........
Merged revisions 397985 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397988
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Fri, 30 Aug 2013 13:27:52 +0000 (13:27 +0000)]
Multiple revisions 397975-397976
........
r397975 | rmudgett | 2013-08-29 20:00:00 -0500 (Thu, 29 Aug 2013) | 1 line
pbx.c: Make ast_str_substitute_variables_full() not mask variables.
........
r397976 | rmudgett | 2013-08-29 20:00:41 -0500 (Thu, 29 Aug 2013) | 1 line
Revert last commit.
........
Merged revisions 397975-397976 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397987
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Fri, 30 Aug 2013 01:20:05 +0000 (01:20 +0000)]
pbx.c: Make pbx_substitute_variables_helper_full() not mask variables.
........
Merged revisions 397977 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397978
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Mark Michelson [Fri, 30 Aug 2013 00:11:22 +0000 (00:11 +0000)]
Sanitize XML output for PIDF bodies.
PJSIP's PIDF API does not replace angle brackets with
their appropriate counterparts for XML. So we have to
do it ourself. In this particular case, the problem had
to do with attempting to place an unsanitized SIP URI
into an XML node. Now we don't get a 488 from recipients
of our PIDF NOTIFYs.
........
Merged revisions 397968 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397969
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Mark Michelson [Thu, 29 Aug 2013 22:54:05 +0000 (22:54 +0000)]
Fix method for creating activities string in PIDF bodies.
The previous method did not allocate enough space to create
the entire string, but adjusted the string's slen value to
be larger than the actual allocation. This resulted in garbled
text in NOTIFY requests from Asterisk.
This method allocates the proper amount of space first and then
writes the content into the buffer.
........
Merged revisions 397960 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397962
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kevin Harwell [Thu, 29 Aug 2013 22:49:24 +0000 (22:49 +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/
........
Merged revisions 397948 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 397958 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397959
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Mark Michelson [Thu, 29 Aug 2013 22:26:03 +0000 (22:26 +0000)]
Fix when the subscription_terminated callback is called for subscription handlers.
The previous placement would result in the resubscribe() callback called instead of
the subscription_terminated() callback being called when a subscription was ended
via a SUBSCRIBE request. This would result in confusing PJSIP and having it throw
an assertion.
........
Merged revisions 397955 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397957
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Mark Michelson [Thu, 29 Aug 2013 22:25:16 +0000 (22:25 +0000)]
Fix a race condition where a canceled call was answered.
RFC 5407 section 3.1.2 details a scenario where a UAC sends
a CANCEL at the same time that a UAS sends a 200 OK for the
INVITE that the UAC is canceling. When this occurs, it is the
role of the UAC to immediately send a BYE to terminate
the call.
This scenario was reproducible by have a Digium phone with two lines
place a call to a second phone that forwarded the call to the second
line on the original phone. The Digium phone, upon realizing that it
was connecting to itself, would attempt to cancel the call. The timing
of this happened to trigger the aforementioned race condition about
80% of the time. Asterisk was not doing its job of sending a BYE
when receiving a 200 OK on a cancelled INVITE. The result was that
the ast_channel structure was destroyed but the underlying SIP
session, as well as the PJSIP inv_session and dialog, were still
alive. Attempting to perform an action such as a transfer, once in
this state, would result in Asterisk crashing.
The circumstances are now detected properly and the session is ended
as recommended in RFC 5407.
(closes issue AST-1209)
reported by John Bigelow
........
Merged revisions 397945 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397956
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kevin Harwell [Thu, 29 Aug 2013 21:37:29 +0000 (21:37 +0000)]
Memory leaks fix
(closes ASTERISK-22376)
Reported by: John Hardin
Patches:
memleak.patch uploaded by jhardin (license 6512)
memleak2.patch uploaded by jhardin (license 6512)
........
Merged revisions 397946 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397947
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Thu, 29 Aug 2013 20:22:08 +0000 (20:22 +0000)]
Revert r394939 due to (numerous) objections
The patch from ASTERISK-21965 was committed perhaps a bit too hastily. Walter
and Tzafrir have pointed out numerous issues with the approach and have
propsed an alternative in r/2757. Since it's not a time critical issue and
is not worth holding up the release of 12 for it, I've gone ahead and reverted
r394939 from 12/trunk and re-opened ASTERISK-21965.
........
Merged revisions 397938 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397939
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Thu, 29 Aug 2013 16:21:31 +0000 (16:21 +0000)]
Account for {} in Swagger notes
........
Merged revisions 397927 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397932
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Thu, 29 Aug 2013 16:05:23 +0000 (16:05 +0000)]
Recursively search for '.c' files when making documentation with 'make full'
Without this, documentation defined in sub-folders is ignored. Since having
properly generated documentation is especially important in Asterisk 12 -
not having it can cause a module to not load - 'make full' needs to look in
all .c files.
........
Merged revisions 397924 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397925
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Mark Michelson [Thu, 29 Aug 2013 15:43:23 +0000 (15:43 +0000)]
Multiple revisions 397921-397922
........
r397921 | mmichelson | 2013-08-29 10:42:10 -0500 (Thu, 29 Aug 2013) | 6 lines
Resolve assumptions that bridge snapshots would be non-NULL for transfer stasis events.
Attempting to transfer an unbridged call would result in crashes in either CEL code or
in the conversion to AMI messages.
........
r397922 | mmichelson | 2013-08-29 10:42:29 -0500 (Thu, 29 Aug 2013) | 3 lines
Remove extra debug message.
........
Merged revisions 397921-397922 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397923
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Thu, 29 Aug 2013 12:30:07 +0000 (12:30 +0000)]
Actually *add* the database schema management utilities
In r397874, the scripts were removed... but not replaced. Thanks to
Michael Young for noticing this!
........
Merged revisions 397911 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397912
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Wed, 28 Aug 2013 23:15:43 +0000 (23:15 +0000)]
Fix some uninitialized buffers for CDR handling valgrind found.
* Made ast_strftime_locale() ensure that the output buffer is initialized.
The std library strftime() returns 0 and does not touch the buffer if it
has an error. However, the function can also return 0 without an error.
(closes issue ASTERISK-22412)
Reported by: rmudgett
........
Merged revisions 397902 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397903
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Wed, 28 Aug 2013 22:56:03 +0000 (22:56 +0000)]
Fixed problems with ast_cdr_serialize_variables().
* Fixed return value of ast_cdr_serialize_variables() on error. It needs
to return 0 indicating no CDR variables found.
* Made ast_cdr_serialize_variables() check the return value of
cdr_object_format_property() and assert if nonzero. A member of the
cdr_readonly_vars[] was not handled.
* Removed unused elements from cdr_readonly_vars[]: total_duration,
total_billsec, first_start, and first_answer.
........
Merged revisions 397900 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397901
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Wed, 28 Aug 2013 22:43:14 +0000 (22:43 +0000)]
Made the on/off in CLI "cdr set debug [on|off]" case insensitive.
........
Merged revisions 397898 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397899
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Wed, 28 Aug 2013 22:38:30 +0000 (22:38 +0000)]
Make CDR variable name chandling consistently case insensitive.
........
Merged revisions 397896 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397897
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Wed, 28 Aug 2013 22:35:25 +0000 (22:35 +0000)]
Make CDR code deal with channel names case insensitively.
........
Merged revisions 397894 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397895
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Wed, 28 Aug 2013 22:24:01 +0000 (22:24 +0000)]
Some CDR code optimization.
........
Merged revisions 397892 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397893
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Wed, 28 Aug 2013 21:38:39 +0000 (21:38 +0000)]
Whitespace and curly braces.
........
Merged revisions 397885 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397886
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Mark Michelson [Wed, 28 Aug 2013 21:09:43 +0000 (21:09 +0000)]
Improve detection of answer on SIP blind transfer.
A problem encountered during testing was that res_pjsip_refer would
not ever send a NOTIFY with a 200 OK sipfrag. This is because the framehook
that was supposed to send the NOTIFY would never be told that an answer
had occurred. This happened for two reasons:
1) The transferee channel on which the framehook was on was already up.
2) Answers are rarely if ever written to channels. Rather, the ast_answer()
or ast_raw_answer() function is used to answer channels.
Thanks to a suggestion by Matt Jordan, the best way to detect that the call
had been answered was to find out when the transferee channel joined a bridge.
With stasis this is an easy task. So now, in addition to the framehook logic,
there is a stasis subscription used to determine when the transferee has entered
a bridge. Once it has entered, an appropriate NOTIFY is sent.
........
Merged revisions 397876 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397877
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Wed, 28 Aug 2013 20:55:53 +0000 (20:55 +0000)]
Add database schema management using Alembic
This patch replaces contrib/realtime/ with a new setup for managing the
database schema required for database integration with Asterisk. In
addition to initializing a database with the proper schema, alembic can do a
database migration to assist with upgrading Asterisk in the future.
Hopefully this helps make setting up and operating Asterisk with a database
easier.
With this the schema only needs to be maintained in one place instead of
once per database. The schemas I have added here have a bit of improvement
over the examples that were there before (some added consistency and added
some missing indexes). Managing the schema in one place here also applies
to all databases supported by SQLAlchemy.
See contrib/ast-db-manage/README.md for more details.
Review: https://reviewboard.asterisk.org/r/2731
patch by Russell Bryant (license 6300)
........
Merged revisions 397874 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397875
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Wed, 28 Aug 2013 20:49:02 +0000 (20:49 +0000)]
Update CHANGES file for Asterisk 12
This updates the Asterisk 12 CHANGES file with the things that were missed
during the development cycle.
Review: https://reviewboard.asterisk.org/r/2795/
........
Merged revisions 397870 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397872
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Wed, 28 Aug 2013 16:13:18 +0000 (16:13 +0000)]
pbx.c: Make ast_str_substitute_variables_full() not mask variables.
........
Merged revisions 397859 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397860
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Wed, 28 Aug 2013 16:09:12 +0000 (16:09 +0000)]
ast_free() is null tollerant.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397858
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Wed, 28 Aug 2013 16:07:30 +0000 (16:07 +0000)]
Match use of ast_free() with ast_calloc() and add some curly braces.
........
Merged revisions 397856 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397857
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Mark Michelson [Wed, 28 Aug 2013 15:43:15 +0000 (15:43 +0000)]
Fix dialog matching in the SIP distributor.
Dialog matching is performed in the distributor for the sole
purpose of retrieving an associated serializer so the request
may be serialized.
This patch fixes two problems.
First, incoming CANCEL requests that had no to-tag (which really
should be *all* CANCEL requests) would not match with a dialog.
An earlier bug fix to deal with early CANCEL requests would result
in the CANCEL being replied to with a 481. The fix for this is to
find the matching INVITE transaction and get the dialog from that
transaction.
Second, no SIP responses were matching dialogs. This is because we
were inverting the tags that we were passing into PJSIP's dialog
finding function. This logic has been corrected by setting local
and remote tag variables based on whether the incoming message is
a request or response.
........
Merged revisions 397854 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397855
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Tue, 27 Aug 2013 19:19:36 +0000 (19:19 +0000)]
ARI: WebSocket event cleanup
Stasis events (which get distributed over the ARI WebSocket) are created
by subscribing to the channel_all_cached and bridge_all_cached topics,
filtering out events for channels/bridges currently subscribed to.
There are two issues with that. First was a race condition, where
messages in-flight to the master subscribe-to-all-things topic would get
sent out, even though the events happened before the channel was put
into Stasis. Secondly, as the number of channels and bridges grow in the
system, the work spent filtering messages becomes excessive.
Since r395954, individual channels and bridges have caching topics, and
can be subscribed to individually. This patch takes advantage, so that
channels and bridges are subscribed to on demand, instead of filtering
the global topics.
The one case where filtering is still required is handling BridgeMerge
messages, which are published directly to the bridge_all topic.
Other than the change to how subscriptions work, this patch mostly just
moves code around. Most of the work generating JSON objects from
messages was moved to .to_json handlers on the message types. The
callback functions handling app subscriptions were moved from res_stasis
(b/c they were global to the model) to stasis/app.c (b/c they are local
to the app now).
(closes issue ASTERISK-21969)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2754/
........
Merged revisions 397816 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397820
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Tue, 27 Aug 2013 18:52:23 +0000 (18:52 +0000)]
Made MALLOC_DEBUG less CPU intensive by default.
Storing a backtrace for each allocation in anticipation of a memory
management problem is very CPU intensive.
* Added the CLI "memory backtrace {on|off}" command to request that the
backtrace be gathered only on request. The backtrace is off by default.
(issue ASTERISK-22221)
Reported by: Matt Jordan
........
Merged revisions 397809 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397811
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Tue, 27 Aug 2013 18:10:40 +0000 (18:10 +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
........
Merged revisions 397758 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 397759 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397760
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Tue, 27 Aug 2013 17:35:20 +0000 (17:35 +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
........
Merged revisions 397712 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 397713 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397753
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Tue, 27 Aug 2013 16:51:08 +0000 (16:51 +0000)]
Fix uninitialized value in struct ast_control_pvt_cause_code usage.
........
Merged revisions 397744 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 397745 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397746
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Mon, 26 Aug 2013 23:48:56 +0000 (23:48 +0000)]
Better handle clearing the OUTGOING flag when a channel leaves a bridge
When a channel with the OUTGOING flag leaves a bridge, and it will survive
being pulled from the bridge (either because it will execute dialplan,
go into another bridge, or live in a friendly autoloop), we have to clear
the OUTGOING flag. This is the signal to the CDR engine that this channel
is no longer a second class citizen, i.e., it is not "dialed".
The soft hangup flags are only half the picture. If a channel is being
moved from one bridge to another, the soft hangup flags aren't set; however,
the state of the bridge_channel will not be hung up. Since the channel does
not have one of the two hang up states, that implies that the channel is
still technically alive.
This patch modifies the check so that it checks both the soft hangup flags
as well as the bridge_channel state. If either suggests that the channel
is going to persist, we clear the OUTGOING flag.
........
Merged revisions 397690 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397691
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David M. Lee [Mon, 26 Aug 2013 21:32:13 +0000 (21:32 +0000)]
Fixed bucket.c for systems where tv_usec is not an unsigned long.
........
Merged revisions 397673 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397674
65c4cc65-6c06-0410-ace0-
fbb531ad65f3