Download Voicemail Files

Download voicemail files of a specific extension.

Steps to download a voicemail file

  1. Get the random string of voicemail file.
  2. Combine the random string with other parameters to form a download link.
    Note: The random string is only valid for 30 seconds, and each random string can be used only once.

Request URL

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

Request parameters

Parameter Required Type Description
number Yes String Extension number, which means which extension's voicemail file will be downloaded.
voicemailfile Yes String Voicemail filename.
voicemailstatus Yes String Voicemail status.

Valid values:

  • read: The voicemail file to be downloaded is read and will be downloaded from read folder.
  • unread: The voicemail file to be downloaded is unread and will be downloaded from unread folder.
allowedip No String

Specify the IP address which is allowed to download voicemail file. By default, allowedip is not carried, which means only the application server can download voicemail files.

Valid values:

  • Leave the value of allowedip blank: Only the application server can download voicemail files.

    Example: "allowedip":" "

  • IP address: Only the application server or a server with this IP address can download voicemail files.

    Example: "allowedip":"192.168.5.20"

Response parameters

Parameter Type Description
status String Request result.
  • Success
  • Failed
number String Extension number, which means which extension's voicemail file was downloaded.
voicemailstatus String Voicemail status.
  • read
  • unread
voicemailfile String Voicemail filename.
random String A random string for voicemail file.

Combine the random string with other parameters to form a download link.

Examples

Request example

Get the random string of voicemail file "msg0000.wav" for extension 1023.

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

{
	"number": "1023",
	"voicemailfile": "msg0000.wav",
	"voicemailstatus": "unread"
}
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",
	"number": "1023",
	"voicemailstatus": "unread",
	"voicemailfile": "msg0000.wav",
	"random": "7d48ba0d1fb647346ed81d6b677f7423"
}

Download Link Example

Use the API responded random as a component of a specified request address for downloading the voicemail file.

Download link format:
https://{pbx ip}:{https port}/api/v2.0.0/voicemail/download?number={number}&voicemailstatus={voicemailstatus}&token={token}&voicemailfile={voicemailfile}&random={random}
Download link example:
https://192.168.5.150:8088/api/v2.0.0/voicemail/download?number=1005&voicemailstatus=unread&token=72d6640a05811af51e0279461e5272ce&voicemailfile=msg0000.wav&random=1635079c6517f8b82f811cb11e5860d8