Unfortunately there is not direct way of matching a recording file to a phone call (CDR record). If you are very careful, you should be able to reliably link the two with the following approach.
From the CDR file collect the following information:
- The extension number associated with the call
- The date/time of the call
- The Call ID
By parsing the data embedded in the recording file name, collect the following information:
- The extension associated with the recording
- The date/time
- The Call ID
Match the extension number, date/time, and call ID of the CDR with the recording file information.
Note the following:
- The date/times are in UTC
- There may be a small variance between the date/time included in the CDR and the date/time embedded in the recording file name
- To add insult to injury, the Call IDs are NOT unique. The IDs restart at 1 after each reboot of the 3CX server
- Because the date/times are typically not an exact match between the two sources, you will have to look for the closest match.
If it is not obvious already, let me confirm that this is not fun and will take a considerable amount of effort.
Perhaps the first step is to parse the CDR data and get it into a queryable database. Our
3CX Exporter tool can automate the process of collecting the CDR files from the 3CX server (even hosted servers), parsing the files, and saving the information in a SQL database.