Commit Graph

21951 Commits

Author SHA1 Message Date
Russell Bryant
f5067300be Don't use a buffer after it goes out of scope.
's' is set to 'workspace'.  Make sure 'workspace' doesn't go out of scope while
the reference to it via 's' is still used.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@359056 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-13 23:58:40 +00:00
Russell Bryant
ac53c0d94e Dump cache of published events when a node joins the cluster.
Also use a more reliable method for stopping the poll() thread.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@359053 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-13 23:45:23 +00:00
Russell Bryant
0da9d71905 Remove chan_usbradio and app_rpt.
These modules are being maintained outside of the tree and have been for a long
time now, so it doesn't make sense to keep them here.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@359050 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-13 23:34:50 +00:00
Terry Wilson
c546ff5110 Fix setting CDR variables in the hangup extension
A previous CDR fix for setting CDR variables during a bridge via
custom dialplan features broke setting CDR variables in the
hangup extension. This patch fixes the issue.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@358978 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-13 20:31:23 +00:00
Terry Wilson
7622a34c89 Make hints for invalid SIP devices return Unavail, not idle
This patch drastically simplifies the device state aggegation code.
The old method was not only overly complex, but also made it impossible
to return AST_DEVICE_INVALID from the aggregation code. The unit test
update is as a result of fixing that bug.

The SIP change stems from a bug introduced by removing a DNS lookup
for hostname-based SIP channels.

(closes issue ASTERISK-16702)
Review: https://reviewboard.asterisk.org/r/1808/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@358943 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-13 19:51:23 +00:00
Tilghman Lesher
5ed9d4128d Requested changes documenting the fixed AEL functionality.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@358859 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-13 16:54:36 +00:00
Tilghman Lesher
2477215dd4 Enable macros in 1.8 to find the next highest "h" extension in a context, like in 1.4.
This change restores functionality that was present in 1.4, when AEL macros
were implemented with the Macro dialplan application.  Macros are fraught with
functionality issues, because they consume a large portion of the underlying
application stack.  This limits the ability of AEL users to call many layers
of subroutines, an issue which Gosub does not have (originally tested to
100,000 levels deep).  Therefore, starting in 1.6.0, AEL macros were
implemented with Gosub.

However, there were some implicit behaviors of Macro, which were not replicated
at the same time as with the transition to Gosub, one of which is documented in
the related issue.  In particular, the "h" extension is designed to execute not
in the Macro context, but in the topmost calling context.  Due to legacy issues
with a misapplied bugfix many years ago, when a macro exited in 1.4, it looks
in all calling contexts, bubbling up from the deepest level until it finds an
"h" extension.

Since AEL hides the complexity of the underlying dialplan logic from the AEL
programmer, it's reasonable to assume that this behavior should not change in
the transition from Asterisk 1.4 LTS to Asterisk 1.8 LTS, lest we break
working AEL configurations in the transition to Asterisk 1.8 LTS.  This fix
is the result, which implements a search for the "h" extension in all calling
Gosub contexts.

Fixes ASTERISK-19336

Patch: 20120308__ael_bugfix_for_trunk__2.diff (License #5003) by Tilghman Lesher
	(with slight modifications for 1.8)

Tested by: Johan Wilfer

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@358810 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-13 07:44:23 +00:00
Jonathan Rose
8e2e2bf059 Make transfer not ignore port information with SIP.
Attempting to transfer with SIP to an address like 1XXXXX@ip.ad.re.ss:5061 would fail
because port would be cut from the host string and ignored. This simply keeps chan_sip
from cutting off the port number during these kinds of transfers.

(closes issue ASTERISK-19321)
Reported by: Federico Alves
Review: https://reviewboard.asterisk.org/r/1790/diff/#index_header


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@358643 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-08 16:39:36 +00:00
Richard Mudgett
fff4e1ca50 Change directly setting _softhangup in sig_ss7.c to use ast_softhangup_nolock().
Update to:
(issue ASTERISK-19372)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@358530 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-07 18:25:59 +00:00
Sean Bright
acd1d86053 Return g729 and g723.1 frames with the number of samples set properly.
If the wctc4xxp returns more than a single packet, we need to update the number
of samples in the returned frame accordingly.

Acked-by: Shaun Ruffell <sruffell@digium.com>


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@358484 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-07 16:11:46 +00:00
Terry Wilson
fe1d703804 Set snarkiness = 0 in cdr_adaptive_odbc.conf.sample
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@358438 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-07 15:16:35 +00:00
Terry Wilson
522372b3df Add detection for ODBC WCHAR fields
Without detecting these types, cel_odbc blows up when the character
set for the table is utf8. This also wraps cdr_adaptive_odbc's use of
those types in the HAVE_ODBC_WCHAR #ifdef seen in other parts of the
code.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@358435 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-07 15:03:40 +00:00
Richard Mudgett
0c315bb90a Fix ring cadance setup for outgoing calls on FXS ports.
* Fix referencing the wrong variable in chan_dahdi.c:my_set_cadence().

Thanks to Sean Bright for compiling with -Wshadow and finding this bug.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@358377 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-06 17:44:57 +00:00
Richard Mudgett
4c9168a4c7 Drop SS7 call if not connected yet when INCOMPLETE/BUSY/CONGESTION.
SS7 is a trunk protocol and should clear a failed call as soon as
possible.

* Made SS7 hangup a call immediately if it has not connected yet for
INCOMPLETE/BUSY/CONGESTION causes.  Otherwise, play an appropriate inband
tone.

(closes issue ASTERISK-19372)
Reported by: Igor Nikolaev


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@358278 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-05 22:22:21 +00:00
Richard Mudgett
e0c235bd9b Setup DSP when SS7 call is connected or early media is available.
Outgoing SS7 calls fail to detect incoming DTMF so any bridged channel
that requires out-of-band DTMF will not work.

* Added sig_ss7_open_media() calls at appropriate places in sig_ss7.c.
The new call converts conditionaled out unconverted code and shows that
the code really did something useful.

* Improved some chan_dahdi DTMF debug messages to help track DTMF
handling.

(closes issue ASTERISK-19312)
Reported by: Igor Nikolaev


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@358260 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-05 21:33:26 +00:00
Jonathan Rose
47244a11d6 Eliminate double close of file descriptor in manager.c
The process_output function in manager.c attempted to call fclose and close immediately
afterwards. Since fclose implies close, this resulted in a potential double free on file
descriptors. This patch changes that behavior and also adds error checking to fclose and
close depending on which was deemed necessary. Also error messages. Thanks to Rosen
Iliev for pointing out the location of the problem.

(closes issue ASTERISK-18453)
Reported By: Jaco Kroon
Review: https://reviewboard.asterisk.org/r/1793/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@358214 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-05 18:49:58 +00:00
Joshua Colp
ffa247ce6c Defer sending the connected line reinvite if a reinvite is already in progress.
(issue ASTERISK-19355)
Reported by: tomaso

(closes issue AST-825)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@358162 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-05 16:41:01 +00:00
Kinsey Moore
fea6466555 Ensure Asterisk acknowledges ACKs to 4xx on Replaces errors
Asterisk was not setting pendinginvite in the upper half of
handle_request_invite such that the 4xx was retransmitted repeatedly even
though an ack was received for every retransmission.

(closes issue ASTERISK-19303)
Reported by: Jon Tsiros
Patches:
  fix-19303.patch uploaded by Jeremiah Gowdy (license 6358)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@358115 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-05 15:54:12 +00:00
Terry Wilson
d9961b2768 Fix unused-but-set-variable warnings
All of these were pretty obviously unused. Some were unused because
the code that used them was #if 0'd. In those cases, I just commented
out the unused-but-set variables.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@358029 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-02 23:27:06 +00:00
Terry Wilson
7495f69c95 Correct some set-but-unused variable warnings in the mISDN library.
(from kpfleming's commit to trunk r356292)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@358011 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-02 23:21:18 +00:00
Terry Wilson
b686d4785f Make chan_usbradio compile under dev mode
x=++x and x=x=1? Really?


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@357986 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-02 21:57:41 +00:00
Kinsey Moore
f1277cc0e0 Fix case-sensitivity for device-specific event subscriptions and CCSS
This change fixes case-sensitivity for device-specific subscriptions such that
the technology identifier is case-insensitive while the remainder of the device
string is still case-sensitive.  This should also preserve the original case of
the device string as passed in to the event system.  CCSS is the only feature
affected as it is the only consumer of device-specific event subscriptions.

The second part of this patch addresses similar case-sensitivity issues within
CCSS itself that prevented it from functioning correctly after the fix to the
events system.

This adds a unit test to verify that the event system works as expected.

(closes issue ASTERISK-19422)
Review: https://reviewboard.asterisk.org/r/1780/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@357940 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-02 21:02:21 +00:00
Richard Mudgett
a36c4234a4 Remove ISDN hold restriction for non-bridged calls.
The check if an ISDN call is bridged before it could be placed on hold is
not necessary and is overly restrictive.  The check was originally done to
prevent problems with call transfers in case a user tried to transfer a
call connected to an application to another call connected to an
application.  The ISDN transfer code has not required this restriction for
quite some time because ECT could transfer any two active calls to each
other.

* Remove ISDN hold restriction for calls connected to applications.

* Made ast_waitfordigit_full() ignore AST_CONTROL_HOLD and
AST_CONTROL_UNHOLD instead of generating a warning message.

(closes issue ASTERISK-19388)
Reported by: Birger Harzenetter
Tested by: rmudgett


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@357894 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-02 18:34:29 +00:00
Sean Bright
b3fb9153dd The default value for mohinterpret is the empty string, so when resetting to
default values don't explicitly set the value to "default."


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@357811 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-02 15:58:20 +00:00
Richard Mudgett
2c3804e06e Fix channel reference leak in ChanSpy.
* Fix next_channel() channel reference leak in ChanSpy.

(closes issue ASTERISK-19461)
Reported by: Irontec
Patches:
      app_chanspy_iteartor_next_unref.patch (license #6213) patch uploaded by Irontec

(issue ASTERISK-17515)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@357809 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-02 15:45:45 +00:00
Mark Michelson
ed7570328a Fix race condition that can cause important control frames (such as a hangup) to be missed.
This takes two actions.

1. Move the reading of the alertpipe in __ast_read() to immediately before the
removal of frames from the readq. This means we won't do something silly like
read from the alertpipe, then ignore the fact that there's a frame to get from
the readq since channel's fdno is the AST_TIMING_FD.

2. When ast_settimeout() sets the rate to 0 and the timingfunc to NULL, if the
channel's fdno is the AST_TIMING_FD, then set the fdno to -1. This is because
if the rate is 0 and the timingfunc is NULL, it means that the channel's timing
fd is being invalidated, so any pending reads should not occur.

This may actually solve more issues than the referenced one below, but it's not
known at this time for sure.

(closes issue ASTERISK-19223)
reported by Frank-Michael Wittig

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@357761 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-02 00:59:18 +00:00
Mark Michelson
496d1009dd Second attempt to get optimal translation paths when codec_resample is used.
This borrows code heavily from changes made in translation code in Asterisk 10.
This uses the quality and sample rate change of translation in order to pick
paths rather than the computational cost of translations. Computational cost
is used solely in determining if a single translation step from a specific
translator is better than the same translation step provided by a different
translator.

(closes issue ASTERISK-16821)
reported by Andrew Lindh

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@357760 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-02 00:20:04 +00:00
Kinsey Moore
8417ceb751 Prevent outbound SIP NOTIFY packets from displaying a port of 0
In the change from 1.6.2 to 1.8, ast_sockaddr was introduced which changed the
behavior of ast_find_ourip such that port number was wiped out.  This caused
the port in internip (which is used for Contact and Call-ID on NOTIFYs) to be
0.  This change causes ast_find_ourip to be port-preserving again.

(closes issue ASTERISK-19430)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@357665 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-01 14:18:01 +00:00
Walter Doekes
99a080671d Fix copying of CDR(accountcode) to local channels.
In r203638, during the addition of the Channel Event Logging, in mid-2009, this
got broken in trunk and ended up in asterisk 1.8 and higher. This fixes so the
CDR(accountcode) from the calling channel is available to dialed channels again
as well as showing up properly in the CDR's.

(closes issue ASTERISK-19384)
Reported by: jamicque
Patches: accountcode.patch (License #6033) by jamicque
Review: https://reviewboard.asterisk.org/r/1775/
Reviewed by: Richard Mudgett


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@357575 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-29 19:41:32 +00:00
Jonathan Rose
cc470930ba Adding transport=udp to sample sip.conf - Also changes version of Asterisk 1.8 in UPGRADE
(issue ASTERISK-19352)
Reported by: jamicque
Patches:
	asterisk-19352-transport-warning-message-v1.patch uploaded by Michael L. Young (license 5026)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@357490 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-28 22:27:37 +00:00
Jonathan Rose
27ce64075f Add additional character type types to supported data types for cdr_adaptive_odbc
The reporter was uable to use varchar utf8_unicode_ci with cdr_adaptive_odbc, so
this patch adds those along with some other character types to the list of types
cdr_adaptive_odbc will work using the varchar conditions. The problem wasn't really
UTF8 characters as much as it was a failure to respond to the exact type that was
declared/in use on that database.

(closes issue ASTERISK-19334)
Reported By: Igor Nikolaev
Patches:
	cdr_adaptive_odbc.patch uploaded by Igor Nikolaev (license 6236)




git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@357455 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-28 21:43:51 +00:00
Tilghman Lesher
e289e9caf9 Correctly reset the dialplan priority.
When the stack frame is allocated, we save the address to which we should
return, when the Gosub returns.  However, if we just want to restore the
priority, then we need to subtract 1 before setting it.  Otherwise, when
a Gosub goes to a nonexistent address, it will skip a priority in the
dialplan.  This is because when we return from an application, the PBX
increments the priority for us.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@357416 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-28 21:19:39 +00:00
Richard Mudgett
ec57a80169 Use more reasonable cause code when rejecting incoming call waiting calls.
(closes issue ASTERISK-19397)
Reported by: Birger Harzenetter
Patches:
      nochannel-cause.patch (license #5870) patch uploaded by Birger Harzenetter


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@357407 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-28 20:57:33 +00:00
Jonathan Rose
0472ec7ba7 Moves UPGRADE.txt notes from r357356 to a new section specific to 1.8.12
(issue ASTERISK-19352)
reported by: jamicque


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@357386 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-28 20:26:08 +00:00
Jonathan Rose
60907f7df1 Adds UPGRADE.txt notes to r357266 indicating changes to transport option
(issue ASTERISK-19352)
Reported by: jamicque


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@357356 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-28 19:58:19 +00:00
Richard Mudgett
00fc360507 Remove dupliate 'i' option table entry in app_page.c.
(closes issue ASTERISK-19310)
Reported by: Makoto Dei
Patches:
      app_page-duplicate-i-option.patch (license #5027) patch uploaded by Makoto Dei


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@357352 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-28 19:32:44 +00:00
Jonathan Rose
52c50e4da7 Changes transport option in sip.conf so that using multiple instances doesn't stack.
Prior to this patch, Using "transport=" multiple times would cause them to add to one
another like allow/deny. This patch changes that behavior to simply use the transport
option specified last. Also, if no transport option is applied now, the default will
automatically be UDP.

(closes ASTERISK-19352)
Reported by: jamicque
Patches:
	asterisk-19352-transport-warning-message-v1.patch uploaded by Michael L. Young (license 5026)
	issueA19352_no_transport_is_udp.patch uploaded by Walter Doekes (license 5674)
Review: https://reviewboard.asterisk.org/r/1745/diff/#index_header



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@357266 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-28 18:00:50 +00:00
Kevin P. Fleming
f3fbe7d88f Make COMPILE_DOUBLE magic actually work.
The build system has some special magic to ensure that if Asterisk is built
with --enable-dev-mode *and* DONT_OPTIMIZE, that all the source is still compiled
with the optimizer enabled (even though the result will be thrown away), because
the compiler is able to find a great deal of coding errors and bugs as a result
of running its optimizers. Unfortunately at some point this mode got broken,
and the 'throwaway' compile of the code was no longer done with the optimizer
enabled. This patch corrects that problem.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@357212 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-28 14:45:21 +00:00
Richard Mudgett
100721d217 Fix callerid of Originated calls.
Thanks to Matt Riddell for tracking this down.

(closes issue ASTERISK-19385)
Reported by: ornix


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@357093 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-27 23:34:03 +00:00
Terry Wilson
c026fb96b0 Copy CDR variables when set during a bridge
This patch makes sure amaflags, accountcode, and userfield get copied
to the bridge CDR when set during a bridge (like via a custom feature).

(closes issue ASTERISK-16990)
Review: https://reviewboard.asterisk.org/r/1721/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@356963 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-27 16:03:04 +00:00
Jonathan Rose
c7d587dd49 Remove possible segfaults from res_odbc by adding locks around usage of odbc handle
(closes issue ASTERISK-19011)
Reported by: Walter Doekes
Patches:
	issueA19011_combine_read_and_write_locks_WORK_IN_PROGRESS.patch uploaded by Walter Doekes (license 5674)
review: https://reviewboard.asterisk.org/r/1719/
review: https://reviewboard.asterisk.org/r/1622/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@356917 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-27 15:14:45 +00:00
Matthew Jordan
d3ed07d38a Fix crash in app_voicemail during close_mailbox
In r354890, a memory leak in app_voicemail was fixed by properly disposing of
the allocated heard/deleted pointers.  However, there are situations,
particularly when no messages are found in a folder, where these pointers are
not allocated and not NULL.  In that case, an invalid free would be attempted,
which could crash app_voicemail.  As there are a number of code paths where
this could occur, this patch uses the number of messages detected in the folder
before it attempts to free the pointers.  This resolves the crash detected in
the Asterisk Test Suite's check_voicemail_nominal test.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@356797 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-25 17:21:29 +00:00
Richard Mudgett
534213a074 Fix worker thread resource leak in SIP TCP/TLS.
The SIP TCP/TLS worker threads were created joinable but noone could join
them if they died on their own.

* Fix the SIP TCP/TLS worker threads to not be created joinable.

* _sip_tcp_helper_thread() only needs one parameter since the pvt
parameter is only passed in as NULL and never used.

(closes issue ASTERISK-19203)
Reported by: Steve Davies

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@356677 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-24 18:23:28 +00:00
Matthew Jordan
ed81d0e585 Remove srtp_shutdown from res_srtp
The patch for ASTERISK-19253 included properly shutting down the libsrtp
library in the case of module unload.  Unfortunately, not all distributions
have the srtp_shutdown call.  As such, this patch removes calling
srtp_shutdown.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@356650 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-24 17:41:18 +00:00
Matthew Jordan
032962f1a2 Allow SRTP policies to be reloaded
Currently, when using res_srtp, once the SRTP policy has been added to the
current session the policy is locked into place.  Any attempt to replace an
existing policy, which would be needed if the remote endpoint negotiated a new
cryptographic key, is instead rejected in res_srtp.  This happens in particular
in transfer scenarios, where the endpoint that Asterisk is communicating with
changes but uses the same RTP session.

This patch modifies res_srtp to allow remote and local policies to be reloaded
in the underlying SRTP library.  From the perspective of users of the SRTP API,
the only change is that the adding of remote and local policies are now added
in a single method call, whereas they previously were added separately.  This
was changed to account for the differences in handling remote and local
policies in libsrtp.

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

(closes issue ASTERISK-19253)
Reported by: Thomas Arimont
Tested by: Thomas Arimont
Patches:
  srtp_renew_keys_2012_02_22.diff uploaded by Matt Jordan (license 6283)
  (with some small modifications for this check-in)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@356604 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-24 15:07:09 +00:00
Richard Mudgett
f49ff3ff9c Fix blind transfer parking issues if the dialed extension is not recognized as a parking extension.
Custom parking extensions may not be coded such that the first and only
extension priority is the Park application.  These custom parking
extensions will not be recognized as parking extensions.  When a call is
blind transferred to an extension that is not recognized as a parking
extension, the normal blind transfer code causes the transferred channel
to start executing dialplan.  Calls that get parked in this manner do not
know the original channel name that parked the call so the original parker
could never be called back if the parked call is not retrieved before the
timeout time.  The parking space is also announced to the call being
parked as a side effect of not knowing the original parking channel.

* Fix handling of BLINDTRANSFER channel variable for call parking.

* Fixed SIP blind transfer using the wrong dialplan context variable to
check for the parking extension.

(closes issue ASTERISK-19322)
Reported by: aragon
Tested by: rmudgett, jparker

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

JIRA AST-766


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@356521 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-23 19:49:03 +00:00
Mark Michelson
775b218b35 Fix ACK routing for non-2xx responses.
When we send an ACK for a 2xx response to an INVITE, we are supposed
to use the learned route set. However, when we receive a non-2xx final
response to an INVITE, we are supposed to send the ACK to the same place
we initially sent the INVITE.

We had been doing this up until the changes went in that would build a route
set from provisional responses. That introduced a regression where we would
use the learned route set under all circumstances.

With this change, we now will set the destination of our ACK based on the
invitestate. If it is INV_COMPLETED then that means that we have received
a non-2xx final response (INV_TERMINATED indicates a 2xx response was received).
If it is INV_CANCELLED, then that means the call is being canceled, which
means that we should be ACKing a 487 response.

The other change introduced here is setting the invitestate to INV_CONFIRMED
when we send an ACK *after* the reqprep instead of before. This way, we can
tell in reqprep more easily what the invitestate is prior to sending the ACK.

(closes issue ASTERISK-19389)
reported by Karsten Wemheuer
patches:
    ASTERISK-19389v2.patch uploaded by Mark Michelson (license #5049)
	(with some slight modifications prior to commit)




git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@356475 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-23 15:37:59 +00:00
Paul Belanger
d2cb0914e4 Fix -Werror=unused-but-set-variable compiler error (gcc 4.6.2)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@356430 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-23 03:36:46 +00:00
Paul Belanger
bd7d5707dd Missed one strsep() function
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@356337 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-22 21:36:37 +00:00
Paul Belanger
7d3cdcffd2 Add back strsep() function for previous commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@356335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-22 21:29:25 +00:00