1.1 接口说明

在优音云客服系统中,可通过设置–>开发者中心,查看租户ID:tenant_id。
可通过 9.3查询通话记录V2.0 查询session_id。
根据tenant_id以及session_id进行呼叫会话记录详情查询

1.2 调用形式

https://ykf.uincall.com/openapi/call/v2/detail/{session_id}?tenant_id=acf528a2-d0e2-4a7b-8513-74cb399xxxxx&access_token=670253572927b24acffc41078ddxxxxx

1.3 调用方式

GET

1.4 传入参数

非必填参数,调用接口时请传递参数名,参数值可为空

序号 名称 类型 是否必填 说明
1 session_id String 呼叫会话记录id
2 call_type int call_type=5对应云客服中语音通话高级搜索中呼叫类型为“API语音通知”筛选条件
3 ver=1 int ver=1回应参数增加:hangup_reason字段、hangup_party字段;

1.5 回应参数

序号 名称 类型 是否必填 说明
1 errcode Number 状态码:0成功,及其他非0错误码,详见错误码列表
2 errmsg String 状态说明
3 data Object数组 结果集
3.1 session_id String 呼叫会话记录id
3.2 tags String 通话标签:无值为null,有值为具体JSON数据,举例:
“tags”: { “tags”: [[“992c7700f52e5ca72a46a357d46599e5”],[ “895e681f1595de8bec31b6cbc702309a”,”8803ff165bd907013322b768542adc6c” ] ]}
3.3 summary String 备注
3.4 call_direction String 呼叫方向:呼入 call in / 1 呼出 call out
3.5 ignore_times Number 连续未接来电次数,只有呼入(call in)有值(值为大于等于0);呼出值为null
3.6 satisfaction String 值范围: 1 / 2 / 3 / 4,对应通话详情页面显示值
3.7 record_file String 无值为null,有值为具体录音文件地址
3.8 lists String 呼叫会话记录数据中包含的各呼叫片段数据
3.8.1 id String 呼叫片段id
3.8.2 customer_id String 无关联的客户时为null
3.8.3 truename String 客户名称,场景1、customer_id为空, 当multi_match=true时, 为“多个匹配客户”,否则“未知客户”;
场景2、customer_id不为空,关联的客户姓名为空则为“未知客户”,不为空则为客户名称
3.8.4 app_type String 应用类型
loginout:机呼入签入签出业务
callmemory:外呼来电记忆业务
app:IVR业务
queue:技能组业务
agent:座席业务
3.8.5 service_type String 服务类型(IVR: IVR, queue:技能组,agent:座席,loginout:登出)
3.8.6 bussiness_num String 业务号码
3.8.7 alterting_time String 来电(外呼)开始处理的时间点
3.8.8 service_time String 服务时长(秒)
3.8.9 service_start_time String 服务开始时间
3.8.10 service_stop_time String 服务结束时间
3.8.11 queue_time Number 排队时长,单位秒,大于等于0的值
3.8.12 ringing_time Number 振铃时间(秒)
3.8.13 answer_time String 接听时间
3.8.14 ani String 主叫手机号查询
3.8.15 ani_place String 主叫号码归属地
3.8.16 dnis String 被叫手机号查询
3.8.17 dnis_place String 被叫号码归属地
3.8.18 call_direction String 呼叫方向:呼入 call in / 1 呼出 call out
3.8.19 title String 服务品质标签
3.8.20 agent_num String 座席工号
3.8.21 agent_name String 座席名称
3.9 app_node_list Object数组 呼叫轨迹。举例:
“app_node_list”: { “rows”: [{“recDesc”: “响铃”, “starttime”: “2023-03-10 18:14:18”,”command”: “座席:张三(1001)[1001]”},{“recDesc”: “接听”,”color”: “#0bbd87”,”starttime”: “2023-03-10 18:14:25”,”command”: “座席:张三(1001)[1001]”},{“recDesc”: “挂机”,”starttime”: “2023-03-10 18:15:48”,”command”: “挂机”}]}
3.10 is_repeat Boolean 是否重复:true/false
3.11 cycle_period Number 重复来电周期:无值时为null,有值为具体数字,如0 / 24 / 48
3.12 call_in_today_num Number 当日呼入次数
3.13 call_in_all_num Number 总呼入次数
3.14 associate_datas Object数组 随录数据,无值为空数组[];有值时为JSON数组;举例:
“associate_datas”: [{“agent_num”: 1001,”agent_name”: “张三(1001)”,”remark”: “电话测试备注2”,”submit_at”: “2023-03-10 11:33:42”},{“agent_num”: 1001,”agent_name”: “张三(1001)”,”remark”: “电话测试”,”submit_at”: “2023-03-10 11:33:28”}
3.15 hangup_reason Number 挂机原因:
1 有座席已接听来电(不代表转接的座席也接听来电);
-1 振铃未接听来电;-2 黑名单导致来电挂断;
2 排队放弃;
3 已留言;
4 IVR;
5 外呼失败
当接听状态为空号时,hangup_reason为以下值:
点击查看详情
430:空号
431:关机
432:停机
433:正在通话
434:无人接听
435:号码有误
436:号码过期
437:用户忙
438:暂停服务
439:呼叫等待
440:来电提醒
441:不方便接听
442:免打扰
443:本地号码
444:外地号码
445:呼转不成功/多次呼转
446:线路忙
447:欠费
448:网络忙
449:稍后再拨
450:线路故障
451:呼入限制
452:黑名单
453:呼叫超频
454:不在服务区
455:呼叫受限
500:数据配置有误
501:通信异常
502:坐席未接听
503:频次限制
504:防骚扰拦截
505:业务号码状态异常
3.16 hangup_party String 挂断方:1-客户挂断、2-坐席挂断、4-系统挂断 无值默认空字符串
3.17 remark String remark

1.6 使用样例

调用

请求

http://127.0.0.1:8008/openapi/call/v2/detail/13a541ae-xxxx-xxxx-xxxx-xxxxxxx65eb?tenant_id=acf528a2-d0e2-4a7b-8513-74cb3995cfab&access_token=7a62xxxxxxxxxxxxxxxxxxxx8fc9

响应

{
    "errcode": 0,
    "errmsg": "success",
"data": {
        "session_id": "676dxxxx-xxxx-xxxx-xxxx-xxxxxxxxb334",
        "call_type": "4",
        "hangup_reason": 5,
        "tags": {
            "tags": [
                [
                    "992cxxxxf52exxxx2a46xxxxxxxx99e5"
                ],
                [
                    "895exxxx1595xxxxec31xxxxxxxx309a",
                    "8803xxxx5701xxxxb768xxxxdc6c"
                ]
            ]
        },
        "remark": "",
        "summary": "备注",
        "call_direction": "call out",
        "satisfaction": 2,
        "record_file": "https://域名:port/ykfRecord?url=2023/03/10/02811111111/02811111111_676dxxxx-xxxx-xxxx-xxxx-xxxxxxxxb334_13000000000_02811111111__20230310181425_dr.wav",
        "lists": [
            {
                "id": "6f67xxxx-xxxx-xxxx-xxxx-xxxxxxxxa0f7",
                "customer_id": "",
                "customer_name": "多个匹配客户",
                "app_type": "agent",
                "service_type": "dialout",
                "bussiness_num": "02811111111",
                "alterting_time": "2023-03-10 18:14:18",
                "service_time": 90,
                "service_start_time": "2023-03-10 18:14:18",
                "service_stop_time": "2023-03-10 18:15:48",
                "ani": "02811111111",
                "ani_place": "四川成都",
                "dnis": "13000000000",
                "dnis_place": "北京",
                "call_direction": "call out",
                "ringing_time": 7
            }
        ],
        "app_node_list": {
            "rows": [
                {
                    "recDesc": "响铃",
                    "starttime": "2023-03-10 18:14:18",
                    "command": "座席:张三(1001)[1001]"
                },
                {
                    "recDesc": "接听",
                    "color": "#0bbd87",
                    "starttime": "2023-03-10 18:14:25",
                    "command": "座席:张三(1001)[1001]"
                },
                {
                    "recDesc": "挂机",
                    "starttime": "2023-03-10 18:15:48",
                    "command": "挂机"
                }
            ]
        },
        "is_repeat": false,
        "cycle_period": null,
        "call_in_today_num": 0,
        "call_in_all_num": 0,
        "associate_datas": [
            {
                "agent_num": 1001,
                "agent_name": "张三(1001)",
                "remark": "电话测试备注2",
                "submit_at": "2023-03-10 11:33:42"
            },
            {
                "agent_num": 1001,
                "agent_name": "张三(1001)",
                "remark": "电话测试备注1",
                "submit_at": "2023-03-10 11:33:28"
            }
        ],
    }
}
文档更新时间: 2024-03-25 15:22   作者:admin