Multiple Carrier / Trunk (SIP/IAX2) in ASterisk (Vicidial/GoAutodial/FreePBX/Elastix/Trixbox)

In call center dialer you have different ways of using your multiple carrier or Trunk. Simply you can create multiple carrier and set your prefixes and while dialing use different prefix to dial to use different trunk.


In other ways you can have multiple trunk and use randomly. However this method is use as “fail over” trunk, to ensure more reliability of your system being able to dial out no matter what destination you dial. This is more useful when some provider are not giving you A2Z route.

To use multilple and random trunk use the example dial plan below:

exten => _9044X.,1,AGI(agi://
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(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

Please note :

TrunkA, B, C  = is your bespoke trunk

${RAND(1|3) = setting your trunk at an random order

In this method your campaign doesn’t need specific instructions on dial prefix. You can use the same dial prefix as you can see all are same.


1. you are most likely to fail to dial a number.

2. one of configuration for all three trunks / carrier


1. you cannot set a specific trunk to be dialed in this dialplan

Please feel free to shot your queries at, or log in to meebo chat window to have support or raise a ticket in our support system if you are Tofa Telecom client.

Please note support on open source system are free 
and solely for sharing knowledge and build more robust system.

2 thoughts on “Multiple Carrier / Trunk (SIP/IAX2) in ASterisk (Vicidial/GoAutodial/FreePBX/Elastix/Trixbox)

Comments are closed.