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 API endpoint
/api/v1.1.0/recording/get_random?token={token}
. - 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.
Note:
|
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 ExamplePOST /api/v1.1.0/recording/get_random?token=1e3b3ebb6a974cb42ed31de5413df52d HTTP/1.1 Content-Type:application/json; charset=utf-8 Host: api.yeastarcloud.com { "recording": "20170901181806-1504261084.7-1001-1003-Internal.wav"" }
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 domain}/api/v1.1.0/recording/download?recording={recording}&random={random}&token={token}
Download link example:
https://yeastarcloudpbx.com/api/v1.1.0/recording/download?recording=20170901181806-1504261084.7-1001-1003-Internal.wav&random=120732c546381fb020f17fba676b0ea0&token=75c5891b32203d0615f9e3753a7cb779