Issue with Transfer Call in Vapi – Call Terminates...
# support
g
Hi guys, I hope you’re doing well?! I have a question: I’ve been struggling with the Transfer Call in Vapi for some time. I’m using the tool Werkzeug – Transfer Call. The issue is that it shows up correctly, but the call still gets terminated without the transfer actually going through. Additionally, we also built a new agent that is only responsible for Transfer Call – but unfortunately, this didn’t work either. We’re using ein-acht-ein to trigger the assistant accordingly. Depending on the time of day, different assistants are supposed to be addressed, and also on weekends. We are of course using a phone number for this. Do you have any idea what might be causing this? Rgds, Gerald https://cdn.discordapp.com/attachments/1412785659864940686/1412785660120531047/image.png?ex=68b98ead&is=68b83d2d&hm=d209c6ee3244e780a95c525d6aee56406b5d8bc79650283bbe1610bbe3964fed& https://cdn.discordapp.com/attachments/1412785659864940686/1412785660670119936/image.png?ex=68b98ead&is=68b83d2d&hm=d4a5fca109ad690615c6f9175328f90cb6e335e12a418ecd13203e12ea35347b& https://cdn.discordapp.com/attachments/1412785659864940686/1412785661051928597/image.png?ex=68b98ead&is=68b83d2d&hm=d4022af5a10c7dbe081c5347410333ff9cd24a17bd4935e6ebab9fd8c4ed33da& https://cdn.discordapp.com/attachments/1412785659864940686/1412785661408182342/image.png?ex=68b98ead&is=68b83d2d&hm=9d3be470d8c5d0e637f0e23ac5d9ca0f32eab244825d798bd9b3fc6e7ebebf77& https://cdn.discordapp.com/attachments/1412785659864940686/1412785661752250409/image.png?ex=68b98eae&is=68b83d2e&hm=b85314744e1d35e9d472fda7c41f47b3def8960183cd1bad76c1b5ce15486bbc& https://cdn.discordapp.com/attachments/1412785659864940686/1412785662205362319/image.png?ex=68b98eae&is=68b83d2e&hm=3d971f642220825725a96fb0517509858a321f819933748430e3f14f60662adf& https://cdn.discordapp.com/attachments/1412785659864940686/1412785662628724756/image.png?ex=68b98eae&is=68b83d2e&hm=ac2d0ff3f90b3326f1b759c07e0991f371818b10e8b70f8864719350a52d6c2d&
v
Suggestion: Make sure your TransferCall tool includes a required
"destination"
property in its parameters, and that your SIP trunk supports SIP REFER. Here’s a sample configuration for the parameters section:
Copy code
json
"parameters": {
  "type": "object",
  "properties": {
    "destination": {
      "type": "string",
      "enum": ["+1234567890"], // Replace with your external number in E.164 format
      "description": "The destination to transfer the call to."
    }
  },
  "required": ["destination"]
}
Update your tool with this and check that SIP REFER is enabled on your telephony provider. [More details in the Vapi documentation](https://docs.vapi.ai/call-forwarding) Sources: - [Vapi documentation: call forwarding](https://docs.vapi.ai/call-forwarding) - [Vapi SIP Trunking Telnyx external number call forwarding troubleshooting (Discord)](https://discord.com/channels/1211482211119796234/1372460612499804270)
g
Hello, I have adjusted it accordingly. I added an additional Function Node with Destination as per your description and also included the Destination in the n8n Response Webhook node. For the Transfer Call, I set up with an If Node and Webhhook response, but it still doesn’t seem to work correctly. It doesn’t hang up right away, but the call forwarding isn’t working. rgds Gerals https://cdn.discordapp.com/attachments/1412785659864940686/1412810424218288149/image.png?ex=68b9a5bd&is=68b8543d&hm=7452cfade133f8050e09b6fe7ac44a5e4bf7897ed44edda2c055d9e0535fd045& https://cdn.discordapp.com/attachments/1412785659864940686/1412810424776134726/image.png?ex=68b9a5be&is=68b8543e&hm=dfc0efc9591d3ef27f1ed661f2fcad1285183c6b04da63aae60d0550d4c1cf6d& https://cdn.discordapp.com/attachments/1412785659864940686/1412810425392824343/image.png?ex=68b9a5be&is=68b8543e&hm=6a135e347723f29583615ad53dae0377fac89ae04006c4ee0fca33d4edebcb3f& https://cdn.discordapp.com/attachments/1412785659864940686/1412810426126962839/image.png?ex=68b9a5be&is=68b8543e&hm=f84702cb1f165e0181464f7529375254dfb32b69d1b08fa66039c72ee0a66edd& https://cdn.discordapp.com/attachments/1412785659864940686/1412810426613366806/image.png?ex=68b9a5be&is=68b8543e&hm=cb679a3f69323f1714e544e60f4d19b91ebb2ee7ccf46e1095ace45ca01da2d0& https://cdn.discordapp.com/attachments/1412785659864940686/1412810427305299968/image.png?ex=68b9a5be&is=68b8543e&hm=a7ac7ae3a915c31f09bb79235b3579643ea1a7e416822222d86caf3eef96bf22& https://cdn.discordapp.com/attachments/1412785659864940686/1412810427951349951/image.png?ex=68b9a5be&is=68b8543e&hm=ea6e7d30376153a8b15e9b5db23e62ae1c6b432ef7d9b59080591352387bc965&
c
Hello, You may need to ensure the correct format in your webhook response. Here's how to structure it: 1. The webhook response must include the
transferCall
function with the proper destination format:
Copy code
{  "function": {    "name": "transferCall",    "parameters": {      "destination": "+491234567890"  // Full phone number with country code    }  }}
Key points to check: - Ensure the destination number includes the country code (+49 for Germany) - Verify the function name is exactly "transferCall" - Check that your If Node conditions are properly routing to the transfer response - Make sure the Webhook response is properly formatted JSON[1](https://docs.vapi.ai/call-forwarding) For debugging: 1. Check your webhook logs to confirm the response format 2. Verify the destination number is accessible 3. Ensure there are no syntax errors in your JSON response
g
Thank you! I’ve implemented the changes over the last few days. I added the data in the response webhook. One key question remains: should I use the Transfer Tool as a prebuilt template, or use a Function as the transfer tool instead? If I use the prebuilt “Transfer Call”, I need to leave the Destination and Number fields empty ? Right?? because I pass them via the webhook. However, it seems I can’t get the Destination handed over to Vapi in a way that it’s actually picked up https://cdn.discordapp.com/attachments/1412785659864940686/1413814135203958874/image.png?ex=68bd4c85&is=68bbfb05&hm=7cca4a614b8317b3d8f66f6b9dd966fd4f2dca2de98b515267f851346661a004& https://cdn.discordapp.com/attachments/1412785659864940686/1413814135560605736/image.png?ex=68bd4c85&is=68bbfb05&hm=26e305305fc60fdb3f1a84c19e4774289baaef0641f3c8d06fe8716ccb9fd2c5& https://cdn.discordapp.com/attachments/1412785659864940686/1413814135933632622/image.png?ex=68bd4c85&is=68bbfb05&hm=34acdeaee3aec42529b07cffba7c6dfa0679b802528208ed47c6e34e8e4502b2&
Key points: In the response webhook, ensure that destination also includes the transfer core and the +43 prefix for Austria. The function is named ‘transfer call’; I ran several tests and verified the function name. The IF node at the end of the workflow already passes its output to the response. The webhook response is formatted as JSON.
thank you, the issue was in the twilio settings
c
Glad you were able to get this resolved. If anything else comes up or you need further assistance, we’re here to help.
3 Views