https://retellai.com/?utm_source=discord&utm_medium=seo logo
How can I detect and leave a voicemail using conve...
# ❓・ai-evy-support
c
@AI Evy How can I detect and leave a voicemail using conversation flow agent
a
Thanks for tagging me @calebault. I'll look through relevant sources and get back to you shortly.
### Answer Retell AI has built-in voicemail detection that can be configured to either "hang up" or "leave a message" when voicemail is detected [(1) ]() . For conversation flow agents specifically, you can create a conversation flow with the appropriate configuration. Here's how to create a conversation flow using the JavaScript SDK:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const conversationFlowResponse = await client.conversationFlow.create({
 model_choice: { model: 'gpt-5', type: 'cascading' },
 nodes: [
 {
 id: 'start',
 instruction: { text: 'Greet the customer and ask how you can help them.', type: 'prompt' },
 type: 'conversation',
 },
 ],
 start_speaker: 'agent',
}) ;
[(2) ]() However, some users have reported issues with voicemail detection, particularly when voicemail greetings contain only a beep sound without a spoken message [(1) ]() . In these cases, the agent may not properly detect the voicemail and continue talking until disconnecting due to inactivity . For additional voicemail detection capabilities, you can also enable Twilio's Async AMD (Answering Machine Detection) with DetectMessageEnd and set an AsyncAmdStatusCallback URL . When voicemail is detected, you can have your backend wait and then hang up the call via API .
​ To learn more, see the sources I considered: [[1] VOICEMAIL](https://discord.com/channels/1186424376300679209/1380663452023914506) [[2] Create Conversation Flow](https://docs.retellai.com/api-references/create-conversation-flow) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
c
@AI Evy So how can I use a transition logic to leave a static voicemail if a voicemail box is reached?
a
Thanks for the follow-up, @calebault. I'll get back to you soon.
### Answer You don't need to create custom transition logic for voicemail detection when using Conversation Flow [(1) ]() . The built-in voicemail detection system runs globally and acts as a fallback during the first 3 minutes of the call [(2) ]() . To configure voicemail handling with a static message: 1. Navigate to your agent settings -> call settings and enable "Voicemail Detection" 2. Choose "Leave a message" as your voicemail behavior 3. Select "Static message" and set your pre-recorded message, such as
Hi, this is {{your name}}, please give us a callback tomorrow at 10am.
The system will automatically detect voicemail and leave your static message when it's the agent's turn to speak . Dynamic variables are supported in static messages . You should delete any custom voicemail detection transitions you've created in your conversation flow and rely on the built-in voicemail detection function instead [(1) ]() . The built-in system will handle voicemail detection globally across your entire conversation flow without requiring specific transition logic .
​ To learn more, see the sources I considered: [[1] Leave VM detection](https://discord.com/channels/1186424376300679209/1406015418585579601) [[2] Handle voicemail](https://docs.retellai.com/build/handle-voicemail) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
c
@AI Evy How can i transfer a call if the customer requests a live agent
a
Thanks for the follow-up, @calebault. I'll get back to you soon.
### Answer For transferring calls to live agents in Conversation Flow, you can use the Agent Transfer Node [(1) ]() . ## Steps to Set Up Call Transfer: 1. **Add Agent Transfer Node**: Select "Agent Transfer" from the 'Add New Node' menu . 2. **Configure Transfer Settings**: You can configure the transfer agent ID and version, along with post-call analysis settings . 3. **Update Your Prompt**: Ensure your AI agent knows when to trigger the transfer by adding clear instructions like: "If the user asks to speak to a live agent, use the agent_transfer tool" [(2) ]() . ## Why Use Agent Transfer Over Traditional Call Transfer: Agent Transfer offers several advantages over traditional phone transfers [(1) ]() : - **Lower Latency**: Near-instant transitions between agents - **Better Reliability**: No need to create new phone calls, avoiding telephony failures - **No Handoff Message Needed**: The destination agent has access to full conversation history - **No Separate Numbers Required**: Agents receiving transfers don't need their own phone numbers ## Transfer Settings Behavior: When transferring, the first agent's settings for optInSignedUrl, optOutSensitiveDataStorage, and webHookUrl will be maintained throughout the call . Other settings like language, voice, and voiceModel will reflect the currently active agent . You can test agent transfer functionality in both web call and playground environments .
​ To learn more, see the sources I considered: [[1] Agent Transfer Node](https://docs.retellai.com/build/conversation-flow/transfer-agent-node) [[2] Agent Transfer](https://docs.retellai.com/build/single-multi-prompt/transfer-agent) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
c
@User I want to transfer to another phone number