---
title: "Call Hangup"
method: POST
path: "callHangup"
tags: ["Callbacks"]
---

# Call Hangup

`POST callHangup` (webhook)

This webhook uses Telnyx headers (telnyx-timestamp, telnyx-signature-ed25519) that are compatible with Standard Webhooks specification for SDK generation. Custom validation logic can map these to standard webhook-timestamp and webhook-signature equivalents. See https://github.com/standard-webhooks/standard-webhooks for details.

## Headers

- `telnyx-timestamp` integer, required — Unix timestamp for replay attack prevention
- `telnyx-signature-ed25519` string, required — Ed25519 signature of timestamp|payload for verification

## Payload

- CallHangupEvent
  - `data` CallHangup
    - `event_type` 'call.hangup' — The type of event being delivered.
    - `id` string, uuid — Identifies the type of resource.
    - `occurred_at` string, date-time — ISO 8601 datetime of when the event occurred.
    - `payload` object
      - `call_control_id` string — Call ID used to issue commands via Call Control API.
      - `call_leg_id` string — ID that is unique to the call and can be used to correlate webhook events.
      - `call_quality_stats` object, nullable — Call quality statistics aggregated from the CHANNEL_HANGUP_COMPLETE event. Only includes metrics that are available (filters out nil values). Returns nil if no metrics are available.
        - `inbound` object — Inbound call quality statistics.
          - `jitter_max_variance` string — Maximum jitter variance for inbound audio.
          - `jitter_packet_count` string — Number of packets used for jitter calculation on inbound audio.
          - `mos` string — Mean Opinion Score (MOS) for inbound audio quality.
          - `packet_count` string — Total number of inbound audio packets.
          - `skip_packet_count` string — Number of skipped inbound packets (packet loss).
        - `outbound` object — Outbound call quality statistics.
          - `packet_count` string — Total number of outbound audio packets.
          - `skip_packet_count` string — Number of skipped outbound packets (packet loss).
      - `call_session_id` string — ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call.
      - `client_state` string — State received from a command.
      - `connection_id` string — Call Control App ID (formerly Telnyx connection ID) used in the call.
      - `custom_headers` CustomSipHeader[] — Custom headers set on answer command
        - `name` string, required — The name of the header to add.
        - `value` string, required — The value of the header.
      - `from` string — Number or SIP URI placing the call.
      - `hangup_cause` 'call_rejected' | 'normal_clearing' | 'originator_cancel' | 'timeout' | 'time_limit' | 'user_busy' | 'not_found' | 'no_answer' | 'unspecified' — The reason the call was ended (`call_rejected`, `normal_clearing`, `originator_cancel`, `timeout`, `time_limit`, `user_busy`, `not_found`, `no_answer` or `unspecified`).
      - `hangup_source` 'caller' | 'callee' | 'unknown' — The party who ended the call (`callee`, `caller`, `unknown`).
      - `sip_hangup_cause` string — The reason the call was ended (SIP response code). If the SIP response is unavailable (in inbound calls for example) this is set to `unspecified`.
      - `sip_headers` InboundSipHeader[] — User-to-User and Diversion headers from sip invite.
        - `name` 'User-to-User' | 'Diversion', required — The name of the header received from the SIP INVITE.
        - `value` string, required — The value of the header.
      - `start_time` string, date-time — ISO 8601 datetime of when the call started.
      - `state` 'hangup' — State received from a command.
      - `tags` string[] — Array of tags associated to number.
      - `to` string — Destination number or SIP URI of the call.
    - `record_type` 'event' — Identifies the type of the resource.

## Acknowledgement `200`

The server must return an HTTP 200, otherwise we will reattempt delivery at the failover webhook URL.

---

[API](https://skmtc.net/team-telnyx/apis/telnyx-api-2.md) · [All operations](https://skmtc.net/team-telnyx/apis/telnyx-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/team-telnyx/telnyx-api-2/revisions/3fdc16374d70/schema)
