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

Next Post Previous Post
24 Comments
  • Unknown
    Unknown November 24, 2020 at 1:44 PM

    Please share the JIO sip trunk configuration

    • gopi baskar
      gopi baskar November 24, 2020 at 2:19 PM

      Jio sip also same method.

    • gopi baskar
      gopi baskar November 24, 2020 at 2:27 PM

      if you are facing issue , reach me i will configure jio

    • Anonymous
      Anonymous July 21, 2022 at 6:31 PM

      BSNL sip

    • gopi baskar
      gopi baskar July 21, 2022 at 6:33 PM

      BSNL SIP is similar to JIO SIP trunk , check my blog for jio sip trunk configuration

  • bipin arnav
    bipin arnav February 3, 2021 at 5:33 PM

    require two trunk same SBC on single server

  • ajith
    ajith March 25, 2021 at 8:41 PM

    what is the password for the sip gateway for airtel..?

    • gopi baskar
      gopi baskar March 26, 2021 at 10:04 AM

      you need to ask airtel ,password is unique might be 1234 or 0000

    • people of c section
      people of c section April 5, 2021 at 3:02 PM

      Please provide contact number for airtel

    • people of c section
      people of c section April 5, 2021 at 3:03 PM

      Please provide the phone number that we can contact with. I searched for the contacts, no help.

    • gopi baskar
      gopi baskar April 6, 2021 at 12:10 AM

      sorry i dont any number
      check your email they might given the details

    • ajith
      ajith April 7, 2021 at 11:10 PM

      they dont have the functionality it seems, i checked with the customer care.

  • airtelSIP
    airtelSIP June 13, 2021 at 1:13 PM

    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!

    • gopi baskar
      gopi baskar June 14, 2021 at 10:29 AM

      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.

    • airtelSIP
      airtelSIP June 15, 2021 at 1:55 PM

      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!

  • shiyas fazal
    shiyas fazal June 22, 2021 at 2:35 AM

    What will be the password for airtel SIP?

    • gopi baskar
      gopi baskar June 22, 2021 at 9:28 AM

      ask your provider they will provide you.
      mostly its 0000 or 1234.

  • Shailendra
    Shailendra January 19, 2022 at 9:47 PM

    After I have done this, how would I test the setup?

    • gopi baskar
      gopi baskar January 20, 2022 at 9:33 AM

      in asterisk cli check the sip peer status
      sip show peer
      sip show registry
      finally make calls

  • abhi
    abhi February 10, 2022 at 10:21 PM

    how to handle maximum concurrent calls

    • gopi baskar
      gopi baskar February 11, 2022 at 9:31 AM

      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

  • Unknown
    Unknown February 20, 2022 at 12:53 AM

    Hi i am following above steps but getting registration error. can u suuprt

    • gopi baskar
      gopi baskar February 20, 2022 at 11:26 AM

      are you using airtel PRI sip trunk?
      reach me on skype for support ; Skypeid: striker24x7

  • Shailendra
    Shailendra April 28, 2022 at 10:54 AM

    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.

Add Comment
comment url