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
1 comments On Asterisk SIP Packet Debug
Hmm, what about the noisy SIP protocol?
How do I only show sip messages initiated by my host vice versa?
How do I filter out OPTIONS messages etc.?
How do I suppress the codec information which bloat the whole screen?