<div dir="ltr">hi <div><br></div><div><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">in the CLI  i have :</span><br></div><div><span style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br>
</span></div><div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">1) for CONGESTION i get the status is &#39;CONGESTION&#39;</font></div><div><font face="arial, sans-serif"><br></font></div>
<div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Accepting call from &#39;0666666666&#39; to &#39;534&#39; on channel 0/12, span 1</font></div>
<div><font face="arial, sans-serif">    -- Executing [534@default:1] Dial(&quot;Zap/12-1&quot;, &quot;SIP/228| 10&quot;) in new stack</font></div><div><font face="arial, sans-serif">    -- Called 228</font></div><div><font face="arial, sans-serif">    -- SIP/228-08361358 is ringing</font></div>
<div><font face="arial, sans-serif">    -- Got SIP response 480 &quot;Temporarily Unavailable&quot; back from 192.168.5.131</font></div><div><font face="arial, sans-serif">    -- SIP/228-08361358 is circuit-busy</font></div>
<div><font face="arial, sans-serif">  == Everyone is busy/congested at this time (1:0/1/0)</font></div><div><font face="arial, sans-serif">  == Auto fallthrough, channel &#39;Zap/12-1&#39; status is &#39;CONGESTION&#39;</font></div>
<div><br></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">2) for no answer i get status is &#39;NOANSWER&#39;</font></div><div><font face="arial, sans-serif"><br></font></div>
<div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Accepting call from &#39;0666666666&#39; to &#39;534&#39; on channel 0/4, span 1</font></div><div><font face="arial, sans-serif">    -- Executing [534@default:1] Dial(&quot;Zap/4-1&quot;, &quot;SIP/228| 10&quot;) in new stack</font></div>
<div><font face="arial, sans-serif">    -- Called 228</font></div><div><font face="arial, sans-serif">    -- SIP/228-08362880 is ringing</font></div><div><font face="arial, sans-serif"> -- Nobody picked up in 10000 ms</font></div>
<div><font face="arial, sans-serif">  == Auto fallthrough, channel &#39;Zap/4-1&#39; status is &#39;NOANSWER&#39;</font></div><div><font face="arial, sans-serif"><br></font></div><div><br></div><div><font face="arial, sans-serif">3) for answered i don&#39;t get the status is &#39;answered&#39; </font></div>
<div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Accepting call from &#39;0666666666&#39; to &#39;534&#39; on channel 0/15, span 1</font></div>
<div><font face="arial, sans-serif">    -- Executing [534@default:1] Dial(&quot;Zap/15-1&quot;, &quot;SIP/228| 10&quot;) in new stack</font></div><div><font face="arial, sans-serif">    -- Called 228</font></div><div><font face="arial, sans-serif">    -- SIP/228-08363bb8 is ringing</font></div>
<div><font face="arial, sans-serif">    -- SIP/228-08363bb8 answered Zap/15-1</font></div></div><div><font face="arial, sans-serif"><br></font></div><div><div>when i have the result is &#39;CONGESTION&#39;  or &#39;NOANSWER&#39;i can go to the next (home,s,1)</div>
<div><br></div><div>exten =&gt; 534,1,Dial(SIP/228, 10)</div><div>exten =&gt; 534,n,NoOp(Dial status is ${DIALSTATUS})</div><div>exten =&gt; 534,n,GotoIf($[&quot;${DIALSTATUS}&quot; = &quot;CONGESTION&quot;])</div><div>exten =&gt; 534,n,Goto(home,s,1)</div>
<div><br></div><div><br></div><div><br></div><div>how to do in order to go to the next if the result is answered</div><div><br></div><div>exten =&gt; 534,1,Dial(SIP/228, 10)</div><div>exten =&gt; 534,n,NoOp(Dial status is ${DIALSTATUS})</div>
<div>exten =&gt; 534,n,GotoIf($[&quot;${DIALSTATUS}&quot; = &quot;ANSWER&quot;]?answered)</div><div>exten =&gt; 534,n,Goto(home,s,1)</div><div><br></div><div>thanks and regards </div></div></div><div class="gmail_extra"><br>
<br><div class="gmail_quote">2013/7/25 Salaheddine Elharit <span dir="ltr">&lt;<a href="mailto:salah.elharit200@gmail.com" target="_blank">salah.elharit200@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">ok thank you i will verify and i will update you <div><br></div><div>thanks for your help </div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div class="im">2013/7/25 A J Stiles <span dir="ltr">&lt;<a href="mailto:asterisk_list@earthshod.co.uk" target="_blank">asterisk_list@earthshod.co.uk</a>&gt;</span><br>

</div><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On Thursday 25 July 2013, Salaheddine Elharit wrote:<br>
</div><div>&gt; thanks for your help when i use<br>
&gt;<br>
&gt; exten =&gt; s,1,NoOp(User chose support option)<br>
&gt; exten =&gt; s,n,Dial(SIP/228, 10)<br>
&gt; exten =&gt; s,n,Goto(${DIALSTATUS},1)<br>
&gt; exten =&gt; NOANSWER,1,Goto(call,s,1)<br>
&gt;<br>
&gt; with no answer i can coto [call] without issue but with answer like below i<br>
&gt; can&#39;t get [call]<br>
&gt;<br>
&gt; exten =&gt; s,1,NoOp(User chose support option)<br>
&gt; exten =&gt; s,n,Dial(SIP/228, 10)<br>
&gt; exten =&gt; s,n,Goto(${DIALSTATUS},1)<br>
&gt; exten =&gt; ANSWER,1,Goto(call,s,1)<br>
<br>
<br>
</div>Immediately after the Dial() statement, add a line like<br>
exten =&gt; s,nNoOp(Dial status is ${DIALSTATUS})<br>
<br>
That will show you the actual contents of ${DIALSTATUS} in the CLI  (in case<br>
it is not what you are expecting).  Call your extension a few times, and see<br>
exactly what you get when the line is answered, unanswered, engaged and maybe<br>
if the phone is unplugged.<br>
<br>
Instead of having a separate extension named after every possible value of<br>
${DIALSTATUS} it might be easier to use a GotoIf() statement to jump away in<br>
one case  (most sensibly, if the call was answered),  and fall through to the<br>
default otherwise  (&quot;engaged&quot; and &quot;phone not connected&quot; are similar enough to<br>
&quot;no answer&quot; for that probably to be what you want, barring special values --<br>
feel free to use more GotoIf() statements if required).<br>
<br>
Something like:<br>
<br>
exten =&gt; s,n,GotoIf($[&quot;${DIALSTATUS}&quot; = &quot;ANSWER&quot;]?answered)<br>
exten =&gt; s,n,NoOp(execution continues here if no answer)<br>
...<br>
exten =&gt; s,n,Hangup()<br>
exten =&gt; s,n(answered),NoOp(we jump here if call was answered)<br>
...<br>
exten =&gt; s,n,Hangup()<br>
<div><div><br>
<br>
--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
               <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</div></div></blockquote></div></div></div><br></div>
</blockquote></div><br></div>