Dismiss Notice
We would like to remind you that we’re updating our login process for all 3CX forums whereby you will be able to login with the same credentials you use for the Partner or Customer Portal. Click here to read more.

Get the filename / path of a call's call recording

Discussion in 'CRM / Helpdesk / App Integration' started by helia, Feb 16, 2017.

Thread Status:
Not open for further replies.
  1. helia

    Joined:
    Nov 1, 2016
    Messages:
    12
    Likes Received:
    1
    Does anyone know how to get the filename of the call recording. Is it available via the API or does it have to be built based on a format. or make a call directly to the db? Also is the default path for the call recordings available?
     
  2. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Joined:
    Jun 27, 2007
    Messages:
    1,611
    Likes Received:
    126
    Hi there,

    Recordings are always saved in folder "C:\ProgramData\3CX\Instance1\Data\Recordings". The file name depends on the extension number, callId, etc, and can't be determined before the recording starts. You can check that folder and see some recording file names, to undertand the structure it has.

    Kind regards.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. helia

    Joined:
    Nov 1, 2016
    Messages:
    12
    Likes Received:
    1
    So to confirm what you're saying, the file name for the recording is not available through the api as a parameter. The best that can be done is to estimate the correct file name based on the concat-ting the parameters that make up the recording file name.

    Its certainly not best practice but if it works....

    I'm presuming the 3CX official interface doesn't concat parameters on the fly to get a recording url. No experienced developer would do that. Is the static recording filename stored in the 3CX database and how much of a bad idea is it to get a readonly db connection and look up the static filename.
     
    #3 helia, Feb 16, 2017
    Last edited: Feb 17, 2017
  4. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Joined:
    Jun 27, 2007
    Messages:
    1,611
    Likes Received:
    126
    The API just doesn't expose the recording file name information. The process responsible for the recordings has an algorithm to calculate the name of the recording for each call, creates the file and saves the information in the CDR in the 3CX database. This name is not exposed by any API, so you can basically do 2 things:
    1) You can look for a new file in the recordings folder, trying to match some of the paramters you have in the file name (extension, caller Id, etc.). Or
    2) You can query the 3CX database, but please note that the record will be inserted in the database a few seconds after the call has ended. And please also note that accessing the 3CX database is an unsupported procedure, 3CX can change the structure of the database at any time, and your implementation will be broken. Maybe you better get the CDRs from the CDRs interface: https://www.3cx.com/docs/cdr-call-data-records/

    Kind regards.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. icns01

    Joined:
    Jun 11, 2017
    Messages:
    18
    Likes Received:
    5
    Can you say what is the default storage locations for the Linux installation and if, for optimum performance, this be on a separate partition than the root "\"?

    Thank you.
     
  6. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Joined:
    Jun 27, 2007
    Messages:
    1,611
    Likes Received:
    126
    In Linux the recordings folder is:
    /var/lib/3cxpbx/Instance1/Data/Recordings

    Kind regards.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. icns01

    Joined:
    Jun 11, 2017
    Messages:
    18
    Likes Received:
    5
    Thanks much. Appreciated
     
Thread Status:
Not open for further replies.