Download Voicemail Files

Download voicemail files of a specific extension.

Endpoint

POST /api/v1.1.0/voicemail/get_random?token={token}

Request Parameters

Note: To download the voicemail file of an extension, you should request a random string from the PBX. Each random string can be used for once.
Name Importance Type Description
extid Required Int Download which extension's voicemail file.
voicemailfile Required String The name of voicemail file.
voicemailstatus Required String The voicemail status.
  • read
  • unread
allowedip Optional String

Specify the allowed IP address to download the file.

  • No allowedip parameter: Only the 3rd party application can download the file.
  • If allowedip is set, the allowed IP address and the 3rd party application can download the file.
Note:
  • The allowedip only supports one IP address.

Response Parameters

Name Type Description
extid Int Download which extension's voicemail file.
voicemailstatus String The voicemail status.
  • read
  • unread
voicemailfile String The name of the voicemail file.
random String A random string created for voicemail file download. It serves as a component of a specified request address for download.

Examples

Request Example
POST /api/v1.1.0/voicemail/get_random?token=1e3b3ebb6a974cb42ed31de5413df52d HTTP/1.1
Content-Type:application/json; charset=utf-8
Host: api.yeastarcloud.com
{
    "extid": "1004",
    "voicemailfile": "msg0000.wav",
    "voicemailstatus": "unread"
}
Response Example
HTTP/1.1 200 OK
Access-control-allow-origin: *
Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE
{
    "status": "Success",
    "extid": "1004",
    "voicemailstatus": "unread",
    "voicemailfile": "msg0000.wav",
    "random": "70f477822e6a379d7359b2d926ea95a5"
}

Download Link Example

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

Voicemail download link format:

https://{pbx domain}/api/v1.1.0/voicemail/download?extid={extid}&voicemailstatus={voicemailstatus}&token={token}&voicemailfile={voicemailfile}&random={random}

Voicemail download link example:

https://api.yeastarcloud.com/api/v1.1.0/voicemail/download?extid=1005&voicemailstatus=unread&token=72d6640a05811af51e0279461e5272ce&voicemailfile=msg0000.wav&random=1635079c6517f8b82f811cb11e5860d8