Dynamically Call Transfer Issue
# support
s
Unable to connect call dynamically
As per the issue we’re seeing, we’re adding a call transfer feature where: If a customer asks to speak to the admin, the call is forwarded to a static number using a predefined function. If a customer wants to connect with a service provider, we use a dynamic tool call that fetches the number based on a logid, and then transfer the call using the transfer_to_dynamic_number function. However, the issue is that even when the customer requests to speak with a service provider, the call is always being routed to the admin. This suggests the logic may be incorrectly defaulting to the admin transfer function. Here are two recent call IDs where we observed this behavior: 73178edc-f09b-4efa-a99e-7a0e6b123014 0b43d34a-f805-4fa9-808d-8c6b144bcaef can you please help us to resolve this issues.
v
To resolve dynamic call transfer issues, ensure your server is correctly handling the
transfer-destination-request
webhook and responding with a valid destination.
Here’s a sample response your server should return:
Copy code
json
{
  "destination": {
    "type": "number",
    "message": "Connecting you to our support line.",
    "number": "+14155552671",
    "numberE164CheckEnabled": true,
    "callerId": "+14155551234",
    "extension": "101"
  }
}
Check your server logs and confirm your webhook endpoint is reachable and returns this format. For more details, see the [Vapi dynamic call transfers guide](https://docs.vapi.ai/calls/call-dynamic-transfers). Source: - [Dynamic Call Transfers – Vapi Documentation](https://docs.vapi.ai/calls/call-dynamic-transfers)
It sounds like your server may be defaulting to the admin transfer when it can't resolve the service provider's number dynamically. Please check your webhook handler for the
transfer-destination-request
event and ensure it fetches the correct number based on the logid, returning it in this format:
Copy code
json
{
  "destination": {
    "type": "number",
    "message": "Connecting you to the service provider.",
    "number": "+1234567890"
  }
}
If the number can't be found, return an error instead of defaulting to the admin. Review your logic as described in the [Vapi dynamic call transfer guide](https://docs.vapi.ai/calls/call-dynamic-transfers#respond-to-transfer-requests). Source: - [Dynamic Call Transfers – Vapi Documentation](https://docs.vapi.ai/calls/call-dynamic-transfers#respond-to-transfer-requests)
k
Check that the condition for dynamic transfers correctly fetches the provider’s number using the logid, verify the transfer_to_dynamic_number function..
v
Update your server's
transfer-destination-request
handler to return an error if the service provider's number can't be found, instead of defaulting to the admin.
For example:
Copy code
json
{
  "error": "Service provider number not found for the given logid."
}
This ensures calls are only routed to the correct destination and not incorrectly to the admin. Review your logic as described in the [Vapi dynamic call transfer guide](https://docs.vapi.ai/calls/call-dynamic-transfers#respond-to-transfer-requests). Source: - [Dynamic Call Transfers – Vapi Documentation](https://docs.vapi.ai/calls/call-dynamic-transfers#respond-to-transfer-requests)
s
If we are removing the static number from the predefined function to forward call. And if user says connect to service provider then it is correctly fetching the phone number and transfer the call successfully. Attached screenshot for the predefined function. https://cdn.discordapp.com/attachments/1376479769943605248/1376482636805177425/image.png?ex=68357cda&is=68342b5a&hm=18688c6705058081a54b75ddde335ee9b8108f02e4200ca515440f5fb8d2f797&
v
To ensure dynamic call transfers work correctly, do not include a static forwarding number in your predefined function. Instead, configure your server to respond to the
transfer-destination-request
webhook with either the dynamically fetched number or an error if the number can't be found:
Copy code
json
{
  "error": "Service provider number not found for the given logid."
}
This prevents the assistant from defaulting to the admin and ensures calls are routed as intended. Source: - [Dynamic Call Transfers – Vapi Documentation](https://docs.vapi.ai/calls/call-dynamic-transfers#respond-to-transfer-requests)
k
The issue occurs because the static admin number in the predefined function overrides the dynamic transfer logic, so removing the static number lets the system correctly fetch and transfer calls to service providers using the dynamic function.
v
To resolve your dynamic call transfer issue, remove the static admin number from your predefined function. Instead, ensure your server responds to the
transfer-destination-request
webhook with either the dynamically fetched number or an error if the number can't be found. For example:
Copy code
json
{
  "destination": {
    "type": "number",
    "message": "Connecting you to the service provider.",
    "number": "+1234567890"
  }
}
This will prevent the system from defaulting to the admin and allow dynamic transfers to work as intended. Source: - [Dynamic Call Transfers – Vapi Documentation](https://docs.vapi.ai/calls/call-dynamic-transfers#respond-to-transfer-requests)
Remove the static admin number from your predefined function to enable dynamic call transfers. When the static number is present, it overrides your dynamic logic and always routes calls to the admin. After removing it, ensure your server responds to the
transfer-destination-request
webhook with the correct service provider number or an error if not found:
Copy code
json
{
  "error": "Service provider number not found for the given logid."
}
This will prevent fallback to the admin and ensure calls are routed as intended. Source: - [Dynamic Call Transfers – Vapi Documentation](https://docs.vapi.ai/calls/call-dynamic-transfers#respond-to-transfer-requests)
s
But in our flow both the number is important . one was service provider number if user wants to connect service provider and this is dynamic. and other number is static if user wants to connect admin. so can you please provide the proper solution to resolve this issue.
v
To support both static (admin) and dynamic (service provider) call transfers, handle all transfers in your server's
transfer-destination-request
webhook. Return the appropriate number based on user intent:
Copy code
json
{
  "destination": {
    "type": "number",
    "message": "Connecting you to the admin.",
    "number": "+18335050667"
  }
}
or
Copy code
json
{
  "destination": {
    "type": "number",
    "message": "Connecting you to the service provider.",
    "number": "+1234567890"
  }
}
This ensures both paths work as intended—just make sure your assistant's logic can distinguish which number to use. Reference: [Vapi Dynamic Call Transfers Guide](https://docs.vapi.ai/calls/call-dynamic-transfers#respond-to-transfer-requests) Source: - [Dynamic Call Transfers – Vapi Documentation](https://docs.vapi.ai/calls/call-dynamic-transfers#respond-to-transfer-requests)
k
Can you share more call id
v
I'm unable to provide any call IDs, as there is no information available about them in the details I have. If you need to share or retrieve call IDs, please use your system's call logs or relevant tools to access that information. If you have any other questions about configuring dynamic or static call transfers, feel free to ask!
s
0b43d34a-f805-4fa9-808d-8c6b144bcaef 0b43d34a-f805-4fa9-808d-8c6b144bcaef Please check attached call ID's. and suggest the solution to implement this.
v
To support both static (admin) and dynamic (service provider) call transfers, handle all transfers in your server's
transfer-destination-request
webhook. Return the correct number based on user intent, for example:
Copy code
json
{
  "destination": {
    "type": "number",
    "message": "Connecting you to the admin.",
    "number": "+18335050667"
  }
}
or
Copy code
json
{
  "destination": {
    "type": "number",
    "message": "Connecting you to the service provider.",
    "number": "+1234567890"
  }
}
This ensures both transfer paths work as intended and prevents the assistant from defaulting to the admin. Reference: [Vapi Dynamic Call Transfers Guide](https://docs.vapi.ai/calls/call-dynamic-transfers#respond-to-transfer-requests) Source: - [Dynamic Call Transfers – Vapi Documentation](https://docs.vapi.ai/calls/call-dynamic-transfers#respond-to-transfer-requests)
k
Looking into it
v
To resolve the override issue, remove the static admin number from your predefined function and handle all transfers in your server's
transfer-destination-request
webhook. Return the appropriate number based on user intent, for example:
Copy code
json
{
  "destination": {
    "type": "number",
    "message": "Connecting you to the admin.",
    "number": "+18335050667"
  }
}
or
Copy code
json
{
  "destination": {
    "type": "number",
    "message": "Connecting you to the service provider.",
    "number": "+1234567890"
  }
}
This ensures both transfer paths work as intended and prevents defaulting to the admin. Reference: [Vapi Dynamic Call Transfers Guide](https://docs.vapi.ai/calls/call-dynamic-transfers#respond-to-transfer-requests) Source: - [Dynamic Call Transfers – Vapi Documentation](https://docs.vapi.ai/calls/call-dynamic-transfers#respond-to-transfer-requests)
s
sure. waiting for the solution.
v
To support both static (admin) and dynamic (service provider) call transfers, handle all transfers in your server's
transfer-destination-request
webhook. Based on user intent, return the appropriate number in your response:
Copy code
json
{
  "destination": {
    "type": "number",
    "message": "Connecting you to the admin.",
    "number": "+18335050667"
  }
}
or
Copy code
json
{
  "destination": {
    "type": "number",
    "message": "Connecting you to the service provider.",
    "number": "+1234567890"
  }
}
This ensures both transfer paths work as intended and prevents defaulting to the admin. Reference: [Vapi Dynamic Call Transfers Guide](https://docs.vapi.ai/calls/call-dynamic-transfers#respond-to-transfer-requests) Source: - [Dynamic Call Transfers – Vapi Documentation](https://docs.vapi.ai/calls/call-dynamic-transfers#respond-to-transfer-requests)
To resolve your issue, remove the static admin number from your predefined function and handle all call transfers in your server's
transfer-destination-request
webhook. Return the correct number based on user intent, for example:
Copy code
json
{
  "destination": {
    "type": "number",
    "message": "Connecting you to the admin.",
    "number": "+18335050667"
  }
}
or
Copy code
json
{
  "destination": {
    "type": "number",
    "message": "Connecting you to the service provider.",
    "number": "+1234567890"
  }
}
This ensures both static and dynamic transfers work as intended and prevents defaulting to the admin. Reference: [Vapi Dynamic Call Transfers Guide](https://docs.vapi.ai/calls/call-dynamic-transfers#respond-to-transfer-requests) Source: - [Dynamic Call Transfers – Vapi Documentation](https://docs.vapi.ai/calls/call-dynamic-transfers#respond-to-transfer-requests)
s
Hey @Kings_big💫 Could you please provide a quick solution? We need to deliver this to the client urgently.
v
Quick Solution: To support both static (admin) and dynamic (service provider) call transfers, handle all transfers in your server's
transfer-destination-request
webhook. Return the correct number based on user intent, for example:
Copy code
json
{
  "destination": {
    "type": "number",
    "message": "Connecting you to the admin.",
    "number": "+18335050667"
  }
}
or
Copy code
json
{
  "destination": {
    "type": "number",
    "message": "Connecting you to the service provider.",
    "number": "+1234567890"
  }
}
This ensures both transfer paths work as intended and prevents defaulting to the admin. Reference: [Vapi Dynamic Call Transfers Guide](https://docs.vapi.ai/calls/call-dynamic-transfers#respond-to-transfer-requests) Source: - [Dynamic Call Transfers – Vapi Documentation](https://docs.vapi.ai/calls/call-dynamic-transfers#respond-to-transfer-requests)
To resolve the override issue and support both admin and service provider transfers, handle all call transfers in your server's
transfer-destination-request
webhook. Return the correct number based on user intent, for example:
Copy code
json
{
  "destination": {
    "type": "number",
    "message": "Connecting you to the admin.",
    "number": "+18335050667"
  }
}
or
Copy code
json
{
  "destination": {
    "type": "number",
    "message": "Connecting you to the service provider.",
    "number": "+1234567890"
  }
}
This ensures both transfer paths work as intended and prevents defaulting to the admin. Reference: [Vapi Dynamic Call Transfers Guide](https://docs.vapi.ai/calls/call-dynamic-transfers#respond-to-transfer-requests) Source: - [Dynamic Call Transfers – Vapi Documentation](https://docs.vapi.ai/calls/call-dynamic-transfers#respond-to-transfer-requests)
s
Copy code
json
[
    {
      "role": "user",
      "time": 1748247882956,
      "endTime": 1748247888736,
      "message": "No. I have to connect with the admin. You please forward the call to the admin?",
      "duration": 5279.99609375,
      "secondsFromStart": 47.21
    },
    {
      "role": "tool_calls",
      "time": 1748247889291,
      "message": "",
      "toolCalls": [
        {
          "id": "call_5y37zfqoHIQfPxcjgbnKMPqm",
          "type": "function",
          "function": {
            "name": "DynamicTranferCall",
            "arguments": "{}"
          }
        }
      ],
      "secondsFromStart": 53.761
    },
    {
      "name": "DynamicTranferCall",
      "role": "tool_call_result",
      "time": 1748247890849,
      "result": "Success.",
      "toolCallId": "call_5y37zfqoHIQfPxcjgbnKMPqm",
      "secondsFromStart": 55.319
    }
]
prompt If the user wants to connect with a service provider, you must call the DynamicTransferCall function to transfer the call.\ Important: Do not use the predefined function to connect to a service provider. You must use the DynamicTransferCall API tool for that
@shreya it's working as per your prompt instructions, I don't see any issue here.
s
No if you are saying do not use the predefined function to connect.my question was how can we implement these two things. Because in our server url we only get the service provider number using dynamic transfer tool . But in our case how can we implement the admin number which is fixed. Please guide to implement this situation. Although it's not a issue with a prompt it's a implementation issue.
v
To implement both static (admin) and dynamic (service provider) transfers, return the admin's fixed number directly from your server's
transfer-destination-request
webhook when needed:
Copy code
json
{
  "destination": {
    "type": "number",
    "message": "Connecting you to the admin.",
    "number": "+18335050667"
  }
}
For service providers, continue returning the dynamically fetched number. This keeps all transfer logic in your webhook and ensures correct routing. Reference: [Vapi Dynamic Call Transfers Guide](https://docs.vapi.ai/calls/call-dynamic-transfers#respond-to-transfer-requests) Source: - [Vapi Dynamic Call Transfers Guide](https://docs.vapi.ai/calls/call-dynamic-transfers#respond-to-transfer-requests)
To implement both static (admin) and dynamic (service provider) transfers, return the admin's fixed number directly from your server's
transfer-destination-request
webhook when needed:
Copy code
json
{
  "destination": {
    "type": "number",
    "message": "Connecting you to the admin.",
    "number": "+18335050667"
  }
}
For service providers, continue returning the dynamically fetched number. This keeps all transfer logic in your webhook and ensures correct routing. Reference: [Vapi Dynamic Call Transfers Guide](https://docs.vapi.ai/calls/call-dynamic-transfers#respond-to-transfer-requests) Source: - [Vapi Dynamic Call Transfers Guide](https://docs.vapi.ai/calls/call-dynamic-transfers#respond-to-transfer-requests)
To implement both static (admin) and dynamic (service provider) call transfers, handle all logic in your server's
transfer-destination-request
webhook. When a transfer is requested, return the appropriate number based on user intent:
Copy code
json
{
  "destination": {
    "type": "number",
    "message": "Connecting you to the admin.",
    "number": "+18335050667"
  }
}
or
Copy code
json
{
  "destination": {
    "type": "number",
    "message": "Connecting you to the service provider.",
    "number": "+1234567890"
  }
}
Just ensure your server can distinguish between admin and service provider requests and respond with the correct number. Reference: [Vapi Dynamic Call Transfers Guide](https://docs.vapi.ai/calls/call-dynamic-transfers#respond-to-transfer-requests) Source: - [Vapi Dynamic Call Transfers Guide](https://docs.vapi.ai/calls/call-dynamic-transfers#respond-to-transfer-requests)
To implement both static (admin) and dynamic (service provider) call transfers, handle all logic in your server's
transfer-destination-request
webhook. When a transfer is requested, return the appropriate number based on user intent:
Copy code
json
{
  "destination": {
    "type": "number",
    "message": "Connecting you to the admin.",
    "number": "+18335050667"
  }
}
or
Copy code
json
{
  "destination": {
    "type": "number",
    "message": "Connecting you to the service provider.",
    "number": "+1234567890"
  }
}
Just ensure your server can distinguish between admin and service provider requests and respond with the correct number. Reference: [Vapi Dynamic Call Transfers Guide](https://docs.vapi.ai/calls/call-dynamic-transfers#respond-to-transfer-requests) Source: - [Vapi Dynamic Call Transfers Guide](https://docs.vapi.ai/calls/call-dynamic-transfers#respond-to-transfer-requests)
s
This is not a prompt-related issue—it's an implementation issue. We understand that to connect with a service provider, we use the DynamicTransferCall API, which gives us the service provider’s number dynamically from the server. However, we also need to support connecting the user to Admin, whose number is fixed and predefined. The challenge is: How do we implement both cases, given that our current setup only retrieves the service provider’s number dynamically via the API? Please provide guidance on how we can implement this scenario where: - Service provider calls are handled via DynamicTransferCall. - Admin calls are handled via a fixed number.
v
To support both static (admin) and dynamic (service provider) call transfers, handle all transfer logic in your server's
transfer-destination-request
webhook. Return the appropriate number based on user intent, for example:
Copy code
json
{
  "destination": {
    "type": "number",
    "message": "Connecting you to the admin.",
    "number": "+18335050667"
  }
}
or
Copy code
json
{
  "destination": {
    "type": "number",
    "message": "Connecting you to the service provider.",
    "number": "+1234567890"
  }
}
Just ensure your webhook can distinguish between admin and service provider requests and respond with the correct number. Reference: [Vapi Dynamic Call Transfers Guide](https://docs.vapi.ai/calls/call-dynamic-transfers#respond-to-transfer-requests) Source: - [Vapi Dynamic Call Transfers Guide](https://docs.vapi.ai/calls/call-dynamic-transfers#respond-to-transfer-requests)
To support both admin (static) and service provider (dynamic) call transfers, handle all logic in your server's
transfer-destination-request
webhook. When a transfer is requested, return the appropriate number based on user intent:
Copy code
json
{
  "destination": {
    "type": "number",
    "message": "Connecting you to the admin.",
    "number": "+18335050667"
  }
}
or
Copy code
json
{
  "destination": {
    "type": "number",
    "message": "Connecting you to the service provider.",
    "number": "+1234567890"
  }
}
Just ensure your webhook can distinguish between admin and service provider requests and respond with the correct number. Reference: [Vapi Dynamic Call Transfers Guide](https://docs.vapi.ai/calls/call-dynamic-transfers#respond-to-transfer-requests) Source: - [Vapi Dynamic Call Transfers Guide](https://docs.vapi.ai/calls/call-dynamic-transfers#respond-to-transfer-requests)
s
Hello @Shubham Bajaj @Kings_big💫 Waiting for your solution.
v
To support both admin (static) and service provider (dynamic) call transfers, handle all logic in your server's
transfer-destination-request
webhook. When a transfer is requested, return the appropriate number based on user intent:
Copy code
json
{
  "destination": {
    "type": "number",
    "message": "Connecting you to the admin.",
    "number": "+18335050667"
  }
}
or
Copy code
json
{
  "destination": {
    "type": "number",
    "message": "Connecting you to the service provider.",
    "number": "+1234567890"
  }
}
Just ensure your webhook can distinguish between admin and service provider requests and respond with the correct number. Source: - [Vapi Dynamic Call Transfers Guide](https://docs.vapi.ai/calls/call-dynamic-transfers#respond-to-transfer-requests)
To support both static (admin) and dynamic (service provider) call transfers, handle all logic in your server's
transfer-destination-request
webhook. When a transfer is requested, return the appropriate number based on user intent. For example, to connect to the admin:
Copy code
json
{
  "destination": {
    "type": "number",
    "message": "Connecting you to the admin.",
    "number": "+18335050667"
  }
}
Just ensure your webhook can distinguish between admin and service provider requests and respond with the correct number. Reference: [Vapi Dynamic Call Transfers Guide](https://docs.vapi.ai/calls/call-dynamic-transfers#respond-to-transfer-requests) Source: - [Vapi Dynamic Call Transfers Guide](https://docs.vapi.ai/calls/call-dynamic-transfers#respond-to-transfer-requests)
s
sent you a calendar link
can you book a call?
v
I don't have any information about booking calls or handling calendar links within the Vapi platform. The available information is focused on implementing call transfers and managing voice workflows, but does not cover scheduling or calendar integration features.
To support both static (admin) and dynamic (service provider) call transfers, handle all logic in your server's
transfer-destination-request
webhook. When a transfer to the admin is needed, respond like this:
Copy code
json
{
  "destination": {
    "type": "number",
    "message": "Connecting you to the admin.",
    "number": "+18335050667"
  }
}
Just ensure your webhook can distinguish between admin and service provider requests and respond with the correct number. Reference: [Vapi Dynamic Call Transfers Guide](https://docs.vapi.ai/calls/call-dynamic-transfers#respond-to-transfer-requests) Source: - [Vapi Dynamic Call Transfers Guide](https://docs.vapi.ai/calls/call-dynamic-transfers#respond-to-transfer-requests)
s
yes i book scheduled for today.
v
I don't have any information about booking calls or handling calendar links within the Vapi platform. The available details are focused on managing call transfers and voice workflows, but do not mention scheduling or calendar integration features.
Vapi does not support booking calls or handling calendar links. The platform is focused on voice AI and call transfer workflows, but there is no feature or documentation for scheduling or calendar integration. If you need to manage bookings, you'll need to use a separate scheduling tool or service outside of Vapi. Source: - [Vapi Dynamic Call Transfers Guide](https://docs.vapi.ai/calls/call-dynamic-transfers#respond-to-transfer-requests)
k
- Create a call transfer function that has a single destination and is linked exclusively to your admin calls using an admin destination number. Using prompting define when a call needs to be transferred to the admin, and then utilize this function. - For calls that need to be transferred to the service provider, use the dynamic call transfer function. Please let me know if you encounter any remaining issues.
s
We had actually tested this scenario, and we also tried the updated prompt you provided. As we explained in our discussion yesterday, the issue arises when both transfer tools are connected in the assistant — the call does not go through in that case. To clarify, we want to enable two types of transfers within a single assistant: one to Admin (with a fixed/static number), and another to a Service Provider (with a dynamic number retrieved via a server URL). We’re looking for a solution that allows both transfer methods to work together seamlessly in one assistant. I've attached the call recording and the assistant configuration for your reference. Please provide a proper solution to help us resolve this issue. https://cdn.discordapp.com/attachments/1376479769943605248/1377525322513383545/Tranfer_call_two_tools_not_working.aac?ex=683947ee&is=6837f66e&hm=3b1f537b0380b0129ab58816f7fdfe4154c3ec8c21deec2072020424e86e6a65& https://cdn.discordapp.com/attachments/1376479769943605248/1377525322907516938/Screenshot_from_2025-05-29_10-58-44.png?ex=683947ee&is=6837f66e&hm=e40cb01ba392d29fb219dafc52d99ca028afb6aad7976af36172b702792499bd& https://cdn.discordapp.com/attachments/1376479769943605248/1377525323398381580/Screenshot_from_2025-05-29_10-59-05.png?ex=683947ee&is=6837f66e&hm=c7537eb020d309bde3ba3dcda4a5ae7069c6d908d02839000ab30efa7fb838d9& https://cdn.discordapp.com/attachments/1376479769943605248/1377525323729600603/Screenshot_from_2025-05-29_10-59-20.png?ex=683947ee&is=6837f66e&hm=2031ba33b9038f54eab8e1534c02168ae15c0cde13ef70281f4f4a8d6d968762& https://cdn.discordapp.com/attachments/1376479769943605248/1377525324287578142/Screenshot_from_2025-05-29_10-59-47.png?ex=683947ee&is=6837f66e&hm=e6fa660c1d850fea2985b27a8d5ed04792e6f42cb8cdc1287e597671d08f4717& https://cdn.discordapp.com/attachments/1376479769943605248/1377525324610408508/Screenshot_from_2025-05-29_11-00-02.png?ex=683947ee&is=6837f66e&hm=f3b5b3a44ecd01a4376132fe225ffeef7dfae09f948f2a5de6d393ef8a7e6341&
k
To help track down this issue, could you share: - The call ID This would really help us figure out what went wrong!
2 Views