rival-black•2mo ago
Dynamic Call Transfer through UI is not working
I created a transfer tool and added multiple destinations through Vapi UI and prompt the Assistant that if user asks to call a specific department to call transfer_call_tool with the specific destination , but the assistant keeps routing through the same number for all departments
call IDs: f0f55c70-d08d-498d-b716-9488ad3f6c29
00f59b10-4225-41a8-b824-a97620389591
e80e0890-e24f-4812-978b-19f7d81862d1
23 Replies
Thanks for sharing the details. To help troubleshoot, could you confirm if each department's destination number is uniquely set in the transfer tool's configuration, and that the assistant is being prompted to use the correct "destination" parameter for each department? (For example, does your prompt or function call specify the unique number for each department as shown in the Vapi documentation?)
Source:
- Vapi documentation: Call Forwarding
⤵️ Mention @Vapi Support Bot for follow-ups 🐥
rival-blackOP•2mo ago
@Duckie @Vapi @Vapi Team yes i do , i specified unique number for every department in prompt and in Transfer tool configuration
It sounds like the assistant may not be passing the correct "destination" parameter when calling the transfer tool. Please ensure your prompt or function call uses the exact destination number for each department, like this:
Double-check that each department's number matches the one in your tool configuration and that your prompt logic dynamically sets the correct value.
See: Vapi documentation – Instructing the Assistant Source: - Vapi documentation: Call Forwarding
See: Vapi documentation – Instructing the Assistant Source: - Vapi documentation: Call Forwarding
rival-blackOP•2mo ago
@Duckie the tool is called correctly but no numbers are passed :
{
"role": "tool_calls",
"time": 1754489204514,
"message": "",
"toolCalls": [
{
"id": "call_Zxfz2qHUwP311AAa1ZsFCOSU",
"type": "function",
"function": {
"name": "transferCall",
"arguments": "{}"
}
}
],
"secondsFromStart": 12.29
}
It looks like the assistant is calling the transfer tool without passing the required "destination" parameter. Please ensure your system prompt or function call includes the destination number exactly as shown below:
Double-check that your assistant's prompt logic and the tool's parameter schema match, and re-save your assistant after making any changes.
See: Vapi documentation – Instructing the Assistant Source: - Vapi documentation: Call Forwarding
See: Vapi documentation – Instructing the Assistant Source: - Vapi documentation: Call Forwarding
rival-blackOP•2mo ago
could you tell me for example how to pass the number in system prompt and in function call @Duckie ?
To ensure the assistant passes the correct number, set your system prompt like this:
System Prompt Example:
Function Call Example:
Make sure your prompt and function call both specify the exact destination number as shown above.
See Vapi documentation for more details. Source: - Vapi documentation: Call Forwarding
See Vapi documentation for more details. Source: - Vapi documentation: Call Forwarding
rival-blackOP•2mo ago
@Shubham Bajaj
rare-sapphire•2mo ago
Hi, injecting into this ticket as we're having the exact same issue. We've tried multiple ways of prompting, including the "recommended" way, but transfers keep failing.
Latest call id: e72b691f-136f-4bdb-b68d-eb2250b3a553
rival-blackOP•2mo ago
I tried to switch the LLM model from GPT Nano 4.1 to 4o Cluster and it worked fine calling the correct destination number as parameters to transfercall tool
@Mr_Dark
rival-black•2mo ago
Hi, im working with Mr_Dark. thanks @Ramy for sharing your solution. Sadly, changing the model made no difference for us. It is still failing on the same place as it was before. latest call id: 40144be9-4186-4e37-a121-73a584dd0a07
rival-blackOP•2mo ago
Hello,
Make sure the prompt is instructed to reflects the defined destinations @Crave
rival-black•2mo ago
Yes, it is done according to the Vapi articles and the example above in this thread
rival-blackOP•2mo ago
Try to disconnect and reconnect the transfercall tool after updating the prompt and model and try again, sometimes solves alot for me
rival-black•2mo ago
@Shubham Bajaj Would you be able to advise on the above issue? We have tried all of the above suggestions and it is still failing for us.
rare-sapphire•2mo ago
Anyone available to have a look with us?
Please edit your transfer tool to include enum values for the destinations you have in your tool:
rare-sapphire•2mo ago
I guess this is only possible via the API and not the dashboard?
I've updated the function to include the destination enum. When the assistant routes the call, it says the "destination message" assigned to that destination, but then the call drops. Tried multiple destination numbers, regular and virtual, all don't connect.
Which phone service is used for the forward/outbound call (we use Vonage for phone numbers)? Is there a way to configure which phone service to use?
Could you please provide a call id with the new configuration adjustments made? When you use a Vonage phone number with your VAPI assistant and want to transfer the call, VAPI is handling the transfer orchestration, but it uses Vonage's API to execute the actual transfer.
rare-sapphire•2mo ago
Call ids of my last two calls
7dbe278a-c599-4143-bc64-521ac476b8ec
and 1bc0ef0c-43d6-472b-a1dd-19fff3792259
.
In the logs I see that the phonenumber is passed into the tool correctly.
With those calls I also tried setting the transfer plan to "Warm Transfer - Experimental"Thanks for providing the call ids. We reviewed them and looks like there was some errors in the logs:
Could you provide some more details about type of transfer this was? For example, SIP to SIP or PSTN to SIP, etc.
rare-sapphire•2mo ago
I guess whatever the default is? Did not configure anything specific. Where can I check this?
Just re-read your message and now understand what you asked. The call flow was as follows:
My mobile phone to a Vonage number - that triggers the assistant. The transfer was to another Vonage number.
However, we also tried transferring to a "real" number, but that gave the same result.
Hi Ramy,
To set up dynamic call transfers in the Vapi UI, follow these steps:
1. Create a Dynamic Transfer Tool:
- Go to Tools in your Vapi dashboard.
- Click "Create Tool" and choose "Transfer Call."
- Leave the destinations array empty and name it
dynamicTransfer
.
2. Configure an Assistant:
- Create or edit an assistant in the Assistants section.
- Add the dynamic transfer tool.
- Enable the transfer-destination-request
server event and set your webhook URL.
3. Webhook Server Setup:
- Build your webhook server to handle transfer-destination requests and verify signatures.
- Customize routing based on conversation context.
For more details, check the Dynamic call transfers documentation.
If you have issues after this, ensure your webhook server is set up correctly and check the Vapi dashboard logs for errors.