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

How to configure Airtel sip trunk in asterisk-vicidial-Freepbx

Airtel SIP Trunk configuration in Asterisk

Topic: How to configure Airtel sip trunk in asterisk-vicidial-Freepbx

Airtel SIP Trunk with Asterisk

  Overview: Airtel Sip 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.

  Network Connectivity:

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 lan route


    eth1 is used to connect to AIRTEL network, and eth0 is used to connect to customer LAN network were ip-phones , 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 10.232.130.172/30 

OR edit 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.0/24 via 10.232.131.171

service network restart

Linux  command to set a static route to SIP proxy ip and media ip
ip route add 10.232.130.0/24 via 10.232.131.171 dev eth1
Command to check the routes
ip route show 
or
route -n

  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 last line 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

Asterisk Registration String

register => +91441231234:PASSWORD:+91441231234@ims.airtel.in@ims.airtel.in/+91441231234
Airtel SIP Peer settings
[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 5: 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:

   Hope this article is useful , for professional support reach me at skype:striker24x7

23 comments

  1. Please share the JIO sip trunk configuration
    1. Jio sip also same method.
    2. if you are facing issue , reach me i will configure jio
    3. BSNL sip
    4. BSNL SIP is similar to JIO SIP trunk , check my blog for jio sip trunk configuration
  2. require two trunk same SBC on single server
  3. what is the password for the sip gateway for airtel..?
    1. you need to ask airtel ,password is unique might be 1234 or 0000
    2. Please provide contact number for airtel
    3. sorry i dont any number
      check your email they might given the details
    4. they dont have the functionality it seems, i checked with the customer care.
  4. Hey! Can you pleaseeee help me configure airtel SIP? I just got a connection with them. I want to make calls on PC and android using SIP. I can't buy a landline.

    I use windows. I have all the details. I can't ping ims.airtel.in and lots of settings on router page have changed, I can't understand properly. Thank you so much!
    1. hi
      this tutorial is for configuring PRI sip trunk.
      hope you are using the fiber home broadband with voice.
      i have no idea in configuring that.
    2. Hey! My previous message has disappeared.
      I'm using airtel xstrem fiber with voice.
      If I can ping to ims.airtel.in, I can use any SIP client to make calls.
      For that, I have to create a route with IP address, I don't know how.
      Hope you can help me. I'll reward you.
      Thank you!
  5. What will be the password for airtel SIP?
    1. ask your provider they will provide you.
      mostly its 0000 or 1234.
  6. After I have done this, how would I test the setup?
    1. in asterisk cli check the sip peer status
      sip show peer
      sip show registry
      finally make calls
  7. how to handle maximum concurrent calls
    1. if you are using vicidial then you can set MAX trunk under server settings.
      if plain asterisk you can set call-limit=
      to limit max calls via this trunk
  8. Hi i am following above steps but getting registration error. can u suuprt
    1. are you using airtel PRI sip trunk?
      reach me on skype for support ; Skypeid: striker24x7
  9. Hi, was anyone of you able to make Airtel SIP work with PJSIP Channel Driver on Asterisk? I did the settings but the call disconnects in 30 seconds (due to callsetup failure).

    I do not face any such issues with chan_sip.so channel driver.
Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.