查询多个分机或群语音信箱的语音留言
查询多个分机的语音信箱或群语音信箱中的语音留言。
请求 URL
GET {base_url}/{api_path}/vm/query?access_token={access_token}
请求参数
| 参数 | 是否必填 | 类型 | 说明 |
|---|---|---|---|
| page | 否 | Integer | 定义显示第几个页面。 |
| page_size | 否 | Integer | 定义每页显示几项查询结果。 |
| number | 是 | String | 要查询的分机或群语音信箱的号码。 注:
|
响应参数
| 参数 | 类型 | 说明 |
|---|---|---|
| errcode | Integer | 返回错误码。
注: 更多错误码和错误信息说明,请参见 错误码 & 错误信息。
|
| errmsg | String | 返回信息。
|
| voicemail_list | Array<Vm_List> | 查询的分机或群语音信箱及其语音留言信息。 |
Vm_List
| 参数 | 类型 | 说明 |
|---|---|---|
| number | String | 查询的分机或群语音信箱的号码。 |
| total_number | Integer | 语音留言总数量。 |
| data | Array<Vm_DetailInfo> | 语音留言详情。 |
- Vm_DetailInfo
-
表 3. 参数 类型 说明 msg_id String 语音留言的唯一 ID。 file_name String 分机或群语音信箱中按照接收顺序命名的语音留言文件名。 is_read Integer 语音留言是否已读。 0:未读1:已读
duration Integer 语音留言时长 (单位:秒)。 size Integer 文件大小 (单位:字节)。 group_voicemail_read_status Array<Gvm_Read> 群语音信箱中每个成员的语音留言读取状态。 注: 此参数仅在查询群语音信箱中的语音留言时返回读取状态。查询分机时,该参数返回 null。name String 留言方的名称。 time String 留言的时间。 number String 留言方的号码。
示例
请求示例
查询分机 1000、1001 和群语音信箱 6100 中的语音留言。
GET /openapi/v1.0/vm/query?access_token=yehHGBEY7qWKZbwZibmTPO0z7GbKyNL9&number=1000,1001,6100 HTTP/1.1
Host: 192.168.5.150:8088
User-Agent: OpenAPI
响应示例
HTTP/1.1 200 OK { "errcode": 0, "errmsg": "SUCCESS", "voicemail_list": [ { "number": "1000", "total_number": 2, "data": [ { "msg_id": "1713840514-00000622", "file_name": "msg0000.wav", "is_read": 1, "duration": 18, "size": 309164, "group_voicemail_read_status": null, "name": "Customer Example", "time": "2024/04/23 10:48:34", "number": "5503301" }, { "msg_id": "1713848892-00000627", "file_name": "msg0001.wav", "is_read": 1, "duration": 11, "size": 177644, "group_voicemail_read_status": null, "name": "Customer Example", "time": "2024/04/23 13:08:01", "number": "5503301" } ] }, { "number": "1001", "total_number": 2, "data": [ { "msg_id": "1713033773-0000061a", "file_name": "msg0000.wav", "is_read": 0, "duration": 599, "size": 9598444, "group_voicemail_read_status": null, "name": "Customer Example2", "time": "2024/04/14 02:42:53", "number": "5503302" }, { "msg_id": "1713848892-00000626", "file_name": "msg0001.wav", "is_read": 0, "duration": 11, "size": 177644, "group_voicemail_read_status": null, "name": "Customer Example", "time": "2024/04/23 13:08:01", "number": "5503301" } ] }, { "number": "6100", "total_number": 2, "data": [ { "msg_id": "1713853925-0000062a", "file_name": "msg0000.wav", "is_read": 0, "duration": 28, "size": 460204, "group_voicemail_read_status": [ { "name": "1000", "number": "1000", "is_read": 0 }, { "name": "1001", "number": "1001", "is_read": 0 }, { "name": "1003", "number": "1003", "is_read": 0 }, { "name": "1002", "number": "1002", "is_read": 0 } ], "name": "Customer Example", "time": "2024/04/23 14:32:05", "number": "5503301" }, { "msg_id": "1713853578-00000629", "file_name": "msg0000.wav", "is_read": 1, "duration": 9, "size": 145644, "group_voicemail_read_status": [ { "name": "1002", "number": "1002", "is_read": 0 }, { "name": "1000", "number": "1000", "is_read": 1 }, { "name": "1001", "number": "1001", "is_read": 0 }, { "name": "1003", "number": "1003", "is_read": 0 } ], "name": "Customer Example2", "time": "2024/04/23 14:26:18", "number": "5503302" } ] } ] }