2.4 外呼

应用场景:登录后

标识(key):callOut

传入参数(data):

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

序号 名称 类型 是否必填 说明
1 id String 对接ID
2 telephone String 被叫号码
3 remark Object 扩展字段
示例代码:
//外呼
function callOut(phoneNum) {
  let obj = {
    key: 'callOut',
    data: {
      id: phoneId, // 对接ID
      telephone: phoneNum, // 被叫号码
      remark: {‘a’:’b’,’c’:’d’}, // 扩展字段
    }
  }
  telephoneFunction(obj);
}
外呼的回调事件说明:
{
    "key": "CTIResponse",
    "name": "通话信令",
    "data": {
        "agentnum": "1007",
        "tenantid": "acf528a2-xxxx-xxxx-xxxx-74cb3995cfab",
        "type": "response",
        "command": "agentDialout", // 外呼事件
        "retmsg": "succed!",
        "retcode": 200
    }
}

{
    "key": "CTIEvent",
    "name": "通话信令",
    "data": {
        "callid": "c52bf3f5-xxxx-xxxx-xxxx-2ecaaf3a15d3", // 通话id
        "agentnum": "1007",
        "calldirection": "call out", // 呼叫方向,call out 呼出,call in 呼入
        "tenantid": "acf528a2-xxxx-xxxx-xxxx-74cb3995cfab",
        "memo": "02863208372", // 外呼显示号码
        "sessionid": "2480aabb-xxxx-xxxx-xxxx-43c380efe62f", // 通话session-id
        "dnis": "131xxxxxxxx", // 被叫号码
        "type": "event",
        "ani": "02863208372", // 主叫号码
        "command": "callout_process" // 呼叫中事件
    }
}

{
    "key": "CTIEvent",
    "name": "通话信令",
    "data": {
        "callid": "c52bf3f5-xxxx-xxxx-xxxx-2ecaaf3a15d3",
        "agentnum": "1007",
        "calldirection": "call out",
        "tenantid": "acf528a2-xxxx-xxxx-xxxx-74cb3995cfab",
        "memo": "02863208372",
        "sessionid": "2480aabb-xxxx-xxxx-xxxx-43c380efe62f",
        "dnis": "131xxxxxxxx",
        "type": "event",
        "ani": "02863208372",
        "command": "call_process" // 被叫响铃事件
    }
}
{
    "key": "CTIEvent",
    "name": "通话信令",
    "data": {
        "callid": "c52bf3f5-xxxx-xxxx-xxxx-2ecaaf3a15d3",
        "agentnum": "1007",
        "calldirection": "call out",
        "tenantid": "acf528a2-xxxx-xxxx-xxxx-74cb3995cfab",
        "memo": "02863208372",
        "sessionid": "2480aabb-xxxx-xxxx-xxxx-43c380efe62f",
        "dnis": "131xxxxxxxx",
        "type": "event",
        "ani": "02863208372",
        "command": "call_talking" // 被叫接听了,双方通话中事件
    }
}
{
    "key": "MobilesCityApi", //根据号码查询归属地信息,外呼和来电都会有此回调
    "name": "电话归属信息",
    "data": {
        "areaCode": "610100",
        "code": "029",
        "131xxxxxxxx": {
            "code": "029",
            "province": "陕西",
            "city": "西安"
        }
    }
}
文档更新时间: 2024-08-28 14:30   作者:admin