Skip to end of metadata
Go to start of metadata

Collecting Debug Information for the Asterisk Issue Tracker

This document will provide instructions on how to collect debugging logs from an Asterisk machine, for the purpose of helping bug marshals troubleshoot an issue on


  • Asterisk 1.4.30 or greater.


1. Edit the logger.conf file to enable debug output to your filesystem. Add the following line. The word "myDebugLog" can be changed to anything you want, as that is the filename the logging will be written to. A good example might be something like: issue_12345_full_log


Asterisk 13+


 In Asterisk 13 and later, you can dynamically create log channels from the CLI using the logger add channel command. For example, to create the log file above, you would enter:

logger add channel myDebugLog notice,warning,error,debug,verbose,dtmf

The new log channel persists until Asterisk is restarted, the logger module is reloaded, or the log files are rotated. If using this CLI command, do not reload/restart/rotate the log files in Step 2.


2. From the Asterisk CLI, restart the logger module:

Optionally, if you've used this file to record data previously, then rotate the logs:


2.1. Depending on your issue and if a protocol level trace is requested, be sure to enable logging for the channel driver or other module.

Module (version)CLI Command
New PJSIP driver (12 or higher)
pjsip set logger on
SIP (1.6.0 or higher)
sip set debug on
SIP (1.4)
sip set debug
IAX2 (1.6.0 or higher)
iax2 set debug on
IAX2 (1.4)
iax2 set debug
CDR enginecdr set debug on


3. Reproduce your issue.

4. Once finished, be sure to disable the extra debugging:

4.1. Again, remember to disable any extra logging if you enabled it in the
channel driver.

SIP (1.4 or higher)

IAX2 (1.4 or higher)

5. Upload the file located in /var/log/asterisk/myDebugLog to the issue tracker.



Do NOT post the output of your file as a comment. This clutters the issue and will only result in your comment being deleted.

6. Disable logging to the filesystem. Edit the logger.conf file and comment out or delete the line you added in step 1. Using a semi-colon as the first character on the line will comment out the line.


Then reload the logger module like in step 2:

  • No labels

1 Comment

  1. Capturing Output Of CLI


    Sometimes it's useful to capture the ouput of CLI on a text file (e.g. for debugging purposes), you could use this: