<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"> That breaks the ARI philosophy. If a channel is in the Stasis dial plan application, the ARI framework has full control of that channel. Once you release that channel back into the dial plan, there’s really no workable way for ARI to keep any kind of control over that channel because the dial plan applications that now have ownership of that channel may cause conflicting instructions. </div> <br> <div id="bloop_sign_1473514623264069120" class="bloop_sign"><div style="font-family:helvetica,arial;font-size:13px">-- <br>BJ Weschke<br>Sent with Airmail</div></div> <br><p class="airmail_on">On September 10, 2016 at 9:29:12 AM, Maxim Litnitskiy (<a href="mailto:litnimaxster@gmail.com">litnimaxster@gmail.com</a>) wrote:</p> <blockquote type="cite" class="clean_bq"><span><div><div></div><div>
<title></title>
<div dir="ltr">Hi dear developers!
<div>I have a question like this.</div>
<div>Imagine that I call to 10:</div>
<div><br></div>
<div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
exten => 10,1,Set(CONNECT_TO_CONTEXT=01@public-in)<br>
exten => 10,2,Stasis(test)</blockquote>
<div><br></div>
<div>My test ARI app:</div>
</div>
<div><br></div>
<div><br></div>
<div><br></div>
<div>
<pre style="color:rgb(248,248,242);font-family:"source code pro";background-color:rgb(39,40,34)"><span style="color:rgb(249,38,114)">def </span><span style="color:rgb(167,236,33)">ari_app_connect_to_context</span><span style="color:rgb(249,250,244)">(</span><span style="color:rgb(102,217,239);font-style:italic">channel</span><span style="color:rgb(249,38,114)">, </span><span style="color:rgb(102,217,239);font-style:italic">event</span><span style="color:rgb(249,250,244)">)</span><span style="color:rgb(249,38,114)">:<br></span><span style="color:rgb(249,38,114)"> </span>result <span style="color:rgb(249,38,114)">= </span><span style="color:rgb(102,217,239);font-style:italic">channel</span><span style="color:rgb(249,38,114)">.</span>getChannelVar<span style="color:rgb(249,250,244)">(</span><span style="color:rgb(102,217,239);font-style:italic">variable</span><span style="color:rgb(249,38,114)">=</span><span style="color:rgb(230,219,116)">'CONNECT_TO_CONTEXT'</span><span style="color:rgb(249,250,244)">)<br></span><span style="color:rgb(249,250,244)"> </span>context_exten <span style="color:rgb(249,38,114)">= </span>result<span style="color:rgb(249,38,114)">.</span>get<span style="color:rgb(249,250,244)">(</span><span style="color:rgb(230,219,116)">'value'</span><span style="color:rgb(249,250,244)">)<br></span><span style="color:rgb(249,250,244)"> </span><span style="color:rgb(249,38,114)">if </span>context_exten<span style="color:rgb(249,38,114)">:</span><span style="color:rgb(249,250,244)"><br></span><span style="color:rgb(249,250,244)"> </span>extension<span style="color:rgb(249,38,114)">, </span>context <span style="color:rgb(249,38,114)">= </span>context_exten<span style="color:rgb(249,38,114)">.</span>split<span style="color:rgb(249,250,244)">(</span><span style="color:rgb(230,219,116)">'@'</span><span style="color:rgb(249,250,244)">)<br></span><span style="color:rgb(249,250,244)"> </span><span style="color:rgb(102,217,239);font-style:italic">channel</span><span style="color:rgb(249,38,114)">.</span>continueInDialplan<span style="color:rgb(249,250,244)">(</span><span style="color:rgb(102,217,239);font-style:italic">context</span><span style="color:rgb(249,38,114)">=</span>context<span style="color:rgb(249,38,114)">, </span><span style="color:rgb(102,217,239);font-style:italic">extension</span><span style="color:rgb(249,38,114)">=</span>extension<span style="color:rgb(249,38,114)">, </span><span style="color:rgb(102,217,239);font-style:italic">priority</span><span style="color:rgb(249,38,114)">=</span><span style="color:rgb(174,129,255)">1</span><span style="color:rgb(249,250,244)">)<br></span><span style="color:rgb(249,250,244)"><br></span></pre></div>
<div><br></div>
<div>And 01@public-in is:</div>
<div><br></div>
<div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
exten => 01,1,Answer<br>
exten => 01,n,Queue(support)</blockquote>
</div>
<div><br></div>
<div>What I am trying to do is to keep control over the channel in
my Stasis app.</div>
<div><br></div>
<div><b>So when I accept a call to Stasis and then pass it over to
dialplan - should not that channel stay in Stasis controlled
channels?</b></div>
<div><br></div>
<div>Why not keep it there to have control from ARI app?</div>
<div><br></div>
<div>Is it possible to implement or breaks ARI
philosophy ?</div>
<div><br></div>
<div>Thanks.</div>
<div><br></div>
<div>Regards,</div>
<div>Max.</div>
<div><br></div>
<div><br></div>
<div><br></div>
<div><br></div>
<div><br></div>
<div><br></div>
</div>
_______________________________________________
<br>asterisk-app-dev mailing list
<br>asterisk-app-dev@lists.digium.com
<br>http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev
<br></div></div></span></blockquote></body></html>