Yes. You can configure 3CX to create a text file (CDR) for each call. Navigate to: 3CX Management Console --> Settings --> CDR. I personally recommend creating a separate file for each call. These files are created at the time when the call is finished (not before). You can parse these files to get a considerable amount of information about the call including: extension, name, caller name, number, start, end, duration, cost, and call chain (if my memory serves correctly). This is the only supported way of getting call detail information (other than standard reports).
As a last-resort option, you could pull the call records directly from the PostgreSQL database but that is highly discouraged by 3CX support. If you are not careful you can inadvertently lock tables when accessing the data and the results would be fairly unpleasant. If you can get the data you need from the CDR files, that's the way to go.
Whether you extract data from the CDR files, or reluctantly from the PostgreSQL database, I encourage you to take a look at our Exporter tool. It can automatically process the CDR files, as well as synchronize the PostgreSQL data and place the data in a SQL or MySQL database. Exporter has been in use for 6 -7 years without issue. From there, you can do whatever you choose.