<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 'CONGESTION'</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 '0666666666' to '534' on channel 0/12, span 1</font></div>
<div><font face="arial, sans-serif"> -- Executing [534@default:1] Dial("Zap/12-1", "SIP/228| 10") 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 "Temporarily Unavailable" 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 'Zap/12-1' status is 'CONGESTION'</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 'NOANSWER'</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 '0666666666' to '534' on channel 0/4, span 1</font></div><div><font face="arial, sans-serif"> -- Executing [534@default:1] Dial("Zap/4-1", "SIP/228| 10") 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 'Zap/4-1' status is 'NOANSWER'</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't get the status is 'answered' </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 '0666666666' to '534' on channel 0/15, span 1</font></div>
<div><font face="arial, sans-serif"> -- Executing [534@default:1] Dial("Zap/15-1", "SIP/228| 10") 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 'CONGESTION' or 'NOANSWER'i can go to the next (home,s,1)</div>
<div><br></div><div>exten => 534,1,Dial(SIP/228, 10)</div><div>exten => 534,n,NoOp(Dial status is ${DIALSTATUS})</div><div>exten => 534,n,GotoIf($["${DIALSTATUS}" = "CONGESTION"])</div><div>exten => 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 => 534,1,Dial(SIP/228, 10)</div><div>exten => 534,n,NoOp(Dial status is ${DIALSTATUS})</div>
<div>exten => 534,n,GotoIf($["${DIALSTATUS}" = "ANSWER"]?answered)</div><div>exten => 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"><<a href="mailto:salah.elharit200@gmail.com" target="_blank">salah.elharit200@gmail.com</a>></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"><<a href="mailto:asterisk_list@earthshod.co.uk" target="_blank">asterisk_list@earthshod.co.uk</a>></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>> thanks for your help when i use<br>
><br>
> exten => s,1,NoOp(User chose support option)<br>
> exten => s,n,Dial(SIP/228, 10)<br>
> exten => s,n,Goto(${DIALSTATUS},1)<br>
> exten => NOANSWER,1,Goto(call,s,1)<br>
><br>
> with no answer i can coto [call] without issue but with answer like below i<br>
> can't get [call]<br>
><br>
> exten => s,1,NoOp(User chose support option)<br>
> exten => s,n,Dial(SIP/228, 10)<br>
> exten => s,n,Goto(${DIALSTATUS},1)<br>
> exten => ANSWER,1,Goto(call,s,1)<br>
<br>
<br>
</div>Immediately after the Dial() statement, add a line like<br>
exten => 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 ("engaged" and "phone not connected" are similar enough to<br>
"no answer" 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 => s,n,GotoIf($["${DIALSTATUS}" = "ANSWER"]?answered)<br>
exten => s,n,NoOp(execution continues here if no answer)<br>
...<br>
exten => s,n,Hangup()<br>
exten => s,n(answered),NoOp(we jump here if call was answered)<br>
...<br>
exten => 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>