Download Recording Files

Get a random string of the recording file, then combine the random string with other parameters to form a download link.

Steps to download recording files

  1. Get the name of the auto recording file from CDR report.
  2. Get a random string through the API endpoint /api/v1.1.0/recording/get_random?token={token}.
  3. 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.

Endpoint

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

Request Parameters

Name Importance Type Description
recording Required String The name of the auto recording file.
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
recording String The name of the auto recording file.
Note: Get the recording file name from CDR report.
random String A random string created for downloading recording file. The random string is a component of the recording download link.

Examples

Request Example
POST /api/v1.1.0/recording/get_random?token=1e3b3ebb6a974cb42ed31de5413df52d HTTP/1.1
Content-Type:application/json; charset=utf-8
Host: 192.168.5.150
{
    "recording": "20170901181806-1504261084.7-1001-1003-Internal.wav""
}
Response Example
HTTP/1.1 200 OK
Access-control-allow-origin: *
Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE
{
    "status": "Success",
    "recording": "20170901181806-1504261084.7-1001-1003-Internal.wav",
    "random": "120732c546381fb020f17fba676b0ea0"
}

Download Link Example

Use the API responded random string as a component of a specific request address for downloading the recording file.

Recording file download link format:

https://{pbx ip}:{https port}/api/v1.1.0/recording/download?recording={recording}&random={random}&token={token}

Download link example:

https://192.168.5.150:8088/api/v1.1.0/recording/download?recording=20170901181806-1504261084.7-1001-1003-Internal.wav&random=120732c546381fb020f17fba676b0ea0&token=75c5891b32203d0615f9e3753a7cb779