Ronald Wiplinger
2006-Feb-02 12:12 UTC
[Asterisk-Users] How to handle "provider UNREACHABLE" in the dialplan?
How to handle this in the dialplan? voipbuster/xxxx 194.221.62.201 5060 UNREACHABLE voipstunt/xxxxx 194.120.0.200 5060 UNREACHABLE a reload shows than: voipbuster/xxxx 80.239.235.200 5060 UNREACHABLE voipstunt/xxxxx 194.120.0.200 5060 UNREACHABLE bye Ronald Wiplinger
Florian Overkamp
2006-Feb-03 00:37 UTC
[Asterisk-Users] How to handle "provider UNREACHABLE" in the dialplan?
Hi Ronald, Ronald Wiplinger wrote:> voipbuster/xxxx 194.221.62.201 5060 UNREACHABLE > voipstunt/xxxxx 194.120.0.200 5060> a reload shows than: > > voipbuster/xxxx 80.239.235.200 5060 UNREACHABLE > voipstunt/xxxxx 194.120.0.200 5060 UNREACHABLESeems like voipbuster is doing round-robin DNS for redundancy. Bad choice with asterisk, since asterisk only looks up DNS on startup or reloads. 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. Florian
Ronald Wiplinger
2006-Feb-03 04:21 UTC
[Asterisk-Users] How to handle "provider UNREACHABLE" in the dialplan?
Florian Overkamp wrote:> Hi Ronald, > > Ronald Wiplinger wrote: >> voipbuster/xxxx 194.221.62.201 5060 >> UNREACHABLE >> voipstunt/xxxxx 194.120.0.200 5060 > >> a reload shows than: >> >> voipbuster/xxxx 80.239.235.200 5060 >> UNREACHABLE >> voipstunt/xxxxx 194.120.0.200 5060 >> UNREACHABLE > > Seems like voipbuster is doing round-robin DNS for redundancy. Bad > choice with asterisk, since asterisk only looks up DNS on startup or > reloads. > > 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.Florian, 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. bye Ronald
Florian Overkamp
2006-Feb-03 08:06 UTC
[Asterisk-Users] How to handle "provider UNREACHABLE" in the dialplan?
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
Joseph Tanner
2006-Feb-04 03:47 UTC
[Asterisk-Users] How to handle "provider UNREACHABLE" in the dialplan?
This is probably a stupid question, but how do you specify multiple fallovers? I.e., if provider1 is not reachable/busy, try provider2. If provider2 is down, try provider3. If provider3 is down...etc. I understand how to do it the old way, just keep adding 101 to the extension. What would you add to a NOANSWER extension though? I guess you could send it to a different context, then you could use another NOANSWER, but I like keeping things short and easy. Joseph Tanner On 2/3/06, Florian Overkamp <florian@obsimref.com> wrote:> 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 > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > Asterisk-Users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >