[Asterisk-Users] Re: How do I reduce echo on asterisk

Jeff Heath jheath1 at optonline.net
Tue Apr 12 14:32:19 MST 2005


On Tue, 2005-04-12 at 15:54, Joel Jn-Francois wrote:
> On April 12, 2005 11:59 am, Joel Jn-Francois wrote:
>  >> I get an echo only from the caller end when I am making calls. I only get
>  >> it for some VOIP providers.  I am using asterisk Asterisk
>  >> CVS-v1-0-03/26/05-16:54:47 and Grandstream HandyTone 486 and 488.  My
>  >> default codec is ulaw.  Is there any way I can reduce the echo without
>  >> comprising quality?
> 
>  >Your terminology is confusing.
> 
>  >When you place a call through your handytones, do you hear echo, or does the
>  >other side hear echo?
> 
> Sorry...  When I make a call I hear an echo, but the person I am speaking 
> to on the other
> side does not.
> 
> Joel
> 

There's probably not much you can do about it.  Echo cancelation should
occur as close to the source of reflected energy as possible.  Here's
one scenario that would explain your experience.  

Cheapskate VoIP Inc. connects your call at the far end to the local
PSTN.  Relected energy is created at the hybrid in the local PSTN
between the 4 wire T-1 interface and their 2 wire local subscriber
loop.  The local telephone companies do not cancel this echo because
when they connect local calls, the reflected energy is not delayed in
time enough for humans to perceive it as echo.  Good inter-exchange
carriers install echo cancelers near this interface and cancel it
because their customers probably will experience the reflected energy as
echo.   Back to our scenario...  Cheapskate VoIP Inc. doesn't want to
pony up for echo cancelers so you get echo.

Now comes the hard part (and someone please jump in here because I don't
know the details of how echo cancellation has been implemented in
Asterisk).

In addition, Cheapskate VoIP Inc. compresses the hell out of their
traffic.  So now you've started out as G.711 then Cheapskate compressed
it to G.729 and uncompressed it at the far end then compressed the
returned signal (which contained your reflected energy).  

Now the echo canceler in Asterisk must compare the original signal that
was encoded G.711 with a returned signal that has been encoded twice in
G.729 (once on the outbound side and then again on the inbound side). 
That alone would severely diminish the performance of an echo canceler,
but just to make it a little harder we add in a bunch of delay and then
just for good measure we adjust the jitter buffer every once in a while
to add some variability to the delay.  The echo canceler is doomed.

If you can figure out how to make an echo canceler work under these
conditions e-mail me off list and we'll put together a business plan to
make a lot of money (seriously, if you can figure this out e-mail me at
jheath1 at optonline.net).

Realistically, I doubt there is much you can do except try to get a
different VoIP carrier.

- Jeff Heath


> 
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users




More information about the asterisk-users mailing list