Downloading a Recording File as a Third Party
Description
This interface is invoked by a third-party to download a recording file. The third-party system is connected to the IVR system by loading a customized JAR package.
Usage Description
- Prerequisites
- You have passed the authorization.
- Usage restrictions
Developers can download only files whose path is the value of the system parameter Third-Party Recording Download Path Rule under their own accounts. For details, see C2 Monitoring, System Outbound Call, CDR, and Knowledge Base Interface Authentication. Contact the system administrator to obtain the value of the system parameter in .
Interface Method
POST
URI
https://ip:port/CCFS/resource/ccfs/ivr/downloadFile
Set ip to the IP address of the server where the CC-FS is installed and port to the HTTPS port number of the CC-FS.
If the request is routed through the NSLB, set ip to the IP address of the NSLB server and port to the HTTPS port number of the CC-FS service mapped on the NSLB.
Request
No. |
Name |
Value Type |
Mandatory |
Default Value |
Description |
---|---|---|---|---|---|
1 |
Content-Type |
String |
Yes |
None |
The value is fixed to application/json; charset=UTF-8. |
2 |
Authorization |
String |
Yes |
None |
For details about the generation mode, see C2 Monitoring, System Outbound Call, CDR, and Knowledge Base Interface Authentication. |
No. |
Name |
Value Type |
Mandatory |
Default Value |
Description |
---|---|---|---|---|---|
1 |
version |
String (1–32) |
Yes |
2.0 |
Protocol version. Currently, the value is fixed to 2.0. |
No. |
Name |
Value Type |
Mandatory |
Default Value |
Description |
---|---|---|---|---|---|
1 |
filePath |
String |
Yes |
None |
If mode is set to 1, filePath indicates the path of the folder where the file is located, for example, Y:/voice/1/IVRrecordFile. If mode is not specified or is set to another value, the value of filePath must be a full file path, for example, Y:/voice/1/IVRrecordFile/xx.wav. Note: The file path is specified by the system parameter Third-Party Recording Download Path Rule. Contact the system administrator to obtain the value of the system parameter in . Default value: /voice/ %VDNNO %/IVRrecordFile;/3rdfile/ %VDNNO %/IVRrecordFile;/3rdfile/ %VDNNO %/thirdvoicebotfile. |
2 |
mode |
Integer |
No |
None |
If mode is set to 1, the value of filePath is a directory that contains a unique file. If the directory does not contain any file or contains multiple files, a failure message is returned. If mode is not specified or is set to another value, the value of filePath must be a full file path containing the file name. |
Response
If the interface is successfully invoked, the system obtains the binary data of the file from the HTTP response message to generate a recording file. The file name extension is .wav. In the response message, the value of content-type is Application/Octet-stream;charset=UTF-8.
If the interface fails to be invoked, an error code is returned. For details about the error code data structure, see Table 4. resultData is a reserved field and is left empty by default.
No. |
Name |
Value Type |
Description |
---|---|---|---|
1 |
resultCode |
String |
Result code returned. For details, see Error Code Reference. |
2 |
resultDesc |
String |
Request result description. |
3 |
resultData |
Object |
Response data. |
Example
- Request header
POST /CCFS/resource/ccfs/ivr/downloadFile HTTP/1.1 Authorization: auth-v2/ak/2021-08-31T09:38:50.872Z/content-length;content-type;host/c12f0ed0******************94941bdd106 Accept: */* Content-Type: application/json;charset=UTF-8 Content-Length: 193
- Request parameters
{ "request": { "version": "2.0" }, "msgBody": { "filePath": "Y:/3rdfile/53/thirdvoicebotfile", "mode":"1" } }
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot