[Asterisk-code-review] res stasis: Auto-create context and add ability to switch ap... (asterisk[13])

Benjamin Keith Ford asteriskteam at digium.com
Thu Jan 24 10:25:35 CST 2019


Hello Friendly Automation, Corey Farrell, Joshua C. Colp, 

I'd like you to reexamine a change. Please visit

    https://gerrit.asterisk.org/10882

to look at the new patch set (#5).

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, 528 insertions(+), 27 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/82/10882/5
-- 
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: 5
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)
Gerrit-Reviewer: Joshua C. Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190124/b8debf5a/attachment-0001.html>


More information about the asterisk-code-review mailing list