Kavish
04/12/2025, 2:16 PMVapi Support Bot
04/12/2025, 2:17 PMbash
curl -X POST https://api.vapi.ai/credential \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"provider": "byo-sip-trunk",
"name": "My SIP Trunk",
"gateways": [
{
"ip": "your.sip.provider.ip",
"port": 5060,
"inboundEnabled": true,
"outboundEnabled": true
}
],
"outboundAuthenticationPlan": {
"authUsername": "your_outbound_username",
"authPassword": "your_outbound_password",
"sipRegisterPlan": {
"realm": "your.sip.provider.domain",
"username": "your_register_username",
"domain": "your.sip.provider.domain",
"publicIpInContactEnabled": false
}
}
}'
The response will return a credential ID that you'll need for the next step:
json
{
"id": "credential_id",
"provider": "byo-sip-trunk",
"name": "My SIP Trunk",
...
}
## Step 2: Add Phone Numbers to the SIP Trunk
After creating the SIP trunk credential, you can add phone numbers by making API calls to the /phone-number
endpoint. For each phone number you want to add, you'll need to make a separate API call:
bash
curl -X POST https://api.vapi.ai/phone-number \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"provider": "byo-phone-number",
"name": "Telnyx SIP Number",
"number": "your-sip-phone-number",
"numberE164CheckEnabled": false,
"credentialId": "your-new-trunk-credential-id-which-you-got-from-previous-step"
}'
To add multiple phone numbers, simply repeat this API call for each phone number, using the same credentialId
from Step 1 but different number
values.
## Important ConsiderationsVapi Support Bot
04/12/2025, 2:17 PMsip.vapi.ai
.
- Vapi primarily supports US-based numbers, so check compatibility if you're using international numbers.
- Make sure your telephony provider supports SIP trunking before attempting to configure it with Vapi.
Is there anything specific about this process you'd like me to explain further?
Sources:
- [Discord Thread](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1341469652366266408)
- [Vapi API Documentation](https://docs.vapi.ai/api-reference/phone-numbers/create)
- [Vapi SIP Documentation](https://docs.vapi.ai/advanced/sip)Kings_bigš«
04/12/2025, 2:55 PMivy
04/23/2025, 3:35 AMivy
04/23/2025, 3:35 AMivy
04/23/2025, 3:35 AMivy
04/23/2025, 3:36 AMKings Big
04/23/2025, 4:13 AMivy
04/23/2025, 5:06 AMivy
04/23/2025, 5:59 AMivy
04/23/2025, 6:00 AMKings Big
04/23/2025, 9:00 PMGilang
04/28/2025, 5:20 AMGilang
04/29/2025, 8:10 AMKings Big
04/30/2025, 8:32 AM