1. 語音通知狀態通知
語音通知掛機后給應用側的通知消息。
1.1 請求包頭
屬性 |
類型 |
約束 | 描述 | 舉例 |
---|---|---|---|---|
Method | String | 必選 | HTTP方法 | POST |
URL | String | 必選 | 地址URL | /{path} |
Host | String | 必選 | 服務器地址 | <ip>:<port> |
Content-Type | String | 必選 | 類型 | text/plain |
Content-Length | String | 必選 | 消息體的長度 | |
1.2 請求包體
屬性 |
類型 |
約束 | 描述 | 取值 |
---|---|---|---|---|
action |
String | 必選 | 表示外呼通知 |
SellingCall |
callSid |
String | 必選 | 對應接口返回callSid參數,一路呼叫的唯一標示 |
32位字符串 |
number |
string |
必選 | 外呼號碼 |
|
state |
String | 必選 | 通話狀態 |
0正常通話 1被叫通話未應答 2外呼失敗 |
duration |
String |
必選 |
通話時長 |
單位秒 |
userData | String | 可選 | 用戶私有數據。外呼通知接口參數 | |
1.3 請求示例
POST /{path} HTTP/1.1 Host: <ip>:<port> Content-Type: text/plain Content-Length: <Len> <?xml version="1.0" encoding="UTF-8"?> <request> <action>SellingCall</action> <number>13800000000</number> <callSid>1307241452320369000100030000002f</callSid> <state>0</state> <duration>30</duration> </request>
2. 響應消息
2.1 響應包體
屬性 |
類型 | 約束 | 描述 |
取值 |
---|---|---|---|---|
statuscode | String | 必選 | 響應狀態碼 |
取值000000(成功) |
2.2 響應示例
HTTP/1.1 200 ok Date:Wed Nov 9 16:08:57 2011 Content-Length: <len> <?xml version="1.0" encoding="UTF-8"?> <Response> <statuscode>000000</statuscode> </Response>
文檔更新時間:2016年8月11日