Debugging
Several methods of debugging are available in Asterisk. Once you’ve connected to the console, you can enable different levels of verbosity and debugging output, as well as protocol packet tracing. We’ll take a look at the various options in this section.
Connecting to the Console
To connect to the Asterisk console, you can either start the server in the console directly (in which case you will not be able to exit out of the console without killing the Asterisk process), or start Asterisk as a daemon and then connect to a remote console.
To start the Asterisk process directly in the console, use the console flag:
# /usr/sbin/asterisk -cTo connect to a remote Asterisk console, start the daemon first
and then connect with the -r
flag:
#/usr/sbin/asterisk#/usr/sbin/asterisk -r
If you are having a problem with a specific module not loading,
or a module causing Asterisk to not load, start the Asterisk process
with the -c flag to monitor the status of modules loading. For example,
if you attempt to load the OSS channel driver (which allows the use of
the CONSOLE channel), and Asterisk
is unable to open /dev/dsp, you will receive the
following error on startup:
WARNING[32174]: chan_oss.c:470 soundcard_init: Unable to open /dev/dsp:
No such file or directory
== No sound card detected -- console channel will be unavailable
== Turn off OSS support by adding 'noload=chan_oss.so' in /etc/
asterisk/modules.confEnabling Verbosity and Debugging
Asterisk can output debugging information in the ...