• V20: 3CX Re-engineered. Get V20 for increased security, better call management, a new admin console and Windows softphone. Learn More.

Call reports stored location

Status
Not open for further replies.

matt_

Forum User
Joined
Jan 9, 2018
Messages
10
Reaction score
1
As I understand, 3CX don't recommend touching the live DB to extract data for reports, so I'm after another way of obtaining the information.
I've written scripts to extract data from their csv reports but it'd be much easier if I could save the csv reports to a folder instead of only receiving via email. It's much easier to automate if I don't have to build something to read emails and save the attachment out of them.
 
Hello @matt_

You can try using the CDR files. You can find more details here: https://www.3cx.com/docs/cdr-call-data-records/

Thanks YiannisH, so I had a look at CDR, but the data extracted doesn't seem to have the detail that the call reports contain. For example say a call was transferred 5 times, in the call report I can see the timestamps on each call session in that call event and why it was transferred. The CDR only contains start and end date and a list of the call chain extensions.
 
As I understand, 3CX don't recommend touching the live DB to extract data for reports, so I'm after another way of obtaining the information.

I'm curious as to why queries that only read from the 3cx database would cause any issues, and why 3cx advises against this. I suppose some queries might cause excessive CPU load, but other than that, what concerns are there?

Is all the detailed call data stored in the DB, or in files somewhere?
 
I've read in other forum threads that while you can access the DB directly, doing so voids your support warranty, I guess their reasoning is if you poke around and do a complex query you might freeze up the DB and take down the server as it's running a bunch of it's own transactions.

It'd be great if you could set a secondary DB to just copy data to overnight and then I could just access that.
 
The problem is that what you "think" is a read-only connection may in fact still cause locks on tables or records. For example, if you use PGAdmin to access the PostgreSQL database, simply clicking on a table name in their interface locks the entire table. That would be bad on a production 3CX server.

3CX can't really judge how careful you are about how you connect to the database, and therefore if you have any strange 3CX issues they have to consider whether you caused the problem by accessing the data. Even worse, if you start updating data in PostgreSQL then they lose all assurances that the data integrity has been maintained. From their perspective, you may "say" I just made a read-only connection, but frankly (having worked for 3CX Support in the past myself) people are not always forthcoming about what they did or did not do. It leaves 3CX support in a position where they have to spend hours and hours investigating what was actually done with/to the database.

It can be done safely, if you are very careful, (we have an Exporter tool that has been in use for probably 8 years without issue), but even our tool is not "endorsed" by 3CX, although they do turn a blind eye to its use simply because it has a long track record of being a safe approach to getting the data. But it is absolutely true that 3CX frowns on anyone directly accessing the database.
 
I haven't heard back about the CDR data but I'm testing a python module to download email attachments so I'm almost resigned to the fact that to make quality reports on phones and queues and to automate the whole process, I'm going to have to setup ongoing reporting in 3CX, script to access and download csv's from emails, script to import csv's into a DB, script report outputs from that DB. :(
Would be much simpler if there was some DB access or some better data coming out of CDR.
 
While not officially supported, I would encourage you to take a look at our Exporter tool. It's in use in over 80 countries with no known issues. It's a safe way of getting access to the 3CX data and 3CX won't flag our PBX as unsupported. It's true, they are not crazy about anyone accessing the data directly, but they are very aware of our tool. I have offered to drop the product entirely if that would make 3CX more comfortable and they have said it isn't necessary. Maybe from their perspective, it's better people use a tool they know doesn't create issues than to have everyone trying to figure out how to do it safely from scratch every time? Just a guess.
 
Thanks, I'll have a look at it, I assumed I couldn't be the first to try and work out solutions to the reporting limitations
 
Status
Not open for further replies.

Getting Started - Admin

Latest Posts

Forum statistics

Threads
141,618
Messages
748,852
Members
144,729
Latest member
yparker0320
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.