Create a credential of type byo-sip-trunk. Use the SIP server, username and password from your Connection page.
curl -X POST https://api.vapi.ai/credential \
-H "Authorization: Bearer YOUR_VAPI_PRIVATE_KEY" \
-H "Content-Type: application/json" \
-d '{
"provider": "byo-sip-trunk",
"name": "Callivex",
"gateways": [{ "ip": "YOUR_CALLIVEX_SIP_SERVER", "inboundEnabled": true }],
"outboundLeadingPlusEnabled": true,
"outboundAuthenticationPlan": {
"authUsername": "YOUR_TRUNK_USERNAME",
"authPassword": "YOUR_TRUNK_PASSWORD"
}
}'
Keep the id Vapi returns. This is your credential ID.
Import the number as a byo-phone-number linked to the credential. Write the number in full international format, digits only.
curl -X POST https://api.vapi.ai/phone-number \
-H "Authorization: Bearer YOUR_VAPI_PRIVATE_KEY" \
-H "Content-Type: application/json" \
-d '{
"provider": "byo-phone-number",
"name": "Callivex UK line",
"number": "442079460321",
"numberE164CheckEnabled": false,
"credentialId": "YOUR_CREDENTIAL_ID"
}'
Keep the phone number id. In the Vapi dashboard, attach your assistant to this number so it answers inbound calls.
Tell us your credential ID and we point your Callivex number at Vapi. Calls are delivered to:
sip:442079460321@YOUR_CREDENTIAL_ID.sip.vapi.ai
Vapi only accepts calls from the gateways listed on the credential. If an inbound test returns 401, the gateway list is missing one of our signalling addresses; we send you the full list when we switch inbound on.
curl -X POST https://api.vapi.ai/call/phone \
-H "Authorization: Bearer YOUR_VAPI_PRIVATE_KEY" \
-H "Content-Type: application/json" \
-d '{
"assistantId": "YOUR_ASSISTANT_ID",
"phoneNumberId": "YOUR_PHONE_NUMBER_ID",
"customer": { "number": "+447700900123" }
}'
The call leaves through Callivex with your number as caller ID. When it ends, it appears in the call records in your console, rated to the second.
api.eu.vapi.ai for the API calls and sip.eu.vapi.ai in the inbound address. Keep both in the same region.gateways.Steps follow Vapi's own documentation for bring-your-own SIP trunks. If Vapi changes its API, their docs take precedence and we update this guide.
Tell us which markets your agents call and answer in. We set up the trunk and the numbers.