How to collect an Asterisk Debug Capture
The following steps are used to pull an Asterisk CLI debug capture:
Connect to your Asterisk system as root via SSH using your terminal or favorite SSH client. Â
Edit /etc/asterisk/logger.conf. Uncomment the line at the beginning of the file, starting with ";full => ..."
      To uncomment means to remove the ";" character.
Example:
[general]
...
[logfiles]
...
;security => security
console => notice,warning,error,verbose
;console => notice,warning,error,debug
messages => notice,warning,error
full => notice,warning,error,debug,verbose,dtmf,fax
Note: If the line is already commented out, you can exit the file, if the line does not exist, please add it. Please note that in some Asterisk implementations, such as FreePBX and Elastix, the logger.conf file will include other files. You may need to check those files to find out where the log configuration is located.Â
Log into the Asterisk CLI by using the command: # asterisk -r Â
Reload the logger module by running, logger reload , and then check if the logger has enabled full logging.ÂExample:
Asterisk*CLI> logger reload == Parsing '/etc/asterisk/logger.conf': Found Asterisk Queue Logger restarted
Asterisk*CLI> logger show channels Channel Type Status Configuration ------- ---- ------ ------------- /var/log/asterisk/full File Enabled - DEBUG NOTICE WARNING ERROR VERBOSE DTMF FAX /var/log/asterisk/messages File Enabled - NOTICE WARNING ERROR Console Enabled - NOTICE WARNING ERROR VERBOSE
Issue the following commands in the Asterisk CLI to turn on extra output:Â
core set verbose 10
core set debug 10
sip set debug [peer <peer>] or sip set debug onÂ
fax set debug on
Example:
Note: Depending on version of your Asterisk system, the sip set debug command may be different. Please check with your Asterisk admin for specific instructions on your system. You can also run sip set debug on peer / ip if you want to limit the output messages to a specific peer or ip.
Rotate the logs using the command logger rotate and place your test calls, or wait for the failure to occur. When it does, please note the time of failure and provide any other information available about the failure. Information that should be included:  internal extension involved, external number involved, Asterisk server IP, SIP extension IP, SIP call-ID.
Example:
Â
Â
Finally, collect the generated log file and compress it using the following command:Â
tar -zcvf debug-capture.tar.gz /var/log/asterisk/fullÂYou will need to replace the filename "debug-capture" with the name of your capture file.