Call Forwarding
# support
j
I'm trying to get how the call forwarding works in Vapi, and I want to make sure I'm getting it well. The steps I should follow if I want that my assistant forward a call are: * Use the transferCall tool and add the instructions in the assistant's prompt to forward the call. * Set up the Server URL and activate the transfer-destination-request events. * In my server, when I receive a message from the transfer-destination-request webhook, create my logic and return a response to that webhook with the number to forward. Is this process correct? Also, is it possible to have a different Server URL only for these events?
v
message has been deleted
@Juan Yes, you've got the basic process for call forwarding in Vapi quite right! Here's a brief overview to confirm your understanding: 1. Use the
transferCall
tool within your assistant's prompt to initiate the call transfer process. 2. Configure your Server URL to handle
transfer-destination-request
events. This URL will receive webhooks from Vapi when a transfer is initiated. 3. When your server receives a
transfer-destination-request
webhook, implement your logic to determine the forwarding number or SIP URI. 4. Respond to the webhook with the destination number or SIP URI where the call should be forwarded. Regarding your question about having a different Server URL specifically for
transfer-destination-request
events, Vapi typically expects a single Server URL to handle all event webhooks. However, within your server logic, you can differentiate between event types and handle them accordingly. If you require a separate Server URL for organizational or technical reasons, please ask support for more info on this, as it may depend on specific configurations or updates to Vapi's capabilities that are not covered in the general documentation.
You can continue this conversation by mentioning me in the message.
j
@Vapi Just to be clear, does the transferCall tool initiate the call transfer automatically? or does it set up the option to forward the call to a different phone number based on the conversation with the customer and the instructions in the call prompt? Because I need the option number 2
v
@Juan The
transferCall
tool sets up the option to forward the call to a different phone number based on the conversation with the customer and the instructions in the call prompt. It does not initiate the call transfer automatically; instead, it allows you to define conditions under which the call should be transferred. For example, you can program your assistant to use the
transferCall
function when certain criteria are met during the interaction with the customer, such as when a specific request is made or a particular issue is identified that requires escalation to a human operator.
s
@Juan Yes the process you have mentioned you is correct and you can use different server urls for assistants. FYI: for transfer call it it not mandatory to use
transfer-destination-request
unless you want to set dynamic destinations for the call transfers.
Do let me know if you have more questions and require further help
u
Did you get this working for dynamic transfers @Juan ? I have the bare bones working but am unsure what the correct structure to return for the transfer and initial the call, i thought it was @Shubham Bajaj
Copy code
{
  "messageResponse": {
    "destination": {
      "type": "number",
      "message": "transfer",
      "number": "+610000000",
      "numberE164CheckEnabled": true
    }
  }
}
*I am getting successful transfer however, the call is never connected and it just ends. * "role": "bot", "message": "Hello, Stuart. Nice to speak with you. Would you like to connect connect with today?", "time": 1734991530785, "end_time": 1734991535205, "seconds_from_start": 7.39, "duration": 4100, "source": "" }, { "role": "user", "message": "Operations, please.", "time": 1734991535875, "end_time": 1734991537175, "seconds_from_start": 12.48, "duration": 1300 }, { "tool_calls": [ { "id": "call_zj6Ab1bE3PygGblg5UtLtLOs", "type": "function", "function": { "name": "transferCall", "arguments": "{}" } } ], "role": "tool_calls", "message": "", "time": 1734991537518, "seconds_from_start": 13.134 }, { "role": "bot", "message": "Transferring the call now.", "time": 1734991537945, "end_time": 1734991539255, "seconds_from_start": 14.55, "duration": 1310, "source": "" }, { "role": "tool_call_result", "time": 1734991540570, "seconds_from_start": 16.186, "name": "transferCall", "result": "Success.", "tool_call_id": "call_zj6Ab1bE3PygGblg5UtLtLOs" } Any ideas? https://cdn.discordapp.com/attachments/1311116342698704949/1320876682046865465/image.png?ex=676b31c5&is=6769e045&hm=0d7636941d21451473e14e876e0471feb16ca8c2f28e2e4f58e8952a3e800549&
s
@~Stu~ CoreAspect.Agency Sorry for the late response. Are you still experiencing this problem? If so, could you share the following info in a new #1211483291191083018 ticket: - The recent call ID - When exactly this happened (the timestamp) - What response you expected to get - What response you actually got instead This would really help me figure out what went wrong!
20 Views