absent-sapphire•2y ago
forwardingPhoneNumbers using Vapi?
Hey guys. I am trying to use forwardingPhoneNumbers to forward to different phone numbers based on context. I have a few confusion. I am using a Twilio number.
- Is it possible to forward to regular numbers using inbuilt CallTransfer function and forwardingPhoneNumbers array using Vapi? Or do I need to use Twilio externally? If yes, does the forwardingPhoneNumbers array need to be inside a custom function?
I keep getting array or object error when I add phone numbers as an array (pics attached). What am I doing wrong?


6 Replies
Hi @Kushal, I'm an AI assistant for Vapi. I'll analyze available sources and get back to you shortly.
-----------------------------
While I generate an answer, here are some sources that might be helpful:
* Function Calling
* Call Forwarding
* List Calls
* Create Phone Call
-----------------------------
Answer
Yes, it is possible to forward calls to regular numbers using the inbuilt
CallTransfer
function and the forwardingPhoneNumbers
array with Vapi. You do not need to use Twilio externally for this, as Vapi can handle call forwarding internally. The forwardingPhoneNumbers
array does not need to be inside a custom function; it can be directly specified in your assistant's configuration. For configuring call forwarding, you could use the forwardingPhoneNumbers
attribute to define an array of phone numbers for call forwarding, which allows you to direct calls to different departments or individuals based on the conversation context (1) .
If you're encountering an array or object error when adding phone numbers as an array, ensure that the format you are using matches the expected JSON structure. Here's an example of how the forwardingPhoneNumbers
array could be structured:
Make sure that:
- Each phone number is correctly formatted and includes the country code.
- The JSON structure is valid without any missing commas or braces.
If you continue to face issues, double-checking the JSON format and ensuring it matches the expected schema might help resolve the array or object error you're encountering.Got it. Tagging @Vapi Team for additional help.
absent-sapphireOP•2y ago
How does function calling look on prompt? @Ask Inkeep
Glad I could be helpful. Feel free to create a new thread with any new questions you may have.
adverse-sapphire•2y ago