Create Twilio Inbound call
# support
i
I would like to work with the phone numbers that I have registered with Twilio for Inbound Calls. And use VAPI create call method only for connect to the inbound call. However, the documentation does not provide information on how to do this. [Ultravox utilizes joinUrl](https://docs.ultravox.ai/telephony/inbound-calls) to create call, and the customers manually have to create code to listen inbound calls or create outbound call. Do you have possibility to create the call with manual configuration.
v
To connect a Twilio inbound call to a Vapi assistant, handle the inbound webhook and update the call with Vapi-generated TwiML. Here’s a concise example using Express.js:
Copy code
js
app.post("/inbound_call", async (req, res) => {
  const caller = req.body.Caller;
  const response = await axios.post("https://api.vapi.ai/call", {
    phoneNumberId: PHONE_NUMBER_ID,
    phoneCallProviderBypassEnabled: true,
    customer: { number: caller },
    assistantId: ASSISTANT_ID,
  }, {
    headers: { Authorization: `Bearer ${PRIVATE_API_KEY}` }
  });
  const returnedTwiml = response.data.phoneCallProviderDetails.twiml;
  return res.type("text/xml").send(returnedTwiml);
});
This lets you manually control the inbound call and connect it to Vapi as desired. [See full example in the documentation.](https://docs.vapi.ai/calls/call-handling-with-vapi-and-twilio) Source: - [Call Handling with Vapi and Twilio](https://docs.vapi.ai/calls/call-handling-with-vapi-and-twilio)
i
I'm using the library
@vapi-ai/server-sdk
, and the field
phoneCallProviderBypassEnabled
does not exist. Is this field available only via API?
v
Message marked as helpful by @ivanprog00! 🎉
c
Hi ivanprog00, It seems like there isn't specific context or query provided in your support request. However, if you need assistance regarding Twilio SIP integration with Vapi or managing calls through our platform, here are some general steps you might find useful: 1. **Outbound SIP Integration**: - Create an Elastic SIP Trunk in Twilio and adjust settings as needed. - Whitelist Vapi's SIP server static IPs:
44.229.228.186
and
44.238.177.138
. - Use [this guide for detailed instructions](https://docs.vapi.ai/advanced/sip/twilio). 2. **Inbound SMS Setup**: - Ensure your Twilio number is from the US and has SMS capabilities. - Configure the Twilio Messaging webhook through Vapi for auto-start chat sessions. - More information is available [here](https://docs.vapi.ai/phone-numbers/inbound-sms). 3. **Call Management**: - Use the Vapi API to make calls or manage phone numbers. - For call setup, include your
assistantId
and
phoneNumberId
in the API requests. - Refer to [this link](https://docs.vapi.ai/api-reference/calls/list) for additional configurations. If you have specific questions or encounter any issues, feel free to provide more details, and I'll be happy to assist further.
r
yes it is only available over the api
c
We apologize for the delay in responses lately. We are in process of making some changes to our workflow in how we handle support requests. The good news is that we are starting to get back on track of having a 48 hour response time and we would like to start cleaning up anything old. With that being said, just wanted to check in with you to see if you have made any progress or changes to your project since support has last reached out.
2 Views