查询语音留言
查询分机的语音留言。
Endpoint
POST /api/v1.1.0/voicemail/query?token={token}
请求参数
名称 | 是否必需 | 类型 | 描述 |
---|---|---|---|
extid |
否 | Int | 要查询哪个分机的语音留言。
|
响应参数
注: 如果查询的分机没有语音留言文件,PBX 只响应查询失败或者成功的参数。
名称 | 类型 | 描述 |
---|---|---|
voicemails |
Object | Voicemails 对象参数。 |
extid |
String | 查询的分机号码。 |
voicemail |
Object | Voicemail 对象参数。 |
voicemailfile |
String | 语音留言文件名。 |
messagefrom |
String | 语音留言是哪个号码发送的。 |
voicemailstatus |
String | 语音留言的状态
|
voicemaildate |
String | 收到语音留言的时间。 |
voicemaillength |
String | 语音留言的时长。 |
实际示例
请求示例
查询分机1000的语音留言。
POST /api/v1.1.0/voicemail/query?token=1e3b3ebb6a974cb42ed31de5413df52d HTTP/1.1 Content-Type:application/json; charset=utf-8 Host: api.yeastarcloud.com { "extid": "1000" }
查询所有分机的语音留言。
POST /api/v1.1.0/voicemail/query?token=1e3b3ebb6a974cb42ed31de5413df52d HTTP/1.1 Content-Type:application/json; charset=utf-8 Host: api.yeastarcloud.com
HTTP/1.1 200 OK Access-control-allow-origin: * Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE { "status": "Success", "voicemails": [ { "extid": "1000", "voicemail": [ { "voicemailfile": "msg0000.wav", "messagefrom": "2000", "voicemailstatus": "read", "voicemaildate": "2018-05-04 18:00:00", "voicemaillength": "42" } { "voicemailfile": "msg0001.wav", "messagefrom": "2000", "voicemailstatus": "unread", "voicemaildate": "2018-05-04 18:30:00", "voicemaillength": "42" } ] }