Commit Graph

22572 Commits

Author SHA1 Message Date
Matthew Jordan 60d9ca687c Fix error that caused truncate operations to fail
Another very inappropriate placement of a ')' (again introduced in r362151)
caused the various truncate operations to attempt to truncate the sound file
at a position of '0'.

(issue ASTERISK-19655)
Reported by: Matt Jordan

(issue ASTERISK-19810)
Reported by: colbec
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@364580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-29 19:50:57 +00:00
Michael L. Young 2cbcbc7f6b Fix configuring custom sound_leader_has_left in confbridge.conf
The configuration option to specify a custom sound_leader_has_left file for a
conference bridge was not being parsed.  This patch fixes it so that a custom
sound file will now be used.

(closes issue ASTERISK-19771)
Reported by: Pawel Kuzak
Tested by: Pawel Kuzak, Michael L. Young
Patches: leaderhasleft_sound.dpatch uploaded by Pawel Kuzak (license 6380)

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@364537 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-29 02:23:22 +00:00
Joshua Colp ae1502be33 Add support for lightweight NAT keepalive.
If enabled using the keepalive option in sip.conf a small packet will be sent
at a regular interval to keep the NAT mapping open. This is lightweight as the
remote side does not need to parse and handle a SIP message.

(closes issue AST-783)
Review: https://reviewboard.asterisk.org/r/1756/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@364500 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-28 20:24:45 +00:00
Russell Bryant 19097a4b62 md5: supress some compiler warnings.
md5.c: In function ‘MD5Final’:
md5.c:154:2: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
md5.c:155:2: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]

There is an md5 unit test and it still passes.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@364462 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-28 01:33:49 +00:00
Russell Bryant eebdf35159 res_corosync: Fix build against corosync 2.0.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@364444 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-28 01:20:57 +00:00
Russell Bryant a498ef2aa0 app_minivm: Fix a couple compiler warnings.
The warnings were about argv[0] being used uninitialized, which is correct.
Just remove setting username to this value, since username is set again before
it actually gets used.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@364438 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-28 01:10:35 +00:00
Russell Bryant 386c2c6edf features: Add FEATURE() and FEATUREMAP() functions.
Add two new dialplan functions: FEATURE() and FEATUREMAP().  FEATURE()
lets you set some of the configuration options from the [general] section
of features.conf on a per-channel basis.  FEATUREMAP() lets you customize
the key sequence used to activate built-in features, such as blindxfer,
and automon.  See the built-in documentation for details.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@364437 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-28 00:58:54 +00:00
Richard Mudgett e8a6e0ef0e PreDial - Ability to run dialplan on callee and caller channels before Dial.
Thanks to Mark Murawski for the initial patch and feature definition.

(closes issue ASTERISK-19548)
Reported by: Mark Murawski

Review: https://reviewboard.asterisk.org/r/1878/
Review: https://reviewboard.asterisk.org/r/1229/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@364436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-28 00:31:47 +00:00
Terry Wilson f7c174ff84 Multiple revisions 364365,364369
........
  r364365 | twilson | 2012-04-27 17:31:01 -0500 (Fri, 27 Apr 2012) | 11 lines
  
  Fix ast_parse_arg numeric type range checking and add tests
  
  ast_parse_arg wasn't checking for strto* parse errors or limiting
  the results by the actual range of the numeric types. This patch fixes
  that and adds unit tests as well.
  
  Review: https://reviewboard.asterisk.org/r/1879/
  ........
  
  Merged revisions 364340 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r364369 | twilson | 2012-04-27 17:33:10 -0500 (Fri, 27 Apr 2012) | 2 lines
  
  Add missing test_config.c
........

Merged revisions 364365,364369 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@364397 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-27 22:54:20 +00:00
Mark Michelson 1a58b3b775 Don't attempt to make use of the dynamic_exclude_static ACL if DNS lookup fails.
(closes issue ASTERISK-18321)
Reported by Dan Lukes
Patches:
	ASTERISK-18321.patch by Mark Michelson (license #5049)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@364343 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-27 22:11:01 +00:00
Matthew Jordan 50c959580c Prevent overflow in calculation in ast_tvdiff_ms on 32-bit machines
The method ast_tvdiff_ms attempts to calculate the difference, in milliseconds,
between two timeval structs, and return the difference in a 64-bit integer.
Unfortunately, it assumes that the long tv_sec/tv_usec members in the timeval
struct are large enough to hold the calculated values before it returns.  On
64-bit machines, this might be the case, as a long may be 64-bits.  On 32-bit
machines, however, a long may be less (32-bits), in which case, the calculation
can overflow.

This overflow caused significant problems in MixMonitor, which uses the method
to determine if an audio factory, which has not presented audio to an audiohook,
is merely late in providing said audio or will never provide audio.  In an
overflow situation, the audiohook would incorrectly determine that an audio
factory that will never provide audio is merely late instead.  This led to
situations where a MixMonitor never recorded any audio.  Note that this happened
most frequently when that MixMonitor was started by the ConfBridge application
itself, or when the MixMonitor was attached to a Local channel.

(issue ASTERISK-19497)
Reported by: Ben Klang
Tested by: Ben Klang
Patches:
  32-bit-time-overflow-10-2012-04-26.diff (license #6283) by mjordan

(closes issue ASTERISK-19727)
Reported by: Mark Murawski
Tested by: Michael L. Young
Patches:
  32-bit-time-overflow-2012-04-27.diff (license #6283) by mjordan)

(closes issue ASTERISK-19471)
Reported by: feyfre
Tested by: feyfre

(issue ASTERISK-19426)
Reported by: Johan Wilfer

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@364287 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-27 19:30:59 +00:00
Kinsey Moore 83cf78deda Allow SIP pvts involved in Replaces transfers to fall out of reference sooner
Unref the SIP pvt stored in the refer structure as soon as it is no longer
needed so that the pvt and associated file descriptors can be freed sooner.
This change makes a reference decrement unnecessary in code that handles SIP
BYE/Also transfers which should not touch the reference anyway.

(Closes issue ASTERISK-19579)
Reported by: Maciej Krajewski
Tested by: Maciej Krajewski
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@364260 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-27 18:59:36 +00:00
Matthew Jordan 103031330a Allow for reloading SRTP crypto keys within the same SIP dialog
As a continuation of the patch in r356604, which allowed for the
reloading of SRTP keys in re-INVITE transfer scenarios, this patch
addresses the more common case where a new key is requested within 
the context of a current SIP dialog.  This can occur, for example, when
certain phones request a SIP hold.

Previously, once a dialog was associated with an SRTP object, any
subsequent attempt to process crypto keys in any SDP offer - either
the current one or a new offer in a new SIP request - were ignored.  This
patch changes this behavior to only ignore subsequent crypto keys within
the current SDP offer, but allows future SDP offers to change the keys.

(issue ASTERISK-19253)
Reported by: Thomas Arimont
Tested by: Thomas Arimont

Review: https://reviewboard.asteriskorg/r/1885/
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@364205 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-27 14:45:08 +00:00
Stefan Schmidt 14b52ff9da fix a wrong behavior of alarm timezones in caldav and icalendar when an alarm doesnt use utc. This change uses the same timezone from the start time.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@364164 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-27 12:58:03 +00:00
Richard Mudgett 238640dc1b Update Pickup application documentation. (With feeling this time.)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@364110 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-26 21:11:25 +00:00
Richard Mudgett b22874415e Fix DTMF atxfer running h exten after the wrong bridge ends.
When party B does an attended transfer of party A to party C, the
attending bridge between party B and C should not be running an h exten
when the bridge ends.  Running an h exten now sets a softhangup flag to
ensure that an AGI will run in dead AGI mode.

* Set the AST_FLAG_BRIDGE_HANGUP_DONT on the party B channel for the
attending bridge between party B and C.

(closes issue AST-870)

(closes issue ASTERISK-19717)
Reported by: Mario

(closes issue ASTERISK-19633)
Reported by: Andrey Solovyev
Patches:
      jira_asterisk_19633_v1.8.patch (license #5621) patch uploaded by rmudgett
Tested by: rmudgett, Andrey Solovyev, Mario
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@364082 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-26 20:35:41 +00:00
Terry Wilson 49a49a51ef Add more constness to the end_buf pointer in the netconsole
issue ASTERISK-18308
Review: https://reviewboard.asterisk.org/r/1876/
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@364048 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-26 19:33:49 +00:00
Olle Johansson e5c20ccb76 Code formatting fixes.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@363989 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-26 13:59:11 +00:00
Kinsey Moore 7bf6a01cfa Fix reference leaks involving SIP Replaces transfers
The reference held for SIP blind transfers using the Replaces header in an
INVITE was never freed on success and also failed to be freed in some error
conditions.  This caused a file descriptor leak since the RTP structures in use
at the time of the transfer were never freed.  This reference leak and another
relating to subscriptions in the same code path have now been corrected.

(closes issue ASTERISK-19579)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@363988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-26 13:31:16 +00:00
Alec L Davis 5746e0d2ac chan_sip: [general] maxforwards, not checked for a value greater than 255
The peer maxforwards is checked for both '< 1' and '> 255',
but the default 'maxforwards' in the [general] section is only checked for '< 1'

alecdavis (license 585)
Reported by: alecdavis
Tested by: alecdavis
 
Review: https://reviewboard.asterisk.org/r/1888/
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@363936 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-26 09:48:55 +00:00
Richard Mudgett 9d655bd0e8 Update Pickup application documentation. (Even better)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@363877 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-26 03:12:44 +00:00
Richard Mudgett e736a4fed3 * Put more information in pickup_exec() LOG_NOTICE.
* Delay duplicating a string on the stack in pickup_exec().


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@363839 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-26 01:29:09 +00:00
Richard Mudgett 0986873128 Update Pickup application documentation.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@363790 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-25 23:00:26 +00:00
Richard Mudgett af39a4374e Make DAHDISendCallreroutingFacility wait 5 seconds for a reply before disconnecting the call.
Some switches may not handle the call-deflection/call-rerouting message if
the call is disconnected too soon after being sent.  Asteisk was not
waiting for any reply before disconnecting the call.

* Added a 5 second delay before disconnecting the call to wait for a
potential response if the peer does not disconnect first.

(closes issue ASTERISK-19708)
Reported by: mehdi Shirazi
Patches:
      jira_asterisk_19708_v1.8.patch (license #5621) patch uploaded by rmudgett
Tested by: rmudgett
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@363740 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-25 20:51:58 +00:00
Richard Mudgett d2ac624b87 Clear ISDN channel resetting state if the peer continues to use it.
Some ISDN switches occasionally fail to send a RESTART ACKNOWLEDGE in
response to a RESTART request.

* Made the second SETUP received after sending a RESTART request clear the
channel resetting state as if the peer had sent the expected RESTART
ACKNOWLEDGE before continuing to process the SETUP.  The peer may not be
sending the expected RESTART ACKNOWLEDGE.

(issue ASTERISK-19608)
(issue AST-844)
(issue AST-815)
Patches:
      jira_ast_815_v1.8.patch (license #5621) patch uploaded by rmudgett (modified)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@363689 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-25 19:55:12 +00:00
Olle Johansson 04ddb5714f Add documentation
Thanks Tilghman!


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@363637 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-25 13:57:01 +00:00
Olle Johansson f102aecf12 Formatting changes only
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@363599 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-25 11:18:14 +00:00
Olle Johansson a8e755700e Use the DEFINED value for musicclass length.
For some reason, features.c has it's own definition. Should propably be fixed too.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@363595 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-25 10:49:13 +00:00
Olle Johansson 7aa0c3c64b Make it possible to change the minimum DTMF duration in asterisk.conf
Asterisk has a setting for the minimum allowed DTMF. If we get shorter
DTMF tones, these will be changed to the minimum on the outbound call
leg. 

(closes issue ASTERISK-19772)

Review: https://reviewboard.asterisk.org/r/1882/
Reported by: oej
Tested by: oej
Patches by: oej

Thanks to the reviewers.

1.8 branch for this patch: agave-dtmf-duration-asterisk-conf-1.8



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@363558 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-25 09:32:21 +00:00
Olle Johansson 228ce5fd74 Formatting fixes
Developer guidelines are important.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@363517 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-25 08:39:01 +00:00
Olle Johansson db2b162e8c Formatting fixes
Found a small amount of curly brackets in my hotel room here in Denmark.
I hereby donate them to the Asterisk project.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@363480 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-25 08:02:52 +00:00
Richard Mudgett 7f0dce3bd1 Fix recalled party B feature flags for a failed DTMF atxfer.
1) B calls A with Dial option T
2) B DTMF atxfer to C
3) B hangs up
4) C does not answer
5) B is called back
6) B answers
7) B cannot initiate transfers anymore

* Add dial features datastore to recalled party B channel that is a copy
of the original party B channel's dial features datastore.

* Extracted add_features_datastore() from add_features_datastores().

* Renamed struct ast_dial_features features_caller and features_callee
members to my_features and peer_features respectively.  These better names
eliminate the need for some explanatory comments.

* Simplified code accessing the struct ast_dial_features datastore.

(closes issue ASTERISK-19383)
Reported by: lgfsantos
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@363430 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-25 01:26:44 +00:00
Richard Mudgett 56d10c5677 Hangup affected channel in error paths of bridge_call_thread().
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@363377 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-25 00:03:52 +00:00
Terry Wilson 18045c9a07 OpenBSD doesn't have rawmemchr, use strchr
(closes issue ASTERISK-19758)
Reported by: Barry Miller
Tested by: Terry Wilson
Patches: 
  362758-diff uploaded by Barry Miller (license 5434)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@363335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-24 17:52:26 +00:00
Richard Mudgett f663924517 Make app_dial and app_queue use new macro and gosub calls.
* Simplify some code in app_dial and app_queue by calling
ast_app_exec_macro() and ast_app_exec_sub().

* Fix minor locking issue in app_dial for post-answer macro/gosub
MACRO/GOSUB_RESULT=GOTO: handling.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@363269 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-23 17:05:55 +00:00
Tilghman Lesher f03d56a84d On some platforms, O_RDONLY is not a flag to be checked, but merely the absence of O_RDWR and O_WRONLY.
The POSIX specification does not mandate how these 3 flags must be specified,
only that one of the three must be specified in every call.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@363215 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-23 16:08:33 +00:00
Jonathan Rose ceefcf8839 AST-2012-004: Fix an error that allows AMI users to run shell commands sans authorization.
As detailed in the advisory, AMI users without write authorization for SYSTEM class AMI
actions were able to run system commands by going through other AMI commands which did
not require that authorization. Specifically, GetVar and Status allowed users to do this
by setting their variable/s options to the SHELL or EVAL functions.
Also, within 1.8, 10, and trunk there was a similar flaw with the Originate action that
allowed users with originate permission to run MixMonitor and supply a shell command
in the Data argument. That flaw is fixed in those versions of this patch.

(closes issue ASTERISK-17465)
Reported By: David Woolley
Patches:
	162_ami_readfunc_security_r2.diff uploaded by jrose (license 6182)
	18_ami_readfunc_security_r2.diff uploaded by jrose (license 6182)
	10_ami_readfunc_security_r2.diff uploaded by jrose (license 6182)
........

Merged revisions 363117 from http://svn.asterisk.org/svn/asterisk/branches/1.6.2
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@363159 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-23 14:48:22 +00:00
Matthew Jordan e8e12afc6a AST-2012-006: Fix crash in UPDATE handling when no channel owner exists
If Asterisk receives a SIP UPDATE request after a call has been terminated and
the channel has been destroyed but before the SIP dialog has been destroyed, a
condition exists where a connected line update would be attempted on a
non-existing channel.  This would cause Asterisk to crash.  The patch resolves
this by first ensuring that the SIP dialog has an owning channel before
attempting a connected line update.  If an UPDATE request is received and no
channel is associated with the dialog, a 481 response is sent.

(closes issue ASTERISK-19770)
Reported by: Thomas Arimont
Tested by: Matt Jordan
Patches:
  ASTERISK-19278-2012-04-16.diff uploaded by Matt Jordan (license 6283)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@363108 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-23 14:10:19 +00:00
Matthew Jordan c37c7b4a2c AST-2012-005: Fix remotely exploitable heap overflow in keypad button handling
When handling a keypad button message event, the received digit is placed into
a fixed length buffer that acts as a queue.  When a new message event is
received, the length of that buffer is not checked before placing the new digit
on the end of the queue.  The situation exists where sufficient keypad button
message events would occur that would cause the buffer to be overrun.  This
patch explicitly checks that there is sufficient room in the buffer before
appending a new digit.

(closes issue ASTERISK-19592)
Reported by: Russell Bryant
........

Merged revisions 363100 from http://svn.asterisk.org/svn/asterisk/branches/1.6.2
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@363105 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-23 13:53:24 +00:00
Russell Bryant eb0a8df41c res_corosync: Recover if corosync gets restarted.
If corosync gets restarted while Asterisk is running, automatically recover.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@363046 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-21 11:45:28 +00:00
Russell Bryant 41826d203c res_corosync: reimplement "corosync show members" command.
Reimplement the "corosync show members" CLI command using a CPG iterator
instead of the cpg_membership_get API call.  This will also show all
CPG members, including those in groups other than 'asterisk', which may
be useful at some point for debugging purposes.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@363045 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-21 11:40:42 +00:00
Richard Mudgett c870dad57e Update app_dial M and U option GOTO return value documentation.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362999 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-21 01:46:34 +00:00
Richard Mudgett 3a874139d4 Fix connected-line/redirecting interception gosubs executing more than intended.
* Redo ast_app_run_sub()/ast_app_exec_sub() to use a known return point so
execution will stop after the routine returns there.
(s@gosub_virtual_context:1)

* Create ast_app_exec_macro() and ast_app_exec_sub() to run the macro and
gosub application respectively with the parameter string already created.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362962 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-20 23:29:56 +00:00
Richard Mudgett e6d08d92e3 Move debug message in ast_rtp_instance_early_bridge_make_compatible().
Move debug message in ast_rtp_instance_early_bridge_make_compatible() to
be output when what it states has actually happened.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362920 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-20 16:57:09 +00:00
Michael L. Young 255214c5da Add missing payload type to events API
The Security Events Framework API was changed while adding the generation of
security events in chan_sip.  A payload type and name was missed from being
added to struct ie_maps.

(closes issue ASTERISK-19759)
Reported by: Michael L. Young
Patches:
    issue-asterisk-19759.diff uploaded by Michael L. Young (license 5026)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362919 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-20 16:50:38 +00:00
Richard Mudgett 01194c5811 Use ast_channel_lock_both() where it was inlined before.
The CHANNEL_DEADLOCK_AVOIDANCE() feature of preserving where the channel
lock was originally obtained is overkill where ast_channel_lock_both() was
inlined.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362888 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-20 16:23:01 +00:00
Richard Mudgett b43f4a60dd * Add more information to some messages in __ast_pbx_run().
* Simplify some dialplan priority setting code in ast_explicit_goto()
because of opaquification.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362867 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-20 16:04:37 +00:00
Terry Wilson 34d670f786 Document Speech* apps hangup on failure and suggest TryExec
The Speech API apps return -1 on failure, which will hang up the channel. This
may not be desirable behavior for some, but it isn't something that can be
changed without breaking people's dialplans or writing an option to all of the
Speech apps that does what TryExec already does. This patch documents the
hangup behavior of the apps, and suggests TryExec as the solution.

(closes issue AST-813)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362817 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-20 14:50:42 +00:00
Richard Mudgett 73f48997f9 Add original party id and reason support.
ISDN ETSI PTP and Q.SIG (And SS7 in future) have support for reporting who
was the original redirecting party of a call.

* Added support for the original redirecting party and reason to the
REDIRECTING function and the system core as well as to the stubbed
locations in sig_pri.c.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362779 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-20 00:57:13 +00:00
Walter Doekes 92ca507d72 Fix documentation for ${VERSION(ASTERISK_VERSION_NUM)}.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362731 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-19 22:01:20 +00:00