Friday, July 12, 2013

Multiple carriers

Multiple Carriers in Asterisk
or Utilizing all the TRUNK's randomly

Below Dialplan will Dial the number randomly on the assigned Carriers

[general]
TRUNKA=SIP/voiptrunk
TRUNKB=SIP/clickdial
TRUNKC=DAHDI/g0


exten => _9044X.,1,Answer
exten => _9044X.,n,Set(Trunk=${RAND(1|3)})
exten => _9044X.,n,GoToIf($[${Trunk} = 1]?trunkA)
exten => _9044X.,n,GoToIf($[${Trunk} = 2]?trunkB)
exten => _9044X.,n,GoToIf($[${Trunk} = 3]?trunkC)
exten => _9044X.,n,Hangup
exten => _9044X.,n(trunkA),Dial(${TRUNKA}/${EXTEN:4},,tToR)
exten => _9044X.,n(trunkB),Dial(${TRUNKB}/${EXTEN:4},,tToR)
exten => _9044X.,n(trunkC),Dial(${TRUNKC}/${EXTEN:4},,tToR)
exten => _9044X.,n,Hangup

No comments:

Post a Comment