[Asterisk-Users] Echo Madness

Sophus sophus at gmail.com
Sat May 7 00:08:22 MST 2005


Hi there, I'm experiencing an echo problem and dammed If I can sort it out.

We're running Asterisk on Fedora Core 3 64bit, installed as per
http://www.voip-info.org/wiki-Asterisk+Fedora+Core+3.
These are the specs of the Machine –

1 x  	AMD A64/3500+ CPU: Desktop Athlon64™ Retail w/fan SKT 
1 x 	Asus A8N-SLI Deluxe Athlon™ 64 S939 NVIDIA nForce(r)4 SLI™ PCI
Express Req: 24pin ATX
1 x 	Corsair TWINX1024-3200XL 2x 512MB 1024MB Dual Channel Optimised Pair
2 x 	Western Digital WD1200JD/PD-SATA 120GB Serial ATA 150Mbps 7200rpm
HDD 8Mb Cache
1 x 	Leadtek PX6200 TC TDH GeForce 6200 64MB PCI-E
1 x 	LG GDR-8163B DVD-ROM Internal: 16x Black
1 x 	Alps FDD B Floppy Disk Drive: 1.44Mb 3.5" Black 
1 x 	Antec 1040B ATX Full Tower Case: 400W PSU Black 
1 x 	Generic Adapter: Power ATX 20 pin -> 24 pin


With a Digium Wildcard TDM400P TMD04B (4 Port FXO Modules) connecting
to our analogue system.

On calls that use the TMD400P we're getting echo on the IP phone - on
inbound calls only.  That is if a call is initiated from an IP phone
there is no echo on either side of the conversation, but if the call
originates from the PSTN the person on the IP phone gets echo for
about the first 10-30 seconds of the call.  IP to IP calls are echo
free.


Let me elaborate…


After installing Asterisk we had major echo problems when using the
TMD400P.  After tweaking the settings in the relevant configuration
files the echo, the best result I could get was echo disappearing
about 10-30 seconds into a call (on ALL calls, both incoming and
outgoing).

The settings I'm currently using are –

zaptel.conf

defaultzone=au
loadzone=au
fxsks=1-4

zapata.conf

[channels]

language=en
context=default
rxwink=300
usecallerid=no
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
rxgain=6.0 ; about 12 seems to effect echo but this level (6) is
required for normal comms.
txgain=-1.0 ; this seems the best level.
switchtype=national

group=1
callgroup=1
pickupgroup=1
immediate=no
usecallerid=no
flash=100
signalling=fxs_ks
echocancel=128
echocancelwhenbridged=yes
echotraining=900
callerid=asreceived
busydetect=yes
busycount=5
context=default
channel => 1-4


I have tried practically every different configuration possible, and
this seems to yield the best result for me, although not good enough
for a production environment (I hate echo).

Further reading on the mailing list and wiki suggested I should try tweaking 

a) In chan_zap.c - change the following line: #define READ_SIZE 160 to
#define READ_SIZE 16 And In zapata.conf adding jitterbuffers=40 (and
recompile)

This did not have any noticeable effect, except increase CPU load.

b) In zconfig.h, uncomment DAGGRESSIVE_SUPPRESSOR (and recompile)

This made audio quality worse, and echo unchanged.


My TDM400P card, which I purchased not two weeks ago is marked 'REF F'
and the FXO module are marked 'REV B'.  Discussion in the mailing
lists suggest the Current card revision is H and the current FXO
module revision is C.   Does anyone know if the revision of card I'm
using is more susceptible to echo problems?

A dmesg also shows my card as a E/F REV.

Zapata Telephony Interface Registered on major 196
Registered Tormenta2 PCI
ACPI: PCI interrupt 0000:05:08.0[A] -> GSI 3 (level, low) -> IRQ 3
Freshmaker version: 71
Freshmaker passed register test
Module 0: Installed -- AUTO FXO (FCC mode)
Module 1: Installed -- AUTO FXO (FCC mode)
Module 2: Installed -- AUTO FXO (FCC mode)
Module 3: Installed -- AUTO FXO (FCC mode)
Found a Wildcard TDM: Wildcard TDM400P REV E/F (4 modules)

A cat proc /interrupts shows 

           CPU0       
  0:   13097582          XT-PIC  timer
  1:        958          XT-PIC  i8042
  2:          0          XT-PIC  cascade
  3:   13742817          XT-PIC  wctdm
  4:    3258008          XT-PIC  NVidia CK804
  5:      12081          XT-PIC  libata, ehci_hcd
  7:          3          XT-PIC  SysKonnect SK-98xx
  8:          0          XT-PIC  rtc
  9:          0          XT-PIC  acpi
 10:          0          XT-PIC  libata, ohci_hcd
 11:    1323944          XT-PIC  libata, eth0
 12:      20212          XT-PIC  i8042
 15:     117438          XT-PIC  ide1
NMI:       2146 
LOC:   13095854 
ERR:          0
MIS:          0

As digium recommends, wctdm has it's own interrupt.  Also, I have
tried moving my TDM400P Card to another pci slot – there was no
difference.

I was stumped.  Didn't know what to do.  So, with echo still on my
calls (both incoming and outgoing calls) for about 30 seconds I gave
up and started playing with dialplans.

The TDM400P card in my asterisk box is connected to an analogue
extension port in my key system (I have also tried connecting it
directly to the PSTN to see if the echo problems change with nothing
positive to report), and as a result I need to dial a '0' followed by
a pause to get an outside line.

At this time I just had an entry in my extensions.conf that said –

exten => 9,1,Dial(Zap/g1)

So, I was dialing '9' then after I the line was opened I dialled the
number I actually wanted to call.

I decided to tidy this up to –

exten => _XX,1,Dial(Zap/g1/${EXTEN:0},20)
exten => _XX.,1,Dial(Zap/g1/W0W${EXTEN:0},20)

The idea is that if I dial a 2 digit extension it must be an internal
call, otherwise, it must be an external call, so prefix it with a 0
and a wait.  Note I accidentally put a wait before the 0 as well
(although this won't adversely effect calls)

I made an internal call – it worked (but still with echo).
I made an external call – it worked, WITH NO ECHO!

The only difference I could think of was the wait in the dial string. 
So I changed

exten => _XX,1,Dial(Zap/g1/${EXTEN:0},20)

to

exten => _XX,1,Dial(Zap/g1/W${EXTEN:0},20)

and presto, the echo went away for internal calls as well.  I can
replicate this every time, but removing the w and replacing it.  –
Always, when there is no w there is echo, but if the w is there…echo.

I really have no idea why this works, or why I am still getting echo
for incoming calls.

I would really appreciate any help!

Cheers
Adam


More information about the asterisk-users mailing list