[asterisk-users] intermittent choppy sound over wifi link

Gordon Henderson gordon+asterisk at drogon.net
Tue Apr 10 15:56:36 MST 2007

On Sun, 8 Apr 2007, Curt Shaffer wrote:

> I am experiencing a situation where I am getting intermittent choppy audio.
> Here is the network layout:
> Termination provider -> IAX2 over the Internet -> 20Mb fiber connection ->
> router -> Asterisk
> My ATA connection goes into the router between the fiber and the Asterisk
> server on another interface here is the layout from me to Asterisk:
> Sipura ATA (SPA1001 running 3.1.19(SE) firmware), also tested with X-lite
> softest -> PIX 506 (although I have tried multiple routers and direct
> connection to the radio try to fix the problem) -> 1 mile 802.11b link to AP
> -> 15 mile 802.11b link Backhaul -> router -> Asterisk

I'm, er, impressed.

Some years ago I was involved with community broadband networks delivered 
via Wi-Fi, and the results were dissapointing to say the least. I was 
using smartbridges kit - good kit at the time and designed for the great 
outdoors. Relatively expensive though.

One thing I found was putting 2 Wi-Fi links back to back - ie. with just a 
switch in-between, would seriously degrade bandwidth through the link. And 
15 miles! That's really stretching it, but I guess you have the kit - big 
parabolics or dishes, line of sight, no fresnel zone intrusions, etc. We 
tried daisy-chaining 4 links together and struggled to get 1Mb/sec through 

What "kills" Wi-Fi is full duplex. It's only half-duplex kit, so there is 
a turn-around on the link to simulate full duplex. When your packets are 
short and coming in both directions, the radio turn-around time can exceed 
the packet time. Put 2 links back to back through a switch or hub and it's 
worse. Put short packets through it at regular intervals and it's worse 
yet. Try to run short packets both ways at the same time (which you have 
to for VoIP) and it's even worser.

But you'll get good ping times and downloading data will appear "just 
fine" which is what'll make it all the more frustrating!

So make sure there is nothing else on the Wi-Fi links, especially no 

> My Asterisk version is Asterisk, Zaptel Ping times are
> ~10ms, jitter is under 10 with an average of 5. QoS is enabled in the router
> for SIP, RTP and IAX2 traffic going to and from the Asterisk box.

QoS won't help you at the end of 2 radio hops, because by the time the 
packet gets to the router, it's gone over 2 Wi-Fi hops and it's too late 
for the router to do anything with it, so uploads are to be avoided. 
That's what used to kill my networks (I had 3 community networks with a 
few 100 people in total, connected togther with a fibre backhaul) One 
kiddie using p2p software would kill his entire segment of the network as 
the uploads would cripple any other downloads, and because I only had one 
router per community, he'd effectively cripple everyone in that community 
until I cut him off and/or employed some really harsh traffic shaping 
which wan't that effective anyway, but helped. I lusted after a router at 
each AP, but that was never going to happen as we never had the money...

> When I experience the choppiness the ATA reports packet loss on the web
> interface (Call 1 Packets Lost: ). I can run something such as ping plotter
> from the same leg of the network that the Asterisk box is on while this is
> happening and there is not even a small glitch of lost packets on the
> network but the ATA displays otherwise. The only thing I have come up with
> thus far is possible retransmissions on the wireless connection (and due to
> the type of gear, I'm not able to see this data). We are way out in the
> country with no other real providers even close so I'm doubting interference
> although I suppose it is a possibility keeping an open mind. My question is
> can anyone point me to any possible reasons this would be happening? Also
> can anyone tell me other reasons other than real lost packets that the ATA
> would show this? My only guess on that was packets that never got an ACK due
> to server congestion or some other reason other than actual loss.

As far as I'm aware, there's no "ACK" in the RTP stream - it's just a UDP 
stream with the bare minimal of overhead to help sequence and time 

You may find that the Wi-Fi gear is dropping UDP packets if it gets 
overloaded. Can you increase the sample time - from (eg) 20ms to 40ms? So 
the packets are bigger and the radio turn-arounds are less frequent? Have 
you tried a lighter codec? (eg GSM - smaller packets, but less often?)

Other than that, all I can suggest is Good Luck ...


More information about the asterisk-users mailing list