Query Voicemail Files

Query voicemail files of an extension, multiple extensions, or all extensions.

Request URL

{base_url}/{api_path}/voicemail/query?token={token}

Request parameters

Parameter Required Type Description
number Yes String Extension number, which means which extension's voicemails will be queried.

Valid values:

  • An extension number: Query voicemails of the specified extension.

    Example: "number":"1000"

  • Multiple extension numbers: Query voicemails of multiple extensions. Separate multiple extension numbers with ,.

    Example: "number":"1000,1001"

  • all: Query voicemails of all extensions.

    Example: "number":"all"

Response parameters

Note: If the queried extension doesn't have any voicemails, the PBX will respond the request result only.
Parameter Type Description
status String Request result.
  • Success
  • Failed
voicemails Array <VoicemailInfo> Voicemails list.
VoicemailInfo
Parameter Type Description
number String Extension number.
voicemail Array <ExtensionVoicemail> Voicemail information of the specified extension.
ExtensionVoicemail
Parameter Type Description
voicemailfile String Voicemail file name.
messagefrom String The voicemail was sent by which number.
voicemailstatus String Voicemail status.
  • read
  • unread
voicemaildate String Date and time on which the voicemail was received.
voicemaillength String Voicemail duration.

Examples

Request example

Query the voicemail of extension 4000.

POST /api/v2.0.0/voicemail/query?token=1e3b3ebb6a974cb42ed31de5413df52d
Content-Type:application/json; charset=utf-8
Host: 192.168.5.150

{
	"number": "4000"
}
Response example
HTTP/1.1 200 OK
Server: Boa/0.94.14rc21
Accept-Ranges: bytes
Connection: close
Content-Type: application/json
Access-control-allow-origin: *
Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE

{
	"status": "Success",
	"voicemails": [
		{
			"number": "4000",
			"voicemail": [
				{
					"voicemailfile": "msg0000.wav",
					"messagefrom": "3000",
					"voicemailstatus": "unread",
					"voicemaildate": "2019-10-20 21:41:42",
					"voicemaillength": "77"
				},
				{
					"voicemailfile": "msg0001.wav",
					"messagefrom": "2000",
					"voicemailstatus": "unread",
					"voicemaildate": "2019-10-20 21:49:35",
					"voicemaillength": "18"
				}
			]
		}
	]
}