I've been searching quite a while and doing some code, and I was able to get working a multi-trunk w/ round robin in Vicidial (GoAutoDial 2.0).
I will share it here because I searched alot here and couldn't find any straight answer.
1st. Configure your SIP trunks in sip.conf
Example based on my provider:
register => +3513020XXXXX@voip.telepac.pt:SECRET:+3513020XXXXX@proxy.voip.telepac.pt:5060/+3513020XXXXX
register => +3513020XXXXX@voip.telepac.pt:SECRET:+3513020XXXXX@proxy.voip.telepac.pt:5060/+3513020XXXXX
[Trunk1]
disallow=all
#nat=yes
canreinvite=yes
context=from-trunk
from=+3513020XXXXX
fromdomain=voip.telepac.pt
host=voip.telepac.pt
insecure=port,invite
outboundproxy=proxy.voip.telepac.pt
port=5060
qualify=yes
secret=SECRET
type=friend
username=+3513020XXXXX
authname=+3513020XXXXX
fromuser=+3513020XXXXX
dtmfmode=rfc2833
allow=ulaw
allow=alaw
registername=+3513020XXXXX
call-limit=1
[Trunk2]
disallow=all
#nat=yes
canreinvite=yes
context=from-trunk
from=+3513020XXXXX
fromdomain=voip.telepac.pt
host=voip.telepac.pt
insecure=port,invite
outboundproxy=proxy.voip.telepac.pt
port=5060
qualify=yes
secret=SECRET
type=friend
username=+3513020XXXXX
authname=+3513020XXXXX
fromuser=+3513020XXXXX
dtmfmode=rfc2833
allow=ulaw
allow=alaw
registername=+3513020XXXXX
call-limit=1
Now in extensions.conf
[general]
Trunk1=SIP/Trunk1
Trunk2=SIP/Trunk2
IPt=Trunk1-Trunk2 '(place here all your trunks separated by '-')'
COUNTt=0
NoOfChannels=2 '(change to match the number of trunks that you are using)'
[default]
exten => _XXXXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _XXXXXXXXX,2,Gotoif($["${COUNTt}" = "${NoOfChannels}"] ? 3:4)
exten => _XXXXXXXXX,3,SetGlobalVar(COUNTt=0])
exten => _XXXXXXXXX,4,SetGlobalVar(COUNTt=$[${COUNTt}+1])
exten => _XXXXXXXXX,5,SetGlobalVar(tr=${CUT(IPt,-,${COUNTt})})
exten => _XXXXXXXXX,6,Dial(SIP/${EXTEN}@${tr},15,o)
exten => _XXXXXXXXX,7,Hangup
This will use all your available and registered trunks in a round-robin fashion, making you able to use multiple SIP trunks in one campaign, very usefull for unlimited SIP accounts or SIP accounts with 1 max call.
Hope its usefull, and if any1 has any sugestions please post.
Cheers
