Re: WebSocket Stasis Control Best Practice

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


If I originate a call with the Stasis app as the argument instead of an extension/context/priority - I do get the channelDestroyed event.

What I had planned to do was initiate the call into the Stasis app, to get subscribed, then use /continue to a set of dialplan instructions that called AMD, followed by Stasis again (in which I can read the channel variables). This does not seem to work, however. I am trying to get logs now.

If I originate a call with an extension/context/priority instead of the Stasis App directly, but the first priority in the dial plan is the Stasis app, I never get any events (which I suppose is normal - since the call failed, the dial plan is not executed). The best case scenario would be to be able to call Stasis directly, so that I can get the channel destroyed event in the case of the initial call failure. Is this an acceptable or intended use? Is there any way to get the SIP codes/responses from the channel destroy?



On Tuesday, July 8, 2014 at 3:35 PM, Krandon wrote:


On Tuesday, July 8, 2014 at 3:08 PM, Matthew Jordan wrote:

On Tue, Jul 8, 2014 at 1:40 PM, Krandon <krandon.bruse@xxxxxxxxx> wrote:
Hey guys,

Scale testing has been going very well. I will have some prelim numbers
soon. You guys are on top of it. I found one small bug - a crash related to
string length of the request. I went to Jira to report it, updated Asterisk
from 3 weeks ago to now, saw there was a patch and the bug was already
fixed. A+!

I do have a implementation question. I am currently using Websockets to
create the call request and dump it into Stasis. However, if the initial leg
A call fails (for whatever reason) then I never see the call come into the
Stasis app. This is to be expected, as the App has not been invoked. What's
the best way to get the status of that first call? (SIP code would be great,
but not necessary first time around)

Are you Originating a Local channel from ARI?

If so, we just made a bug fix (going out in 12.4.0) where the half of
the Local channel that goes off into dialplan will also be subscribed
to. The other half will always go into the Stasis application first,
so that gives you something that you're subscribed to that is *also*
doing your dialplan call.

If calling something directly (like a PJSIP endpoint or a SIP peer),
then I'd expect you to be subscribed to that channel if you told it
you wanted it in your Stasis app when it answered. That should give
you a ChannelDestroyed event at the very least - if not, that sounds

Hey Matthew,

Right now, we POST to /channels to create a new channel. Currently, the endpoint is SIP/provider/number - we also define the extension/context/priority to drop it into the dial plan for AMD, followed by the Stasis app. We may have it call the Stasis app first, then continue to dial plan, and stasis again - but there just may be a better way. I will go back and test, but I believe even when we originated a channel through WebSockets with the Stasis App as the argument, if the call failed completely (no answer), then we never got anything from it. I'll double check.

The ChannelDestroyed event would be good, we can work from that. Good to know on the local channel side, as we have considered doing that as well.
Matthew Jordan
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA

asterisk-app-dev mailing list

asterisk-app-dev mailing list

[Index of Archives]     [Asterisk SS7]     [Asterisk Announcements]     [Asterisk Users]     [PJ SIP]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Linux API]

  Powered by Linux