VoIP jitter
Â
Synopsis
95% of jitter on a VoIP connection is due to a faulty network or internet connection. Unfortunately, we can do nothing about the customer's local netowrk, and even less about the Internet, but we can at least guide the customer in getting to a rapid resolution.
What is Jitter?
In voice over IP (VoIP), jitter is the variation in the time between packets arriving, caused by network congestion, timing drift, or route changes. A jitter buffer can be used to handle jitter.
A jitter buffer temporarily stores arriving packets in order to minimize delay variations. If packets arrive too late then they are discarded. A jitter buffer may be mis-configured and be either too large or too small.
Impact
If a jitter buffer is too small then an excessive number of packets may be discarded, which can lead to call quality degradation. If a jitter buffer is too large then the additional delay can lead to conversational difficulty.
Resolution
A typical jitter buffer configuration is 30mS to 50mS in size. In the case of an adaptive jitter buffer then the maximum size may be set to 100-200mS. Note that if the jitter buffer size exceeds 100mS then the additional delay introduced can lead to conversational difficulty.
Some of the more obvious things
On the server, run:
asterisk -rx 'sip show peers'
Look for phones that are registering on ports other than 5060 (very common with [softphones], and look for phones that are lagged or unregistered. Also, look for phones sharing IP addresses. If two or more phones have the same IP address, multiple phones are double-natting. Advise customer on how to remedy this.
On the local phones, look to see if they register to the local DNS name. Are they registering to sNNNNx.pbxtra.fonality.com when they should be registering as local phones?
Also, inquire about the primary DNS server settings. If /var/adm/bin/trouble.pl doesn't give useful output, then check the name resolution with dig and/or nslookup
Â
outbound/inbound connections
From tech, run:
sudo /var/adm/bin/udp4.pl <server_id> <packets> <1st_port>
This neato tool shows how many packets were lost or mis-ordered on port 5060 (or whatever is declared in <1st_port>
). This is good for inbound/outbound connections
If in doubt about udp4.pl, try using nmap, nc, telnet over port 5060 from tech into the external DNS of PBXtra while running tcpdump or ngrep on the PBXtra to see if packets get through by a different means.
Â
Â
VoIP circuits are linear (mostly)
Where to begin - internal or external
If a customer is experiencing jitter on the phone, you must first isolate whether the jitter is inside or outside the network, and if it's specific to a phone or branch of the network. Ask the following questions to find out more:
"Is there jitter just on inbound/oubound calls, or between extensions as well? Also, is it specific to one phone?"
Extension-to-extension: check the network settings & the phone-specifics
Just one phone (or one brand of phones - e.g., all Aastra's or all softphones affected): check phone-specifics
Just inbound/outbound & most/all phones impacted: check the trunk
Â
Phone-specifics
"What model of phone is it?"
Â
Aastra
"Is there a difference between the quality of the handset & speakerphone?"
Yes: Adjust the handset/sidetone gain in aastra.cfg & reflash. Also, try swapping handsets with another phone.
No: Check the phone's network location. Try moving to another place.
Â
Softphone
Check all the settings against the standard settings, in particular:
The right DNS name (try the IP address)
SIP Listen Port - Manual Override: 5060
Adjust the volume on the phone and in the user's PC
What headset are they using?
Suggest using the original Plantronics headset that we ship out to all softphone customers
Whether using that or a 3rd party headset, use the Sound Recorder in Windows XP to test a recording made through the mic & played back to the headset independently of the softphone.
Â
Polycom
Polycom has *excellent* hardware echo cancellation built into the phone. There are changes that can be made to the settings of the phone itself...
Â
Network-Specifics
ping
ping can be your friend. The following command will give a test of the network connection between the PBXtra and any peer (local phone, remote phone, VoIP provider, etc.) and writes to a file (name it whatever you like). A large variance (over 150ms difference) between the average & max ping time demonstrates an inconsistent packet speed, which translates into jitter and dropped calls:
ping -i 0.02 -c 2000 -s 270 ip.of.sip.peer > out.file
tail out.file
Â
Customer-owned Hardware
"What sort of router are you running?"
Never offer to help set it up, or give instructions on how to make adjustments - we don't want to be liable for giving direct instructions on network changes that can potentially cause problems.
Check if it's suggested or blacklisted
Ask if there are any SIP ALG or SIP Transformation settings - and suggest turning them off, as these settings can mangle SIP packets