Book Image

Elastix Unified Communications Server Cookbook

Book Image

Elastix Unified Communications Server Cookbook

Overview of this book

Table of Contents (24 chapters)
Elastix Unified Communications Server Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Description and Use of the Most Well-known FreePBX Modules
Addon Market Module
Asterisk Essential Commands
Asterisk Gateway Interface Programming
Helpful Linux Commands
Index

SIP/IAX debugging


Whenever we need to know why some calls are not completed or to determine the state of an SIP, or IAX trunk, or peer, we need the right tools to do it. This section will provide us the tools for a fast but significant debug of our IP-PBX.

How to do it…

  1. We can check the status and flow of the SIP protocol and calls throughout our PBX by using Asterisk's commands. We recommend running them directly from Asterisk's Command Line Interface.

  2. For example, this is the output for the sip show peers command:

  3. We can even combine these commands with others, such as grep. In the next example, we will connect to the Asterisk's CLI, execute the command sip show peers, and filter the output to see the online peers: aterisk -rx 'sip show peers' | grep -a OK. The next image shows the output of this command:

  4. The list of the most used commands involving the SIP protocol is as follows (remember that these commands are issued within Asterisk's CLI):

    sip set debug on
    sip set debug ip
    sip set debug...