<div>Check out this example dialplan: <a href="http://pastebin.ca/19456">http://pastebin.ca/19456</a></div>
<div>That should give you everything you need.</div>
<div> </div>
<div>bp<br><br> </div>
<div><span class="gmail_quote">On 6/6/06, <b class="gmail_sendername">Moises Silva</b> <<a href="mailto:moises.silva@gmail.com">moises.silva@gmail.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">this is what I have, and it works on Asterisk-1.2.1<br><br>[macro-sipextens]<br>exten => s,1,Macro(validate_extension)
<br>exten => s,2,Dial(SIP/${sipprefix}${num},${calltimeout}|${calloptions})<br>exten => s,3,Macro(catch_dial_response,${DIALSTATUS})<br><br>so, After Dial, I catch the dial response, and heres the catch macro<br><br>
[macro-catch_dial_response]<br>exten => s,1,GotoIf($[${ARG1} = NOANSWER] ? 11 : 2)<br>exten => s,2,GotoIf($[${ARG1} = CHANUNAVAIL] ? 22 : 3)<br>exten => s,3,GotoIf($[${ARG1} = BUSY] ? 33 : 4)<br>exten => s,4,Macro(generic_handler)
<br>exten => s,11,Macro(noanswer_handler)<br>exten => s,22,Macro(unavail_handler)<br>exten => s,33,Macro(busy_handler)<br><br>FInally here are the 4 other macros<br>[macro-noanswer_handler]<br>exten => s,1,SetCDRUserField(-10/${agi_cdr_id})
<br>exten => s,2,Set(voicemail_flags=u)<br>exten => s,3,Playback(iss_noanswer_channel_${defaultlang})<br>exten => s,4,Goto(loopback_ivr,s,1)<br><br>[macro-unavail_handler]<br>exten => s,1,SetCDRUserField(-11/${agi_cdr_id})
<br>exten => s,2,Set(voicemail_flags=u)<br>exten => s,3,GotoIf($[foo${is_exten} = foo] ? 4 : 6)<br>exten => s,4,Playback(iss_unavailable_channel_${defaultlang})<br>exten => s,5,Goto(loopback_ivr,s,1)<br>exten => s,6,Playback(iss_unavailable_extension_${defaultlang})
<br>exten => s,7,Goto(loopback_ivr,s,1)<br><br>[macro-busy_handler]<br>exten => s,1,SetCDRUserField(-12/${agi_cdr_id})<br>exten => s,2,Set(voicemail_flags=b)<br>exten => s,3,Playback(iss_busy_channel_${defaultlang})
<br>exten => s,4,Goto(loopback_ivr,s,1)<br><br>[macro-generic_handler]<br>exten => s,1,SetCDRUserField(-14/${agi_cdr_id})<br>exten => s,2,Set(voicemail_flags=u)<br>exten => s,3,GotoIf($[foo${is_exten} = foo] ? 4 : 6)
<br>exten => s,4,Playback(iss_unavailable_channel_${defaultlang})<br>exten => s,5,Goto(loopback_ivr,s,1)<br>exten => s,6,Playback(iss_unavailable_extension_${defaultlang})<br>exten => s,7,Goto(loopback_ivr,s,1)
<br><br><br>If you cant get it working, simply do something like this:<br><br>[test]<br>exten => _XX,1,Answer()<br>exten => _XX,2,Dial(SIP/${EXTEN})<br>exten => _XX,3,NoOp(${DIALSTATUS})<br><br>That will tell you what status is generated.
<br><br>Regards<br><br><br>On 6/6/06, <a href="mailto:bob@semanticedge.de">bob@semanticedge.de</a> <<a href="mailto:bob@semanticedge.de">bob@semanticedge.de</a>> wrote:<br>> I tried with CHANUNAVAIL but I was not successful. I want to try to call a
<br>> SIP client. If it is not answering and cannot be found I want wo call<br>> someone else.<br>> How can I do that? NOANSWER and CHANUNAVAIL do not work out.<br>> > Wether the SIP client is not registered or does not exists at all you
<br>> > will get CHANUNAVAIL.<br>> ><br>> > Regards<br>> ><br>> > On 6/6/06, Christophorus Laube <<a href="mailto:bob@semanticedge.de">bob@semanticedge.de</a>> wrote:<br>> >> Hi,
<br>> >><br>> >> I use an E1-Board to hand the calls over to internal SIP-Clients. My<br>> >> Question is which Dialstatus is set when the SIP-client is unreachable.<br>> >> I tried with NOANSWER but does not seem to be suitable.
<br>> >> Does anyone of you have a solution?<br>> >> In <a href="http://voip-info.org">voip-info.org</a> wiki there is a Dialstatus CHANUNAVAIL but this is<br>> >> explained by " Channel unavailable. On SIP, peer may not be
<br>> >> registered.". So this seems not to be right, or does it?<br>> >> TIA, Christophorus<br>> >><br>> >><br>> >><br>> >> _______________________________________________
<br>> >> --Bandwidth and Colocation provided by <a href="http://Easynews.com">Easynews.com</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">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>> >><br>> >><br>> >><br>> >><br>> >
<br>> ><br>> > --<br>> > "Su nombre es GNU/Linux, no solamente Linux, mas info en<br>> > <a href="http://www.gnu.org">http://www.gnu.org</a>"<br>> > _______________________________________________
<br>> > --Bandwidth and Colocation provided by <a href="http://Easynews.com">Easynews.com</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">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>> ><br>><br>><br>> _______________________________________________<br>> --Bandwidth and Colocation provided by
<a href="http://Easynews.com">Easynews.com</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">http://lists.digium.com/mailman/listinfo/asterisk-users
</a><br>><br><br><br>--<br>"Su nombre es GNU/Linux, no solamente Linux, mas info en <a href="http://www.gnu.org">http://www.gnu.org</a>"<br>_______________________________________________<br>--Bandwidth and Colocation provided by
<a href="http://Easynews.com">Easynews.com</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">http://lists.digium.com/mailman/listinfo/asterisk-users
</a><br></blockquote></div><br>