IAX long distance... Re: [Asterisk-Users] Asterisk for home office

Hermann Wecke hermann at wecke.com
Thu Dec 2 03:25:29 MST 2004


Michael Graves wrote:
> [...] Although there have
> been a few (very few) times when I've notcied a brief pause after
> dialing and found that it had in fact dialed out on the last possible
> option.
[...]

The problem of your approach is that if you are out of credit with the 
first provider, your call will be dropped, not trying the next one, 
right? After all, I believe that ChanIsAvail 
(http://www.voip-info.org/wiki-Asterisk+cmd+ChanIsAvail) will only check 
if you can connect to that provider (ip route), not for available funding...

I'm using now something like this:

exten => _91NXXNXXXXXX,1,Dial(IAX2/username at provider1/${EXTEN:1},45)
exten => _91NXXNXXXXXX,2,PlayBack(beep)
exten => _91NXXNXXXXXX,3,Dial(IAX2/username at provider2/${EXTEN:1},45)
exten => _91NXXNXXXXXX,4,PlayBack(beep)
exten => _91NXXNXXXXXX,5,Dial(IAX2/username at provider3/${EXTEN:1},45)
exten => _91NXXNXXXXXX,6,PlayBack(beep)
exten => _91NXXNXXXXXX,7,Dial(IAX2/username at provider4/${EXTEN:1},45)
exten => _91NXXNXXXXXX,8,Playtones(congestion)
exten => _91NXXNXXXXXX,9,Wait(3)
exten => _91NXXNXXXXXX,10,Hangup

I know after every "beep"  that I changed the provider (out of credit? 
dialing error? no connection?), and if the call is ringing after 45 
seconds and I hear a beep, I will hangup. Not the best, but I believe is 
the best failover solution (for a small company/home office at least).




More information about the asterisk-users mailing list