Using CallUrl to TransferCall
# support
n
Hi, I am following the guide on how to create dynamic call transfers but I am stuck on Step #5 - https://docs.vapi.ai/phone-calling/dynamic-call-transfers#step-5-trigger-the-tool-and-process-requests I have tried calling ControlUrl with
"type": "say"
and the recommended prompt, but AI ends up repeating the message and not calling the tool. I am confident there is another way to call ControlUrl, but it is not documented (e.g. with
"type": "end-call"
to end call, is there equivalent for transfer call?).
Here is example call where it happened -
a4040dfc-a542-4186-b3a1-9c1d3774fbf1
k
To programmatically trigger a transfer through the ControlUrl, you should use the transfer message type. Here's how to structure it: { "type": "transfer", "destination": { "type": "number", // or "sip" "number": "+1234567890", // if type is "number" // or "sipUri": "sip:[user@domain.com](user@domain.com)" // if type is "sip" }, "content": "Optional message to say before transfer" } This is based on the
ClientInboundMessageTransfer
interface: export interface ClientInboundMessageTransfer { /\*\* This is the type of the message. Send "transfer" message to transfer the call to a destination. \*/ type: 'transfer'; /\*\* This is the destination to transfer the call to. \*/ destination?: TransferDestinationNumber | TransferDestinationSip; /\*\* This is the content to say. \*/ content?: string; } Key Points: 1\. The message must have type: "transfer" 2\. The destination object must specify either: - For phone numbers: type: "number" with a number field - For SIP: type: "sip" with a sipUri field 3\. You can optionally include a content field with a message to speak before the transfer
The issue you are encountering may be related to your model configuration. To resolve this, please set your model to “gpt-4o/gpt-4o-mini” and adjust the temperature to 0.3. This should enable the model to function as intended.
n
Thank you 👍