Page 1 of 1

Setting up proxy/loadbalancing

PostPosted: Tue Nov 19, 2013 10:59 pm
by nateu
I am trying to set up a carrier in VICIDIAL VERSION: 2.6-380a BUILD: 121029-0109 that if it were to fail using one ip that it would automatically try a different ip from that same carrier, Problem is 1 where do i set this up at ? In the Dialplan entry? or the Account Entry? Possibly somewhere else?

Any help would be greatly appreciated.
NateU

Re: Setting up proxy/loadbalancing

PostPosted: Sat Nov 30, 2013 9:05 pm
by williamconley
Set each different IP up as a separate carrier with a separate dialplan/account entry. After all, your system knows only that they are sip connections, not that they are related in any way. So it is simplest to treat them as each its own carrier.

When you set them up, be sure NOT to use 1NXXNXXXXXX (use 91NXXNXXXXXX and 81NXXNXXXXXX and 71NXXNXXXXXX, but NOT 1NXXNXXXXXX) as the dialplan entry.

Note that you must have a global string variable for each carrier such as DIAL8TRUNK and DIAL7TRUNK (they will be used in the failover!!)

Then create the failover carrier with ONLY this in the Dialplan Entry:
Code: Select all
exten => a,1,AGI(agi://127.0.0.1:4577/call_log)
exten => a,n,Dial(${DIAL8TRUNK}/${DIALNUMBER},,tTor)
exten => a,n,Dial(${DIAL9TRUNK}/${DIALNUMBER},,tTor)
exten => a,n,Hangup

exten => _011.,1,Set(DIALNUMBER=${EXTEN})
exten => _011.,n,GoTo(a,1)
exten => _011.,n,Hangup

exten => _1NXXNXXXXXX,1,Set(DIALNUMBER=${EXTEN})
exten => _1NXXNXXXXXX,n,GoTo(a,1)
exten => _1NXXNXXXXXX,n,Hangup

exten => _XXXX.,1,Set(DIALNUMBER=${EXTEN})
exten => _XXXX.,n,GoTo(a,1)
exten => _XXXX.,n,Hangup

Then set the campaign to "X" for the dial prefix. Note that you can now send different types of calls to something other than "a" if you use a different carrier for international ...