[Asterisk-Users] Local Echo

Noah Silverman noah at allresearch.com
Tue Apr 12 17:13:26 MST 2005


Thanks Jeff,

Your explanation helps.

You are correct.  There is delay in the sidetone.  It annoys me, but the
other party doesn't her it.  (You're right that the other party is on a
POTS line.)

I assume that the echo must be between the SIP phone and Asterisk.
Since the actuall call sounds fine to both me and the other party, then
the Zapata stuff must be working fine.  Right??

Interesting, If I call someone who doesn't pick up right away, I can
still hear myself echo really badly if I talk into the phone while it is
still ringing at the other end.  Does this help??

I'll try turning down the rx gain when I get into the office tomorrow,
and we'll see if that helps.




Jeff Heath wrote:
> Sidetone is, by definition, echo.  But it's "good" echo.  What do I mean
> by that?  It means that sidetone gives you some feedback - you hear
> yourself talk.  "bad" echo is when the delay gets too long.
> 
> If the echo is annoying you, it's not sidetone.  The listener at the
> other end of the conversation doesn't hear an echo because (I'm assuming
> they're on a POTS line) the delay in his echo path is only about 10
> msec.  Also keep in mind that if the far end heard an echo, he would
> hear an echo of his own voice, not an echo of your voice.
> 
> Also, the other responder is correct to check your gain settings.  If
> the reflected signal is coming in too hot (most echo cancelers set the
> threshohld at -6dB) the echo canceler assumes it's the other end talking
> and disables itself. 
> 
> I re-read your post and the only thing that doesn't add up is the fact
> that you're getting echo on all your long distance calls too.  Getting
> echo on all local calls fits my previous explanation, but not ld.  The
> reason is that the ld companies do a good job of canceling echo at the
> source (otherwise we would hear it much of the time on the PSTN).
> 
> Also keep in mind that you do use VoIP services - between the Asterisk
> box and the SIP phones.  That's where the delay is coming from.  You're
> not going to have significant jitter or delay problems on your local
> network, so adjust your jitter buffer down to 1.  It will make your
> calls better from a latency point of view and it might help with the
> echo too.  
> 
> -- Jeff Heath 
> 
> 
> 
> On Tue, 2005-04-12 at 19:19, Noah Silverman wrote:
> 
>>Hi,
>>
>>I think that you guys are missing the problem.  The echo is only from
>>the sidetone.  I don't hear the other party with an echo and they don't
>>hear me with an echo.  That leads me to believe that it hs nothing to do
>>with the zapata stuff.  It is somewhere between my SIP phone as Asterisk.
>>
>>-N
>>
>>
>>Rod Bacon wrote:
>>
>>
>>>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
>>>>
>>>
>>>
>>>_______________________________________________
>>>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