Commit a8a8131b authored by Wenpeng Song's avatar Wenpeng Song Committed by Yalu Zhang
Browse files

add uci config for cdr csv rotate

parent 531f0f69
......@@ -9,3 +9,4 @@ usegmtime=no ; log date/time in GMT. Default is "no"
loguniqueid=yes ; log uniqueid. Default is "no"
loguserfield=yes ; log user field. Default is "no"
accountlogs=no ; create separate log file for each account code. Default is "yes"
maxrow=|MAXROW| ; max row stored in master.csv. Default is 100.
......@@ -150,6 +150,9 @@ config log 'log_options'
option syslog_facility 'local0'
option syslog ''
config cdr 'cdr_options'
option csv_max_row '100'
config call_filter 'call_filter0'
option block_outgoing '0'
option block_incoming '0'
......
......@@ -620,6 +620,16 @@ configure_queue() {
}
configure_cdr() {
local csv_max_row
config_get csv_max_row cdr_options csv_max_row
if [ -z "$csv_max_row" ] ; then
csv_max_row="100"
fi
sed -i "s/|MAXROW|/$csv_max_row/" $WORK_DIR/cdr.conf
mkdir -p /var/log/asterisk/cdr-csv
touch /var/log/asterisk/cdr-csv/Master.csv
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment