Kishore Kumar
03/14/2025, 7:57 AMVapi Support Bot
03/14/2025, 7:59 AMtransferCall
function with dynamic destination handling. Here's how:
1. Define your transfer tool in your assistant configuration:
javascript
export const TRANSFER_CALL = (number) => {
return {
type: "transferCall",
destinations: [{
type: "number",
number: number,
}],
messages: [{
type: "request-start",
content: "I am forwarding your call. Please stay on the line."
}],
};
};
2. For dynamic transfers (when you get the number during the call), set up your tool like this:
javascript
{
type: "transferCall",
destinations: [],
function: { name: "dynamicDestinationTransferCall" },
}
3. When transferring, provide the destination in your response payload:
json
{
"destination": {
"type": "number",
"message": "Connecting you now",
"number": "+14155552671" // This would be your dynamically obtained number
}
}
Make sure your custom LLM is properly integrated with the Vapi platform to handle these transfers correctly. The number you obtain during the conversation can be passed as a parameter to the transferCall
function.
Let me know if you need any clarification! 😊
Sources:
- [Step-by-Step Procedure for Transferring Calls in the VAPI Platform](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1328028159949537341)
- [Vapi APIs and SDKs for Call Transfer Functionality](https://docs.vapi.ai/phone-calling/dynamic-call-transfers)Vapi Support Bot
03/14/2025, 8:16 AM