<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.E-MailFormatvorlage18
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.E-MailFormatvorlage19
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.E-MailFormatvorlage20
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE-CH" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;line-height:14.65pt;background:white">
<span style="font-size:11.5pt;font-family:"Helvetica",sans-serif;color:#222222">I'm struggling to find a suitable solution for me to handle incoming calls to my asterisk 13 Server using ARI.<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;line-height:14.65pt;background:white;orphans: auto;widows: 1;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-size:11.5pt;font-family:"Helvetica",sans-serif;color:#222222">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.<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;line-height:14.65pt;background:white;orphans: auto;widows: 1;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-size:11.5pt;font-family:"Helvetica",sans-serif;color:#222222">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.<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;line-height:14.65pt;background:white;orphans: auto;widows: 1;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-size:11.5pt;font-family:"Helvetica",sans-serif;color:#222222">What I'm trying to do is if a Call Center Agent clicks on the 'answer' button of an incoming call:
<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;line-height:14.65pt;background:white">
<span style="font-size:11.5pt;font-family:"Helvetica",sans-serif;color:#222222">1. I create a new websocket connection with a new stasis application for this call
<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;line-height:14.65pt;background:white">
<span style="font-size:11.5pt;font-family:"Helvetica",sans-serif;color:#222222">2. asterisk calls the agents sip phone
<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;line-height:14.65pt;background:white">
<span style="font-size:11.5pt;font-family:"Helvetica",sans-serif;color:#222222">3. the Agent Answers the call form asterisk
<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;line-height:14.65pt;background:white">
<span style="font-size:11.5pt;font-family:"Helvetica",sans-serif;color:#222222">4. I create a bridge by using a POST to ARI.
<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;line-height:14.65pt;background:white">
<span style="font-size:11.5pt;font-family:"Helvetica",sans-serif;color:#222222">5. Add these two channels to the bridge.<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;line-height:14.65pt;background:white;orphans: auto;widows: 1;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-size:11.5pt;font-family:"Helvetica",sans-serif;color:#222222">If I try to add the the incoming channel to the bridge, I always get the error message: "Channel not in Stasis Application".<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;line-height:14.65pt;background:white;orphans: auto;widows: 1;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-size:11.5pt;font-family:"Helvetica",sans-serif;color:#222222">Is there any other way how i can move this channel into that bridge, without using the dialplan command Stasis(appname)?<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;line-height:14.65pt;background:white">
<span style="font-size:11.5pt;font-family:"Helvetica",sans-serif;color:#222222">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.<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;line-height:14.65pt;background:white">
<span style="font-size:11.5pt;font-family:"Helvetica",sans-serif;color:#222222">If you have a better solution, how to handle incoming calls, please let me know.<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;line-height:14.65pt;background:white">
<span style="font-size:11.5pt;font-family:"Helvetica",sans-serif;color:#222222">Thanks in advance and best regards,<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;line-height:14.65pt;background:white">
<span style="font-size:11.5pt;font-family:"Helvetica",sans-serif;color:#222222">Timothy Bott</span><span style="font-size:8.0pt;color:#1F497D"> </span><span style="font-size:11.5pt;font-family:"Helvetica",sans-serif;color:#222222"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>