Roting Outbound calls

coops
Joined: Tue 09 of Dec, 2008

Roting Outbound calls

Posted:Tue 09 of Dec, 2008 (11:55 UTC)
I have a PSTN line and a iAX account with a voip provider. I want to setup a dialplan that allows any of my sip phones to call either channel based on if the channel is in-use or not, a simple round-ribin outbound queue. So far I have this in the dialplan:

\[to-pstn\]
exten => _X.,1,Set(NUMBER=${EXTEN})
exten => _X.,n,Dial(ZAP/1/${NUMBER},60,Ttr)
exten => _X.,n,Goto(${DIALSTATUS},1)
exten => CHANUNAVAIL,1,Dial(IAX2/pstn-walsall/9${NUMBER})


It does work, but is there a better way to do this?