Call Information API

Call Information API

Retrieve a call status

Returns the status of a call (data is available 10 minutes after call ended).

SecuritybearerAuth
Request
path Parameters
call_control_id
required
string

Unique identifier and token for controlling the call

Responses
200

Successful response with details about a call status.

Response Schema: application/json
object (Call)
call_control_id
required
string

Unique identifier and token for controlling the call.

call_duration
integer

Indicates the duration of the call in seconds

call_leg_id
required
string

ID that is unique to the call and can be used to correlate webhook events

call_session_id
required
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.

is_alive
required
boolean

Indicates whether the call is alive or not. For Dial command it will always be false (dialing is asynchronous).

record_type
required
string
Value: "call"
default

Unexpected error

Response Schema: application/json
Array of objects (Error)
Array
code
required
string <int>
detail
string
meta
object
object
title
required
string
get/calls/{call_control_id}
Request samples
import telnyx
telnyx.api_key = "YOUR_API_KEY"

telnyx.Call.retrieve("uuid")
Response samples
application/json
{
  • "data": {
    • "call_control_id": "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg",
    • "call_duration": 50,
    • "call_leg_id": "2dc6fc34-f9e0-11ea-b68e-02420a0f7768",
    • "call_session_id": "2dc1b3c8-f9e0-11ea-bc5a-02420a0f7768",
    • "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d",
    • "is_alive": false,
    • "record_type": "call"
    }
}

List all active calls for given connection

Lists all active calls for given connection. Acceptable connections are either SIP connections with webhook_url or xml_request_url, call control or texml. Returned results are cursor paginated.

SecuritybearerAuth
Request
path Parameters
connection_id
required
string

Uniquely identifies a Telnyx application (Call Control)

query Parameters
page[limit]
integer [ 1 .. 250 ]
Default: 20

Limit of records per single page

page[after]
string
Default: "null"

Opaque identifier of next page

page[before]
string
Default: "null"

Opaque identifier of next page

Responses
200

Successful response with list of details about active calls.

Response Schema: application/json
Array of objects (Active Call)
object (PaginationMeta)
default

Unexpected error

Response Schema: application/json
Array of objects (Error)
Array
code
required
string <int>
detail
string
meta
object
object
title
required
string
get/connections/{connection_id}/active_calls
Request samples
Response samples
application/json
{
  • "data": [
    • {
      • "call_control_id": "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg",
      • "call_leg_id": "2dc6fc34-f9e0-11ea-b68e-02420a0f7768",
      • "call_session_id": "2dc1b3c8-f9e0-11ea-bc5a-02420a0f7768",
      • "client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d",
      • "call_duration": 50,
      • "record_type": "call"
      }
    ],
  • "meta": {
    • "page_number": 2,
    • "page_size": 25,
    • "total_pages": 3,
    • "total_results": 55
    }
}