https://retellai.com/?utm_source=discord&utm_medium=seo logo
how long does it take for the agent to detect voic...
# ❓・ai-evy-support
r
@AI Evy how long does it take for the agent to detect voicemail?
a
Thanks for tagging me @ruta1212_29251. I'll look through relevant sources and get back to you shortly.
### Answer # Voicemail Detection Timing Voicemail detection in Retell AI runs continuously within a timeout window [(1) ]() . The system is optimized for real-time use cases with generally under 100ms of latency impact . Voicemail detection only runs for the first 3 minutes of the call . During this period: - If you configure the agent to hang up when voicemail is detected, the system will disconnect the moment it detects voicemail - If you configure the agent to leave a message, the system will wait for the agent's turn to speak before leaving that message If the voicemail detection timeout (3 minutes) is reached without detecting voicemail, the system stops voicemail detection and continues with the call as normal . You can configure voicemail detection behavior through the
voicemail_option
parameter when creating or updating your agent [(2) ]() [(3) ]() [(4) ]() . **
​ To learn more, see the sources I considered: [[1] Handle voicemail](https://docs.retellai.com/build/handle-voicemail) [[2] Create Agent](https://docs.retellai.com/api-references/create-agent) [[3] Create Agent](https://docs.retellai.com/api-references/create-agent) [[4] Update Agent](https://docs.retellai.com/api-references/update-agent) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
r
@AI Evy how do i set the agent to hang up
a
Thanks for the follow-up, @ruta1212_29251. I'll get back to you soon.
### Answer To configure your agent to hang up when voicemail is detected, you need to enable voicemail detection in your agent settings and select the hang up option [(1) ]() . Through the Dashboard: 1. Navigate to your agent settings → call settings 2. Enable "Voicemail Detection" 3. Select "Hang up" as the voicemail behavior Through the API: When creating or updating your agent, set the
voicemail_option
parameter with the hang up action [(2) ]() [(3) ]() :
Copy code
json
{
  "voicemail_option": {
    "action": {
      "type": "hang_up"
    }
  }
}
[(2) ]() , [(3) ]() When voicemail is detected, the agent will disconnect immediately, regardless of whether the other side is still talking [(1) ]() . The call will have a disconnection reason of
voicemail_reached
if the voicemail was successfully detected and the hang up action was taken . To disable voicemail detection entirely, set
voicemail_option
to
null
[(2) ]() [(3) ]() .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] Handle voicemail](https://docs.retellai.com/build/handle-voicemail) [[2] Create Agent](https://docs.retellai.com/api-references/create-agent) [[3] Create Agent](https://docs.retellai.com/api-references/create-agent) ​