Neels
08/08/2025, 9:09 AMVapi Support Bot
08/08/2025, 9:11 AMgateways array, for example:
bash
curl -X POST https://api.vapi.ai/credential \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"provider": "byo-sip-trunk",
"name": "Your Trunk Name",
"gateways": [
{"ip": "103.230.159.**", "port": 5060},
{"ip": "103.1.186.**", "port": 5060},
{"ip": "119.42.54.**", "port": 5070}
]
}'
This ensures all IPs are properly whitelisted for inbound calls.
Source:
- [Vapi SIP Trunking Documentation](https://docs.vapi.ai/advanced/sip/sip-trunk)Neels
08/08/2025, 9:38 AMNeels
08/08/2025, 9:49 AMChiranjeet Mishra
08/11/2025, 5:08 AMsip:<your-unique-id>@sip.vapi.ai.
\- Confirm that the IP address of your provider is in the recognized list by Vapi. Calls from unrecognized IPs will result in 401 errors.
\- If applicable, make sure there are no typos in your SIP gateway IP configuration in Vapi.
3\. **SIP URI Termination**: When setting up your provider's termination, use the format <credential_id>-sip.vapi.ai if specific credential-based addressing is required by your setup.
4\. **Dummy Credentials**: If IP-based authentication has an issue, it's acceptable to use non-functional dummy credentials (e.g., username/password set as vapi/vapi) just to pass authentication checks. Even though Vapi doesn’t require authentication, some systems need these headers to proceed correctly.
5\. **Provider-Specific Configuration**: Double-check your provider’s settings to ensure they conform to the configuration recommended by their documentation, and match with the necessary details for Vapi integration.
By following these steps, you should be able to resolve the authorization issue. Let me know if you need further assistance.