0

My call records are getting store in /var/log/asterisk/cdr-csv/Master.csv file. i want to limit the number of call to be stored ni this file, after that it should start form the beginning, so for this what could be procedure

1 Answers1

1

You can't limit number of records by asterisk

But you easy can rotate files by using logrotate linux utility.

For that you should create file /etc/logrotate.d/asterisk_cdr

/var/log/asterisk/cdr-csv/*csv {
missingok
rotate 5
size 2000k
create 0640 asterisk asterisk
}

For more info see documentation for logrotated

arheops
  • 15,544
  • 1
  • 21
  • 27