https://retellai.com/?utm_source=discord&utm_medium=seo logo
: How can I transfer call using my own custom LLM ...
# ❓・ai-evy-support
n
@AI Evy : How can I transfer call using my own custom LLM code ?
a
Thanks for tagging me @nsakv. I'll look through relevant sources and get back to you shortly.
​ To learn more, see the sources I considered: [[1] LLM WebSocket](https://docs.retellai.com/api-references/llm-websocket) [[2] Call Transfer for Custom LLM](https://discord.com/channels/1186424376300679209/1369052565592866836) [[3] Transfer call](https://docs.retellai.com/build/single-multi-prompt/transfer-call) [[4] Phone transfer with custom LLM](https://discord.com/channels/1186424376300679209/1395018119050952825) [[5] Call transfers is not working in Custom LLM](https://discord.com/channels/1186424376300679209/1310343432178368512) ​
### Answer To transfer a call using your custom LLM code, you need to use the
transfer_number
field in the response event sent through the WebSocket connection [(1) ]() . Here's how to implement it: ## Basic Call Transfer In your WebSocket response event, set the
transfer_number
field :
Copy code
json
{
  "response_type": "response",
  "response_id": 1,
  "content": "I'm transferring you to our support team now.",
  "content_complete": true,
  "transfer_number": "+1234567890"
}
## Setting Caller ID To configure how the caller ID appears to the transfer destination, you can use the
from_number
field in the transfer action [(2) ]() :
Copy code
json
{
  "response_type": "action",
  "action": "transfer",
  "transfer": {
    "phone_number": "+1234567890",
    "from_number": "+1987654321"
  }
}
## Important Notes - Call transfers only work during phone calls, not web calls [(3) ]() - The feature is available for Retell numbers and imported numbers - When using custom LLM with WebSocket, warm transfers are not natively supported - only cold transfers are available [(4) ]() , [(2) ]() - If you encounter issues with call transfers in custom LLM, avoid setting
auto_reconnect
and
call_details
to
true
simultaneously in the config event, as this can cause transfer problems [(5) ]() The call will be transferred to the specified number after the content associated with the response is fully spoken [(1) ]() .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.