]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
11 years agoapp_sms: Fix uninitialized values; hangup channel when REL is sent successfully
Matthew Jordan [Sat, 19 Apr 2014 01:09:04 +0000 (01:09 +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
........

Merged revisions 412656 from http://svn.asterisk.org/svn/asterisk/branches/11

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

11 years agoARI: Remove unnecessary \briefs from automatically generated documentation
Jonathan Rose [Fri, 18 Apr 2014 20:26:01 +0000 (20:26 +0000)] 
ARI: Remove unnecessary \briefs from automatically generated documentation

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

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

11 years agoARI: Make bridges/{bridgeID}/play queue sound files
Jonathan Rose [Fri, 18 Apr 2014 18:54:53 +0000 (18:54 +0000)] 
ARI: Make bridges/{bridgeID}/play queue sound files

Previously multiple play actions against a bridge at one time would cause
the sounds to play simultaneously on the bridge. Now if a sound is already
playing, the play action will queue playback to occur after the completion
of other sounds currently on the queue.

(closes issue ASTERISK-22677)
Reported by: John Bigelow
Review: https://reviewboard.asterisk.org/r/3379/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412639 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:16:14 +0000 (17:16 +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/
........

Merged revisions 412586 from http://svn.asterisk.org/svn/asterisk/branches/11

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

11 years agoAllow for multiple contacts to be configured in a single contact= line.
Mark Michelson [Fri, 18 Apr 2014 16:39:52 +0000 (16:39 +0000)] 
Allow for multiple contacts to be configured in a single contact= line.

This is useful for configuring multiple permanent contacts for an AOR when using
realtime AORs.

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

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

11 years agoOriginated calls: Fix several originate call problems.
Richard Mudgett [Fri, 18 Apr 2014 16:38:20 +0000 (16:38 +0000)] 
Originated calls: Fix several originate call problems.

* Restore the reason value set by pbx_outgoing_attempt() to use
AST_CONTROL_xxx values as all the consumers were expecting rather than
cause codes.

* Fixed the dial routines to set cause codes for more than just
ast_request() so pbx_outgoing_attempt() reason codes will function.

* Fix inconsistent locked_channel return status in pbx_outgoing_attempt().
The chanel may not have been locked or the channel may have been a stale
pointer.

* Fixed the OutgoingSpoolFailed channel to run dialplan whenever the
dialing fails for an originate exten and 1 < synchronous.

* Fix incorrect ast_cond_wait() usage in pbx_outgoing_attempt().
Indroduced by issue ASTERISK-22212 patch.

* Made struct pbx_outgoing use the ao2 lock instead of its own lock for
the cond wait mutex.  No sense in having two locks associated with the
same struct when only one is needed.

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

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

11 years agoapp_dial and app_queue: Make lock the forwarding channel while taking the channel...
Richard Mudgett [Fri, 18 Apr 2014 16:19:17 +0000 (16:19 +0000)] 
app_dial and app_queue: Make lock the forwarding channel while taking the channel snapshot.

* Fixed ast_channel_publish_dial_forward() not locking the forwarded
channel when taking the channel snapshot.

* Fixed app_dial.c:do_forward() using the wrong channel to get the
original call forwarding string.

* Removed unnecessary locking when calling ast_channel_publish_dial() and
ast_channel_publish_dial_forward() in app_dial and app_queue.  Holding
channel locks when calling ast_channel_publish_dial_forward() with a
forwarded channel could result in pausing the system while the stasis bus
completes processsing a forwarded channel subscription.

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

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

11 years agoARI: Add debug logging for events and responses
Kinsey Moore [Fri, 18 Apr 2014 14:21:34 +0000 (14:21 +0000)] 
ARI: Add debug logging for events and responses

This adds DEBUG level logging for ARI websocket events and HTTP
responses similar to what is available for AMI. Logging for ARI HTTP
requests is already adequate for debugging purposes.

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

11 years agores_pjsip: Handle reloading when permanent contacts exist and qualify is configured.
Joshua Colp [Thu, 17 Apr 2014 22:49:32 +0000 (22:49 +0000)] 
res_pjsip: Handle reloading when permanent contacts exist and qualify is configured.

This change fixes a problem where permanent contacts being qualified were not
being updated. This was caused by the permanent contacts getting a uuid and not a
known identifier, causing an inability to look them up when updating in the
qualify code. A bug also existed where the new configuration may not be available
immediately when updating qualifies.

(closes issue ASTERISK-23514)
Reported by: Richard Mudgett

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

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

11 years agoFix a silly shadowed variable mistake that was missed from play tones patch
Jonathan Rose [Thu, 17 Apr 2014 22:42:16 +0000 (22:42 +0000)] 
Fix a silly shadowed variable mistake that was missed from play tones patch

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

11 years agoARI: Add tones playback resource
Jonathan Rose [Thu, 17 Apr 2014 21:47:10 +0000 (21:47 +0000)] 
ARI: Add tones playback resource

Adds a tones URI type to the playback resource. The tone can be specified by
name (from indications.conf) or by a tone pattern. In addition, tonezone can
be specified in the URI (by appending ;tonezone=<zone>). Tones must be
stopped manually in order for a stasis control to move on from playback of
the tone. Tones may be paused, resumed, restarted, and stopped. They may
not be rewound or fast forwarded (tones can't be controlled in a way that
lets you skip around from note to note and pausing and resuming will also
restart the tone from the beginning). Tests are currently in development
for this feature (https://reviewboard.asterisk.org/r/3428/).

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

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

11 years agomain/Makefile: Fix build failure on SmartOS/Illumos/SunOS
Matthew Jordan [Thu, 17 Apr 2014 20:24:41 +0000 (20:24 +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)
........

Merged revisions 412468 from http://svn.asterisk.org/svn/asterisk/branches/11

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

11 years agores_pjsip_refer: Channel variable SIPREFERTOHDR not being set during blind transfer
Kevin Harwell [Thu, 17 Apr 2014 15:16:42 +0000 (15:16 +0000)] 
res_pjsip_refer: Channel variable SIPREFERTOHDR not being set during blind transfer

The SIPREFERTOHDR channel variable is not being set on any channel when
performing a blind transfer using PJSIP. The 'refer->refer_to' was not
being set during a blind transfer.  Updated so the 'refer_to' is set to
the target uri on a blind transfer.

(closes issue ASTERISK-23502)
Reported by: John Bigelow
Review: https://reviewboard.asterisk.org/r/3445/

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

11 years agoStasis: Add a usage note on stasis_app_get_bridge
Kinsey Moore [Wed, 16 Apr 2014 19:13:51 +0000 (19:13 +0000)] 
Stasis: Add a usage note on stasis_app_get_bridge

This function returns an ast_bridge without a refcount bump and the
caller must increment the count if it intends to hold the pointer.

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

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

11 years agoEliminate some more unnecessary RAII_VAR() uses.
Richard Mudgett [Tue, 15 Apr 2014 18:27:23 +0000 (18:27 +0000)] 
Eliminate some more unnecessary RAII_VAR() uses.

RAII_VAR() is not a hammer appropriate to pound all nails.

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

11 years agoRemove unused RAII_VAR() declarations.
Richard Mudgett [Tue, 15 Apr 2014 17:56:53 +0000 (17:56 +0000)] 
Remove unused RAII_VAR() declarations.

* Remove unused RAII_VAR() declarations.  The compiler cannot catch these
because the cleanup function "references" the unused variable.  Some
actually allocated and released resources that were never used.

* Fixed some whitespace issues in stasis_bridges.c.

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

11 years agochan_sip.c: Fix channel staging assertion failure.
Richard Mudgett [Tue, 15 Apr 2014 17:01:33 +0000 (17:01 +0000)] 
chan_sip.c: Fix channel staging assertion failure.

The failing assertion ensures that the final snapshot gets generated so
CDR records can get finalized.  The only place where a channel staging
snapshot flag could be left set is in chan_sip.c:handle_request_bye().
The function could return before clearing the flag because the channel
could dissappear while the function had to have the channel unlocked.

* Fixed handle_request_bye() channel snapshot staging coverage area to not
have a return in the middle of it and be unable to clear the staging flag.

* Pushed the channel snapshot staging coverage area into
ast_rtp_instance_set_stats_vars() to ensure that the staging is not
interrutped.

* Made callers of ast_rtp_instance_set_stats_vars() not call it with any
channels or channel driver private locks held to eliminate the deadlock
potential.  The callers must hold references to the passed in channel and
rtp objects.

* Eliminated sip_hangup() trying to get the bridge peer.  It is futile at
this point because the channel could never be in a bridge.

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412385 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:36:38 +0000 (16:36 +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.
........

Merged revisions 412348 from http://svn.asterisk.org/svn/asterisk/branches/11

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412383 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:58:42 +0000 (15:58 +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
........

Merged revisions 412329 from http://svn.asterisk.org/svn/asterisk/branches/11

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

11 years agoautoservice: fix reference leak of logger callid.
Corey Farrell [Mon, 14 Apr 2014 15:53:26 +0000 (15:53 +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
........

Merged revisions 412305 from http://svn.asterisk.org/svn/asterisk/branches/11

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412306 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:41:50 +0000 (21:41 +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
........

Merged revisions 412226 from http://svn.asterisk.org/svn/asterisk/branches/11

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

11 years agobridging: Ensure locking during snapshot creation
Kinsey Moore [Fri, 11 Apr 2014 12:35:52 +0000 (12:35 +0000)] 
bridging: Ensure locking during snapshot creation

While the vast majority of bridge snapshot creation is locked properly,
there are currently some instances that are not. This adds the missing
locking to ensure bridge state is not malleable during snapshot
creation.

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412193 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:48:50 +0000 (02:48 +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
........

Merged revisions 412115 from http://svn.asterisk.org/svn/asterisk/branches/11

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

11 years agores_hep_pjsip: Use the channel name instead of the call ID when it is available
Matthew Jordan [Thu, 10 Apr 2014 21:27:25 +0000 (21:27 +0000)] 
res_hep_pjsip: Use the channel name instead of the call ID when it is available

During discussions with Alexandr Dubovikov at Kamailio World, it became
apparent that while the SIP call ID is a useful identifier prior to an Asterisk
channel being created, it is far more preferable to use the channel name (or
some channel based identifier) when the channel is available. Homer is smart
enough to tie the various messages together. This patch opts to use the channel
name when it is available, falling back to the call ID otherwise.

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

11 years agores_pjsip_pubsub: Set the body generation result to 0 for a valid path
Kevin Harwell [Thu, 10 Apr 2014 21:07:44 +0000 (21:07 +0000)] 
res_pjsip_pubsub: Set the body generation result to 0 for a valid path

The result of the "ast_sip_pubsub_generate_body_content" was not
set/initialized.  Consequently, the nominal path potentially returned
an invalid value, thus not sending mwi notifications.

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

11 years agoAdd a Command header to the AMI Mixmonitor action.
Mark Michelson [Wed, 9 Apr 2014 20:32:36 +0000 (20:32 +0000)] 
Add a Command header to the AMI Mixmonitor action.

This fixes a parsing error that occurred during the processing of
the AMI action. The error did not result in MixMonitor itself
misbehaving, but it could result in the AMI response not giving
correct information back.

The new header allows for one to specify a post-process command
to run when recording finishes. Previously, in order to do this,
the post-process command would have to be placed at the end of
the Options: header.

Patches: mixmonitor_command_2.patch by jhardin (License #6512)

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

11 years agores_stasis_answer: Add missing newlines
Kinsey Moore [Wed, 9 Apr 2014 18:16:08 +0000 (18:16 +0000)] 
res_stasis_answer: Add missing newlines

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412034 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:23:46 +0000 (21:23 +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
........

Merged revisions 411974 from http://svn.asterisk.org/svn/asterisk/branches/11

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

11 years agoconfig: Fix CB_ADD_LEN() to work as originally intended.
Richard Mudgett [Tue, 8 Apr 2014 20:51:55 +0000 (20:51 +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
........

Merged revisions 411961 from http://svn.asterisk.org/svn/asterisk/branches/11

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411962 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 18:01:58 +0000 (18:01 +0000)] 
app_confbridge: Fix confbridge.conf dsp_talking_threshold option setting wrong parameter.

Fixed copy pasta error.

ASTERISK-23545 #close
Reported by: John Knott
........

Merged revisions 411944 from http://svn.asterisk.org/svn/asterisk/branches/11

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

11 years agores_pjsip: Ignore explicit transport configuration if a WebSocket transport is specified.
Joshua Colp [Tue, 8 Apr 2014 14:48:46 +0000 (14:48 +0000)] 
res_pjsip: Ignore explicit transport configuration if a WebSocket transport is specified.

This change makes it so if a transport is configured on an endpoint that is a WebSocket
type the option will be ignored. In practice this is fine because the WebSocket
transport can not create outgoing connections, it can only reuse existing ones. By
ignoring the option the existing PJSIP logic for using the existing connection will
be invoked and stuff will proceed.

(closes issue ASTERISK-23584)
Reported by: Rusty Newton

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

11 years agoPJSIP: Ensure test event has new state
Kinsey Moore [Mon, 7 Apr 2014 20:39:55 +0000 (20:39 +0000)] 
PJSIP: Ensure test event has new state

The change that fixed the pubsub test event's use of a dangling pointer
also changed when it was processed relative to the pjsip subscription
state change processing. This change corrects the order of events while
holding a reference to the pointer that was previously dangling.

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

11 years agoAGI/Manager: Prevent multiple NewExten events during AGI application changes
Jonathan Rose [Mon, 7 Apr 2014 16:02:44 +0000 (16:02 +0000)] 
AGI/Manager: Prevent multiple NewExten events during AGI application changes

AGI applications would trigger NewExten events every time the state of the AGI
application changed. This has historically not been the behavior and this
behavior was introduced with a CDR patch. This patch corrects that.

(closes issue ASTERISK-23390)
Reported by: Benjamin Keith Ford
Review: https://reviewboard.asterisk.org/r/3406/

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

11 years agoapp_queue: Re-add HoldTime to QueueCallerAbandon event (simple typo during ast12...
Walter Doekes [Mon, 7 Apr 2014 14:55:19 +0000 (14:55 +0000)] 
app_queue: Re-add HoldTime to QueueCallerAbandon event (simple typo during ast12 refactor).

Reported by: Ibrahim22 (on IRC)
Tested by: Ibrahim22

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411811 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:50:04 +0000 (14:50 +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
........

Merged revisions 411808 from http://svn.asterisk.org/svn/asterisk/branches/11

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

11 years agoStasis: Fix Stasis() bridge refcount issue
Kinsey Moore [Mon, 7 Apr 2014 14:28:41 +0000 (14:28 +0000)] 
Stasis: Fix Stasis() bridge refcount issue

The Stasis() dialplan application monitors what bridge a channel is in
and so necessarily holds on to a bridge pointer. This change ensures
that it also holds on to a reference for that bridge to prevent the
bridge pointer from becoming a dangling pointer.

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

11 years agoPJSIP: Fix crash introduced in r411671
Kinsey Moore [Mon, 7 Apr 2014 13:24:09 +0000 (13:24 +0000)] 
PJSIP: Fix crash introduced in r411671

The test event introduced in revision 411671 uses a dangling pointer to
access information about pubsub state changes. This moves the event to
within the lifetime of the pointer.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411790 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 19:02:57 +0000 (19:02 +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
........

Merged revisions 411716 from http://svn.asterisk.org/svn/asterisk/branches/11

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

11 years agoAdd some asserts that were handy when looking for a stasis cache problem.
Richard Mudgett [Fri, 4 Apr 2014 17:53:20 +0000 (17:53 +0000)] 
Add some asserts that were handy when looking for a stasis cache problem.

* Assert if a channel is destroyed but has the snapshot staging flag set.
In this case the final channel destruction snapshot would never get taken.

* Assert if what we just got out of the stasis cache is not what we were
looking for.  This assert would have saved several days searching for a
bug and a lot of my hair.

* Assert if the music on hold message posts could not find the associated
channel.  A crash will happen later when manager tries to send the MOH AMI
message.  This assert catches the problem when the stasis message is
posted instead of by the thread processing the defective message.

* Always generate a backtrace when an ast_assert() fails.

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

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

11 years agohttp: Fix spurious ERROR message in responses with no content
Matthew Jordan [Fri, 4 Apr 2014 15:11:48 +0000 (15:11 +0000)] 
http: Fix spurious ERROR message in responses with no content

When a response has a 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 out the content if the
calculated content_length is non-zero.

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

11 years agores_pjsip_pubsub: Add test event for state change
Kinsey Moore [Thu, 3 Apr 2014 11:57:10 +0000 (11:57 +0000)] 
res_pjsip_pubsub: Add test event for state change

This adds a test event when subscription state changes so that
integration tests may trigger new actions at the appropriate times.

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

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

11 years agores_hep: Fix crash when hep.conf not available
Matthew Jordan [Thu, 3 Apr 2014 11:43:24 +0000 (11:43 +0000)] 
res_hep: Fix crash when hep.conf not available

Parts of res_hep properly checked for a valid configuration object before
attempting to access the configuration. A check, however, was missed when
a packet is sent. This patch fixes the crash caused by not checking if the
configuration object is valid.

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

11 years agores_parking: Minor tweaks.
Richard Mudgett [Tue, 1 Apr 2014 22:41:16 +0000 (22:41 +0000)] 
res_parking: Minor tweaks.

* Use ast_bridge_channel_lock()/ast_bridge_channel_unlock() instead of
ao2_lock()/ao2_unlock() for struct ast_bridge_channel variables.

* Use ast_copy_string() instead of inlining it.

* Remove an already done TODO comment.

* Some whitespace tweaks.

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

11 years agostasis_channels.c: Eliminate another overuse of RAII_VAR().
Richard Mudgett [Tue, 1 Apr 2014 22:24:39 +0000 (22:24 +0000)] 
stasis_channels.c: Eliminate another overuse of RAII_VAR().

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

11 years agoBlocked revisions 411633
Corey Farrell [Tue, 1 Apr 2014 20:48:36 +0000 (20:48 +0000)] 
Blocked revisions 411633

........
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/12@411634 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:51:05 +0000 (16:51 +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
........

Merged revisions 411585 from http://svn.asterisk.org/svn/asterisk/branches/11

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

11 years agores_hep/res_hep_pjsip: Add a HEPv3 capture agent module and a logger for PJSIP
Matthew Jordan [Fri, 28 Mar 2014 18:09:03 +0000 (18:09 +0000)] 
res_hep/res_hep_pjsip: Add a HEPv3 capture agent module and a logger for PJSIP

This patch adds the following:
(1) A new module, res_hep, which implements a generic packet capture agent for
the Homer Encapsulation Protocol (HEP) version 3. Note that this code is based
on a patch provided by Alexandr Dubovikov; I basically just wrapped it up,
added configuration via the configuration framework, and threw in a
taskprocessor.
(2) A new module, res_hep_pjsip, which forwards all SIP message traffic that
passes through the res_pjsip stack over to res_hep for encapsulation and
transmission to a HEPv3 capture server.

Much thanks to Alexandr for his Asterisk patch for this code and for a *lot*
of patience waiting for me to port it to 12/trunk. Due to some dithering on
my part, this has taken the better part of a year to port forward (I still
blame CDRs for the delay).

ASTERISK-23557 #close

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

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

11 years agoprocess stack command even if gatekeeper client isn't register
Alexandr Anikin [Fri, 28 Mar 2014 17:52:09 +0000 (17:52 +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
........

Merged revisions 411531 from http://svn.asterisk.org/svn/asterisk/branches/11

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

11 years agoUpdate API versions and UPGRADE/CHANGES for 12.2.0
Matthew Jordan [Fri, 28 Mar 2014 17:35:48 +0000 (17:35 +0000)] 
Update API versions and UPGRADE/CHANGES for 12.2.0

This patch does the following:
 * It updates the AMI version to 2.2.0 to indicate backwards compatible
   changes have been made since the last release
 * It updates the ARI version to 1.2.0 to indicate backwards compatible
   changes have been made since the last release
 * It updates the UPGRADE/CHANGES files with changes that were not
   mentioned

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

11 years agoAdd alembic script that adds contact user_agent and endpoint message_context.
Mark Michelson [Fri, 28 Mar 2014 17:08:52 +0000 (17:08 +0000)] 
Add alembic script that adds contact user_agent and endpoint message_context.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411514 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 16:48:32 +0000 (16:48 +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
........

Merged revisions 411408 from http://svn.asterisk.org/svn/asterisk/branches/11

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

11 years agohttp: response body often missing after specific request
Scott Griepentrog [Fri, 28 Mar 2014 16:17:52 +0000 (16:17 +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
........

Merged revisions 411463 from http://svn.asterisk.org/svn/asterisk/branches/11

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

11 years agoRemove block on 411408
Matthew Jordan [Fri, 28 Mar 2014 16:00:46 +0000 (16:00 +0000)] 
Remove block on 411408

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411461 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:47:36 +0000 (15:47 +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
........

Merged revisions 411458 from http://svn.asterisk.org/svn/asterisk/branches/11

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

11 years agocontrib/realtime: Remove empty SQL script files
Matthew Jordan [Fri, 28 Mar 2014 14:18:32 +0000 (14:18 +0000)] 
contrib/realtime: Remove empty SQL script files

Since the relatime scripts are now managed by Alembic, the previous realtime
scripts were previously removed. However, the removal process messed up, as
the files were still in the repository. The contents were just empty.

This removes the files from the tree.

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

11 years agoBlocked revisions 411408
Matthew Jordan [Fri, 28 Mar 2014 04:33:07 +0000 (04:33 +0000)] 
Blocked revisions 411408

........
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/12@411426 65c4cc65-6c06-0410-ace0-fbb531ad65f3

11 years agochan_sip: Add MESSAGE request to allowed methods
Matthew Jordan [Fri, 28 Mar 2014 03:54:31 +0000 (03:54 +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
........

Merged revisions 411373 from http://svn.asterisk.org/svn/asterisk/branches/11

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

11 years agoFix dialplan function NULL channel safety issues
Corey Farrell [Thu, 27 Mar 2014 19:15:35 +0000 (19:15 +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
........

Merged revisions 411314 from http://svn.asterisk.org/svn/asterisk/branches/11

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411315 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:24:24 +0000 (18:24 +0000)] 
main/formats: Fix crash in ast_format_cmp during non-clean shutdown.

* Update asterisk.h to reflect availability of ast_register_cleanup in 11.9.
* Use ast_register_cleanup for format_attr_shutdown.

(closes issue ASTERISK-23103)
Reported by: JoshE
........

Merged revisions 411310 from http://svn.asterisk.org/svn/asterisk/branches/11

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

11 years agoGive sorcery instances a reference to their wizards.
Mark Michelson [Thu, 27 Mar 2014 14:20:10 +0000 (14:20 +0000)] 
Give sorcery instances a reference to their wizards.

On graceful shutdown, sorcery wizards are all killed off, but it is
possible for sorcery instances to still have dangling pointers after
this, possibly causing a crash. Giving the sorcery instances a reference
to their wizards ensures that the wizard reference will remain valid for
the lifetime of the sorcery instance.

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411295 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:40 +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
........

Merged revisions 411244 from http://svn.asterisk.org/svn/asterisk/branches/11

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411245 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 16:07:31 +0000 (16:07 +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
........

Merged revisions 411190 from http://svn.asterisk.org/svn/asterisk/branches/11

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

11 years agoFix 'alembic branches' merge conflict as described by the web page.
Richard Mudgett [Wed, 26 Mar 2014 16:03:24 +0000 (16:03 +0000)] 
Fix 'alembic branches' merge conflict as described by the web page.

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

11 years agoARI: Don't complain about missing ARI users when we aren't enabled
Sean Bright [Tue, 25 Mar 2014 18:43:57 +0000 (18:43 +0000)] 
ARI: Don't complain about missing ARI users when we aren't enabled

Currently, if ARI is not enabled it will still complain that there are no
configured users.  This patch checks to see if ARI is enabled before logging and
error or iterating the container to validate the users.

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

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

11 years agoPrevent duplicate sorcery wizards from being applied to sorcery object types.
Mark Michelson [Tue, 25 Mar 2014 17:52:39 +0000 (17:52 +0000)] 
Prevent duplicate sorcery wizards from being applied to sorcery object types.

This commit contains several changes to sorcery:

1) Application of sorcery configuration based on module name is automatically performed
when sorcery is opened for a module.
2) Sorcery will not attempt to apply the same wizard to an object type more than once.
3) Sorcery gives more exact results when attempting to apply a wizard, whether as the
default or based on configuration.

Sorcery unit tests still pass for me after making these changes.

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

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

11 years agoAdd a "message_context" option for PJSIP endpoints.
Mark Michelson [Tue, 25 Mar 2014 17:30:56 +0000 (17:30 +0000)] 
Add a "message_context" option for PJSIP endpoints.

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

11 years agores_pjsip: Fix contact authenticate_qualify endpoint lookup when qualifing a contact.
Richard Mudgett [Tue, 25 Mar 2014 16:55:16 +0000 (16:55 +0000)] 
res_pjsip: Fix contact authenticate_qualify endpoint lookup when qualifing a contact.

* Fixed bad use of ao2_find() in on_endpoint().

* Replaced use of find_endpoints() with find_an_endpoint() since only the
first found endpoint is ever needed.

* Fixed qualify_contact_cb() to update the contact with the aor
authenticate_qualify setting.  Otherwise, permanent contacts in the aor
type sections would have a config line order dependancy.

* Fixed off nominal path contact ref leak in qualify_contact().  The
comment saying the unref is not needed was wrong.

* Fixed off nominal path use of the endpoint parameter if it is NULL in
send_out_of_dialog_request().

* Added missing off nominal path unref of pjsip tdata in
send_out_of_dialog_request().

* Fixed off nominal path failing to call the callback in send_request_cb()
when the request is challenged for authentication.

* Eliminated silly RAII_VAR() use in qualify_contact_cb().

* Updated ast_sip_send_request() doxygen to better reflect reality.

(closes issue ASTERISK-23254)
Reported by: rmudgett

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

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

11 years agochan_sip: Fix incorrect use of timers
Kinsey Moore [Tue, 25 Mar 2014 16:04:10 +0000 (16:04 +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
........

Merged revisions 411089 from http://svn.asterisk.org/svn/asterisk/branches/11

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

11 years agoARI: Resolve a subscription leak against implicit bridge subscriptions
Jonathan Rose [Tue, 25 Mar 2014 15:44:29 +0000 (15:44 +0000)] 
ARI: Resolve a subscription leak against implicit bridge subscriptions

When a channel in a stasis application is joined to a bridge, a subscription
for that bridge is created implicitly for the stasis application serving the
channel. Prior to this patch, subsequent removals of the channel from the
bridge would leave the subscription open.

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411086 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:38:21 +0000 (21:38 +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
........

Merged revisions 411022 from http://svn.asterisk.org/svn/asterisk/branches/11

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

11 years agores_pjsip_registrar.c: Miscellaneous cleanup in rx_task().
Richard Mudgett [Fri, 21 Mar 2014 16:01:56 +0000 (16:01 +0000)] 
res_pjsip_registrar.c: Miscellaneous cleanup in rx_task().

* Fix variable shadowing of 'updated' by renaming it to 'contact_update'.

* Checked 'contact_update' for ast_sorcery_copy() failure.

* Removed silly use of RAII_VAR() for 'contact_update'.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410995 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:54:59 +0000 (22:54 +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/
........

Merged revisions 410965 from http://svn.asterisk.org/svn/asterisk/branches/11

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

11 years agoassigned-uniqueids: Miscellaneous cleanup and fixes.
Richard Mudgett [Thu, 20 Mar 2014 16:27:49 +0000 (16:27 +0000)] 
assigned-uniqueids: Miscellaneous cleanup and fixes.

* Fix memory leak in ast_unreal_new_channels().  Made it generate the ;2
uniqueid on a stack variable instead of mallocing it.

* Made send error response to ARI and AMI requests instead of just logging
excessive uniqueid length and allowing truncation.  action_originate() and
ari_channels_handle_originate_with_id().

* Fixed minor truncating uniqueid hole when generating the ;2 uniqueid
string length.  Created public and internal lengths of uniqueid.  The
internal length can handle a max public uniqueid plus an appended ;2.

* free() and ast_free() are NULL tolerant so they don't need a NULL test
before calling.

* Made use better struct initialization format instead of the position
dependent initialization format.  Also anything not explicitly initialized
in the struct is initialized to zero by the compiler.

* Made ast_channel_internal_set_fake_ids() use the safer
ast_copy_string() instead of strncpy().

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

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

11 years agoPJSIP: Allow for identify sections to be specified in sorcery.conf.
Mark Michelson [Wed, 19 Mar 2014 17:26:22 +0000 (17:26 +0000)] 
PJSIP: Allow for identify sections to be specified in sorcery.conf.

"identify" is a special type of configuration object in PJSIP because
unlike the other objects, it is not provided by the base res_pjsip module.
Instead, it is provided by the res_pjsip_endpoint_identifier_ip module. If
using the default sorcery wizard (config,criteria=type=identify) then things
work because the module that applies the default wizard is the correct module.

However, if attempting to use sorcery.conf to apply an alternate wizard, it
was not possible. If you attempted to specify the identify object type in the
res_pjsip section, then the object could not be registered since the object
was undocumented for the res_pjsip module. There was no alternate configuration
section defined for it, so you were out of luck if you wanted to override the
default wizard.

With this change, the identify section will properly have a sorcery.conf-based
wizard applied when the identify definition is within the res_pjsip_endpoint_identifier_ip
section.

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

11 years agores_stasis: Fix a bug where the default bridge type was not set.
Joshua Colp [Wed, 19 Mar 2014 14:24:43 +0000 (14:24 +0000)] 
res_stasis: Fix a bug where the default bridge type was not set.

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

11 years agores_stasis: Extend bridge type to be a comma separated list of bridge attributes.
Joshua Colp [Wed, 19 Mar 2014 12:52:55 +0000 (12:52 +0000)] 
res_stasis: Extend bridge type to be a comma separated list of bridge attributes.

This change turns the bridge type field into a comma separated list of attributes.
These attributes include: mixing, holding, dtmf_events, and proxy_media. By setting
the various attributes a user can control the type of bridge created with the
behavior they need for their application.

(closes issue ASTERISK-23437)
Reported by: Matt Jordan

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

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

11 years agores_ari: Fix documentation schema error
Matthew Jordan [Wed, 19 Mar 2014 02:29:27 +0000 (02:29 +0000)] 
res_ari: Fix documentation schema error

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

11 years agores_ari: Add notes about Asterisk HTTP server to the "enabled" config option for...
Rusty Newton [Tue, 18 Mar 2014 23:31:05 +0000 (23:31 +0000)] 
res_ari: Add notes about Asterisk HTTP server to the "enabled" config option for the res_ari general section

Added note and see-also reminding user to enable the HTTP server.

(closes issue ASTERISK-22499)
Reported by: Rusty Newton

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

11 years agocdr: Add asserts for when we don't know about a CDR for a channel
Matthew Jordan [Tue, 18 Mar 2014 15:28:13 +0000 (15:28 +0000)] 
cdr: Add asserts for when we don't know about a CDR for a channel

In the CDR core, every channel should either be filtered out (due to being an
'internal' channel used as an implementation detail, such as playing media
back into a bridge) or it should get a CDR. Even if that CDR ends up being
discarded, we still give the channel a CDR in case we end up needing it. If we
hit a situation where a channel does not have a CDR, we should blow up in
-dev-mode. Asserts are appropriate for that.

This patch adds those asserts, as they would have quickly caught the error
fixed by r410814.

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

11 years agoARI: allow json content type with zero length body
Scott Griepentrog [Tue, 18 Mar 2014 14:51:02 +0000 (14:51 +0000)] 
ARI: allow json content type with zero length body

When a request was received with a Content-type of json,
the body was sent for json parsing - even if it was zero
length.  This resulted in ARI requests failing that were
valid, such as a channel DELETE with no parameters.  The
code has now been changed to skip json parsing with zero
content length.

(closes issue SWP-6748)
Reported by: Samuel Galarneau
Review: https://reviewboard.asterisk.org/r/3360/

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

11 years agores_pjsip: Fix memory leak of nameservers in off-nominal resolver creation failure.
Joshua Colp [Tue, 18 Mar 2014 12:45:01 +0000 (12:45 +0000)] 
res_pjsip: Fix memory leak of nameservers in off-nominal resolver creation failure.

Thanks Walter Doekes!

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

11 years agores_fax_spandsp: Use g711_free() when available.
Sean Bright [Tue, 18 Mar 2014 11:51:24 +0000 (11:51 +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
........

Merged revisions 410829 from http://svn.asterisk.org/svn/asterisk/branches/11

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

11 years agostasis_cache: Use the right variable in the cache entry ao2 cmp function.
Richard Mudgett [Tue, 18 Mar 2014 02:02:38 +0000 (02:02 +0000)] 
stasis_cache: Use the right variable in the cache entry ao2 cmp function.

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

11 years agores_pjsip: Enable PJSIP DNS client support.
Joshua Colp [Mon, 17 Mar 2014 22:53:08 +0000 (22:53 +0000)] 
res_pjsip: Enable PJSIP DNS client support.

This change enables DNS client support within PJSIP. System
nameservers are automatically discovered using res_init or
res_ninit. If this fails then PJSIP will resort to using
gethostbyname for resolution.

By enabling this support we gain SRV support, failover, and
weight support.

(closes issue ASTERISK-23435)
Reported by: Matt Jordan

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

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

11 years agores_pjsip_multihomed: Make address replacement less aggressive.
Joshua Colp [Mon, 17 Mar 2014 22:46:12 +0000 (22:46 +0000)] 
res_pjsip_multihomed: Make address replacement less aggressive.

This change makes the res_pjsip_multihomed module less aggressive when
changing the address in messages. It will now only occur if the transport
in use is bound to the any address OR if the system determined source
address matches the bound address of the transport in use.

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

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

11 years ago!fixup: callerid: Logic error in checksum processing
Russ Meyerriecks [Mon, 17 Mar 2014 21:56:57 +0000 (21:56 +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
........

Merged revisions 410749 from http://svn.asterisk.org/svn/asterisk/branches/11

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

11 years agocallerid: Logic error in checksum processing
Russ Meyerriecks [Mon, 17 Mar 2014 21:38:28 +0000 (21:38 +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
........

Merged revisions 410717 from http://svn.asterisk.org/svn/asterisk/branches/11

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

11 years agoRevert changes to sorcery that accidentally got committed.
Mark Michelson [Mon, 17 Mar 2014 18:36:05 +0000 (18:36 +0000)] 
Revert changes to sorcery that accidentally got committed.

These changes were still up for review and have not been approved
yet. I must have had the changes in my working copy when making
a different change.

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

11 years agoFix stuck channel in ARI through the introduction of synchronous bridge actions.
Mark Michelson [Mon, 17 Mar 2014 16:52:12 +0000 (16:52 +0000)] 
Fix stuck channel in ARI through the introduction of synchronous bridge actions.

Playing back a file to a channel in an ARI bridge would attempt to wait until
the playback concluded before returning. The method used involved signaling the
waiting thread in the ARI custom playback function.

The problem with this is that there were some corner cases that were not accounted for:
* If a bridge channel could not be found, then we never would attempt the playback but
  would still attempt to wait for the playback to complete.
* If the bridge playfile action failed to queue, we would still attempt to wait for the
  playback to complete.
* If the bridge playfile action were queued but some circumstance caused the playback
  not to occur (the bridge dies, the channel is removed from the bridge), then we would
  never be notified.

The solution to this is to move the waiting logic into the bridge code. A new bridge
API function is added to queue a synchronous action on a bridge. The waiting thread
is notified when the queued frame has been freed, either due to an error occurring
or due to successful playback. As a failsafe, the waiting thread has a 10 minute
timeout just in case there is a frame leak somewhere.

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

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

11 years agoapp_confbridge: Add missing destructor call to announcer channel destructor.
Richard Mudgett [Mon, 17 Mar 2014 16:42:05 +0000 (16:42 +0000)] 
app_confbridge: Add missing destructor call to announcer channel destructor.

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

11 years agostasis/app.c: Add some extra debugging for subscription counts
Matthew Jordan [Sun, 16 Mar 2014 20:20:14 +0000 (20:20 +0000)] 
stasis/app.c: Add some extra debugging for subscription counts

Events are sent to a connected ARI application based on the things that ARI
application cares about. These subscriptions can be set up implicitly - such
as when that ARI application creates a new object - or explicitly, via the
application resource's subscription operations. Debugging *why* something was
being sent to an application - or why something was not being sent to an
application - was a bit tricky, as there was no debug information for the
subscriptions.

This patch adds some debug level 3 statements that show the subscription counts
for applications. (Level 3 was chosen as it matches the verbose level 3
statements elsewhere)

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

11 years agoFix failing realtime sorcery tests.
Mark Michelson [Fri, 14 Mar 2014 21:55:45 +0000 (21:55 +0000)] 
Fix failing realtime sorcery tests.

The store realtime callback needs to return a positive value for
sorcery to treat the store as a success.

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

11 years agomanager: fix memory leak in manager_add_filter function
Jonathan Rose [Fri, 14 Mar 2014 21:28:31 +0000 (21:28 +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)
........

Merged revisions 410609 from http://svn.asterisk.org/svn/asterisk/branches/11

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410623 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:35 +0000 (20:53 +0000)] 
Remove an extra ast_cond_wait() that slipped through the patch.
........

Merged revisions 410606 from http://svn.asterisk.org/svn/asterisk/branches/11

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

11 years agoHandle the return values of realtime updates and stores more accurately.
Mark Michelson [Fri, 14 Mar 2014 18:10:47 +0000 (18:10 +0000)] 
Handle the return values of realtime updates and stores more accurately.

Realtime backends' update and store callbacks return the number of rows affected,
or -1 if there was a failure. There were a couple of issues:

* The config API was treating 0 as a successful return, and positive values as
  a failure. Now the config API treats anything >= 0 as a success.

* res_sorcery_realtime was treating 0 as a successful return from the store
  procedure, and any positive values as a failure. Now sorcery treats anything
  > 0 as a success. It still considers 0 a "failure" since there is no change
  to report to observers.

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

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

11 years agoPrevent conflicts regarding unsolicited and solicited MWI to an endpoint.
Mark Michelson [Fri, 14 Mar 2014 18:00:03 +0000 (18:00 +0000)] 
Prevent conflicts regarding unsolicited and solicited MWI to an endpoint.

If an endpoint is receiving unsolicited MWI for a mailbox and then attempts
to subscribe to an AOR that provides MWI for the same mailbox, then the SUBSCRIBE
is rejected with a 500 response.

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

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

11 years agouniqueid: Update CHANGES to reflect new features
Scott Griepentrog [Fri, 14 Mar 2014 17:56:13 +0000 (17:56 +0000)] 
uniqueid: Update CHANGES to reflect new features

Note the new features provided by uniqueid in the
CHANGES file.

(issue ASTERISK-23120)
Review: https://reviewboard.asterisk.org/r/3316/

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

11 years agoPJSIP: TOS values should be represented as decimals in sorcery objects
Jonathan Rose [Fri, 14 Mar 2014 16:26:07 +0000 (16:26 +0000)] 
PJSIP: TOS values should be represented as decimals in sorcery objects

(closes issue ASTERISK-23235)
Reported by: George Joseph
Review: https://reviewboard.asterisk.org/r/3324/

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

11 years agoPrevent delayed astdb syncs.
Mark Michelson [Fri, 14 Mar 2014 16:11:42 +0000 (16:11 +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)
........

Merged revisions 410556 from http://svn.asterisk.org/svn/asterisk/branches/11

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

11 years agoARI/bridges: Forward Playback/Recording Started/Finished to bridge topic
Jonathan Rose [Fri, 14 Mar 2014 16:05:45 +0000 (16:05 +0000)] 
ARI/bridges: Forward Playback/Recording Started/Finished to bridge topic

(closes issue ASTERISK-23444)
Reported by: Ben Merrills
Review: https://reviewboard.asterisk.org/r/3340/

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