Dynamic Call Transfer through UI is not working
# support
r
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
v
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](https://docs.vapi.ai/call-forwarding#instructing-the-assistant)?) Source: - [Vapi documentation: Call Forwarding](https://docs.vapi.ai/call-forwarding#instructing-the-assistant)
r
@Vapi Support Bot @Vapi @User yes i do , i specified unique number for every department in prompt and in Transfer tool configuration
v
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:
Copy code
json
{
  "function": {
    "name": "transferCall",
    "parameters": {
      "destination": "+1234567890" // Department A
    }
  }
}
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](https://docs.vapi.ai/call-forwarding#instructing-the-assistant) Source: - [Vapi documentation: Call Forwarding](https://docs.vapi.ai/call-forwarding#instructing-the-assistant)
r
@Vapi Support Bot 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 }
v
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:
Copy code
json
{
  "function": {
    "name": "transferCall",
    "parameters": {
      "destination": "+1234567890"
    }
  }
}
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](https://docs.vapi.ai/call-forwarding#instructing-the-assistant) Source: - [Vapi documentation: Call Forwarding](https://docs.vapi.ai/call-forwarding#instructing-the-assistant)
r
could you tell me for example how to pass the number in system prompt and in function call @Vapi Support Bot ?
v
To ensure the assistant passes the correct number, set your system prompt like this: System Prompt Example:
Copy code
If the user asks for Department A, call the transferCall function with destination "+1234567890".
If the user asks for Department B, use destination "+0987654321".
Function Call Example:
Copy code
json
{
  "function": {
    "name": "transferCall",
    "parameters": {
      "destination": "+1234567890"
    }
  }
}
Make sure your prompt and function call both specify the exact destination number as shown above. [See Vapi documentation for more details.](https://docs.vapi.ai/call-forwarding#instructing-the-assistant) Source: - [Vapi documentation: Call Forwarding](https://docs.vapi.ai/call-forwarding#instructing-the-assistant)
r
@Shubham Bajaj
m
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
r
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
c
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
r
Hello, Make sure the prompt is instructed to reflects the defined destinations @Crave
c
Yes, it is done according to the Vapi articles and the example above in this thread
r
Try to disconnect and reconnect the transfercall tool after updating the prompt and model and try again, sometimes solves alot for me
c
@User 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.
m
Anyone available to have a look with us?
c
Please edit your transfer tool to include enum values for the destinations you have in your tool:
Copy code
{
  "type": "transferCall",
  "destinations": [
    // ... your existing destinations
  ],
  "function": {
    "name": "transfer_call_hcn",
    "description": "Transfer calls to specific hotel departments",
    "parameters": {
      "type": "object",
      "properties": {
        "destination": {
          "type": "string",
          "enum": [
            "+442038143405",
            "+441788227619",
            "+442080595240", 
            "+441788227618",
            "+447584702395",
            "+442080595451"
          ],
          "description": "The phone number to transfer the call to"
        }
      },
      "required": ["destination"]
    }
  }
}
m
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?
c
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.
m
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"
c
Thanks for providing the call ids. We reviewed them and looks like there was some errors in the logs:
Copy code
🟡 07:01:35:525 Couldn't Transfer Vonage Call. Error: No Vonage Call In Progress.
Could you provide some more details about type of transfer this was? For example, SIP to SIP or PSTN to SIP, etc.
m
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.
c
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](https://docs.vapi.ai/calls/call-dynamic-transfers). If you have issues after this, ensure your webhook server is set up correctly and check the Vapi dashboard logs for errors.
3 Views