How to configure Airtel SIP trunk in Asterisk -vicidial-goautodial

1 Answer(s)
Here is the steps to configure Airtel SIP Trunk configure
Physical Connectivity requirement:
Airtel SIP trunk is provided to customer via dedicated SBC gateway and router, for which you need a additional ethernet port on your asterisk server or you need to setup your LAN in the same subnet range provide by airtel.
eth1 is used to connect to AIRTEL network, and eth0 is used to connect to customer LAN network were ipphones , agents pc will be connected.

STEP 1: Configure the AIRTEL network IP to eth1 

        Assign the IP provided by airtel to one of the NIC in you server, for centos based server you may use below commands

ifconfig eth1

OR eid the ifcfg-eth1 file and manually enter the ip, OR if you have GUI manager configure manually.

vi /etc/sysconfig/network-scripts/ifcfg-eth1

then enter




*** Note:  is an example,  you need to enter the airtel ip provided to you.

STEP  2: Configuring Route in linux to reach Airtel Network.

This step is required if the AIRTEL SBC IP and your IP is in different subnet then you need a static route to reach the SBC IP.

for eg : my SBC ip is

Edit the route-eth1 for manual entry for static route.Note this is for centos based server

 vi /etc/sysconfig/network-scripts/route-eth1

and add below line via

service network restart

then type  route -n to make sure route is added

Step 3: Add static HOST entry 

Airtel SIP Trunks only accepts traffic with header,

You need to enter a static host entry for with the SBC IP.

go to hosts file and add the host entry

vi /etc/hosts

and the line which is in bold letter below.

# Do not remove the following line, or various programs

# that require network functionality will fail.               localhost.localdomain localhost

::1             localhost6.localdomain6 localhost6 go

save and exit

Step 4:  SIP Carrier settings.

For Vicidial – goautodial  you can use the admin utility to configure below settings.

For Freepbx you can use the GUI trunk configuration

For Plain Asterisk enter the below details in vi /etc/asterisk/sip.conf

register =>












context=trunkinbound      ; change this according to your inbound context



STEP 4: Dialplan entry to Dialout.

For Vicidial /goautodial use the below dialplan

exten => _9X.,1,AGI(agi://
exten => _9X.,n,SipAddHeader(P-Preferred-Identity: <>)
exten => _9X.,n,Progress()
exten => _9X.,n,Dial(SIP/${EXTEN:1}@airtelsip,,tTo)
exten => _9X.,n,Hangup()

For Plain asterisk or freepbx

exten => _9X.,1,SipAddHeader(P-Preferred-Identity: <>)
exten => _9X.,n,Progress()
exten => _9X.,n,Dial(SIP/${EXTEN:1}@airtelsip)
exten => _9X.,n,Hangup()


make sure the should resolve the airtel sbc ip.

Answered on January 10, 2021.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.