Call Logs Best way to export 4 yrs Of data

Bruce Smith

Premier Customer
Basic Certified
Joined
Mar 28, 2020
Messages
75
Reaction score
19
Hi all I have a customer that wants 4yrs of call data exported from the system, is there a way to export this with out crashing the system, the last person to do a yr of data cashed it, there a call center so there a lot of data, and no buying addons.

Thanks.
 
Hello Bruce Smith,

It is critical not to crash the 3CX server, and you state this can happen with the big data export.
I am just trying to think out of the normal box.

You would be best working off-line, meaning: try to make a backup (should contain ALL information anyway), and copy to local PC/Laptop.
Extract the ZIP file, and look in the folder DbTables
From here I am not sure, but think the information is stored in the 'myphone_callhistory_v14.csv' file.
You could check this (and other files), to see if this information does help you.

Paulo
 
  • Like
Reactions: Bruce Smith
@paulodagraca had to spin up a vm with a demo licence and restore a backup there to do the exports using api and python script, to a CSV file.

If any one needs it see attached.
 

Attachments

  • Love
Reactions: paulodagraca
Added paging to get more data

C:\temp\Calllogdata\New folder>python 3cx_call_log_extractor_enhanced_V2.py -h
usage: 3cx_call_log_extractor_enhanced_V2.py [-h] [--from-date FROM_DATE] [--to-date TO_DATE] [--days DAYS]
[--output OUTPUT] [--max-records MAX_RECORDS]

3CX Call Log Data Extractor

options:
-h, --help show this help message and exit
--from-date FROM_DATE
Start date (YYYY-MM-DD)
--to-date TO_DATE End date (YYYY-MM-DD)
--days DAYS Number of days back from today
--output OUTPUT Output CSV filename
--max-records MAX_RECORDS
Maximum records to retrieve


E.g

# Standard extraction with default 1000 record batches
python 3cx_call_log_extractor_enhanced.py --days 30

# For very large datasets, try smaller batches
python 3cx_call_log_extractor_enhanced.py --days 30 --paging 500

# For faster extraction (if your API can handle it)
python 3cx_call_log_extractor_enhanced.py --days 30 --paging 2000
# Use default paging of 1000 records per batch
python 3cx_call_log_extractor_enhanced.py --days 30

# Basic usage (last 30 days)
python 3cx_call_log_extractor_enhanced.py

# Last 7 days
python 3cx_call_log_extractor_enhanced.py --days 7

# Specific date range
python 3cx_call_log_extractor_enhanced.py --from-date 2023-07-01 --to-date 2023-07-31

# Custom output file
python 3cx_call_log_extractor_enhanced.py --output my_calls.csv
 

Attachments

Hello Bruce Smith,

Today tested this script, not really needed, but..... amazing, great stuff.
Thank you for sharing this in the community, I am sure you will help people with this!

Paulo
 
  • Like
Reactions: KyriacosS_3CX
@paulodagraca you say "not really needed" but i can not export with out crashing the system exporting 25 GB of data is an issue.
how would you export what i need with Zero Cost?
 
Hi Bruce Smith,

I am sorry that I may have not been clear in my comment.
The statement that I was trying to make, is that at this moment in time i personally do not need this sollution, however may need it some day, who knows? That is why i have taken the time to test the script.
For sure, the script you made is a fantastic sollution, and gets the job done in a nice way, so good to have it in the pocket.
Anyone who seeks a sollution to export the CDR data, will find this usefull for sure, and for yourself it must have been a lifesaver, to have a tool like this to get the data exported.
Again, great job, and thank you for sharing.

Paulo
 
@paulodagraca ,

Thanks for testing out scripts and "niche" solutions for the community, even when you don't need them in your environment.
 
@paulodagraca thanks for the reply, I hear where your coming from, I think tools like this need to be in the wild to support the community i hope more people do this.
 

Latest Posts

Forum statistics

Threads
111,961
Messages
589,954
Members
164,862
Latest member
ARTipsadmin