[asterisk-app-dev] Handling Inbound Calls with ARI

Timothy Bott Timothy.Bott at immosky.ch
Tue Jul 14 04:40:24 CDT 2015


I'm struggling to find a suitable solution for me to handle incoming calls to my asterisk 13 Server using ARI.

I'm writing a Callcenter Webapplication in which call agents should be able to answer calls by using  their webbrowser and a soft phone installed on their computers.

I am already able to receive events for incoming calls by subscribing the sip trunk endpoint to my 'Stasis' Application as an event source. The Webbrowser displays a list of all incoming calls and the agent should now be able to pick one of those and answer it.

What I'm trying to do is if a Call Center Agent clicks on the 'answer' button of an incoming call:

1. I create a new websocket connection with a new stasis application for this call

2. asterisk calls the agents sip phone

3. the Agent Answers the call form asterisk

4. I create a bridge by using a POST to ARI.

5. Add these two channels to the bridge.

If I try to add the the incoming channel to the bridge, I always get the error message: "Channel not in Stasis Application".

Is there any other way how i can move this channel into that bridge, without using the dialplan command Stasis(appname)?

All inbound Calls are redirected to a queue by my dialplan, I would like to take the channel out there and put it in my Stasis Application to take over control.

If you have a better solution, how to handle incoming calls, please let me know.

Thanks in advance and best regards,

Timothy Bott

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-app-dev/attachments/20150714/2c711a6b/attachment.html>


More information about the asterisk-app-dev mailing list