[asterisk-dev] Tuning Software Echo Cancellers

Greg Boehnlein damin at nacs.net
Sun Aug 6 21:21:36 MST 2006


On Sun, 6 Aug 2006, Rich Adamson wrote:

> Inline... general comments
> 
> > 	I am working on trying to track down and eliminate echo on a PRI. 
> > I'm using Gen 2 TE-405P cards, w/ the MG2 echo canceller. I cannot enabnle 
> > AGGRESSIVE_SUPPRESSION because that causes dropouts in the speech that are 
> > unacceptable to my customers needs. I am awaiting the RMA of a pair of 
> > TE-405s for upgrade to Gen 3 so that I can put the VPM-450 hardware echo 
> > can card on them, but in the meantime, I am trying to tune the software 
> > echo cancelling routines to lessen the impact of the echo to specific 
> > local central offices where the Telcos just do not have any edge 
> > supression going on.
> > 
> > I am using MG2 w/ the following settings in zapata.conf
> > 
> > echocancel=256
> > echotraining=800
> > rxgain=+0.21
> > txgain=-0.0
> 
> The echotraining parameter was originally created for analog pstn lines, 
> adding a delay (in the above example, 800 milliseconds) to allow analog 
> central office equipment to settle down before the s/w echo can routines 
> pulsed the line. The reflective energy from the pulse was then used to 
> preload the echo can routines.  Doubtful this parameter should be 
> anything other then =yes on a PRI.

Alright.
 
> The rxgain and txgain values need only be expressed in units; the 
> numbers after the decimal point have no practical value.

Interesting. They appear to show differences when monitoring the Milliwatt 
number using ztmonitor application.

> > The rxgain was set using a local milliwatt number (line side). 
> 
> Exactly how did you measure that? (What type of transmission test set 
> and what did you attach the test set to?)

I used the following procedure:

http://lists.digium.com/pipermail/asterisk-users/2004-November/064312.html

No test sets.

> > I'm still 
> > having trouble getting a long enough tone from the local C/O to do the 
> > txgain, hence the 0.0 setting. Apparently, X/O has their DMS 100 set to 
> > only provide 6 seconds of Millwat before it ends. No one seems to be able 
> > to figure out how to extend it on the local switch.
> 
> The above statements don't make any sense. When you dial into a CO 
> milliwatt generator, it generates a 1k tone allowing you to measure the 
> level of that tone at your site.

Yes.

> You then adjust rxgain. Since this happens to be a PRI, there is no pstn 
> loss and therefore no reason to try and compensate for a pstn loss. How 
> did you jump to a conclusion that you could use a CO milliwatt generator 
> to set txgain?

Again, the following article:

http://lists.digium.com/pipermail/asterisk-users/2004-November/064312.html

> > Using a value of 256 should give me a 64ms echo tail (from what I have 
> > read), but it does not seem to be enough to qwell the echo coming back 
> > from the particular trouble CO, which appears to have a 189 ms echo.
> 
> Highly unlikely that "the particular trouble CO" involves 189 ms echo, 
> unless that CO is half way around the world or is accessed via satellite 
> facilities.

Don't know what to tell you, but with all software echo canceling off, a 
mixmonitor recording of the channels shows a difference of 189 milliseconds 
from the time the original sound is played and when it is played back on 
the receiving channel. I've loaded this into an audio editing program 
(wavepad pro) to measure the echo tail as well as the amplitude of the 
echo.

> I'd suggest going back to 128 and compare echo with 256 to 
> the exact same distant tel number. Suspicion is you can't tell the 
> difference and 128 is just fine.

There is no difference between the two.

> The sangoma folks created a utility that could be used to measure the 
> echo and plot it in an excel graph. I've not used it since roughly 12 
> months ago and don't actually remember the utility's name. (Hopefully 
> someone else on the list will remember and post it.)
> 
> Think I'd start with parameters like these:
>   echocancel=yes
>   echotraining=yes
>   rxgain=0
>   txgain=-3
> and adjust txgain downward (more negative) by two or three units (eg, 
> -3, -6, -9) to see if that impacts echo. If one of those values is 
> better then another, then adjust by units around that point (forget the 
> decimal point). Be sure to call the same pstn tel number for each test 
> (and not a cell phone), and restart asterisk after each parameter change 
> (don't use reload).

The only way to completely eliminate the echo is to reduce the txgain to 
-20. At that point, the volume of the outbound call is barely audible.

Any other suggestions?

-- 
    Vice President of N2Net, a New Age Consulting Service, Inc. Company
         http://www.n2net.net Where everything clicks into place!
                             KP-216-121-ST






More information about the asterisk-dev mailing list