[Asterisk-code-review] res stasis: Auto-create context and add ability to switch ap... (asterisk[13])
Benjamin Keith Ford
asteriskteam at digium.com
Wed Jan 16 15:39:49 CST 2019
Hello Friendly Automation, Corey Farrell,
I'd like you to reexamine a change. Please visit
https://gerrit.asterisk.org/10882
to look at the new patch set (#3).
Change subject: res_stasis: Auto-create context and add ability to switch applications.
......................................................................
res_stasis: Auto-create context and add ability to switch applications.
At AstriCon, there was a strong desire for the ability to completely
bypass dialplan when using ARI. This is possible through the automatic
creation of a context and a couple of extensions whenever an application
is started.
For example, if you have an application named 'ari-example', a context
named 'stasis-ari-example' will be automatically created whenever this
application is started. Two extensions (a match-all extension for Stasis
and a 'h' extension) are created within this context. Any endpoint that
registers to Asterisk within this context will send all calls to the
corresponding Stasis application. When the application is destroyed, the
context is removed.
Another new feature is the ability to move between Stasis applications
within Stasis itself. 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.
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-28104 #close
Change-Id: Ib6c569468472dbb08905b356887373c81e03015d
---
M CHANGES
M include/asterisk/stasis_app.h
M res/ari/resource_channels.c
M res/ari/resource_channels.h
M res/res_ari_channels.c
M res/res_stasis.c
M res/stasis/app.c
M res/stasis/control.c
M res/stasis/control.h
M rest-api/api-docs/channels.json
10 files changed, 516 insertions(+), 9 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/82/10882/3
--
To view, visit https://gerrit.asterisk.org/10882
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib6c569468472dbb08905b356887373c81e03015d
Gerrit-Change-Number: 10882
Gerrit-PatchSet: 3
Gerrit-Owner: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Friendly Automation (1000185)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190116/7d5a0349/attachment.html>
More information about the asterisk-code-review
mailing list