POST /api/v0.0.1/voicemail/query?token={token}
名称 | 是否必需 | 类型 | 描述 |
extid | 否 | Int |
要查询哪个分机的语音留言。
例如:“extid”:“1000”
例如:“extid”: “1000,1001”
|
注: 如果查询的分机没有语音留言文件,PBX 只响应查询失败或者成功的参数。
名称 | 类型 | 描述 |
voicemails | Object | Voicemails 对象参数。 |
extid | String | 查询的分机号码。 |
voicemail | Object | Voicemail 对象参数。 |
voicemailfile | String | 语音留言文件名。 |
messagefrom | String | 语音留言是哪个号码发送的。 |
voicemaildate | String | 收到语音留言的时间。 |
voicemaillength | String | 语音留言的时长。 |
请求示例
查询分机102的语音留言。
POST /api/v0.0.1/voicemail/query?token=813b621cfe8eecf445a2ce1f4a079ffe HTTP/1.1
Content-Type:application/json; charset=utf-8
Host: 172.16.6.150
{
"extid": "102"
}
查询所有分机的语音留言。
POST /api/v0.0.1/voicemail/query?token=813b621cfe8eecf445a2ce1f4a079ffe HTTP/1.1
Content-Type:application/json; charset=utf-8
Host: 172.16.6.150
响应示例
HTTP/1.1 200 OK
Access-control-allow-origin: *
Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE
{
"status": "Success",
"voicemails": [
{
"extid": "102",
"voicemail": [
{
"voicemailfile": "msg0000.wav",
"messagefrom": "6000",
"voicemaildate": "2020-04-07 10:56:40",
"voicemaillength": "4"
},
{
"voicemailfile": "msg0001.wav",
"messagefrom": "7001",
"voicemaildate": "2020-04-07 10:57:31",
"voicemaillength": "3"
},
{
"voicemailfile": "msg0002.wav",
"messagefrom": "7001",
"voicemaildate": "2020-04-07 11:00:08",
"voicemaillength": "2"
}
]
}
]
}