目录
事件推送接口
外呼振铃事件
接口说明
外呼座席侧振铃时推送相关信息,常用于处理外呼弹屏 配置方式:登录系统后,在设置-系统设置-对接设置-事件推送中添加推送地址。 支持推送至多个地址
推送参数
| 字段名称 | 字段类型 | 字段描述 |
|---|---|---|
| accountId | string | 账户编号 |
| customerNumber | string | 用户号码 |
| trunkNumber | string | 服务号 |
| displayNumber | string | 外显号码 |
| statusTime | string | 状态开始时间 |
| callEvent | string | 事件类型 呼叫:calling,振铃:ring,接通:link,挂机:hangup |
| callType | string | 通话类型 呼入:incoming,外呼:dialout,webcall,预览外呼:previewDialout,自动外呼:autoDialout |
| agentNumber | string | 坐席工号 |
| agentName | string | 座席名称 |
| extras | Object | 外呼自定义参数 |
| callUniqueId | string | 通话id |
| eventUniqueId | string | 事件id |
推送示例
{
"eventUniqueId": "8757e994f19040749c5b194faaf21c78",
"accountId": "20000153",
"callUniqueId": "403344537650466816",
"pushType": "dialoutRing",
"customerNumber": "17319132391",
"trunkNumber": "",
"displayNumber": "01081400192",
"statusTime": "1620455977",
"callEvent": "ring",
"callType": "dialout",
"agentNumber": "20001",
"agentName": "sc的坐席",
"extras": ""
}
外呼挂机事件
接口说明
外呼通话结束后推送相关信息 配置方式:登录系统后,在设置-系统设置-对接设置-事件推送中添加推送地址。 支持推送至多个地址
推送参数
| 字段名称 | 字段类型 | 字段描述 |
|---|---|---|
| accountId | string | 账户编号 |
| customerNumber | string | 用户号码 |
| trunkNumber | string | 服务号 |
| displayNumber | string | 外显号码 |
| statusTime | string | 状态开始时间 |
| callEvent | string | 事件类型 呼叫:calling,振铃:ring,接通:link,挂机:hangup |
| callType | string | 通话类型 呼入:incoming,外呼:dialout,webcall,预览外呼:previewDialout,自动外呼:autoDialout |
| agentNumber | string | 坐席工号 |
| agentName | string | 座席名称 |
| callUniqueId | string | 通话id |
| eventUniqueId | string | 事件id |
| extras | Object | 外呼自定义参数 |
| groupIdList | string[] | 外显号组id |
| groupNameList | string[] | 外显号组名称 |
推送示例
{
"eventUniqueId": "372e1067da2c40248d8f24425f2f5273",
"accountId": "20000153",
"callUniqueId": "403344537650466816",
"pushType": "dialoutHangup",
"customerNumber": "17319132391",
"trunkNumber": "",
"displayNumber": "01081400192",
"statusTime": "1620455987",
"callEvent": "hangup",
"callType": "dialout",
"agentNumber": "20001",
"extras": "",
"agentName": "sc的坐席",
"groupIdList": [""],
"groupNameList": [""]
}
来电振铃事件
接口说明
外呼通话结束后推送相关信息 配置方式:登录系统后,在设置-系统设置-对接设置-事件推送中添加推送地址。 支持推送至多个地址
推送参数
| 字段名称 | 字段类型 | 字段描述 |
|---|---|---|
| accountId | string | 账户编号 |
| customerNumber | string | 用户号码 |
| trunkNumber | string | 服务号 |
| displayNumber | string | 外显号码 |
| statusTime | string | 状态开始时间 |
| callEvent | string | 事件类型 呼叫:calling,振铃:ring,接通:link,挂机:hangup |
| callType | string | 通话类型 呼入:incoming,外呼:dialout,webcall,预览外呼:previewDialout,自动外呼:autoDialout |
| agentNumber | string | 坐席工号 |
| agentName | string | 座席名称 |
| extras | Object | 外呼自定义参数 |
| callUniqueId | string | 通话id |
| eventUniqueId | string | 事件id |
推送示例
{
"eventUniqueId": "e454d40def4d47ee9d7a76aba5d6cbb7",
"accountId": "20000153",
"callUniqueId": "403344537650466816",
"pushType": "callStatus",
"customerNumber": "17319132391",
"trunkNumber": "",
"displayNumber": "01081400192",
"statusTime": "1620455972",
"callEvent": "calling",
"callType": "dialout",
"agentNumber": "20001",
"agentName": "sc的坐席",
"statusName": "呼叫中",
"statusNumber": "2",
"extras": ""
}
来电挂机事件
接口说明
外呼通话结束后推送相关信息 配置方式:登录系统后,在设置-系统设置-对接设置-事件推送中添加推送地址。 支持推送至多个地址
推送参数
| 字段名称 | 字段类型 | 字段描述 |
|---|---|---|
| accountId | string | 账户编号 |
| customerNumber | string | 用户号码 |
| trunkNumber | string | 服务号 |
| displayNumber | string | 外显号码 |
| statusTime | string | 状态开始时间 |
| callEvent | string | 事件类型 呼叫:calling,振铃:ring,接通:link,挂机:hangup |
| callType | string | 通话类型 呼入:incoming,外呼:dialout,webcall,预览外呼:previewDialout,自动外呼:autoDialout |
| agentNumber | string | 坐席工号 |
| agentName | string | 座席名称 |
| extras | Object | 外呼自定义参数 |
| callUniqueId | string | 通话id |
| eventUniqueId | string | 事件id |
推送示例
{
"accountId":"2000100",
"superUniqueId":"393928840994361344",
"customerNumber":"17319132391",
"trunkNumber":"01080455499",
"displayNumber":"",
"statusTime":"1607944355",
"callEvent":"hangup",
"callType":"incoming",
"agentNumber":"2000",
"agentName":"默认坐席"
"eventUniqueId":"e454d40def4d47ee9d7a76aba5d6cbb7",
"callUniqueId":"403344537650466816"
}
通话记录推送事件
接口说明
来电和外呼结束,生成通话记录后产生的推送,常用于实时接收通话信息,保存通话记录时使用。 配置方式:登录系统后,在设置-系统设置-对接设置-事件推送中添加推送地址。 支持推送至多个地址
推送参数
| 字段名称 | 字段类型 | 字段描述 |
|---|---|---|
| accountId | string | 账户编号 |
| actionId | string | 动作id |
| agentAnswerTime | string | 座席接听应答时间 |
| agentAreacode | string | 座席区号 |
| agentCity | string | 座席城市 |
| agentCountry | string | 座席国籍 |
| agentCountryCode | string | 座席国家编号 |
| agentFileUrl | string | 座席侧录音 |
| agentNumber | string | 坐席工号 |
| agentProvince | string | 座席省份 |
| agentRingDuration | string | 座席振铃时间 座席应答时间-呼叫座席时间 |
| agentStartTime | string | 开始呼叫座席时间 |
| agentTelNumber | string | 座席电话号码 |
| agentTelType | string | 座席电话号码类型 |
| bridgeDuration | string | 通话时长 挂机时间-桥接时间 |
| bridgeTime | string | 桥接时间(呼入的话一般是播报完工号的时刻,外呼一般是用户应答的时刻) |
| callId | string | 发起者通道的callId |
| callType | string | Cdr类型 |
| createTime | string | 创建时间 |
| customerAnswerTime | string | 用户接听应答时间 |
| customerAreaCode | string | 用户地区区号 |
| customerCity | string | 用户城市 |
| customerCountry | string | 用户国籍 |
| customerCountryCode | string | 用户国籍编码 |
| customerFileUrl | string | 用户侧录音 |
| customerNumber | string | 用户号码 |
| customerNumberType | string | 用户号码类型 |
| customerProvince | string | 用户省份 |
| customerRingDuration | string | 用户振铃时长 呼入0 外呼:用户应答时间-呼叫用户时间 |
| customerStartTime | string | 开始呼叫用户时间 |
| displayNumber | string | 外显号码 |
| endTime | string | 通话结束时间 有满意度时是满意度结束时间 没有时是挂机时间 |
| failureReason | string | 失败原因 forbidden(禁止呼叫) serviceUnavailable(服务不可用) cancel(请求中止) requestTimeout(呼叫超时) unknow(未识别) decline(被叫未接听) |
| gatewayIP | string | 出局网关IP |
| hangUpSide | string | 挂机方 |
| hangupTime | string | 挂机时间 |
| hotLineNumber | string | 热线号码 |
| id | string | 自增id |
| ivrId | string | IVR资源ID |
| ivrTime | string | 进入IVR时间 |
| joinQueueTime | string | 进入队列时间 |
| satisfyKeys | string | 满意度按键值记录 |
| loginType | string | 登录类型 |
| playNumberDuration | string | 拨工号时长 拨工号结束时间-拨工号开始时间 |
| queueNumber | string | 队列编号 |
| recordFileUrl | string | 录音文件地址 |
| recordType | string | 录音文件类型 normal(普通) doubleTrack(双轨) voiceMail(留言) |
| recordingDuration | string | 录音文件时长 |
| satisfyDuration | string | 满意度时长 |
| satisfyEndTime | string | 满意度结束时间 |
| satisfyIvrId | string | 满意度调查的IVR资源ID |
| satisfyStartTime | string | 满意度开始时间 |
| sipCode | string | 呼叫情况 SIP响应码 |
| startTime | string | 呼叫开始时间 |
| status | string | 接听状态 IVR:IVR节点 没有进技能组或座席接听 QUEUE_ABANDON:排队放弃、进入技能组 没有分配到座席 ANSWER:已接听 AGENT_NO_ANSWER:座席未接听 CUSTOMER_NO_ANSWER:外呼型用户未接听 CALL_TRANSFER:通话被转接 |
| callUniqueId | string | 通话id |
| relativeCallUniqueId | string | 转接前的通话id,用于定位转接通话 |
| eventUniqueId | string | 事件id |
| systemAnswerTime | string | 系统接听应答时间 |
| taskId | string | 任务id |
| totalDuration | string | 总呼叫时长(含满意度调查,不含咨询/转移/会议) 计算公式: 结束时间-呼叫开始时间 |
| trunkNumber | string | 中继号码 (呼入时的被叫) |
| virtualNumber | string | 虚拟号码,X号码 (AXB外呼时的主叫) |
| waitDuration | string | 等待时长 |
| ivrName | string | IVR资源名称 |
| queueName | string | 队列名称 |
| agentName | string | 座席名称 |
| agentId | string | 座席id |
| matchResult | string | 正则匹配结果 |
| customerId | string | 用户id |
| customerName | string | 用户名称 |
| _id | string | 主键id |
| saveTime | string | 保存时间 |
| uniqueId | string | 唯一标识 |
| extras | Object | 外呼自定义参数 |
| groupIdList | string[] | 外显号组id |
| groupNameList | string[] | 外显号组名称 |
| doubleTrackFileUrl | string | 双轨单文件路径 |
| voiceMailUrl | string | 留言录音路径 |
推送示例
{
"callUniqueId": "403344537650466816",
"accountId": "2100147",
"pushType":"cdr",
"actionId": "",
"agentAnswerTime": "2021-05-08 14:39:37",
"agentAreaCode": "010",
"agentCity": "北京",
"agentCountry": "中国",
"agentCountryCode": "86",
"agentFileUrl": "https://v7call-1256921685.cos.ap-beijing.myqcloud.com/v7-call-recording-beta/2100147/doubleTrack/20210508/2100147-20210508143942-17319132391-01081400192-20001-0-403344537650466816-doubleTrack-out.mp3",
"agentNumber": "20001",
"agentProvince": "北京",
"agentRingDuration": 5,
"agentStartTime": "2021-05-08 14:39:32",
"agentTelNumber": "18519117865",
"agentTelType": "mobile",
"applicationId": "",
"billCalls": ["2021-05-08 14:39:32|2021-05-08 14:39:37|2021-05-08 14:39:47|agent|01081400192|18519117865|20001|mobileInternal|86|010|北京|86|010|北京|out-bound-call-agent|PSTN", "2021-05-08 14:39:37|2021-05-08 14:39:42|2021-05-08 14:39:47|customer|01081400192|17319132391||mobileInternal|86|010|北京|86|010|北京|out-bound-customer|null"],
"bridgeDuration": 5,
"bridgeTime": "2021-05-08 14:39:42",
"callId": "635be250-10e9-4c60-93f7-32479dfe85e1",
"callType": "dialout",
"cdrType": "callRecord",
"createTime": "2021-05-08 14:39:48",
"customerAnswerTime": "2021-05-08 14:39:42",
"customerAreaCode": "010",
"customerCity": "北京",
"customerCountry": "中国",
"customerCountryCode": "86",
"customerFileUrl": "https://v7call-1256921685.cos.ap-beijing.myqcloud.com/v7-call-recording-beta/2100147/doubleTrack/20210508/2100147-20210508143942-17319132391-01081400192-20001-0-403344537650466816-doubleTrack-in.mp3",
"customerNumber": "17319132391",
"customerNumberType": "mobile",
"customerProvince": "北京",
"customerRingDuration": 5,
"customerStartTime": "2021-05-08 14:39:37",
"displayNumber": "01081400192",
"doubleTrackFileUrl": "",
"endTime": "2021-05-08 14:39:47",
"extras": "",
"gatewayIP": "172.31.15.12:32766",
"hangUpSide": "AGENT",
"hangupTime": "2021-05-08 14:39:47",
"hotLineNumber": "",
"ivrId": "",
"ivrTime": "",
"joinQueueTime": "",
"loginType": "PSTN",
"playNumberDuration": 0,
"queueNumber": "",
"recordFileUrl": "https://v7call-1256921685.cos.ap-beijing.myqcloud.com/v7-call-recording-beta/2100147/doubleTrack/20210508/2100147-20210508143942-17319132391-01081400192-20001-0-403344537650466816-doubleTrack.mp3",
"recordType": "doubleTrack",
"recordingDuration": 5,
"satisfyDuration": 0,
"satisfyEndTime": "",
"satisfyIvrId": "",
"satisfyStartTime": "",
"sipCode": 200,
"startTime": "2021-05-08 14:39:32",
"status": "ANSWER",
"systemAnswerTime": "2021-05-08 14:39:37",
"taskId": "",
"totalDuration": 15,
"trunkNumber": "",
"virtualNumber": "",
"waitDuration": 0,
"ivrName": "",
"queueName": "",
"agentName": "sc的坐席",
"agentId": "6094f5aa696609001197e4b9",
"matchResult": "000",
"customerId": "",
"customerName": "",
"saveTime": "2021-05-08 14:39:48",
"groupIdList": ["60541bbf4aab2c0021278ad2", "605be962a342660011ecc5af"],
"groupNameList": ["分组1", "分组2"],
"eventUniqueId": "0db0948a14ea4b7eaa719f1f2501d142",
"satisfyKeys": [],
"voiceMailUrl":"https://v7call-1256921685.cos.ap-beijing.myqcloud.com/v7-call-recording-beta/2100147/doubleTrack/20210508/2100147-20210508143942-17319132391-01081400192-20001-0-403344537650466816-doubleTrack.mp3"
}
用户接通事件
接口说明
外呼 来电通话接通后推送相关信息 配置方式:登录系统后,在设置-系统设置-对接设置-事件推送中添加推送地址。 支持推送至多个地址
推送参数
| 字段名称 | 字段类型 | 字段描述 |
|---|---|---|
| content | object | 发送内容 |
| accountId | string | 账户编号 |
| customerNumber | string | 用户号码 |
| trunkNumber | string | 服务号 |
| displayNumber | string | 外显号码 |
| statusTime | string | 状态开始时间 |
| callEvent | string | 事件类型 呼叫:calling,振铃:ring,接通:link,挂机:hangup |
| callType | string | 通话类型 呼入:incoming,外呼:dialout,webcall,预览外呼:previewDialout,自动外呼:autoDialout |
| agentNumber | string | 坐席工号 |
| agentName | string | 座席名称 |
| extras | Object | 外呼自定义参数 |
| callUniqueId | string | 通话id |
| eventUniqueId | string | 事件id |
推送示例
{"content":
{
"accountId":"2100147",
"superUniqueId":"393928840994361344",
"customerNumber":"15201277786",
"trunkNumber":"",
"displayNumber":"02258834811",
"statusTime":"1616638064",
"callEvent":"link",
"callType":"dialout",
"extras":"",
"agentNumber":"1121",
"agentName":"1121"
},
"uniqueId":"92fe6e957421411c9343fdef75411ca1"
}
坐席状态变化事件
接口说明
坐席登录通话接通等状态推送相关信息 配置方式:登录系统后,在设置-系统设置-对接设置-事件推送中添加推送地址。 支持推送至多个地址
推送参数
| 字段名称 | 字段类型 | 字段描述 |
|---|---|---|
| accountId | string | 账户编号 |
| customerNumber | string | 用户号码 |
| trunkNumber | string | 服务号 |
| displayNumber | string | 外显号码 |
| statusTime | string | 状态开始时间 |
| callEvent | string | 事件类型 呼叫:calling,振铃:ring,接通:link,挂机:hangup |
| callType | string | 通话类型 呼入:incoming,外呼:dialout,webcall,预览外呼:previewDialout,自动外呼:autoDialout |
| agentNumber | string | 坐席工号 |
| agentName | string | 座席名称 |
| statusName | string | 坐席状态(0:空闲、1:忙碌、2:呼叫中、3:振铃、4:通话中、5:整理、6:保持、7:静音、8:未连接、9:失效、100之后为自定义) |
| statusNumber | string | 座席状态编号 |
| extras | Object | 外呼自定义参数 |
| callUniqueId | string | 通话id |
| eventUniqueId | string | 事件id |
推送示例
// 普通坐席状态变化事件
{
"eventUniqueId": "9a25c35ab7fe4adebb2c1462ca15635e",
"accountId": "20000153",
"callUniqueId": "403344537650466816",
"pushType": "callStatus",
"customerNumber": "17319132391",
"trunkNumber": "",
"displayNumber": "01081400192",
"statusTime": "1620455987",
"callEvent": "hangup",
"callType": "dialout",
"agentNumber": "20001",
"agentName": "sc的坐席",
"statusName": "整理",
"statusNumber": "5",
"extras": ""
}
// 特殊坐席状态变化事件(包含通话事件)
{
"eventUniqueId": "fbc13d07ddff4649bc1ca6d636a915b4",
"accountId": "20000153",
"callUniqueId": "403344537650466816",
"pushType": "callStatus",
"customerNumber": "17319132391",
"trunkNumber": "",
"displayNumber": "01081400192",
"statusTime": "1620455982",
"callEvent": "link",
"callType": "dialout",
"agentNumber": "20001",
"agentName": "sc的坐席",
"statusName": "通话中",
"statusNumber": "4",
"extras": ""
}
媒体识别挂机原因事件
接口说明
账户开启前媒体识别功能后,当出现拒接挂机事件时,进行推送
配置方式:登录系统后,在设置-系统设置-对接设置-事件推送中添加推送地址。
支持推送至多个地址
推送参数
| 字段名称 | 字段类型 | 字段描述 |
|---|---|---|
| callUniqueId | string | 主键 通话记录id |
| accountId | string | 账户编号 |
| pushType | string | 推送类型 |
| preMediaFailureReason | string | 失败原因 |
| preMediaCode | number | 结果编码 |
| preMediaKeyWord | string | 关键词 |
| eventUniqueId | string | 事件id |
content.segments 对象
| 字段名称 | 字段类型 | 字段描述 |
|---|---|---|
| beginTime | number | 该句的起始时间偏移,单位为毫秒 |
| endTime | number | 该句的结束时间偏移,单位为毫秒 |
| channelId | number | 该句所属音轨ID |
| text | string | 该句的识别文本结果 |
推送示例
{
"eventUniqueId": "88c15955242645b485e902ec077acc52",
"accountId": "20000153",
"callUniqueId": "403381132931895296",
"pushType": "mediaFailreason",
"agentNumber": "2001",
"preMediaFailureReason": "onThePhone",
"preMediaCode": 15,
"preMediaKeyWord": "正在通话"
}
电话条登陆状态事件
接口说明
作为座席状态变化事件的补充,座席电话条的登陆或登出状态的推送。
配置方式:登录系统后,在设置-系统设置-对接设置-事件推送中添加推送地址。 支持推送至多个地址
推送参数
| 字段名称 | 字段类型 | 字段描述 |
|---|---|---|
| accountId | string | 账户编号 |
| agentNumber | string | 座席工号 |
| agentName | string | 座席名称 |
| statusTime | string | 状态开始时间 |
| loginType | string | 座席登陆方式(登陆的时候才存在) PSTN(手机)/WEBRTC(软电话)/SIP(sip号码) |
| eventUniqueId | string | 事件id |
| pushType | string | 事件类型 登陆login 登出logout |
| offlineType | string | 离线接听方式 PSTN(手机)/SIP(sip号码) |
| logoutType | string | 登出方式(登出的时候才存在) normal(普通方式)、offline(离线接听方式) |
推送示例
登陆推送示例
{
"eventUniqueId":"bf6dc33761c34272800c7c8256f53c5a",
"accountId":"2000103",
"pushType":"login",
"loginType":"PSTN",
"statusTime":"2021-07-22 18:06:48",
"agentNumber":"9998",
"agentName":"XXX"
}
登出
{
"eventUniqueId":"1278cc942e7544858b36a4588880e24a",
"accountId":"2000103",
"pushType":"logout",
"logoutType":"normal",
"statusTime":"2021-07-22 18:06:55",
"agentNumber":"9998",
"agentName":"XX"
}