Asterisk provides a variety of debugging methods. After connecting the console, you can look at the various levels of verbose and debug output, as well as the protocol package tracing. Let's take a look at the different options in this section (the Asterisk console details refer to annex E).
Connection Console
Connect the Asterisk console, you can start the server directly on the console (so that you cannot exit the console if you do not end the Asterisk process), or start the Asterisk in the background, and then log on to the remote console.
Start Asterisk directly in the console, using the following console command:
#/usr/sbin/asterisk–c
Remote Connection console, start the background first, and then connect:
#/usr/sbin/asterisk
#/usr/sbin/asterisk-r
If you encounter a problem where a module cannot be loaded, or if a module causes Asterisk to not load, start the Asterisk process with –C flag and monitor the module loading status. For example, if you attempt to load an OSS channel driver (this driver initiates a console channel) and Asterisk cannot open/DEV/DSP, you receive an error message like this:
WARNING[32174]: chan_oss.c:470 soundcard_init:unable to OPEN/DEV/DSP:
No such file or directory
= No sound card detected-console channel'll be unavailable
= = Turn off OSS support by adding ' noload=chan_oss.so ' in/etc/asterisk/modules.conf
Start verbosity and debugging
Asterisk can output debug information in the form of Warning,notice and ERROR messages. These messages can provide you with system information, such as registration, status, call process, and a variety of other information. Note that WARNING and NOTICE messages are not errors, however, error information needs to be checked.
Activates different levels of verbosity, using set verbose, to append a numeric value. Valid values are from 3-10, such as setting the verbosity maximum value,
Using: # Set verbose 10
You can also activate core debugging information by setting the debug level. To activate the debug output of the console, you need to add the debug to console => section in the logger.conf file.
For example: Console => Warning,notice,error,event,debug
Set a valid value of 3-10 for the debug level,
Example: # set Debug 10