]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_stasis: Add ability to switch applications.
authorBen Ford <bford@digium.com>
Thu, 28 Feb 2019 18:03:43 +0000 (12:03 -0600)
committerBen Ford <bford@digium.com>
Thu, 7 Mar 2019 10:42:35 +0000 (04:42 -0600)
commit65170ba8f012b745d637f668ea165480417ace5d
tree45d9ae1e71c67005d4dc7356aaca3a292e2de69c
parentc4a172efba0bd5788a7f00a887a49825068848b7
res_stasis: Add ability to switch applications.

Added the ability to move between Stasis applications within Stasis.
This can be done by calling 'move' in an application, providing (at
minimum) the channel's id and the application to switch to. If the
application is not registered or active, nothing will happen and the
channel will remain in the current application, and an event will be
triggered to let the application know that the move failed. The event
name is "ApplicationMoveFailed", and provides the "destination" that the
channel was attempting to move to, as well as the usual channel
information. Optionally, a list of arguments can be passed to the
function call for the receiving application. A full example of a 'move'
call would look like this:

client.channels.move(channelId, app, appArgs)

The control object used to control the channel in Stasis can now switch
which application it belongs to, rather than belonging to one Stasis
application for its lifetime. This allows us to use the same control
object instead of having to tear down the current one and create
another.

ASTERISK-28267 #close

Change-Id: I43d12b10045a98a8d42541889b85695be26f288a
12 files changed:
CHANGES
include/asterisk/stasis_app.h
res/ari/ari_model_validators.c
res/ari/ari_model_validators.h
res/ari/resource_channels.c
res/ari/resource_channels.h
res/res_ari_channels.c
res/res_stasis.c
res/stasis/control.c
res/stasis/control.h
rest-api/api-docs/channels.json
rest-api/api-docs/events.json