[Asterisk-Users] How to handle "provider UNREACHABLE" in the dialplan?

Florian Overkamp florian at obsimref.com
Fri Feb 3 08:06:05 MST 2006


Hi Ronald,

Ronald Wiplinger wrote:
>> You could read out all the entries in the DNS zone and create your own 
>> list of entries in /etc/hosts, and then create multiple asterisk 
>> peers: voipbuster1, voipbuster2, etc... Then you can use regular 
>> dialplan logic to cycle through all of them. 

> that is exactly the point what I am looking for. How can I use the next 
> peer in the dial logic? I was trying DIALSTATUS, ... but I could not 
> make it.

Should be easy; we use:

[macro-safedial]
;exten = s,1,Dial(${ARG1},${ARG2},g,${ARG4})
exten = s,1,Dial(${ARG1},${ARG2},${ARG3},${ARG4})
exten = s,2,Goto(s-${DIALSTATUS},1)
exten = s-CANCEL,1,Hangup
exten = s-NOANSWER,1,GotoIf($["${DIALEDTIME}" = "0"]?3)
exten = s-NOANSWER,2,Hangup
exten = s-NOANSWER,3,Verbose(1,Need failover for "${ARG1}")
exten = s-BUSY,1,Busy
exten = s-CHANUNAVAIL,1,Verbose(1,Need failover for "${ARG1}")
exten = s-CONGESTION,1,Congestion
exten = _s-.,1,Congestion
exten = s-,1,Congestion

Florian



More information about the asterisk-users mailing list