Just to clarify edd3123's suggestion, our Recording Manager keeps track of all RECORDED calls and has the ability to archive recordings for permanent retention. It does include some basic information of who the call was from / to, date, time and duration.
If you need more detail, as Coboltit asked, I would encourage you to look at our Exporter tool which can archive the CDR information for ALL calls.
While you could use the IP socket approach as suggested by Coboltit, that has the risk of losing some data if your socket connection goes down. A safer approach would be to have 3CX save the CDR information as text files and then parse the text files and save the data to a database. Using the text file approach ensures that even if your process goes down for a time, you can always catch up without losing any data.