George Joseph [Sun, 19 Oct 2014 17:09:38 +0000 (17:09 +0000)]
build: Force -fsigned-char on platforms where the default for char is unsigned
gcc on the ARM platform defaults 'char' to 'unsigned char' whereas Intel and
SPARC default to 'signed char'. This is only an issue in the rare cases where
negative values are assigned to a 'char' but this this patch insures
compatibility by detecting platforms that default to 'unsigned' and adding an
'-fsigned-char' flag to _ASTCFLAGS.
If compiling for ARM (native or cross-compile) be sure to run ./bootstrap.sh
and ./configure to regenerate the build files. You shouldn't have to do this
for Intel or SPARC.
Tested-by: George Joseph
Review: https://reviewboard.asterisk.org/r/4091/
........
Merged revisions 425964 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 425965 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425966
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Sun, 19 Oct 2014 04:03:35 +0000 (04:03 +0000)]
res/res_pjsip_sdp_rtp: Revert 425924
This patch for r425924 introduced a bug, wherein sending an INVITE request
with no SDP would cause Asterisk to not send an SDP Offer in the 200
OK. The current structure of res_pjsip_sdp_rtp is a bit hard to deal with
to fix this, as create_outgoing_sdp has no knowledge of whether or not it is
creating an SDP as a new Offer or an Answer. This is something of an oversight
in the callback definition, as the caller of it does have this information.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425945
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Sun, 19 Oct 2014 00:56:43 +0000 (00:56 +0000)]
res/res_pjsip_sdp_rtp: Remove left over reference to override_prefs
The usage of the local override_prefs variable in create_outgoing_sdp_stream
was previously to track an override format preference set by PJSIP_MEDIA_OFFER.
Now, however, that function simply sets the joint capabilities structure,
session->req_caps. During the media format rework, the override_prefs was
instead used to check if there were any formats in session->req_caps.
However, this usage isn't useful in create_outgoing_sdp_stream.
session->req_caps contains the negotiated formats for *all* streams, not just
the current one being created. Thus, so long as any stream of any type has
provided a format, override_prefs will be non-zero. Hence, its usage in
checking whether or not we should look at the formats on the endpoint or
the joint capabilities is generally useless.
There's only two things useful to check:
(1) Does the endpoint have a format for the media type?
(2) Did we negotiate a format for the media type?
If either of those is a 'no', then we must kill the media stream.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425924
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jonathan Rose [Fri, 17 Oct 2014 22:45:27 +0000 (22:45 +0000)]
Sample Configurations: make 'pjsip reload' reload all reloadable pjsip modules
AST-1432 #close
Reported by: John Bigelow
........
Merged revisions 425905 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425906
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Fri, 17 Oct 2014 13:35:44 +0000 (13:35 +0000)]
res_pjsip_session/res_pjsip_sdp_rtp: Be more tolerant of offers
When an inbound SDP offer is received, Asterisk currently makes a few
incorrection assumptions:
(1) If the offer contains more than a single audio/video stream, Asterisk will
reject the entire stream with a 488. This is an overly strict response;
generally, Asterisk should accept the media streams that it can accept and
decline the others.
(2) If the offer contains a declined media stream, Asterisk will attempt to
process it anyway. This can result in attempting to match format
capabilities on a declined media stream, leading to a 488. Asterisk should
simply ignore declined media streams.
(3) Asterisk will currently attempt to handle offers with AVPF with
use_avpf=No/AVP with use_avpf=Yes. This mismatch results in invalid SDP
answers being sent in response. If there is a mismatch between the media
type being offered and the configuration, Asterisk must reject the offer
with a 488.
This patch does the following:
* Asterisk will accept SDP offers with at least one media stream that it can
use. Some WARNING messages have been dropped to NOTICEs as a result.
* Asterisk will not accept an offer with a media type that doesn't match its
configuration.
* Asterisk will ignore declined media streams properly.
#SIPit31
Review: https://reviewboard.asterisk.org/r/4063/
ASTERISK-24122 #close
Reported by: James Van Vleet
ASTERISK-24381 #close
Reported by: Matt Jordan
........
Merged revisions 425868 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 425879 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425881
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Joshua Colp [Fri, 17 Oct 2014 13:17:58 +0000 (13:17 +0000)]
res_pjsip_keepalive: Add runtime configurable keepalive module for connection-oriented transports.
This change adds a module which is configurable using the keep_alive_interval setting in the
global section that will send a CRLF keep alive to all active connection-oriented transports at
the provided interval. This is useful because it can help keep connections open through NATs.
This functionality also exists within PJSIP but can not be controlled at runtime and requires
recompiling it.
Review: https://reviewboard.asterisk.org/r/4084/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425825
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Fri, 17 Oct 2014 13:11:07 +0000 (13:11 +0000)]
channels/chan_sip: Respect outboundproxy setting when sending qualify requests
The outboundproxy setting is currently ignored when sending OPTIONS requests
as a result of the qualify setting. This means that if an Asterisk server is
unable to send the packet directly to a peer, it is unable to qualify any
non-inbound registered peer (e.g. a peer SIP Trunk).
This patch grabs the outboundproxy information for a peer when a qualify
attempt is being constructed and, if it finds the information, uses it
when sending the OPTIONS request.
Review: https://reviewboard.asterisk.org/r/3948
ASTERISK-24063 #close
Reported by: Damian Ivereigh
patches:
outboundproxy-dai.patch uploaded by Damian Ivereigh (License 6632)
........
Merged revisions 425818 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 425819 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 425820 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 425821 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425822
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Joshua Colp [Fri, 17 Oct 2014 11:30:23 +0000 (11:30 +0000)]
res_pjsip: Add 'user_eq_phone' option to add a 'user=phone' parameter when applicable.
This change adds a configuration option which adds a 'user=phone' parameter if the user
portion of the request URI or the From URI is determined to be a number.
Review: https://reviewboard.asterisk.org/r/4073/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425804
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Fri, 17 Oct 2014 02:49:57 +0000 (02:49 +0000)]
AMI: Add missing VarSet events when a channel inherits variables.
There should be AMI VarSet events when channel variables are inherited by
an outgoing channel. Also local;2 should generate VarSet events when it
gets all of its channel variables from channel local;1.
ASTERISK-24415 #close
Reported by: Richard Mudgett
Patches:
jira_asterisk_24415_v12.patch (license #5621) patch uploaded by Richard Mudgett
Review: https://reviewboard.asterisk.org/r/4074/
........
Merged revisions 425782 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 425783 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425784
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Fri, 17 Oct 2014 02:01:40 +0000 (02:01 +0000)]
bridge_native_rtp: Fix audio issues when moving from remote bridge to softmix
When a native RTP bridge that is remotely bridging its participants switches
to a softmix bridge, it may not properly re-INVITE the media for one or both
participants back to Asterisk. This is due to the current bridge_native_rtp
code only re-INVITEs if it believes the channel will survive the bridge
operation. Currently, that code is failing, as it expects the channels to
have a soft hangup flag set on it indicating that a redirect has occurred
or that the channel is going to leave the bridge. (The code did not take into
account a smart bridge operation).
This patch also renames a few things to be more reflective of the underlying
types.
Review: https://reviewboard.asterisk.org/r/3997/
ASTERISK-24327 #close
........
Merged revisions 425760 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 425761 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425762
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Fri, 17 Oct 2014 01:46:07 +0000 (01:46 +0000)]
test_cel: Update pickup test to expect CANCEL instead of ANSWSER
The CEL pickup test previously looked for a disposition of ANSWER between the
original caller/peer when the call is picked up. This is actually incorrect:
the disposition should, at the very least, not be ANSWER as the call was
never ANSWERed. The disposition is now CANCEL; this patch updates the test
accordingly.
........
Merged revisions 425757 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 425758 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425759
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Thu, 16 Oct 2014 21:21:44 +0000 (21:21 +0000)]
main/cdr: Use 'time' when rescheduling batched CDRs as opposed to 'size'
When refactoring CDRs to use the configuration framework, a 'whoops' was
introduced where the CDR batch size was used when rescheduling a batch,
as opposed to the time duration. This patch corrects that obvious mistake.
ASTERISK-24426 #close
Reported by: Shane Blaser
........
Merged revisions 425735 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 425736 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425744
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
George Joseph [Thu, 16 Oct 2014 17:32:16 +0000 (17:32 +0000)]
config: Fix inf loop using ast_category_browse and ast_variable_retrieve
Fix infinite loop when calling ast_variable_retrieve inside an
ast_category_browse loop when there is more than 1 category with
the same name.
Tested-by: George Joseph
Review: https://reviewboard.asterisk.org/r/4089/
........
Merged revisions 425713 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 425714 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425715
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kinsey Moore [Thu, 16 Oct 2014 16:32:25 +0000 (16:32 +0000)]
PJSIP: Enforce module load dependencies
This enforces that res_pjsip, res_pjsip_session, and res_pjsip_pubsub
have loaded properly before attempting to load any modules that depend
on them since the module loader system is not currently capable of
resolving module dependencies on its own.
ASTERISK-24312 #close
Reported by: Dafi Ni
Review: https://reviewboard.asterisk.org/r/4062/
........
Merged revisions 425690 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 425691 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425700
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Igor Goncharovskiy [Thu, 16 Oct 2014 06:22:07 +0000 (06:22 +0000)]
Fix loss of voice after second call drops (on a second line) in case using multiple lines on unistim phones. There is regression was introduced in r391379.
Reported by: Rustam Khankishyiev
(closes issue ASTERISK-23846)
........
Merged revisions 425667 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 425668 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 425669 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425677
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Joshua Colp [Thu, 16 Oct 2014 01:26:18 +0000 (01:26 +0000)]
res_rtp_asterisk: Fix a bug where ICE state would get reset when it shouldn't.
In the case where the ICE negotiation had not yet started current state would
get wiped when it shouldn't.
This also removes channel binding as in practice this does not work well with
other implementations.
........
Merged revisions 425644 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 425645 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 425646 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425647
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Wed, 15 Oct 2014 19:39:15 +0000 (19:39 +0000)]
chan_motif: Cleanup jingle_tech.capabilities only once.
........
Merged revisions 425627 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425628
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jonathan Rose [Wed, 15 Oct 2014 19:17:29 +0000 (19:17 +0000)]
parking_tests: Fix assertions and possibly crashes in res_parking unit tests
Assertions were caused by attempting to play music on hold to a channel with
no formats. Parking unit test channels were given formats and a technology so
that they would be able to pretend to read/write frames.
ASTERISK-24413 #close
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/4075/
........
Merged revisions 425611 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425613
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Alexandr Anikin [Wed, 15 Oct 2014 10:03:05 +0000 (10:03 +0000)]
chan_ooh323: fix rtptimeout general value checking
correct condition to check rtptimeout in [general] config section
ASTERISK-24393 #close
Reported by: Dmitry Melekhov
Tested by: Dmitry Melekhov
Patches:
ASTERISK-24393.patch
........
Merged revisions 425547 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 425548 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 425589 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 425590 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425591
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
George Joseph [Tue, 14 Oct 2014 20:48:06 +0000 (20:48 +0000)]
config: Fix SEGV in unit test with MALLOC_DEBUG
With MALLOC_DEBUG the /main/config config_basic_ops test was causing a
SEGV while doing an ast_category_delete in an ast_category_browse loop.
Apparently this never worked but was also never tested. I removed the
test, added 2 notes to config.h indicating that it's not supported and
added a few lines of code to ast_category_delete to prevent the SEGV
should someone attempt it in the future.
Tested-by: George Joseph
Review: https://reviewboard.asterisk.org/r/4078/
........
Merged revisions 425525 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 425526 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425527
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jonathan Rose [Tue, 14 Oct 2014 19:12:58 +0000 (19:12 +0000)]
Scheduler: Fix a nasty scheduler caching bug which makes new tasks not execute
Tasks that were marked for pending deletion in the scheduler would be moved to
the cache for later reuse, but after being recycled the deleted mark wouldn't
be removed resulting in fresh tasks being deleted without reason... and
immediately moved back into the cache where they could be reused again. This
could cause horrendous things to happen in just about anything that used a
scheduler.
ASTERISK-24321 #close
Reported by: Steve Pitts
Review: https://reviewboard.asterisk.org/r/4071/
........
Merged revisions 425503 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 425504 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425505
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
George Joseph [Tue, 14 Oct 2014 18:13:33 +0000 (18:13 +0000)]
res_phoneprov: Create accessor for ast_phoneprov_std_variable_lookup
Based on feedback from Richard, I created an accessor for
res_phoneprov/ast_phoneprov_std_variable_lookup and added
load priority to AST_MODULE_INFO.
Tested-by: George Joseph
Tested-by: Richard Mudgett
Review: https://reviewboard.asterisk.org/r/4076/
........
Merged revisions 425480 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 425481 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425482
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Corey Farrell [Tue, 14 Oct 2014 16:47:02 +0000 (16:47 +0000)]
res_fax: Fix reference leak caused by gateway sessions
Fax gateway session objects can be re-used, causing the
same gateway session to be added to faxregistry.container
more than once. This change causes fax_session_new to
remove the reserved session from the container before
it's id is changed, ensuring it's possible for the
session to be freed.
ASTERISK-24392 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4049/
........
Merged revisions 425457 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 425458 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 425459 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425460
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Tue, 14 Oct 2014 16:43:33 +0000 (16:43 +0000)]
stasis_channels.c: Resolve unfinished Dials when doing masquerades (Part 2)
Masquerades into and out of channels that are involved in a dial operation
don't create the expected dial end event. The missing dial end event goes
against the model for things like CDRs and generating Dial end manager
actions and such.
There are four cases:
1) A channel masquerades into the caller channel. The case happens when
performing a blonde transfer using the channel driver's protocol.
2) A channel masquerades into a callee channel. The case happens when
performing a directed call pickup.
3) The caller channel masquerades out of dial. The case happens when
using the Bridge application on the caller channel.
4) A callee channel masquerades out of dial. The case happens when using
the Bridge application on a peer channel.
As it turned out, all four cases need to be handled instead of just the
first one.
ASTERISK-24237
Reported by: Richard Mudgett
ASTERISK-24394 #close
Reported by: Richard Mudgett
Review: https://reviewboard.asterisk.org/r/4066/
........
Merged revisions 425430 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 425455 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425456
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Corey Farrell [Tue, 14 Oct 2014 16:20:59 +0000 (16:20 +0000)]
res_fax: Resolve module reference leak caused by reserved sessions
Remove reference to module providing reserved session after
adding a reference to the final module. This re-reference
is done to ensure that module references are correct even
if the final session selects a different module than the
reserved session.
ASTERISK-18923 #close
Reported by: Grigoriy Puzankin
Review: https://reviewboard.asterisk.org/r/4048/
........
Merged revisions 425405 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 425407 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 425411 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 425415 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425419
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
George Joseph [Mon, 13 Oct 2014 16:12:17 +0000 (16:12 +0000)]
manager/config: Support templates and non-unique category names via AMI
This patch provides the capability to manipulate templates and categories
with non-unique names via AMI.
Summary of changes:
GetConfig and GetConfigJSON: Added "Filter" parameter: A comma separated list
of name_regex=value_regex expressions which will cause only categories whose
variables match all expressions to be considered. The special variable name
TEMPLATES can be used to control whether templates are included. Passing
'include' as the value will include templates along with normal categories.
Passing 'restrict' as the value will restrict the operation to ONLY templates.
Not specifying a TEMPLATES expression results in the current default behavior
which is to not include templates.
UpdateConfig: NewCat now includes options for allowing duplicate category
names, indicating if the category should be created as a template, and
specifying templates the category should inherit from. The rest of the
actions now accept a filter string as defined above. If there are non-unique
category names, you can now update specific ones based on variable values.
To facilitate the new capabilities in manager, corresponding changes had to be
made to config, most notably the addition of filter criteria to many of the
APIs. In some cases it was easy to change the references to use the new
prototype but others would have required touching too many files for this
patch so a wrapper with the original prototype was created. Macros couldn't
be used in this case because it would break binary compatibility with modules
such as res_digium_phone that are linked to real symbols.
Tested-by: George Joseph
Review: https://reviewboard.asterisk.org/r/4033/
........
Merged revisions 425383 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 425384 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425385
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Joshua Colp [Sun, 12 Oct 2014 21:09:49 +0000 (21:09 +0000)]
res_rtp_asterisk: Make the ICE transport check case insensitive as some implementations use 'udp'.
........
Merged revisions 425360 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 425361 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 425362 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425363
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Walter Doekes [Sun, 12 Oct 2014 08:17:08 +0000 (08:17 +0000)]
chan_sip: Fix so asterisk won't send reINVITE after a BYE.
After a reINVITE glare situation, Asterisk would re-send the reINVITE
even though the call had been hung up in the mean time. This patch
unschedules the reinvite when handling the BYE.
ASTERISK-22791 #close
Reported by: Paolo Compagnini
Tested by: Paolo Compagnini
Review: https://reviewboard.asterisk.org/r/4056/
(testcase is in review r4055)
........
Merged revisions 425296 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 425297 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 425298 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 425299 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425300
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Walter Doekes [Sun, 12 Oct 2014 07:57:06 +0000 (07:57 +0000)]
build: Relax badshell tilde test to allow for ~ in middle of DESTDIR.
The main Makefile has a target test called 'badshell' that tests if
DESTDIR does not happen to have an an-expanded tilde (~). This might
be the case if you run: make install DESTDIR=~/somewhere/
That test also disallowed valid tildes in directory names. The test is
now changed to only trigger on a tilde at the start of the path.
ASTERISK-13797 #close
Reported by: Tzafrir Cohen
Review: https://reviewboard.asterisk.org/r/4064/
........
Merged revisions 425291 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 425292 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 425293 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 425294 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425295
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Walter Doekes [Sun, 12 Oct 2014 07:47:52 +0000 (07:47 +0000)]
res_calendar_ews: Relax neon version check to work with 0.30 too.
Allow res_calendar_ews to work not only with libneon-0.29 but also
with 0.30.
ASTERISK-24325 #close
Reported by: Tzafrir Cohen
Review: https://reviewboard.asterisk.org/r/4068/
........
Merged revisions 425286 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 425287 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 425288 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 425289 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425290
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
George Joseph [Sat, 11 Oct 2014 21:09:53 +0000 (21:09 +0000)]
res_phoneprov: Cleanup module load error handling
Tested module load/reload interaction between res_phoneprov and
res_pjsip_phoneprov_provider in cases where res_phoneprov didn't
load correctly (usually misconfiguration or missing phoneprov.conf)
Tested-by: George Joseph
Review: https://reviewboard.asterisk.org/r/4069/
........
Merged revisions 425264 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 425265 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425266
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Joshua Colp [Fri, 10 Oct 2014 20:48:46 +0000 (20:48 +0000)]
bridge: During a smart bridge operation provide a more complete bridge to the old technology.
When a smart bridge operation occurs and a bridge transitions from one
technology to another the old technology is provided the channels formerly
in it and told that they are leaving. Unfortunately the bridge provided
along with them is incomplete. The bridge, despite there being channels in it,
contains none. This forces technology implementations to have additional
logic when channels are leaving or to store their own duplicated
state.
This change makes the bridge more complete so it contains the expected
channels. Now that the bridge is complete special logic within
bridge_native_rtp is no longer needed and has been removed.
Review: https://reviewboard.asterisk.org/r/4057/
........
Merged revisions 425242 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 425243 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425244
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Fri, 10 Oct 2014 14:31:42 +0000 (14:31 +0000)]
res/res_phoneprov: Bail on registration if res_phoneprov didn't load
If res_phoneprov failed to fully load (due to not being configured), the
providers container will be NULL. If a module attempts to register a phone
provisioning provider, it should check for the presence of the container.
If there is no providers container, it should return an error.
This patch makes the ast_phoneprov_provider_register function do that...
otherwise this would be a silly commit message.
........
Merged revisions 425220 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 425221 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425222
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Joshua Colp [Fri, 10 Oct 2014 14:24:57 +0000 (14:24 +0000)]
res_pjsip_phoneprov_provider: Add missing dependency on pjproject.
........
Merged revisions 425216 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 425217 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425218
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kinsey Moore [Fri, 10 Oct 2014 13:03:18 +0000 (13:03 +0000)]
CallerID: Fix parsing regression
This fixes a regression in callerid parsing introduced when another bug
was fixed. This bug occurred when the name was composed entirely of
DTMF keys and quoted without a number section (<>).
ASTERISK-24406 #close
Reported by: Etienne Lessard
Tested by: Etienne Lessard
Patches:
callerid_fix.diff uploaded by Kinsey Moore
Review: https://reviewboard.asterisk.org/r/4067/
........
Merged revisions 425152 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 425153 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 425154 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 425155 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425156
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Joshua Colp [Fri, 10 Oct 2014 12:10:53 +0000 (12:10 +0000)]
res_pjsip_nat: Place source port into rport of responses if 'force_rport' is on.
When the 'force_rport' option is enabled the behavior should be the same
as if the remote side placed rport into the message themselves. Therefore
any responses we send should include the source port of the request in the
rport of the Via header.
#SIPit31
ASTERISK-24387 #close
Reported by: Matt Jordan
........
Merged revisions 425131 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 425132 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425133
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Walter Doekes [Fri, 10 Oct 2014 07:34:50 +0000 (07:34 +0000)]
chan_sip: Fix dialog leak resulting from missing ACK to re-INVITE.
If a device re-INVITEs at the same time as the dialog is hung up, and
if then the ACK to the re-INVITE never reaches Asterisk, chan_sip would
fail to destroy the dialog after a while. This resulted in (most
prominently) file handle leaks.
(Patch reindented by me.)
ASTERISK-20784 #close
ASTERISK-15879 #close
Reported by: Torrey Searle, Nitesh Bansal
Patches:
reinvite_ack_timeout.patch uploaded by Torrey Searle (License #5334)
patch_asterisk_20784.txt uploaded by Nitesh Bansal (License #6418)
Reviewboard: https://reviewboard.asterisk.org/r/4052/
(testcase can be found at r4051)
........
Merged revisions 425068 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 425069 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 425070 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 425071 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425072
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
George Joseph [Thu, 9 Oct 2014 23:37:49 +0000 (23:37 +0000)]
res_pjsip_phoneprov_provider: fix compile breakage on AST_VECTOR
endpoint->inbound_auths was changed to a vector in 13 and I
committed the 12 patch instead of the 13 patch.
Tested-by: George Joseph
........
Merged revisions 425052 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425053
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kevin Harwell [Thu, 9 Oct 2014 21:39:12 +0000 (21:39 +0000)]
res_rtp_asterisk: Crash if no candidates received for component
When starting ice if there is not at least one remote ice candidate with an RTP
component asterisk will crash. This is due to an assertion in pjnath as it
expects at least one candidate with an RTP component. Added a check to make
sure at least one candidate contains an RTP component and at least one candidate
has an RTCP component.
ASTERISK-24383 #close
Review: https://reviewboard.asterisk.org/r/4039/
........
Merged revisions 425031 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425032
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
George Joseph [Thu, 9 Oct 2014 20:55:50 +0000 (20:55 +0000)]
res_pjsip_phoneprov_provider: Provides pjsip integration with res_phoneprov
This module allows res_pjsip to integrate with res_phoneprov. It handles
the pjsip 'phoneprov' object type.
Tested-by: George Joseph
Review: https://reviewboard.asterisk.org/r/3976/
........
Merged revisions 425007 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 425008 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425009
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Thu, 9 Oct 2014 18:44:00 +0000 (18:44 +0000)]
res/res_phoneprov: Don't cancel Asterisk load on module load failure
........
Merged revisions 424985 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 424986 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424987
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
George Joseph [Thu, 9 Oct 2014 17:46:23 +0000 (17:46 +0000)]
res_phoneprov: Refactor phoneprov to allow pluggable config providers
This patch makes res_phoneprov more modular so other modules (like pjsip)
can provide configuration information instead of res_phoneprov relying solely
on users.conf and sip.conf. To accomplish this a new ast_phoneprov public API
is now exposed which allows config providers to register themselves, set
defaults (server profile, etc) and add user extensions.
* ast_phoneprov_provider_register registers the provider and provides callbacks
for loading default settings and loading users.
* ast_phoneprov_provider_unregister clears the defaults and users.
* ast_phoneprov_add_extension should be called once for each user/extension
by the provider's load_users callback to add them.
* ast_phoneprov_delete_extension deletes one extension.
* ast_phoneprov_delete_extensions deletes all extensions for the provider.
Tested-by: George Joseph
Review: https://reviewboard.asterisk.org/r/3970/
........
Merged revisions 424963 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 424964 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424965
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Thu, 9 Oct 2014 16:38:40 +0000 (16:38 +0000)]
cdr.c: Make turning on CDR debug a one step process instead of two.
Now "cdr set debug on" doesn't also require "core set verbose 1" to see
CDR debug output.
........
Merged revisions 424941 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 424942 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424943
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Walter Doekes [Thu, 9 Oct 2014 08:10:35 +0000 (08:10 +0000)]
safe_asterisk: Don't automatically exceed MAXFILES value of 2^20.
On systems with lots of RAM (e.g. 24GB) /proc/sys/fs/file-max divided
by two can exceed the per-process file limit of 2^20. This patch
ensures the value is capped.
(Patch cleaned up by me.)
ASTERISK-24011 #close
Reported by: Michael Myles
Patches:
safe_asterisk-ulimit.diff uploaded by Michael Myles (License #6626)
........
Merged revisions 424875 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 424878 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 424879 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 424880 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424881
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Joshua Colp [Wed, 8 Oct 2014 18:47:32 +0000 (18:47 +0000)]
res_rtp_asterisk: Allow only UDP ICE candidates.
The underlying library, pjnath, that res_rtp_asterisk uses for ICE
support does not have support for ICE-TCP. As candidates are
passed through directly to it this can cause error messages to occur
when it receives something unexpected (such as a TCP candidate).
This change merely ignores all non-UDP candidates so they never
reach pjnath.
ASTERISK-24326 #close
Reported by: Joshua Colp
........
Merged revisions 424852 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 424853 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 424854 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424855
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kinsey Moore [Wed, 8 Oct 2014 18:24:47 +0000 (18:24 +0000)]
Stasis: Relegate log message to dev-mode
This error message primarily applies to development tasks and will now
only show up when dev-mode is enabled via configure.
........
Merged revisions 424850 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424851
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kinsey Moore [Wed, 8 Oct 2014 14:54:54 +0000 (14:54 +0000)]
Indexer: Format message types may not exist
In Asterisk 13+, any given message type is not guaranteed to exist even
if Asterisk comes up correctly since creation of the message type could
be declined. The indexer should not prevent Asterisk from starting
under these conditions.
........
Merged revisions 424833 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424834
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kinsey Moore [Tue, 7 Oct 2014 20:33:29 +0000 (20:33 +0000)]
Stasis: Only log errors for non-declined types
When message type creation is declined via stasis.conf, certain
operations log errors assuming that the declined type is being used
before initialization or after destruction. These error messages get
quite spammy for oft used message types and should not be logged in the
first place since the message type is validly NULL.
Reported by: Matt DiMeo
........
Merged revisions 424769 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424770
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Joshua Colp [Tue, 7 Oct 2014 18:34:40 +0000 (18:34 +0000)]
data: Properly access formats in capabilities structure when adding codecs.
Formats within a capabilities structure are addressed starting at 0, not 1.
Assuming 1 causes it to exceed an array.
ASTERISK-24389 #close
Reported by: Kevin Harwell
........
Merged revisions 424752 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424753
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Tue, 7 Oct 2014 17:44:36 +0000 (17:44 +0000)]
res/res_pjsip_outbound_registration: Initialize auth_reject_permanent parameter
Prior to this patch, the auth_reject_permanent parameter was not initialized on
the registration client state, leading to the parameter being disabled
regardless of the value specified in pjsip.conf.
This patch initialized the setting on the registration client state to the
provided configuration value.
ASTERISK-24398 #close
........
Merged revisions 424730 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 424731 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424732
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Tue, 7 Oct 2014 14:09:47 +0000 (14:09 +0000)]
res/res_pjsip_pubsub: Fix typo in WARNING message
........
Merged revisions 424713 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424714
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Mon, 6 Oct 2014 18:39:54 +0000 (18:39 +0000)]
message: Don't close an AMI connection on SendMessage action error
If SendMessage encounters an error (such as incorrect input provided to the
action), it will currently return -1. Actions should only return -1 if the
connection to the AMI client should be closed. In this case, SendMessage
causing the client to disconnect is inappropriate.
This patch causes the action to return 0, which simply causes the action to
fail.
Review: https://reviewboard.asterisk.org/r/4024
ASTERISK-24354 #close
Reported by: Peter Katzmann
patches:
sendMessage.patch uploaded by Peter Katzmann (License 5968)
........
Merged revisions 424690 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 424691 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 424692 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424693
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Mon, 6 Oct 2014 15:41:32 +0000 (15:41 +0000)]
features.c: Fix lingering channel ref while Bridge() application is active.
Using the Bridge application to bridge a channel that is executing an
applicaiton such as Wait results in a lingering Surrogate channel in the
CLI "core show channels" output even though it has already hungup.
* Fix bridge_exec() to not hold onto the current_dest_chan ref once it has
been put into the bridge.
* Eliminated bridge_exec()'s use of RAII_VAR().
ASTERISK-24224 #close
Reported by: Mark Michelson
Review: https://reviewboard.asterisk.org/r/4041/
........
Merged revisions 424668 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 424669 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424670
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Mon, 6 Oct 2014 12:39:03 +0000 (12:39 +0000)]
sdp_srtp: Add new lines to some WARNING messages
........
Merged revisions 424646 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 424647 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424648
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Mon, 6 Oct 2014 01:01:43 +0000 (01:01 +0000)]
res_pjsip/pjsip_options: Do not 404 an OPTIONS request not sent to an endpoint
An OPTIONS request that is sent to Asterisk but not to a specific endpoint is
currently sent a 404 in response. This is because, not surprisingly, an empty
extension is never going to be found in the dialplan.
This patch makes it so that we only attempt to look up the endpoint in the
dialplan if it is specified in the OPTIONS request URI.
#SIPit31
ASTERISK-24370 #close
Reported by: Matt Jordan
........
Merged revisions 424624 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 424625 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424626
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Mon, 6 Oct 2014 00:53:37 +0000 (00:53 +0000)]
pjsip/dialplan_functions: Handle PJSIP_MEDIA_OFFER called on non-PJSIP channels
Calling PJSIP_MEDIA_OFFER on a non-PJSIP channel is hazardous to your health.
It will treat the channels as a PJSIP channel, eventually hitting an ao2 error,
FRACKing on assertion error, and quite likely crashing.
This patch adds checks to the read/write callbacks that ensure that the channel
technology is of type 'PJSIP' before attempting to operate on the channel.
#SIPit31
ASTERISK-24382 #close
Reported by: Matt Jordan
........
Merged revisions 424621 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 424622 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424623
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Mon, 6 Oct 2014 00:31:48 +0000 (00:31 +0000)]
res_pjsip: Prevent crashes when PJPROJECT presents an rdata with no message
When a message that exceeds the PJ_MAX_PKT_SIZE is sent over a reliable
transport, it is possible (although it shouldn't occur) for pjproject to pass
up an rdata object with a NULL msg in the msg_info. Needless to say, things
that attempt to dereference this are in for a rough ride.
In particular, this caused crashes in three different locations, all of which
are 'low level' enough to intercept an rdata object early in processing:
(1) res_pjsip_logger
(2) res_hep_pjsip
(3) res_pjsip/distributor
Anything that can intercept an rdata object before res_pjsip/distributor should
be defensive when looking at the received packet.
#SIPit31
ASTERISK-24369 #close
Reported by: Matt Jordan
........
Merged revisions 424618 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 424619 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424620
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Mon, 6 Oct 2014 00:13:58 +0000 (00:13 +0000)]
res/res_pjsip_pubsub: Gracefully handle errors when re-creating subscriptions
A subscription that has been persisted can - for various reasons - fail to be
re-created on startup. This patch resolves a number of crashes that occurred
when a subscription cannot be re-created on several off-nominal paths.
#SIPit31
ASTERISK-24368 #close
Reported by: Matt Jordan
........
Merged revisions 424601 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424602
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Corey Farrell [Sun, 5 Oct 2014 00:49:45 +0000 (00:49 +0000)]
Release AMI connections on shutdown.
ASTERISK-24378 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4037/
........
Merged revisions 424578 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 424579 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 424580 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424581
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Corey Farrell [Sun, 5 Oct 2014 00:15:43 +0000 (00:15 +0000)]
chan_motif: Correct last commit to use ao2_cleanup to free format cap
This fix applies to 13 and trunk.
ASTERISK-24384 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4043/
........
Merged revisions 424554 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424555
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Corey Farrell [Sun, 5 Oct 2014 00:02:39 +0000 (00:02 +0000)]
chan_motif: Release format capabilities and config on module load error
ASTERISK-24384 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4043/
........
Merged revisions 424550 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 424551 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 424552 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424553
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Fri, 3 Oct 2014 21:58:03 +0000 (21:58 +0000)]
res_pjsip: Fix XML typo and update CHANGES.
ASTERISK-24199
........
Merged revisions 424528 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 424529 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424530
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Fri, 3 Oct 2014 19:42:54 +0000 (19:42 +0000)]
audiohooks: Reevaluate the bridge technology when an audiohook is added or removed.
Adding a mixmonitor to a channel causes the bridge to change technologies
from native to simple_bridge so the call can be recorded. However, when
the mixmonitor is stopped the bridge does not switch back to the native
technology.
* Added unbridge requests to reevaluate the bridge when a channel
audiohook is removed.
* Moved the unbridge request into ast_audiohook_attach() ensure that the
bridge reevaluates whenever an audiohook is attached. This simplified the
mixmonitor and chan_spy start code as well.
* Added defensive code to stop_mixmonitor_full() in case additional
arguments are ever added to the StopMixMonitor application.
* Made ast_framehook_detach() not do an unbridge request if the framehook
does not exist.
* Made ast_framehook_list_fixup() do an unbridge request if there are any
framehooks. Also simplified the loop.
ASTERISK-24195 #close
Reported by: Jonathan Rose
Review: https://reviewboard.asterisk.org/r/4046/
........
Merged revisions 424506 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 424507 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424508
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Fri, 3 Oct 2014 18:54:53 +0000 (18:54 +0000)]
app_queue: Add dialplan function to get the channel name at the specified position in a queue.
The QUEUE_GET_CHANNEL function returns the caller's channel name at the
specified position in a queue.
QUEUE_GET_CHANNEL(<queuename>[,<position>])
The queue position parameter defaults to 1 if not specified.
Noop(${QUEUE_GET_CHANNEL(queuename, 2)})
"SIP/peer-
00000002", if queue exist and have at least 2 callers
Noop(${QUEUE_GET_CHANNEL(queuename, 1)})
Noop(${QUEUE_GET_CHANNEL(queuename)})
"SIP/peer-
00000000", if queue exist and have at least 1 caller
ASTERISK-24365 #close
Reported by: Kristian Hogh
Patches:
queue_get_firstchannel.patch (license #6639) patch uploaded by Kristian Hogh
rb4035.patch (license #6639) patch uploaded by Kristian Hogh
Patch morphed from QUEUE_GET_FIRSTCHANEL to the more general QUEUE_GET_CHANNEL
on reviewbord.
Review: https://reviewboard.asterisk.org/r/4035/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424493
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Fri, 3 Oct 2014 17:47:42 +0000 (17:47 +0000)]
chan_pjsip: Fix deadlock when masquerading PJSIP channels.
Performing a directed call pickup resulted in a deadlock when PJSIP
channels were involved.
A masquerade needs to hold onto the channel locks while it swaps channel
information between the two channels involved in the masquerade. With
PJSIP channels, the fixup routine needed to push a fixup task onto the
PJSIP channel's serializer. Unfortunately, if the serializer was also
processing a task that needed to lock the channel, you get deadlock.
* Added a new control frame that is used to notify the channels that a
masquerade is about to start and when it has completed.
* Added the ability to query taskprocessors if the current thread is the
taskprocessor thread.
* Added the ability to suspend/unsuspend the PJSIP serializer thread so a
masquerade could fixup the PJSIP channel without using the serializer.
ASTERISK-24356 #close
Reported by: rmudgett
Review: https://reviewboard.asterisk.org/r/4034/
........
Merged revisions 424471 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 424472 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424473
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
George Joseph [Fri, 3 Oct 2014 15:55:57 +0000 (15:55 +0000)]
sorcery: Prevent SEGV in sorcery_wizard_create when there's no create function
When you call ast_sorcery_create() you don't necessarily know which wizard is
going to be invoked. If it happens to be a wizard like 'config' that doesn't
have a 'create' virtual function you get a segfault in the
sorcery_wizard_create callback. This patch catches the null function pointer,
does an ast_assert, and logs an error.
Review: https://reviewboard.asterisk.org/r/4044/
........
Merged revisions 424447 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 424448 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424449
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kinsey Moore [Fri, 3 Oct 2014 13:59:09 +0000 (13:59 +0000)]
PJSIP: Restore functional default for callerid_privacy
The pjsip config option default fixups from r424263 altered the
functional default from "allowed_not_screened" to "allowed". This
change restores the functional default value when none is provided.
........
Merged revisions 424426 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 424427 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424428
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kinsey Moore [Fri, 3 Oct 2014 13:33:11 +0000 (13:33 +0000)]
Manager: Add missing fields and documentation for CoreShowChannels
This corrects some issues introduced in the responses to the
CoreShowChannels AMI command as well as adding documentation for the
responses. The command in Asterisk 12 was missing the following fields:
Duration, Application, ApplicationData, and BridgedChannel and
BridgedUniqueID (replaced with BridgeId).
ASTERISK-24262 #close
Reported by: Mitch Claborn
Review: https://reviewboard.asterisk.org/r/4040/
........
Merged revisions 424423 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 424424 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424425
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Thu, 2 Oct 2014 21:55:37 +0000 (21:55 +0000)]
res_pjsip: Make transport cipher option accept a comma separated list of cipher names.
Improvements to the res_pjsip transport cipher option.
* Made the cipher option accept a comma separated list of OpenSSL cipher
names. Users of realtime will be glad if they have more than one name to
list.
* Added the CLI command 'pjsip list ciphers' so a user can know what
OpenSSL names are available for the cipher option.
* Updated the cipher option online XML documentation to specify what is
expected for the value.
* Updated pjsip.conf.sample to not indicate that ALL is acceptable since
ALL does not imply a preference order for the ciphers and PJSIP does not
simply pass the string to OpenSSL for interpretation.
ASTERISK-24199 #close
Reported by: Joshua Colp
Review: https://reviewboard.asterisk.org/r/4018/
........
Merged revisions 424393 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 424394 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424395
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jonathan Rose [Thu, 2 Oct 2014 20:23:38 +0000 (20:23 +0000)]
Alembic: Add enumerator value to sippeers -> directmedia - 'outgoing'
The 'outgoing' value was left off of the enumerator when first creating the
column. This patch adds it, and should gracefully upgrade keeping the existing
data in tact.
ASTERISK-23781 #close
Reported by: Stephen More
Review: https://reviewboard.asterisk.org/r/4013/
........
Merged revisions 424372 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 424373 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424380
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jonathan Rose [Thu, 2 Oct 2014 15:33:50 +0000 (15:33 +0000)]
chan_pjsip: Fix an assertion for channels that lack formats on creation
ASTERISK-24222 #close
Reported by: Mark Michelson
Review: https://reviewboard.asterisk.org/r/4017/
........
Merged revisions 424333 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424358
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Scott Griepentrog [Thu, 2 Oct 2014 13:36:01 +0000 (13:36 +0000)]
res_pjsip: document use of rewrite_contact in sample conf
Without setting rewrite_contact, an invite to an endpoint
behind NAT will not reach it - unless the endpoint itself
uses STUN or TURN to discover it's public URI. Thus, the
use of this should be in the sample documentation.
Review: https://reviewboard.asterisk.org/r/4036/
........
Merged revisions 424337 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 424338 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424339
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Corey Farrell [Wed, 1 Oct 2014 20:37:31 +0000 (20:37 +0000)]
res_hep: Release allocation reference to configuration.
ASTERISK-24362 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4026/
........
Merged revisions 424312 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 424313 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424314
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Joshua Colp [Wed, 1 Oct 2014 16:39:45 +0000 (16:39 +0000)]
res_pjsip: Add 'dtls_fingerprint' option to configure DTLS fingerprint hash.
During the latest update to DTLS-SRTP support the ability to configure
the hash used for fingerprints was added. This gave us two supported ones:
SHA-1 and SHA-256. The default was accordingly updated to SHA-256.
Unfortunately this configuration ability was not exposed within res_pjsip.
This change adds a dtls_fingerprint option that controls it.
#SIPit31
........
Merged revisions 424290 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 424291 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424292
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Joshua Colp [Wed, 1 Oct 2014 16:20:40 +0000 (16:20 +0000)]
res_pjsip_sdp_rtp: Accept DTLS attributes in top level, not just media session.
#SIPit31
........
Merged revisions 424287 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 424288 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424289
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kinsey Moore [Wed, 1 Oct 2014 12:28:05 +0000 (12:28 +0000)]
PJSIP: Handle defaults properly
This updates the code behind PJSIP configuration options with custom
handlers to deal with the assigned default values properly where it
makes sense and adjusting the default value where it doesn't. Before
applying this patch, there were several cases where the default value
for an option would prevent that config section from loading properly.
Reported by: Thomas Thompson
Review: https://reviewboard.asterisk.org/r/4019/
........
Merged revisions 424263 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 424266 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424267
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kinsey Moore [Wed, 1 Oct 2014 12:15:56 +0000 (12:15 +0000)]
PJSIP: Force transport on contact rewrite
If contact rewriting is enabled but the contact differs in transport
from what is actually being used, messages after the initial INVITE
transaction can be sent to an incorrect transport/port combination. In
the case where this bug occurred the remote party never received a BYE
since it was sent to the remote party's TCP port over UDP.
Review: https://reviewboard.asterisk.org/r/4032/
........
Merged revisions 424244 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 424245 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424246
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Walter Doekes [Wed, 1 Oct 2014 10:10:41 +0000 (10:10 +0000)]
chan_sip: Simplify some unref code by removing unlink_peer_from_tables.
ASTERISK-22945 #related
Reported by: ibercom
Patches:
asterisk11-chan_sip-simplifies.patch uploaded by ibercom (License #6599)
........
Merged revisions 424181 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 424182 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 424183 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 424184 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424185
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Walter Doekes [Wed, 1 Oct 2014 09:55:10 +0000 (09:55 +0000)]
chan_sip: Remove excess ref of realtime peer before sip_poke_peer.
The peer is referenced at the end of sip_poke_peer, it should not get
an extra ref before the call to sip_poke_peer. This fixes a memory
leak.
ASTERISK-22945 #close
Reported by: ibercom
Tested by: Yuriy Gorlichenko
Patches:
asterisk11.patch uploaded by ibercom (License #6599)
Review: https://reviewboard.asterisk.org/r/4031/
........
Merged revisions 424176 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 424177 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 424178 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 424179 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424180
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Joshua Colp [Tue, 30 Sep 2014 11:42:00 +0000 (11:42 +0000)]
res_pjsip_sdp_rtp: Don't place an extra whitespace before 'rport' and don't put IPv6 addresses in brackets.
#SIPit31
........
Merged revisions 424155 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 424156 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424157
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Joshua Colp [Tue, 30 Sep 2014 11:36:14 +0000 (11:36 +0000)]
res_rtp_asterisk: Ensure that the base and mapped address for candidates is present in SDP.
This change fixes an issue where ICE candidates put into the SDP did not contain
the 'raddr' and 'rport' information for server reflexive and relay candidates.
#SIPit31
........
Merged revisions 424151 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 424152 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 424153 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424154
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
George Joseph [Mon, 29 Sep 2014 22:00:38 +0000 (22:00 +0000)]
pjsip_cli: Suppress header print on error or no objects
If there's an error on the pjsip command line or there are no objects, don't
print the column headers.
ASTERISK-24350 #close
Reported-by: Brad Latus
Tested-by: George Joseph
Tested-by: Brad Latus
Review: https://reviewboard.asterisk.org/r/4025/
........
Merged revisions 424128 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 424129 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424130
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Walter Doekes [Mon, 29 Sep 2014 21:32:10 +0000 (21:32 +0000)]
autosupport: Fix bashism.
'==' is bashism (bashspecific, fails when dash is /bin/sh). Anyway, a
'case' works better there.
Originally committed in r375059 and r375060 on 2012-10-16 21:13:08.
ASTERISK-20567 #close
Reported by: Tzafrir Cohen
........
Merged revisions 424117 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 424125 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 424126 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424127
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Mon, 29 Sep 2014 21:18:54 +0000 (21:18 +0000)]
Simplify UUID generation in several places.
Replace code using ast_uuid_generate() with simpler and faster code using
ast_uuid_generate_str(). The new code avoids a malloc(), free(), and
copy.
........
Merged revisions 424103 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 424105 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424109
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Mon, 29 Sep 2014 20:28:24 +0000 (20:28 +0000)]
threadpool.c: Minor cleanup fixes.
* Fix threadpool_alloc() prototype.
* Add missing off-nominal NULL check of pool in threadpool_alloc().
* searializer_create() does not need to create the object with a lock as
the lock is not used.
........
Merged revisions 424096 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 424097 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424098
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Joshua Colp [Sat, 27 Sep 2014 17:29:05 +0000 (17:29 +0000)]
res_pjsip_session: Reduce SDP size by removing duplicate connection lines.
Due to the architecture of how media streams are handled each individual
handler adds connection details (IP address) for it. The first media stream
is then used as the top level SDP connection line. In practice each
line ends up being the same so to reduce the SDP size stream-level connection
information is also added to the SDP if it differs from the top level SDP
connection line.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424077
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Joshua Colp [Sat, 27 Sep 2014 12:44:38 +0000 (12:44 +0000)]
res_pjsip_session: Add additional checks for delaying session refreshes.
There are certain situations which no checks existed for which need to prevent
session refreshes. This includes sending a session refresh with SDP before SDP
negotiation has completed and sending a session refresh before the dialog itself
has been established. Checks for these have been added.
Additionally COLP related UPDATEs were including SDP when it is not needed.
Review: https://reviewboard.asterisk.org/r/4008/
........
Merged revisions 424056 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 424057 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424058
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Fri, 26 Sep 2014 15:51:22 +0000 (15:51 +0000)]
format_mp3: Made the get script conditionally apply patch if not already there.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424039
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Walter Doekes [Fri, 26 Sep 2014 15:43:04 +0000 (15:43 +0000)]
core: Ouch, forgot to undo a test free() in r423978.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424038
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Fri, 26 Sep 2014 15:28:39 +0000 (15:28 +0000)]
res_fax: Fix out of bounds error in update_modem_bits().
ASTERISK-24357 #close
Reported by: Jeremy Laine
Patches:
res_fax_bounds.patch (license #6561) patch uploaded by Jeremy Laine
Modified patch to not use magic numbers.
........
Merged revisions 423979 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 423983 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 423987 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 423992 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424016
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Walter Doekes [Fri, 26 Sep 2014 14:41:38 +0000 (14:41 +0000)]
core: Don't allow free to mean ast_free (and malloc, etc..).
This gets rid of most old libc free/malloc/realloc and replaces them
with ast_free and friends. When compiling with MALLOC_DEBUG you'll
notice it when you're mistakenly using one of the libc variants. For
the legacy cases you can define WRAP_LIBC_MALLOC before including
asterisk.h.
Even better would be if the errors were also enabled when compiling
without MALLOC_DEBUG, but that's a slightly more invasive header
file change.
Those compiling addons/format_mp3 will need to rerun
./contrib/scripts/get_mp3_source.sh.
ASTERISK-24348 #related
Review: https://reviewboard.asterisk.org/r/4015/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@423978
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Walter Doekes [Fri, 26 Sep 2014 08:26:24 +0000 (08:26 +0000)]
docs: Escape unescaped minus sign in asterisk.8 manpage.
ASTERISK-23768 #close
Reported by: Jeremy Lainé
Patches:
escape_manpage_hyphen.patch uploaded by Jeremy Lainé (License #6561)
........
Merged revisions 423915 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 423916 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 423917 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 423918 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@423919
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Thu, 25 Sep 2014 21:03:51 +0000 (21:03 +0000)]
res_pjsip.c: Add missing off nominal cleanup in ast_sip_push_task_synchronous().
* Made memset the std struct in ast_sip_push_task_synchronous() because if
DEBUG_THREADS is enabled then uninitialized lock tracking data is used.
........
Merged revisions 423894 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 423895 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@423896
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Walter Doekes [Thu, 25 Sep 2014 20:49:04 +0000 (20:49 +0000)]
musiconhold: Add preferchannelclass=no option to prefer app class.
The new option 'preferchannelclass' is added to musiconhold.conf. If yes
(the default) the CHANNEL(musicclass) is preferred when choosing the
hold music. If it is no, the class suggested by the application that
calls the MoH (e.g. the Queue() app) gets preferred (new behaviour).
This way you set a different hold-music from the Queue-music by setting
both the CHANNEL(musicclass) and the queue-context musicclass.
ASTERISK-24276 #close
Reported by: Kristian Høgh
Patches:
app_override_channel_moh.patch uploaded by Kristian Høgh (License #6639)
Review: https://reviewboard.asterisk.org/r/4010/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@423893
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Wed, 24 Sep 2014 18:35:47 +0000 (18:35 +0000)]
pjsip_options.c: Fix race condition stopping periodic out of dialog OPTIONS request.
The crash on the issues is a result of an invalid transport configuration
change when asterisk is restarted. The attempt to send the qualify
request fails and we cleaned up. However, the callback is also called
which results in a double unref of the objects involved.
* Put a wrapper around pjsip_endpt_send_request() to detect when the
passed in callback is called because of an error so callers can know to
not cleanup.
* Made send_request_cb() able to handle repeated challenges (Up to 10).
* Fix periodic endpoint qualify OPTIONS sched deletion race by avoiding
it. The sched entry will no longer self stop and must be externally
stopped.
* Added REF_DEBUG description tags to struct sched_data in
pjsip_options.c.
* Fix some off-nominal ref leaks in schedule_qualify(),
qualify_and_schedule().
* Reordered pjsip_options.c module start/stop code to cleanup better on
error.
ASTERISK-24295 #close
Reported by: Rogger Padilla
Review: https://reviewboard.asterisk.org/r/3954/
........
Merged revisions 423866 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 423867 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@423868
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Walter Doekes [Wed, 24 Sep 2014 08:55:02 +0000 (08:55 +0000)]
chan_sip: Unref outbound proxy structure on dialog/pvt destruction.
Make sure outbound proxy refs are always unreffed on dialog destruction.
Review: https://reviewboard.asterisk.org/r/4016/
........
Merged revisions 423800 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 423801 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 423802 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 423803 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@423804
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Mark Michelson [Tue, 23 Sep 2014 14:36:00 +0000 (14:36 +0000)]
Make CDR and CEL unit tests less FRACKy.
Prior to this commit, CDR and CEL tests were expected to trigger
FRACKs (i.e. assertions) due to the fact that the channels they
create have no formats on them. Some code was independently added
recently that attempts to prevent FRACKs from occurring by failing
early when attempting to set up translation paths if one or both
channels support no formats. Unfortunately, this attempt to be helpful
made the CDR and CEL tests go from simply FRACKing to outright
failing and in some cases, failing so badly as to crash Asterisk.
This commit seeks to correct past mistakes by adding the ulaw format
to channels created by the CDR and CEL unit tests. This makes setting
up translation paths succeed, eliminates previously-seen FRACKs, and
ultimately causes the unit tests to succeed again.
Review: https://reviewboard.asterisk.org/r/4014
........
Merged revisions 423783 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@423784
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Walter Doekes [Mon, 22 Sep 2014 19:49:30 +0000 (19:49 +0000)]
chan_sip: On INVITE retransmission, don't add an extra 503 response.
INVITE arrives to asterisk, asterisk responds Busy(). If the INVITE is
retransmitted, asterisk would generate a 503 in addition to the 486.
Thanks Torrey Searle for providing a working regression test.
ASTERISK-24335 #close
Review: https://reviewboard.asterisk.org/r/4003/
Patches:
retrans_486_invite.patch uploaded by Torrey Searle (License #5334)
........
Merged revisions 423720 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 423721 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 423722 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 423723 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@423724
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Walter Doekes [Mon, 22 Sep 2014 17:42:26 +0000 (17:42 +0000)]
cli.c: Fix tab completion "module load" when MALLOC_DEBUG is enabled.
r421600 conflicted with r155763.
ASTERISK-24348 #close
........
Merged revisions 423657 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 423658 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 423659 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 423660 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@423661
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Jordan [Sun, 21 Sep 2014 01:16:05 +0000 (01:16 +0000)]
main/channel: Unlock channel in off-nominal path
In r423414 (13) / r423415 (trunk), an API call that determines if a format
capability structure is empty was added. This returns true if the format
capability structure is completely empty or "none". A check for this was added
in channel.c's set_format call. Unfortunately, when this check was true, it
returned from the function while still holding the channel lock. This caused
the CDR unit tests - which have a tendency to create channels with no formats -
to deadlock. Whoops.
This patch unlocks the channel on the off-nominal path.
........
Merged revisions 423641 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@423642
65c4cc65-6c06-0410-ace0-
fbb531ad65f3