REST ClientCompatCalls

list

View as MarkdownOpen in Claude

List calls in the account.

Path parameters

AccountSidstringRequiredformat: "uuid"
The Project ID that uniquely identifies the Account.

Query parameters

EndTimestringOptional
The time, in RFC 2822 GMT format, on which the call was terminated.
EndTime<stringOptional
The time before which the call was terminated.
EndTime>stringOptional
The time after which the call was terminated.
FromstringOptional
The address that initiated the call.
ParentCallSidstringOptionalformat: "uuid"
The unique identifier for the call that created this call.
StartTimestringOptional
The time, in RFC 2822 GMT format, on which the call began.
StartTime<stringOptional
The time before which the call began.
StartTime>stringOptional
The time after which the call began.
StatusenumOptional
The status of the call.
TostringOptional
The address that received the call.
PageintegerOptional>=0Defaults to 0
The page number to retrieve. Page numbers are zero-indexed, so the first page is 0.
PageSizeintegerOptional1-1000Defaults to 50
The number of results to return per page. The default is 50, and the maximum is 1000.
PageTokenstringOptional
A token used to retrieve a specific page of results. Must start with PA or PB.

Response

uristringRequired
The URI of the current page.
first_page_uristringRequired
The URI of the first page.
next_page_uristring or nullRequired
The URI of the next page.
previous_page_uristring or nullRequired
The URI of the previous page.
pageintegerRequired
The current page number.
page_sizeintegerRequired
The number of items per page.
callslist of objectsRequired
List of calls.

Response Example

Response
1{
2 "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Calls?Page=0&PageSize=50",
3 "first_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Calls?Page=0&PageSize=50",
4 "next_page_uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Calls?Page=1&PageSize=50&PageToken=PAxxxxxxxxxx",
5 "page": 0,
6 "page_size": 50,
7 "calls": [
8 {
9 "sid": "b3877c40-da60-4998-90ad-b792e98472ca",
10 "account_sid": "b3877c40-da60-4998-90ad-b792e98472af",
11 "date_created": "Wed, 19 Sep 2018 20:00:00 +0000",
12 "date_updated": "Wed, 19 Sep 2018 21:00:00 +0000",
13 "parent_call_sid": "b3877c40-da60-4998-90ad-b792e98472af",
14 "to": "+13105678901",
15 "formatted_to": "(310) 567-8901",
16 "to_formatted": "(310) 567-8901",
17 "from": "+13103384645",
18 "formatted_from": "(310) 338-4645",
19 "from_formatted": "(310) 338-4645",
20 "phone_number_sid": "b3877c40-da60-4998-90ad-b792e98472pn",
21 "status": "queued",
22 "start_time": "Wed, 19 Sep 2018 20:00:01 +0000",
23 "end_time": "Fri, 21 Sep 2018 10:00:00 +0000",
24 "duration": 20,
25 "price": 0.003,
26 "price_unit": "USD",
27 "direction": "inbound",
28 "answered_by": "human",
29 "api_version": "2010-04-01",
30 "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Calls/b3877c40-da60-4998-90ad-b792e98472ca.json",
31 "subresource_uris": {
32 "recordings": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Calls/b3877c40-da60-4998-90ad-b792e98472ca/Recordings.json"
33 },
34 "audio_in_mos": 4.5,
35 "sip_result_code": "200",
36 "audio_rtt_avg": 50,
37 "audio_rtt_min": 20,
38 "audio_rtt_max": 100,
39 "audio_out_jitter_min": 1,
40 "audio_out_jitter_max": 10,
41 "audio_out_jitter_avg": 5,
42 "audio_out_lost": 0
43 }
44 ]
45}

Example

1from signalwire.rest import RestClient
2
3client = RestClient(
4 project="your-project-id",
5 token="your-api-token",
6 host="your-space.signalwire.com",
7)
8
9calls = client.compat.calls.list(Status="completed", PageSize=20)