https://retellai.com/?utm_source=discord&utm_medium=seo logo
how do i determine if the call is actually connect...
# ❓・ai-evy-support
h
@AI Evy how do i determine if the call is actually connected with the user, im trying to create a workflow that follows up with the user but i need to route based off did the user pick up yes or no, i can determine if the user didnt pick up by seeing that voicemail is true but i need soemthing reliable to route if the user picks up theres nothing i can seem to find that reliable, can u give me any tips or suggestions of best practices
a
Thanks for tagging me @hans_70884. I'll look through relevant sources and get back to you shortly.
### Answer --- To determine if a call is actually connected with the user, you can use the
call_status
and
disconnection_reason
fields from the call data [(1) ]() . For successful connections where the user picked up, look for: - `call_status`:
ended
- `disconnection_reason`:
user_hangup
or
agent_hangup
For calls where the user didn't pick up, you'll see: - `call_status`:
not_connected
- `disconnection_reason`:
dial_no_answer
,
dial_busy
,
user_declined
, or
dial_failed
Additionally, you can check the
in_voicemail
field in the call analysis data [(2) ]() . When
"in_voicemail": false
, it indicates the call reached a live person rather than voicemail. Here's the reliable routing logic: - **User picked up**:
call_status
is
ended
AND
in_voicemail
is
false
[(2) ]() [(1) ]() - **User didn't pick up**:
call_status
is
not_connected
OR
in_voicemail
is
true
You can access this data through the [get-call API endpoint]() or check it in the Retell Dashboard [(1) ]() .
​ To learn more, see the sources I considered: [[1] Debug call disconnection](https://docs.retellai.com/reliability/debug-call-disconnect) [[2] Create Web Call](https://docs.retellai.com/api-references/create-web-call) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
h
@AI Evy why is call status ended a singal that the user picked up? can't the call be ended on voice mail to?
a
Thanks for the follow-up, @hans_70884. I'll get back to you soon.
### Answer You're absolutely right to question this logic. A
call_status
of "ended" alone is not sufficient to determine if a user picked up, because calls can end in multiple scenarios including when voicemail is reached [(1) ]() . The key is to use multiple fields together for accurate routing: For reliable detection of user pickup: - `call_status`:
ended
[(2) ]() [(3) ]() - `disconnection_reason`:
user_hangup
or
agent_hangup
[(2) ]() [(3) ]() [(1) ]() - `in_voicemail`:
false
When voicemail is reached: -
call_status
can still be
ended
[(2) ]() [(3) ]() - `disconnection_reason`:
voicemail_reached
[(2) ]() [(3) ]() [(1) ]() - `in_voicemail`:
true
The
disconnection_reason
field is crucial here. According to the documentation,
voicemail_reached
is a specific disconnection reason that indicates the call reached voicemail . So your workflow should check: 1. **User answered**:
call_status
= "ended" AND
disconnection_reason
∈ ["user_hangup", "agent_hangup"] AND
in_voicemail
= false 2. **Voicemail/No answer**:
disconnection_reason
∈ ["voicemail_reached", "dial_no_answer", "dial_busy", "user_declined"] OR
in_voicemail
= true This combination provides the most reliable routing logic for your follow-up workflows.
​ To learn more, see the sources I considered: [[1] Register Phone Call](https://docs.retellai.com/api-references/register-phone-call) [[2] List Calls](https://docs.retellai.com/api-references/list-calls) [[3] Get Call](https://docs.retellai.com/api-references/get-call) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
h
@AI Evy Can you confirm the authoritative enum for disconnection.reason? Please reply with the exact list of possible string values (all cases), note any that are deprecated, and specify which events/objects they appear on (e.g., call_ended, call_analyzed). Also confirm the field path used today (disconnection.reason vs call.disconnection_reason) and whether the set differs for inbound vs outbound. A link to the current doc page would help. Thanks! 2) Precise checklist (best signal/noise) I need the definitive, current values for the disconnection.reason field. Please provide: Exact enum list (all strings, exact spelling/casing, including voicemail/busy/no-answer/declined, connected reasons like user_hangup/agent_hangup/call_transfer/inactivity/max_duration_reached, plus provider/error reasons). Schema location(s): confirm the current field path(s) per event/object (e.g., call_ended.call.disconnection_reason vs call_analyzed.disconnection.reason). Inbound vs outbound: any differences in possible values? Voicemail detection: which value(s) map to voicemail (e.g., voicemail_reached) and can voicemail ever coexist with connected reasons? Stability/versioning: any values deprecated/renamed or planned to change? Sample payloads: one example for a connected hangup, one for voicemail, one for busy, one for no-answer. Doc link: the authoritative page you rely on for this enum. Goal: I want to safely whitelist connected vs non-connected outcomes in production filters.
a
Thanks for the follow-up, @hans_70884. I'll get back to you soon.
### Answer Here's the authoritative information for the
disconnection_reason
field: ## Exact Enum List The complete list of possible
disconnection_reason
values is [(1) ]() : Expected/Normal Disconnections: -
user_hangup
- User hangup the call -
agent_hangup
- AI agent hangup the call -
call_transfer
- AI agent transferred the call -
voicemail_reached
- If AI agent is configured with voicemail settings, and voicemail is reached -
inactivity
- Call was terminated due to the "end_call_after_silence_ms" setting reached after long inactivity -
max_duration_reached
- Call was terminated due to maximum duration reached Connection Failed (not_connected status) : -
dial_busy
- The number dialed is busy -
dial_failed
- Dialing failed with no or unknown sip error code -
dial_no_answer
- The number dialed did not answer -
invalid_destination
- The number dialed is invalid -
telephony_provider_permission_denied
- The sip trunk credentials are not authenticated -
telephony_provider_unavailable
- The telephony provider is unavailable -
sip_routing_error
- The sip routing is going over too many hops or is in a loop -
marked_as_spam
- The number dialed is marked as spam -
user_declined
- User declined the call Error Conditions: -
concurrency_limit_reached
- Concurrency limit reached -
no_valid_payment
- No valid payment registered on file, or service shut down due to bill overdue -
scam_detected
- Scam detected for that particular agent -
error_llm_websocket_open
- LLM websocket did not open between Retell server and your backend -
error_llm_websocket_lost_connection
- LLM websocket connection broke during the call -
error_llm_websocket_runtime
- LLM websocket received a closing signal other than
1000
from your server - `error_llm_webso
cket_corrupt_payload` - LLM websocket received unspecified payload -
error_no_audio_received
- Has not received audio from Twilio or web frontend for a while after connection has established -
error_asr
- Retell's ASR encountered a problem -
error_retell
- Unspecified Retell side problem -
error_unknown
- Unknown error -
error_user_not_joined
- User did not join web call within 30s after calling startWebCall -
registered_call_timeout
- Phone call is 30s or more apart from registration ## Field Path The field path is consistently
disconnection_reason
across all API endpoints [(2) ]() [(3) ]() [(4) ]() [(5) ]() and webhook events [(6) ]() . ## Inbound vs Outbound The documentation doesn't indicate any differences in possible
disconnection_reason
values between inbound and outbound calls [(1) ]() . ## Voicemail Detection The specific value for voicemail is
voicemail_reached
. This appears when the AI agent is configured with voicemail settings and voicemail is reached . ## Status Mapping According to the documentation : - **`ended` status**:
user_hangup
,
agent_hangup
,
call_transfer
,
voicemail_reached
,
inactivity
,
max_duration_reached
- **`not_connected` status**:
dial_busy
,
dial_failed
,
dial_no_answer
,
invalid_destination
,
telephony_provider_permission_denied
,
telephony_provider_unavailable
,
sip_routing_error
,
marked_as_spam
,
user_declined
- **`error` status**: All error conditions starting with
error_
plus
concurrency_limit_reached
,
no_valid_payment
,
scam_detected
, `registered_cal
l_timeout` ## Production Filter Logic For reliable connected vs non-connected filtering: - **Connected calls**:
disconnection_reason
in [
user_hangup
,
agent_hangup
,
call_transfer
,
inactivity
,
max_duration_reached
] - **Non-connected calls**:
disconnection_reason
in [
dial_busy
,
dial_failed
,
dial_no_answer
,
invalid_destination
,
user_declined
,
marked_as_spam
] or any error conditions - **Voicemail**:
disconnection_reason
=
voicemail_reached
(treat as connected but separate category) ## Authoritative Documentation The definitive reference is the [Debug call disconnection]() page .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.