Tuesday, October 23, 2018

Asterisk with AirTEL SIP FreePBX


Configuration example for AIRTEL INDIA SIP trunks with ASTERISK (FreePBX)

Working in FreePBX 14.0.4.1

You must have these configured to work with this service

DNS entry for 
ims.airtel.in = 10.232.139.146.  

You must be able to ping/route traffic to  "ims.airtel.in" successfully from your PBX.



Outbound CallerID must contain valid AIRTEL DID or calls WILL FAIL

outbound call (in FreePBX configs) 

"John Smith" <+919512349876>




FreePBX Configuration
1. CREATE a SIP TRUNK

     Trunkname = airtel-sip

2. Verify "disable trunk" = no

3. Click on SIP SETTINGS

     Trunkname = airtel-sip

PEER DETAILS: This is from my PBX settings (change username & password for your trunk.  

Airtel will give you USERNAME, SECRET and FROMDOMAIN
(The FROMDOMAIN is NOT the same as ims.airtel.in in my configuration experience.  I had to ask for FROMDOMAIN from airtel support)


username=++91XXXXXXXXXX@ims.airtel.in
secret=YourPASSWORD
fromdomain=10.X.X.X
type=friend
qualify=3600
port=5060
nat=force_rport,comedia
maxexpiry=600
insecure=invite,port
host=ims.airtel.in
dtmfmode=rfc2833
defaultexpiry=120
canreinvite=no
allow=all
context=from-trunk     
disallow=all     
allow=ulaw,alaw




4. Click on INCOMING tab

Register string = 

+91XXXXXX:YOUR_PASSWORD:+91XXXXXX@ims.airtel.in@ims.airtel.in/+91XXXXXX





5. click on SUBMIT and APPLY CHANGES
in the CLI should see something like this if you check

freepbx*CLI> sip show peers

Name/username       Host         Dyn Forcerport Comedia    ACL Port     Status      
airtel-sip/918016251 10.X.X.X          Yes             Yes                      5060    OK (11 ms)



Now its configured you should be able to make calls

24 comments:

  1. what will be the password for the airtel v fiber sip number?

    ReplyDelete
  2. Doesn't work me, may be I am doing something wrong at my side. I guess it will be better if I call my service provider ThinkTel to get help on this.

    ReplyDelete
    Replies
    1. +915056655255@ims.airtel.in:PSWWORD:+915056655255@ims.airtel.in@SBCSIPSERVERIP

      Delete
  3. +915056655255@ims.airtel.in:PSWWORD:+915056655255@ims.airtel.in@SBCSIPSERVERIP

    Use this Syntax and your server will be registered with Airtel.

    They dont tell you these setting. they will ask you o to hire their Vender to Configure server and charge you.


    Thanks
    Amardeep and Bhan Singh

    ReplyDelete
  4. we tried all the ways but i couldn't able to configure successfully, after the same configuration as you guided getting error like wrong password. Need your assistance

    ReplyDelete
    Replies
    1. make sure you can PING their system ims.airtel.in
      If you can't you still have network issues.

      Delete
  5. Thank you sharing SIP trunk Setting,both incoming and outgoing working fine and but while outgoing call to toll free number ivr options not geeting dialed.

    ReplyDelete
    Replies
    1. Could it be DTMF giving your problems?
      its possible its a codec problem. Check/add the following lines in your SIP Trunk PEER details may help.

      disallow=all
      allow=ulaw,alaw

      Delete
  6. Hi team

    I m trying all the steps but i can all the ip sbcsipserver ip but can not ping ims.airtel.in

    One thing can u tell me how to bind dns entry

    DNS entry for
    ims.airtel.in = 10.232.139.146

    ReplyDelete
    Replies
    1. The IP is a private IP. Do you have routes in your server/Firewall to allow you to get to that IP range?

      Delete
    2. Enter this entry in /etc/hosts file .. u will be able to ping ims.airtel.in

      Delete
  7. what format airtel accepts calls, is it full e164 format? Including +91 for both incoming as well as outgoing numbers?

    ReplyDelete
    Replies
    1. I've only sent numbers as their normal dialed digits "09823601000" or "0015174448123"

      Delete
  8. Hi , Airtel has give a outbound proxy to us, when we setup the peer in X-Lite , it works fine
    However when we are configuring in Asterisk following the above steps , it never getting registered.
    Here is few info
    You asked to add IP to DNS, what IP is that? Outbound Proxy?
    I could not ping ims.airtel.in, however I could ping their outbound proxy/
    Can you please advise

    ReplyDelete
  9. I am wondering what the password is. For airtel broadband, the password is normally the account number. For sip credentials is the password same as account number?

    I was able to get the username/SBCIP from the sip client in the router, but the password is hashed.

    ReplyDelete
    Replies
    1. As a residential customer does Airtel handout sip credentials? Would a call to 121 help?

      Delete
  10. Hi
    Am able to make incoming calls to the asterisk server using airtel SIP port but unable to dial outgoing calls, am getting error message as dialed number is invalid. Please help me on the configuration mistake.Thanks in advance.

    ReplyDelete
    Replies
    1. One thing with Airtel, you absolutely have to have a proper callerid that matches a CLID on their DID. You must confirm that you are doing that.

      Delete
  11. Hii, i have used same configuration for outgoing call. but when pickup the phone the voice will not vome both side. so can you please tell what's the issue.

    ReplyDelete
    Replies
    1. Make sure your ADVANCED SIP settings contain the IP address of your provider in the network settings.

      Delete
  12. Same SBC on same server two trunk configuration

    ReplyDelete