<div dir="ltr"><div>thanks for your response </div><div><br></div><div>but i get the same result i can't execut the next (go to home,s,1) with the code below </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>exten => 534,n(answered),NoOp(Call was answered)</div>
<div><br></div><div style>any help please </div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/7/26 A J Stiles <span dir="ltr"><<a href="mailto:asterisk_list@earthshod.co.uk" target="_blank">asterisk_list@earthshod.co.uk</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">* THIS IS NOT WHERE YOUR RESPONSE GOES *<br>
<div><div class="h5"><br>
On Friday 26 July 2013, Salaheddine Elharit wrote:<br>
> in the CLI i have :<br>
><br>
><br>
> 1) for CONGESTION i get the status is 'CONGESTION'<br>
><br>
><br>
><br>
> Accepting call from '0666666666' to '534' on channel 0/12, span 1<br>
> -- Executing [534@default:1] Dial("Zap/12-1", "SIP/228| 10") in new<br>
> stack<br>
> -- Called 228<br>
> -- SIP/228-08361358 is ringing<br>
> -- Got SIP response 480 "Temporarily Unavailable" back from<br>
> 192.168.5.131<br>
> -- SIP/228-08361358 is circuit-busy<br>
> == Everyone is busy/congested at this time (1:0/1/0)<br>
> == Auto fallthrough, channel 'Zap/12-1' status is 'CONGESTION'<br>
><br>
><br>
> 2) for no answer i get status is 'NOANSWER'<br>
><br>
><br>
> Accepting call from '0666666666' to '534' on channel 0/4, span 1<br>
> -- Executing [534@default:1] Dial("Zap/4-1", "SIP/228| 10") in new<br>
> stack -- Called 228<br>
> -- SIP/228-08362880 is ringing<br>
> -- Nobody picked up in 10000 ms<br>
> == Auto fallthrough, channel 'Zap/4-1' status is 'NOANSWER'<br>
><br>
><br>
> 3) for answered i don't get the status is 'answered'<br>
><br>
><br>
> Accepting call from '0666666666' to '534' on channel 0/15, span 1<br>
> -- Executing [534@default:1] Dial("Zap/15-1", "SIP/228| 10") in new<br>
> stack<br>
> -- Called 228<br>
> -- SIP/228-08363bb8 is ringing<br>
> -- SIP/228-08363bb8 answered Zap/15-1<br>
><br>
> when i have the result is 'CONGESTION' or 'NOANSWER'i can go to the next<br>
> (home,s,1)<br>
><br>
> exten => 534,1,Dial(SIP/228, 10)<br>
> exten => 534,n,NoOp(Dial status is ${DIALSTATUS})<br>
> exten => 534,n,GotoIf($["${DIALSTATUS}" = "CONGESTION"])<br>
> exten => 534,n,Goto(home,s,1)<br>
><br>
><br>
> how to do in order to go to the next if the result is answered<br>
><br>
> exten => 534,1,Dial(SIP/228, 10)<br>
> exten => 534,n,NoOp(Dial status is ${DIALSTATUS})<br>
> exten => 534,n,GotoIf($["${DIALSTATUS}" = "ANSWER"]?answered)<br>
> exten => 534,n,Goto(home,s,1)<br>
<br>
</div></div>You're nearly there; you need to have a label "answered" in your dialplan.<br>
This is done by inserting the name, in round brackets, after the priority and<br>
before the following comma. After a Goto() would be an excellent place to put<br>
it. Try this:<br>
<div class="im"><br>
exten => 534,1,Dial(SIP/228, 10)<br>
exten => 534,n,NoOp(Dial status is ${DIALSTATUS})<br>
exten => 534,n,GotoIf($["${DIALSTATUS}" = "ANSWER"]?answered)<br>
exten => 534,n,Goto(home,s,1)<br>
</div>exten => 534,n(answered),NoOp(Call was answered)<br>
...<br>
<br>
Note that if you answer the phone, as far as Asterisk is concerned, the Dial()<br>
statement is still being executed; so it won't fall through to the next<br>
priority until the phone is hung up.<br>
<div class="im HOEnZb"><br>
<br>
--<br>
AJS<br>
<br>
Answers come *after* questions.<br>
<br>
</div><div class="HOEnZb"><div class="h5">--<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><br></div>