查询通话记录列表
查询通话记录 (CDR) 列表。
请求 URL
GET {base_url}/{api_path}/cdr/list?access_token={access_token}
请求参数
| 参数 | 是否必填 | 类型 | 说明 |
|---|---|---|---|
| page | 否 | Integer | 定义显示第几个页面。 注: 如果没有设置此参数,则默认返回第一页。
|
| page_size | 否 | Integer | 定义每页显示几项查询结果。 最大值:10000 注: 如果没有设置此参数,则默认每页返回 10000
项结果。
|
| disposition_code_list | 否 | String | 话务标签的唯一 ID。 注:
|
| call_note_remark | 否 | String | 备注。 |
| sort_by | 否 | String | 定义排序字段。 取值范围:
|
| order_by | 否 | String | 定义显示顺序。 取值范围:
|
响应参数
| 参数 | 类型 | 说明 |
|---|---|---|
| errcode | Integer | 返回错误码。
注: 更多错误码和错误信息说明,请参见 错误码 & 错误信息。
|
| errmsg | String | 返回信息。
|
| total_number | Integer | 通话记录总数量。 |
| data | Array<CDR_Details> | 通话记录详细信息。 |
- CDR_Details
-
表 1. 参数 类型 说明 id Integer 通话记录的序号。 time String 接听或拨打该通通话的时间。 call_from String 主叫的号码和名称。 call_to String 被叫的号码和名称。 timestamp Integer 通话记录时间的时间戳。 uid String 通话记录 (CDR) 的唯一 ID。 src_addr String 主叫 IP 地址。 src_trunk String 来电从哪条中继呼入。 dst_trunk String 去电从哪条中继送出。 duration Integer 拨号开始到通话结束的时间。 ring_duration Integer 拨号开始到通话被应答的时间。 talk_duration Integer 通话被应答到通话结束的时间。 disposition String 通话状态。 ANSWERED:已接NO ANSWER:未接BUSY:忙FAILED:失败VOICEMAIL:语音留言
call_type String 通讯类型。 Inbound:呼入Outbound:呼出Internal:内部
did_number String 主叫拨打的号码。 dod_number String 被叫话机上显示的号码。 record_file String 通话录音文件名。 reason String 通话结束的原因。 call_from_number String 主叫号码。 call_from_name String 主叫名称。 call_to_number String 被叫号码。 call_to_name String 被叫名称。 call_id String 通话的唯一 ID。 call_note Object<Call_Note> 通话的通话备注。 call_note_id String 通话备注的唯一 ID。 enb_call_note Integer 通话备注是否可编辑。 0:不可编辑。非零值:可编辑。
did String 主叫拨打的号码以及该号码关联的名称。
did_name String 与主叫拨打的号码关联的名称。
示例
请求示例
GET /openapi/v1.0/cdr/list?access_token=64er0dvpIUiXhZEetXfvqaEj4XIY2rLj&sort_by=id&order_by=desc HTTP/1.1
Host: 192.168.5.150:8088
响应示例
HTTP/1.1 200 OK { "errcode": 0, "errmsg": "SUCCESS", "total_number": 5, "data": [ { "id": 1, "time": "06/18/2024 13:47:33", "call_from": "6702", "call_to": "Kristin Hale<2005>", "timestamp": 1718689653, "uid": "20240618134733F8564", "src_addr": "120.24.97.161:5060", "src_trunk": "with-msg-pce", "duration": 16, "ring_duration": 13, "talk_duration": 3, "disposition": "ANSWERED", "call_type": "Inbound", "did_number": "123456", "reason": "dst hangup ", "call_from_number": "6702", "call_from_name": "", "call_to_number": "2005", "call_to_name": "Kristin Hale", "call_id": "1718689653.0", "call_note": { "id": "20240618160214-24CE3", "group_id": "1745395229.3", "disposition_code_list": [ { "id": 21, "name": "Transferred to Another Department", "description": "The call was transferred to the appropriate team or department." } ], "remark": "User encountered xx issue, needs resolution from the tech support department", "agent_name": "Madison Cooper", "registration_time": 1741226653, "update_entry": "" }, "call_note_id": "20240618160214-24CE3", "enb_call_note": 8, "did": "123456", "did_name": "" }, { "id": 2, "time": "06/18/2024 13:48:32", "call_from": "6702", "call_to": "Kristin Hale<2005>", "timestamp": 1718689712, "uid": "2024061813483298651", "src_addr": "192.168.148.50:65457", "src_trunk": "with-msg-pce", "duration": 17, "ring_duration": 11, "talk_duration": 6, "disposition": "ANSWERED", "call_type": "Inbound", "did_number": "123456", "reason": "dst hangup ", "call_from_number": "6702", "call_from_name": "", "call_to_number": "2005", "call_to_name": "Kristin Hale", "call_id": "1718689712.3", "call_note": null, "call_note_id": "", "enb_call_note": 0, "did": "123456", "did_name": "" }, { "id": 3, "time": "06/18/2024 13:48:31", "call_from": "6702", "call_to": "RingGroup ringback-tone-test-RG<6300>", "timestamp": 1718689711, "uid": "2024061813483298651", "src_addr": "192.168.148.50:65457", "src_trunk": "with-msg-pce", "duration": 18, "ring_duration": 12, "talk_duration": 6, "disposition": "ANSWERED", "call_type": "Inbound", "did_number": "123456", "reason": "dst connected ", "call_from_number": "6702", "call_from_name": "", "call_to_number": "6300", "call_to_name": "ringback-tone-test-RG", "call_id": "1718689712.3", "call_note": null, "call_note_id": "", "enb_call_note": 0, "did": "123456", "did_name": "" }, { "id": 4, "time": "06/18/2024 14:08:32", "call_from": "Phillip Huff<1002>", "call_to": "Kristin Hale<2005>", "timestamp": 1718690912, "uid": "20240618140832625C1", "src_addr": "192.168.28.1", "duration": 18, "ring_duration": 18, "disposition": "BUSY", "call_type": "Internal", "reason": "dst forwarded ", "call_from_number": "1002", "call_from_name": "Phillip Huff", "call_to_number": "2005", "call_to_name": "Kristin Hale", "call_id": "1718690912.7", "call_note": null, "call_note_id": "", "enb_call_note": 0, "did": "", "did_name": "" }, { "id": 5, "time": "06/18/2024 14:08:50", "call_from": "Phillip Huff<1002>", "call_to": "Voicemail Kristin Hale<2005>", "timestamp": 1718690930, "uid": "20240618140832625C1", "src_addr": "192.168.148.50:62746", "duration": 10, "talk_duration": 10, "disposition": "VOICEMAIL", "call_type": "Internal", "reason": "src hangup ", "call_from_number": "1002", "call_from_name": "Phillip Huff", "call_to_number": "2005", "call_to_name": "Kristin Hale", "call_id": "1718690912.7", "call_note": null, "call_note_id": "", "enb_call_note": 0, "did": "", "did_name": "" } ] }