Commit Graph

4000 Commits

Author SHA1 Message Date
Matthew Jordan cfa94a9974 Clean up MWI topic pool before message type destruction
Topics need to be disposed of prior to the message types that are published
on them. This includes topic pools. This prevents an assertion from being
raised on shutdown.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391040 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-09 21:11:25 +00:00
Matthew Jordan 3421960162 Only initialize manager_bridging during startup
This moves the initialization call behind the protection against
reloads. We don't want to re-add message router routes during
reloads.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391016 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-08 22:18:38 +00:00
Matthew Jordan c43f380d03 Add backtrace generation to MALLOC_DEBUG memory corruption reports
This patch allows astmm to access the backtrace generation code in Asterisk.
When memory is allocated, a backtrace is created and stored with the memory
region that tracks the allocation. If a memory corruption is detected, the
backtrace is printed to the astmm log. The backtrace will make use of the
BETTER_BACKTRACES build option if available.

As a result, this patch moves the backtrace generation code into its own file
and uses the non-wrapped versions of the C library memory allocation routines.
This allows the memory allocation code to safely use the backtrace generation
routines without infinitely recursing.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391012 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-08 22:09:07 +00:00
Richard Mudgett 2fe6b6a533 Add more support for native bridging.
* Added a start technology callback that technologies can use to start
bridging operations.  It is expected that native bridges will find this
useful.

* Factored out bridge_channel_complete_join().


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-08 06:31:50 +00:00
Richard Mudgett c88b7945f6 Fix a crash when a bridge switches from the softmix bridge technology to another.
A three party bridge uses the softmix bridging technology.  This
technology has a dedicated thread used to perform the analog mixing.  When
one of these parties leaves the bridge, the bridge technology is changed
from the softmix technology to a two-party mixing technology.  Changing
technologies is done by removing channels from the old technology and
adding them to the new technology.  Since the remaining channels do not
leave the bridge, the softmix mixing thread could continue to process all
channels in the bridge.  If the bridge code is not able to start
destruction of the softmix technology before the softmix mixing thread
wakes up, a crash happens.

* Added a stop technology callback that technologies can use to request
any helper threads to stop in preparation for being destroyed.

(closes issue AST-1156)
Reported by: John Bigelow


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390975 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-08 05:18:22 +00:00
Jason Parker a2d02edca5 Make app_queue AMI events more consistent. Give Join/Leave more useful names.
This also removes the eventwhencalled and eventmemberstatus configuration
options.  These events can just be filtered via manager.conf blacklists.

(closes issue ASTERISK-21469)
Review: https://reviewboard.asterisk.org/r/2586/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390901 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-07 19:51:19 +00:00
Jonathan Rose 8954661207 res_parking: Automatically generate extensions, hints, etc.
(closes issue ASTERISK-21645)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2545/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390849 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-07 16:07:18 +00:00
Jonathan Rose bec2d79484 app_meetme: Refactor manager events to use stasis
(closes issue ASTERISK-21467)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2564/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390848 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-07 15:54:26 +00:00
Kinsey Moore 759a7e4a30 Rework stasis cache clear events
Stasis cache clear message payloads now consist of a stasis_message
representative of the message to be cleared from the cache. This allows
multiple parallel caches to coexist and be cleared properly by the same
cache clear message even when keyed on different fields.

This change fixes a bug where multiple cache clears could be posted for
channels. The cache clear is now produced in the destructor instead of
ast_hangup.

Additionally, dummy channels are no longer capable of producing channel
snapshots.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390830 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-07 12:56:56 +00:00
Richard Mudgett 6114166237 Refactor chan_dahdi/sig_analog/sig_pri and chan_misdn to use the common transfer functions.
(closes issue ASTERISK-21523)
Reported by: Matt Jordan

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-07 01:06:49 +00:00
Richard Mudgett b8b7e8ab45 Tweak applicationmap and featuregroup config containers.
* Change applicationmap and featuregroup to replace duplicate config items
rather than reject them.

* Remove some unneeded warning messages when getting the applicationmap
allows duplicates from DYNAMIC_FEATURES.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390803 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-07 00:33:20 +00:00
Mark Michelson 738c44405b Conditionally reject duplicate entries in applicationmap containers.
When reading from a config file, it's important to reject duplicates. Otherwise,
featuregroups will have ambiguity when pointing to applicationmap items. However,
when constructing the channel's current applicationmap, we don't care about duplicate
names since it's the DTMF that identifies a feature, not the name.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390787 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-06 23:32:13 +00:00
Richard Mudgett bad8caa8c6 Reimplement bridging and DTMF features related channel variables in the bridging core.
* The channel variable ATTENDED_TRANSFER_COMPLETE_SOUND is no longer
channel driver specific.  If the channel variable is set on the
transferrer channel, the sound will be played to the target of an attended
transfer.

* The channel variable BRIDGEPEER becomes a comma separated list of peers
in a multi-party bridge.  The BRIDGEPEER value can have a maximum of 10
peers listed.  Any more peers in the bridge will not be included in the
list.  BRIDGEPEER is not valid in holding bridges like parking since those
channels do not talk to each other even though they are in a bridge.

* The channel variable BRIDGEPVTCALLID is only valid for two party bridges
and will contain a value if the BRIDGEPEER's channel driver supports it.

* The channel variable DYNAMIC_PEERNAME is redundant with BRIDGEPEER and
is removed.  The more useful DYNAMIC_WHO_ACTIVATED gives the channel name
that activated the dynamic feature.

* The channel variables DYNAMIC_FEATURENAME and DYNAMIC_WHO_ACTIVATED are
set only on the channel executing the dynamic feature.  Executing a
dynamic feature on the bridge peer in a multi-party bridge will execute it
on all peers of the activating channel.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390771 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-06 22:46:54 +00:00
Mark Michelson 2dc8a06006 Refactor the features configuration scheme.
Features configuration is handled in its own API in
features_config.h and features_config.c. This way, features
configuration is accessible to anything that needs it.

In addition, features configuration has been altered to
be more channel-oriented. Most callers of features API
code will be supplying a channel so that the individual
channel's settings will be acquired rather than the global
setting.

Missing from this commit is XML documentation for the
features configuration. That will be handled in a separate
commit.

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

(issue ASTERISK-21542)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390751 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-06 21:40:35 +00:00
Richard Mudgett 5f740572d0 Fix compiler warning.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390734 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-06 20:50:25 +00:00
Richard Mudgett 5c554dc470 * Fix a couple missed hook installs that need AST_BRIDGE_HOOK_REMOVE_ON_PULL.
* Rename some hook flag parameters to remove_flags.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390733 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-06 20:47:10 +00:00
Jason Parker 9f54568010 Convert message_router routes to ao2. Add support for removal.
Review: https://reviewboard.asterisk.org/r/2591/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390698 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-06 19:44:45 +00:00
Jonathan Rose c57a2735d8 Parking: Enable code responsible for intercepting park exten transfers
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390669 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-06 18:21:18 +00:00
Richard Mudgett 6bb88d2e80 Misc core external attended transfer fixes.
* Fix external attended transfer bridge move/swap method.  One of the
transferrer channels was not kicked out of the bridge.

* Fix several off-nominal extended attended transfer paths.  Mainly the
channels involved needed to be hung up or kicked out of the bridge.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390613 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-06 00:16:23 +00:00
Richard Mudgett e7e7d7759b Make local channels use ast_channel_move() instead of the inlined version.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390612 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-05 23:29:43 +00:00
David M. Lee a36d38ab38 Fixed refcounting problems with chanspy AMI support.
The ast_multi_channel_blob_get_channel function does not bump the refcount on
the channel snapshot that it returns. This is typical for Stasis message
payloads, since being immutable means that the object won't get unreffed out
from underneath you.

The manager code for chanspy was unreffing the snapshots it got out of the
multi-channel blob, which was one unref too many.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390584 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-05 21:14:03 +00:00
Mark Michelson 94d8d0468f Remove remaining traces of remove_on_pull from hooks and hook APIs.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390550 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-05 19:19:48 +00:00
Mark Michelson 4789c3fb0c Change the remove_on_pull flag on ast_bridge_hook to be a set of flags.
This change is used to make bridge hook removal more generic. This way,
depending on the circumstance, the appropriate bridge hooks may be
removed.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390510 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-05 18:07:23 +00:00
Joshua Colp fb6344e249 Publish the channel state snapshot *before* calling device state so a device state producer can use
an up to date snapshot.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390473 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-05 14:50:46 +00:00
David M. Lee f574a76e3e Fixed a consistency problem with channel snapshot and endpoint state.
When channels are added to an endpoint, the code originally posted a channel
snapshot to the endoint's topic directly. Turns out, this is a bad idea.

This causes the endpoint to see an inconsistent view of the channel, since it
will later receive in-flight messages with old channel snapshots.

This patch instead just publishes channel state immediately after setting up
the forward to the endpoint's topic. This gives the endpoints a consistent
view of the channel's state.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390472 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-05 14:47:30 +00:00
David M. Lee 6d805dc04b Correct autoconf script for finding UUID support.
The library that provides UUID support varies greatly from system to
system. On most Linux distros, it's in libuuid. On OpenBSD, it's in
libe2fs-uuid. On OS X, it is in libsystem.

This patch plays hide-and-seek with UUID support, looking for it in the
three places we know about. It also corrects the Makefile so that it uses
the configured library name and include path.

(closes issue ASTERISK-21816)
Reported by: Brad Latus (snuffy)
Tested by: Brad Latus (snuffy)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390352 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-03 15:57:42 +00:00
Kinsey Moore 1458a20e47 Refactor code and fix a reference leak
Refactor some channel blob publishing code to use
ast_channel_publish_blob now that it is available and fix a JSON
reference leak that was occurring during varset publishing.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390317 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-31 19:00:51 +00:00
Richard Mudgett 680765d452 Remove ast_channel_bridge() and associated code called only by it.
* Added some more BUGBUG notes.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390291 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-31 16:15:32 +00:00
Richard Mudgett ccc8cc5346 Fixup hold/unhold with attended and blind transfers.
* DTMF attended and blind transfers have hold/unhold behavior restored.

* External attended and blind transfers unhold the transfered party when
the transfer is initiated.

* Made prohibit blind transferring a bridge marked as masquerade only.
(ConfBridge bridges)

* Made running an application or playing a file inside a bridge post the
hold/unhold messages if MOH is requested.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390289 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-31 15:34:20 +00:00
Jason Parker a1494300c9 Replace ast_manager_publish_message() with a more useful version.
It's much easier to just create a blob of the message.  Convert some AMI events
to use it.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390268 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-31 14:36:08 +00:00
Kinsey Moore 39d5e40cd5 Remove remnant of snapshot blob JSON types
Remove usage of the once-mandatory snapshot blob type field, refactor
confbridge stasis messages accordingly, and remove
ast_bridge_blob_json_type().

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390250 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-31 12:41:10 +00:00
Kinsey Moore e1bff7958a Add snapshot cache that indexes by channel name
This adds a new channel snapshot cache in parallel to the existing
cache; the difference being that it indexes the channel snapshots by
channel name instead of channel uniqueid.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390249 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-31 12:27:29 +00:00
David M. Lee 721a1faf6d Missed a line from a bad merge in r390122
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390154 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-30 19:23:53 +00:00
David M. Lee d81c846724 Avoid unnecessary cleanups during immediate shutdown
This patch addresses issues during immediate shutdowns, where modules
are not unloaded, but Asterisk atexit handlers are run.

In the typical case, this usually isn't a big deal. But the
introduction of the Stasis message bus makes it much more likely for
asynchronous activity to be happening off in some thread during
shutdown.

During an immediate shutdown, Asterisk skips unloading modules. But
while it is processing the atexit handlers, there is a window of time
where some of the core message types have been cleaned up, but the
message bus is still running. Specifically, it's still running
module subscriptions that might be using the core message types. If a
message is received by that subscription in that window, it will
attempt to use a message type that has been cleaned up.

To solve this problem, this patch introduces ast_register_cleanup().
This function operates identically to ast_register_atexit(), except
that cleanup calls are not invoked on an immediate shutdown. All of
the core message type and topic cleanup was moved from atexit handlers
to cleanup handlers.

This ensures that core type and topic cleanup only happens if the
modules that used them are first unloaded.

This patch also changes the ast_assert() when accessing a cleaned up
or uninitialized message type to an error log message. Message type
functions are actually NULL safe across the board, so the assert was a
bit heavy handed. Especially for anyone with DO_CRASH enabled.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390122 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-30 17:05:53 +00:00
Richard Mudgett f069ee9681 Fix segfault when dealing with chan_agent channels.
Check the returned bridged pointer for NULL to avoid a crash.  It looks
like chan_agent is returning a NULL pointer when it probably should be
returning a pointer to the channel the Agent channel is pretending to be.

(closes issue ASTERISK-21793)
Reported by: Rodrigo P. Telles
Patches:
      jira_asterisk_21793_v1.8.patch (license #5621) patch uploaded by rmudgett
Tested by: Rodrigo P. Telles
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390068 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-29 20:24:18 +00:00
Jason Parker fa98eb2aea Remove unused RAII vars.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-29 19:54:01 +00:00
Kinsey Moore 6851801a5e Resolve a merge conflict
When ast_channel_cached_blob_create was merged,
ast_channel_blob_create_from_cache was partially removed in an
unresolved merge conflict. This restores ast_channel_blob_create_from_cache
and refactors usage of ast_channel_cached_blob_create (requires an
ast_channel) to use ast_channel_blob_create_from_cache (requires a
channel uniqueid) instead.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389974 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-29 02:26:17 +00:00
Jonathan Rose bb584c55de Fix a memory copying bug in slinfactory which was causing mixmonitor issues.
Reported by: Michael Walton
Tested by: Jonathan Rose
Patches:
    slinfactory.c.ASTERISK-21799.patch uploaded by Michael Walton (license 6502)
(closes issue ASTERISK-21799)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389897 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-28 17:47:29 +00:00
Mark Michelson 45dc10de84 Add missing NULL check to acquire_bridge() function.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389870 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-28 15:54:53 +00:00
Mark Michelson fac3839e68 Adds support for a core attended transfer function plus adds some hiding of masquerades.
The attended transfer API call can complete the attended transfer in a number of ways
depending on the current bridged states of the channels involved.

The hiding of masquerades is done in some bridging-related functions, such as the manager
Bridge action and the Bridge dialplan application. In addition, call pickup was edited
to "move" a channel rather than masquerade it.

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

(closes issue ASTERISK-21334)
Reported by Matt Jordan

(closes issue Asterisk-21336)
Reported by Matt Jordan



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389848 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-28 14:45:31 +00:00
Matthew Jordan a0f6d1848b Initialize the message type before the topic
Caching topics will during initialization attempt to reference
their message type. The message type therefore has to be
initialized prior to the topic to prevent the dreaded assertion.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389813 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-27 00:06:40 +00:00
Matthew Jordan fe3ca5401f Fix a variety of memory corruption/assertion errors
* Initialize a Stasis-Core message type prior to initializing a caching topic.
  The caching topic will attempt to use the message type.
* Don't attempt to publish Stasis-Core messages from remote console connections.
  They aren't the main process; they shouldn't attempt to behave as it (they also
  don't have the infrastructure to do so)
* Don't treat a JSON object as an ao2 object (whoops)
* In asterisk.c, ref bump the JSON even package that is distributed with the
  event meta data. The callers assume that they own the reference, and the packing
  routine steals references.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389785 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-26 04:47:17 +00:00
Matthew Jordan 97c6062dfc Restore initialization of security topics
During a merge the security topic initialization got blown away.
This patch restores it.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389770 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-25 17:41:25 +00:00
Jason Parker 154fbf8cae Split Hold event into Hold/Unhold, and move it into core.
(closes issue ASTERISK-21487)
Review: https://reviewboard.asterisk.org/r/2565/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389746 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-24 21:21:25 +00:00
Matthew Jordan 06be8463b6 Migrate a large number of AMI events over to Stasis-Core
This patch moves a number of AMI events over to the Stasis-Core message bus.
This includes:
 * ChanSpyStart/Stop
 * MonitorStart/Stop
 * MusicOnHoldStart/Stop
 * FullyBooted/Reload
 * All Voicemail/MWI related events

In addition, it adds some Stasis-Core and AMI support for generic AMI messages,
refactors the message router in AMI to use a single router with topic
forwarding for the topics that AMI cares about, and refactors MWI message
types and topics to be more name compliant.

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

(closes issue ASTERISK-21462)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389733 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-24 20:44:07 +00:00
Matthew Jordan c1b51fd265 Print all logger messages on shutdown
When Asterisk shuts down and shuts down the loggin gsubsystem, any
messages currently in flight will not get logged. This patch prevents the
loop writing messages from breaking out prematurely, such that all of the
messages are logged.

(closes issue ASTERISK-21716)
Reported by: Corey Farrell
patches:
  logger-process-all-messages.patch uploaded by Corey Farrell (license 5909)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-24 11:57:48 +00:00
David M. Lee 557125664d This patch adds support for controlling a playback operation from the
Asterisk REST interface.

This adds the /playback/{playbackId}/control resource, which may be
POSTed to to pause, unpause, reverse, forward or restart the media
playback.

Attempts to control a playback that is not currently playing will
either return a 404 Not Found (because the playback object no longer
exists) or a 409 Conflict (because the playback object is still in the
queue to be played).

This patch also adds skipms and offsetms parameters to the
/channels/{channelId}/play resource.

(closes issue ASTERISK-21587)
Review: https://reviewboard.asterisk.org/r/2559


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389603 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-23 20:21:16 +00:00
David M. Lee 10ba6bf8a8 This patch implements the REST API's for POST /channels/{channelId}/play
and GET /playback/{playbackId}.

This allows an external application to initiate playback of a sound on a
channel while the channel is in the Stasis application.

/play commands are issued asynchronously, and return immediately with
the URL of the associated /playback resource. Playback commands queue up,
playing in succession. The /playback resource shows the state of a
playback operation as enqueued, playing or complete. (Although the
operation will only be in the 'complete' state for a very short time,
since it is almost immediately freed up).

(closes issue ASTERISK-21283)
(closes issue ASTERISK-21586)
Review: https://reviewboard.asterisk.org/r/2531/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389587 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-23 20:11:35 +00:00
Richard Mudgett 3464e0919a Fix inverted test preventing DTMF disconnect from working.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389569 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-23 18:40:50 +00:00
David M. Lee 8a5a09e62c Fixed startup race condition which caused occasional stasis_mwi_state_type assertions.
The caching topic (which refers to the message type) was created before the
message type. If the initial subscription message gets processed before
the type can be initialized, the assertion about using an uninitialized type
fires.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-22 19:15:16 +00:00