equal-aqua•3w ago
Bad Request on Twilio SIP Trunk Credential
I wanted to ask what could be causing this issue when I'm trying to create a SIP trunk from Twilio to my VAPI account
I'm consistently getting this error whenever I try to hit the API in Postman
{
"message": "Couldn't validate SIP trunk credential. SIP gateway creation failed.",
"error": "Bad Request",
"statusCode": 400
}


4 Replies
Suggestion:
Double-check that your
See full guide Source: - Twilio SIP Integration
Double-check that your
gateways
field uses the exact Twilio Termination SIP URI (not just the trunk domain). For example, your request body should look like this:
Make sure your Twilio trunk is active and that Vapi's IPs (44.229.228.186
, 44.238.177.138
) are whitelisted in Twilio as required by the documentation.See full guide Source: - Twilio SIP Integration
⤵️ Mention @Vapi Support Bot for follow-ups 🐥
equal-aquaOP•3w ago
All I have setup in twilio already as per documentation but still getting 400

equal-aquaOP•3w ago
Can I get assistance instead of connecting a BYO-SIP-Trunk? I'm getting the 400 error when I try in postman
Hi Ivan, you have a couple of options when configuring a Twilio SIP Trunk:
- Add your Twilio API key to your Vapi dashboard on the
Phone Numbers
page
- Or through the API request to the /credential endpoint (like you are currently doing) and use the IP address of the domain instead of the resolved name
If you continue to encounter errors when adding the SIP, please let us know and we will be more than happy to help you.