[asterisk-users] Is there a list of Channel ARI requests that are allowed when the call is not handed off to the Stasis application

Dan Cropp dan at amtelco.com
Mon Jan 30 17:30:08 CST 2023


We have used AMI for many years and I'm in the process of migrating to ARI.

My understanding is the call should be handed off to Stasis for the ARI application to control it.

I was playing around with things and discovered the ARI hangup (DELETE /channels/{channelId}) allowed me to hangup calls even when no StasisStart is received.
I tried some other requests and they did not seem to work.  This is what I expected to happen for the hangup.
Are there other commands that are allowed on channels when the call is not in the Stasis app?  (Obviously creating a channel and externalMedia will work because they create new channels).

Also, to be fault tolerant, I noticed a call handed off to Stasis app will remain in the Stasis app, even if the ARI/WebSocket connection drops (power outage, etc).  When establishing the ARI/WebSocket connection, the first thing I am planning to do is GET a list of the channels.  This returns all of the channels in the system and not just the channels that are in this Stasis apps control.  I plan to go through the list and identify the channels dialplan data.  Look for app_name of Stasis and the app_data (comma-delimited).
If app_name = "Stasis" and app_data's first section of the comma-delimited parse portion matches the Stasis app name this instance is used, I take control of this channel.
I am planning this additional check because I noticed the Stasis power outage scenario resulted in channels stuck in the Stasis app.  If I don't take control of these channels, it's possible to eventually have hundreds/thousands of channels.  For SIP calls, the other end eventually hangs up.  However, this isn't the case with Local channels.  Particularly when both ends are locally controlled by Stasis.

Does this sound like I am on the right track for migrating from AMI to Stasis, ARI/Websocket support?


Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20230130/313209bf/attachment.html>


More information about the asterisk-users mailing list