简体   繁体   中英

How to limit the number of call record in CDR file

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM