The initialization log can be seen at syslog (/var/log/syslog
). You can redirect the log to a specific file such as opensips.log
by changing the configuration of the rsyslog daemon. By default, OpenSIPS logs to the LOCAL_0
facility as defined in the opensips.cfg
script:
log_facility=LOG_LOCAL0
To redirect log files to opensips.log
, edit the /etc/rsyslog.conf
file and add the following line to the rules section:
Local0.* -/var/log/opensips.log
Create the file and restart the daemon using the following command:
touch /var/log/opensips.log /etc/init.d/rsyslog restart
After restarting OpenSIPS, you should see the following log. Logs are very important for this training. Whenever you have a problem, you should check the log files. You can see the log file in real time using the following command:
tail /var/log/opensips.log –f
You can also change the log level to a more or less verbose level dynamically:
opensipsctl fifo debug 3
A log example is shown...