'callrecord' capability for WebSocket Token API

Contents

Overview

Requesting a recording file and generating a temporary public link for downloading it.

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

Here main1 is the alias of the path to the conversation recording directory located in an 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.

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

Parameters:

  • key - value from the ccsevents.connection_set_record_info event or obtained another way.

  • result - relative path for direct file download without authorization. The request must be sent via HTTP to the same server the WebSocket is connected to. The file is available for 5 minutes.

Other examples of the key field value:

  • 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, a script can place a file in a location accessible to it, for example in the :GLOBALSHARE/public/…​ folder, form a path like fs:script:GS_DOMAIN_DATA/abc.txt, and save it in the data model. Using this API, a temporary link for downloading the file under a random name can then be obtained.