Hosted Vicidial server starts from $39 Contact Us Buy Now!

How to Airtel sip trunk asterisk vicidial

Description: How to configure Airtel PRI SIP trunk in Asterisk -vicidial-goautodial

Overview Airtel Sip Trunk (a) VOIP trunk

Airtel SIP trunk is an advanced voice connectivity solution via network, it replaces traditional multiple fixed PSTN with a single Physical line that support 1000 plus calls simultaneous calls.

Airtel SIP Trunk reduces the cost of multiple lines, as well hardware requirement for PRI Trunks.

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. ref below Pic for better understanding.
airtel_sip_trunk_asterisk


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.

Once the above setup is ready follow the below steps, if any support ping me in skype: striker24x7


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 10.232.130.172/30 
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
IPADDR=10.232.131.172
PREFIX=30
ONBOOT=YES

*** Note: 10.232.131.172  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 10.232.130.170

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
10.232.130.170/32 via 10.232.131.171

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 ims.airtel.in,
You need to enter a static host entry for ims.airtel.in 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.
127.0.0.1               localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6
127.0.0.1         go.goautodial.org go
10.232.130.170  ims.airtel.in

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 => +91441231234:PASSWORD:+91441231234@ims.airtel.in@ims.airtel.in/+91441231234


[airtelsip]
disallow=all
allow=all
type=friend
dtmfmode=rfc2833
qualify=yes
nat=force_rport,comedia
insecure=invite,port
host=ims.airtel.in
username=+914441231234@ims.airtel.in
secret=PASSWORD
fromdomain=ims.airtel.in
defaultexpirey=120
canreinvite=no
context=trunkinbound      ; change this according to your inbound context
maxexpiry=600
progressinband=yes


STEP 4: Dialplan entry to Dialout.

For Vicidial /goautodial use the below dialplan

exten => _9X.,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _9X.,n,SipAddHeader(P-Preferred-Identity: <sip:+914441231234@ims.airtel.in>)
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: <sip:+914441231234@ims.airtel.in>)
exten => _9X.,n,Progress()
exten => _9X.,n,Dial(SIP/${EXTEN:1}@airtelsip)
exten => _9X.,n,Hangup()


Conclusion:

make sure the ims.airtel.in should resolve the airtel sbc ip.
Reach me for any professional support : skype: striker24x7

same configuration also applicable to reliance, bsnl sip trunks.

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.