Dynamic Call Transfers using the server URL:
# support
u
Ok so I thought I would get this one ticked off once and for all and have done a complete test - - which I will details here: I cant transfer using the dynamic transfer, it says that its done has transferred the call - however... no actual transfer happens and the assistant hangs up. I have shared some screen shots that show the flow, and the response to webhook with the number i want to call. If i add an incorrect number to the transfer server response it wont transfer the call, and says there is an error... and when i enter a valid number it hangs up and says its transferred, however I never get the transfer to happen, and it hangs up. thanks assistant ID: f625a60e-968f-4565-8835-0b0018b7f883 tool ID for the transfer: 1e9f7f1d-9663-4160-bf4d-f5ab8f76d8dd The recent call ID: 275e96a9-1e72-48c4-97d5-a1b522f45c42 Shubham Bajaj — 1/7/25, 9:06 AM @Stu [~Core Aspect AI~] Sorry for the late response. Are you still experiencing this problem? If so, could you share the following info in a new ⁠support ticket: The recent call ID: 275e96a9-1e72-48c4-97d5-a1b522f45c42 When exactly this happened (the timestamp): { "role": "tool_calls", "time": 1737187827726, "message": "", "toolCalls": [ { "id": "call_KpuU0GEdsK5v9XQWybu56msJ", "type": "function", "function": { "name": "transferCall", "arguments": "{}" } } ], "secondsFromStart": 16.044 } { "name": "transferCall", "role": "tool_call_result", "time": 1737187829283, "result": "Success.", "toolCallId": "call_KpuU0GEdsK5v9XQWybu56msJ", "secondsFromStart": 17.601 } What response you expected to get: - a transfer What response you actually got instead - a hang-up Let me know if you need further details ( I am in Australia btw, and I am using Twilio as the telephone provider). https://cdn.discordapp.com/attachments/1330092161835733013/1330092162045444116/63154FFA-7805-4141-990F-7380AE35EA72.png?ex=678cb85b&is=678b66db&hm=b4a3ec0a69928adc2f4c019a8c017c70e2b528a2fc86d2dac0e32633ea806710& https://cdn.discordapp.com/attachments/1330092161835733013/1330092162339176491/72BD38BC-189B-4C41-AED1-3983C3DC9D1A.png?ex=678cb85b&is=678b66db&hm=77f20ebf3e0779c8bf08eba7ed492e90afa1876495d585b874c014b5e5f6cd2a& https://cdn.discordapp.com/attachments/1330092161835733013/1330092162674855957/image.png?ex=678cb85b&is=678b66db&hm=680dc51a2195ba3ed13423227292ef69437daa74ae2d84b8e6d5ed004314c9cf&
v
@~Stu~ CoreAspect.Agency I'm sorry to hear that you're experiencing issues with the dynamic transfer feature. It sounds like you've done a thorough test and provided detailed information, which is very helpful. To address the issue, I would need to check a few things: 1. The configuration of the transfer tool to ensure it's set up correctly. 2. The webhook response to confirm that it's providing the correct number format for the transfer. 3. The logs to see if there are any errors or additional information that might indicate what's going wrong. Since you've mentioned that the call hangs up and says it's transferred when a valid number is entered, it seems like the transfer command is being recognized but not executed as expected. Could you please provide the webhook response with the number you want to call? This will help me understand if the format is correct and if there are any issues with the number itself. Additionally, if you could confirm that the number you're trying to transfer to is correctly set up in Twilio and is capable of receiving calls, that would be helpful. Once I have this information, I'll be able to assist you further. If you need immediate assistance, please don't hesitate to create a new support ticket with all the details you've provided here, and our team will look into it as soon as possible.
You can continue this conversation by mentioning me in the message.
u
@Shubham Bajaj
webhook response I send back: (number changed for privacy reasons) . { "messageResponse": { "destination": { "type": "number", "message": "let's get it on!", "number": "+61xxxxxxxxx", "numberE164CheckEnabled": true } } }
v
Got it. Tagging @User for additional help.
h
I just made a post in support before seeing this, same result for me although I am just using the built in transfer function, logs say everything worked and transferred but it just hangs up
s
@~Stu~ CoreAspect.Agency You have enabled the server event **'phone-call-control**'. This event allows you to handle call transfers instead of Vapi. Because of this, calls were not being transferred but only marked as forwarded. Remove this from your assistant and try again - it should work properly. https://cdn.discordapp.com/attachments/1330092161835733013/1330798013404282892/Screenshot_2025-01-20_at_12.44.31.png?ex=678f49bb&is=678df83b&hm=d146c5ba9ceb3e33debbab2611abcf9ad9b5f8aa04070c0616d7cb58158f9992&
@Ham could you tag me to your support and share the recent call id.
u
@Shubham Bajaj does this mean I cant use the control url for injecting messages during the call? e.g new system messages etc?
i use this method to update the prompt, inject user data etc
s
You can use it, both things are different. This event decides who will control the transfer opposite from the live call control.
u
cool... that is good to know
s
@~Stu~ CoreAspect.Agency can i close this ticket now?
u
@Shubham Bajaj you can close this now - however, there are some things noted below that may be of interest. **Worked **(a valid "transfer-destination-request" status message is sent and a response sent back to Vapi) { "id": "490fcef7-dea2-4285-aeb1-fe7901c9797c", "createdAt": "2025-01-20T20:08:20.324Z", "updatedAt": "2025-01-20T20:08:20.324Z", "type": "transferCall", "orgId": "796b72dd-02c6-41ac-a7d5-e5faac03e7ea", "server": { "url": "https://hook.us2.make.com/xxxxxxxxxxx", "timeoutSeconds": 20 }, "async": false, "destinations": [] } Failed see image (not enough chars left for the json) https://cdn.discordapp.com/attachments/1330092161835733013/1330996141424119848/fail.jpg?ex=67900240&is=678eb0c0&hm=90e8f22e253a01e116b4104fd6a9328f51dfad0eadb175c30816f010e37c4635&
so with dynamic call transfers you cant, or at least i haven't found a way to send details on logical routes, eg within the tool call you cant specify the place you want to route, for example 'sales', or 'support' - and therefore depending on your situation can be a little difficult to manage. If you try to add these it will fail to send the 'transfer-destination-request'.
a
thanks for the info, appreciate it
s
@Alex Contreras @~Stu~ CoreAspect.Agency @Ham You can check out this document to learn about dynamic transfer destinations. If you find it useful, please let me know and I will add it to the documentation. https://vapi.notion.site/Dynamic-Call-Transfers-A-Step-by-Step-Guide-181008c8393f80d99a36f0965f570cf9?pvs=4
@~Stu~ CoreAspect.Agency What issue are you facing right now? Please let me know so I can help you better.
u
@Shubham Bajaj I am no longer having issues as I found a much better way to do dynamic transfers after one long day of experiments... I use a tool call and the control url in call to transfer using control call transfer logic to whatever I need based on the tool arguments 😁 it's pretty cool.
@Shubham Bajaj you can connect to assistants as the destination? Woa, now I need to test this because theoretically this means I can build specific assistant post transfer on the fly cool shiz
Copy code
{
  "destination": {
    "type": "assistant",
    "message": "Connecting you to our support assistant.",
    "assistantName": "SupportAssistant",
    "transferMode": "rolling-history"
  }
}
I am still finding the dynamic transfer to an assistant doesnt work using your method outlined in the document: call ID: fdfc9cc7-79cd-4977-901d-ae0c8f0f1f25
Copy code
{
  "id": "7d5708e2-2559-44be-acc5-eff0866aef52",
  "createdAt": "2025-01-21T23:39:07.418Z",
  "updatedAt": "2025-01-21T23:39:07.418Z",
  "type": "transferCall",
  "function": {
    "name": "dynamicDestinationTransferCall"
  },
  "orgId": "796b72dd-02c6-41ac-a7d5-e5faac03e7ea",
  "destinations": []
}
https://cdn.discordapp.com/attachments/1330092161835733013/1331414420785594480/C7D0F008-0A1B-422B-9F4F-388E030F4E1A.png?ex=679187ce&is=6790364e&hm=7a92a8431973c941f1b5160599f7c41e4a72702f41f04cb177c317ea472f6975& https://cdn.discordapp.com/attachments/1330092161835733013/1331414421058093096/E90A8F6D-57B4-4F33-82C1-A846C3F3B5E7.png?ex=679187ce&is=6790364e&hm=a49e8dfb9d0ea85e5e73c0f423f2e031b8ee34cff61c60f290c3ca89f116a324&
s
@~Stu~ CoreAspect.Agency your observation is 100% correct - the assistant destination transfer is not working. I have found a potential solution but need some time to confirm the alternative approach. Thank you @~Stu~ CoreAspect.Agency for bringing this to our attention.
u
All good brother, I always like to try to test all angles before presenting an issue. If you need me to test let me know. I'm well across this now... its the same with transfers using the call control url logic.
a
@Shubham Bajaj @~Stu~ CoreAspect.Agency Thanks both for your help, it's working now! But is it possible to pass a parameter inside the tool, like the reason for calling or something like that? I need to send that or the transcript of the conversation to Pinecone, and based on that request, I will get back the department or employee number to make the transfer
s
Yea the complete transcript it send to you server url .
a
@Shubham Bajaj but not with the transfer-destination-request
s
we do send it under the artifact object
a
you have an array of messages and each message is a collection
it's not like the end of call report's transcript
Just asking if that's how it's displayed, so I have to restructure it on my own, or if it should send a transcript like the structure in Notion
@Shubham Bajaj I also tried to get the call information using the call ID that's in there, but it doesn't have the transcript either
a
call ID: aadbe6b0-39d0-4229-b408-87d3638827c8 @User
s
a
@Shubham Bajaj Of course, no worries! I was wondering if it’s possible to add a property to this dynamic transfer tool—for example, reason_of_calling. Currently, I have an agent in Pinecone that retrieves the call transcript and, based on that, fetches the correct phone number to transfer the call. However, I’d like the AI voice agent to also send the reason_of_calling property so I don't have to use the whole conversation, similar to how it works in standard tools. Is that feasible?
s
Added to Feature Requests.
a
okay, thanks !@Shubham Bajaj
u
as i didn't want this to get lost in the thread, please let me know if you do and when you do find a solution for this 😉
@User @Shubham Bajaj did this one have an eta for resolution? Keen to use the dynamic call transfer to an assistant (not number) thanks
s
Stu dynamic call transfers for assistants is not possible as of now, you have to use squads for transferring b/w assistants.
2 Views