1.1 接口说明

云客服系统提供通话事件推送功能(双向呼叫时,暂不支持推送通话事件)。云客服系统会请求第三方配置的url,并将通话事件数据以HTTP(POST)的方式推送给第三方系统。

1.2 对接步骤

管理员坐席登陆云客服,点击左下角进入设置页面

第一步:设置 —> 对接 —> 接口对接 —> 添加

第二步:启用添加的通话记录推送接口

1.3 数据类型说明

1.3.1 坐席外呼叫事件

假设配置的url为:http://127.0.0.1:8084/third/data
请求方式:post
请求body参数如下:

序号 名称 类型 是否必填 说明
1 call_id String 通话id
2 queue_id String
3 remark String 备注
4 session_id String 会话id, 唯一标识
5 type String 状态转换类型
6 dir String 表示上行数据还是下行数据取值:
UP:上行数据
DN:下行数据
7 command String 外呼呼叫事件:
callout_process 呼叫坐席中;
call_process 呼叫客户中; call_talking 客户接听并开始通话; call_hangup 坐席通话结束
8 agent_num String 发起外呼的坐席工号
9 calldirection String “call out”标识外呼业务
10 agent_type int 座席接听方式
11 tenant_id String 租户编号
12 dnis String 被叫
13 call_result int twc返回的外呼通话结果:0,成功 1、2线路不通
14 ani String 外呼时主叫号码; 外显号码或者业务号码

1.3.1.1 坐席外呼叫事件- agentDialout()-UP 上行数据

{
    "tenant_id": "acf528a2-d0e2-4a7b-8513-74cb3995cfab",
    "remark": "http://10.10.21.182:9099/third/push/data",
    "dir": "UP",
    "agent_num": "8014",
    "command": "agentDialout",
    "agent_type": 0,
    "call_result": -1
}

1.3.1.2 坐席外呼叫事件- agentDialout() -DN 下行数据

{
    "tenant_id": "acf528a2-d0e2-4a7b-8513-74cb3995cfab",
    "session_id": "491e1dc5-17c6-493f-c97a-09f73322f8a1",
    "remark": "http://10.10.21.182:9099/third/push/data",
    "type": "response",
    "dir": "DN",
    "agent_num": "8014",
    "command": "agentDialout",
    "call_id": "2a2ca648-c9e1-42f4-c2e5-30536ca610b6",
    "agent_type": 0,
    "call_result": -1
}

1.3.1.3 坐席外呼叫事件- agentstatus -坐席状态变更

{
    "tenant_id": "acf528a2-d0e2-4a7b-8513-74cb3995cfab",
    "remark": "http://10.10.21.182:9099/third/push/data",
    "type": "event",
    "dir": "DN",
    "agent_num": "8014",
    "command": "agentstatus",
    "agent_type": 0,
    "call_result": -1
}

1.3.1.4 坐席外呼叫事件- callout_process 呼叫坐席中

{
    "tenant_id": "acf528a2-d0e2-4a7b-8513-74cb3995cfab",
    "session_id": "491e1dc5-17c6-493f-c97a-09f73322f8a1",
    "remark": "http://10.10.21.182:9099/third/push/data",
    "type": "event",
    "dir": "DN",
    "agent_num": "8014",
    "command": "callout_process",
    "call_id": "2a2ca648-c9e1-42f4-c2e5-30536ca610b6",
    "agent_type": 0,
    "calldirection": "call out",
    "dnis": "15991752045",
    "ani": "02863208372",
    "call_result": -1
}

1.3.1.4 坐席外呼叫事件- call_process - 呼叫客户中

{
    "tenant_id": "acf528a2-d0e2-4a7b-8513-74cb3995cfab",
    "session_id": "491e1dc5-17c6-493f-c97a-09f73322f8a1",
    "remark": "http://10.10.21.182:9099/third/push/data",
    "type": "event",
    "dir": "DN",
    "agent_num": "8014",
    "command": "call_process",
    "call_id": "2a2ca648-c9e1-42f4-c2e5-30536ca610b6",
    "agent_type": 0,
    "calldirection": "call out",
    "dnis": "15991752045",
    "ani": "02863208372",
    "call_result": -1
}

1.3.1.5 坐席外呼叫事件- call_talking - 接听

{
    "tenant_id": "acf528a2-d0e2-4a7b-8513-74cb3995cfab",
    "session_id": "491e1dc5-17c6-493f-c97a-09f73322f8a1",
    "remark": "http://10.10.21.182:9099/third/push/data",
    "type": "event",
    "dir": "DN",
    "agent_num": "8014",
    "command": "call_talking",
    "call_id": "2a2ca648-c9e1-42f4-c2e5-30536ca610b6",
    "agent_type": 0,
    "calldirection": "call out",
    "dnis": "15991752045",
    "ani": "02863208372",
    "call_result": -1
}

1.3.1.6 坐席外呼叫事件- call_hangup - 挂机

{
    "tenant_id": "acf528a2-d0e2-4a7b-8513-74cb3995cfab",
    "session_id": "491e1dc5-17c6-493f-c97a-09f73322f8a1",
    "remark": "http://10.10.21.182:9099/third/push/data",
    "type": "event",
    "dir": "DN",
    "agent_num": "8014",
    "command": "call_hangup",
    "call_id": "2a2ca648-c9e1-42f4-c2e5-30536ca610b6",
    "agent_type": 0,
    "calldirection": "call out",
    "dnis": "15991752045",
    "ani": "02863208372",
    "call_result": -1
}

1.3.2 坐席来电呼叫事件

假设配置的url为:http://127.0.0.1:8084/third/data
请求方式:post
请求body参数如下:

序号 名称 类型 是否必填 说明
1 call_id String 通话id
2 queue_id String
3 remark String 备注
4 session_id String 会话id, 唯一标识
5 type String 状态转换类型
6 dir String 表示上行数据还是下行数据取值:
UP:上行数据
DN:下行数据
7 command String 外呼呼叫事件:
callout_process 呼叫坐席中;
call_process 呼叫客户中; call_talking 客户接听并开始通话; call_hangup 坐席通话结束
8 agent_num String 发起外呼的坐席工号
9 calldirection String “call in”标识外呼业务
10 agent_type String 座席接听方式
11 tenant_id String 租户编号
12 dnis String 被叫
13 call_result int twc返回的外呼通话结果:0,成功 1、2线路不通
14 ani String 外呼时主叫号码; 外显号码或者业务号码

1.3.2.1 坐席来电事件- agentDialout()-UP 上行数据

{
    "tenant_id": "acf528a2-d0e2-4a7b-8513-74cb3995cfab",
    "remark": "http://10.10.21.182:9099/third/push/data",
    "type": "event",
    "dir": "DN",
    "agent_num": "8014",
    "command": "agentstatus",
    "agent_type": 0,
    "call_result": -1
}

1.3.2.2 坐席来电事件-incoming - 坐席来电事件

{
    "tenant_id": "acf528a2-d0e2-4a7b-8513-74cb3995cfab",
    "session_id": "d13606a0-0f43-11ee-be46-5159e7892b86",
    "remark": "http://10.10.21.182:9099/third/push/data",
    "type": "event",
    "dir": "DN",
    "agent_num": "8014",
    "command": "incoming",
    "call_id": "caf98a77-a652-4b39-cbb3-38ec8ced5192",
    "agent_type": 0,
    "calldirection": "call in",
    "dnis": "02863208372",
    "ani": "15609288360",
    "queue_id": "7e42697c076c4ff5a05e464ac0f28c90",
    "call_result": -1
}

1.3.1.3 坐席来电事件- agentstatus -坐席状态变更

{
    "tenant_id": "acf528a2-d0e2-4a7b-8513-74cb3995cfab",
    "remark": "http://10.10.21.182:9099/third/push/data",
    "type": "event",
    "dir": "DN",
    "agent_num": "8014",
    "command": "agentstatus",
    "agent_type": 0,
    "call_result": -1
}

1.3.2.5 坐席来电事件- call_talking - 接听

{
    "tenant_id": "acf528a2-d0e2-4a7b-8513-74cb3995cfab",
    "session_id": "d13606a0-0f43-11ee-be46-5159e7892b86",
    "remark": "http://10.10.21.182:9099/third/push/data",
    "type": "event",
    "dir": "DN",
    "agent_num": "8014",
    "command": "call_hangup",
    "call_id": "caf98a77-a652-4b39-cbb3-38ec8ced5192",
    "agent_type": 0,
    "calldirection": "call in",
    "dnis": "02863208372",
    "ani": "15609288360",
    "queue_id": "7e42697c076c4ff5a05e464ac0f28c90",
    "call_result": -1
}

1.3.2.6 坐席来电叫事件- call_hangup - 挂机

{
    "tenant_id": "acf528a2-d0e2-4a7b-8513-74cb3995cfab",
    "session_id": "491e1dc5-17c6-493f-c97a-09f73322f8a1",
    "remark": "http://10.10.21.182:9099/third/push/data",
    "type": "event",
    "dir": "DN",
    "agent_num": "8014",
    "command": "call_hangup",
    "call_id": "2a2ca648-c9e1-42f4-c2e5-30536ca610b6",
    "agent_type": 0,
    "calldirection": "call out",
    "dnis": "15991752045",
    "ani": "02863208372",
    "call_result": -1
}

1.3.3 坐席切换

{
    "tenant_id": "acf528a2-d0e2-4a7b-8513-74cb3995cfab",
    "remark": "http://10.10.21.182:9099/third/push/data",
    "dir": "UP",
    "agent_num": "8014",
    "command": "setAgentType",
    "agent_type": 6,
    "call_result": -1
}

1.3.3 坐席登录

{
    "tenant_id": "acf528a2-d0e2-4a7b-8513-74cb3995cfab",
    "remark": "http://10.10.21.182:9099/third/push/data",
    "type": "event",
    "dir": "DN",
    "agent_num": "6666",
    "command": "agentstatus",
    "agent_type": 0,
    "call_result": -1
}

不在上述范围内的暂不关注

文档更新时间: 2024-11-08 15:36   作者:admin