asterisk/asterisk.git
9 years agoFix sorcery for some rather picky regex implementations.
David M. Lee [Thu, 1 Aug 2013 21:19:27 +0000 (21:19 +0000)]
Fix sorcery for some rather picky regex implementations.

Some regex implementations won't compile an empty string. Assuming that
it's equivalent of a regex that will match anything, use ".?" instead.

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

9 years agoSupport externally initiated parking requests; remove some dead code
Matthew Jordan [Thu, 1 Aug 2013 20:55:17 +0000 (20:55 +0000)]
Support externally initiated parking requests; remove some dead code

This patch does the following:
 * It adds support for externally initiated parking requests. In particular,
   chan_skinny has a protocol level message that initiates a call park.
   This patch now supports that option, as well as the protocol specific
   mechanisms in chan_dahdi/sig_analog and chan_mgcp.
 * A parking bridge features virtual table has been added that provides
   access to the parking functionality that the Bridging API needs. This
   includes requests to park an entire 'call' (with little or no additional
   information, thank you chan_skinny), perform a blind transfer to a parking
   extension, determine if an extension is a parking extension, as well as the
   actual "do the parking" request from the Bridging API.
 * Refactoring in chan_mgcp, chan_skinny, and chan_dahdi to make use of the new
   functions
 * The removal of some - but not all - dead parking code from features.c

This also fixed blind transferring a multi-party bridge to a parking lot (which
was implemented, but had at least one code path where using the parking features
kK might not have worked)

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

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

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

9 years agoAdd queue member paused hints
Matthew Jordan [Thu, 1 Aug 2013 19:11:46 +0000 (19:11 +0000)]
Add queue member paused hints

This patch adds the ability in Queue to raise a hint when a member's paused
state changes. The hint uses the form 'Queue:{queue_name}_pause_{member_name}',
where {queue_name} and {member_name} are the name of the queue and the name
of the member to subscribe to, respectively.

For example: exten => 8501,hint,Queue:sales_pause_mark.

Members will show as In Use when paused.

Note that the format of the queue pause hint was changed slightly from what
is on the issue to accomodate suggestion on the code review.

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

(closes issue ASTERISK-20842)
Reported by: Philippe Lindheimer
patches:
  qpause-10-378206.diff uploaded by Philippe Lindheimer (license 5519)
  qpause-11-378206.diff uploaded by Philippe Lindheimer (license 5519)
  qpause-trunk-378206.diff uploaded by Philippe Lindheimer (license 5519)

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

9 years agoRegenerate configure for configure.ac changes
Kinsey Moore [Thu, 1 Aug 2013 17:23:10 +0000 (17:23 +0000)]
Regenerate configure for configure.ac changes

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

9 years agoFix documentation replication issues
Kinsey Moore [Thu, 1 Aug 2013 17:07:52 +0000 (17:07 +0000)]
Fix documentation replication issues

This prevents XML documentation duplication by expanding channel and
bridge snapshot tags into channel and bridge snapshot parameter sets
with a given prefix or defaulting to no prefix. This also prevents
documentation from becoming fractured and out of date by keeping all
variations of the documentation in template form such that it only
needs to be updated once and keeps maintenance to a minimum.

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

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

9 years agoFixed warning in astman for gcc-4.8.
David M. Lee [Thu, 1 Aug 2013 16:56:51 +0000 (16:56 +0000)]
Fixed warning in astman for gcc-4.8.

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

9 years agoFixed compile errors introduced in r395954.
David M. Lee [Thu, 1 Aug 2013 15:31:03 +0000 (15:31 +0000)]
Fixed compile errors introduced in r395954.

Just a merge error due to a file rename. Grrr...

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

9 years agoSplit caching out from the stasis_caching_topic.
David M. Lee [Thu, 1 Aug 2013 13:49:34 +0000 (13:49 +0000)]
Split caching out from the stasis_caching_topic.

In working with res_stasis, I discovered a significant limitation to
the current structure of stasis_caching_topics: you cannot subscribe
to cache updates for a single channel/bridge/endpoint/etc.

To address this, this patch splits the cache away from the
stasis_caching_topic, making it a first class object. The stasis_cache
object is shared amongst individual stasis_caching_topics that are
created per channel/endpoint/etc. These are still forwarded to global
whatever_all_cached topics, so their use from most of the code does
not change.

In making these changes, I noticed that we frequently used a similar
pattern for bridges, endpoints and channels:

     single_topic  ---------------->  all_topic
           ^
           |
     single_topic_cached  ----+---->  all_topic_cached
                              |
                              +---->  cache

This pattern was extracted as the 'Stasis Caching Pattern', defined in
stasis_caching_pattern.h. This avoids a lot of duplicate code between
the different domain objects.

Since the cache is now disassociated from its upstream caching topics,
this also necessitated a change to how the 'guaranteed' flag worked
for retrieving from a cache. The code for handling the caching
guarantee was extracted into a 'stasis_topic_wait' function, which
works for any stasis_topic.

(closes issue ASTERISK-22002)
Review: https://reviewboard.asterisk.org/r/2672/

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

9 years agoAnswer with multiple codecs if the underlying pjproject supports it.
Joshua Colp [Thu, 1 Aug 2013 11:21:28 +0000 (11:21 +0000)]
Answer with multiple codecs if the underlying pjproject supports it.

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

9 years agoRaise Registry AMI events on registration failures
Matthew Jordan [Thu, 1 Aug 2013 00:07:59 +0000 (00:07 +0000)]
Raise Registry AMI events on registration failures

This patch makes it so that all registration attempts that fail that
also permanently modify the registration state will raise an appropriate
AMI event.

Note that this patch was forward ported to trunk and the Stasis Core
message bus by mjordan.

(closes issue ASTERISK-21368)
Reported by: Dmitriy Serov
patches:
  chan_sip.c.diff uploaded by Demon (license 6479)

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

9 years agoUpdate CONTROL STREAM FILE to accept an 'offsetms' parameter
Matthew Jordan [Wed, 31 Jul 2013 23:48:35 +0000 (23:48 +0000)]
Update CONTROL STREAM FILE to accept an 'offsetms' parameter

This patch allows starting playback of audio through the CONTROL STREAM FILE
AGI command to start at a particular offset. It will also return the final
position of the file in the 'endpos' attribute.

(closes issue ASTERISK-17803)
Reported by: Murray Melvin
patches:
  res_agi.c.r316293.diff uploaded by murraytm (license 6221)

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

9 years agoFound another missed "sip" -> "pjsip" CLI command.
Mark Michelson [Wed, 31 Jul 2013 15:43:43 +0000 (15:43 +0000)]
Found another missed "sip" -> "pjsip" CLI command.

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

9 years agoDisable CEL tests that need rearchitecting to operate properly
Kinsey Moore [Wed, 31 Jul 2013 15:27:29 +0000 (15:27 +0000)]
Disable CEL tests that need rearchitecting to operate properly

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

9 years agoRemove "constant" endpoint identifier.
Mark Michelson [Wed, 31 Jul 2013 14:45:58 +0000 (14:45 +0000)]
Remove "constant" endpoint identifier.

This was created as a debugging tool before proper endpoint identifiers
were created. Using it now can actually lead to harmful results.

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

9 years agoFix hold/unhold in bridge_native_rtp, use tech_pvt instead of bridge_pvt, reduce...
Joshua Colp [Wed, 31 Jul 2013 14:29:11 +0000 (14:29 +0000)]
Fix hold/unhold in bridge_native_rtp, use tech_pvt instead of bridge_pvt, reduce bridging attempts, and fix breaking native RTP bridges.

(closes issue ASTERISK-22128)

(closes issue ASTERISK-22104)

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

9 years agoFix remnants of the pjsip renaming
Kinsey Moore [Wed, 31 Jul 2013 13:31:55 +0000 (13:31 +0000)]
Fix remnants of the pjsip renaming

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

9 years agoEnforce conference exit order for CEL tests
Kinsey Moore [Wed, 31 Jul 2013 03:49:44 +0000 (03:49 +0000)]
Enforce conference exit order for CEL tests

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

9 years agoMissed a conversion to pjsip.conf in documentation and sorcery.
Mark Michelson [Tue, 30 Jul 2013 22:41:05 +0000 (22:41 +0000)]
Missed a conversion to pjsip.conf in documentation and sorcery.

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

9 years agoRemove ast_bridged_channel call from abstract_jb.c
Mark Michelson [Tue, 30 Jul 2013 21:43:29 +0000 (21:43 +0000)]
Remove ast_bridged_channel call from abstract_jb.c

Interestingly, this only happens in dead code.

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

9 years agoSetting svn:ignore for res/res_pjsip
David M. Lee [Tue, 30 Jul 2013 20:44:10 +0000 (20:44 +0000)]
Setting svn:ignore for res/res_pjsip

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

9 years agoUpdate res_pjsip_endpoint_identifier_constant.c to use reorganized endpoint structure.
Mark Michelson [Tue, 30 Jul 2013 19:10:30 +0000 (19:10 +0000)]
Update res_pjsip_endpoint_identifier_constant.c to use reorganized endpoint structure.

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

9 years agoThe large GULP->PJSIP renaming effort.
Mark Michelson [Tue, 30 Jul 2013 18:14:50 +0000 (18:14 +0000)]
The large GULP->PJSIP renaming effort.

The general gist is to have a clear boundary between old SIP stuff
and new SIP stuff by having the word "SIP" for old stuff and "PJSIP"
for new stuff. Here's a brief rundown of the changes:

* The word "Gulp" in dialstrings, functions, and CLI commands is now
  "PJSIP"
* chan_gulp.c is now chan_pjsip.c
* Function names in chan_gulp.c that were "gulp_*" are now "chan_pjsip_*"
* All files that were "res_sip*" are now "res_pjsip*"
* The "res_sip" directory is now "res_pjsip"
* Files in the "res_pjsip" directory that began with "sip_*" are now "pjsip_*"
* The configuration file is now "pjsip.conf" instead of "res_sip.conf"
* The module info for all PJSIP-related files now uses "PJSIP" instead of "SIP"
* CLI and AMI commands created by Asterisk's PJSIP modules now have "pjsip" as
the starting word instead of "sip"

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

9 years agoReorganize the ast_sip_endpoint structure into substructures.
Mark Michelson [Tue, 30 Jul 2013 15:17:56 +0000 (15:17 +0000)]
Reorganize the ast_sip_endpoint structure into substructures.

(closes issue ASTERISK-22135)
reported by Matt Jordan

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

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

9 years agoAdd support for T.38 fax to chan_pjsip.
Joshua Colp [Tue, 30 Jul 2013 14:16:41 +0000 (14:16 +0000)]
Add support for T.38 fax to chan_pjsip.

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

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

9 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: https://origsvn.digium.com/svn/asterisk/trunk@395728 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 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: https://origsvn.digium.com/svn/asterisk/trunk@395686 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 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: https://origsvn.digium.com/svn/asterisk/trunk@395674 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 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: https://origsvn.digium.com/svn/asterisk/trunk@395673 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 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: https://origsvn.digium.com/svn/asterisk/trunk@395672 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 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: https://origsvn.digium.com/svn/asterisk/trunk@395653 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 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: https://origsvn.digium.com/svn/asterisk/trunk@395636 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 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
failure.

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

9 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
* stasis_http -> ari (ast_ari for global symbols, file names as well)
* stasis http -> ARI

Review: https://reviewboard.asterisk.org/r/2706/
(closes issue ASTERISK-22136)

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

9 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: https://origsvn.digium.com/svn/asterisk/trunk@395588 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 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
executing.

* 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: https://origsvn.digium.com/svn/asterisk/trunk@395574 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 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
ast_bridge_features.

* 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 bridge_builtin_interval_features.so 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

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

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

9 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: https://origsvn.digium.com/svn/asterisk/trunk@395527 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 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
Review: https://reviewboard.asterisk.org/r/2642/

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

9 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: https://origsvn.digium.com/svn/asterisk/trunk@395477 65c4cc65-6c06-0410-ace0-fbb531ad65f3

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

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

9 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: https://origsvn.digium.com/svn/asterisk/trunk@395455 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 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: https://origsvn.digium.com/svn/asterisk/trunk@395439 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 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: https://origsvn.digium.com/svn/asterisk/trunk@395430 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 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: https://origsvn.digium.com/svn/asterisk/trunk@395410 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 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: https://origsvn.digium.com/svn/asterisk/trunk@395400 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 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: https://origsvn.digium.com/svn/asterisk/trunk@395381 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 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"
etc.

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: https://origsvn.digium.com/svn/asterisk/trunk@395378 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 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: https://origsvn.digium.com/svn/asterisk/trunk@395367 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 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)

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

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

9 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: https://origsvn.digium.com/svn/asterisk/trunk@395340 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 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
ast_bridge_talk_detector_hook().

(issue ASTERISK-22107)

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

9 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: https://origsvn.digium.com/svn/asterisk/trunk@395316 65c4cc65-6c06-0410-ace0-fbb531ad65f3

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

Because is is rather needed.

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

9 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: https://origsvn.digium.com/svn/asterisk/trunk@395295 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 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: https://origsvn.digium.com/svn/asterisk/trunk@395283 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 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: https://origsvn.digium.com/svn/asterisk/trunk@395271 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 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: https://origsvn.digium.com/svn/asterisk/trunk@395270 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 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: https://origsvn.digium.com/svn/asterisk/trunk@395267 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 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: https://origsvn.digium.com/svn/asterisk/trunk@395255 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 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: https://origsvn.digium.com/svn/asterisk/trunk@395254 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 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
   bridge.

(issue ASTERISK-22130)

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

9 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: https://origsvn.digium.com/svn/asterisk/trunk@395243 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 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: https://origsvn.digium.com/svn/asterisk/trunk@395227 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 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
CHANNEL(dtmf_features)

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

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

9 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: https://origsvn.digium.com/svn/asterisk/trunk@395205 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 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: https://origsvn.digium.com/svn/asterisk/trunk@395203 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 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: https://origsvn.digium.com/svn/asterisk/trunk@395188 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 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: https://origsvn.digium.com/svn/asterisk/trunk@395183 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 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: https://origsvn.digium.com/svn/asterisk/trunk@395182 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 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: https://origsvn.digium.com/svn/asterisk/trunk@395167 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 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
API.

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 chan_dahdi.so.  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

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

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

9 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
transfer.

(closes issue ASTERISK-21543)
reported by Matt Jordan

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

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

9 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: https://origsvn.digium.com/svn/asterisk/trunk@395136 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 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!

Review: https://reviewboard.astierks.org/r/2690/

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

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

9 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.

Review: https://reviewboard.asterisk.org/r/2683/
(closes issue ASTERISK-21419)

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

9 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
reconnects.

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
connection.

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

(closes issue ASTERISK-21970)
Review: https://reviewboard.asterisk.org/r/2678/

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

9 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)
Review: https://reviewboard.asterisk.org/r/2677/

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

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

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

9 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.

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

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

9 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: https://origsvn.digium.com/svn/asterisk/trunk@395089 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 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: https://origsvn.digium.com/svn/asterisk/trunk@395088 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 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: https://origsvn.digium.com/svn/asterisk/trunk@395074 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 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 http://svn.asterisk.org/svn/asterisk/branches/1.8
........

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

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

9 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: https://origsvn.digium.com/svn/asterisk/trunk@395021 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 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
patches:
  func_chan-update.diff uploaded by snuffy (License 5024)
........

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

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

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

9 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
patches:
  malaysia_ring.patch uploaded by phill (License 6277)
........

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

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

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

9 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
patches:
  safe_asterisk.patch uploaded by jkister (License 6232)

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

9 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"
header.

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 http://svn.asterisk.org/svn/asterisk/branches/1.8
........

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

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

9 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
patches:
  queue_log.sql uploaded by varnav (license 6360)
........

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

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

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

9 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
patches:
  iaxcmds.diff uploaded by wimpy

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

9 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 http://svn.asterisk.org/svn/asterisk/branches/1.8
........

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

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

9 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
patches:
  asterisk-manager-per-user-allowmultiplelogin.patch uploaded by vldmr (License 6487)

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

9 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.

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

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

9 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.

Review: https://reviewboard.asterisk.org/r/2658/
(closes issue ASTERISK-21565)

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

9 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: https://origsvn.digium.com/svn/asterisk/trunk@394846 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 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: https://origsvn.digium.com/svn/asterisk/trunk@394836 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 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: https://origsvn.digium.com/svn/asterisk/trunk@394825 65c4cc65-6c06-0410-ace0-fbb531ad65f3

9 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
Review: https://reviewboard.asterisk.org/r/2680/

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

9 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
controls.

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

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

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

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

9 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.

Review: https://reviewboard.asterisk.org/r/2633/
(closes issue ASTERISK-21873)

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