]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
11 years agopbx.c: prevent potential crash from recursive replace()
Scott Griepentrog [Wed, 21 May 2014 19:05:32 +0000 (19:05 +0000)] 
pbx.c: prevent potential crash from recursive replace()

Recurisve usage of replace() resulted in corruption of the
temporary string storage and potential crash.  By changing
the string to be allocated separtely per instance, this is
eliminated.

ASTERISK-23650 #comment Reported by: Roel van Meer
ASTEIRSK-23650 #close

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@414215 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agochan_ooh323: fix h323_log full path name
Alexandr Anikin [Mon, 19 May 2014 13:37:27 +0000 (13:37 +0000)] 
chan_ooh323: fix h323_log full path name

* fix to use astlogdir option for h323_log file instead of hardcoded

ASTERISK-23754 #close

Reported by: Igor Goncharovsky
Patches:
ooh323_logger_patch.diff
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@414153 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agochan_dahdi: Fix analog dialtone detection.
Richard Mudgett [Fri, 16 May 2014 20:03:46 +0000 (20:03 +0000)] 
chan_dahdi: Fix analog dialtone detection.

* Check if waitingfordt (waitfordialtone) is enabled in dahdi_read() to
allow the DSP to operate early enough to detect dialtone.

* Made use the correct variable in my_check_waitingfordt().

ASTERISK-23709 #close
Reported by: Steve Davies
Patches:
      dialtone_detect_fix (license #5012) patch uploaded by Steve Davies

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@414068 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agosig_pri.c: Pull the pri_dchannel() PRI_EVENT_RING case into its own function.
Richard Mudgett [Fri, 16 May 2014 17:23:42 +0000 (17:23 +0000)] 
sig_pri.c: Pull the pri_dchannel() PRI_EVENT_RING case into its own function.

* Populate the CALLERID(ani2) value (and the special CALLINGANI2 channel
variable) with the ANI2 value in addition to the PRI specific ANI2 channel
variable.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@414050 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoapp_meetme: Fix overwrite of DAHDI conference data structure.
Richard Mudgett [Thu, 15 May 2014 21:44:34 +0000 (21:44 +0000)] 
app_meetme: Fix overwrite of DAHDI conference data structure.

Starting a conference recording using the admin menu overwrites the DAHDI
conference data structure used to modify the admin user's conference mute
mode.

* Made no longer pass the user's DAHDI conference data structure into the
menu functions.  The menu now uses its own DAHDI conference data
structure to start the recording channel.

* Moved the unlock conf->playlock to before playing the conf-full message.
No sense keeping the lock while that prompt is playing.  The user is never
going to get into the conference at that point.
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413992 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoBlocked revisions 413949
Walter Doekes [Thu, 15 May 2014 15:51:42 +0000 (15:51 +0000)] 
Blocked revisions 413949

> Apparently this was already fixed in Asterisk 11.
> https://reviewboard.asterisk.org/r/1944/ (r368519, 2012-06-05 16:41:43 +0200)
........
chan_local+app_dial: Propagagate call answered elsewhere over local channels.

AST_FLAG_ANSWERED_ELSEWHERE was not propagated back from local channels.
It is now. That means that when a call is picked up from a callgroup of
local channels, the other channels will now properly see it as "picked up".

This occurs when you use a construct like Dial(Local/a@context&Local/b@context)
where a@context and b@context dial two chan_sip devices respectively. If one
device picks up, the other will not see "1 missed call" anymore. In this
respect, it now behaves the same as when doing Dial(SIP/a&SIP/b).

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413950 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agores_musiconhold: Minor cleanup.
Walter Doekes [Wed, 14 May 2014 15:31:27 +0000 (15:31 +0000)] 
res_musiconhold: Minor cleanup.

Fix a few free()'s that should be ast_free()'s. Reverted an old
workaround that isn't necessary. Reorder a tiny bit of code.
Remove a bit of commented-out code.

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413895 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agochan_sip: Add TLS and SRTP status to CLI command 'sip show channel'
Jonathan Rose [Tue, 13 May 2014 17:40:00 +0000 (17:40 +0000)] 
chan_sip: Add TLS and SRTP status to CLI command 'sip show channel'

ASTERISK-23564 #close
Reported by: Patrick Laimbock
Review: https://reviewboard.asterisk.org/r/3474/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413876 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agochan_sip+CEL: Add missing ANSWER and PICKUP events to INVITE/w/replaces pickup.
Walter Doekes [Tue, 13 May 2014 14:34:31 +0000 (14:34 +0000)] 
chan_sip+CEL: Add missing ANSWER and PICKUP events to INVITE/w/replaces pickup.

When doing a "BLF-style call pickup" -- an INVITE with Replaces: header -- the
CEL log would lack the ANSWER and PICKUP events.

This patch adds the two missing events to the handle_invite_replaces() function.

ASTERISK-22977 #close
Review: https://reviewboard.asterisk.org/r/3073/
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413838 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoh264: Fix H264 SDP payload format.
Walter Doekes [Tue, 13 May 2014 13:50:10 +0000 (13:50 +0000)] 
h264: Fix H264 SDP payload format.

https://tools.ietf.org/html/rfc3984#section-8.1 says profile-level-id
takes 3 bytes in base16 (6 hex digits).

This fixes video setup in certain cases.

ASTERISK-23664 #close
ASTERISK-23664 #comment Patch r3530.patch uploaded by Guillaume Maudoux.
Review: https://reviewboard.asterisk.org/r/3530/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413791 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agortp: Fix case typo in H263+ mime.
Walter Doekes [Tue, 13 May 2014 13:32:46 +0000 (13:32 +0000)] 
rtp: Fix case typo in H263+ mime.

http://tools.ietf.org/html/rfc3555#section-4.2.6 says the canonical
mime subtype is "H263-1998", not "h263-1998". Original code was added
in r183101 on 2009-03-19 02:26:50 +0100.

This fixes issues with Polycom phones.

ASTERISK-23665 #close
ASTERISK-23665 #comment Patch r3529.patch uploaded by Guillaume Maudoux, backported by me.
Review: https://reviewboard.asterisk.org/r/3529/
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413788 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agochan_dahdi/sig_pri: Prevent unnecessary PROGRESS events when overlap dialing is enabled.
Richard Mudgett [Mon, 12 May 2014 23:48:13 +0000 (23:48 +0000)] 
chan_dahdi/sig_pri: Prevent unnecessary PROGRESS events when overlap dialing is enabled.

When overlap dialing is enabled, the lack of inband audio available
information in the SETUP_ACKNOWLEDGE events causes an interoperability
problem with SIP.  sig_pri doesn't know if there is dialtone present when
a SETUP_ACKNOWLEDGE is received so it assumes it is there and posts an
AST_CONTROL_PROGRESS frame.  The SIP channel driver then sends out a 183
Session Progress and blocks the desired 180 Ringing message when the
ALERTING message comes in.

* Made the configure script detect if the installed version of libpri
supports the SETUP_ACKNOWLEDGE enhancements.

* Using the new API, made generate an AST_CONTROL_PROGRESS frame on an
incoming SETUP_ACKNOWLEDGE message when the message indicates inband audio
is present instead of assuming that dialtone is present.

* Using the new API, made SETUP_ACKNOWLEDGE send out an inband audio
available indication only if dialtone is expected.  The change also makes
the fallback behaviour of sending the PROGRESS message better by sending
it only if dialtone is expected.

* Changed receiving a PROCEEDING message to not generate an
AST_CONTROL_PROGRESS frame if the progress indication ie indicates
non-end-to-end-ISDN.  This helps interoperability with SIP.

* Changed sending a PROCEEDING message in response to an
AST_CONTROL_PROCEEDING frame to not indicate inband audio available.  It
was silly to do so anyway because the channel driver doesn't know if
inband audio is even available.  This helps interoperability with SIP.

This patch and a corresponding change in libpri work together to allow
Asterisk to control the inband audio available progress indication ie on
the SETUP_ACKNOWLEDGE message when dialtone is present.

AST-1338 #close
Reported by: Tyler Stewart

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413765 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoapp_chanspy: Fix a test that was failing on account of r413551
Jonathan Rose [Mon, 12 May 2014 22:02:34 +0000 (22:02 +0000)] 
app_chanspy: Fix a test that was failing on account of r413551

ASTERISK-23381 #close
ASTERISK-23381 #comment Reported by: Robert Moss
Review: https://reviewboard.asterisk.org/r/3505/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413710 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoBlocked revisions 413591
Kinsey Moore [Mon, 12 May 2014 12:06:08 +0000 (12:06 +0000)] 
Blocked revisions 413591

........
Fix 32bit build for chan_sip

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413695 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFix 32bit build for func_env
Kinsey Moore [Fri, 9 May 2014 23:08:38 +0000 (23:08 +0000)] 
Fix 32bit build for func_env
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413595 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoAllow Asterisk to compile under GCC 4.10
Kinsey Moore [Fri, 9 May 2014 22:28:40 +0000 (22:28 +0000)] 
Allow Asterisk to compile under GCC 4.10

This resolves a large number of compiler warnings from GCC 4.10 which
cause the build to fail under dev mode. The vast majority are
signed/unsigned mismatches in printf-style format strings.
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413587 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoapp_chanspy: Fix a bug where Barge mode could fail
Jonathan Rose [Fri, 9 May 2014 16:10:14 +0000 (16:10 +0000)] 
app_chanspy: Fix a bug where Barge mode could fail

If the barge audiohook was attached prior to the spyee and its peer
actually being bridged, the audiohook would not be applied and the
connected peer would not be able to hear audio from the spy when the
spy is in barge mode.

(closes issue ASTERISK-23381)
Reported by: Robert Moss
Review: https://reviewboard.asterisk.org/r/3505/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413551 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoapp_queue: Extend documentation for various Manager actions and events.
Joshua Colp [Thu, 8 May 2014 00:34:43 +0000 (00:34 +0000)] 
app_queue: Extend documentation for various Manager actions and events.
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413486 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoapp_confbridge: Fix ref leak in CLI "confbridge kick" command.
Richard Mudgett [Wed, 7 May 2014 20:29:09 +0000 (20:29 +0000)] 
app_confbridge: Fix ref leak in CLI "confbridge kick" command.

Fixed ref leak in the CLI "confbridge kick" command when the channel to be
kicked was not in the conference.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413451 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFix encoding of custom prepare extra data.
Mark Michelson [Wed, 7 May 2014 17:48:55 +0000 (17:48 +0000)] 
Fix encoding of custom prepare extra data.

Patches:
res_config_odbc-take2.patch by John Hardin (License #6512)
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413397 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoEnsure that all parts of SQL UPDATEs and DELETEs are encoded.
Mark Michelson [Tue, 6 May 2014 17:01:30 +0000 (17:01 +0000)] 
Ensure that all parts of SQL UPDATEs and DELETEs are encoded.

Patches:
res_config_odbc.patch by John Hardin (License #6512)
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413305 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoPrevent crashes in res_config_odbc due to uninitialized string fields.
Mark Michelson [Fri, 2 May 2014 20:25:00 +0000 (20:25 +0000)] 
Prevent crashes in res_config_odbc due to uninitialized string fields.

Patches:
    odbc-crash.patch by John Hardin (License #6512)
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413251 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoReturn the number of rows affected by a SQL insert, rather than an object ID.
Mark Michelson [Fri, 2 May 2014 19:50:07 +0000 (19:50 +0000)] 
Return the number of rows affected by a SQL insert, rather than an object ID.

The realtime API specifies that the store callback is supposed to return the number
of rows affected. res_config_pgsql was instead returning an Oid cast as an int, which
during any nominal execution would be cast to 0. Returning 0 when more than 0 rows were
inserted causes problems to the function's callers.

To give an idea of how strange code can be, this is the necessary code change to fix
a device state issue reported against chan_pjsip in Asterisk 12+. The issue was that
the registrar would attempt to insert contacts into the database. Because of the 0
return from res_config_pgsql, the registrar would think that the contact was not successfully
inserted, even though it actually was. As such, even though the contact was query-able
and it was possible to call the endpoint, Asterisk would "think" the endpoint was unregistered,
meaning it would report the device state as UNAVAILABLE instead of NOT_INUSE.

The necessary fix applies to all versions of Asterisk, so even though the bug reported
only applies to Asterisk 12+, the code correction is being inserted into 1.8+.

Closes issue ASTERISK-23707
Reported by Mark Michelson
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413225 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agochan_sip.c: Fixed off-nominal message iterator ref count and alloc fail issues.
Richard Mudgett [Wed, 30 Apr 2014 20:26:16 +0000 (20:26 +0000)] 
chan_sip.c: Fixed off-nominal message iterator ref count and alloc fail issues.

* Fixed early exit in sip_msg_send() not destroying the message iterator.

* Made ast_msg_var_iterator_next() and ast_msg_var_iterator_destroy()
tolerant of a NULL iter parameter in case ast_msg_var_iterator_init()
fails.

* Made ast_msg_var_iterator_destroy() clean up any current message data
ref.

* Made struct ast_msg_var_iterator, ast_msg_var_iterator_init(),
ast_msg_var_iterator_next(), ast_msg_var_unref_current(), and
ast_msg_var_iterator_destroy() use iter instead of i.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413139 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoWebsocket: Add session locking and delay close
Kinsey Moore [Wed, 30 Apr 2014 13:04:14 +0000 (13:04 +0000)] 
Websocket: Add session locking and delay close

This resolves a race condition where data could be written to a NULL
FILE pointer causing a crash as a websocket connection was in the
process of shutting down by adding locking to websocket session writes
and by deferring session teardown until session destruction.

(closes issue ASTERISK-23605)
Review: https://reviewboard.asterisk.org/r/3481/
Reported by: Matt Jordan

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413123 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agores_rtp_asterisk: Add support for DTLS handshake retransmissions
Matthew Jordan [Fri, 25 Apr 2014 17:47:21 +0000 (17:47 +0000)] 
res_rtp_asterisk: Add support for DTLS handshake retransmissions

On congested networks, it is possible for the DTLS handshake messages to get
lost. This patch adds a timer to res_rtp_asterisk that will periodically
check to see if the handshake has succeeded. If not, it will retransmit the
DTLS handshake.

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

ASTERISK-23649 #close
Reported by: Nitesh Bansal
patches:
  dtls_retransmission.patch uploaded by Nitesh Bansal (License 6418)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@413008 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agohttp: Fix spurious ERROR message in responses with no content.
Richard Mudgett [Wed, 23 Apr 2014 17:51:19 +0000 (17:51 +0000)] 
http: Fix spurious ERROR message in responses with no content.

Backport -r411687 and fix the fix because content_length is the length of
out plus the length of the file controlled by fd.

When a response has an out content length of 0, fwrite would be called to
write a buffer with no data in it.  This resulted in the following classic
error message:

  [Apr  3 11:49:17] ERROR[26421] http.c: fwrite() failed: Success

This patch makes it so that we only attempt to write the content of out if
the out string is non-zero.
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@412923 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agochan_sip: trust_id_outbound CHANGES message improvement
Jonathan Rose [Mon, 21 Apr 2014 17:53:29 +0000 (17:53 +0000)] 
chan_sip: trust_id_outbound CHANGES message improvement

(closes issue AST-1301)

(closes issue ASTERISK-19465)
Reported by: Krzysztof Chmielewski
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@412822 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoTypo in CHANGES
Jonathan Rose [Mon, 21 Apr 2014 16:22:50 +0000 (16:22 +0000)] 
Typo in CHANGES
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@412767 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoHTTP: Add TCP_NODELAY to accepted connections
Kinsey Moore [Mon, 21 Apr 2014 16:13:36 +0000 (16:13 +0000)] 
HTTP: Add TCP_NODELAY to accepted connections

This adds the TCP_NODELAY option to accepted connections on the HTTP
server built into Asterisk. This option disables the Nagle algorithm
which controls queueing of outbound data and in some cases can cause
delays on receipt of response by the client due to how the Nagle
algorithm interacts with TCP delayed ACK. This option is already set on
all non-HTTP AMI connections and this change would cover standard HTTP
requests, manager HTTP connections, and ARI HTTP requests and
websockets in Asterisk 12+ along with any future use of the HTTP
server.

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@412748 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agochan_sip: Add sendrpid trust options
Jonathan Rose [Mon, 21 Apr 2014 15:51:40 +0000 (15:51 +0000)] 
chan_sip: Add sendrpid trust options

In r411189, some behavior was changed which made sendrpid behavior
act in a more trusting manner by sending full user data for peers
set with private caller presence in P-Asserted-Identity headers.
Since this changed long time expected behaviors, we decided to pull
that patch when that was pointed out by the community. Instead, this
patch provides a trust_id_outbound setting which will expose the data
per RFC-3325 if set to 'yes' and simply not send the PAI/RPID headers
at all if set to 'no'. By default trust_id_outbound will be set to
'legacy' which will preserve the behavior prior to these patches.
Extra special thanks to Walter Doekes for providing advice and
feedback.

(closes issue AST-1301)

(closes issue ASTERISK-19465)
Reported by: Krzysztof Chmielewski

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@412746 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFix wrong dialtone. The "modulation" should not be referenced for tone+tone as it...
Igor Goncharovskiy [Mon, 21 Apr 2014 08:29:39 +0000 (08:29 +0000)] 
Fix wrong dialtone. The "modulation" should not be referenced for tone+tone as it refers to the on-off characteristic - this often resulted in a single tone rather than the multitone as in the UK.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@412712 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoapp_sms: Fix uninitialized values; hangup channel when REL is sent successfully
Matthew Jordan [Sat, 19 Apr 2014 01:02:08 +0000 (01:02 +0000)] 
app_sms: Fix uninitialized values; hangup channel when REL is sent successfully

This patch fixes two issues in app_sms:
(1) Firstly, the 'flags' field on the stack in sms_exec() is uninitialised,
    causing it to use the wrong protocol in some cases. This patch correctly
    initializes the flags fields.

(2) Secondly, when disconnect supervision is not working or
    inbanddisconnect=yes is set in chan_dahdi.conf, app_sms was failing to
    terminate the call after it sent the REL(ease) message and the peer stopped
    talking to it. This patch fixes the code to handle the 'bad stop bit'
    message more gracefully in that case, and hang up the call.

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

ASTERISK-18331 #close
Reported by: David Woodhouse
patches:
  asterisk-fix-sms.patch uploaded by David Woodhouse (License 5754)
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@412656 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agosounds: Fix Sounds Makefile and XML that didn't support new sound prompt sets
Rusty Newton [Fri, 18 Apr 2014 17:15:27 +0000 (17:15 +0000)] 
sounds: Fix Sounds Makefile and XML that didn't support new sound prompt sets

In sounds/Makefile

 1 Adds and moves some lines necessary for the en_GB core set. I'm just following how the other sets are defined here.
 2 removes the ES extra sounds related lines as we don't have ES extra sound sets.

In sounds/sounds.xml

 3 Adds member definitons for EN_AU, EN_GB, IT for core sound sets, and EN_GB in extra sound sets

ASTERISK-23550 #close
Review: https://reviewboard.asterisk.org/r/3464/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@412586 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoBlocked revisions 412480
Matthew Jordan [Thu, 17 Apr 2014 20:23:46 +0000 (20:23 +0000)] 
Blocked revisions 412480

........
channels/chan_oss: Fix compilation problem on SmartOS/Illumos/SunOS

THis patch fixes an issue in chan_oss when building on certain platforms. It
ensures that soundcard.h is found.

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

Note that this patch is a part of the patch on ASTERISK-23576; the Makefile
portion only applies to Asterisk 11+.

(issue ASTERISK-23576)
Reported by: Sebastian Wiedenroth
patches:
  fix-sunos.diff uploaded by Sebastian Wiedenroth (License 6597)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@412482 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agomain/Makefile: Fix build failure on SmartOS/Illumos/SunOS
Matthew Jordan [Thu, 17 Apr 2014 20:06:11 +0000 (20:06 +0000)] 
main/Makefile: Fix build failure on SmartOS/Illumos/SunOS

This patch fixes two issues when building on SmartOS:

- channels/chan_oss.c: it makes sure soundcard.h is found
- main/Makefile: only use "-Wl,--version-script" when GNU LD is used as the Sun
  Linker doesn't support that. Similar checks are already used elswhere in the
  Makefile

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

ASTERISK-23576 #close
Reported by: Sebastian Wiedenroth
patches:
  fix-sunos.diff uploaded by Sebastian Wiedenroth (License 6597)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@412468 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agochan_sip.c: Moved some sip_pvt unrefs after their last use.
Richard Mudgett [Tue, 15 Apr 2014 16:23:12 +0000 (16:23 +0000)] 
chan_sip.c: Moved some sip_pvt unrefs after their last use.

* Moved sip_pvt unref in ast_hangup() and handle_request_do() to the end
of the function.  The unref needs to happen after the last use of the
pointer.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@412348 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoReverting r411189 so that it can be put up for public review
Jonathan Rose [Tue, 15 Apr 2014 15:40:01 +0000 (15:40 +0000)] 
Reverting r411189 so that it can be put up for public review

---
  r411189 | jrose | 2014-03-26 10:50:48 -0500 (Wed, 26 Mar 2014) | 12 lines

  chan_sip: Send real CallerID information with P-Assserted-Identity (RFC-3325)

  Prior to this patch, the P-Asserted-Identity header would include anonymous
  caller id information which seems to go against the point of the
  P-Asserted-Identity header. Now the real caller ID information will be
  included in this header. Also, no privacy header would be included.
  This patch adds 'Privacy: id' to outgoing SIP messages that include the
  P-Asserted-Identity header.

  (closes issue AST-1301)
---
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@412329 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoautoservice: fix reference leak of logger callid.
Corey Farrell [Mon, 14 Apr 2014 15:50:30 +0000 (15:50 +0000)] 
autoservice: fix reference leak of logger callid.

autoservice acquires a local reference to the logger callid of each channel
in a loop.  This local reference was not released, causing the callid of
every channel in autoservice to leak.  This change moves the callid unref
inside the loop.

ASTERISK-23616 #close
Reported by: ibercom

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@412305 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoapp_stack: Add missing unlock in off-nominal path of STACK_PEEK function.
Richard Mudgett [Fri, 11 Apr 2014 21:38:53 +0000 (21:38 +0000)] 
app_stack: Add missing unlock in off-nominal path of STACK_PEEK function.

ASTERISK-23620 #close
Reported by: Bradley Watkins
Patches:
      ASTERISK-23620_unlock_oldlist.patch (license #5021) patch uploaded by Bradley Watkins
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@412226 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agomain/astobj2: Make REF_DEBUG a menuselect item; improve REF_DEBUG output
Matthew Jordan [Fri, 11 Apr 2014 02:10:22 +0000 (02:10 +0000)] 
main/astobj2: Make REF_DEBUG a menuselect item; improve REF_DEBUG output

This patch does the following:
(1) It makes REF_DEBUG a meneselect item. Enabling REF_DEBUG now enables
    REF_DEBUG globally throughout Asterisk.
(2) The ref debug log file is now created in the AST_LOG_DIR directory.
    Every run will now blow away the previous run (as large ref files
    sometimes caused issues). We now also no longer open/close the file
    on each write, instead relying on fflush to make sure data gets written
    to the file (in case the ao2 call being performed is about to cause a
    crash)
(3) It goes with a comma delineated format for the ref debug file. This
    makes parsing much easier. This also now includes the thread ID of the
    thread that caused ref change.
(4) A new python script instead for refcounting has been added in the
    contrib/scripts folder.

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@412115 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoInternal timing: Add notice that the -I and internal_timing option are no longer...
Richard Mudgett [Tue, 8 Apr 2014 21:20:09 +0000 (21:20 +0000)] 
Internal timing: Add notice that the -I and internal_timing option are no longer needed.

Add notice messages during execution that the -I command line option and
the astersik.conf internal_timing option are no longer needed.  The
internal timing functionality is now always enabled if there is a timing
module loaded.

NOTE: Since the command line options and the asterisk.conf config file are
processed before the logging system is initialized, the messages are
output to stderr.

Change requested as a result of asterisk-dev list comments about the
commit for ASTERISK-22846 that removed the -I and internal_timing options.

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@411974 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoconfig: Fix CB_ADD_LEN() to work as originally intended.
Richard Mudgett [Tue, 8 Apr 2014 20:50:45 +0000 (20:50 +0000)] 
config: Fix CB_ADD_LEN() to work as originally intended.

Fix a long standing bug in CB_ADD_LEN() behaving like CB_ADD().

ASTERISK-23546 #close
Reported by: Walter Doekes
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@411961 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoapp_confbridge: Fix confbridge.conf dsp_talking_threshold option setting wrong parameter.
Richard Mudgett [Tue, 8 Apr 2014 17:58:49 +0000 (17:58 +0000)] 
app_confbridge: Fix confbridge.conf dsp_talking_threshold option setting wrong parameter.

Fixed copy pasta error.

ASTERISK-23545 #close
Reported by: John Knott

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@411944 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoconfigs: Clean up long line and typo in res_odbc.conf.sample.
Walter Doekes [Mon, 7 Apr 2014 14:48:07 +0000 (14:48 +0000)] 
configs: Clean up long line and typo in res_odbc.conf.sample.
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@411808 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agointernal_timing: Remove the option and always make it enabled if a timing module...
Richard Mudgett [Fri, 4 Apr 2014 18:46:18 +0000 (18:46 +0000)] 
internal_timing: Remove the option and always make it enabled if a timing module is loaded.

The masquerade supertest frequently fails because either the local channel
chain doesn't completely optimize out or the DTMF handshake doesn't
completely get accross.  Local channel optimization requires frames
flowing to trigger when optimization can happen.  When optimization
happens the media frame that triggered the optimization is dropped.
Sending DTMF requires frames to flow in the other direction for timing
purposes while sending nothing.  If internal timing is not enabled when
MOH is playing, Asterisk switches to received timing when an audio frame
is received.  With optimization dropping media frames and MOH not sending
frames unless it receives frames, occasionaly there are no more frames
being passed and the test fails.

* The asterisk command line -I option and the asterisk.conf
internal_timing option are removed.  Asterisk now always uses internal
timing when needed if any timing module is loaded.  The issue
ASTERISK-14861 did this quite awhile ago in v1.4 but effectively is broken
if other internal timing modules besides DAHDI are used.  The
ast_read_generator_actions() now only does received timing if it has no
choice for frame generators like MOH, silence, and playback streaming.

* Cleaned up some code dealing with frame generators in
ast_deactivate_generator(), generator_write_format_change(),
ast_activate_generator(), and ast_channel_stop_silence_generator().

ASTERISK-22846 #close
Reported by: Matt Jordan

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@411716 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoapp_voicemail: fix missing symbol
Corey Farrell [Tue, 1 Apr 2014 20:43:57 +0000 (20:43 +0000)] 
app_voicemail: fix missing symbol

ASTERISK-23391 caused a regression where the symbol 'defaultlanguage'
was used by app_voicemail but not exported by main/asterisk.  This
change renames the variable to ast_defaultlanguage.  The variable was
already renamed in Asterisk 12+.

(closes issue ASTERISK-23559)
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/3408/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@411633 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoapp_queue: Fix a bug where realtime members would be deleted during reload causing...
Joshua Colp [Tue, 1 Apr 2014 16:49:44 +0000 (16:49 +0000)] 
app_queue: Fix a bug where realtime members would be deleted during reload causing waiting callers to get ejected.

This patch causes realtime queue members to remain in queues during the reload process. Previously these
members would be removed causing any waiting callers to be ejected from the queue with a reason of "EXITEMPTY".

ASTERISK-23547 #close
ASTERISK-23547 #comment Patch app_queue_fix_realtime_reload_1.8_trunk.patch submitted by Italo Rossi (license 6409)

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@411585 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoprocess stack command even if gatekeeper client isn't register
Alexandr Anikin [Fri, 28 Mar 2014 17:44:11 +0000 (17:44 +0000)] 
process stack command even if gatekeeper client isn't register
don't destroy gatekeeper client if it is not started
don't destroy gatekeeper client in some sort of gatekeeper errors
signal rtp create condition when call cleared before rtp structure created

(closes issue ASTERISK-23460)

Reported by: Dmitry Melekhov
Patches:
ASTERISK-23460-2.patch

Tested by: Dmitry Melekhov

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@411531 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agohttp: response body often missing after specific request
Scott Griepentrog [Fri, 28 Mar 2014 16:16:53 +0000 (16:16 +0000)] 
http: response body often missing after specific request

This patch works around a problem with the HTTP body
being dropped from the response to a specific client
and under specific circumstances:

a) Client request comes from node.js user agent
   "Shred" via use of swagger-client library.

b) Asterisk and Client are *not* on the same
   host or TCP/IP stack

In testing this problem, it has been determined that
the write of the HTTP body is lost, even if the data
is written using low level write function.  The only
solution found is to instruct the TCP stack with the
shutdown function to flush the last write and finish
the transmission.  See review for more details.

ASTERISK-23548 #close
(closes issue ASTERISK-23548)
Reported by: Sam Galarneau
Review: https://reviewboard.asterisk.org/r/3402/
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@411463 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoUPGRADE: Note IAX2 compatibility issue between 1.4 and 1.8+ systems.
Matthew Jordan [Fri, 28 Mar 2014 15:43:42 +0000 (15:43 +0000)] 
UPGRADE: Note IAX2 compatibility issue between 1.4 and 1.8+ systems.
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@411458 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agores_config_odbc/res_odbc: Fix handling of non-text columns updates with empty values.
Matthew Jordan [Fri, 28 Mar 2014 04:27:02 +0000 (04:27 +0000)] 
res_config_odbc/res_odbc: Fix handling of non-text columns updates with empty values.

This patch fixes setting nullable integer columns to NULL instead of an empty
string, which fails for PostgreSQL, for example. The current code is supposed
to do so, but the check is broken. The patch also allows the first column in
the list to be a nullable integer.

This patch also adds a compatibility setting in res_odbc.conf,
allow_empty_string_in_nontext. It is enabled by default. It should be disabled
for database backends (such as PostgreSQL) that require NULL instead of an
empty string for Integer columns.

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

(issue ASTERISK-23459)
Reported by: zvision
patches:
  res_config_odbc.diff uploaded by zvision (License 5755)
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@411408 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agochan_sip: Add MESSAGE request to allowed methods
Matthew Jordan [Fri, 28 Mar 2014 03:51:34 +0000 (03:51 +0000)] 
chan_sip: Add MESSAGE request to allowed methods

The allowed methods advertised by chan_sip did not previously note the MESSAGE
request. Even in Asterisk 1.8, we do accept in-dialog MESSAGE requests; we
should advertise that we support MESSAGE requests.

ASTERISK-23504 #close
ASTERISK-23504 #comment Reported by: Martin Kontsek
ASTERISK-23504 #comment Patch sip.h_patch.diff uploaded by Martin Kontsek (license 6587)

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@411373 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFix dialplan function NULL channel safety issues
Corey Farrell [Thu, 27 Mar 2014 19:13:09 +0000 (19:13 +0000)] 
Fix dialplan function NULL channel safety issues

(closes issue ASTERISK-23391)
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/3386/
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@411314 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agomain/formats: Fix crash in ast_format_cmp during non-clean shutdown.
Corey Farrell [Thu, 27 Mar 2014 18:18:23 +0000 (18:18 +0000)] 
main/formats: Fix crash in ast_format_cmp during non-clean shutdown.

* Backport ast_register_cleanup from Asterisk 12.
* Use ast_register_cleanup for format_attr_shutdown.

ast_register_cleanup was originally commited in r390122 by dlee.

(closes issue ASTERISK-23103)
Reported by: JoshE

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@411310 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agosay: Fix a bug where SayNumber in Polish tries to play incorrect sound.
Joshua Colp [Wed, 26 Mar 2014 22:44:11 +0000 (22:44 +0000)] 
say: Fix a bug where SayNumber in Polish tries to play incorrect sound.

This change fixes a bug where calling SayNumber with a number divisible by
100 using the Polish language would cause the code to attempt to play a
sound file with an empty name.

(closes issue ASTERISK-23509)
Reported by: zvision

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@411244 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agochan_sip: Send real CallerID information with P-Assserted-Identity (RFC-3325)
Jonathan Rose [Wed, 26 Mar 2014 15:57:36 +0000 (15:57 +0000)] 
chan_sip: Send real CallerID information with P-Assserted-Identity (RFC-3325)

Prior too this patch, the P-Asserted-Identity header would include anonymous
caller id information which seems to go against the point of the
P-Asserted-Identity header. Now the real caller ID information will be
included in this header. Also, no privacy header would be included.
This patch adds 'Privacy: id' to outgoing SIP messages that include the
P-Asserted-Identity header.

(closes issue AST-1301)
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@411190 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agochan_sip: Fix incorrect use of timers
Kinsey Moore [Tue, 25 Mar 2014 15:52:55 +0000 (15:52 +0000)] 
chan_sip: Fix incorrect use of timers

If update_provisional_keepalive() is called while
send_provisional_keepalive_full() is waiting on the PVT lock, then
pvt->provisional_keepalive_sched_id will be changed to a new sched_id
value by update_provisional_keepalive(), but that new sched_id then may
be overwritten with -1 by send_provisional_keepalive_full(), killing
the pvt's reference to a schedule and "leaking" the reference.

(closes issue ASTERISK-22079)
Review: https://reviewboard.asterisk.org/r/3368/
Reported by: Jamuel Starkey, Matteo, Leif Madsen, Steve Davies
Patches:
    provisional_keepalive_fix.diff uploaded by Steve Davies (license 5012)
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@411089 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agochan_sip: Always use fromdomain if set for domain, even if callerid is set to restricted.
Joshua Colp [Mon, 24 Mar 2014 21:37:26 +0000 (21:37 +0000)] 
chan_sip: Always use fromdomain if set for domain, even if callerid is set to restricted.

(closes issue ASTERISK-20841)
Reported by: Kelly Goedert
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@411022 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoapp_confbridge: Fix bug - users with startmuted set don't start muted
Jonathan Rose [Thu, 20 Mar 2014 22:46:11 +0000 (22:46 +0000)] 
app_confbridge: Fix bug - users with startmuted set don't start muted

(closes issue ASTERISK-23461)
Reported by: Chico Manobela
Review: https://reviewboard.asterisk.org/r/3373/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@410965 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agores_fax_spandsp: Use g711_free() when available.
Sean Bright [Tue, 18 Mar 2014 11:50:13 +0000 (11:50 +0000)] 
res_fax_spandsp: Use g711_free() when available.

Per Johann Steinwendtner on the asterisk-dev mailing list:

http://lists.digium.com/pipermail/asterisk-dev/2014-March/066102.html

g711_free() was introduced in spandsp 0.0.6pre4 and g711_release() became a
noop.  I opted not to remove the call to g711_release() since it is harmless
and to call g711_free() if we have a sufficiently recent version of spandsp.

(issue ASTERISK-20149)
Reported by: Alexandr Gordeev

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@410829 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years ago!fixup: callerid: Logic error in checksum processing
Russ Meyerriecks [Mon, 17 Mar 2014 21:55:37 +0000 (21:55 +0000)] 
!fixup: callerid: Logic error in checksum processing

Fixes syntax error in previous commit :-(
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@410749 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agocallerid: Logic error in checksum processing
Russ Meyerriecks [Mon, 17 Mar 2014 21:19:49 +0000 (21:19 +0000)] 
callerid: Logic error in checksum processing

Callerid checksum-ing was being handled incorrectly here. When the checksum is
calculated to be 0x00, it will perform 0x100-0x00 which results in 0x100. This
value will then fail the otherwise correct callerid message.

This patch changes the logic to simply add the calculated checksum to the
transmitted 2's compliment checksum.

Review: https://reviewboard.asterisk.org/r/3356/
(closes issue ASTERISK-23488)
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@410717 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agomanager: fix memory leak in manager_add_filter function
Jonathan Rose [Fri, 14 Mar 2014 21:12:33 +0000 (21:12 +0000)] 
manager: fix memory leak in manager_add_filter function

(closes issue ASTERISK-23420)
Reported by: Etienne Lessard
Patches:
    manager_eventfilter_leak uploaded by Etienne Lessard (license 6394)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@410609 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoRemove an extra ast_cond_wait() that slipped through the patch.
Mark Michelson [Fri, 14 Mar 2014 20:53:02 +0000 (20:53 +0000)] 
Remove an extra ast_cond_wait() that slipped through the patch.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@410606 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoPrevent delayed astdb syncs.
Mark Michelson [Fri, 14 Mar 2014 15:56:43 +0000 (15:56 +0000)] 
Prevent delayed astdb syncs.

The syncing thread sleeps for a second before waiting to be
told to attempt to sync again. If a signal were sent during this
sleeping period, we would end up having to wait until the next
sync signal occurred in order to sync up the astdb.

This code rearrangement also ensures that any pending transactions
will be synced prior to Asterisk shutting down.

Patches: db_sync.patch by John Hardin (License #6512)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@410556 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoapp_confbridge: Make explicitly stop MOH if a user is kicked or hangs up while MOH...
Richard Mudgett [Wed, 12 Mar 2014 18:35:14 +0000 (18:35 +0000)] 
app_confbridge: Make explicitly stop MOH if a user is kicked or hangs up while MOH is playing.

When MOH is playing to a user in a conference and the user is kicked or
hangs up from the conference then the AMI MusicOnHoldStop events didn't
happen.  (Asterisk v11 AMI event: MusicOnHold, state:Stop)

(closes issue ASTERISK-23311)
Reported by: Benjamin Keith Ford

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@410490 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoAST-2014-001: Stack overflow in HTTP processing of Cookie headers.
Richard Mudgett [Mon, 10 Mar 2014 17:09:42 +0000 (17:09 +0000)] 
AST-2014-001: Stack overflow in HTTP processing of Cookie headers.

Sending a HTTP request that is handled by Asterisk with a large number of
Cookie headers could overflow the stack.

Another vulnerability along similar lines is any HTTP request with a
ridiculous number of headers in the request could exhaust system memory.

(closes issue ASTERISK-23340)
Reported by: Lucas Molas, researcher at Programa STIC, Fundacion; and Dr. Manuel Sadosky, Buenos Aires, Argentina
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@410381 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoAST-2014-002: chan_sip: Exit early on bad session timers request
Kinsey Moore [Mon, 10 Mar 2014 13:18:55 +0000 (13:18 +0000)] 
AST-2014-002: chan_sip: Exit early on bad session timers request

This change allows chan_sip to avoid creation of the channel and
consumption of associated file descriptors altogether if the inbound
request is going to be rejected anyway.

(closes issue ASTERISK-23373)
Reported by: Corey Farrell
Patches:
     chan_sip-earlier-st-1.8.patch uploaded by Corey Farrell (license 5909)
     chan_sip-earlier-st-11.patch uploaded by Corey Farrell (license 5909)
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@410311 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agochan_sip: Fix deadlock of monlock between unload_module and do_monitor
Corey Farrell [Fri, 7 Mar 2014 22:52:38 +0000 (22:52 +0000)] 
chan_sip: Fix deadlock of monlock between unload_module and do_monitor

Release monlock before calling pthread_join.  This ensures do_monitor
cannot freeze by locking monlock during module unload.

(closes issue ASTERISK-21406)
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/3284/
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@410225 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agochan_sip: Allow static realtime members to be qualified during module load.
Matthew Jordan [Fri, 7 Mar 2014 04:38:47 +0000 (04:38 +0000)] 
chan_sip: Allow static realtime members to be qualified during module load.

When a static realtime peer with qualify=yes is loaded, Asterisk will fail to
send an OPTIONS request due to the lastms being equal to 0. This results in
the peer being unable to receive calls from Asterisk because the status is
permanently UNKNOWN.

This patch allows an OPTIONS request to be sent during module load by
ignoring the lastms value on startup only.

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

(closes issue ASTERISK-17523)
Reported by: Maciej Krajewski
Tested by: wushumasters
patches:
  realtime_fix_11.7.0.txt uploaded by Trevor Peirce (license 6112)
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@410106 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agomoh: fix a refcount error with realtime MOH
Russell Bryant [Thu, 6 Mar 2014 23:15:42 +0000 (23:15 +0000)] 
moh: fix a refcount error with realtime MOH

I observed a crash in res_musiconhold on an Asterisk 11 system using realtime
MOH.  Investigation of the backtrace showed a corrupt mohclass, implying that
it got destroyed before the code expected it to.  I went looking for reference
counting errors that could have caused this crash and this patch this result.
It contains 2 changes.

1) Remove a usless block of code that was impossible to reach.  There was even
a comment indicating that it was impossible to reach.  The conditional includes
"!ast_test_flag(global_flags, MOH_CACHERTCLASSES)" and it's inside of an if
block with the opposite check "ast_test_flag(global_flags,
MOH_CACHERTCLASSES)".  There's no good reason to keep it around.

2) A similar block to #1 contained a reference counting error.  It stores
state->class in the local variable mohclass without increasing its reference
count.  The reference count on mohclass is decremented at the end of the
function.  This block of code probably very rarely runs, which would help
explain why this system was working fine for many months before experiencing a
crash.

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@410044 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agores_fax_spandsp: Fix crash when passing ulaw/alaw data to spandsp
Matthew Jordan [Thu, 6 Mar 2014 01:58:10 +0000 (01:58 +0000)] 
res_fax_spandsp: Fix crash when passing ulaw/alaw data to spandsp

When acting as a T.38 fax gateway, res_fax_spandsp would at times cause a crash
in libspandsp. This would occur when, during fax tone detection, a ulaw/alaw
frame would be passed to modem_connect_tones_rx. That particular routine
expects the data to be in slin format. This patch looks at the frame type and,
if the data is ulaw/alaw, converts the format to slin before passing it to
modem_connect_tones_rx.

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

(closes issue ASTERISK-20149)
Reported by: Alexandr Gordeev
Tested by: Michal Rybarik
patches:
  spandsp_g711decode.diff uploaded by Michal Rybarik (license 6578)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409990 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoconfig: Fix inverted test
Kinsey Moore [Wed, 5 Mar 2014 20:37:51 +0000 (20:37 +0000)] 
config: Fix inverted test

The test of the result of the stat() call was inverted such that its
output was only used if the call failed. This inverts the test so that
the output of stat() is used correctly. This was causing full reloads
on unchanged files.

(closes issue ASTERISK-23383)
Reported by: David Woolley
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409917 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFix documentation for PRESENCE_STATE to properly illustrate how to create a presence...
Mark Michelson [Wed, 5 Mar 2014 18:45:52 +0000 (18:45 +0000)] 
Fix documentation for PRESENCE_STATE to properly illustrate how to create a presence hint.

There was a missing comma.
This was discovered by Dan Kaplan.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409886 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoCorrected cross-platform stat nanosecond code
David M. Lee [Wed, 5 Mar 2014 16:55:52 +0000 (16:55 +0000)] 
Corrected cross-platform stat nanosecond code

When nanosecond time resolution was added for identifying config file
changes, it didn't cover all of the myriad of ways that one might obtain
nanosecond time resolution off of struct stat.

Rather than complicate the #if even further figuring out one system from
the next, this patch directly tests for the three struct members I know
about today, and #ifdef's accordingly.

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409834 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoBlocked revisions 409436
Walter Doekes [Wed, 5 Mar 2014 15:11:09 +0000 (15:11 +0000)] 
Blocked revisions 409436

........
buildsystem: Unbreak 'make -qp' on 1.8.

r408083 caused trouble with make -qp. Backport r408193 to 1.8 as well.

(closes issue ASTERISK-23382)
Reported by: Corey Farrell

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409829 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFix references to 'keys' CLI commands in astgenkey
Sean Bright [Wed, 5 Mar 2014 12:04:59 +0000 (12:04 +0000)] 
Fix references to 'keys' CLI commands in astgenkey
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409778 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoCorrect RTP handling in chan_unistim and fix transfer process broken in previous...
Igor Goncharovskiy [Wed, 5 Mar 2014 06:28:36 +0000 (06:28 +0000)] 
Correct RTP handling in chan_unistim and fix transfer process broken in previous fix:
- Fixed too early RTP setup with phone, that cause no ringback tone on caller side
- Handle call transfer cancel only in STATE_CALL case (related to ASTERISK-23073)

(Reported by: Németh Tamás, niurkin sil)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409761 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoAdd update_peer function to unistim_rtp_glue, improve other unistim_rtp_glue function...
Igor Goncharovskiy [Wed, 5 Mar 2014 05:54:11 +0000 (05:54 +0000)] 
Add update_peer function to unistim_rtp_glue, improve other unistim_rtp_glue functions conforming to other channel drivers. Do not forget auto-detected and user-selected phone settings on 'unistim reload'
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409745 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFix res/res_http_websocket.c build failure in 32bit due to incorrect print format...
Moises Silva [Wed, 5 Mar 2014 04:55:11 +0000 (04:55 +0000)] 
Fix res/res_http_websocket.c build failure in 32bit due to incorrect print format for uint64_t

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409703 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFix WebRTC over WSS not working
Moises Silva [Wed, 5 Mar 2014 00:25:44 +0000 (00:25 +0000)] 
Fix WebRTC over WSS not working

Several fixes for the WebSockets implementation in res/res_http_websocket.c

* Flush the websocket session FILE* as fwrite() may not actually guarantee sending
  the data to the network. If we do not flush, it seems that buffering on the SSL
  socket for outbound messages causes issues

* Refactored ast_websocket_read to take into account that SSL file descriptors
  may be ready to read via fread() but poll() will not actually say so because
  the data was already read from the network buffers and is now in the libc buffers

(closes issue ASTERISK-23099)
(closes issue ASTERISK-21930)
Review: https://reviewboard.asterisk.org/r/3248/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409681 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agofunc_audiohookinheritance: Check If A Channel Was Specified
Michael L. Young [Tue, 4 Mar 2014 19:33:31 +0000 (19:33 +0000)] 
func_audiohookinheritance: Check If A Channel Was Specified

This patch prevents a crash when using the function audiohookinheritance without
setting the channel.

(closes issue ASTERISK-23104)
Reported by: Joel Vandal
Tested by: Joel Vandal
Patches:
    asterisk-23104_audiohook_inherit_no_channel-11.diff
                                     uploaded by Michael L. Young (license 5026)

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409625 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoAO2: Add an assert for bad objects
Kinsey Moore [Tue, 4 Mar 2014 16:51:11 +0000 (16:51 +0000)] 
AO2: Add an assert for bad objects

This adds an assert that will only be active if Asterisk is compiled
with DO_CRASH and allows the testsuite to fail tests that would
otherwise require log file parsing.
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409567 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agores_rtp_asterisk: Fix one way audio problems with hold/unhold when using ICE
Jonathan Rose [Tue, 4 Mar 2014 16:40:39 +0000 (16:40 +0000)] 
res_rtp_asterisk: Fix one way audio problems with hold/unhold when using ICE

ICE sessions will now be restarted if sessions are changed to use new sets of
remote candidates.

(closes issue ASTERISK-22911)
Reported by: Vytis Valentinavičius
Review: https://reviewboard.asterisk.org/r/3275/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409565 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agortp_engine: Clean up after a failed remote bridge
Kinsey Moore [Tue, 4 Mar 2014 15:35:49 +0000 (15:35 +0000)] 
rtp_engine: Clean up after a failed remote bridge

Upon failure of an INVITE transaction meant to initiate a remote native
bridge, rtp_engine.c would not clean up non-reference-counted bridge
instance pointers leaving a dangling pointer which was being used to
perform a local native bridge after the other channel had hung up. This
lead to dereferencing into freed memory and plenty of AO2 errors. This
change allows the remote native bridge loop to clean up properly when
the bridge fails.

(closes issue ASTERISK-23310)
Reported by: Jeremy Laine
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409524 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMinor whitespace change to 'sip show peers' output.
Sean Bright [Tue, 4 Mar 2014 14:52:00 +0000 (14:52 +0000)] 
Minor whitespace change to 'sip show peers' output.

(closes issue ASTERISK-23406)
Reported by: ibercom
Tested by: ibercom
Patches:
    asterisk-11.patch uploaded by ibercom
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409473 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agodoxygen: Tweak the link back to ye olde Digium website
Matthew Jordan [Mon, 3 Mar 2014 02:07:20 +0000 (02:07 +0000)] 
doxygen: Tweak the link back to ye olde Digium website
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409362 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoMakefile: replace -O6 with -O3
Tzafrir Cohen [Sun, 2 Mar 2014 12:26:17 +0000 (12:26 +0000)] 
Makefile: replace -O6 with -O3

-O6 is not a legal option of gcc. Unofficially gcc considers it to be
equivalent of -O3. clang chalks on it, though. This commit sets the
default optimization flag to be -O3, like gcc actually considered it.

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409344 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agochan_sip: Add precautionary p->owner checks.
Richard Mudgett [Fri, 28 Feb 2014 21:30:50 +0000 (21:30 +0000)] 
chan_sip: Add precautionary p->owner checks.

* Add precautionary p->owner checks in sip_hangup(), get_refer_info(),
get_also_info(), and interpret_t38_parameters().

* Simplify some tangled logic in get_refer_info(), get_also_info(), and
add_rpid().

* Removed some dead code in handle_request_invite().

(closes issue ASTERISK-23323)
Reported by: Walter Doekes
Patches:
      issueA23323-more_p_owner_checks-1.8.x.patch (license #5674) uploaded by wdoekes (modified)
      issueA23323-more_p_owner_checks-11.x.patch (license #5674) uploaded by wdoekes (modified)
      issueA23323-more_p_owner_checks-12.x.patch (license #5674) uploaded by wdoekes (modified)
      issueA23323-more_p_owner_checks-trunk.patch (license #5674) uploaded by wdoekes (modified)
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409255 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoapp_queue: Fix documentation generation
Kinsey Moore [Fri, 28 Feb 2014 21:13:49 +0000 (21:13 +0000)] 
app_queue: Fix documentation generation

The documentation for QueueMemberPaused was causing documentation
generation to fail because the documentation for that AMI event was in
the wrong location. This moves that documentation the correct location
and adds a missing parameter.

(closes issue SWDAT-261)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409208 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agochan_sip: Fix crash in ast_channel_hangupcause_set().
Richard Mudgett [Fri, 28 Feb 2014 18:00:21 +0000 (18:00 +0000)] 
chan_sip: Fix crash in ast_channel_hangupcause_set().

* Fix crash in ast_channel_hangupcause_set() because p->owner not checked
before calling.  Regression introduced by the fix for ASTERISK-22621.

(closes issue ASTERISK-23135)
Reported by: OK

(issue ASTERISK-23323)
Reported by: Walter Doekes
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409157 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agores_rtp_asterisk: correct build error from r409129
Jonathan Rose [Thu, 27 Feb 2014 19:38:10 +0000 (19:38 +0000)] 
res_rtp_asterisk: correct build error from r409129

Accidentally placed a declaration below functional code

(issue ASTERISK-23213)
Reported by: Andrea Suisani
Review: https://reviewboard.asterisk.org/r/3256/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409130 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agores_rtp_asterisk: Fix checklist creating problems in ICE sessions
Jonathan Rose [Thu, 27 Feb 2014 19:19:02 +0000 (19:19 +0000)] 
res_rtp_asterisk: Fix checklist creating problems in ICE sessions

Prior to this patch, local candidate lists including SRFLX would fail to start
properly when building ICE candidate check lists. This patch fixes that problem
by making sure that each SRFLX candidate is associated with the proper
base address so that the check list can create matches properly.
This patch was written by jcolp. The issue will be left open to await testing
by the issue participants.

(issue ASTERISK-23213)
Reported by: Andrea Suisani
Review: https://reviewboard.asterisk.org/r/3256/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409129 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoFix memory stomping bug in astman.
David M. Lee [Thu, 27 Feb 2014 16:24:20 +0000 (16:24 +0000)] 
Fix memory stomping bug in astman.

This memset complained in dev mod on my Ubuntu box. The memset is both
unnecessary and dangerous. At this point, m hasn't been initialized
yet, so the memset will write off to whatever address happens to be
on the stack at the time.
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409083 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agores_fax: Warn that minrate=2400 is not valid for V.27 instead of failing load.
Corey Farrell [Thu, 27 Feb 2014 16:03:56 +0000 (16:03 +0000)] 
res_fax: Warn that minrate=2400 is not valid for V.27 instead of failing load.

Change minrate from 2400 to 4800 on config reload in response to changes from
ASTERISK-22790 only.  Any config with minrate of 2400 that would fail before
r405693 will still fail.

Comment out many settings in res_fax.conf.sample. The defaults are set in
res_fax.c, so setting the same value in sample config does nothing but make
the sample config more fragile.

(closes issue ASTERISK-23231)
Reported by: David Brillert
Review: https://reviewboard.asterisk.org/r/3261/
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409053 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agortp_engine: fix crash during remote native bridging when calling get_codecs
Matthew Jordan [Thu, 27 Feb 2014 12:47:29 +0000 (12:47 +0000)] 
rtp_engine: fix crash during remote native bridging when calling get_codecs

When two RTP channels are in a remote bridge, the remote bridging loop in
rtp_engine will periodically check to see if the two channels can still be
bridged. One of the many things it checks is whether or not the codecs have
changed on the channel. If the codec has changed, it will break out of the
loop to re-determine which type of bridge is appropriate.

In order to perform this check, the ast_rtp_glue virtual table's get_codec
callback is called for each channel. The callback implementations assume
that the channel tech private is valid when called; as such, there has
always been some code in place to check whether or not the channel pvt is
NULL before calling. However, this check is insufficient.

The channels are unlocked during the remote bridging loop. It is possible
for a channel to get masqueraded between the check for the pvt being NULL and
the actual call to get_codec. When this occurs, the callback is called with a
ZOMBIE channel, which now has a NULL pvt. Crash.

While this has always been possible in Asterisk 1.8, it is much more likely to
occur in Asterisk 11 and later versions due to the timing changes that occur
when getting the codec from a channel. Note that this is much more likely to be
reproduced on slow, boggy hardware running Asterisk 11 - but fairly rarely
otherwise.

Also Note: This crash was also caught by the various SIP blind transfer tests,
in addition to the bug report Alec filed.

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

(closes issue ASTERISK-21737)
Reported by: Alec Davis
Tested by: Alec Davis
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409002 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoconfigs/voicemail.conf.sample - Make mailcmd sample text more explicit
Rusty Newton [Tue, 25 Feb 2014 17:43:09 +0000 (17:43 +0000)] 
configs/voicemail.conf.sample - Make mailcmd sample text more explicit

Made the wording a bit more explicit. Didn't really change the meaning.
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@408877 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoignore AST_CONTROL_PVT_CAUSE_CODE without any messages
Alexandr Anikin [Sat, 22 Feb 2014 17:42:56 +0000 (17:42 +0000)] 
ignore AST_CONTROL_PVT_CAUSE_CODE without any messages

(closes issue ASTERISK-23336)
Reported by: Alexander Semych

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@408838 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agoRemove extra defines of AST_PBX_MAX_STACK.
Corey Farrell [Sat, 22 Feb 2014 02:28:07 +0000 (02:28 +0000)] 
Remove extra defines of AST_PBX_MAX_STACK.

* Ensure AST_PBX_MAX_STACK is only defined in extconf.h and pbx.h.
* Fix incorrect function parameters in utils/extconf.c.

(closes issue ASTERISK-23141)
Reported by: Maxim
Review: https://reviewboard.asterisk.org/r/3241/
........

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@408786 65c4cc65-6c06-0410-ace0-fbb531ad65f3