Assistant
# support
a
Hey there, How can I get my assistant to receive a call from a customer and then transfer that call to a specific number — one of the numbers registered in the transfer_call function that I want? If you can help me with this problem, I'd definitely appreciate it. Thanks!
v
To have your assistant receive a call and transfer it to a specific registered number, add the
transferCall
tool to your assistant with your desired numbers:
Copy code
json
{
  "tools": [
    {
      "type": "transferCall",
      "destinations": [
        { "type": "number", "number": "+1234567890", "message": "I am forwarding your call to Department A. Please stay on the line." }
      ],
      "function": { "name": "transferCall" }
    }
  ]
}
In your system prompt, instruct the assistant when to use each number (e.g., "If the user asks for sales, call the
transferCall
function with
+1234567890
."). This will let your assistant transfer calls to the specific number you want. Reference: [Vapi call forwarding documentation](https://docs.vapi.ai/call-forwarding) Source: - [Vapi Call Forwarding Documentation](https://docs.vapi.ai/call-forwarding)
k
Register phone numbers using the transferCall tool in your assistant’s config, then trigger the transfer by calling the function with the desired number, for dynamic routing, use a webhook to select the destination at runtime based on the conversation..
a
Hi @Kings_big💫 Thanks for reaching out to me. Could you send some sample code?
k
a
Hmm, actually, I've tried this content but it is definitely not working.🤔
Did you try like this once?
k
To register numbers for transferCall, add them in your assistant config, then call transferCall(number) in your logic, or use a webhook to choose the number dynamically at runtime. // Assistant config { "tools": { "transferCall": { "enabled": true, "phoneNumbers": { "support": "+12585", "sales": "+198765" } } } } // Static call transfer if (intent === 'speak_to_support') { transferCall('+125'); } // Dynamic routing via webhook const res = await fetch('https://yourserver.com/get-transfer-number', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ userIntent: currentIntent }) }); const { phoneNumber } = await res.json(); transferCall(phoneNumber);
a
Copy code
"tools": [
          {
            "id": "-------------------------------------",
            "createdAt": "2025-05-31",
            "updatedAt": "2025-06-10",
            "type": "transferCall",
            "function": {
              "name": "transfer_call_tool",
              "parameters": {
                "type": "object",
                "required": [],
                "properties": {}
              },
              "description": "trigger a live call transfer to a human agent"
            },
            "messages": [],
            "orgId": "000000000000000000000",
            "destinations": [
              {
                "type": "number",
                "number": "+11111111",
                "message": "I am forwarding your call to Department A. Please stay on the line.",
                "description": "Department A",
                "transferPlan": {
                  "mode": "blind-transfer",
                  "sipVerb": "refer"
                },
                "numberE164CheckEnabled": true
              }
            ]
          }
        ]
This is my assistant config
But I am curious how can I set phoneNumber key in that?
I can't phoneNumber field
@Kings_big💫
Can you help me plz?
c
looking into it.
s
Hey @Aurelius ! You're actually doing it correctly - your assistant config looks perfect! You don't need to manually define the function parameters. Just having the function name and destinations is enough. Vapi automatically handles the parameter structure. Here's how the transfer mechanism works: Your config (which is correct):
Copy code
json

{

  "type": "transferCall",

  "function": {

    "name": "transfer_call_tool"

  },

  "destinations": [

    {

      "type": "number",

      "number": "+11111111",

      "message": "I am forwarding your call to Department A...",

      "description": "Department A"

    }

  ]

}
To trigger the transfer, add this to your system prompt:
Copy code
When the user asks to speak with a human agent or Department A, call the transfer_call_tool function with the phone number "+11111111".
That's it! Your assistant will automatically call the function when appropriate, and Vapi handles the rest. The confusion earlier was from incorrect examples - ignore the "phoneNumber" field stuff, it doesn't exist.
a
@Kings_big💫
Hello
I am integrating the calendar using VAPI
but assistant bot currently recognizes the date as 2023.
k
Ensure your prompt includes Current date: {{ "now" | date: "%B %d, %Y", "UTC" }}, use a tool step to check the real-time date before bookings, and send dates in proper ISO format using parseDate and formatDate..
a
Thanks for your answer. And Do I have to add this prompt at the Assistant prompt or Calendar event tools?
I've tried that but it doesn't still work.
c
Add
{{ "now" | date: "%Y-%m-%d", "UTC" }}
to the assistant prompt not the calendar tool, and in [Make.com](http://Make.com), use a tool step to get the current date and format it with
parseDate
and
formatDate
before sending to the calendar in ISO format..