Echo problem on PSTN maybe? Example sound file included

I have an odd problem that I can’t seem to figure out. I just installed a X100P card to connect to my incoming telephone line last week and I’m having a problem with noise or echoing (I’m not sure if it’s even one of those?)

My setup is as follows:

Incoming PSTN line -> X100P Card -> Asterisk 1.4.0 -> Switch -> GXP-2000 (with latest firmware installed)

I have the latest Zaptel drivers installed as well.

GXP-2000 is using ULAW for the codec.

Problem:

Whenever I receive a call, or even place a call using the GXP-2000 through the PSTN line, and I speak on the GXP-2000, I hear static or a garbled version of what I just said. It’s not delayed whatsoever, so I hear it pretty much in real time. The end user hears what I said just fine – with no echo, static, or interference whatsoever. Whenever they speak, I can pretty much hear them just like normal as well. It’s only when I speak.

I recorded a sound file using my computer microphone so you can hear exactly what I’m talking about.

Whenever I place a call on the GXP-2000, and I listen to the ringing through the receiver, it sounds like a jackhammer instead of the normal ringing sound when you place a call.

If I set the incoming line to go to an IVR menu, or better yet, transfer the line from the GXP-2000 to an internal IVR menu, the call is crystal clear to the end user. The voice prompts sound clear as day. DTMF digits are recognized just like normal.

If I call between GXP-2000 phones on my internal network, sound quality is great.

I’ve placed with the options in Zapata.conf for hours.

I have adjusted the rxgain and txgain while using ./ztmonitor 1 –v, no luck whatsoever. I have even decreased the txvalue so much that the PSTN line didn’t even recognize my outgoing call.

I have set echocancel to every value possible, still no luck.

I modified the zconfig.h and rebuilt the zaptel drivers to allow for mark2 and aggressive echo cancellation, still no luck.

I looked into fxotune, but fxotune dosen’t work with X100P cards (as far as I know).
./zttest came back with 99.999% average after running for five minutes.

Am I missing something here? Any feedback whatsoever would be extremely greatful!

Here is my current Zapata.conf:

busydetect=yes
busycount=6
language=en
context=from-pstn
signalling=fxs_ks
rxwink=300
;usedistinctiveringdetection=yes
usecallerid=yes
callerid=asreceived
hidecallerid=no
useincomingcalleridonzaptransfer=yes
callwaiting=no
usecallingpres=yes
callwaitingcallerid=no
threewaycalling=no
transfer=yes
cancallforward=yes
callreturn=yes

echocancel=yes
echocancelwhenbridged=no
echotraining=no
rxgain=0
txgain=0

group=
callgroup=
pickupgroup=
immediate=no

channel => 1

What happens when you change the following?

echocancelwhenbridged=no

That to…

echocancelwhenbridged=yes

Have you tried this setting?

Cheers,

David.

Hey David,

It’s the same result as before. Any other ideas anyone?

Thanks,

Jon

have you tried a regular POTS phone, just to eliminate the x100p as a factor?

Yup, the line works just fine. Here is something interesting though:

If I set the following to ‘no’ instead of ‘yes’ like I had before…

echocancel=no
echocancelwhenbridged=no
echotraining=no

If I place a call outside using the GXP-2000 phone, I can’t hear anything at all… not even ringing. When I speak though, I can hear it fine on an external phone (my cell phone that I called) with no echo whatsoever. I just can’t hear anything on the GXP-2000. Then, if I transfer the call to the IVR from the GXP-2000, the voice prompts send and sound just fine with no problems.

What in the world is going on?

WHOA…

Man sounds like you have like or same problems to me except different, if you get my drift.

My current problem is that i have Little Green Gremlins running around in my system causing all sorts of unusual problems.

Your problem is indeed a little odd.

Can you verify with your carrier if these options are supported with the PSTN line you are using.

signalling=fxs_ks
rxwink=300

Sounds odd as these are signaling options but believe me it can cause problems.

However though if i was to guess or have stab in the dark as to what the problem was, i would think it is the ones in bold below;

Incoming PSTN line -> X100P Card -> Asterisk 1.4.0 -> Switch -> GXP-2000 (with latest firmware installed)

Can you verify for me that your Switch has port forwarding on, however if it is just a plain old simple switch that you just plug cables in, then that can be taken out of the equation, Asterisk 1.4 also has had quite a few problems being reported, i am not quite sure if it should have been released so soon, so we may need to look into that a little more.

Regardless if you have installed the new firmware or not for the phone, you still cant exclude it as a problem, if you are able to use a soft phone I,E X-lite or something of the nature and you do not experience the problem then you have eliminated one possible cause, however it does not give you are 100% definitive answer on the problem, you may still need to see if Asterisk supports the GXP phone properly.

How is your GXP Phone talking to Asterisk? Is it SIP or H.323?

What CODEC are you using? Sometimes CODEC’s can exhibit some unusual problems that are often mistakenly believed to be a PSTN issue or a TDM card issue, when it is more a Transcoding issue or a physical Hardware issue such as the card or the phone.

Maybe some more info would be good, possible even post your Extensions config file and you SIP config file, there might be some clues in there.

Cheers,

David.

Hey David,

Thanks for the reply. Maybe I can answer some of your questions.

  1. The codec between the GXP-2000 phone and Asterisk is ULAW
  2. The protocol between the phones and Asterisk is SIP.
  3. I just tried a softphone (X-lite), and the same problem still occurs exactly.
  4. The switch I’m using is just a normal switch, nothing else conencted to it really.
  5. I took away the rxwink=300 option and nothing changed really.

Config files…

SIP CONFIG:

[general]
subscribecontext=ext-local-custom
context=default
bindport=5060
bindaddr=0.0.0.0
srvlookup=yes
pedantic=no
disallow=all
allow=gsm
allow=ulaw
localnet=192.168.0.0/255.255.0.0

[3210]
type=friend
nat=no
secret=123456
username=3210
authname=3210
qualify=yes
host=dynamic
canreinvite=no
context=default
callerid=Testing <3210>
disallow=all
allow=ulaw

EXTENSIONS CONFIG:

[general]
static=yes
writeprotect=no
autofallthrough=yes
clearglobalvars=no
priorityjumping=no

[default]
exten => _NXXXXXX,1,Set(CALLERID(number)=11234567809)
exten => _NXXXXXX,2,Dial(Zap/1/${EXTEN})
exten => _NXXXXXX,3,Congestion()
exten => _NXXXXXX,103,Busy()

[from-pstn]
; Default Incoming Calls
exten => s,1,Macro(stdexten,3210,‘SIP/3210’)

[macro-stdexten];
;
; Standard extension macro:
; ${ARG1} - Extension (we could have used ${MACRO_EXTEN} here as well
; ${ARG2} - Device(s) to ring
;
exten => s,1,Dial(${ARG2},20) ; Ring the interface, 20 seconds maximum
exten => s,2,Goto(s-${DIALSTATUS},1) ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)

    exten => s-NOANSWER,1,Voicemail(u${ARG1})               ; If unavailable, send to voicemail w/ unavail announce
    exten => s-NOANSWER,2,Goto(default,s,1)                 ; If they press #, return to start

    exten => s-BUSY,1,Voicemail(b${ARG1})                   ; If busy, send to voicemail w/ busy announce
    exten => s-BUSY,2,Goto(default,s,1)                             ; If they press #, return to start

    exten => _s-.,1,Goto(s-NOANSWER,1)                              ; Treat anything else as no answer

    exten => a,1,VoicemailMain(${ARG1})                             ; If they press *, send the user into VoicemailMain

I wonder if your x100p is borked?

Actually after looking at the config files i have to say that i agree with you, there is a good chance that the card has decided to die and not process calls properly.

Cheers,

David.

I thought the symptoms (garbled inbound sound) maybe indicated a problem with receiving sound from the PSTN. I guess try a new card and let us know…

Thanks for the input guys. I just bit the bullet and bought a Digium TDM01B PCI Card with 1 FXO card. I’ll give you guys an update when I receive it on Tuesday.

Thanks,

Jon Scott