Transfer call
# support
k
How to transfer a call to number obtained from vapi tools. ?
v
Hi there! 👋 I can help you with transferring calls to numbers obtained from Vapi tools. To transfer a call to a number that you've obtained during the conversation, you'll need to use the
transferCall
function with dynamic destination handling. Here's how: 1. Define your transfer tool in your assistant configuration:
Copy code
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:
Copy code
javascript
{
  type: "transferCall",
  destinations: [],
  function: { name: "dynamicDestinationTransferCall" },
}
3. When transferring, provide the destination in your response payload:
Copy code
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)
v
Message marked as helpful by @Kishore Kumar! 🎉