Debugging Asterisk

Besides using Asterisk's logs to check the status of this service, we can use CLI commands to assist us with debugging our PBX service.

The most common commands are as follows:

  • core show uptime: This command prints the version and uptime of the service, with the date of the last reload.
  • sip set debug: This command prints the SIP debugging in Asterisk's CLI. We can debug all the SIP calls or just the peer of our interest (sip set debug peer XXX).
  • pri debug span x: This command is very helpful to debug all the PRI events on our PBX. To debug the MFC/R2 signaling, we can use mfcr2 show channels.
  • core set debug: This command enables the debug visualization of all events on Asterisk's CLI.

How to do it...

If we click on the Reports |

Get Elastix Unified Communications Server Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.