Vicidial carrier trunks allow calls to come into your server as inbound call and it also allows to be dialed out by your vicidial server to PSTN . In this tutorial steps are mentioned to setup carrier in vicidial, Goautodial and vicibox . These steps only works for SIP or IAX carrier . This setup doesn’t work for standard T1/E1/PRI/POTS telco lines, which needs to be configured manually by system administrator .

setup carrier in vicidial

Here are some steps which can help you to configure and setup carrier in vicidial, Goautodial, Vicibox .

Step 1:

Go to the ViciDial administration page, look for ADMIN section on left hand side, click on CARRIERS then click on the ADD NEW CARRIER link .

Now fill in your desired value in Carrier ID , Carrier Name, Carrier Description . For example here i will use below values for these fields .

Carrier ID : Test-carrier

Carrier Name : Test-carrier-vicidial

Carrier Description : Test-carrier-for- USA

Step 2:

In Registration String section you need to define your SIP username and password provided by your VoIP provider . This field is only required if you want to authenticate your VoIP carrier using username and password, you can leave this field if your VoIP carrier authentication is IP Based .

register => yoursipusername:[email protected]/IP:5060

You should replace yoursipusername, yoursippassword and hostname/IP with the details provided to you by your VoIP provider .

Step 3:

In Account Entry: section you can define specific account settings for this carrier .

host=ip/sip host

Make changes to fromuser, username, secret, host according to your details .

Notes :

“disallow=all” : clear the preferred codec and it let you choose your own preferred codec . In above configuration ulaw is preferred and then GSM . You can change its order to prefer any other codec .

“type=friend” : Allow calls in and out through carrier .

“context=trunkinbound” : This for DID handling through carrier .

fromuser=username” : This can be your username or DID no. , if your VoIP provider also authenticate calls using assigned username or phone no . You can omit this field or use your default username .

“insecure=invite,port” : This depends on asterisk version you are using with vicidial . For asterisk 1.8 use “insecure=invite,port” and for asterisk 1.4 use “insecure=very” .

“nat=yes” : If your vicidial is behind any firewall or router user this parameter .

Step 4:

Choose protocol as SIP and In “Globals String: ” use

Globals String : VOIPTRUNK=sip/voip

You can choose any name in place of VOIPTRUNK or voip , we have already defined account entry under [voip], so in global string it should be defined as [voip] with protocol sip .

Step 5:

Dialplan section allow you to define optional settings to use with carrier to make calls and to setup carrier in vicidial .

exten => _97.,1,AGI(agi://
exten => _97.,2,Set(CALLERID="yourdidnumber")
exten => _97.,3,Dial(${VOIPTRUNK}/${EXTEN:2},,tTo)
exten => _97.,4,Hangup

“CALLERID=yourdidnumber” : This field is used for to show your DID number as a callerid to all outgoing calls .

you can change the extension number 97 to any desired value, with this current configuration to make outgoing calls you need to use 97+countrycode+phonenumber .

To make calls to USA you need to follow : 971+phone number . Also make changes to Campaign dial prefix as 971 to make calls through campaign .

Serverip : select your server ip from drop down list and select Active as Y . Now click on submit and wait for few secs until your carriers get registered with asterisk server .

To check whether your carrier is successfully registered or not, login into server using PUTTY via SSH and type below command to get into asterisk CLI .

[[email protected] ~]# asterisk -rn

Here you can see all the calls going through your server as well as you can see registered sip phones and carriers .

To check carrier registration for username and password based authentication :

ve1228*CLI> sip show registry

For ip Based authentication check peers :

ve1228*CLI> sip show peers

using both of above command you can check whether your carrier is registered or not as well as you can check your registered SIP phone .

If you still face issue to register your carrier you can reload asterisk

ve1228*CLI> reload

Summary :

I hope using above tutorial you can easily setup carrier in vicidial, if you still face any issue or problem let me know in comments or if you have some other configuration which works without any flaw let me know in comments .

You should also check out How to repair Vicidial MySQL .