2.27 监听座席
应用场景:未通话时,监听通话中的座席,实时掌握沟通情况
标识(key):monitorAgent
传入参数(data):
序号 | 名称 | 类型 | 是否必填 | 说明 |
---|---|---|---|---|
1 | id | String | 是 | 对接ID |
2 | agent_num | String | 是 | 座席工号,可在通话中座席列表获取 |
3 | phoneType | Number | 是 | 座席接听方式,可在通话中座席列表获取 |
示例代码:
//电话条监听座席
function monitorAgent() {
let obj = {
key: 'monitorAgent',
data: {
id: phoneId, // 对接ID
agent_num: '8004', //座席工号,可在通话中座席列表获取(详见3.2.26)
phoneType: 6, // 座席接听方式,可在通话中座席列表获取(详见3.2.26)
}
}
telephoneFunction(obj);
}
1.监听事件发送后会收到监听成功或失败的回调事件,示例如下:
{
"key": "CTIResponse",
"name": "通话信令",
"data": {
"agentnum": "1007",
"tenantid": "acf528a2-xxxx-xxxx-xxxx-74cb3995cfab",
"type": "response",
"managedagentnum": "8004",
"retmsg": "succed!",// 监听失败时,会返回具体的原因
"command": "agentMonitor",
"retcode": 200, // 200代表监听成功,非200代表监听失败
},
"dest": "ykf.telephoneBar"
}
2.收到监听成功的回调事件后收到监听振铃monitor_incoming回调事件,示例如下:
{
"key": "CTIEvent",
"name": "通话信令",
"data": {
"agentnum": "1007",
"calldirection": "call in",
"tenantid": "acf528a2-xxxx-xxxx-xxxx-74cb3995cfab",
"memo": "025xxxx3191",
"msgSeq": 125,
"dnis": "025xxxx3191",
"sessionid": "7274ed22-xxxx-xxxx-xxxx-cd20cd1e09dd",
"type": "event",
"ani": "159xxxx2045",
"command": "monitor_incoming"
},
"dest": "ykf.telephoneBar"
}
3.收到monitor_incoming回调事件后,需要answer才能监听到座席的通话,示例如下:
//接听
function answer() {
if (mode !== '4') {
alert('此登录方式,无法使用接听')
return;
}
let obj = {
key: 'answer',
data: {
id: phoneId, // 对接ID
}
}
telephoneFunction(obj);
}
文档更新时间: 2025-09-24 10:13 作者:admin