Debug Asterisk¶
Asterisk has several debug modes:
verbose - various debug information is displayed, which related to step-by-step execution of call handling and various information of the call.
debug - information for developers is displayed
Messages for verbose mode by default are directed to Asterisk console and to log file /var/log/asterisk/messages.
Messages for debug mode by default are directed to log file /var/log/asterisk/messages.
For both modes you can set log level (from 0 to 10).
The higher is the level, the more information you get.
For regular users usually verbose mode is enough.
To turn on logging perform next:
2. Enter Asterisk console:
# asterisk -r
3. Set mode and log level:
CLI> core set verbose 3
This will enable verbose mode, level 3.
On this level you'll see step-by-step call handler execution.
To turn on debug mode perform following:
CLI> core set debug 5
This will enable verbose mode level 5.
4. Logging to file might quickly overflow disk space, thus after debugging is finished it's essential to turn off logging:
CLI> core set debug off CLI> core set verbose off