'callrecord' capability for WebSocket Token API

Table of Contents

Overview

Request a record file and generate a temporary public link to download it.

Request example
[
  "callrecord_get_path",
  {
    "qid": 123,
    "key": "fs:main1:Srv-002/2020-09-24/site1_x_28904-1600935092785.mp3"
  }
]

In this case, main1 is an alias of the path to the directory with the conversation recordings, located in the nfs folder or locally. The path substituted into the key field is generated by the server and supplied to the external application as part of the event.

Response example
[
  "callrecord_get_path_result",
  {
    "qid": 123,
    "result": "/temp/7czoefb0aaefl4mnxvkltaanfzg.mp3"
  }
]

Parameters:

  • key - value from the ccsevents.set_call_record_info event or otherwise obtained.

  • result - relative path to directly download the file without authorization. The request must be sent over HTTP to the same server where the websocket is connected. The file is available for 5 minutes.

Other examples of field values key:

  • s3:…​,

  • fs:script:GS_DOMAIN_DATA/abc.txt

  • fs:script:GS_DOMAIN_DATA/abc.txt

  • fs:script:SYNC_DOMAIN/x/y/z/play.mp3

In particular the file can be placed from the script in a location accessible to it, for example in the :GLOBALSHARE/public/…​ folder? form the path as fs:script:GS_DOMAIN_DATA/abc.txt, save it in the data model. Using this API, you will be able to get a temporary link to download a file with a random name.