I personally prefer to work with the CDR text files. If your IP socket goes down for any reason, you lose the data and you can not recreate the lost data. It is not a question of whether the socket client is highly reliable. If there is a network blip or any other failure the data is gone. In contrast, if you process files, WHEN (because you know it will) the network or service goes down, no problem. When access is restored, you continue processing files where you left off.
There is the challenge of accessing the CDR files when 3CX is hosted in the cloud. In this case, you can automate the copying of the CDR files with an SSH client, or using a tool like our
3CX Exporter which can automatically process the CDR files and put the data into a SQL or MySQL database
Matching recordings to phone calls is not a "perfect" process, but is generally workable. 3CX does not provide any direct ties (unique identifier) to help match a recording to a specific call, but you can make an educated guess. The CDR file contains the start time for the call. The recording file creation date/time (OS file property) should be the same (I have seen some variation between the call start time and the creation time of a few seconds). Since an extension can only record one call at a time, there should only be one recording with the same, or similar start date/time.
Alternatively, the recording file also has the date/time embedded in the file name. Be aware, however, that this date/time is in UTC. This can also be used if, for example, the recording files were moved at some point in the past. Moving the recordings from one location to another will typically change the OS's file creation date/time. If this is the case, then you will need to fall back to the date/time embedded in the file name.
If you are needing to process really old recordings, I think it was around the time period of 3CX V12/V14, 3CX changed how dates were represented in the recording file name. Old recordings will have an embedded date/time that is in "local time" and newer recording file names will represent the date/time in UTC. Yes, that makes things a little more complicated.
Some people have used the CallD to link the call and the recording together. Keep in mind that the CallID is NOT unique. Every time you restart your 3CX server, the CallID is reset back to 1. So you will need to look at the date/time of the file and further match using the CallID to ensure you are matching the correct file.
For the sake of completeness, there is a table in Postgres that could be used to match the recording to the call, but accessing the Postgres database will instantly flag your PBX as "unsupported" by 3CX. Therefore, I strongly urge you to use other approaches to matching the recording file to the correct call.