~~NOTOC~~ ===== 数据结构说明 ===== ======留言接口====== 呼叫类接口,为用户提供呼叫功能。呼叫中心呼叫类接口主要数据结构有: * [[#开启留言对象 | 开启留言对象]] * [[#一般响应对象 | 一般响应对象]] 包含以下接口: * [[#开启留言 | 开启留言]] * [[#留言/录音文件下载 | 留言/录音文件下载]] ===== 数据结构说明===== ==== 开启留言对象 ==== {| style="width:90%;" ! colspan="2"|属性 ! |类型 !style="text-align:center;width:3em;"|约束 ! |说明 |- |rowspan="5" style="vertical-align: middle;" | ivr |appId |String |style="text-align:center;"|必选 |应用唯一标识 |- |callId |String |style="text-align:center;"|必选 |呼叫ID |- |key2Stop |String |style="text-align:center;"|必选 |收到指定DTMF码后停止留言,不可与cnt2Stop同时为空 (0~9、*、#、空) |- |cnt2Stop |int |style="text-align:center;"|必选 |收到n个DTMF码后停止留言,不可与key2Stop同时为空 (>= 0) |- |data |String |style="text-align:center;"|可选 |用户透传数据 |} ---- { "ivr":{ "appId":"247e35ff320a4142a105024055c367cf", "callId":"2015100817062901467CTI", "key2Stop":"0", "cnt2Stop":1, "data":" userdata ", } } ---- 247e35ff320a4142a105024055c367cf 2015100817062901467CTI 0 1 userdata ---- ==== 一般响应对象 ==== {| style="width:90%;" ! colspan="3" | 属性 ! 类型 !style="text-align:center;width:3em;"|约束 ! 说明 |- | rowspan="3" style="vertical-align: middle;"| resp | colspan="2" |respCode | String |style="text-align:center;"|必选 |参见[[:呼叫中心:errorcode_ipcc| 响应码说明]] |- | rowspan="2" style="vertical-align: middle;"|ivr |appId |String |style="text-align:center;"|必选 |应用ID |- |callId |String |style="text-align:center;"|必选 |呼叫ID |} { "resp": { "respCode": "000000", "ivr": { "appId": "8230e48a30864a50a5ad5919d0b30dd1", "callId":"2015102614502300261CTI" } } } ---- 000000 8230e48a30864a50a5ad5919d0b30dd1 2015102614502300261CTI ---- ===== 接口说明 ===== ==== 开启留言 ==== {| style="width:90%;" !功能 |开启留言 |- ! | URL |%% https://api.ucpaas.com/{SoftVersion}/Accounts/{AccountSid}/ipcc/call/message?sig={SigParameter}%% |- ! |Method | POST |- ! |Headers | 参考REST介绍中[[..rest_api介绍及接入#统一请求包头 | HTTP Headers ]]的说明 |- ! Body | [[# 开启留言对象 | 开启留言对象]] |- ! Response | [[#一般响应对象| 一般响应对象]] |} ==== 留言/录音文件下载 ==== {| style="width:90%;" !功能 | 留言/录音文件下载 |- ! | URL | %%http://www.ucpaas.com/fileserver/record/ {sid}_{fileid}_{date}?sig={sig}%% |- ! |Method | GET |- ! Response | 对应的录音文件 |}