https://retellai.com/?utm_source=discord&utm_medium=seo logo
- from the call_ended webhook event how can i know...
# ❓・ai-evy-support
d
@AI Evy - from the call_ended webhook event how can i know if the call disconnect from the agent side ?
a
Thanks for tagging me @dj.ufk. I'll look through relevant sources and get back to you shortly.
### Answer In the
call_ended
webhook event, you can check the
disconnection_reason
field to determine if the call was disconnected by the agent [(1) ]() [(2) ]() . Specifically, if the
disconnection_reason
is
"agent_hangup"
, this indicates the AI agent hung up the call [(3) ]() [(2) ]() . The
call_ended
webhook payload includes the
disconnection_reason
field as part of the call object [(1) ]() . Here's what to look for:
Copy code
json
{
  "event": "call_ended",
  "call": {
    "disconnection_reason": "agent_hangup",
    ...
  }
}
The
disconnection_reason
field can have various values, but
"agent_hangup"
specifically means the AI agent terminated the call [(3) ]() [(2) ]() .
​ To learn more, see the sources I considered: [[1] Webhook Overview](https://docs.retellai.com/features/webhook-overview) [[2] Create Phone Call](https://docs.retellai.com/api-references/create-phone-call) [[3] Debug call disconnection](https://docs.retellai.com/reliability/debug-call-disconnect) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.