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.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Unix timestamp (seconds since epoch) of when the webhook was sent - compatible with webhook-timestamp Unix timestamp for replay attack prevention
Base64 encoded Ed25519 signature for webhook verification - compatible with webhook-signature Ed25519 signature of timestamp|payload for verification
Show child attributes
Identifies the type of the resource.
event "event"
The type of event being delivered.
call.hangup "call.hangup"
Identifies the type of resource.
"0ccc7b54-4df3-4bca-a65a-3da1ecc777f0"
ISO 8601 datetime of when the event occurred.
"2018-02-02T22:25:27.521992Z"
Show child attributes
Call ID used to issue commands via Call Control API.
"v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg"
Call Control App ID (formerly Telnyx connection ID) used in the call.
"7267xxxxxxxxxxxxxx"
ID that is unique to the call and can be used to correlate webhook events.
"428c31b6-7af4-4bcb-b7f5-5013ef9657c1"
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.
"428c31b6-abf3-3bc1-b7f4-5013ef9657c1"
State received from a command.
"aGF2ZSBhIG5pY2UgZGF5ID1d"
Custom headers set on answer command
[
{ "name": "head_1", "value": "val_1" },
{ "name": "head_2", "value": "val_2" }
]User-to-User and Diversion headers from sip invite.
[
{ "name": "User-to-User", "value": "1234" },
{
"name": "Diversion",
"value": "<sip:111@192.168.1.1>"
}
]Number or SIP URI placing the call.
"+35319605860"
Destination number or SIP URI of the call.
"+13129457420"
ISO 8601 datetime of when the call started.
"2018-02-02T22:20:27.521992Z"
State received from a command.
hangup "hangup"
Array of tags associated to number.
["tag-01", "tag-02"]The reason the call was ended (call_rejected, normal_clearing, originator_cancel, timeout, time_limit, user_busy, not_found or unspecified).
call_rejected, normal_clearing, originator_cancel, timeout, time_limit, user_busy, not_found, unspecified "call_rejected"
The party who ended the call (callee, caller, unknown).
caller, callee, unknown "caller"
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.
"603"
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.
Show child attributes
Inbound call quality statistics.
Show child attributes
Maximum jitter variance for inbound audio.
"2.74"
Number of packets used for jitter calculation on inbound audio.
"0"
Mean Opinion Score (MOS) for inbound audio quality.
"4.50"
Total number of inbound audio packets.
"591"
Number of skipped inbound packets (packet loss).
"9"
{
"inbound": {
"jitter_max_variance": "2.74",
"jitter_packet_count": "0",
"mos": "4.50",
"packet_count": "591",
"skip_packet_count": "9"
},
"outbound": {
"packet_count": "0",
"skip_packet_count": "0"
}
}{
"record_type": "event",
"event_type": "call.hangup",
"id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
"occurred_at": "2018-02-02T22:25:27.521992Z",
"payload": {
"call_control_id": "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg",
"connection_id": "7267xxxxxxxxxxxxxx",
"call_leg_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1",
"call_session_id": "428c31b6-7af4-4bcb-b7f5-5013ef9657c1",
"client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d",
"from": "+35319605860",
"to": "+35319605860",
"start_time": "2018-02-02T22:20:27.521992Z",
"state": "hangup",
"hangup_cause": "call_rejected",
"hangup_source": "caller",
"sip_hangup_cause": "603",
"call_quality_stats": {
"inbound": {
"jitter_max_variance": "2.74",
"jitter_packet_count": "0",
"mos": "4.50",
"packet_count": "591",
"skip_packet_count": "9"
},
"outbound": {
"packet_count": "0",
"skip_packet_count": "0"
}
}
}
}The server must return an HTTP 200, otherwise we will reattempt delivery at the failover webhook URL.
Was this page helpful?