Single接口
首页
公共接口
API外呼签入
API电话签出
API电话外呼
通讯话单
-
+
首页
通讯话单
### 通话记录异步通知 ### 1.回调触发时机 <span style="font-family:楷体"> 通话结束后、话单为异步推送 </span> > <span style="font-family:楷体">当企业的话单生成时,服务器会把相关话单发送给企业,企业需要接受处理,并返回应答。如果服务器请求推送地址的应答不是成功或者超时,服务器认为通知失败,服务器会通过一定策略(共发送3次,第一次失败后5分钟后执行第二次, 第二次失败后1小时后执行第三次)定期重新发起通知,尽可能尽可能提高通知的成功率,但服务器不保证通知最终能成功。注意:同样的通知可能会多次发送给商户系统。商户系统必须能够正确处理重复的通知。</span> ### 2. 其他说明 <span style="font-family:楷体">回调地址需要对接方提供,需要在系统后台配置对接方的的回调地址。接口请求为POST请求,接口返回<font color="red">SUCCESS</font>字符串(全大写)为成功,其他为失败。</span> ### 3. 回调结构体 | 参数名称 | 类型 | 描述 | | --- | --- | --- | | code | number | <span style="font-family:楷体">状态编码</span> | | msg | String | <span style="font-family:楷体">描述 </span>| | data | object | <span style="font-family:楷体">话单</span> | > <span style="font-family:楷体">data结构体定义</span> | 参数名称 | 类型 | 描述 | | --- | --- | --- | | call_id | String | 呼叫ID | | call_type | Int | 电话类型 <br> 0 呼出 1呼入| | caller_number | String | 主叫号码 | | callee_number | String | 被叫号码 | | relay_number | String | 中继号码 | | ivr_in_time | Int | IVR开始时间 | | ivr_duration | Int | IVR持续时间 | | queue_in_time | Int | 队列开始时间 | | queue_duration | Int | 队列持续时间 | | ring_in_time | Int | 振铃开始时间 | | ring_duration | Int | 振铃持续时间 | | start_time | Int | 开始时间 | | answer_time | Int | 应答时间 | | hangup_time | Int | 挂断时间 | | talk_duration | Int | 通话时长 | | duration | Int | 总时长 | | transfer_type | String | 转接类型 <br/>consult-询问、treeway-三方、blind-转接| | hangup_type | Int | 挂断类型 <br/> 0-对方,1-自己 | | hangup_reason | String | 挂断原因 | | custom | String | 自定义 | | detail | Array | 子话单 | | ivrDetail | Array | ivr导航 | > <span style="font-family:楷体">Detail子话单-数组结构体定义</span> | 参数名称 | 类型 | 描述 | | --- | --- | --- | | call_id | String | 呼叫ID | | call_type | Int | 电话类型 <br> 0 呼出 1呼入| | caller_number | String | 主叫号码 | | callee_number | String | 被叫号码 | | relay_number | String | 中继号码 | | ivr_in_time | Int | IVR开始时间 | | ivr_duration | Int | IVR持续时间 | | queue_in_time | Int | 队列开始时间 | | queue_duration | Int | 队列持续时间 | | ring_in_time | Int | 振铃开始时间 | | ring_duration | Int | 振铃持续时间 | | start_time | Int | 开始时间 | | answer_time | Int | 应答时间 | | hangup_time | Int | 挂断时间 | | talk_duration | Int | 通话时长(有效通话时长) | | duration | Int | 总时长 | | transfer_type | String | 转接类型 <br/>consult-询问、treeway-三方、blind-转接 | | hangup_type | Int | 挂断类型 <br/> 0-对方,1-自己| | hangup_reason | String | 挂断原因 | | record_status | Int | 是否有录音 <br/> 0-无 1-有| | record_url | String | 录音地址 | ### 3.示例 >i 输出示例 ``` { "call_id":"ee1fc5a9-fc88-4439-94c6-8f0142dba150", "call_type":1, "caller_number":"189xxxx", "callee_number":"8989", "relay_number":"021xxxxx", "ivr_in_time":1691049030, "ivr_duration":4, "queue_in_time":1691049034, "queue_duration":2, "skill_id":98, "skill_name":"进线测试", "ring_in_time":1691049029, "ring_duration":0, "start_time":1691049029, "answer_time":1691049029, "hangup_time":1691049090, "talk_duration":61, "valid_talk_duration":60, "duration":61, "transfer_type":"", "hangup_type":0, "hangup_reason":"NORMAL_CLEARING", "custom":"", "province":"安徽", "city":"蚌埠", "channel":"中国电信", "code":"340300", "category":0, "detail":[ { "call_id":"ee1fc5a9-fc88-4439-94c6-8f0142dba150", "call_type":1, "caller_number":"8989", "callee_number":"1011", "relay_number":"021xxxx", "ivr_in_time":1691049030, "ivr_duration":4, "queue_in_time":0, "queue_duration":0, "skill_id":0, "skill_name":"", "ring_in_time":1691049045, "ring_duration":1, "start_time":1691049045, "answer_time":1691049046, "hangup_time":1691049050, "talk_duration":4, "duration":5, "transfer_type":"consult", "hangup_reason":"NORMAL_CLEARING", "hangup_type":0, "record_url":"record\/3021\/2023\/08\/03\/C30xxx_C30xxx1_xxxx_5f6ce45b-40c4-427f-b2e0-af3322c690f5.mp3", "record_status":1, "callee_uuid":"5f6ce45b-40c4-427f-b2e0-af3322c690f5", "province":"", "city":"", "channel":"", "code":"", "ev_id":0, "category":0, "asr_type":1, "asr_uuid":null, "asr_json":null }, { "call_id":"ee1fc5a9-fc88-4439-94c6-8f0142dba150", "call_type":1, "caller_number":"8989", "callee_number":"1011", "relay_number":"021xxxxx", "ivr_in_time":1691049030, "ivr_duration":4, "queue_in_time":0, "queue_duration":0, "skill_id":0, "skill_name":"", "ring_in_time":1691049055, "ring_duration":2, "start_time":1691049055, "answer_time":1691049057, "hangup_time":1691049061, "talk_duration":4, "duration":6, "transfer_type":"treeway", "hangup_reason":"NORMAL_CLEARING", "hangup_type":0, "record_url":false, "record_status":0, "callee_uuid":"429a05dc-750b-4132-9edf-20cfcc5be7ad", "province":"", "city":"", "channel":"", "code":"", "ev_id":0, "category":0, "asr_type":1, "asr_uuid":null, "asr_json":null } ], "ivrDetail":[ { "created_time":"2023-08-03 15:50:30", "title":"播放语音:按键导航1-5", "ivr_name":"进线测试" }, { "created_time":"2023-08-03 15:50:32", "title":"按键导航", "ivr_name":"进线测试" } ] } ```
照坤
2024年1月31日 09:40
转发文档
收藏文档
上一篇
下一篇
手机扫码
复制链接
手机扫一扫转发分享
复制链接
Markdown文件
分享
链接
类型
密码
更新密码