SIP Trunk Phone number
# support
d
I can't make it work to use a BYOW SIP phone number. I am filling in these settings (assume username and password also is set). And I can save these settings and I can also create the phone number with these settings (inside second screenshot). But when I try to make an outbound call, nothing happens. Whereas when I do the exact same in Retell, it works. How come? https://cdn.discordapp.com/attachments/1422937416175587378/1422937416414658672/image.png?ex=68de7d3c&is=68dd2bbc&hm=6cf7d84547a0a7262dcb705429bdf3d95a6534d16bc1be5ee99ce9b306148a41& https://cdn.discordapp.com/attachments/1422937416175587378/1422937417136083027/image.png?ex=68de7d3d&is=68dd2bbd&hm=638566a9b607405a242443fb3086cb0a26ced77191c24b1cb2ed04e25a023635&
v
Suggestion: Double-check that your phone number is correctly linked to your SIP trunk credential in Vapi. When creating the phone number, ensure you include the
credentialId
for your SIP trunk, like this:
Copy code
json
{
  "provider": "byo-phone-number",
  "name": "My SIP Number",
  "number": "+14155551234",
  "numberE164CheckEnabled": false,
  "credentialId": "YOUR_SIP_TRUNK_CREDENTIAL_ID"
}
If the
credentialId
is missing or incorrect, outbound calls will not work. See the [Vapi SIP trunk documentation](https://docs.vapi.ai/advanced/sip/sip-trunk#associate-a-phone-number-with-the-sip-trunk) for details. Source: - [SIP Trunking](https://docs.vapi.ai/advanced/sip/sip-trunk)
v
Message marked as helpful by @de.hungriest! 🎉
c
Hi de.hungriest, To troubleshoot your BYOC SIP phone number configuration issue. For outbound calls to work properly, here are the key requirements and troubleshooting steps: 1. Network Configuration: - Verify you've whitelisted Vapi's SIP server static IPs: - 44.229.228.186 - 44.238.177.138 2. SIP Trunk Configuration Steps:
Copy code
# 1. Create SIP trunk credentialcurl -X POST https://api.vapi.ai/credential \-H "Content-Type: application/json" \-H "Authorization: Bearer YOUR_VAPI_API_KEY" \-d '{  "provider": "byo-sip-trunk",  "name": "Your Trunk Name",  "gateways": [{    "ip": "YOUR_SIP_GATEWAY_ADDRESS",    "inboundEnabled": false  }],  "outboundLeadingPlusEnabled": true,  "outboundAuthenticationPlan": {    "authUsername": "YOUR_SIP_NUMBER",    "authPassword": "YOUR_SIP_PASSWORD"    }}'# 2. Register the phone number with the credential IDcurl -X POST https://api.vapi.ai/phone-number \-H "Content-Type: application/json" \-H "Authorization: Bearer YOUR_VAPI_API_KEY" \-d '{  "provider": "byo-phone-number",   "name": "Your SIP Number",  "number": "YOUR_SIP_PHONE_NUMBER",  "numberE164CheckEnabled": false,  "credentialId": "YOUR_CREDENTIAL_ID"}'
Common issues that prevent outbound calls: 1. Incorrect gateway address format in the SIP trunk configuration 2. Missing or incorrect authentication credentials 3. IP whitelisting not properly configured 4. Phone number not properly associated with the credential ID I recommend double-checking these configurations match exactly with your SIP provider's requirements. If you're using IP-based authentication, note that this can be unreliable unless your provider offers a unique termination URI or dedicated SIP server
2 Views