AlexVendet
09/25/2025, 11:22 AMAlexVendet
09/26/2025, 10:46 AMChiranjeet Mishra
09/26/2025, 10:29 PMhttps://api.vapi.ai/credential with your provider’s details.
Example for a provider using SIP credentials:
bash
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": "YOUR_PROVIDER_NAME",
"gateways": [{"ip": "YOUR_SIP_SERVER_DOMAIN", "inboundEnabled": false}],
"outboundAuthenticationPlan": {
"authUsername": "YOUR_SIP_NUMBER",
"authPassword": "YOUR_SIP_PASSWORD"
}
}'
3. **Associate a Phone Number**: Link your external phone number to the SIP trunk credential by creating a Phone Number resource.
bash
curl -X POST "https://api.vapi.ai/phone-number" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_VAPI_PRIVATE_KEY" \
-d '{
"provider": "byo-phone-number",
"name": "YOUR_PHONE_NUMBER_NAME",
"number": "YOUR_PHONE_NUMBER",
"credentialId": "YOUR_CREDENTIAL_ID"
}'
4. **Test the SIP Trunk**: Perform both outbound and inbound call tests to ensure correct routing and connectivity.
For more detailed instructions, you can check the [SIP Trunking Guide](https://docs.vapi.ai/advanced/sip/sip-trunk).