System information
exited non-zero on 'Zap/1-1'
[Mar 11 09:39:35] VERBOSE[2973] logger.c: -- Hungup 'Zap/1-1'
[Mar 11 09:39:35] VERBOSE[3680] logger.c: -- Starting simple switch on 'Zap/1-1'
[Mar 11 09:39:35] VERBOSE[31362] logger.c: -- Hungup 'Zap/1-1'
To filter on one call specifically, we could grep on the thread ID. For example:
$ grep 31362 verbose
which would give us:
[Mar 11 09:38:35] VERBOSE[31362] logger.c: -- IAX2/shifteight-4 answered Zap/1-1
[Mar 11 09:39:35] VERBOSE[31362] logger.c: == Spawn extension (shifteight, s, 1)
exited non-zero on 'Zap/1-1'
[Mar 11 09:39:35] VERBOSE[31362] logger.c: -- Hungup 'Zap/1-1'
This method does not guarantee that you will see everything relating to one call, since
a call could in theory spawn additional threads, but for basic dialplan debugging we
find this approach to be very useful.
Logging to the Linux syslog Daemon
Linux contains a very powerful logging engine, which Asterisk is capable of taking
advantage of. While a discussion of all the various flavors of syslog and all the possible
ways to handle Asterisk logging would be beyond the scope of this book, suffice it to
say that if you want to have Asterisk send logs to the syslog daemon, you simply need
to specify the following in your /etc/asterisk/logger.conf file:
syslog.local0 => notice,warning,error ; or whatever type(s) you want to log
You will need to have a designation in your syslog configuration file
*
named local0,
which should look something like:
local0.* /var/log/asterisk/syslog
You can use local0 through local7 for this, but check your syslog.conf
file to ensure that nothing else is using one of those syslog channels.
syslog
†
will allow much more powerful logging, but it will also require more knowledge
than simply allowing Asterisk to log to files.
* Which will normally be found at /etc/syslog.conf.
† And rsyslog, syslog-ng, and what-all-else.
526 | Chapter 24: System Monitoring and Logging