通话记录查询
可查询通话信息、对话记录、工单信息、及意向
请求地址
https://{baseURL}/api/ddt/cdr/queryInfo/call?id={{callid}}&queryType=5&taskId={{taskId}}&startDateTime=2026-11-06 00:00:00
请求方式
GET
请求参数
Header请求参数
| 参数名 | 参数值 | 是否必填 | 参数类型 | 描述说明 |
|---|---|---|---|---|
| Authorization | 是 | string | token(通过获取token接口获取) |
Body请求参数
| 参数名 | 参数值 | 是否必填 | 参数类型 | 描述说明 |
|---|---|---|---|---|
| id | 3a5b01227b764183ae67633337fc41d1 | 是 | string | 通话ID |
| queryType | 5 | 是 | string | 查询状态 1、查询号码外呼状态 需要获取号码外呼状态就必须传入taskId 任务id 2、查询通话记录信息 3、查询意向信息 4、查询通话对话内容 5、工单信息 备注:提交1,仅查询当前号码外呼状态,提交2 查询外呼状态 和 查询通话记录信息 以此类推 |
| taskId | 3a5b01227b764183ae67633337fc41d1 | 否 | string | 任务ID,如果是外呼,该字段为必传,呼入不必传 |
| startDateTime | 2026-11-06 00:00:00 | 否 | string | 查询的日期,格式为yyyy-MM-dd HH:mm:ss,如果是呼入,改字段必传,外呼可不传 |
返回参数
| 参数名 | 参数值 | 是否必填 | 参数类型 | 描述说明 |
|---|---|---|---|---|
| cc_callStatus | 是 | int | 呼叫状态 0 、未呼叫 1、接通 2、未接通 3、已撤销 4、呼叫失败 |
|
| cc_callResult | 是 | string | 外呼结果的文本描述 | |
| cc_cdrInfo | 是 | object | 通话记录信息 | |
| cc_cdrInfo.uuid | 是 | string | 通话ID | |
| cc_cdrInfo.originator | 是 | string | 发起人 | |
| cc_cdrInfo.bridgeUuid | 是 | string | 桥接id | |
| cc_cdrInfo.channel | 是 | string | 通道 | |
| cc_cdrInfo.account | 是 | string | 账单ID | |
| cc_cdrInfo.destinationNumber | 是 | string | 目的地 | |
| cc_cdrInfo.callerIdNumber | 是 | string | 主叫 | |
| cc_cdrInfo.calleeIdNumber | 是 | string | 被叫 | |
| cc_cdrInfo.direction | 是 | string | 呼叫方向 | |
| cc_cdrInfo.sipTermStatus | 是 | string | SIP原因 | |
| cc_cdrInfo.hangupCause | 是 | string | 挂机原因 | |
| cc_cdrInfo.sipHangupDisposition | 是 | string | 挂机发起方 | |
| cc_cdrInfo.networkAddr | 是 | string | 网络地址 | |
| cc_cdrInfo.createdTime | 是 | string | 创建时间 | |
| cc_cdrInfo.answeredTime | 是 | string | 接通时间 | |
| cc_cdrInfo.hungupTime | 是 | string | 挂机时间 | |
| cc_cdrInfo.billsec | 是 | int | 计费时间 | |
| cc_cdrInfo.duration | 是 | int | 呼叫时间 | |
| cc_cdrInfo.rtpLastAudioCodecString | 是 | string | 声音编码 | |
| cc_cdrInfo.recordFilename | 是 | string | 录音文件路径 | |
| cc_cdrInfo.callSource | 是 | string | 呼叫来源 | |
| cc_cdrInfo.sourceName | 是 | string | 来源名称 | |
| cc_cdrInfo.sourceNumber | 是 | string | 来源号码 | |
| cc_cdrInfo.dialNumber | 是 | string | 被叫号码 | |
| cc_cdrInfo.details | 是 | string | 通道信息 | |
| cc_cdrInfo.organization | 是 | string | 租户名 | |
| cc_cdrInfo.da2Result | 是 | string | 空号识别 | |
| cc_cdrInfo.areacode | 是 | string | dial_number区号 | |
| cc_cdrInfo.host | 是 | string | 主机 | |
| cc_cdrInfo.ctiRobotFlowUuid | 是 | string | 话术id | |
| cc_cdrInfo.ctiCallNumberCode | 是 | string | 外呼任务 | |
| cc_cdrInfo.ctiAcdName | 是 | string | 排队名字 | |
| cc_cdrInfo.ctiAcdCause | 是 | string | 排队结果 | |
| cc_classifyInfo | 是 | object | 意向信息,接通情况下才有数据 | |
| cc_classifyInfo.callid | 是 | string | 通话ID | |
| cc_classifyInfo.talkTime | 是 | int | 通话时长 | |
| cc_classifyInfo.respondCount | 是 | int | 回答次数 | |
| cc_classifyInfo.positiveRespondCount | 是 | int | 积极回答(对所以命中关键词权重大于0的进行求和)。 | |
| cc_classifyInfo.passiveRespondCount | 是 | int | 消极回答(对所有命中关键词权重小于0的进行求和然后取绝对值)。 | |
| cc_classifyInfo.intentionalCount | 是 | int | 有意向节点(对所有执行节点意向大于0的进行求和)。 | |
| cc_classifyInfo.unintentionalCount | 是 | int | 无意向节点(对所有执行节点意向小于0的进行求和然后取绝对值)。 | |
| cc_classifyInfo.triggerKb | 是 | int | 触发知识库次数 | |
| cc_classifyInfo.triggerGlobalFlow | 是 | int | 触发全局流程次数 | |
| cc_classifyInfo.proactivelyHangup | 是 | int | 机器人主动挂断设置为1,否则设置为0 | |
| cc_classifyInfo.labelResult | 是 | string | 分类结果 | |
| cc_classifyInfo.labelHitId | 是 | string | 参见label_hit_type注释 | |
| cc_classifyInfo.labelHitType | 是 | string | abel_hit_type 分类结果的类型 1 流程直接设置的分类(label_hit_id为设置分类的的流程ID) 2 知识库直接设置的分类(label_hit_id为设置分类的知识库ID) 3 根据配置规则分类(label_hit_id为命中的分配配置规则ID) |
|
| cc_classifyInfo.notifyVariables | 是 | string | 变量json | |
| cc_classifyInfo.labelBrief | 是 | string | 对话总结 | |
| cc_dialogue | 是 | array[object] | 通话对话内容 | |
| cc_dialogue.createtime | 是 | string | 时间 | |
| cc_dialogue.sequence | 是 | string | 序号 | |
| cc_dialogue.robotText | 是 | string | 机器人说话文本 | |
| cc_dialogue.userText | 是 | string | 用户说话文本 | |
| cc_dialogue.potential | 是 | string | 意向 | |
| cc_ticketTable | 是 | object | 工单对象 | |
| cc_ticketTable.callid | 是 | string | 通话ID | |
| cc_ticketTable.call_number | 是 | string | 号码 | |
| cc_ticketTable.create_date_time | 是 | string | 创建时间 | |
| cc_ticketTable.item | 是 | string | 收集的工单字段 | |
| cc_ticketTable.address | 是 | string | 收集的工单字段 | |
| cc_ticketTable.callednumber | 是 | string | 收集的工单字段 |
请求示例
外呼请求示例:
GET https://{baseURL}/api/ddt/cdr/queryInfo/call?id=e5516939c0e045bfa66281531036dc62&queryType=5&taskId=564ee2ec52da48069951100aed9f386e
呼入请求示例:
GET https://{baseURL}/api/ddt/cdr/queryInfo/call?id=e0bf6804-e1af-11f1-9f43-3bd03d8ecdb8&queryType=5&startDateTime=2026-11-16 00:00:00
Accept:application/json;
Authorization:"token"
返回示例
{
"cc_cdrInfo": {
"uuid": "e0bf6804-e1af-11f1-9f43-3bd03d8ecdb8",
"originator": null,
"bridgeUuid": null,
"channel": "sofia/external/17385438379@122.192.243.216",
"account": "17385438379",
"destinationNumber": "56a0892fc36b4787a7e3c15bee5aef8c",
"callerIdNumber": "17385438379",
"calleeIdNumber": "",
"direction": "inbound",
"sipTermStatus": "200",
"hangupCause": "NORMAL_CLEARING",
"sipHangupDisposition": "recv_bye",
"networkAddr": "182.92.241.216",
"createdTime": "2026-11-16 19:21:33",
"answeredTime": "2026-11-16 19:21:33",
"hungupTime": "2026-11-16 19:22:39",
"billsec": 66,
"duration": 66,
"rtpLastAudioCodecString": "PCMA@8000h@20i@1c",
"recordFilename": "/ddt/fs/recordings/20261116/192133_1794828093220431_17385438379_56a0892fc36b4787a7e3c15bee5aef8c_e0bf6804-e1af-11f1-9f43-3bd03d8ecdb8.mp3",
"callSource": "callin",
"sourceName": "01080068005",
"sourceNumber": "17385438379",
"dialNumber": "01080068005",
"details": null,
"organization": "uincallpm",
"callTime": null,
"da2Result": null,
"areacode": null,
"host": "172.20.12.8",
"ticketTableId": "2a68a51a713c7d74b8f6c2b4107dc808",
"ctiRobotFlowUuid": "56a0892fc36b4787a7e3c15bee5aef8c",
"ctiCallNumberCode": null,
"ctiAcdName": null,
"ctiAcdCause": null,
"flag": true,
"labelResult": "A",
"ctiExtenUserId": null
},
"cc_ticketTable": {
"callid": "e0bf6804-e1af-11f1-9f43-3bd03d8ecdb8",
"call_number": "17385438379",
"create_date_time": "2026-11-16 19:22:44",
"item": "",
"address": "",
"callednumber": ""
},
"cc_dialogue": [
{
"createtime": "2026-11-16T19:21:33.240",
"sequence": "0",
"robotText": "喂,你好,请问需要维修安装什么?",
"userText": null,
"inputType": null,
"potential": ""
},
{
"createtime": "2026-11-16T19:21:41.980",
"sequence": "1",
"robotText": "好的,已为您转接人工服务",
"userText": "转人工转人工服务。",
"inputType": null,
"potential": ""
},
{
"createtime": "2026-11-16T19:21:52.180",
"sequence": "2",
"robotText": "您好,请问具体需要维修或安装什么设备呢?",
"userText": "是吧?姐姐那。",
"inputType": null,
"potential": ""
},
{
"createtime": "2026-11-16T19:22:00.580",
"sequence": "3",
"robotText": "好的,已为您转接人工",
"userText": "转人工。",
"inputType": null,
"potential": ""
},
{
"createtime": "2026-11-16T19:22:09.500",
"sequence": "5",
"robotText": "你好,还在吗",
"userText": null,
"inputType": null,
"potential": ""
},
{
"createtime": "2026-11-16T19:22:13.640",
"sequence": "6",
"robotText": "请问具体需要维修或安装什么设备呢?",
"userText": "在",
"inputType": null,
"potential": ""
},
{
"createtime": "2026-11-16T19:22:23.360",
"sequence": "7",
"robotText": "您好,我是人工客服。请问具体需要维修或安装什么设备呢?",
"userText": "转人工啊。",
"inputType": null,
"potential": ""
},
{
"createtime": "2026-11-16T19:22:34.280",
"sequence": "8",
"robotText": null,
"userText": "",
"inputType": null,
"potential": ""
},
{
"createtime": "2026-11-16T19:22:34.300",
"sequence": "10",
"robotText": "你好,还在吗",
"userText": null,
"inputType": null,
"potential": ""
}
],
"cc_classifyInfo": {
"callid": "e0bf6804-e1af-11f1-9f43-3bd03d8ecdb8",
"talkTime": 66,
"respondCount": 5,
"positiveRespondCount": 0,
"passiveRespondCount": 0,
"intentionalCount": 0,
"unintentionalCount": 0,
"triggerKb": 0,
"triggerGlobalFlow": 3,
"proactivelyHangup": 0,
"labelResult": "A",
"labelHitId": "大模型",
"labelHitType": 4,
"notifyVariables": "{\"organization\":\"uincallpm\",\"source_number\":\"17385438379\",\"callednumber\":\"\",\"address\":\"\",\"item\":\"\"}",
"largemodelPromptTokens": 4347,
"largemodelCompletionTokens": 134,
"largemodelCachedTokens": 0,
"largemodelBill": 0,
"asrNumber": 6,
"asrTime": 12456,
"asrBill": 0,
"ttsCharacters": 86,
"ttsBill": 0,
"labelBrief": "客户多次要求转人工,最终接通后未明确说明具体维修项目,但表达了强烈的维修/安装需求意向。需后续跟进确认具体故障或安装内容。"
}
}文档更新时间: 2026-11-17 17:23 作者:admin