Query Voicemail Messages of an Extension or a Group Voicemail
Query the voicemail messages of a specific extension or group voicemail.
Request URL
GET {base_url}/{api_path}/vm/get?access_token={access_token}
Request parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| page | No | Integer | Define which page is displayed. |
| page_size | No | Integer | Define how many records per page. |
| number | Yes | Integer | The number of the desired extension or group voicemail. Note: For group voicemail, you can only query voicemail messages of the group voicemail whose mode is set to Shared by Members. |
Response parameters
| Parameter | Type | Description |
|---|---|---|
| errcode | Integer | Returned error code.
|
| errmsg | String | Returned message.
|
| total_number | Integer | The total number of the voicemail messages. |
| data | Array<Vm_DetailInfo> | The detailed information of the voicemail messages. |
Vm_DetailInfo
| Parameter | Type | Description |
|---|---|---|
| msg_id | String | The unique ID of voicemail message. |
| file_name | String | The sequential file name of the voicemail message in the extension or group voicemail. |
| is_read | Integer | Whether the voicemail message has been read.
|
| duration | Integer | The duration of the voicemail message (Unit: Second). |
| size | Integer | File size (Unit: Byte). |
| group_voicemail_read_status | Array<Gvm_Read> | The read status of the voicemail message for each group member of the group voicemail. Note: This parameter only returns the read status for group voicemail. For extension, this parameter returns null. |
| name | String | The name of the caller who left the voicemail message. |
| time | String | The time when the voicemail message was left. |
| number | String | The number of the caller. |
| uid | String | The unique ID of CDR. |
Gvm_Read
| Parameter | Type | Description |
|---|---|---|
| name | String | The name of the group member. |
| number | String | The extension number of the group member. |
| is_read | Integer | The read status of the voicemail message for the group member.
|
Examples
Request example
Query voicemail messages of a group voicemail (Number: 6100).
GET /openapi/v1.0/vm/get?access_token=aX64YMVu2lh6bQvWI94ek40yB5Q6jDKX&number=6100 HTTP/1.1 Host: 192.168.5.150:8088 User-Agent: OpenAPI
Response example
HTTP/1.1 200 OK
{
"errcode": 0,
"errmsg": "SUCCESS",
"total_number": 1,
"data": [
{
"msg_id": "1713840555-00000623",
"file_name": "msg0000.wav",
"is_read": 1,
"duration": 18,
"size": 290604,
"group_voicemail_read_status": [
{
"name": "Kristin Hale",
"number": "1002",
"is_read": 0
},
{
"name": "Leo Ball",
"number": "1000",
"is_read": 1
},
{
"name": "Dave Harris",
"number": "1001",
"is_read": 0
},
{
"name": "Terrel Smith",
"number": "1003",
"is_read": 0
}
],
"name": "John(Customer Example)",
"time": "2024/04/23 10:49:15",
"number": "5503301",
"uid": "20260120102710672A5"
}
]
}