I am new to Freepbx and just installed it from Freepbx site on my local VM. I have a requirement where I would like to access the CDR records and Recorded Audio files from outside freepbx.
What I have studied so far is that Freepbx stores CDR records in MySQL db. Can anyone share how can I get access to this MySQL db?
Where are the audio recording files stored and how can I let a C-Sharp application on windows PC have access so that these be copied from here to the Windows PC?
The CDR/CEL database is called “asteriskcdrdb”. The tables are “cdr” and “cel”.
You will need to add a user to the database that can access the tables from outside the local host. By default, the database is not accessible from anywhere but the local machine (localhost or through direct interface).
The choice of the language for accessing the recording files is irrelevant, so using C# or COBOL is a personal choice.
The files are stored in a file directory structure under the /var/spool/asterisk/monitor directory. This makes the need for a local agent on the server (SAMBA or an NFS Service, for example) for you to be able to access the files from outside the local network. If you enable the “Unique ID” entry in the CEL/CDR databases, you can link your recordings to the specific calls, since the Unique ID is part of both files.
Many thanks for the quick response. I’ll look into it.
Can you also share what is the difference between CEL and CDR tables?
I am not a linux expert and that is why didn’t pay attention to local agent on the server like SAMBA or NFS.
Can you share how do I enable the “Unique ID” entry in the CEL/CDR db?
“No good deed goes unpunished…”
CEL is Call Event Logging and CDR is Call Data Records. Different perspectives on the same basic theory. One tracks call events the other just tracks the Call Data as it’s processed.
There is a setting in the CDR configuration file that turns on the Unique ID field (IIRC). It’s probably always on now, but back in the Asterisk 1.4 days, it was something you had to enable specifically.