[Asterisk-Users] X100p echo guide

Rich Adamson radamson at routers.com
Mon Dec 12 21:29:14 MST 2005


> 
> any experienced user please guide us newbies to tune echo training 
> intelligently.
> 
> echocancel can have values of 32,64,128,256, and echotraining=400 or 800
> 
> my test setup:     SoftFone --- * --- PSTN
> 
> from the default values of echocancel=128 and training=400, i observed 
> that if SoftFone is on the same LAN with * there is no problem with the 
> echo for me.
> 
> but when SoftFone is on the internet then echo reappears.
> 
> Questions:  are there any rule of thumb like when the latency increases, 
> how do i supposed to set echocancel from default of 128? is it higher 
> 256? or go down lower to 64,32? the same question with echotraining=400/800?

I'll take a stab at this, but you probably won't like reading this.
Others can jump in to help.

There is no standard procedure to setting the parameters. The values 
depend 100% on exactly "where" the echo is coming from, and how far that
source is from your location.

Softphones can oftentimes create echo due to microphone-speaker
separation, and probably the sound card used in the system.

The echotraining=400 parameter is used on analog x100p/TDM card 
interfaces to the pstn line, and essentially means the asterisk echo
canceller routine will send a pulse outbound 400 milliseconds after
it grabs the pstn line. The routine then listens for the reflected
energy and uses that value to preload the echo canceller itself.
Central office equipment characteristics vary from one manufacturer
to another (as do pstn copper cable), and this parameter is highly
oriented around "when is it safe to pulse the pstn line".

The only way to adjust this parameter is via trial & error. I'd
suggest starting with echotraining=800, and adjust all other parameters
to minimize echo. After all that is done, _then_ try lower values for
this parameter listening for echo differences.

The echocancel=128 defines how large of an echo canceller buffer to use
in milliseconds. The value used is highly dependent on where the echo is
coming from. The further away the source of the echo, the greater this
value needs to be. Unless you are trying to run over satellite, or,
using facilities that have hugh delays, echocancel=128 is probably a
good starting value.

The problem with adjusting these parameters is that there is no way for
you or I to "know" exactly where the source of the echo is, and
therefore no way to "know" how to set these. Its all basically trail and
error listening closely to differences in the amount of echo with each
change made.

In most cases, the rxgain/txgain values (primarily rxgain) for the pstn
card has the greatest impact. Secondarily, the choice of echo canceller
to use (in zaptel/zconfig.h) is the next most popular adjustment.

Remember, that changes made in zapata.conf _only_ take effect after you
stop and restart asterisk; a reload command won't do it.

Based on comments from others, if your trying to use an x100p
compatible card, there is a very high probability you'll never get rid
of the echo.

There are hundreds of postings in the archive on how to adjust the
rxgain & txgain values. The bottom line for these is it basically comes
down to trial & error changes as well.

It would be very nice if we could all afford the test equipment that is
necessary to quantify echo issues, but we can't so we're all stuck with
the trial & error methods.





More information about the asterisk-users mailing list