[Asterisk-Users] Echo Cancellation
Stephen R. Besch
sbesch at acsu.buffalo.edu
Mon Oct 6 14:13:50 MST 2003
I have been struggling with echo cancellation for the last few days. It
seems to me that it would be useful to start up a technical discussion
of the issue so that we don't have to solve the problem empirically. My
system is SIP (Grandstream) <=> Asterisk <=> Adtran TSU600 <=>FXO
<=>POTS. From what I can tell from testing on my system the echo has
the following characteristics:
1) It varies over time. It is worst at the start of a call and after
periods of silence. From this I conclude that the echo canceller is
adaptive, adjusting delay and amplitude based on real time signal analysis.
2) The echo is only heard on the SIP phones, not on the far end of the
POTS connection. In spite of seeming somewhat mysterious at first, I
concluded that this is actually the expected behavior. Note: Voice is
digitized at SIP phone, transmitted (with delay) to the FXO card and
converted to analog. The analog signal is placed on the 2-wire POTS
line, where it loops back to the analog receiver in the FXO card and is
digitized and sent back to the SIP phone as an echo. The POTS end hears
no echo because there is no pathway for the echoed packets to get back
to the POTS.
From this, it seems to me that the ideal place to deal with the echo
would be at the point of conversion (from A to D and back), since there
would be virtually no delay at this point and it would be simpler to
determine the correct amplitude correction. If this is the case, then
it explains why adjusting receiver and transmitter gains would aid in
cancelling echo, with the caveat that it should only work in those cases
where the Rx ant Tx gains that are being adjusted are those which are
right at the A/D and D/A converters. In other words, adjustment of
these values in Zaptel.conf should have no effect if I am using an
outboard channel bank.
What I would like is for the real experts to jump into this discussion,
lay out the real theory and technical details of the echo cancellation
used in asterisk so that we can all make more intelligent attacks on the
echo problem. How about it?
Stephen R. Besch
More information about the asterisk-users
mailing list