9:23 AM

Asterisk SIP Trouble Shooting

When you run a phone service over the public internet there is not much that you can do to optimize the service. The quality of the phone service will be dictated by the IP packet loss, the IP latency and the time require to dial.


Latency

You cannot  use the SIP re invite function to by-pass the Asterisk server to improve the latency. Due to way of defining the NAT functions you will have to force the media traffic to transit via your Asterisk server. There is very little that you can do about latency, but you can avoid some stupid configuration at both end of the service (e.g. using WiFI link to connect VoIP phones).

Packet loss

A typical voice call will require about 30 to 100 kbps depending of the Codec that you have selected. I use the DECT codec G.726 (32 kbps) because it works with the Gigaset and is supported by Asterisk for interconnection on Analog phones via a Digium adaptor card. If your SIP phone supports the GSM codec ETSI 06.10 (13Kbps) you should use it.
This type of traffic will go smoothly via your home Broadband internet, if you setup define the priorities correctly. Some consumer gateways (e.g. Linksys) will let you define priority by port numbers. Give the highest priority to your RTP ports.

Dialing and ringing delays

As your SIP phone will pool the SIP proxy (Asterisk server) every 10 to 30s, the IP route should always be up and provide a decent time to dial and to ring. If that is not the case the issue is probably in the Asterisk extention.conf not in SIP.

Troubleshooting.

SIP

Connect to Asterisk with command 'asterisk -c'
The command 'sip debug' and 'sip debug ip' will give you access to detailled debug.
If your firewall is correctly configured 'sip debug ip' and  'tcpdump' will show the similar information. If not check your firewall. Remember that tcpdump tap in the Ethenet traffic before the firewall.

Media
You must debug the media independently in both  direction. The simplest is to create noise at one end and follow the RTP stream with tcpdump. Software SIP phone are handy for debug because you can run tcpdump (or ethereal) on the same PC than the SIP phone and check what traffic comes in / goes out.
Statistic can also be use to check RTP traffic. As the number of packet is large it will quickly be visible on stats reports.

0 comments: