How To integrate EXOTEL SIP to VAPI
# support
a
Got SIP trunk number from exotel.. do we have any document which we can follow to use that number. because with our number these callers are just a basic chat bot
k
Configure the SIP credentials in both platforms, set up proper call routing in Vapi to direct incoming calls to your AI bot, and ensure codecs, ports, and authentication settings are correctly aligned.
v
Currently, there is no Exotel-specific documentation for SIP integration with Vapi. However, Vapi supports a generic "BYO SIP Trunk" process that may work if you have your Exotel SIP server address, username, password, and DID. Could you confirm if you have all the necessary SIP trunk details (server address, username, password, and phone number) from Exotel? This will help determine if the generic integration steps can be applied. Sources: - [Vapi SIP Trunking Guide](https://docs.vapi.ai/advanced/sip/sip-trunk) - [Zadarma SIP Integration Example](https://docs.vapi.ai/advanced/sip/zadarma)
Currently, there is no Exotel-specific documentation for SIP integration with Vapi. However, Vapi supports a generic "BYO SIP Trunk" process that may work if you have your Exotel SIP server address, username, password, and DID. Could you confirm if you have all the necessary SIP trunk details (server address, username, password, and phone number) from Exotel? This will help determine if the generic integration steps can be applied. Sources: - [Vapi SIP Trunking Guide](https://docs.vapi.ai/advanced/sip/sip-trunk) - [Zadarma SIP Integration Example](https://docs.vapi.ai/advanced/sip/zadarma)
a
Hi @Kings_big💫 From frontend I am not able to sep SIP URL for call forwarding... can you let me know where should i add this
v
To forward calls to a SIP URL in Vapi, add a
transferCall
tool to your assistant configuration with your SIP URI as shown below:
Copy code
json
{
  "type": "transferCall",
  "destinations": [
    {
      "type": "sip",
      "sipUri": "sip:transfer-number@your-telecom-provider-domain.com"
    }
  ]
}
This setup is done in your assistant/tool configuration, not directly in the dashboard UI. Make sure SIP REFER is enabled with your SIP provider for transfers to work. [See full example in the Vapi SIP Trunking documentation.](https://docs.vapi.ai/advanced/sip/sip-trunk) Source: - [Vapi SIP Trunking documentation](https://docs.vapi.ai/advanced/sip/sip-trunk)
To forward calls to a SIP URL in Vapi, add a
transferCall
tool to your assistant configuration with your SIP URI as shown below:
Copy code
json
{
  "type": "transferCall",
  "destinations": [
    {
      "type": "sip",
      "sipUri": "sip:transfer-number@your-telecom-provider-domain.com"
    }
  ]
}
This setup is done in your assistant/tool configuration, not directly in the dashboard UI. Make sure SIP REFER is enabled with your SIP provider for transfers to work. [See full example in the Vapi SIP Trunking documentation.](https://docs.vapi.ai/advanced/sip/sip-trunk) Source: - [Vapi SIP Trunking documentation](https://docs.vapi.ai/advanced/sip/sip-trunk)
k
The transferCall tool in your assistant settings with your SIP URI like sip:your_username@sip.vapi.ai the and ensure your SIP provider (like Exotel) accepts calls from Vapi AI.
v
To forward calls to a SIP URL in Vapi, add a
transferCall
tool to your assistant configuration like this:
Copy code
json
{
  "type": "transferCall",
  "destinations": [
    {
      "type": "sip",
      "sipUri": "sip:transfer-number@your-telecom-provider-domain.com"
    }
  ]
}
This must be set in your assistant/tool configuration (not directly in the dashboard UI). Make sure SIP REFER is enabled with your SIP provider for transfers to work. See the [Vapi SIP Trunking documentation](https://docs.vapi.ai/advanced/sip/sip-trunk) for a full example. Source: - [Vapi SIP Trunking documentation](https://docs.vapi.ai/advanced/sip/sip-trunk)
To forward calls to a SIP URL in Vapi, add a
transferCall
tool to your assistant configuration like this:
Copy code
json
{
  "type": "transferCall",
  "destinations": [
    {
      "type": "sip",
      "sipUri": "sip:transfer-number@your-telecom-provider-domain.com"
    }
  ]
}
This must be set in your assistant/tool configuration (not directly in the dashboard UI). Make sure SIP REFER is enabled with your SIP provider for transfers to work. See the [Vapi SIP Trunking documentation](https://docs.vapi.ai/advanced/sip/sip-trunk) for a full example. Source: - [Vapi SIP Trunking documentation](https://docs.vapi.ai/advanced/sip/sip-trunk)
a
Lets do it. Step by step .. what should configure for inbound calls?
v
To proceed with inbound call configuration using Exotel and Vapi's generic SIP trunk process, you will need your Exotel SIP server address, username, password, and DID. Have you already obtained these SIP trunk details from Exotel? This will determine if you can move forward with the generic integration steps as outlined in the [Vapi SIP Trunking Guide](https://docs.vapi.ai/advanced/sip/sip-trunk). If you have these details, I can guide you through the exact API calls and configuration steps for Vapi. Sources: - [Vapi SIP Trunking Guide](https://docs.vapi.ai/advanced/sip/sip-trunk) - [Vapi Phone Calling Inbound Calls](https://docs.vapi.ai/phone-calling#inbound-calls)
a
Yes i have sip trunk details from the exotel
v
Step 1: Create a SIP trunk credential in Vapi using your Exotel SIP details:
Copy code
bash
curl -X POST "https://api.vapi.ai/credential" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_VAPI_PRIVATE_KEY" \
  -d '{
    "provider": "byo-sip-trunk",
    "name": "Exotel Trunk",
    "gateways": [{ "ip": "YOUR_EXOTEL_SIP_SERVER" }],
    "outboundAuthenticationPlan": {
      "authUsername": "YOUR_SIP_USERNAME",
      "authPassword": "YOUR_SIP_PASSWORD"
    }
  }'
Replace the placeholders with your Exotel SIP server, username, and password. This will generate a credential ID for use in the next step. Next: Let me know when this is done, and I’ll guide you through associating your phone number and completing inbound call setup. Source: [Vapi SIP Trunking Guide](https://docs.vapi.ai/advanced/sip/sip-trunk) Sources: - [Vapi SIP Trunking Guide](https://docs.vapi.ai/advanced/sip/sip-trunk) - [Zadarma SIP Integration Example](https://docs.vapi.ai/advanced/sip/zadarma)
k
For Inbound call, you will need forward the request at sip:**{phoneNumber}@<credential_id>.[sip.vapi.ai](http://sip.vapi.ai)**
a
Hi Sahil... when we say phoneNumber so will it be +918044318999 or 5161e5f6-37ec-432b-830a-14a51f59d67bIid)
v
Use your actual phone number in international format (E.164) for
{phoneNumber}
in the SIP URI.
For example, if your number is
+918044318999
and your credential ID is
5161e5f6-37ec-432b-830a-14a51f59d67b
, the SIP URI should be:
Copy code
sip:+918044318999@5161e5f6-37ec-432b-830a-14a51f59d67b.sip.vapi.ai
Do not use the Vapi phone number ID; always use the real phone number. [See Vapi SIP Trunking docs for details.](https://docs.vapi.ai/advanced/sip/sip-trunk#inbound-call-test) Sources: - [Vapi SIP Trunking documentation](https://docs.vapi.ai/advanced/sip/sip-trunk#inbound-call-test) - [Vapi Zadarma SIP Integration](https://docs.vapi.ai/advanced/sip/zadarma)
k
- Phone Number: +918044318999 - Credential ID: The ID you received when creating the SIP trunk.
a
ok... had a word with Exotel team... we have whitelisted 44.229.228.186/32 44.238.177.138/32 as These IPs are used exclusively for SIP traffic. but they are saying as everyone is using the same IP.. can we get a FQDN so that they can uniquely identify the user
k
Yeah, for that particular thing you will need to use cred based authentication for outbound part and for inbound call we provide user with unique sip origination uri through which you can whitelist their ip address while creating the trunk.
Copy code
sip:+918044318999@5161e5f6-37ec-432b-830a-14a51f59d67b.sip.vapi.ai
example ^^
p
@Akash Malhotra Are you able to solve this problem? If not let me know, We provide the effortless sip integration with vapi for Indian numbers.
a
@psbadcoder could not able to solve with exotel.. tell me how you can help
p
@Akash Malhotra We can provide sip trunking from Indian number to Voice AI providers such as Vapi. DM'ng you.