This guide will walk you through setting up SIP inbound calls using Vapi AI and Twilio Elastic SIP Trunking. Follow the steps below to configure your system.
To create a SIP URI using Vapi AI, execute the following curl
request. Replace your-private-api-key
and your-assistant-id
with the appropriate values.
curl --location '<https://api.vapi.ai/phone-number>' \\
--header 'Authorization: Bearer your-private-api-key' \\
--header 'Content-Type: application/json' \\
--data-raw '{
"provider": "vapi",
"sipUri": "<sip:[email protected]>",
"assistantId": "your-assistant-id"
}'
provider
: This is set to "vapi".sipUri
: Replace username
with your desired SIP username.assistantId
: Provide your specific assistant ID associated with your Vapi AI account.Upon successful request, you will receive the newly created SIP URI. This URI will be used in Twilio to forward calls via SIP.
For more advanced options, visit the Vapi AI SIP documentation here.