1) Welcome to the Party!
![Cool 8-)](./images/smilies/icon_cool.gif)
2) As you are obviously new here, I have some suggestions to help us all help you:
When you post, please post your entire configuration including (but not limited to) your installation method (7.X.X?) and vicidial version with build (VERSION: 2.X-XXXx ... BUILD: #####-####).
This IS a requirement for posting along with reading the stickies (at the top of each forum) and the manager's manual (available on EFLO.net, both free and paid versions)
You should also post: Asterisk version, telephony hardware (model number is helpful here), cluster information if you have one, and whether any other software is installed in the box. If your installation method is "manual/from scratch" you must post your operating system with version (and the .iso version from which you installed your original operating system) plus a link to the installation instructions you used. If your installation is "Hosted" list the site name of the host.
If this is a "Cloud" or "Virtual" server, please note the technology involved along with the version of that techology (ie: VMware Server Version 2.0.2). If it is not, merely stating the Motherboard model # and CPU would be helpful.
Similar to This:
Vicibox X.X from .iso | Vicidial X.X.X-XXX Build XXXXXX-XXXX | Asterisk X.X.X | Single Server | No Digium/Sangoma Hardware | No Extra Software After Installation | Intel DG35EC | Core2Quad Q6600
3) This has been posted several times, but is actually an asterisk concept and outside the Vicidial realm. What you want to do is make a call and record it as being part of a "Group". Then you check all the groups using if statements to see which has the least live calls right now, and send the call to an extension that will link it to that group, and send it through the associated carrier. It'll be a search, but it's in here. There are also examples in various Asterisk forums. Just remember that the AGI line and the Hangup line is absolutely required on every call. Either include them in each group, or execute them before/after the logic for switching between carriers.
[edit - i found a very old one from a notepad - far from perfect, but may contain the keywords that will help you find one that works for you, or just play with it]
- Code: Select all
; ViciDial Outbound FailOver Dialing
exten => _91NXXNXXXXXX,1,NoOp("CG1: ${GROUP_COUNT(cg1)}") ; For debug/testing
exten => _91NXXNXXXXXX,n,NoOp("CG2: ${GROUP_COUNT(cg2)}") ; For debug/testing
exten => _91NXXNXXXXXX,n,NoOp("CG3: ${GROUP_COUNT(cg3)}") ; For debug/testing
exten => _91NXXNXXXXXX,n,NoOp("CG4: ${GROUP_COUNT(cg4)}") ; For debug/testing
exten => _91NXXNXXXXXX,n,NoOp("CG5: ${GROUP_COUNT(cg5)}") ; For debug/testing
exten => _91NXXNXXXXXX,n,AGI(agi://127.0.0.1:4577/call_log)
exten => _91NXXNXXXXXX,n,GotoIf($[${GROUP_COUNT(cg1)}<3]?110)
exten => _91NXXNXXXXXX,n,GotoIf($[${GROUP_COUNT(cg2)}<3]?120)
exten => _91NXXNXXXXXX,n,GotoIf($[${GROUP_COUNT(cg2)}<3]?130)
exten => _91NXXNXXXXXX,n,GotoIf($[${GROUP_COUNT(cg2)}<3]?140)
exten => _91NXXNXXXXXX,n,GotoIf($[${GROUP_COUNT(cg2)}<3]?150)
exten => _91NXXNXXXXXX,n,NoOp("Max Trunks Exceeded")
exten => _91NXXNXXXXXX,n,Congestion
exten => _91NXXNXXXXXX,110,Set(GROUP()=cg1)
exten => _91NXXNXXXXXX,n,NoOp("CG1: ${GROUP_COUNT(CG1)}") ; For debug/testing
exten => _91NXXNXXXXXX,n,Dial(${VICITRUNK1}/${EXTEN:1},,To)
exten => _91NXXNXXXXXX,n,GotoIf($["${DIALSTATUS}" = "CHANUNAVAIL"]?120)
exten => _91NXXNXXXXXX,n,Hangup
exten => _91NXXNXXXXXX,120,Set(GROUP()=cg2)
exten => _91NXXNXXXXXX,n,NoOp("CG1: ${GROUP_COUNT(CG2)}") ; For debug/testing
exten => _91NXXNXXXXXX,n,Dial(${VICITRUNK2}/${EXTEN:1},,To)
exten => _91NXXNXXXXXX,n,GotoIf($["${DIALSTATUS}" = "CHANUNAVAIL"]?130)
exten => _91NXXNXXXXXX,n,Hangup
exten => _91NXXNXXXXXX,130,Set(GROUP()=cg3)
exten => _91NXXNXXXXXX,n,NoOp("CG1: ${GROUP_COUNT(CG3)}") ; For debug/testing
exten => _91NXXNXXXXXX,n,Dial(${VICITRUNK3}/${EXTEN:1},,To)
exten => _91NXXNXXXXXX,n,GotoIf($["${DIALSTATUS}" = "CHANUNAVAIL"]?140)
exten => _91NXXNXXXXXX,n,Hangup
exten => _91NXXNXXXXXX,140,Set(GROUP()=cg4)
exten => _91NXXNXXXXXX,n,NoOp("CG1: ${GROUP_COUNT(CG4)}") ; For debug/testing
exten => _91NXXNXXXXXX,n,Dial(${VICITRUNK4}/${EXTEN:1},,To)
exten => _91NXXNXXXXXX,n,GotoIf($["${DIALSTATUS}" = "CHANUNAVAIL"]?150)
exten => _91NXXNXXXXXX,n,Hangup
exten => _91NXXNXXXXXX,150,Set(GROUP()=cg5)
exten => _91NXXNXXXXXX,n,NoOp("CG1: ${GROUP_COUNT(CG5)}") ; For debug/testing
exten => _91NXXNXXXXXX,n,Dial(${VICITRUNK5}/${EXTEN:1},,To)
exten => _91NXXNXXXXXX,n,GotoIf($["${DIALSTATUS}" = "CHANUNAVAIL"]?900)
exten => _91NXXNXXXXXX,n,Hangup
exten => _91NXXNXXXXXX,900,NoOp("Max Trunks Exceeded")
exten => _91NXXNXXXXXX,n,Congestion
This version is for a specific number of calls with each carrier before jumping to the next one, and also has failover built in. But it could be modified for balancing by comparing them to each other instead of a static number.