SIP Trunking
# support
g
Can someone from support please reach out to me, I've got SIP trunk settings and auth details from my provider but however I put them in the creation fields they dont seem to work. Obviously I dont want to put the screenshots with this sensitive data here
v
Thanks for reaching out! I couldn't find enough info to solve this one, so I'm escalating your request to our support team. Someone from support will reach out to you directly to help with your SIP trunk setup. If you want to review the general SIP trunking setup steps in the meantime, you can check out our [SIP Trunking guide](https://docs.vapi.ai/advanced/sip/sip-trunk). Hang tight—help is on the way!
g
Thanks!
v
Hey, You can check out this guide: for details on integration. Note: This is a standard guide used by many telephony providers, so it should be helpful.
g
I've done that triple and double checked it still not working, can you please tell me whats the issue. Here's the call ID: 012ac3a4-ed52-4fb7-b6e2-2ace7260fbd7 It's saying An error occurred in this call: call.in-progress.error-providerfault-outbound-sip-403-forbidden But please can you tell me more about it what exactly is failing, I've setup the sip according to what the gateway my telephony provider has given
Could someone help me go over if I'm plugging the details correctly
@Shubham Bajaj @Vapi Support Bot
@Vapi
v
A 403 Forbidden error from your SIP provider usually means there is an authentication or configuration issue. To help narrow this down, could you confirm: Which SIP provider are you using (e.g., Telnyx, Zadarma, or another)? This will help me point you to the most relevant troubleshooting steps for your setup. For general guidance, please review the [SIP Trunking setup guide](https://docs.vapi.ai/advanced/sip/sip-trunk) and double-check that your SIP username, password, and gateway address match exactly what your provider has given you. Sources: - [SIP Trunking Guide](https://docs.vapi.ai/advanced/sip/sip-trunk) - [Call Ended Reasons](https://docs.vapi.ai/calls/call-ended-reason)
g
@Vapi @Vapi Support Bot , its another SIP provider, they have given 3 gateways for outbound all with single username and password. I've filled it out the gateway link port and everything correct but maybe there's something i dont understand, if someone from the support could DM me I would provide this information, I dont really want to post sensitive info in a thread openly accessible
v
A 403 Forbidden error usually means your SIP credentials or gateway details are not matching what your provider expects. If you have multiple gateways, make sure to include all of them in your API call like this:
Copy code
json
{
  "provider": "byo-sip-trunk",
  "name": "My SIP Trunk",
  "gateways": [
    { "ip": "gateway1.example.com" },
    { "ip": "gateway2.example.com" },
    { "ip": "gateway3.example.com" }
  ],
  "outboundAuthenticationPlan": {
    "authUsername": "YOUR_SIP_USERNAME",
    "authPassword": "YOUR_SIP_PASSWORD"
  }
}
Double-check your username, password, and gateway addresses for typos, and confirm with your provider if any IP allowlisting or port restrictions apply. If the issue persists, please wait for a direct message from support to securely share your details for further troubleshooting. Source: [SIP Trunking Guide](https://docs.vapi.ai/advanced/sip/sip-trunk) Source: - [SIP Trunking Guide](https://docs.vapi.ai/advanced/sip/sip-trunk)
g
I have created that all according to the authentication plan but still calls not going through
@Shubham Bajaj
OK I have some progress now it says that customer busy even though no call is going through b0f84c2f-2d9b-4e52-a5f8-c683bf90f2c4
back to square 1, its 403 can you please check logs 07cb2032-b9e2-4a6e-8493-e5675786bdb7
v
Hey Gai, it looks like you're sending the wrong credentials, which is why your telephony provider is rejecting your calls. A 403 error means forbidden, indicating incorrect credentials. I suggest checking your telephony credentials again, recreating the SIP trunking credential and the phone number, and then trying to make your calls. If it still blocks you, please share the call ID, and I'll provide the best information from my site.
g
Hi they came back to me with this, this is the log from their side. And instead of the number where you send the number they expect the username, and they also expect and RPID field in the header where the phone number should be instead. Their words> The field From should contain your username and you need to add row with RPID with the number 447520692885 https://cdn.discordapp.com/attachments/1379839672611766454/1380478894464962651/image.png?ex=684406a8&is=6842b528&hm=151aa0761a7019b3679dd7b0892777f17dff065e62f33f2f8255d064e62c707a&
@Shubham Bajaj
How can I do it?
I've read up on it basically and it requires an Remote Party ID (RPID) to be sent in the connection
Do you offer that functionality?
v
Hey Gai, we offer customized SIP Headers with X appended before them as X-RPID. When creating your BYO SIP trunk credential using the POST request to /credential, you can customize the SIP username by including the outboundAuthenticationPlan object in your JSON payload.
Copy code
"outboundAuthenticationPlan": {
     "authUsername": "BASIC_AUTH_USERNAME",
     "authPassword": "YOUR_PASSWORD",
     "sipRegisterPlan": {
       "domain": "sip.example.com", 
       "username": "YOUR_CUSTOM_SIP_USERNAME",
       "realm": "example.com"
     }
   }
Copy code
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": "xxx Trunk",
    "gateways": [{
      "ip": "sip.xxx.com"
    }],
    "outboundLeadingPlusEnabled": true,
    "outboundAuthenticationPlan": {
      "authUsername": "YOUR_AUTH_USERNAME",
      "authPassword": "YOUR_PASSWORD",
      "sipRegisterPlan": {
        "domain": "sip.xxx.com",
        "username": "YOUR_SIP_USERNAME", 
        "realm": "xxx.com"
      }
    }
  }'
The sipRegisterPlan is used when your SIP provider requires registration using SIP REGISTER messages, while the basic authUsername is used for call authentication even without registration.
3 Views