Page 1 of 1

Can i activate two VOIP and assigned it to different Campgn?

PostPosted: Tue Aug 30, 2011 7:11 am
by rexheadz
Hi.

I'm new in Vicidial world. i have two VOIP provider. All are working good. Can I designate a voip to a specific campaign? Because as of now we have two campaigns running. I am planning to designate each campaign with different VOIP. Is this possible? Can i activate both VOIP and assigned it to different campaign. ? Please help.

Vicidial 2.2.1
Asterisk 1.4.27.1-vici
CentOS 5.5

Single Server
CentOS 5.5
No Extra Software After Installation

PostPosted: Tue Aug 30, 2011 8:41 am
by okli
Set different dial prefixes to each campaign, set these prefixes in the carier dialplan.

For example:
campaign 1- dial prefix 99
campaign 2- dial prefix 98

carrier dialplan entry:

Code: Select all
exten => _991NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _991NXXNXXXXXX,2,Dial(SIP/${EXTEN:2}@trunk1,,tTo)
exten => _991NXXNXXXXXX,3,Hangup

exten => _981NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _981NXXNXXXXXX,2,Dial(SIP/${EXTEN:2}@trunk2,,tTo)
exten => _981NXXNXXXXXX,3,Hangup

PostPosted: Tue Aug 30, 2011 9:23 am
by williamconley
Excellent post okli 8-)

Another method using globals strings:

Carrier A:
Code: Select all
Globals String: TRUNKA=SIP/carriera
Account Entry: [carriera] (with all sip context info beneath)
Dialplan Entry:

exten => _91NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _91NXXNXXXXXX,n,Dial(${TRUNKA}/${EXTEN:1},,tTor)
exten => _91NXXNXXXXXX,n,Hangup

Dial Prefix in Campaign: 9


Carrier B:
Code: Select all
Globals String: TRUNKB=SIP/carrierb
Account Entry: [carrierb] (with all sip context info beneath)
Dialplan Entry:

exten => _91NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _91NXXNXXXXXX,n,Dial(${TRUNKB}/${EXTEN:1},,tTor)
exten => _91NXXNXXXXXX,n,Hangup

Dial Prefix in Campaign: 8

Now you can switch between carrier a and carrier b in the campaign by changing "9" to "8" in the dial prefix. You can also route one to another (without changing the prefix!) by modifying the dialplan's TRUNKA to TRUNKB (which will have the effect of sending the dial 8 service out through the dial 9 carrier during an outage or for testing WITHOUT having to change 12 campaign's dial prefixes!)

You will also note that your dialplan entry in all cases is virtually identical. One digit different in the "exten" (first digit) and the carrier variable is different.

This also allows pointing to SIP or IAX or even DAHDI/ZAP without having to remember to change the protocol. Handy for those of us who use them all and often forget (that information is stored in the global string variable, and choosing another gets the PROTOCOL and carrier as a matched pair).