Asterisk SIP Packet Debug

Asterisk is a great voice over IP server that can be used to replace or compliment a traditional PBX, out of the box it has a great number of features.

However with most things VoIP/SIP based you can almost be sure you will need to do some debugging at some point. Certainly for SIP issues the best place to look would be in traces of the realtime SIP packets that are passing through the Asterisk box.

Debug the RAW Asterisk SIP Packets

The first sage is to enter the asterisk command line mode

asterisk -r

Next you need to enable the SIP debug, normally it’s a good idea to enable it for a specific SIP peer that your having problems with

sip set debug on
sip set debug peer {name}

Now make your inbound or outbound call and follow the packet flow to get an idea of where the issue may be…

Show current SIP registration status

If your using a SIP service that requires registration you may also want to check the current registration status, this can be done using the below command

sip show registry

Reload SIP configuration, and re-register clients

If you have been making /etc/asterisk/sip.conf changes on the fly you will probably want to reload the file and reset your registrations, the following command will accomplish that:

sip reload

Technology enthusiastic with many ongoing online projects one of which is this personal blog PingBin. While also working full time within a data center designing and maintaining the network infrastructure.

Leave a reply:

Your email address will not be published.