Md Adnan
01/11/2026, 12:15 PMAI Evy
01/11/2026, 12:15 PMAI Evy
01/11/2026, 12:15 PMvoicemail_option configuration. [(1) ]() [(2) ]()
To hang up when voicemail is detected, set the voicemail_message to an empty string:
javascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const agentResponse = await client.agent.create({
response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },
voice_id: '11labs-Adrian',
enable_voicemail_detection: true,
voicemail_message: ""
}) ;
[(1) ]()
Key settings:
- `enable_voicemail_detection`: Set to true to detect whether the call enters a voicemail (only available for phone calls) .
- `voicemail_message`: Set to an empty string ("") if you want to hangup after hitting voicemail.
- `voicemail_detection_timeout_ms`: Configures when to stop running voicemail detection (default is 30,000 ms / 30 seconds) .
However, the specific voicemail messages you mentioned ("The mailbox is full", "The voicemail box has not been set up yet", "Press 1 or 0 for more options") are not explicitly documented as configurable detection triggers. The voicemail detection feature will try to detect voicemail in the first 3 minutes of the call, but the exact phrases it recognizes are not specified in the available sources.
For more granular control over specific voicemail message types, you may need to reach out to support:
- [Contact Sales]()
- [Retell AI GitHub]()
Would you like a general answer on how you might handle this through prompt engineering or custom logic?AI Evy
01/11/2026, 12:15 PMAI Evy
01/11/2026, 12:15 PMMd Adnan
01/11/2026, 12:17 PMAI Evy
01/11/2026, 12:17 PMAI Evy
01/11/2026, 12:17 PMvoicemail_detection_timeout_ms, which stops detection after a set period (default 30,000 ms / 30 seconds, with a maximum of 180,000 ms / 3 minutes) . [(1) ]() [(2) ]()
For cases where detection fails (IVRs, company voicemails, etc.) , you have a few options:
1. Adjust the detection timeout:
javascript
voicemail_detection_timeout_ms: 30000
[(1) ]()
The minimum value is 5,000 ms and maximum is 180,000 ms (3 minutes) .
2. Set a maximum call duration as a fallback:
javascript
max_call_duration_ms: 3600000
This will force end the call if reached. The minimum is 60,000 ms (1 min) and maximum is 7,200,000 ms (2 hours) .
However, the sources do not document a way to configure detection for specific phrases like "mailbox is full" or "press 1 for more options." The voicemail detection works automatically but the exact detection logic/phrases are not exposed for customization.
A community member also noted issues with voicemail detection "talking over the answering machine messages and ignoring the beep." [(3) ]()
For more granular control over IVR/voicemail edge cases, you may need to contact support:
- [Contact Sales]()
- [Retell AI GitHub]()
Would you like a general answer on potential workarounds?AI Evy
01/11/2026, 12:17 PMAI Evy
01/11/2026, 12:17 PM