First, be aware that 3CX doesn't always write records to the database right away. There may be a delay while 3CX caches writes to the database. You can extract data from the CDR files, but they don't typically get written until the call is complete (at least I believe that to be the case) so that can also add delays. The only way to get real-time information is to monitor the 3CX events using the Call Control API. It's a bit complicated to sift through all the events, but it is possible to do. Otherwise, take a look at our 3CX Exporter -- this application can synchronize the data in 3CX with a SQL Server database, in close to real time.