Query CDR List
Query the CDR list.
Request URL
GET {base_url}/{api_path}/cdr/list?access_token={access_token}
Request parameters
Parameter | Required | Type | Description |
---|---|---|---|
page | No | Integer | Define which page is
displayed. Note: If this parameter is left blank, the
response result will return the first page by
default. |
page_size | No | Integer | Define how many records per
page. Maximum value: 10,000 Note: If this
parameter is left blank, the response result will return
10,000 records per page by
default. |
sort_by | No | String | Define the sorting field. Valid value:
|
order_by | No | String | Define the display order. Valid value:
|
Response parameters
Parameter | Type | Description |
---|---|---|
errcode | Integer | Returned error code.
Note: You can check the error code and
error message in Error Code and Error Message.
|
errmsg | String | Returned message.
|
total_number | Integer | The total number of CDR. |
data | Array<CDR_Details> | The detailed information of the CDR. |
- CDR_Details
-
Table 3. Parameter Type Description id Integer The sequence number of the record. time String The time the call was made or received. call_from String The number and name of the caller. call_to String The number and name of the callee. timestamp Integer The timestamp of the time when the call was made or received. uid String The unique ID of the CDR. src_addr String The IP address of the caller's device. src_trunk String The call was received via which trunk. dst_trunk String The call was sent out via which trunk. duration Integer The time between the call started and the call ended. ring_duration Integer The time between the call started and the call answered. talk_duration Integer The time between the call answered and the call ended. disposition String Call status. ANSWERED
NO ANSWER
BUSY
FAILED
VOICEMAIL
call_type String Communication type. Inbound
Outbound
Internal
did_number String The phone number that the caller dialed. dod_number String The phone number that was displayed on the callee's phone. record_file String The name of the call recording file. reason String The reason why the call was ended.
Examples
Request example
GET /openapi/v1.0/cdr/list?access_token=64er0dvpIUiXhZEetXfvqaEj4XIY2rLj&sort_by=id&order_by=desc HTTP/1.1
Host: 192.168.5.150:8088
Response example
HTTP/1.1 200 OK
{
"errcode": 0,
"errmsg": "SUCCESS",
"total_number": 2579,
"data": [
{
"id": 2714,
"time": "06/14/2022 11:19:28",
"call_from": "Kristin Hale<2005>",
"call_to": "Anna Simmons<2008>",
"timestamp": 1655176768,
"uid": "20220614111928CC54A",
"src_addr": "192.168.28.25",
"duration": 48,
"ring_duration": 2,
"talk_duration": 46,
"disposition": "ANSWERED",
"call_type": "Internal",
"record_file": "20220614111933-1655176768.0-2005-2008-Internal.wav",
"reason": "src hangup "
},
{
"id": 2713,
"time": "05/30/2022 14:57:00",
"call_from": "PlayFile",
"call_to": "Kristin Hale<2005>",
"timestamp": 1653893820,
"uid": "20220530145700EEC37",
"src_addr": "192.168.28.25",
"duration": 49,
"ring_duration": 1,
"talk_duration": 48,
"disposition": "ANSWERED",
"call_type": "Internal",
"reason": "src hangup "
},
{
"id": 2712,
"time": "05/30/2022 14:55:49",
"call_from": "Kristin Hale<2005>",
"call_to": "21000",
"timestamp": 1653893749,
"uid": "202205301455494E686",
"src_addr": "192.168.28.25",
"dst_trunk": "to28.41",
"duration": 54,
"ring_duration": 2,
"talk_duration": 52,
"disposition": "ANSWERED",
"call_type": "Outbound",
"dod_number": "2005",
"record_file": "20220530145555-1653893749.6-2005-21000-Outbound.wav",
"reason": "dst hangup "
},
{
"id": 2711,
"time": "05/30/2022 14:55:00",
"call_from": "Kristin Hale<2005>",
"call_to": "21000",
"timestamp": 1653893700,
"uid": "2022053014550020730",
"src_addr": "192.168.28.25",
"dst_trunk": "peer-to-34",
"disposition": "NO ANSWER",
"call_type": "Outbound",
"dod_number": "2005",
"reason": "dst extension_busy_no_forward "
},
... ...
]
}