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
Get the name of the auto recording file from CDR report.
Get a random string through the PBX.
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/v0.0.1/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. |
random | String | A random string created for downloading recording file. The random string is a component of the recording download link. |
Examples
Request Example
Request a random string of the recording file.
POST /api/v0.0.1/recording/get_random?token=813b621cfe8eecf445a2ce1f4a079ffe HTTP/1.1
Content-Type:application/json; charset=utf-8
Host: 172.16.6.150
{
“recording”:”exten-101-106-20200505-042135-1588641695.1772.wav”,
“allowedip”:”172.16.6.150″
}
Response Example
HTTP/1.1 200 OK
Access-control-allow-origin: *
Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE
{
“status”: “Success”,
“recording”: “exten-101-106-20200505-042135-1588641695.1772.wav”,
“random”: “fc19203cddc1d7846c2236f9eafe826b”
}
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:
http://{pbx ip}:{https port}/api/v1.1.0/recording/download?recording={recording}&random={random}&token={token}
Download link example: