import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const calls = await client.queues.calls.list('queue_name');
console.log(calls.data);{
"data": [
{
"call_control_id": "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg",
"call_leg_id": "2dc6fc34-f9e0-11ea-b68e-02420a0f7768",
"call_session_id": "2dc1b3c8-f9e0-11ea-bc5a-02420a0f7768",
"record_type": "queue_call",
"connection_id": "7267xxxxxxxxxxxxxx",
"from": "+18005550101",
"to": "+18005550102",
"enqueued_at": "2019-01-23T18:10:02.574Z",
"wait_time_secs": 145,
"queue_position": 3,
"queue_id": "ae1626cc-6f42-11ea-becd-02420a0f8b69"
}
],
"meta": {
"page_number": 2,
"page_size": 25,
"total_pages": 3,
"total_results": 55
}
}Retrieve the list of calls in an existing queue
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const calls = await client.queues.calls.list('queue_name');
console.log(calls.data);{
"data": [
{
"call_control_id": "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg",
"call_leg_id": "2dc6fc34-f9e0-11ea-b68e-02420a0f7768",
"call_session_id": "2dc1b3c8-f9e0-11ea-bc5a-02420a0f7768",
"record_type": "queue_call",
"connection_id": "7267xxxxxxxxxxxxxx",
"from": "+18005550101",
"to": "+18005550102",
"enqueued_at": "2019-01-23T18:10:02.574Z",
"wait_time_secs": 145,
"queue_position": 3,
"queue_id": "ae1626cc-6f42-11ea-becd-02420a0f8b69"
}
],
"meta": {
"page_number": 2,
"page_size": 25,
"total_pages": 3,
"total_results": 55
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Uniquely identifies the queue by name
Consolidated page parameter (deepObject style). Originally: page[after], page[before], page[limit], page[size], page[number]
Show child attributes
Opaque identifier of next page
Opaque identifier of previous page
Limit of records per single page
1 <= x <= 250The size of the page
1 <= x <= 250The page number to load
x >= 1Successful response with a list of calls in a queue.
Show child attributes
queue_call "queue_call"
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-7af4-4bcb-b68e-5013ef9657c1"
ID that is unique to the call and can be used to correlate webhook events
"428c31b6-7af4-4bcb-b7f5-5013ef9657c1"
Unique identifier and token for controlling the call.
"v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg"
Call Control App ID (formerly Telnyx connection ID) used in the call.
"7267xxxxxxxxxxxxxx"
Number or SIP URI placing the call.
"+35319605860"
Destination number or SIP URI of the call.
"+13129457420"
ISO 8601 formatted date of when the call was put in the queue
"2019-01-23T18:10:02.574Z"
The time the call has been waiting in the queue, given in seconds
272
Current position of the call in the queue
3
Unique identifier of the queue the call is in.
"ae1626cc-6f42-11ea-becd-02420a0f8b69"
Was this page helpful?