3.2 回调相关接口
将坐席状态变化、呼叫状态、话单数据等通过回调接口传送给客户服务器
通话事件回调
Path: 客户回调地址(登录的时候传递的callbackurl,后续接口有更新以更新后的推送)
Method: POST
接口描述:
手动呼入呼出通话事件回调
请求参数
Headers
| 参数名称 | 参数值 | 是否必须 | 示例 | 备注 |
| Content-Type | application/json | 是 |
Body
| 名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 | |||||
| agentKey | string | 必须 | 坐席key(坐席工号@企业缩写) | |||||||
| message | object | 必须 | 消息 | |||||||
| ├─ callid | string | 必须 | 通话callid | |||||||
| ├─ caller | string | 必须 | 主叫 | |||||||
| ├─ called | string | 必须 | 被叫 | |||||||
| ├─ type | string | 必须 | 事件类型( makecall:外呼是否发起成功 calledringing:外呼客户振铃 answer:外呼客户应答 inringing:呼入坐席振铃 incall:呼入坐席接听 after:挂机事件) 预测外呼事件类型( outringing: 坐席振铃 outboundcall:坐席接通 ) | | ||||||
| makecall事件返回 | ||||||||||
| ├─ callid | string | 非必须 | 通话callid 仅当发起成功才会有 | |||||||
| ├─ reason | string | 必须 | 发起状态说明,详见 “外呼发起状态说明” | |||||||
| ├─ followData | string | 非必须 | 用户随路数据(json格式) | |||||||
| ├─ status | integer | 必须 | 是否发起成功,0成功 1失败 详见 “外呼发起状态说明” | |||||||
| calledringing事件返回 | ||||||||||
| ├─ userdata | object | 非必须 | 系统随路数据(json格式) | |||||||
| ├─ origcaller | string | 非必须 | 原始显号 | |||||||
| ├─ nowgroupid | number | 非必须 | 当前技能组id | |||||||
| ├─ followData | object | 非必须 | 用户随路数据(json格式) | |||||||
| ├─ device | string | 非必须 | 设备号 | |||||||
| ├─ timestamp | number | 非必须 | callid创建时间(时间戳秒) | |||||||
| answer事件返回 | ||||||||||
| ├─ followData | object | 非必须 | 用户随路数据(json格式) | |||||||
| ├─ time | number | 非必须 | 事件发生时间(时间戳,秒级别) | |||||||
| inringing事件返回 | ||||||||||
| ├─ userdata | object | 非必须 | 系统随路数据(json格式) | |||||||
| ├─ origcaller | string | 非必须 | 原始主叫 | |||||||
| ├─ nowgroupid | number | 非必须 | 当前技能组id | |||||||
| ├─ timestamp | number | 非必须 | calli的创建时间 (时间戳秒) | |||||||
| after事件返回 | ||||||||||
| ├─ answer_time | string | 非必须 | 用户应答时间(yyyy-MM-dd hh:mm:ss) | |||||||
| ├─ auto | boolean | 非必须 | 是否是预测 | |||||||
| ├─ calledArea | object | 非必须 | 被叫归属地 | |||||||
| calledArea├─ city | string | 非必须 | 被叫归属市 | |||||||
| calledArea├─ provice | string | 非必须 | 被叫归属省 | |||||||
| ├─ operator_id | string | 非必须 | 坐席工号 | |||||||
| ├─ altering_time | string | 非必须 | 振铃时间(yyyy-MM-dd HH:mm:ss) | |||||||
| ├─ cause | integer | 非必须 | 挂机原因 | |||||||
| ├─ callerArea | object | 非必须 | 主叫归属地 | |||||||
| callerArea├─ city | string | 非必须 | 主叫归属市 | |||||||
| callerArea├─ provice | string | 非必须 | 主叫归属省 | |||||||
| ├─ dir | number | 非必须 | 呼入方向(0:呼入,1:呼出) | |||||||
| ├─ devicetype | string | 非必须 | device类型 1座席 2用户 | |||||||
| ├─ duration | integer | 非必须 | 通话时长 | |||||||
| ├─ agent_answer_time | string | 非必须 | 坐席应答时间(yyyy-MM-dd HH:mm:ss) | |||||||
| ├─ hangupdir | number | 非必须 | 挂机方向,0:平台挂机,1:对端挂机 | |||||||
| ├─ rstime | string | 非必须 | 录音开始时间(yyyy-MM-dd HH:mm:ss) | |||||||
| ├─ timestamp | number | 非必须 | callid创建时间(时间戳秒) | |||||||
| ├─ end_time | string | 非必须 | 通话结束时间(yyyy-MM-dd HH:mm:ss) | |||||||
| ├─ begin_time | string | 非必须 | 通话开始时间(yyyy-MM-dd HH:mm:ss) | |||||||
| ├─ recordcode | string | 非必须 | 录音编码 | |||||||
| ├─ operator_name | string | 非必须 | 坐席昵称 | |||||||
| ├─ filename | string | 非必须 | 录音名称 | |||||||
| ├─ mediano | number | 非必须 | 媒体站点号 | |||||||
| ├─ device | string | 非必须 | 设备类型 | |||||||
| ├─ followData | object | 非必须 | 用户随路数据(json格式) | |||||||
| ├─ answerFlag | Intger | 必须 | 接通标识 0:接通 , 1:坐席未接听,用户未接听 , 2:坐席接听,用户未接听, 3:用户接听,坐席未接听。 | |||||||
| ├─ userCallDuration | Intger | 必须 | 用户有效通话时长 | |||||||
返回消息
| 名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
| msg | string | 必须 | 返回消息 | ||
| code | integer | 必须 | 返回码 |
外呼发起状态说明
| status状态 | reason值 | 含义 |
| 0 | Success | 发起成功 |
| 1 | 外呼失败.坐席没有主技能组 | 发起失败 |
| 外呼失败.座席所在技能组不支持语音 | ||
| 外呼失败.被叫长度错误 | ||
| 号码禁止外呼或企业余额不足 | ||
| 内呼失败.1001@test忙碌 | ||
| 内呼失败.1001@test不存在 | ||
| 座席1002@test外呼失败.座席号码为空 | ||
| 号码禁止外呼或企业余额不足 | ||
| 外呼失败,座席不支持语音 | ||
| 外呼失败,座席为自动外呼 | ||
| 座席1002@test外呼失败,状态错误. |
挂机原因,请看挂机语音说明