[Asterisk-Users] Does Asterisk know if the trunks are busy?
Kevin Bockman
asterisk at wunderkin.com
Wed Sep 21 08:26:24 MST 2005
Steven wrote:
> How would I make the dialplan to use a different trunk if the Teliax one is
> busy?
This is something I'm testing right now. This is what I use to keep
track of how many channels are in use on each T1 and failover to
something else if there is a problem(?). I'll be using this for T1 and
for VOIP. Here's a sample:
exten => _*1XXXXXXXXXX,1,GotoIf($[ ${GROUP_COUNT(g1)} > 22 ]?g2)
exten => _*1XXXXXXXXXX,n,Set(GROUP()=g1)
exten => _*1XXXXXXXXXX,n,NoOp(${GROUP_COUNT(g1)})
exten => _*1XXXXXXXXXX,n,Dial(Zap/g1/${EXTEN:1}|20)
exten => _*1XXXXXXXXXX,n,NoOp(${DIALSTATUS})
exten => _*1XXXXXXXXXX,n,GotoIf($[ "${DIALSTATUS}" : "CONGESTION" ]?g2)
exten => _*1XXXXXXXXXX,n,Hangup
exten => _*1XXXXXXXXXX,n(g2),GotoIf($[ ${GROUP_COUNT(g2)} > 22 ]?g3)
exten => _*1XXXXXXXXXX,n,NoOp(${GROUP_COUNT(g1)})
exten => _*1XXXXXXXXXX,n,Set(GROUP()=g2)
exten => _*1XXXXXXXXXX,n,NoOp(${GROUP_COUNT(g2)})
exten => _*1XXXXXXXXXX,n,Dial(Zap/g2/${EXTEN:1}|20)
exten => _*1XXXXXXXXXX,n,GotoIf($[ "${DIALSTATUS}" : "CONGESTION" ]?g3)
exten => _*1XXXXXXXXXX,n,Hangup
... etc. The NoOps can be taken out. It is just a visual for debugging.
Kevin
More information about the asterisk-users
mailing list