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.
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.
For example, this is the output for the
sip show peers
command: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 commandsip 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: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...