
# 释放事件回调接口
#### 场景描述
推送释放呼叫事件。
#### 接口方法
POST
#### 接口URL
客户自定义。
双呼的挂机回调URL有两种配置方式：
- 通过界面配置：租户管理员选择"配置中心 \> 扩展与集成 \> 双呼"，设置"挂机回调url"。

- 通过创建双呼呼叫 (V1.0.0)接口传入：调用创建呼叫 (V1.0.0)接口时传入请求参数callBackUrl。
 
#### 请求说明
- 请求头参数： 无。
  
- 请求体参数：
  表1请求体参数 
  | 序号 | 名称                | 参数类型   | 是否必选  | 说明                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
  |:---|:---|:---|:---|:---|
  | 1  | callSerialNo      | string | True  | 呼叫流水号。 长度限制：string（50）。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
  | 2  | serviceNo         | string | True  | 座席工号等。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
  | 3  | called            | string | True  | 客户号码。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
  | 4  | caller            | string | False | 本次呼叫的座席绑定的电话。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
  | 5  | callerPresent     | string | False | 外显号码。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
  | 6  | callData          | string | False | 呼叫数据。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
  | 7  | createCallTime    | string | False | 发起呼叫时间。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
  | 8  | alertingTime      | string | False | 用户振铃时间。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
  | 9  | talkingTime       | string | False | 通话时间。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
  | 10 | releaseTime       | string | False | 释放时间。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
  | 11 | talkDuration      | string | False | 通话时长。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
  | 12 | recordfile        | string | False | 录音路径。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
  | 13 | locationId        | string | False | 录音节点。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
  | 14 | releaseReason     | string | False | 释放原因码。 0：通话结束，被叫挂机 1：通话结束，主叫挂机 2：外呼主叫失败 3：外呼被叫失败 4：外呼主叫无应答 5：外呼被叫无应答 xxx：其他异常 |
  | 15 | agentAlertingTime | string | False | 座席振铃时间。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
  | 16 | agentTalkingTime  | string | False | 座席通话时间。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
  | 17 | agentReleaseTime  | string | False | 座席释放时间。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
  | 18 | agentTalkDuration | string | False | 座席通话时长。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
     
  
 
#### 响应说明
响应码：200
- 响应消息
  表2响应体参数 
  | 序号 | 名称      | 参数类型   | 是否必选 | 说明          |
  |:---|:---|:---|:---|:---|
  | 1  | retCode | string | True | 0，成功，其他为失败。 |
  | 2  | retMsg  | string | True | 失败原因的描述。    |
     
  
 
#### 报文样例
请求参数:
```
{
 agentAlertingTime=2022/02/22,10:04:29:004, 
 agentReleaseTime=2022/02/22,10:04:29:004, 
 agentTalkDuration=2022/02/22,10:04:29:004, 
 agentTalkingTime=2022/02/22,10:04:29:004, 
 alertingTime=2022/02/22,10:04:29:004, 
 callData=null, 
 callSerialNo=1197765398201387012, 
 called=88880067, 
 caller=960003, 
 callerPresent=960003, 
 createCallTime=2022/02/22,10:04:28:823, 
 locationId=0, 
 nonce=-1482421808053124529, 
 recordfile=Y:/2/mobileAgent/20220222/1645524268-824.wav, 
 releaseReason=0, 
 releaseTime=2022/02/22,10:04:36:318, 
 serviceNo=null, 
 signature=+lk3***************************tO50=, 
 talkDuration=0, 
 talkingTime=2022/02/22,10:04:30:418, 
 timestamp=1645524163326
 }
```
响应参数:
```
{ 
    "retCode": "0",
    "retMsg": "success"
}
```
