How do hangup cause fields work in webhooks?

How do hangup cause fields work in webhooks?

Quick Answer

The hangup object in the call.end webhook explains who disconnected a call and why, using the initiated_by, cause and cause_code fields.


1. What is the hangup object?

The hangup object lives inside every call.end webhook payload and describes how the call disconnected.


2. Field definitions

FieldTypeDescription
initiated_bystringUID of the leg that triggered the disconnect
causestringHuman-readable hangup cause text (standard ISDN hangup cause code)
cause_codestringThe matching ISDN cause code, sent as a string

The initiated_by field has always been available. The cause and cause_code fields are new and are currently sent only for outgoing calls.


3. When you will see the hangup object

The hangup object appears only when the call reached an answered state at least once. Missed calls and voicemails do not include it.

Call outcomehangup object present?
Answered, then endedYes
MissedNo
VoicemailNo
  • Will come: The call reached an answered state at least once before ending, on outgoing calls.
  • Will not come: The call was missed, went to voicemail or never reached an answered state at all.

4. Why cause_code is a string

Although cause_code is almost always a two-digit value such as "16", it is transmitted as a string so that every client system can treat it consistently without worrying about numeric type conversion. Parse it as a string in your integration.


5. Most common cause_code values

CodeMeaning
16Normal clearing — the call ended normally
17User busy — the called party's line was busy
18 / 19No answer — the call rang but was not picked up
21Call rejected — explicitly declined by the recipient

6. Additional codes you may encounter

CodeMeaning
27Destination out of order — invalid or disconnected number
28Invalid number format
34No circuit/channel available — carrier-side congestion
38Network out of order — carrier network fault
41Temporary failure — often safe to retry

7. Full list of cause codes

All values follow the standard ISDN (Q.850/Q.931) hangup cause code specification. If you see a code not covered above, look it up in any public ISDN cause code reference; the same meaning applies.


8. Need help?

If you have questions about integrating these fields, reach out to your MyOperator support contact.


Keywords

webhook, hangup object, call.end, initiated_by, cause, cause_code, ISDN, Q.850, Q.931, MyOperator, disconnect reason, outbound calls