[OpenSIPS-Users] Version 3.1 it stops writing cdrs
Saint Michael
venefax at gmail.com
Fri Jan 13 04:29:26 UTC 2023
This is the nth times that it happens. Opensips 3.1 It stops writing
cdr to the hard drive. The calls keep flowing, and I keep losing
records, money.
Is there a command that I may run without restarting opensips that
restarts the process, internally?
if I restart opensips I lose all the records.
This is the script that I rn every 60 seconds
#move .csv to .csx , flat_rotate, move .csx & process them
LOCKFILE="/var/run/opensips_cdr_worker.lock"
OPENSIPSCTL=/usr/local/bin/opensips-cli
source /etc/profile
lockfile -r 0 $LOCKFILE
if [ $? -ne 0 ] ; then
echo "ERROR FROM LOCKFILE ${LOCKFILE}"
rm -f ${LOCKFILE}; exit
fi
trap "rm -f $LOCKFILE; exit" INT TERM EXIT
ip=`hostname -I | cut -d " " -f1`
cd /cdr
if [[ -z "$(ls -1 *.csv 2>/dev/null)" ]] ; then echo "no files to
process";exit;fi
...
/usr/bin/timeout -k 5 5 ${OPENSIPSCTL} -x mi flat_rotate
More information about the Users
mailing list