[Asterisk-Users] Multiple gateways for same dial pattern

Adi Linden adil at adis.on.ca
Wed Jan 12 19:40:39 MST 2005


Hi,

I just tried this using a couple of iax peers and it works quite well. But
I did have to alter my dialplan. In my iax.conf I added 'qualify=5000' for
the nufone and voipjet peers.

[macro-gw-voipjet]
;
; This is the VoipJet IAX peer
;
; Use: Macro(gw-voipjet,${EXTEN}))
; Requires 'qualify=' statement in iax.conf for fallthru to work
;
exten => s,1,SetCIDNum(${PSTN_CIDNUM})
exten => s,2,Dial,IAX2/username at voipjet/${ARG1}
exten => s,3,Goto(s-${DIALSTATUS},1)
exten => s-BUSY,1,Busy
exten => s-CHANUNAVAIL,1,Noop
exten => _s-.,1,Congestion

[macro-gw-nufone]
;
; This is the NuFone IAX peer
;
; Use: Macro(gw-nufone,${EXTEN}))
; Requires 'qualify=' statement in iax.conf for fallthru to work
;
exten => s,1,SetCIDNum(${PSTN_CIDNUM})
exten => s,2,Dial,IAX2/username at nufone/${ARG1}
exten => s,3,Goto(s-${DIALSTATUS},1)
exten => s-BUSY,1,Busy
exten => s-CHANUNAVAIL,1,Noop
exten => _s-.,1,Congestion

[outbound-longdistance]
;
exten => _91NXXNXXXXXX,1,Macro(gw-voipjet,${EXTEN:1}) ; VoipJet.com NANPA
exten => _91NXXNXXXXXX,2,Macro(gw-nufone,${EXTEN:1})  ; NuFone NANPA
exten => _91NXXNXXXXXX,3,Congestion
;
exten => _9011.,1,Macro(gw-voipjet,${EXTEN:1})        ; VoipJet.com WORLD
exten => _9011.,2,Macro(gw-nufone,${EXTEN:1})         ; NuFone WORLD
exten => _9011.,3,Congestion

Thank you!
Adi

On Mon, 10 Jan 2005, Matt Hess wrote:

> Just a thought I had on this.. Why not setup a sip peer entry in
> sip.conf with a qualify statement in it and send the call to the peer
> entry? That way asterisk will know if the peer is alive or not and I
> would think it would skip that particular peer accordingly.. that or
> it's really late and I've misunderstood what qualify is for.. but it
> seems to want to work how I imagine it would.. and from a small test I
> just tried it appears to do just that.. but who knows..
>




More information about the asterisk-users mailing list