Skip to main content
POST
JavaScript

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

call_control_id
string
required

Unique identifier and token for controlling the call

Body

application/json

Hangup request

client_state
string

Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.

Example:

"aGF2ZSBhIG5pY2UgZGF5ID1d"

command_id
string

Use this field to avoid duplicate commands. Telnyx will ignore any command with the same command_id for the same call_control_id.

Example:

"891510ac-f3e4-11e8-af5b-de00688a4901"

custom_headers
Custom SIP Header · object[]

Custom headers to be added to the SIP BYE message.

Example:
reason
string

Text for the SIP Reason header (RFC 3326) sent when cancelling an unanswered outbound leg. The SIP CANCEL carries Reason: SIP;cause=200;text="<reason>"; phones such as Poly and Yealink use it to suppress the missed-call entry for a call answered elsewhere. Has no effect on an answered leg or an inbound leg. A hangup sent before the leg's call.initiated webhook still hangs up the leg, but without the Reason header. Must not contain ", \, control characters, or characters outside the Basic Multilingual Plane (such as emoji); invalid values are rejected with a 422.

Maximum string length: 128
Example:

"Call completed elsewhere"

Response

Successful response upon making a call control command.

data
Call Control Command Result · object
Example: