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

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)