CDR CSV with date and time problems

Hi friends. I’ve configured the cdr.conf to enable the creation of a CSV file, according to The thing is that the CDR does not reflect the date and time properly meaning at least 6 hours of difference from actual CDR, which can be visualised in the web. I cron a task that ntpdate takes from an external ntp server. I have configured date and time in FreePBX according ,which I did a long time ago. How this would happen?

My guess is that you are in CentralStandardTime (check from bash date +’%Z %z’)

make sure you don’t have

usegmtime yes set

usegmtime was set to yes. After setting it to no and fwconsole restart, problem solved. Thanks!

By the way, do you know how big the CSV file can be?
Does FreePBX has implemented a script or task to ´´rotate´´ this file?

In /etc/logrotate.d/asterisk

if you have

/var/log/asterisk/cdr-csv/*csv {
su root asterisk
rotate 5
size 100G
create 0640 asterisk asterisk

You would rotate every time it got to 100G , for other choices like number or whatever

man logrotate

1 Like

I think that will do the work. Thanks!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.