[Asterisk-Dev] Increasing reliability on lossy connections
Steve Kann
stevek at stevek.com
Wed Jan 12 18:26:10 MST 2005
On Jan 12, 2005, at 2:07 PM, John Todd wrote:
> At 12:54 PM -0600 1/12/05, Michael Giagnocavo wrote:
>>
>> One ISP I'm forced to deal with usually has between 2% and 8% packet
>> loss on
>> their lines. They claim this is how cable works. I'd like to ditch
>> them, but
>> in Guatemala, they're actually not that bad, and I'm stuck with
>> trying to
>> come up with a solution.
>>
>> So, what I was thinking is that if duplicate IAX2 packets were sent,
>> then
>> most packets would get there, at least once. IAX2 would discard the
>> duplicates, and things would work better, at double the bandwidth. I
>> was
>> thinking about adding an iax.conf option to configure this per user.
>
> The better solution would be to implement iLBC's packet concealment
> methods, and then use that codec for your IAX2 trunking. I am
> currently under the impression (someone correct me if I'm wrong! It's
> been a while since this was discussed...) that the iLBC code in * is
> not completely implemented due to timing issues, so that iLBC's great
> packet concealment methods are unused.
>
> Sending packets twice is... a frightening hack.
As a follow-up to my previous post on this:
1) Using iaxclient with 5-8% packet loss, and Speex or iLBC (soon other
codecs) should be very usable, You can even use it with 20% packet
loss and have a totally intelligible conversation (assuming a
well-distributed loss profile, i.e. the test program I've used uses
rand() to determine when to drop packets. If you're dropping many
sequential packets, you're going to be in trouble).
2) Repeating each packet is a wasteful way to provide redundancy; a
better way is to use FEC, (think RAID for packets), where you can, for
example, send 5 packets for every 3 real packets, and survive the loss
of any 2 of this set of 5, and still have no lost data. (or any
numbers you want to choose here). Generally, you tack the FEC stuff
onto subsequent packets, so you don't actually send more packets, just
make some bigger. All this comes at some cost in latency, though.
(you could do 5:4 instead of 5:3, and only have 25% more packets)..
-SteveK
More information about the asterisk-dev
mailing list