2.6 接听

应用场景:来电后

标识(key):answer

传入参数(data):

序号 名称 类型 是否必填 说明
1 id String 对接ID

注:手机及话机登录时,接听事件不生效。

示例代码:
//接听
function answer() {
  if (mode !== '4') {
    alert('此登录方式,无法使用接听')
    return;
  }
  let obj = {
    key: 'answer',
    data: {
      id: phoneId, // 对接ID
    }
  }
  telephoneFunction(obj);
}
接听的回调事件说明:
{
    "key": "CTIEvent",
    "name": "通话信令",
    "data": {
        "callid": "ad981bdb-xxxx-xxxx-xxxx-39020240db6e",
        "agentnum": "1007",
        "queueid": "d85f1989xxxx-xxxx-xxxx24dbf5a6f2919",
        "calldirection": "call in",
        "tenantid": "acf528a2-xxxx-xxxx-xxxx-74cb3995cfab",
        "memo": "02863208372",
        "sessionid": "1c2cf6d6-xxxx-xxxx-xxxx-351a97506288",
        "dnis": "02863208372",
        "type": "event",
        "ani": "131xxxxxxxx",
        "command": "incoming" // 来电事件
    }
}

{
    "key": "CTIEvent",
    "name": "通话信令",
    "data": {
        "callid": "b87777ca-xxxx-xxxx-xxxx-46e85e2156b6",
        "agentnum": "1007",
        "queueid": "d85f19895xxxx-xxxx-xxxxe24dbf5a6f2919",
        "calldirection": "call in",
        "tenantid": "acf528a2-xxxx-xxxx-xxxx-74cb3995cfab",
        "memo": "02863208372",
        "sessionid": "a2f508de-xxxx-xxxx-xxxx-351a97506288",
        "dnis": "02863208372",
        "type": "event",
        "ani": "131xxxxxxxx",
        "command": "call_talking" // 接听后,双方通话中事件
    }
}
文档更新时间: 2024-09-24 14:31   作者:admin