]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
10 years agoapp_confbridge: Whitespace
Richard Mudgett [Fri, 23 Jan 2015 19:34:55 +0000 (19:34 +0000)] 
app_confbridge: Whitespace

Because there is sometimes no sence to any whitespace.

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

10 years agoTypo's (missed a spot in r430996).
Walter Doekes [Fri, 23 Jan 2015 14:55:47 +0000 (14:55 +0000)] 
Typo's (missed a spot in r430996).

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

10 years agoFix typo's (retrieve, specified, address).
Walter Doekes [Fri, 23 Jan 2015 14:51:03 +0000 (14:51 +0000)] 
Fix typo's (retrieve, specified, address).

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

10 years agochan_sip: Case insensitive comparison of "defaultuser" parameter.
Walter Doekes [Fri, 23 Jan 2015 14:34:39 +0000 (14:34 +0000)] 
chan_sip: Case insensitive comparison of "defaultuser" parameter.

All the other configuration options are case insensitive, so this one
should be too.

ASTERISK-24355 #close
Reported by: HZMI8gkCvPpom0tM
patches:
  ast.patch uploaded by HZMI8gkCvPpom0tM (License 6658)

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

10 years agoapps/app_voicemail: Trigger MWI notification with MixMonitor m() option
Matthew Jordan [Thu, 22 Jan 2015 14:22:02 +0000 (14:22 +0000)] 
apps/app_voicemail: Trigger MWI notification with MixMonitor m() option

The MixMonitor m() option allows a recording to be pushed to a specific
voicemail mailbox. If the message is delivered to the mailbox's INBOX, however,
no MWI notification is currently raised.

This patch corrects the issue by properly calling notify_new_state from the
msg_create_from_file function. This will cause MWI to be triggered if the
message was placed in the mailbox's INBOX.

ASTERISK-24709 #close
Reported by: Gareth Palmer
patches:
  app_voicemail-430919.patch uploaded by Gareth Palmer (License 5169)

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

10 years agocontrib/scripts/install_prereq: Don't install 32-bit packages on 64-bit hosts
Matthew Jordan [Tue, 20 Jan 2015 02:38:28 +0000 (02:38 +0000)] 
contrib/scripts/install_prereq: Don't install 32-bit packages on 64-bit hosts

On Debian based systems, the install_prereq tool uses a search command on
Debian that results in selecting both 64-bit and 32-bit packages. Besides the
waste of disk space, this can actually cause aptitude use 100% of memory on a
VM with 1GB of RAM as it tried to work out all of the 32-bit package
dependencies.

This patch filters out the 32-bit packages on a 64-bit machine, and leaves
32-bit machines alone.

ASTERISK-24048 #close
Reported by: Ben Klang
Tested by: Ben Klang, Matt Jordan
patches:
  install_prereq_64-bit_compat.patch uploaded by Ben Klang (License 5876)

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

10 years agoapp_voicemail: Temp message left after review/hangup with ODBC/IMAP backend
Matthew Jordan [Tue, 20 Jan 2015 02:25:25 +0000 (02:25 +0000)] 
app_voicemail: Temp message left after review/hangup with ODBC/IMAP backend

When using ODBC or IMAP storage, temporary files created on the file system
must be disposed of using the DISPOSE macro. The DELETE macro will map to a
deletion function for the backend storage, but does not clean up any local
files created as a result of the operation.

When using voicemail with the operator and review options enabled, pressing
0 to enter the menu, followed by 1 to save the message, followed by any
other DTMF press to delete the message, will result in the temporary file
lingering on the file system.

This patch properly calls DISPOSE after the DELETE. This causes the local
file to be disposed of.

ASTERISK-24288 #close
Reported by: LEI FU
patches:
  voicemail_odbc_review_fix.diff uploaded by LEI FU (License 6640)

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

10 years agobuild_tools/mkpkgconfig: Fix Cflags concatenation error in asterisk.pc
Matthew Jordan [Wed, 14 Jan 2015 15:34:16 +0000 (15:34 +0000)] 
build_tools/mkpkgconfig: Fix Cflags concatenation error in asterisk.pc

The mkpkgconfig script incorrectly concatenates Cflags options together. As an
example, the following:
Cflags: -I/usr/include/libxml2 -g3

Is instead generated as:
Cflags: -I/usr/include/libxml2-g3

This patch corrects the generation of Cflags in mkpkgconfig such that the
Cflags options are output correctly.

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

ASTERISK-23991 #close
Reported by: Diederik de Groot
patches:
  fix_mkpkgconfig.diff uploaded by Diederik de Groot (License 6600)

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

10 years agoapp_macro: Don't restore the calling location on a channel redirect.
Richard Mudgett [Tue, 13 Jan 2015 18:06:21 +0000 (18:06 +0000)] 
app_macro: Don't restore the calling location on a channel redirect.

v11: If a channel redirect to a macro exten of a macro that is active
happens, the redirect location doesn't get executed.  Instead the original
macro location is restored and gets reexecuted.

v13: An additional effect happens if a parked call times out to an
extension in the macro that parked the call then the macro is reexecuted
instead of the expected park return location.

* Made not restore the macro calling location on an
AST_SOFTHANGUP_ASYNCGOTO.

* Increased the locked channel range when setting up the macro execution
environment to cover things that should be done while the channel is
locked.

* Removed unnecessary NULL tests before calling ast_free() in
_macro_exec().

ASTERISK-23850 #close
Reported by: Andrew Nagy

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

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

10 years agomain/syslog: Allow dynamic logs, such as security events, to log to the syslog
Matthew Jordan [Mon, 12 Jan 2015 18:00:24 +0000 (18:00 +0000)] 
main/syslog: Allow dynamic logs, such as security events, to log to the syslog

The security event log uses a dynamic log level (SECURITY) that is registered
with the Asterisk logging core. Unfortunately, the syslog would ignore log
statements that had a dynamic log level associated with them. Because the
syslog cannot handle ad hoc dynamic log levels, this patch treats any dynamic
log entries sent to the syslog as logs with a level of NOTICE.

ASTERISK-20744 #close
Reported by: Michael Keuter
Tested by: Michael L. Young, Jacek Konieczny
patches:
  asterisk-20744-syslog-dynamic-logging_trunk.diff uploaded by Michael L. Young (license 5026)

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

10 years agofuncs/func_curl: Fix memory leak when CURLOPT channel datastore is destroyed
Matthew Jordan [Mon, 12 Jan 2015 15:11:08 +0000 (15:11 +0000)] 
funcs/func_curl: Fix memory leak when CURLOPT channel datastore is destroyed

When the channel datastore associated with the usage of CURLOPT on a specific
channel is freed, the underlying structure holding the list of options is not
disposed of. This patch properly frees the structure in the datastore .destroy
callback.

ASTERISK-24672 #close
Reported by: Kristian Hogh
patches:
  func_curl-memory-leak.diff uploaded by Kristian Hogh (License 6639)

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

10 years agores_fax: Add T.38 negotiation timeout option
Kinsey Moore [Fri, 9 Jan 2015 14:40:11 +0000 (14:40 +0000)] 
res_fax: Add T.38 negotiation timeout option

This change makes the T.38 negotiation timeout configurable via
't38timeout' in res_fax.conf or FAXOPT(t38timeout). It was previously
hard coded to be 5000 milliseconds.

This change also handles T.38 switch failures by aborting the fax since
in the case where this can happen, both sides have agreed to switch to
T.38 and Asterisk is unable to do so.

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

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

10 years agoapp_queue: Update sample conf documenation
Kevin Harwell [Wed, 24 Dec 2014 21:18:29 +0000 (21:18 +0000)] 
app_queue: Update sample conf documenation

Updated the queues.conf.sample file to explicitly state which channel queue
variables are propagated to.

ASTERISK-24267
Reported by: Mitch Claborn

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

10 years agoqueue_log: Post QUEUESTART entry when Asterisk fully boots.
Richard Mudgett [Mon, 22 Dec 2014 19:38:58 +0000 (19:38 +0000)] 
queue_log: Post QUEUESTART entry when Asterisk fully boots.

The QUEUESTART log entry has historically acted like a fully booted event
for the queue_log file.  When the QUEUESTART entry was posted to the log
was broken by the change made by ASTERISK-15863.

* Made post the QUEUESTART queue_log entry when Asterisk fully boots.
This restores the intent of that log entry and happens after realtime has
had a chance to load.

AST-1444 #close
Reported by: Denis Martinez

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

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

10 years agochan_sip: Send CANCEL via original INVITE destination even after UPDATE request
Matthew Jordan [Mon, 22 Dec 2014 15:39:04 +0000 (15:39 +0000)] 
chan_sip: Send CANCEL via original INVITE destination even after UPDATE request

Given the following scenario:
* Three SIP phones (A, B, C), all communicating via a proxy with Asterisk
* A call is established between A and B. B performs a SIP attended transfer of
  A to C. B sets the call on hold (A is hearing MOH) and dials the extension of
  C. While phone C is ringing, B transfers the call (that is, what we typically
  call a 'blond transfer').
* When the transfer completes, A hears the ringing of phone C, while B is idle.

In the SIP messaging for the above scenario, a REFER request is sent to
transfer the call. When "sendrpid=yes" is set in sip.conf, Asterisk may send an
UPDATE request to phone C to update party information. This update is sent
directly to phone C, not through the intervening proxy. This has the unfortunate
side effect of providing route information, which is then set on the sip_pvt
structure for C. If someone (e.g. B) is trying to get the call back (through a
directed pickup), Asterisk will send a CANCEL request to C. However, since we
have now updated the route set, the CANCEL request will be sent directly to C
and not through the proxy. The phone ignores this CANCEL according to RFC3261
(Section 9.1).

This patch updates reqprep such that the route is not updated if an UPDATE
request is being sent while the INVITE state is INV_PROCEEDING or
INV_EARLY_MEDIA. This ensures that a subsequent CANCEL request is still sent
to the correct location.

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

ASTERISK-24628 #close
Reported by: Karsten Wemheuer
patches:
  issue.patch uploaded by Karsten Wemheuer (License 5930)

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

10 years agoacl: Fix reloading of configuration if configuration file does not exist at startup.
Joshua Colp [Sat, 20 Dec 2014 20:56:35 +0000 (20:56 +0000)] 
acl: Fix reloading of configuration if configuration file does not exist at startup.

The named ACL code incorrectly destroyed the config options information if loading
of the configuration file failed at startup. This would result in reloading
also failing even if a valid configuration file was put in place.

ASTERISK-23733 #close
Reported by: Richard Kenner

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

10 years agores_http_websocket.c: Fix incorrect use of sizeof in ast_websocket_write().
Richard Mudgett [Fri, 19 Dec 2014 20:51:41 +0000 (20:51 +0000)] 
res_http_websocket.c: Fix incorrect use of sizeof in ast_websocket_write().

This won't fix the reported issue but it is an incorrect use of sizeof.

ASTERISK-24566
Reported by:  Badalian Vyacheslav

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

10 years agochan_dahdi: Don't ignore setvar when using configuration section scheme.
Richard Mudgett [Fri, 19 Dec 2014 17:21:15 +0000 (17:21 +0000)] 
chan_dahdi: Don't ignore setvar when using configuration section scheme.

When the configuration section scheme of chan_dahdi.conf is used (keyword
dahdichan instead of channel) all setvar= options are completely ignored.
No variable defined this way appears in the created DAHDI channels.

* Move the clearing of setvar values to after the deferred processing of
dahdichan.

AST-1378 #close
Reported by: Guenther Kelleter
Patch by: Guenther Kelleter

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

10 years agochan_dahdi.c, res_rtp_asterisk.c: Change some spammy debug messages to level 5.
Richard Mudgett [Thu, 18 Dec 2014 22:33:49 +0000 (22:33 +0000)] 
chan_dahdi.c, res_rtp_asterisk.c: Change some spammy debug messages to level 5.

ASTERISK-24337 #close
Reported by: Rusty Newton

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

10 years agochan_dahdi: Populate CALLERID(ani2) for incoming calls in featdmf signaling mode.
Richard Mudgett [Thu, 18 Dec 2014 19:35:19 +0000 (19:35 +0000)] 
chan_dahdi: Populate CALLERID(ani2) for incoming calls in featdmf signaling mode.

For the featdmf signaling mode the incoming MF Caller-ID information is
formatted as follows: *${CALLERID(ani2)}${CALLERID(ani)}#*${EXTEN}#

Rather than discarding the ani2 digits, populate the CALLERID(ani2) value
with what is received instead.

AST-1368 #close
Reported by: Denis Martinez
Patches:
      extract_ani2_for_featdmf_v11.patch (license #5621) patch uploaded by Richard Mudgett

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

10 years agoFix printf problems with high ascii characters after r413586 (1.8).
Walter Doekes [Wed, 17 Dec 2014 09:24:50 +0000 (09:24 +0000)] 
Fix printf problems with high ascii characters after r413586 (1.8).

In r413586 (1.8) various casts were added to silence gcc 4.10 warnings.
Those fixes included things like:

    -out += sprintf(out, "%%%02X", (unsigned char) *ptr);
    +out += sprintf(out, "%%%02X", (unsigned) *ptr);

That works for low ascii characters, but for the high range that yields
e.g. FFFFFFC3 when C3 is expected.

This changeset:
- fixes those casts to use the 'hh' unsigned char modifier instead
- consistently uses %02x instead of %2.2x (or other non-standard usage)
- adds a few 'h' modifiers in various places
- fixes a 'replcaes' typo
- dev/urandon typo (in 13+ patch)

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

ASTERISK-24619 #close
Reported by: Stefan27 (on IRC)

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

10 years agochan_sip: Allow T.38 switch-over when SRTP is in use.
Joshua Colp [Tue, 16 Dec 2014 16:35:28 +0000 (16:35 +0000)] 
chan_sip: Allow T.38 switch-over when SRTP is in use.

Previously when SRTP was enabled on a channel it was not possible
to switch to T.38 as no crypto attributes would be present.

This change makes it so it is now possible. If a T.38 re-invite
comes in SRTP is terminated since in practice you can't encrypt
a UDPTL stream. Now... if we were doing T.38 over RTP (which
does exist) then we'd have a chance but almost nobody does that so
here we are.

ASTERISK-24449 #close
Reported by: Andreas Steinmetz
patches:
 udptl-ignore-srtp-v2.patch submitted by Andreas Steinmetz (license 6523)

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

10 years agoDEBUG_THREADS: Fix regression and lock tracking initialization problems.
Richard Mudgett [Fri, 12 Dec 2014 23:31:38 +0000 (23:31 +0000)] 
DEBUG_THREADS: Fix regression and lock tracking initialization problems.

This patch started with David Lee's patch at
https://reviewboard.asterisk.org/r/2826/ and includes a regression fix
introduced by the ASTERISK-22455 patch.

The initialization of a mutex's lock tracking structure was not protected
in a critical section.  This is fine for any mutex that is explicitly
initialized, but a static mutex may have its lock tracking double
initialized if multiple threads attempt the first lock simultaneously.

* Added a global mutex to properly serialize initialization of the lock
tracking structure.  The painful global lock can be mitigated by adding a
double checked lock flag as discussed on the original review request.

* Defer lock tracking initialization until first use.

* Don't be "helpful" and initialize an uninitialized lock when
DEBUG_THREADS is enabled.  Debug code is not supposed to fix or change
normal code behavior.  We don't need a lock initialization race that would
force a re-setup of lock tracking.  Lock tracking already handles
initialization on first use.

* Properly handle allocation failures of the lock tracking structure.

* No need to initialize tracking data in __ast_pthread_mutex_destroy()
just to turn around and destroy it.

The regression introduced by ASTERISK-22455 is the result of manipulating
a pthread_mutex_t struct outside of the pthread library code.  The
pthread_mutex_t struct seems to have a global linked list pointer member
that can get changed by other threads.  Therefore, saving and restoring
the contents of a pthread_mutex_t struct is a bad thing.

Thanks to Thomas Airmont for finding this obscure regression.

* Don't overwrite the struct ast_lock_track.reentr_mutex member to restore
tracking data in __ast_cond_wait() and __ast_cond_timedwait().  The
pthread_mutex_t struct must be treated as a read-only opaque variable.

Miscellaneous other items fixed by this patch:

* Match ast_suspend_lock_info() with ast_restore_lock_info() in
__ast_cond_timedwait().

* Made some uninitialized lock sanity checks return EINVAL and try a
DO_THREAD_CRASH.

* Fix bad canlog initialization expressions.

ASTERISK-24614 #close
Reported by: Thomas Airmont

Review: https://reviewboard.asterisk.org/r/4247/
Review: https://reviewboard.asterisk.org/r/2826/

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

10 years agores/res_agi: Make Verbose message for 'stream file' match other playbacks
Matthew Jordan [Fri, 12 Dec 2014 22:42:35 +0000 (22:42 +0000)] 
res/res_agi: Make Verbose message for 'stream file' match other playbacks

The Verbose message displayed when a file is played back via 'stream file'
was formatted differently than other playbacks:
* It didn't include the channel name
* It didn't include the channel language
It does, however, include the playback offset as well as any escape digits.
That information was kept; however, this patch updates the formatting to more
closely match the Verbose messages displayed when a file is played back by
'control stream file', Playback, ControlPlayback, or any other file playback
operation.

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

10 years agores_http_websocket: Fix crash due to double freeing memory when receiving a payload...
Joshua Colp [Wed, 10 Dec 2014 13:30:22 +0000 (13:30 +0000)] 
res_http_websocket: Fix crash due to double freeing memory when receiving a payload length of zero.

Frames with a payload length of 0 were incorrectly handled in res_http_websocket.
Provided a frame with a payload had been received prior it was possible for a double
free to occur. The realloc operation would succeed (thus freeing the payload) but be
treated as an error. When the session was then torn down the payload would be
freed again causing a crash. The read function now takes this into account.

This change also fixes assumptions made by users of res_http_websocket. There is no
guarantee that a frame received from it will be NULL terminated.

ASTERISK-24472 #close
Reported by: Badalian Vyacheslav

Review: https://reviewboard.asterisk.org/r/4220/
Review: https://reviewboard.asterisk.org/r/4219/

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

10 years agores/res_monitor: Reset in/out sample counts on Monitor start
Matthew Jordan [Sat, 6 Dec 2014 18:15:20 +0000 (18:15 +0000)] 
res/res_monitor: Reset in/out sample counts on Monitor start

When repeatedly starting/stopping a Monitor on a channel, the accumulated
in/out sample counts are never reset to 0. This can cause inadvertent jumps
in the recordings, as the code in the channel core will determine incorrectly
that a jump in the recorded file position should occur. Setting the sample
counts to 0 simply reflects the initial state a Monitor should be in when it
is started, as this is the initial count that would be on the channels at that
time.

ASTERISK-24573 #close
Reported by: Nuno Borges
patches:
  24573.patch uploaded by Nuno Borges (License 6116)

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

10 years agoapps/app_meetme: Apply default values on initial load with no config file
Matthew Jordan [Sat, 6 Dec 2014 17:19:39 +0000 (17:19 +0000)] 
apps/app_meetme: Apply default values on initial load with no config file

When the app_meetme module is loaded without its configuration file, the
module settings aren't initialized. In particular, this impacts the use
of logging realtime members. This patch guarantees that we always set the
default module settings on initial load.

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

ASTERISK-24572 #close
Reported by: Nuno Borges
patches:
  24572.patch uploaded by Nuno Borges (License 6116)

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

10 years agoapps/app_voicemail: Fix crash with IMAP when streams are opened simultaneously
Matthew Jordan [Wed, 3 Dec 2014 16:43:47 +0000 (16:43 +0000)] 
apps/app_voicemail: Fix crash with IMAP when streams are opened simultaneously

The UW IMAP library is instrinsically not thread-safe, and relies upon higher
level applications to guarantee thread safety. For the most part, this is
provided by the vms object, which provides locking for individual streams.
Unfortunately, this is not sufficient for calls to mail_open which create the
IMAP stream. mail_open can, on some systems, call into a UW IMAP specific
function for determining the address of a system based on a hostname,
ip_nametoaddr.

In the ip6_unix implementation of this function, static variables are used
to hold parsing buffers. This can cause a crash if multiple threads attempt
to convert a hostname to an address at the same time. Locking on a single
mail stream is not sufficient to prevent simultaneous access to these static
variables.

In the IMAP library, this function can be called from the mail_open and
imap_status functions. As the imap_status function is not used by
app_voicemail, locking on access to mail_open is sufficient to prevent
any mangling of the buffers.

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

ASTERISK-24516 #close
Reported by: David Duncan Ross Palmer
Tested by: David Duncan Ross Palmer
patches:
  ASTERISK-24516.diff uploaded by David Duncan Ross Palmer (License 6660)

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

10 years agopbx/pbx_loopback: Speed up switches by avoiding unneeded lookups
Matthew Jordan [Tue, 2 Dec 2014 16:54:45 +0000 (16:54 +0000)] 
pbx/pbx_loopback: Speed up switches by avoiding unneeded lookups

This patch makes a small rearrangement to only do dialplan lookups during
loopback switches if the pattern matches. Prior to this patch, the dialplan
lookups were always performed, even when the result would be discarded.
Dialplan lookups can be very costly if remote switches - like DUNDi - are
present. In those cases extension matching is sped up considerably, making
the issue of lost digits more manageable.

As collateral damage, 6 trailing spaces were killed.

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

ASTERISK-24577 #close
Reported by: Birger Harzenetter
patches:
  ast-loopback.patch uploaded by Birger Harzenetter (License 5870)

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

10 years agoapp_record: Fix bug where using the 'k' option and hanging up would trim 1/4 of a...
Joshua Colp [Mon, 1 Dec 2014 13:39:15 +0000 (13:39 +0000)] 
app_record: Fix bug where using the 'k' option and hanging up would trim 1/4 of a second of the recording.

The Record dialplan function trims 1/4 of a second from the end of recordings in case
they are terminated because of DTMF. When hanging up, however, you don't want this to happen.
This change makes it so on hangup this does not occur.

ASTERISK-24530 #close
Reported by: Ben Smithurst
patches:
 app_record_v2.diff submitted by Ben Smithurst (license 6529)

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

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

10 years agomanager: Fix could not extend string messages.
Richard Mudgett [Fri, 21 Nov 2014 18:47:12 +0000 (18:47 +0000)] 
manager: Fix could not extend string messages.

When shutting down Asterisk that has an active AMI connection, you get
several "failed to extend from %d to %d" messages because use of the
EVENT_FLAG_SHUTDOWN attempts to add all AMI permission strings to the
event.

* Created MAX_AUTH_PERM_STRING to use when creating stack based struct
ast_str variables used with the authority_to_str() and
user_authority_to_str() functions instead of a variety of magic numbers
that could be too small.

* Added a special check for EVENT_FLAG_SHUTDOWN to authority_to_str() so
it will not attempt to add all permission level strings.

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

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

10 years agoFix error with mixed address family ACLs.
Mark Michelson [Thu, 20 Nov 2014 16:35:18 +0000 (16:35 +0000)] 
Fix error with mixed address family ACLs.

Prior to this commit, the address family of the first item in an ACL
was used to compare all incoming traffic. This could lead to traffic
of other IP address families bypassing ACLs.

ASTERISK-24469 #close

Reported by Matt Jordan
Patches:
ASTERISK-24469-11.diff uploaded by Matt Jordan (License #6283)

AST-2014-012
........

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

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

10 years agoAST-2014-018 - func_db: DB Dialplan function permission escalation via AMI.
Kevin Harwell [Thu, 20 Nov 2014 16:22:50 +0000 (16:22 +0000)] 
AST-2014-018 - func_db: DB Dialplan function permission escalation via AMI.

The DB dialplan function when executed from an external protocol (for instance
AMI), could result in a privilege escalation.

Asterisk now inhibits the DB function from being executed from an external
interface if the live_dangerously option is set to no.

ASTERISK-24534
Reported by: Gareth Palmer
patches: submitted by Gareth Palmer (license 5169)
........

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

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

10 years agoAST-2014-017 - app_confbridge: permission escalation/ class authorization.
Kevin Harwell [Thu, 20 Nov 2014 15:42:01 +0000 (15:42 +0000)] 
AST-2014-017 - app_confbridge: permission escalation/ class authorization.

Confbridge dialplan function permission escalation via AMI and inappropriate
class authorization on the ConfbridgeStartRecord action. The CONFBRIDGE dialplan
function when executed from an external protocol (for instance AMI), could
result in a privilege escalation. Also, the AMI action “ConfbridgeStartRecord”
could also be used to execute arbitrary system commands without first checking
for system access.

Asterisk now inhibits the CONFBRIDGE function from being executed from an
external interface if the live_dangerously option is set to no.  Also, the
“ConfbridgeStartRecord” AMI action is now only allowed to execute under a
user with system level access.

ASTERISK-24490
Reported by: Gareth Palmer

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

10 years agoAST-2014-014: Fix race condition where channels may get stuck in ConfBridge under...
Joshua Colp [Thu, 20 Nov 2014 14:20:08 +0000 (14:20 +0000)] 
AST-2014-014: Fix race condition where channels may get stuck in ConfBridge under load.

Under load it was possible for the bridging API, and thus ConfBridge, to get
channels that may have hung up stuck in it. This is because handling of state
transitions for a bridged channel within a bridge was not protected and simply
set the new state without regard to the existing state. If the existing state
had been hung up this would get overwritten.

This change adds locking to protect changing of the state and also
takes into consideration the existing state.

ASTERISK-24440 #close
Reported by: Ben Klang

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

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

10 years agoast_str: Fix improper member access to struct ast_str members.
Richard Mudgett [Wed, 19 Nov 2014 16:38:10 +0000 (16:38 +0000)] 
ast_str: Fix improper member access to struct ast_str members.

Accessing members of struct ast_str outside of the string manipulation API
routines is invalid since struct ast_str is supposed to be treated as
opaque.

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

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

10 years agochan_sip: Fix theoretical leak of p->refer.
Corey Farrell [Mon, 17 Nov 2014 15:56:11 +0000 (15:56 +0000)] 
chan_sip: Fix theoretical leak of p->refer.

If transmit_refer is called when p->refer is already allocated,
it leaks the previous allocation.  Updated code to always free
previous allocation during a new allocation.  Also instead of
checking if we have a previous allocation, always create a
clean record.

ASTERISK-15242 #close
Reported by: David Woolley
Review: https://reviewboard.asterisk.org/r/4160/

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

10 years agoapps/app_confbridge: Ensure 'normal' users hear message when last marked leaves
Matthew Jordan [Mon, 17 Nov 2014 15:26:50 +0000 (15:26 +0000)] 
apps/app_confbridge: Ensure 'normal' users hear message when last marked leaves

When r428077 was made for ASTERISK-24522, it failed to take into account users
who are neither wait_marked nor end_marked. These users are *also* supposed to
hear the 'leader has left the conference' message. Granted, this behaviour is
a bit odd; however, that is how it used to work... and behaviour changes are
not good.

This patch ensures that if there are any 'normal' users present when the last
marked user leaves the conference, the message will still be played to them.

Note that this regression was caught by the Asterisk Test Suite's
confbridge_nominal test, which has a quirky combination of users.

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

10 years agoapp_confbridge: Don't play leader leaving prompt if no one will hear it
Matthew Jordan [Mon, 17 Nov 2014 03:05:44 +0000 (03:05 +0000)] 
app_confbridge: Don't play leader leaving prompt if no one will hear it

Consider the following:
- A marked user in a conference
- One or more end_marked only users in the conference

When the marked users leaves, we will be in the conf_state_multi_marked state.
This currently will traverse the users, kicking out any who have the end_marked
flags. When they are kicked, a full ast_bridge_remove is immediately called on
the channels. At this time, we also unilaterally set the need_prompt flag.

When the need_prompt flag is set, we then playback a sound to the bridge
informing everyone that the leader has left; however, no one is left in the
bridge. This causes some odd behaviour for the end_marked users - they are
stuck waiting for the bridge to be unlocked. This results in them waiting for
5 or 6 seconds of dead air before hearing that they've been kicked.

Unfortunately, we do have to keep the bridge locked while we're playing back
the 'leader-has-left' prompt. If there are any wait_marked users in the
conference, this behaviour can't be easily changed - but we do make the case
of the end_marked users better with this patch.

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

ASTERISK-24522 #close
Reported by: Matt Jordan

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

10 years agocel/cel_odbc: Provide microsecond precision in 'eventtime' column when possible
Matthew Jordan [Sat, 15 Nov 2014 16:51:51 +0000 (16:51 +0000)] 
cel/cel_odbc: Provide microsecond precision in 'eventtime' column when possible

This patch adds microsecond precision when inserting a CEL record into a table
with an "eventtime" column of type timestamp, instead of second precision. The
documentation (configs/cel_odbc.conf.sample) was already saying that the
eventtime column included microseconds precision, but that was not the case.

Also, without this patch, if you had a table with an "eventtime" column of
type varchar, you had millisecond precision. With this patch, you also get
microsecond precision in this case.

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

ASTERISK-24283 #close
Reported by: Etienne Lessard
patches:
  cel_odbc_time_precision.patch uploaded by Etienne Lessard (License 6394)

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

10 years agostun: correct attribute string padding to match rfc
Scott Griepentrog [Fri, 14 Nov 2014 15:46:30 +0000 (15:46 +0000)] 
stun: correct attribute string padding to match rfc

When sending the USERNAME attribute in an RTP STUN
response, the implementation in append_attr_string
passed the actual length, instead of padding it up
to a multiple of four bytes as required by the RFC
3489.  This change adds separate variables for the
string and padded attributed lengths, and performs
padding correctly.

Reported by: Thomas Arimont
Review: https://reviewboard.asterisk.org/r/4139/

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

10 years agoapp_confbridge: Play "leader has left" sound even when musiconhold is enabled.
Joshua Colp [Fri, 14 Nov 2014 14:54:50 +0000 (14:54 +0000)] 
app_confbridge: Play "leader has left" sound even when musiconhold is enabled.

Currently if the leader of a conference bridge leaves any participant
that has musiconhold enabled will not hear the "leader has left" sound.
This is because musiconhold is started and THEN the sound is played.

This change makes it so that the sound is played and THEN musiconhold
is started. This provides a better experience for users as they may not
have known previously why they went back to musiconhold.

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

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

10 years agopbx: Fix off-nominal case where a freed extension may still be used.
Joshua Colp [Wed, 12 Nov 2014 16:10:46 +0000 (16:10 +0000)] 
pbx: Fix off-nominal case where a freed extension may still be used.

If during the operation of adding an extension a priority is added but
fails it is possible for the extension to be freed but still exist in
the PBX core. If this occurs subsequent lookups may try to access the
extension and end up in freed memory.

This change removes the extension from the PBX core when the priority
addition fails and then frees the extension.

ASTERISK-24444 #close
Reported by: Leandro Dardini

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

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

10 years agoFix compiler error when using ./configure --enable-dev-mode --enable-coverage
Corey Farrell [Wed, 12 Nov 2014 13:44:32 +0000 (13:44 +0000)] 
Fix compiler error when using ./configure --enable-dev-mode --enable-coverage

When DONT_OPTIMIZE is enabled with dev-mode, it causes a shadow compilation
to be done with output to /dev/null.  This can cause errors with coverage
when GCC attempts to write to /dev/null.gcno.  This change disables
coverage for the shadow compilation.

ASTERISK-24502 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4151/

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

10 years agomanager: Fix HTTP connection reference leaks.
Corey Farrell [Sun, 9 Nov 2014 07:56:41 +0000 (07:56 +0000)] 
manager: Fix HTTP connection reference leaks.

Fix reference leak that happens if (session && !blastaway).

ASTERISK-24505 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4153/

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

10 years agoconfigs/features.conf: Add documentation noting potential chan_agent conflict
Matthew Jordan [Sun, 9 Nov 2014 00:59:43 +0000 (00:59 +0000)] 
configs/features.conf: Add documentation noting potential chan_agent conflict

In chan_agent, a '*' is used by default to terminate a bridge with a caller.
This can lead to all sorts of problems if '*' is used by a feature in
features.conf, as the chan_agent disconnect '*' may be detected first.

This patch adds a documentation snippet to features.conf so that users who
attempt to use features with agents know of the potential conflict.

ASTERISK-20402 #close
Reported by: Matt Riddell
patches:
  features.conf.diff uploaded by Matt Riddell (License 5023)

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

10 years agochannels/chan_mgcp: Fix regression which causes gateways to be skipped
Matthew Jordan [Sun, 9 Nov 2014 00:36:31 +0000 (00:36 +0000)] 
channels/chan_mgcp: Fix regression which causes gateways to be skipped

In r227276, a while loop was turned into a for loop. Unfortunately, a portion
of the while loop was left in the code such that, when a static gateway is
encountered in the list of MGCP gateways, the next gateway would be skipped.
At best, we would simply flip past a gateway; at worst, this could lead to a
crash.

ASTERISK-24500 #close
Reported by: Xavier Hienne
patches:
  chan_mgcp.patch uploaded by Xavier Hienne (License 6657)

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

10 years agoaddons/chan_mobile: Increase buffer size of UCS2 encoded SMS messages
Matthew Jordan [Sun, 9 Nov 2014 00:24:53 +0000 (00:24 +0000)] 
addons/chan_mobile: Increase buffer size of UCS2 encoded SMS messages

When UCS2 character encoding is used, one symbol in national language can be
expanded to 4 bytes. The current buffer used for receiving message in
do_monitor_phone is 256 bytes, which is not large enough for incoming messages.

For example:
* AT+CMGR phone response prefix
  '+CMGR: "REC UNREAD","+7**********",,"14/10/29,13:31:39+12"\r\n' - 60 bytes
* SMS body with UCS2 encoding (max) - 280 bytes
* AT+CMGR phone response suffix '\r\n\r\nOK\r\n' - 8 bytes
* Terminating null character - 1 byte

This results in a needed buffer size of 349 bytes. Hence, this patch opts for a
350 byte buffer.

ASTERISK-24468 #close
Reported by: Dmitriy Bubnov
patches:
  chan_mobile-1_8.diff uploaded by Dmitriy Bubnov (License 6651)
  chan_mobile-trunk.diff uploaded by Dmitry Bubnov (License 6651)

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

10 years agochan_console: Fix reference leaks to pvt.
Corey Farrell [Sat, 8 Nov 2014 17:28:22 +0000 (17:28 +0000)] 
chan_console: Fix reference leaks to pvt.

Fix a bunch of calls to get_active_pvt
where the reference is never released.

ASTERISK-24504 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4152/

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

10 years agomain/file.c: fix possible extra ast_module_unref to format modules.
Corey Farrell [Thu, 6 Nov 2014 12:10:36 +0000 (12:10 +0000)] 
main/file.c: fix possible extra ast_module_unref to format modules.

fn_wrapper only adds a reference to the format's module if the file
was able to be opened.  If not this causes an unmatched
ast_module_unref in filestream_destructor.  Move ast_module_ref to
get_stream.

ASTERISK-24492 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4149/

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

10 years agoFix unintential memory retention in stringfields.
Corey Farrell [Thu, 6 Nov 2014 09:10:47 +0000 (09:10 +0000)] 
Fix unintential memory retention in stringfields.

* Fix missing / unreachable calls to __ast_string_field_release_active.
* Reset pool->used to zero when the current pool->active reaches zero.

ASTERISK-24307 #close
Reported by: Etienne Lessard
Tested by: ibercom, Etienne Lessard
Review: https://reviewboard.asterisk.org/r/4114/
........

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

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

10 years agotest_strings: Remove string tests that exercise asserts.
George Joseph [Thu, 6 Nov 2014 02:26:59 +0000 (02:26 +0000)] 
test_strings:  Remove string tests that exercise asserts.

Since unit tests are run with DO_CRASH, those tests were causing
the test to fail.

Tested-by: George Joseph
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@427354 65c4cc65-6c06-0410-ace0-fbb531ad65f3

10 years agoconfig: Make text_file_save and 'dialplan save' escape semicolons in values.
George Joseph [Wed, 5 Nov 2014 15:02:42 +0000 (15:02 +0000)] 
config: Make text_file_save and 'dialplan save' escape semicolons in values.

When a config file is read, an unescaped semicolon signals comments which are
stripped from the value before it's stored.  Escaped semicolons are then
unescaped and become part of the value.  Both of these behaviors are normal
and expected.  When the config is serialized either by 'dialplan save' or
AMI/UpdateConfig however, the now unescaped semicolons are written as-is.
If you actually reload the file just saved, the unescaped semicolons are
now treated as start of comments.

Since true comments are stripped on read, any semicolons in
ast_variable.value must have been escaped originally.  This patch
re-escapes semicolons in ast_variable.values before they're written to
file either by 'dialplan save' or config/ast_config_text_file_save which
is called by AMI/UpdateConfig. I also fixed a few pre-existing formatting
issues nearby in pbx_config.c

Tested-by: George Joseph
ASTERISK-20127 #close

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

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

10 years agoFix compile error caused by review 4138
Corey Farrell [Mon, 3 Nov 2014 02:31:46 +0000 (02:31 +0000)] 
Fix compile error caused by review 4138

There is no procedure called ast_closeframe, fix code to use
ast_closestream.

Reported By: Matt Jordan

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

10 years agoFix ast_writestream leaks
Corey Farrell [Sun, 2 Nov 2014 08:03:18 +0000 (08:03 +0000)] 
Fix ast_writestream leaks

Fix cleanup in __ast_play_and_record where others[x] may be leaked.
This was caught where prepend != NULL && outmsg != NULL, once
realfile[x] == NULL any further others[x] would be leaked. A cleanup
block was also added for prepend != NULL && outmsg == NULL.

11+: Fix leak of ast_writestream recording_fs in
app_voicemail:leave_voicemail.

ASTERISK-24476 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4138/
........

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

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

10 years agofunc_jitterbuffer: fix frame leaks.
Corey Farrell [Sun, 2 Nov 2014 07:35:36 +0000 (07:35 +0000)] 
func_jitterbuffer: fix frame leaks.

Fix code paths where it is possible for frames to leak.
Fix uninitialized variable in jb_get_fixed and jb_get_adaptive.

ASTERISK-22409 #related
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4128/

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

10 years agoFix syntax from commit r426927
Tzafrir Cohen [Fri, 31 Oct 2014 16:40:55 +0000 (16:40 +0000)] 
Fix syntax from commit r426927

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

10 years agoinstall init.d files on GNU/kFreeBSD
Tzafrir Cohen [Fri, 31 Oct 2014 16:32:56 +0000 (16:32 +0000)] 
install init.d files on GNU/kFreeBSD

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

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

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

10 years agochannels/sip/reqresp_parser: Fix unit tests for r426594
Matthew Jordan [Fri, 31 Oct 2014 03:25:01 +0000 (03:25 +0000)] 
channels/sip/reqresp_parser: Fix unit tests for r426594

When r426594 was made, it did not take into account a unit test that verified
that the function properly populated the unsupported buffer. The function
would previously memset the buffer if it detected it had any contents; since
this function can now be called iteratively on successive headers, the unit
tests would now fail. This patch updates the unit tests to reset the buffer
themselves between successive calls, and updates the documentation of the
function to note that this is now required.
........

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

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

10 years agoREF_DEBUG: Install refcounter.py to $(ASTDATADIR)/scripts
Corey Farrell [Fri, 31 Oct 2014 03:05:27 +0000 (03:05 +0000)] 
REF_DEBUG: Install refcounter.py to $(ASTDATADIR)/scripts

This change ensures refcounter.py is installed to a place where it
can be found by the Asterisk testsuite if REF_DEBUG is enabled.

ASTERISK-24432 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4094/
........

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

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

10 years agoapp_queue: fix a couple leaks to struct call_queue in set_member_value
Corey Farrell [Thu, 30 Oct 2014 23:53:26 +0000 (23:53 +0000)] 
app_queue: fix a couple leaks to struct call_queue in set_member_value

set_member_value has a couple leaks to references in the variable q
found through testsuite tests/queues/set_penalty.  Also remove the
REF_DEBUG_ONLY_QUEUES compiler declaration, this is no longer possible
with the updated REF_DEBUG code.

ASTERISK-24466 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4125/

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

10 years agoapp_voicemail: Fix unchecked bounds of myArray in IMAP_STORAGE.
Walter Doekes [Thu, 30 Oct 2014 09:16:47 +0000 (09:16 +0000)] 
app_voicemail: Fix unchecked bounds of myArray in IMAP_STORAGE.

In update_messages_by_imapuser(), messages were appended to a finite
array which resulted in a crash when an IMAP mailbox contained more
than 256 entries. This memory is now dynamically increased as needed.

Observe that this patch adds a bunch of XXX's to questionable code. See
the review (url below) for more information.

ASTERISK-24190 #close
Reported by: Nick Adams
Tested by: Nick Adams

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

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

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

10 years agoAdd additional checks for NULL pointers to fix several crashes reported.
Igor Goncharovskiy [Thu, 30 Oct 2014 05:56:23 +0000 (05:56 +0000)] 
Add additional checks for NULL pointers to fix several crashes reported.

ASTERISK-24304 #close
Reported by: dhanapathy sathya

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

10 years agochannels/chan_sip: Add improved support for 4xx error codes
Matthew Jordan [Thu, 30 Oct 2014 01:58:02 +0000 (01:58 +0000)] 
channels/chan_sip: Add improved support for 4xx error codes

This patch adds support for 414, 493, 479, and a stray 400 response in REGISTER
response handling. This helps interoperability in a number of scenarios.

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

patches:
  rb3437.patch uploaded by oej (License 5267)
........

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

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

10 years agochannels/chan_sip: Support mutltiple Supported and Required headers
Matthew Jordan [Thu, 30 Oct 2014 01:41:52 +0000 (01:41 +0000)] 
channels/chan_sip: Support mutltiple Supported and Required headers

A SIP request may contain multiple Supported: and Required: headers. Currently,
chan_sip only parses the first Supported/Required header it finds. This patch
adds support for multiple Supported/Required headers for INVITE requests.

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

ASTERISK-21721 #close
Reported by: Olle Johansson
patches:
  rb2478.patch uploaded by oej (License 5267)
........

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

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

10 years agores_fax: Resolve T38 gateway frame leak.
Corey Farrell [Tue, 28 Oct 2014 20:50:55 +0000 (20:50 +0000)] 
res_fax: Resolve T38 gateway frame leak.

When frames are translated by a fax gateway they need to be freed.  The
existing call to ast_frfree was unreachable.  This change reorganizes
fax_gateway_framehook to ensure that ast_frfree is called when needed.

ASTERISK-24457 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4115/

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

10 years agoASTERISK-23512, correct inaccurate comment in manager.conf.sample
Malcolm Davenport [Tue, 28 Oct 2014 18:08:26 +0000 (18:08 +0000)] 
ASTERISK-23512, correct inaccurate comment in manager.conf.sample

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

10 years agomain/manager: Fix typo in AMI event documentation of "OriginateResponse"
Matthew Jordan [Tue, 28 Oct 2014 14:57:56 +0000 (14:57 +0000)] 
main/manager: Fix typo in AMI event documentation of "OriginateResponse"

The parameter name is "Response", not "Resonse".

ASTERISK-24430 #close
Reported by: Dafi Ni

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

10 years agoASTERISK-24323, fix bug in documentation of AGI STREAM FILE CONTROL
Malcolm Davenport [Tue, 28 Oct 2014 14:55:58 +0000 (14:55 +0000)] 
ASTERISK-24323, fix bug in documentation of AGI STREAM FILE CONTROL

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

10 years agoASTERISK-24419, fix incorrect syntax for setting language in extensions.conf.sample
Malcolm Davenport [Tue, 28 Oct 2014 13:11:52 +0000 (13:11 +0000)] 
ASTERISK-24419, fix incorrect syntax for setting language in extensions.conf.sample

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

10 years agoapp_queue: Cleanup ao2_iterator
Corey Farrell [Tue, 28 Oct 2014 11:17:37 +0000 (11:17 +0000)] 
app_queue: Cleanup ao2_iterator

Clean ao2_iterator, resolving reference leak to queue members.

ASTERISK-24454 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4111/

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

10 years agores/res_http_websocket: Fix minor nits found by wdoekes on r409681
Matthew Jordan [Mon, 27 Oct 2014 02:45:09 +0000 (02:45 +0000)] 
res/res_http_websocket: Fix minor nits found by wdoekes on r409681

When Moises committed the fixes for WSS (which was a great patch), wdoekes had
a few style nits that were on the review that got missed. This patch resolves
what I *think* were all of the ones that were still on the review.

Thanks to both moy for the patch, and wdoekes for the reviews.

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

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

10 years agores/res_srtp: Fix include issue for libsrtp 1.5.0
Matthew Jordan [Mon, 27 Oct 2014 01:46:02 +0000 (01:46 +0000)] 
res/res_srtp: Fix include issue for libsrtp 1.5.0

In libsrtp 1.5.0, crypto_get_random is no longer resolved simply by including
srtp.h. Now, one must include crypto_kernel.h as well. As it turns out, this
header file has been provided by the library since 2006, so this is a
relatively benign change.

ASTERISK-24436 #close
Reported by: Patrick Laimbock
........

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

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

10 years agoAST-2014-011: Fix POODLE security issues
Matthew Jordan [Mon, 20 Oct 2014 14:10:28 +0000 (14:10 +0000)] 
AST-2014-011: Fix POODLE security issues

There are two aspects to the vulnerability:
(1) res_jabber/res_xmpp use SSLv3 only. This patch updates the module to use
    TLSv1+. At this time, it does not refactor res_jabber/res_xmpp to use the
    TCP/TLS core, which should be done as an improvement at a latter date.
(2) The TCP/TLS core, when tlsclientmethod/sslclientmethod is left unspecified,
    will default to the OpenSSL SSLv23_method. This method allows for all
    encryption methods, including SSLv2/SSLv3. A MITM can exploit this by
    forcing a fallback to SSLv3, which leaves the server vulnerable to POODLE.
    This patch adds WARNINGS if a user uses SSLv2/SSLv3 in their configuration,
    and explicitly disables SSLv2/SSLv3 if using SSLv23_method.

For TLS clients, Asterisk will default to TLSv1+ and WARN if SSLv2 or SSLv3 is
explicitly chosen. For TLS servers, Asterisk will no longer support SSLv2 or
SSLv3.

Much thanks to abelbeck for reporting the vulnerability and providing a patch
for the res_jabber/res_xmpp modules.

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

ASTERISK-24425 #close
Reported by: abelbeck
Tested by: abelbeck, opsmonitor, gtjoseph
patches:
  asterisk-1.8-jabber-tls.patch uploaded by abelbeck (License 5903)
  asterisk-11-jabber-xmpp-tls.patch uploaded by abelbeck (License 5903)
  AST-2014-011-1.8.diff uploaded by mjordan (License 6283)
  AST-2014-011-11.diff uploaded by mjordan (License 6283)

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

10 years agochannels/chan_sip: Respect outboundproxy setting when sending qualify requests
Matthew Jordan [Fri, 17 Oct 2014 13:09:20 +0000 (13:09 +0000)] 
channels/chan_sip: Respect outboundproxy setting when sending qualify requests

The outboundproxy setting is currently ignored when sending OPTIONS requests
as a result of the qualify setting. This means that if an Asterisk server is
unable to send the packet directly to a peer, it is unable to qualify any
non-inbound registered peer (e.g. a peer SIP Trunk).

This patch grabs the outboundproxy information for a peer when a qualify
attempt is being constructed and, if it finds the information, uses it
when sending the OPTIONS request.

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

ASTERISK-24063 #close
Reported by: Damian Ivereigh
patches:
  outboundproxy-dai.patch uploaded by Damian Ivereigh (License 6632)
........

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

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

10 years agoFix loss of voice after second call drops (on a second line) in case using multiple...
Igor Goncharovskiy [Thu, 16 Oct 2014 06:04:35 +0000 (06:04 +0000)] 
Fix loss of voice after second call drops (on a second line) in case using multiple lines on unistim phones. There is regression was introduced in r391379.

Reported by: Rustam Khankishyiev
(closes issue ASTERISK-23846)

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

10 years agores_rtp_asterisk: Fix a bug where ICE state would get reset when it shouldn't.
Joshua Colp [Thu, 16 Oct 2014 01:24:12 +0000 (01:24 +0000)] 
res_rtp_asterisk: Fix a bug where ICE state would get reset when it shouldn't.

In the case where the ICE negotiation had not yet started current state would
get wiped when it shouldn't.

This also removes channel binding as in practice this does not work well with
other implementations.

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

10 years agochan_ooh323: fix rtptimeout general value checking
Alexandr Anikin [Wed, 15 Oct 2014 09:02:50 +0000 (09:02 +0000)] 
chan_ooh323: fix rtptimeout general value checking

correct condition to check rtptimeout in [general] config section

ASTERISK-24393 #close
Reported by:  Dmitry Melekhov
Tested by:  Dmitry Melekhov
Patches:
  ASTERISK-24393.patch
........

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

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

10 years agores_fax: Fix reference leak caused by gateway sessions
Corey Farrell [Tue, 14 Oct 2014 16:44:13 +0000 (16:44 +0000)] 
res_fax: Fix reference leak caused by gateway sessions

Fax gateway session objects can be re-used, causing the
same gateway session to be added to faxregistry.container
more than once.  This change causes fax_session_new to
remove the reserved session from the container before
it's id is changed, ensuring it's possible for the
session to be freed.

ASTERISK-24392 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4049/

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

10 years agores_fax: Resolve module reference leak caused by reserved sessions
Corey Farrell [Tue, 14 Oct 2014 16:17:52 +0000 (16:17 +0000)] 
res_fax: Resolve module reference leak caused by reserved sessions

Remove reference to module providing reserved session after
adding a reference to the final module.  This re-reference
is done to ensure that module references are correct even
if the final session selects a different module than the
reserved session.

ASTERISK-18923 #close
Reported by: Grigoriy Puzankin
Review: https://reviewboard.asterisk.org/r/4048/
........

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

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

10 years agores_rtp_asterisk: Make the ICE transport check case insensitive as some implementatio...
Joshua Colp [Sun, 12 Oct 2014 21:08:08 +0000 (21:08 +0000)] 
res_rtp_asterisk: Make the ICE transport check case insensitive as some implementations use 'udp'.

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

10 years agochan_sip: Fix so asterisk won't send reINVITE after a BYE.
Walter Doekes [Sun, 12 Oct 2014 08:13:07 +0000 (08:13 +0000)] 
chan_sip: Fix so asterisk won't send reINVITE after a BYE.

After a reINVITE glare situation, Asterisk would re-send the reINVITE
even though the call had been hung up in the mean time.  This patch
unschedules the reinvite when handling the BYE.

ASTERISK-22791 #close
Reported by: Paolo Compagnini
Tested by: Paolo Compagnini

Review: https://reviewboard.asterisk.org/r/4056/
(testcase is in review r4055)
........

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

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

10 years agobuild: Relax badshell tilde test to allow for ~ in middle of DESTDIR.
Walter Doekes [Sun, 12 Oct 2014 07:51:50 +0000 (07:51 +0000)] 
build: Relax badshell tilde test to allow for ~ in middle of DESTDIR.

The main Makefile has a target test called 'badshell' that tests if
DESTDIR does not happen to have an an-expanded tilde (~).  This might
be the case if you run: make install DESTDIR=~/somewhere/

That test also disallowed valid tildes in directory names. The test is
now changed to only trigger on a tilde at the start of the path.

ASTERISK-13797 #close
Reported by: Tzafrir Cohen

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

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

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

10 years agores_calendar_ews: Relax neon version check to work with 0.30 too.
Walter Doekes [Sun, 12 Oct 2014 07:42:00 +0000 (07:42 +0000)] 
res_calendar_ews: Relax neon version check to work with 0.30 too.

Allow res_calendar_ews to work not only with libneon-0.29 but also
with 0.30.

ASTERISK-24325 #close
Reported by: Tzafrir Cohen

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

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

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

10 years agoCallerID: Fix parsing regression
Kinsey Moore [Fri, 10 Oct 2014 12:55:56 +0000 (12:55 +0000)] 
CallerID: Fix parsing regression

This fixes a regression in callerid parsing introduced when another bug
was fixed. This bug occurred when the name was composed entirely of
DTMF keys and quoted without a number section (<>).

ASTERISK-24406 #close
Reported by: Etienne Lessard
Tested by: Etienne Lessard
Patches:
    callerid_fix.diff uploaded by Kinsey Moore
Review: https://reviewboard.asterisk.org/r/4067/
........

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

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

10 years agochan_sip: Fix dialog leak resulting from missing ACK to re-INVITE.
Walter Doekes [Fri, 10 Oct 2014 07:25:56 +0000 (07:25 +0000)] 
chan_sip: Fix dialog leak resulting from missing ACK to re-INVITE.

If a device re-INVITEs at the same time as the dialog is hung up, and
if then the ACK to the re-INVITE never reaches Asterisk, chan_sip would
fail to destroy the dialog after a while.  This resulted in (most
prominently) file handle leaks.

(Patch reindented by me.)

ASTERISK-20784 #close
ASTERISK-15879 #close
Reported by: Torrey Searle, Nitesh Bansal
Patches:
  reinvite_ack_timeout.patch uploaded by Torrey Searle (License #5334)
  patch_asterisk_20784.txt uploaded by Nitesh Bansal (License #6418)

Reviewboard: https://reviewboard.asterisk.org/r/4052/
(testcase can be found at r4051)
........

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

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

10 years agores_rtp_asterisk: Crash if no candidates received for component
Kevin Harwell [Thu, 9 Oct 2014 21:26:43 +0000 (21:26 +0000)] 
res_rtp_asterisk: Crash if no candidates received for component

When starting ice if there is not at least one remote ice candidate with an RTP
component asterisk will crash. This is due to an assertion in pjnath as it
expects at least one candidate with an RTP component. Added a check to make
sure at least one candidate contains an RTP component and at least one candidate
has an RTCP component.

ASTERISK-24383 #close
Review: https://reviewboard.asterisk.org/r/4039/

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

10 years agosafe_asterisk: Don't automatically exceed MAXFILES value of 2^20.
Walter Doekes [Thu, 9 Oct 2014 08:06:26 +0000 (08:06 +0000)] 
safe_asterisk: Don't automatically exceed MAXFILES value of 2^20.

On systems with lots of RAM (e.g. 24GB) /proc/sys/fs/file-max divided
by two can exceed the per-process file limit of 2^20. This patch
ensures the value is capped.

(Patch cleaned up by me.)

ASTERISK-24011 #close
Reported by: Michael Myles
Patches:
  safe_asterisk-ulimit.diff uploaded by Michael Myles (License #6626)
........

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

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

10 years agoBlocked revisions 424876
Walter Doekes [Thu, 9 Oct 2014 08:02:29 +0000 (08:02 +0000)] 
Blocked revisions 424876

........
Ouch! Accidental commit of wrong file in 424875.

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

10 years agores_rtp_asterisk: Allow only UDP ICE candidates.
Joshua Colp [Wed, 8 Oct 2014 18:44:30 +0000 (18:44 +0000)] 
res_rtp_asterisk: Allow only UDP ICE candidates.

The underlying library, pjnath, that res_rtp_asterisk uses for ICE
support does not have support for ICE-TCP. As candidates are
passed through directly to it this can cause error messages to occur
when it receives something unexpected (such as a TCP candidate).
This change merely ignores all non-UDP candidates so they never
reach pjnath.

ASTERISK-24326 #close
Reported by: Joshua Colp

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

10 years agoastobj2: Correct REF_DEBUG false leak report
Corey Farrell [Tue, 7 Oct 2014 21:30:07 +0000 (21:30 +0000)] 
astobj2: Correct REF_DEBUG false leak report

When ao2_callback is run with OBJ_MULTIPLE and not OBJ_NODATA
it allocates a temporary container in a way that does not
record REF_DEBUG log entries.  This changes that container
to correctly record unref's when the container is freed.

ASTERISK-24390 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4047/
........

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

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

10 years agomessage: Don't close an AMI connection on SendMessage action error
Matthew Jordan [Mon, 6 Oct 2014 18:36:48 +0000 (18:36 +0000)] 
message: Don't close an AMI connection on SendMessage action error

If SendMessage encounters an error (such as incorrect input provided to the
action), it will currently return -1. Actions should only return -1 if the
connection to the AMI client should be closed. In this case, SendMessage
causing the client to disconnect is inappropriate.

This patch causes the action to return 0, which simply causes the action to
fail.

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

ASTERISK-24354 #close
Reported by: Peter Katzmann
patches:
  sendMessage.patch uploaded by Peter Katzmann (License 5968)

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

10 years agoRelease AMI connections on shutdown.
Corey Farrell [Sun, 5 Oct 2014 00:41:16 +0000 (00:41 +0000)] 
Release AMI connections on shutdown.

ASTERISK-24378 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4037/

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

10 years agochan_sip: Clean leak on error path of process_sdp
Corey Farrell [Sun, 5 Oct 2014 00:21:48 +0000 (00:21 +0000)] 
chan_sip: Clean leak on error path of process_sdp

Resolve leak in process_sdp that occurs in 2 error path's where
crypto lines are expected but not provided.

ASTERISK-24385 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4045/

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

10 years agochan_motif: Release format capabilities and config on module load error
Corey Farrell [Sat, 4 Oct 2014 23:59:45 +0000 (23:59 +0000)] 
chan_motif: Release format capabilities and config on module load error

ASTERISK-24384 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4043/

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

10 years agochan_sip: Simplify some unref code by removing unlink_peer_from_tables.
Walter Doekes [Wed, 1 Oct 2014 10:08:13 +0000 (10:08 +0000)] 
chan_sip: Simplify some unref code by removing unlink_peer_from_tables.

ASTERISK-22945 #related
Reported by: ibercom
Patches:
  asterisk11-chan_sip-simplifies.patch uploaded by ibercom (License #6599)
........

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

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

10 years agochan_sip: Remove excess ref of realtime peer before sip_poke_peer.
Walter Doekes [Wed, 1 Oct 2014 09:52:13 +0000 (09:52 +0000)] 
chan_sip: Remove excess ref of realtime peer before sip_poke_peer.

The peer is referenced at the end of sip_poke_peer, it should not get
an extra ref before the call to sip_poke_peer. This fixes a memory
leak.

ASTERISK-22945 #close
Reported by: ibercom
Tested by: Yuriy Gorlichenko
Patches:
  asterisk11.patch uploaded by ibercom (License #6599)

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

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

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

10 years agores_rtp_asterisk: Ensure that the base and mapped address for candidates is present...
Joshua Colp [Tue, 30 Sep 2014 11:31:12 +0000 (11:31 +0000)] 
res_rtp_asterisk: Ensure that the base and mapped address for candidates is present in SDP.

This change fixes an issue where ICE candidates put into the SDP did not contain
the 'raddr' and 'rport' information for server reflexive and relay candidates.

#SIPit31

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

10 years agoautosupport: Fix bashism.
Walter Doekes [Mon, 29 Sep 2014 21:21:04 +0000 (21:21 +0000)] 
autosupport: Fix bashism.

'==' is bashism (bashspecific, fails when dash is /bin/sh). Anyway, a
'case' works better there.

Originally committed in r375059 and r375060 on 2012-10-16 21:13:08.

ASTERISK-20567 #close
Reported by: Tzafrir Cohen

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

10 years agores_fax: Fix out of bounds error in update_modem_bits().
Richard Mudgett [Fri, 26 Sep 2014 15:18:25 +0000 (15:18 +0000)] 
res_fax: Fix out of bounds error in update_modem_bits().

ASTERISK-24357 #close
Reported by: Jeremy Laine
Patches:
      res_fax_bounds.patch (license #6561) patch uploaded by Jeremy Laine
  Modified patch to not use magic numbers.
........

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

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