[Asterisk-Users] Local Echo

Rod Bacon rod.bacon at empoweredcomms.com.au
Tue Apr 12 16:16:23 MST 2005


In addition to making sure that echo cancellation is enabled on the 
interface(s) in question, you will also need to play with the gain settings. 
Specifically, try turning down the rxgain. I dropped mine to -10.0, and the 
echo disappeared altogether.

The problem was then that incoming voice was too quiet. After a lot of 
messing around, I eventually settled on -3.0

This figure gives me good incoming volume and only a faint echo... not 
enough to bother me or my users.

I also found that the order of settings in the zapata.conf makes a 
difference. If I had the gain settings too far down in the config file, they 
had no effect.

Make sure you stop and restart * after changing any of these settings. A 
simple reload won't suffice (I even unloaded and reloaded the kernel 
modules, just to be sure).



----- Original Message ----- 
From: "Jeff Heath" <jheath1 at optonline.net>
To: "Asterisk Users Mailing List - Non-Commercial Discussion" 
<asterisk-users at lists.digium.com>
Sent: Wednesday, April 13, 2005 7:54 AM
Subject: Re: [Asterisk-Users] Local Echo


> Here's what's happening.
>
> First some background.   Anytime there's a 4 wire (T-1) to 2 wire (local
> subscriber loop) conversion (this is called a hybrid) there's a good
> chance that some electrical energy will be reflected.  This is because
> there is usually an impedance mismatch between the 4 wire and 2 wire
> circuits.
>
> This happens all the time in the local telco.  You come in to switch A
> and are destined for switch Z.  The telco transports the traffic between
> A and Z over T-1 (which is muxed up to T-3 or SONET).  When the T-1 gets
> to switch Z it eventually gets attached to a 2 wire local loop (POTS) to
> get to the far end.  Energy from A is reflected back towards A by the
> hybrid at the Z side.
>
> But reflected energy is only one of two necessary conditions for echo.
> The other condition is sufficient delay for a human being to perceive it
> as echo.  In order for us to perceive it as echo, the reflected energy
> must be delayed by about 25 msec.  Anything less than that and we
> perceive it as sidetone (sidetone is actually a good thing).
>
> The local telephone company doesn't have echo cancelers in their network
> because they don't need them.  Why? because in the local POTS network
> you'll never have a call that is delayed by more than 25 msec.  Long
> distance carriers (IXCs) install echo cancelers because their customers
> will experience delays longer than 25 msec, but not local telcos.
>
> Now introduce VoIP.  VoIP turns every call (even the simple setup you
> outlined) into a long distance call.  If you have your jitter buffer set
> to 3 you've introduced 60 msec of delay.  I forget the rule of thumb for
> distance vs electrical delay, but I think you can go from NY to SanDiego
> in about 85 msec.
>
> That explains why the echo is there.  What I can't help you with (I've
> got lots of telecom experience, but little Asterisk experience) is
> changing the settings in Asterisk to cancel it.  The good news, though,
> is that this is a straight-forward echo cancellation problem, and once
> you find someone who knows what the right settings are, you should be
> able to get rid of it.
>
> -- Jeff Heath
>
>
> On Tue, 2005-04-12 at 17:28, Noah Silverman wrote:
>> Jeff,
>>
>> Thanks for the help. Your explanation of an "echo" makes perfect sense.
>>
>> Here are some notes on our system that might help:
>>
>> 1) The echo occurs on EVERY call either inbound or outbound, local or ld.
>> 2) We don't use any VOIP services, just PTSN lines from the phone company
>> 3) Our system is like this:  SIP phone <-> Asterisk box <-> TDM400 card
>> with FXO <-> Telco Pots line
>> 4) I hear my own voice echo.  The other party sounds fine to me, and I
>> sound fine to them.
>> 5) The phones are on a very small LAN in our office with almost no 
>> traffic.
>> 6) Our phones are Polycom IP500
>> 7) I have the codec set to ulaw
>>
>>
>> Thanks!!!
>>
>> -N
>>
>> Jeff Heath wrote:
>>
>> >On Tue, 2005-04-12 at 15:28, Noah Silverman wrote:
>> >
>> >
>> >>Hi,
>> >>
>> >>I tried, and still get an echo.
>> >>I don't think the problem is with the zap interface.  It must be on the
>> >>asterisk or phone side.
>> >>
>> >>-N
>> >>
>> >>
>> >>
>> >
>> >Echo requires 2 phenomena:  1) reflected energy  2) enough delay that it
>> >is discernable.   That you are hearing echo means that something at the
>> >far end is reflecting the electrical or accoustical energy of your
>> >voice.
>> >
>> >Echo cancellation should be done as close to the source of unwanted
>> >reflected energy as possible.  The fact that you're hearing echo means
>> >that the echo cancelers at the far end either a) don't exist or b)
>> >didn't work.  It will be very difficult to cancel reflected energy
>> >coming back at you from the "other side" of the network.
>> >
>> >Tell me more about the phone call where you experienced the echo and I
>> >_might_ be able to help.  Specifically,
>> >
>> >- was the phone at the other end a speaker phone and if so, was it an
>> >expensive Polycom phone that's designed to be a speaker phone or a cheap
>> >Walmart phone that happens to have speaker capability?
>> >
>> >- was it a local call or a long distance call
>> >
>> >- what codecs are in use?
>> >
>> >- what's your best guess at the round trip delay (i.e. what networks had
>> >to be traversed and what is the jitter buffer set for?)
>> >
>> >
>> >
>> >
>> >
>> >>Rich Adamson wrote:
>> >>
>> >>
>> >>
>> >>>>I have a strange echo problem.
>> >>>>
>> >>>>When speaking on the phone with someone, I hear MY OWN voice with a
>> >>>>sever echo.  The other party sounds perfect, and they can hear me
>> >>>>perfectly.  It is as if only the sidetone has an echo.
>> >>>>
>> >>>>I'm running * on a dedicated box, small LAN, and am using 4 FXO cards 
>> >>>>to
>> >>>>connect the box to PTSN lines.  My phones are Polycom IP500 SIP 
>> >>>>phones.
>> >>>>
>> >>>>The only echo cancellation stuff that I can find relates to 
>> >>>>cancelling
>> >>>>echo between my system and the PTSN lines.  Since the call is 
>> >>>>"perfect",
>> >>>>I don't see how this would apply.
>> >>>>
>> >>>>Any suggestions??
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>Try these parameters for each zap channel:
>> >>>echotraining=800
>> >>>echocancel=yes
>> >>>echocancelwhenbridged=yes
>> >>>
>> >>>Don't forget you have to stop and restart asterisk. a reload will not 
>> >>>work.
>> >>>
>> >>>
>> >>>_______________________________________________
>> >>>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
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>_______________________________________________
>> >>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
>> >>
>> >>
>> >
>> >_______________________________________________
>> >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
>> >
>> >
>> >
>> _______________________________________________
>> 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
>
> _______________________________________________
> 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