呼叫结果查询

云通讯平台为开发者提供了呼叫结果查询接口,以便开发者通过此REST API对已发起的一路通话结果进行查询
REST API:呼叫结果查询

  • 通过HTTPS GET方式提交请求,云通讯平台收到请求后,返回操作结果。
1、请求
1.1 请求地址
  • /{SoftVersion}/Accounts/{accountSid}/CallResult
  •                                         
1.2 请求包头

  • 请参阅:Rest 介绍》统一请求包头,使用主账户进行验证
1.3 请求包体
属性类型约束说明
callsidString必选呼叫Id
1.4 XML请求示例

  • GET /2013-12-26/Accounts/abcdefghijklmnopqrstuvwxyz012345/CallResult?sig=12345678&callsid=13121218530277930001000200000004 
  • HTTP/1.1
  • Accept:application/xml;
  • Host:192.168.0.1:8883
  • Content-Type:application/xml;
  • charset=utf-8;
  • Authorization:ZmY4MDgwODEzYzM3ZGE1MzAxM2M4MDRmODA3MjAwN2M6MjAxMzAyMDExNTABCDE=
  •                                         
1.5 JSON请求示例

  • GET /2013-12-26/Accounts/abcdefghijklmnopqrstuvwxyz012345/CallResult?sig=12345678&callsid=13121218530277930001000200000004 
  • HTTP/1.1
  • Accept:application/json;
  • Host:192.168.0.1:8883
  • Content-Type:application/json;
  • charset=utf-8;
  • Authorization:ZmY4MDgwODEzYzM3ZGE1MzAxM2M4MDRmODA3MjAwN2M6MjAxMzAyMDExNTABCDE=
  •                                         
2、响应
2.1 响应包体
属性类型约束说明
statusCodeString必选请求状态码,取值000000(成功),可参考Rest 错误代码
callTimeString必选通话时长
stateString必选呼叫结果,0 成功,1未接听,2失败
2.2 XML请求示例
  • HTTP/1.1 200 OK
  • Content-Length:586
  • >?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  • <Response>
  •   <statusCode>000000</statusCode>
  •   <CallResult>
  •      <callTime>23</callTime>
  •      <state>1</state>
  •   </CallResult>
  • </Response>
  •                                         
2.3 JSON请求示例

  • HTTP/1.1 200 OK
  • Content-Length:586

  • {"statusCode":"000000","CallResult":{"state":"1","callTime":"23"}}
  •