7 years agoFix compilation on gcc 4.8.1
Kinsey Moore [Tue, 30 Jul 2013 13:46:16 +0000 (13:46 +0000)]
Fix compilation on gcc 4.8.1

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoRemoved quotes from svn:keywords props on a few files.
David M. Lee [Mon, 29 Jul 2013 17:51:25 +0000 (17:51 +0000)]
Removed quotes from svn:keywords props on a few files.

Subversion doesn't do quote processing, so it actually thinks that the
closing quote in 'Revision"' is a part of the keyword.

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoClarify documentation for trust of identification.
Mark Michelson [Mon, 29 Jul 2013 16:16:33 +0000 (16:16 +0000)]
Clarify documentation for trust of identification.

(closes issue ASTERISK-22023)
Reported by Rusty Newton

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoPut the include in there
Matthew Jordan [Mon, 29 Jul 2013 15:58:52 +0000 (15:58 +0000)]
Put the include in there

Mea culpa...

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoWhen performing a reload, reload the new features_config and not the old
Matthew Jordan [Mon, 29 Jul 2013 15:57:44 +0000 (15:57 +0000)]
When performing a reload, reload the new features_config and not the old

Performing a module reload of core components causes specific functions
compiled into the Asterisk binary to be reloaded. The table of said functions
was still pointing to the old features reload mechanism, and not the new one.

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoClean up and improve test_cel
Kinsey Moore [Mon, 29 Jul 2013 14:51:00 +0000 (14:51 +0000)]
Clean up and improve test_cel

Improve reliability of attended transfer merge and link tests.
Stop using ast_log(LOG_ERROR, ...); in favor of ast_test_status_update
Remove fred and eve channel helpers since they are not necessary

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoSet svn:ignore in res/ari directory
David M. Lee [Mon, 29 Jul 2013 14:08:42 +0000 (14:08 +0000)]
Set svn:ignore in res/ari directory

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoRemove comment that no longer applies
Kinsey Moore [Mon, 29 Jul 2013 12:10:10 +0000 (12:10 +0000)]
Remove comment that no longer applies

The monitor thread is already properly torn down on unload and load

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoRename everything Stasis-HTTP to ARI
Kinsey Moore [Sat, 27 Jul 2013 23:11:02 +0000 (23:11 +0000)]
Rename everything Stasis-HTTP to ARI

This renames all files and API calls from several variants of
Stasis-HTTP to ARI including:
* Stasis-HTTP -> ARI
* stasis_http -> ari (ast_ari for global symbols, file names as well)
* stasis http -> ARI

(closes issue ASTERISK-22136)

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoImprove reliability of bridge merge CEL test
Kinsey Moore [Sat, 27 Jul 2013 04:05:03 +0000 (04:05 +0000)]
Improve reliability of bridge merge CEL test

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoRemove the unsafe bridge parameter from ast_bridge_hook_callback's.
Richard Mudgett [Fri, 26 Jul 2013 21:34:23 +0000 (21:34 +0000)]
Remove the unsafe bridge parameter from ast_bridge_hook_callback's.

Most hook callbacks did not need the bridge parameter.  The pointer value
could become invalid if the channel is moved to another bridge while it is

* Fixed some issues in feature_attended_transfer() as a result.

* Reduce the bridge inhibit count in
attended_transfer_properties_shutdown() after it has restored the bridge
channel hooks.

* Removed basic bridge requirement on feature_blind_transfer().  It does
not require the basic bridge like feature_attended_transfer().

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoImproved feature limits interval hook implementaion.
Richard Mudgett [Fri, 26 Jul 2013 21:10:24 +0000 (21:10 +0000)]
Improved feature limits interval hook implementaion.

* Fixed feature limits to not use special members of struct

* Fixed memory leak in off nominal paths of bridge_builtin_set_limits().

* Fixed off nominal path in ast_bridge_features_limits_construct() freeing
unallocated memory if it was not called by bridge_builtin_set_limits().

* Made unloadable.

* Simplified parking's use of its duration interval hook.

* Made BridgeWait S option not depend upon another module being loaded.

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


git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoFix /stasis/res/app_replaced unit test.
David M. Lee [Fri, 26 Jul 2013 17:42:08 +0000 (17:42 +0000)]
Fix /stasis/res/app_replaced unit test.

A typo in recent changes caused the JSON ApplicationReplaced message to
fail to build, so the message wasn't being sent out the WebSocket.

Related, the replaced application would also unregister itself when it
disconnected, which would actually unregister the new application. This
was also fixed.

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoAdd name argument to BridgeWait() so multiple holding bridges may be used
Jonathan Rose [Fri, 26 Jul 2013 16:34:56 +0000 (16:34 +0000)]
Add name argument to BridgeWait() so multiple holding bridges may be used

Changes arguments for BridgeWait from BridgeWait(role, options) to
BridgeWait(bridge_name, role, options). Now multiple holding bridges may
be created and referenced by this application.

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

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoRemove some unnecessary parentheses.
Richard Mudgett [Fri, 26 Jul 2013 00:03:13 +0000 (00:03 +0000)]
Remove some unnecessary parentheses.

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoRevision
Richard Mudgett [Thu, 25 Jul 2013 21:39:49 +0000 (21:39 +0000)]

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoFix crash due to trying to send a re-invite while in the incorrect state.
Joshua Colp [Thu, 25 Jul 2013 20:54:17 +0000 (20:54 +0000)]
Fix crash due to trying to send a re-invite while in the incorrect state.

This crash would occur if a re-invite was queued while the initial INVITE
transaction was still occurring and the response to the INVITE was not ACKed.
This lack of ACK would cause the INVITE session state to never reach confirmed.
Once the transaction terminated, however, the queued re-invite would occur and
cause a crash due to this lack of state change.

This fix checks the INVITE session state before performing the re-invite to
ensure it is in the required confirmed state.

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoChange the default value for "allowsubscribe" to yes to match chan_sip.
Joshua Colp [Thu, 25 Jul 2013 19:18:42 +0000 (19:18 +0000)]
Change the default value for "allowsubscribe" to yes to match chan_sip.

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoRestore bridging files history.
Richard Mudgett [Thu, 25 Jul 2013 18:27:10 +0000 (18:27 +0000)]
Restore bridging files history.

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoRemove some dead parking call
Matthew Jordan [Thu, 25 Jul 2013 15:29:55 +0000 (15:29 +0000)]
Remove some dead parking call

Since nothing is using these global parking functions, remove them!

The first of many.

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoRemove dead bridging code from features
Matthew Jordan [Thu, 25 Jul 2013 14:34:09 +0000 (14:34 +0000)]
Remove dead bridging code from features

This removes the previously #if 0'd code. The functionality removed has either
been subsumed by the Bridging API or is no longer applicable.

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoFix incorrect reference to stasis/bridging.h
Matthew Jordan [Thu, 25 Jul 2013 04:18:05 +0000 (04:18 +0000)]
Fix incorrect reference to stasis/bridging.h

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoA great big renaming patch
Matthew Jordan [Thu, 25 Jul 2013 04:06:32 +0000 (04:06 +0000)]
A great big renaming patch

This patch renames the bridging* files to bridge*. This may seem pedantic
and silly, but it fits better in line with current Asterisk naming conventions:
* channel is not "channeling"
* monitor is not "monitoring"

A bridge is an object. It is a first class citizen in Asterisk. "Bridging" is
the act of using a bridge on a set of channels - and the API that fulfills that
role is more than just the action.

(closes issue ASTERISK-22130)

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoMove after bridge callbacks into their own file
Matthew Jordan [Thu, 25 Jul 2013 02:20:23 +0000 (02:20 +0000)]
Move after bridge callbacks into their own file

One more major refactoring to go.

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoImprove initial INVITE handling and fix crash due to rapidly arriving CANCEL.
Joshua Colp [Thu, 25 Jul 2013 00:44:24 +0000 (00:44 +0000)]
Improve initial INVITE handling and fix crash due to rapidly arriving CANCEL.

(closes issue ASTERISK-22150)


git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoSimplify interval hooks since there is only one bridge threading model now.
Richard Mudgett [Wed, 24 Jul 2013 23:40:12 +0000 (23:40 +0000)]
Simplify interval hooks since there is only one bridge threading model now.

* Convert interval timers to use the ast_waitfor_nandfds() timeout.

* Remove bridge channel action for intervals.  Now the main loop handles
running interval hooks.

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoRefactor ast_bridge_features struct.
Richard Mudgett [Wed, 24 Jul 2013 21:13:00 +0000 (21:13 +0000)]
Refactor ast_bridge_features struct.

* Reduced the number of hook containers to just dtmf_hooks,
interval_hooks, and other_hooks.  As a result, several functions dealing
with the different hook containers could be combined.

* Extended the generic hook struct for DTMF and interval hooks instead of
using a variant record.

* Merged the special talk detector hook into the other_hooks container.

* Replaced ast_bridge_features_set_talk_detector() with

(issue ASTERISK-22107)

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years ago* Refactor setup_bridge_features_builtin().
Richard Mudgett [Wed, 24 Jul 2013 20:28:59 +0000 (20:28 +0000)]
* Refactor setup_bridge_features_builtin().

* Add an error message so you know when a feature is not available and you
tried to use it.  It usually means the module has not been loaded.

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoExport as well
Matthew Jordan [Wed, 24 Jul 2013 19:32:23 +0000 (19:32 +0000)]
Export as well

Because is is rather needed.

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoUpdate bridge_channel refactorings; export bridge_ symbol
Matthew Jordan [Wed, 24 Jul 2013 19:24:09 +0000 (19:24 +0000)]
Update bridge_channel refactorings; export bridge_ symbol

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoAdd pjproject to install_prereq.
Jason Parker [Wed, 24 Jul 2013 18:51:06 +0000 (18:51 +0000)]
Add pjproject to install_prereq.

Also fixes spacing, in passing.

(closes issue ASTERISK-22131)

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoTweak another magic number
Kinsey Moore [Wed, 24 Jul 2013 18:08:19 +0000 (18:08 +0000)]
Tweak another magic number

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoMake AMI BridgeInfo action more verbose
Kinsey Moore [Wed, 24 Jul 2013 17:49:56 +0000 (17:49 +0000)]
Make AMI BridgeInfo action more verbose

Ensure that the BridgeInfo command provides adequate state information
about channels by publishing the full channel snapshot for
BridgeInfoChannel subevents. This prevents a two-stage lookup since
most consumers will be keying on channel names instead of uniqueids.

(closes issue ASTERISK-22140)

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoTweak a magic number
Kinsey Moore [Wed, 24 Jul 2013 17:33:45 +0000 (17:33 +0000)]
Tweak a magic number

(closes issue ASTERISK-22146)

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoAdd missing end-of-file line terminators.
Richard Mudgett [Wed, 24 Jul 2013 16:01:20 +0000 (16:01 +0000)]
Add missing end-of-file line terminators.

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoAdd missing line terminator to debug message.
Richard Mudgett [Wed, 24 Jul 2013 15:50:51 +0000 (15:50 +0000)]
Add missing line terminator to debug message.

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoPerform the initial renaming of the Bridging API
Matthew Jordan [Wed, 24 Jul 2013 15:38:18 +0000 (15:38 +0000)]
Perform the initial renaming of the Bridging API

This patch does the following:
 * It pulls out bridge_channel and puts it into its own translation unit
 * It adds public and protected headers for bridging_channel. Protected
   functions are appropriate only for the Bridging API and sub-classes of a

(issue ASTERISK-22130)

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoLet the compiler do more type checking with bridge hook callbacks.
Richard Mudgett [Wed, 24 Jul 2013 14:35:03 +0000 (14:35 +0000)]
Let the compiler do more type checking with bridge hook callbacks.

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoFix a check in bridge_native_rtp which determined if attaching the framehook failed...
Joshua Colp [Tue, 23 Jul 2013 22:32:39 +0000 (22:32 +0000)]
Fix a check in bridge_native_rtp which determined if attaching the framehook failed or not.

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agofunc_channel: dtmf_features setting
Jonathan Rose [Tue, 23 Jul 2013 21:32:33 +0000 (21:32 +0000)]
func_channel: dtmf_features setting

Allows reading andsetting dtmf features via a channel function

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

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoAdd some debug messages to make it clear what RTP bridging functionality is in use.
Joshua Colp [Tue, 23 Jul 2013 21:14:24 +0000 (21:14 +0000)]
Add some debug messages to make it clear what RTP bridging functionality is in use.

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoFix some logic so native RTP bridge will occur when monitor, audiohooks, or framehook...
Joshua Colp [Tue, 23 Jul 2013 21:01:06 +0000 (21:01 +0000)]
Fix some logic so native RTP bridge will occur when monitor, audiohooks, or framehooks are not present.

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoPull softmix bridge parameters into a sub structure.
Richard Mudgett [Tue, 23 Jul 2013 19:14:44 +0000 (19:14 +0000)]
Pull softmix bridge parameters into a sub structure.

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoDrop the reference count on the correct object.
Joshua Colp [Tue, 23 Jul 2013 18:41:29 +0000 (18:41 +0000)]
Drop the reference count on the correct object.

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoReinclude sys/stat.h in chan_dahdi.c and remove redundant include in utils.c
Richard Mudgett [Tue, 23 Jul 2013 18:41:18 +0000 (18:41 +0000)]
Reinclude sys/stat.h in chan_dahdi.c and remove redundant include in utils.c

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoSome chan_dahdi protected function renaming.
Richard Mudgett [Tue, 23 Jul 2013 16:26:36 +0000 (16:26 +0000)]
Some chan_dahdi protected function renaming.

analog_lib_handles --> dahdi_analog_lib_handles
enable_dtmf_detect --> dahdi_dtmf_detect_enable
disable_dtmf_detect --> dahdi_dtmf_detect_disable
dahdi_enable_ec --> dahdi_ec_enable
dahdi_disable_ec --> dahdi_ec_disable
update_conf --> dahdi_conf_update
dahdi_link --> dahdi_master_slave_link
dahdi_unlink --> dahdi_master_slave_unlink

(closes issue ASTERISK-22129)
Reported by: rmudgett

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoRestore chan_dahdi native bridging and PRI tromboned call elimination.
Richard Mudgett [Tue, 23 Jul 2013 15:59:32 +0000 (15:59 +0000)]
Restore chan_dahdi native bridging and PRI tromboned call elimination.

Created a native_dahdi bridging technology for use with the new bridging

The new bridging technology is part of the chan_dahdi channel driver
because it is very specific to that driver.  Rather than include the new
code directly into chan_dahdi.c the new bridge technology is in its own
file and linked into  A large part of this change is the
mechanical process of moving declarations around so chan_dahdi.c can be
split up into more files later.

* Changed the bridging core to pass NULL frames into the channel
technologies instead of discarding them.  The channel technologies may
need the proding to determine if their configuration is still valid.

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


git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoMake DTMF attended transfer support feature-complete.
Mark Michelson [Tue, 23 Jul 2013 15:28:11 +0000 (15:28 +0000)]
Make DTMF attended transfer support feature-complete.

This greatly modifies the operation of DTMF attended transfers so that
the full range of options from features.conf applies.

In addition, a new option has been added that allows for a transferer
to switch between bridges during a transfer before completing the

(closes issue ASTERISK-21543)
reported by Matt Jordan


git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoNo more teapots.
David M. Lee [Tue, 23 Jul 2013 14:57:03 +0000 (14:57 +0000)]
No more teapots.

Now that the ARI implementation is nearing some definition of
completeness, we should properly respond with 501's for unimplemented
functionality, instead of the almost humorous 418.

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoKill the zombies
Matthew Jordan [Tue, 23 Jul 2013 14:49:53 +0000 (14:49 +0000)]
Kill the zombies

In previous versions of Asterisk, the zombies roamed freely,
unchecked and uncontrolled. They ravaged Asterisk systems with
their biting and their nashing and their pointy teeth.

Sometimes, you couldn't even hang them up.

Now, zombies are rare. They still *technically* exist in certain
places, but they are controlled. Kind of like a zombie zoo: you can
see them, but you can't touch them, and they can't touch you.
Bring your kids!

Because zombies are now population controlled with a very short lifespan,
there's no reason to rename the channels to '%s<ZOMBIE>'. The channels
are guaranteed to die off quickly; the rename really is just confusing
at this point.

This patch finally removes the renaming. On the plus side: this made
my life easier in CDRs during call pickup and attended transfers to
an Asterisk application. It will make other folks lives easier as well!


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

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoAdd DTLS-SRTP support to chan_pjsip
Kinsey Moore [Tue, 23 Jul 2013 13:52:06 +0000 (13:52 +0000)]
Add DTLS-SRTP support to chan_pjsip

This patch introduces DTLS-SRTP support to chan_pjsip and the options
necessary to configure it including an option to allow choosing between
32 and 80 byte SRTP tag lengths.

During the implementation and testing of this patch, three other bugs
were found and their fixes are included with this patch. The two in
chan_sip were a segfault relating to DTLS setup and mistaken call
rejection. The third bug fix prevents chan_pjsip from attempting to
perform bridge optimization between two endpoints if either of them is
running any form of SRTP.

(closes issue ASTERISK-21419)

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoContinue events when ARI WebSocket reconnects
David M. Lee [Tue, 23 Jul 2013 13:42:46 +0000 (13:42 +0000)]
Continue events when ARI WebSocket reconnects

This patch addresses a bug in the /ari/events WebSocket in handling

When a Stasis application's associated WebSocket was disconnected and
reconnected, it would not receive events for any channels or bridges
it was subscribed to.

The fix was to lazily clean up Stasis application registrations,
instead of removing them as soon as the WebSocket goes away.

When an application is unregistered at the WebSocket level, the
underlying application is simply deactivated. If the application
WebSocket is reconnected, the application is reactivated for the new

To avoid memory leaks from lingering, unused application, the
application list is cleaned up whenever new applications are

(closes issue ASTERISK-21970)

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoFix bridge/channel AMI event ordering issues
David M. Lee [Tue, 23 Jul 2013 13:39:50 +0000 (13:39 +0000)]
Fix bridge/channel AMI event ordering issues

The stasis_cache_update messages are somewhat cumbersome to handle
with the stasis_message_router. Since all updates have the same
message type, they are normally handled with the same route.

Since caching itself is a first class component of stasis-core, it
makes sense for the router to handle the cache update messages itself.
This patch adds stasis_message_router_add_cache_update() and
stasis_message_router_remove_cache_update() to handle the routing of
stasis_cache_update messages.

This patch also corrects an issue with manager_{bridging,channels}.c,
where events might be reordered. The reordering occurs because the
components use different message routers, which they needed because
they both needed to route cache update messages. They now both use
manager's router, and add cache routes for just the cache updates they
are interested in.

(closes issue ASTERISK-22038)

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoAdd missing newline
Kinsey Moore [Tue, 23 Jul 2013 12:56:19 +0000 (12:56 +0000)]
Add missing newline

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoExpose the chan_pjsip implementation pvt and session in a defined manner.
Joshua Colp [Tue, 23 Jul 2013 12:27:03 +0000 (12:27 +0000)]
Expose the chan_pjsip implementation pvt and session in a defined manner.

This allows modules outside of chan_pjsip itself to get the session given
only an Asterisk channel.


git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoFix unbalanced lock when serializing CDR variables
Matthew Jordan [Tue, 23 Jul 2013 00:16:59 +0000 (00:16 +0000)]
Fix unbalanced lock when serializing CDR variables

I'm only surprised that this didn't cause larger problems.

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoRemove some BUGBUG notes that have been handled.
Richard Mudgett [Tue, 23 Jul 2013 00:02:04 +0000 (00:02 +0000)]
Remove some BUGBUG notes that have been handled.

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoMake the CEL blind transfer test pass consistently
Kinsey Moore [Mon, 22 Jul 2013 20:42:28 +0000 (20:42 +0000)]
Make the CEL blind transfer test pass consistently

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoUpdate copyright year to 2013 in asterisk.c; some whitespace fixes
Matthew Jordan [Mon, 22 Jul 2013 13:52:10 +0000 (13:52 +0000)]
Update copyright year to 2013 in asterisk.c; some whitespace fixes

(closes issue ASTERISK-22179)
Reported by: Malcolm Davenport

Merged revisions 395032 from

Merged revisions 395033 from

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoBlocked revisions 395020
Matthew Jordan [Sun, 21 Jul 2013 23:13:29 +0000 (23:13 +0000)]
Blocked revisions 395020

Add an upgrade note for libuuid dependency; remove note in CHANGES

This patch notes that libuuid is now a dependency for res_rtp_asterisk; this
was introduced in between 11.4.0 and 11.5.0 to resolve a dependency for
pjproject, which res_rtp_asterisk uses for ICE/STUN/TURN support.

It also removes a conflicting note from CHANGES. While support for playing
prompts to the first participant was added for app_queue, it was disabled
by default and an option added to enable it. That was properly noted in the
UPGRADE.txt file.

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoClean up documentation
Matthew Jordan [Sun, 21 Jul 2013 22:09:23 +0000 (22:09 +0000)]
Clean up documentation

This patch cleans up documentation in func_channel for the following items:
* rtpsource
* secure_signaling
* secure_media
* various OOH323 parameters

(closes issue ASTERISK-20969)
Reported by: snuffy
  func_chan-update.diff uploaded by snuffy (License 5024)

Merged revisions 394980 from

Merged revisions 394981 from

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoProvide proper ring tone in indications.conf for Malaysia
Matthew Jordan [Sun, 21 Jul 2013 18:17:17 +0000 (18:17 +0000)]
Provide proper ring tone in indications.conf for Malaysia

The ring tone provided in the sample indications.conf was incorrect. This patch
modifies the sample ring tone to be what it should:
  ring = 425/400,0/200,425/400,0/2000

This brings it in line with the tone definition in DAHDI 2.7.0. (zonedata.c)

(closes issue ASTERISK-21997)
Reported by: Filip Jenicek
  malaysia_ring.patch uploaded by phill (License 6277)

Merged revisions 394940 from

Merged revisions 394941 from

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoAlways install safe_asterisk; add configuration file support
Matthew Jordan [Sun, 21 Jul 2013 18:12:00 +0000 (18:12 +0000)]
Always install safe_asterisk; add configuration file support

This patch modifies the behavior of safe_asterisk in two ways:
(1) It modifies the Asterisk Makefile such that safe_asterisk is always
    installed on a 'make install'. This was done as bugfixes in the
    safe_asterisk script were not applied in previous version of Asterisk
    without first removing the old version of the script.
(2) In order to keep a newly installed version of safe_asterisk from impacting
    local modifications, a new config file - safe_asterisk.conf.sample - has
    been provided. Settings that were previously modified in safe_asterisk can
    be set there instead.

(closes issue ASTERISK-21965)
Reported by: Jeremy Kister
  safe_asterisk.patch uploaded by jkister (License 6232)

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoTolerate presence of RFC2965 Cookie2 header by ignoring it
Matthew Jordan [Sun, 21 Jul 2013 03:10:41 +0000 (03:10 +0000)]
Tolerate presence of RFC2965 Cookie2 header by ignoring it

This patch modifies parsing of cookies in Asterisk's http server by doing an
explicit comparison of the "Cookie" header instead of looking at the first
6 characters to determine if the header is a cookie header. This avoids
parsing "Cookie2" headers and overwriting the previously parsed "Cookie"

Note that we probably should be appending the cookies in each "Cookie"
header to the parsed results; however, while clients can send multiple
cookie headers they never really do. While this patch doesn't improve
Asterisk's behavior in that regard, it shouldn't make it any worse either.

Note that the solution in this patch was pointed out on the issue by the
issue reporter, Stuart Henderson.

(closes issue ASTERISK-21789)
Reported by: Stuart Henderson
Tested by: mjordan, Stuart Henderson

Merged revisions 394899 from

Merged revisions 394900 from

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoUpdate PostgreSQL realtime scripts with schema for queue_log table
Matthew Jordan [Sun, 21 Jul 2013 02:39:37 +0000 (02:39 +0000)]
Update PostgreSQL realtime scripts with schema for queue_log table

This patch updates the realtime SQL scripts with an entry that will create the
queue_log table. This brings the PostgreSQL scripts inline with the MySQL
scripts, with respect to what tables they will create.

(closes issue ASTERISK-21021)
Reported by: Eugene
  queue_log.sql uploaded by varnav (license 6360)

Merged revisions 394896 from

Merged revisions 394897 from

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoAdd additional control frame types to the IAX2 parser for debug messages
Matthew Jordan [Sun, 21 Jul 2013 02:30:58 +0000 (02:30 +0000)]
Add additional control frame types to the IAX2 parser for debug messages

This patch adds some of the more recent control frame types to the IAX2
parser. When IAX2 debugging is enabled, it will now show more of the control
frame types.

(closes issue ASTERISK-22120)
Reported by: Birger "WIMPy" Harzenetter
  iaxcmds.diff uploaded by wimpy

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoDocument connectedline parameter for chan_iax2
Matthew Jordan [Sun, 21 Jul 2013 02:26:31 +0000 (02:26 +0000)]
Document connectedline parameter for chan_iax2

The connectedline parameter for a chan_iax2 peer was undocumented. This patch
documents the options in the sample configuration file.

(closes issue ASTERISK-21953)
Reported by: Birger "WIMPy" Harzenetter

Merged revisions 394886 from

Merged revisions 394890 from

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoAllow setting allowmultiplelogin on an account basis
Matthew Jordan [Sun, 21 Jul 2013 02:11:49 +0000 (02:11 +0000)]
Allow setting allowmultiplelogin on an account basis

This patch modifies manager to allow the allowmultiplelogin setting to be set
on an account by account basis. When set in the general context, it will act
as the default for the defined accounts. Setting it in the account will
override the general setting.

(closes issue ASTERISK-21324)
Reported by: vldmr
  asterisk-manager-per-user-allowmultiplelogin.patch uploaded by vldmr (License 6487)

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoAdd CEL local optimization record type
Kinsey Moore [Sat, 20 Jul 2013 13:25:05 +0000 (13:25 +0000)]
Add CEL local optimization record type

This adds a new CEL event type, AST_CEL_LOCAL_OPTIMIZE, to represent
local channel optimizations. Local channel optimizations were one of
several things conveyed by the now defunct BRIDGE_UPDATE event type.
This also adds a unit test to test generation of this new CEL event.


git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoAdd transfer support to CEL
Kinsey Moore [Sat, 20 Jul 2013 13:10:22 +0000 (13:10 +0000)]
Add transfer support to CEL

This adds CEL support for blind and attended transfers and call pickup.
During the course of adding this functionality I noticed that
CONF_ENTER, CONF_EXIT, and BRIDGE_TO_CONF events are particularly
useless without a bridge identifier, so I added that as well.

This adds tests for blind transfers, several types of attended
transfers, and call pickup.

The extra field in CEL records now consists of a JSON blob whose fields
are defined on a per-event basis.

(closes issue ASTERISK-21565)

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoRegroup the ao2 search_flags.
Richard Mudgett [Sat, 20 Jul 2013 01:11:38 +0000 (01:11 +0000)]
Regroup the ao2 search_flags.

Moved the OBJ_POINTER, OBJ_KEY, and OBJ_PARTIAL_KEY flags together into a
field and renamed them to OBJ_SEARCH_OBJECT, OBJ_SEARCH_KEY, and
OBJ_SEARCH_PARTIAL_KEY respectively.  The values were selected to keep
existing code compiling and working until the codebase can be changed to
stop using these values as bit flags and use them as an enum field.

The old names are defined to the new names for backward compatibility.

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoMinor optimizations.
Richard Mudgett [Fri, 19 Jul 2013 23:30:10 +0000 (23:30 +0000)]
Minor optimizations.

* Made ast_audiohook_detach_list() and ast_audiohook_write_list_empty()
NULL tolerant.

* Made ast_audiohook_detach_list() return void since it is a destructor.

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoExtract a repeated test into ast_channel_has_audio_frame_or_monitor().
Richard Mudgett [Fri, 19 Jul 2013 22:47:10 +0000 (22:47 +0000)]
Extract a repeated test into ast_channel_has_audio_frame_or_monitor().

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoARI: MOH start and stop for a channel
Jonathan Rose [Fri, 19 Jul 2013 19:40:27 +0000 (19:40 +0000)]
ARI: MOH start and stop for a channel

(issue ASTERISK-21974)
Reported by: Matt Jordan

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoARI: Bridge Playback, Bridge Record
Jonathan Rose [Fri, 19 Jul 2013 19:35:21 +0000 (19:35 +0000)]
ARI: Bridge Playback, Bridge Record

Adds a new channel driver for creating channels for specific purposes
in bridges, primarily to act as either recorders or announcers. Adds
ARI commands for playing announcements to ever participant in a bridge
as well as for recording a bridge. This patch also includes some
documentation/reponse fixes to related ARI models such as playback

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

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


git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoFilter channels used as internal mechanisms
Kinsey Moore [Fri, 19 Jul 2013 19:23:39 +0000 (19:23 +0000)]
Filter channels used as internal mechanisms

This adds new flags to the channel tech properties that flag it as
different types of implementation detail used exclusively to provide a
feature. Examples of channels that would have these flags include the
announcement and recording channels used by confbridge which are the
only two marked as such by this patch.

(closes issue ASTERISK-21873)

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoFix crash when using temporary peers
Kinsey Moore [Fri, 19 Jul 2013 18:09:43 +0000 (18:09 +0000)]
Fix crash when using temporary peers

Temporary peers do not have an associated Stasis endpoint and quite a
bit of code in chan_sip assumes that all peers have a Stasis endpoint.
All endpoint accesses in chan_sip are now wrapped in an endpoint

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoConvert CCSS manager events to stasis.
Jason Parker [Fri, 19 Jul 2013 18:00:35 +0000 (18:00 +0000)]
Convert CCSS manager events to stasis.

(closes issue ASTERISK-21473)


git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoMade audiohooks, framehooks, and monitor prevent local channel optimization.
Richard Mudgett [Fri, 19 Jul 2013 17:55:49 +0000 (17:55 +0000)]
Made audiohooks, framehooks, and monitor prevent local channel optimization.

Audiohooks, framehooks, and monitor represent state on a local channel
that will go away if it is optimized out.

(closes issue ASTERISK-21954)
Reported by: rmudgett


git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoFixup doxygen on ast_hangup().
Richard Mudgett [Thu, 18 Jul 2013 22:01:42 +0000 (22:01 +0000)]
Fixup doxygen on ast_hangup().

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoAdd a bunch of options from sip.conf to res_sip.conf
Mark Michelson [Thu, 18 Jul 2013 19:25:51 +0000 (19:25 +0000)]
Add a bunch of options from sip.conf to res_sip.conf

For a complete list of the options added, see the review linked
at the bottom of this commit message.

(closes issue ASTERISK-21506)
reported by Matt Jordan


git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoFixed null dereference when WebSocket subprotocol isn't specified
David M. Lee [Thu, 18 Jul 2013 18:05:07 +0000 (18:05 +0000)]
Fixed null dereference when WebSocket subprotocol isn't specified

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agobridge_holding/app_bridgewait: Add new entertainment options
Jonathan Rose [Thu, 18 Jul 2013 16:49:44 +0000 (16:49 +0000)]
bridge_holding/app_bridgewait: Add new entertainment options

This patch adds more entertainment options to holding bridges and the
bridge_wait application. Also, holding bridges will now use music on
hold as the default entertainment option instead of none. The
parameters for app_bridgewait have changed to (role, options) from
the previous (options) and the options themselves have changed as
well (entertainment options are now contained in an enumerator, role
specification is handled by the role parameter, etc)

(closes issue ASTERISK-21923)
Reported by: Matthew Jordan

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoARI: Add support for suppressing media streams.
Jason Parker [Thu, 18 Jul 2013 16:03:12 +0000 (16:03 +0000)]
ARI: Add support for suppressing media streams.

Also convert res_mutestream to use the core feature behind this.

(closes issue ASTERISK-21618)


git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoTweak debug statements
Matthew Jordan [Thu, 18 Jul 2013 14:50:56 +0000 (14:50 +0000)]
Tweak debug statements

This patch does two things:
1. It moves the debug statement that shows the HTTP sub-protocols being
   compared after the string length calculation such that it shows the correct
   string length in the output
2. It adds some additional debug that displays when it matches on a
   sub-protocol and when it fails

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoFix caching topic shutdown assertions
David M. Lee [Thu, 18 Jul 2013 14:08:21 +0000 (14:08 +0000)]
Fix caching topic shutdown assertions

The recent changes to update stasis_cache_topics directly from the
publisher thread uncovered a race condition, which was causing asserts
in the /stasis/core tests.

If the caching topic's subscription is the last reference to the
caching topic, it will destroy the caching topic after the final
message has been processed. When dispatching to a different thread,
this usually gave the unsubscribe enough time to finish before
destruction happened. Now, however, it consistently destroys before
unsubscription is complete.

This patch adds an extra reference to the caching topic, to hold it
for the duration of the unsubscription.

This patch also removes an extra unref that was happening when the
final message was received by the caching topic. It was put there
because of an extra ref that was put into the caching topic's
constructor. Both have been removed, which makes the destructor a bit
less confusing.


git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoProperly indicate failure to open an audio stream in res_agi
Michael L. Young [Thu, 18 Jul 2013 12:54:50 +0000 (12:54 +0000)]
Properly indicate failure to open an audio stream in res_agi

If there is an error streaming an audio file, the current return status makes it
difficult for an AGI script to determine that there was an error with the audio

This patches changes the result to return -1 and the function returns
RESULT_FAILURE instead of RESULT_SUCCESS.  From looking at other parts of
res_agi, this would appear to be the proper way to handle an error.

(closes issue ASTERISK-21903)
Reported by: Ariel Wainer
Tested by: Ariel Wainer
by Michael L. Young (license 5026)


Merged revisions 394640 from

Merged revisions 394641 from

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoChange ast_hangup() to return void and be NULL safe.
Richard Mudgett [Wed, 17 Jul 2013 22:30:28 +0000 (22:30 +0000)]
Change ast_hangup() to return void and be NULL safe.

Since ast_hangup() is effectively a channel destructor, it should be a
void function.

* Make the few silly callers checking the return value no longer do so.
Only the CDR and CEL unit tests checked the return value.

* Make all callers take advantage of the NULL safe change and remove the
NULL check before the call.

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoRemove some completed and no longer relevant BUGBUG notes.
Richard Mudgett [Wed, 17 Jul 2013 19:27:26 +0000 (19:27 +0000)]
Remove some completed and no longer relevant BUGBUG notes.

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoapp_confbridge: Eliminate a reference leak for confbridge announcer channels
Jonathan Rose [Wed, 17 Jul 2013 18:26:19 +0000 (18:26 +0000)]
app_confbridge: Eliminate a reference leak for confbridge announcer channels

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoLeft over spacing issues of review 726.
Tzafrir Cohen [Wed, 17 Jul 2013 17:49:54 +0000 (17:49 +0000)]
Left over spacing issues of review 726.

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agohandle DAHDI_EVENT_REMOVED on a pri D-Channel
Tzafrir Cohen [Wed, 17 Jul 2013 16:56:14 +0000 (16:56 +0000)]
handle DAHDI_EVENT_REMOVED on a pri D-Channel

When a DAHDI device is removed at run-time it sends the event
DAHDI_EVENT_REMOVED on each channel. This is intended to signal the
userspace program to close the respective file handle, as the driver of
the device will need all of them closed to properly clean-up.

This event has long since been handled in chan_dahdi (chan_zap at the
time). However the event that is sent on a D-Channel of a "PRI" (ISDN)
span simply gets ignored.

This commit adds handling for closing the file descriptor (and shutting
down the span, while we're at it).

It also adds a CLI command 'pri destroy span <N>' to destroy the span
and its DAHDI channels.


git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoAdd 'kick all' capability to ConfBridge CLI command
Matthew Jordan [Tue, 16 Jul 2013 22:33:27 +0000 (22:33 +0000)]
Add 'kick all' capability to ConfBridge CLI command

This patch adds the ability to kick all users out of a conference from the
ConfBridge kick CLI command. It is invoked by passing 'all' as the channel
parameter to the CLI command, i.e., "confbridge kick <conf> all".

Note that this patch was modified slightly to conform to trunk.

(closes issue ASTERISK-21827)
Reported by: dorianlogan
  kickall-patch_v2.diff uploaded by dorianlogan (License 6504)

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoRe-order handlers in CEL to ensure that HANGUP events happen after APP_END
Matthew Jordan [Tue, 16 Jul 2013 22:25:33 +0000 (22:25 +0000)]
Re-order handlers in CEL to ensure that HANGUP events happen after APP_END

When a channel is hungup, both an APP_END event and a HANGUP event can be
fired. To ensure that HANGUP events occur after APP_END events, the method
callbacks for the APP_END event should be processed prior to the callbacks
for the HANGUP event.

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoDebug logging to help with WebSocket connection problems
David M. Lee [Tue, 16 Jul 2013 21:44:12 +0000 (21:44 +0000)]
Debug logging to help with WebSocket connection problems

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agochan_gulp: Fix gulp_indicate() handling of AST_CONTROL_PVT_CAUSE_CODE.
Richard Mudgett [Tue, 16 Jul 2013 20:00:25 +0000 (20:00 +0000)]
chan_gulp: Fix gulp_indicate() handling of AST_CONTROL_PVT_CAUSE_CODE.

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoPrevent crash from trying to end a session in an invalid way.
Mark Michelson [Tue, 16 Jul 2013 19:13:04 +0000 (19:13 +0000)]
Prevent crash from trying to end a session in an invalid way.

This ensures that code that was only meant to be run on a reinvite failure
only runs on a reinvite failure.

(closes issue ASTERISK-22061)
reported by Rusty Newton

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoRemove some dead code dealing with old bridging method.
Richard Mudgett [Tue, 16 Jul 2013 18:49:26 +0000 (18:49 +0000)]
Remove some dead code dealing with old bridging method.

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoSimplify bridge_simple chan join code.
Richard Mudgett [Tue, 16 Jul 2013 18:48:49 +0000 (18:48 +0000)]
Simplify bridge_simple chan join code.

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3

7 years agoRe-order cleanup
Matthew Jordan [Tue, 16 Jul 2013 18:22:07 +0000 (18:22 +0000)]
Re-order cleanup

This patch attempts to fix some possible race conditions in shutdown of the
CDR engine. It:
* Adds a cleanup handler to only unsubscribe and join on stasis messages during
  graceful shutdown. The cleanup handler should execute before the regular atexit
  handler, as we want to unsubscribe for any further messages before dispatching
  the CDRs.
* The CDRs are now locked when we dispatch them on shutdown.

git-svn-id: 65c4cc65-6c06-0410-ace0-fbb531ad65f3