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

Michael Graves mgraves at mstvp.com
Wed Dec 1 15:07:47 MST 2004


On Wed, 1 Dec 2004 12:37:13 -0800 (PST), Ben Kirkpatrick wrote:

>   Do you find it difficult to manage four LD providers?
>   Can you show me part of your LD Macro and how it's used?
>
>   I'm toying with two LD providers now, but don't have failover setup.
>Just using each one for what they are best at (least cost).
>
>Thanks,
>--Ben Kirkpatrick
>
>

Not really difficult, perhaps its a bit excessive. 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 macro is as follows:

[macro-multidial]
;
;try sixtel first
exten => s,1,ChanIsAvail(${IAXTRUNK5}) 
exten => s,2,Dial(${IAXTRUNK5}/${ARG1}) 
exten => s,3,Hangup 
;
;try voipjet next
exten => s,102,ChanIsAvail(${IAXTRUNK1}) 
exten => s,103,Dial(${IAXTRUNK1}/${ARG1}) 
exten => s,104,Hangup 
;
;try NuFone next
exten => s,203,ChanIsAvail(${IAXTRUNK2}) 
exten => s,204,Dial(${IAXTRUNK2}/${ARG1}) 
exten => s,205,Hangup
;
;try VPC-01 next
exten => s,304,ChanIsAvail(${IAXTRUNK3}) 
exten => s,305,Dial(${IAXTRUNK3}/${ARG1}@VPWS) 
exten => s,306,Hangup 
;
;try VPC-02 last
exten => s,405,ChanIsAvail(${IAXTRUNK4}) 
exten => s,406,Dial(${IAXTRUNK4}/${ARG1}@VPWS) 
exten => s,407,Hangup 
exten => s,408,Congestion 
;

I declare the params for IAXTRUNK1-4 and the login details as global
variables. 

My callout routine looks like the following;

[outbound-ip-local]
exten => _713XXXXXXX,1,Macro(multidial,1${EXTEN})
exten => _713XXXXXXX,2,Macro(fastbusy)
exten => _281XXXXXXX,1,Macro(multidial,1${EXTEN})
exten => _281XXXXXXX,2,Macro(fastbusy)
exten => _832XXXXXXX,1,Macro(multidial,1${EXTEN})
exten => _832XXXXXXX,2,Macro(fastbusy)

[outbound-ip-domestic]
exten => _1NXXNXXXXXX,1,Macro(multidial,${EXTEN})
exten => _1NXXNXXXXXX,2,Playback(invalid)
exten => _1NXXNXXXXXX,3,Hangup()

Might not be too elegant but it does work for me thus far.

Michael

--
Michael Graves                           mgraves at pixelpower.com
Sr. Product Specialist                          www.pixelpower.com
Pixel Power Inc.                                 mgraves at mstvp.com

o713-861-4005
o800-905-6412
c713-201-1262






More information about the asterisk-users mailing list