On January 10, 2005 03:09 pm, Adi Linden wrote: > How can I setup Asterisk to place calls if the same dial pattern can be > routed through several PRI gateways. I have one way that I tried: > > So what happens is that if all channels on 172.17.99.5 are in use calls > are routed to 172.17.99.6 and if all channels are in use to 172.17.99.7.
I use this in my dialplan, as a snippet from my dialing macro: exten => s,n,Dial(${PROVIDER1}/${ARG1},,g) exten => s,n,Goto(dial-${DIALSTATUS},1) exten => dial-CANCEL,1,Hangup exten => dial-ANSWER,1,Hangup exten => dial-NOANSWER,1,Hangup exten => dial-BUSY,1,Busy exten => dial-CONGESTION,1,Congestion exten => dial-CHANUNAVAIL,1,Macro(dial-provider2,${ARG1}) dial-provider2's dialplan looks similar but will fall through to the next provider, and so on. Works and is next to instantaneous on PRI and IAX2 if qualify is set. With some more magic and maybe some database interaction you can have it fully dynamic and fall through to any number of levels you want. -A. _______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users