Echo cancellation

Hello,

I have a system setup with a Junghanns 4-BRI card and asterisk.
I have problems with the sound quality,
there is echo on the line on my SIP phones with an analogical phone communication.
If I change the rxgain and txgain setting in my zapata.conf according to the ztmonitor,
I can get better volume, and so a better echo cancellation.
But there is something that I don’t understand:
on one way, rxgain adjusts receive gain for an incoming call,
on the other way, rxgain adjusts transmit gain for an outgoing call …???

So how setup this gains for all cases?

This is my zapata.conf:

[channels]
language = fr
switchtype = euroisdn
pridialplan = unknown
prilocaldialplan = local
nationalprefix = 0
internationalprefix = 00
usecallingpres = yes
echocancel = yes
echocancelwhenbridged = yes
echotraining = yes
overlapdial = yes
immediate = no

rxgain = 0.0
txgain = 0.0
;rxgain = -15.0
;txgain = 4.5

;---------------------------------------------------------
; p2p TE Mode (Connexion vers TNR France Telecom)
;---------------------------------------------------------
signalling = bri_cpe_ptmp
context = isdn-incoming
group = 1
channel = 1-2
channel = 4-5
;---------------------------------------------------------
; p2p NT Mode (Connexion vers PABX)
;---------------------------------------------------------
signalling = bri_net
context = pbx-incoming
group = 2
channel = 7-8
channel = 10-11

Any help would really be appreciated.
Regards.

Rx gain always is for incoming audio, TXgain is always for outgoing (from your * server) audio.

You might want to tweak the echo canceller, there are a few different cancellation subroutines, but you have to define which one to use in zaptel source.

Thanks for reply,

I think you want to speak about zconfig.h and the Mark2 echo cancellation.
I never tried to use agresive echo cancellation or Mark3. Do you use it?
But I’m sure on what I say:
on one way, rxgain adjusts receive gain for an incoming call,
on the other way, rxgain adjusts transmit gain for an outgoing call.
And I really want to set this gain for all cases.

Cordialement,
Regards.

[quote=“bastien”]on one way, rxgain adjusts receive gain for an incoming call,
on the other way, rxgain adjusts transmit gain for an outgoing call.
[/quote]
stop it ! outgoing, incoming, it makes no difference. to zap, it’s just a call. TX is what you’re sending, RX is what you’re receiving.

So what don’t I understand?
Ex.:
Analog communication with SIP phone
Case 1: incoming call to SIP => context is ‘isdn-incoming’ and rxgain is low
Case 2: outgoing call to analog phone => id do a ZAP/g1/phone_number and rxgain is high
Why?

I want to say:
Case 1: incoming call to SIP => context is ‘isdn-incoming’ and rx level is low
Case 2: outgoing call to analog phone => id do a ZAP/g1/phone_number and rx level is high

Sorry to jump in, but I’m also using a quadBRI and have been playing with those things in the last few weeks/months…

You could try changing the echo canceller in zconfig.h and define the MG2 echo canceller.

Find the following line and uncomment it.

to #define ECHO_CAN_MG2
Make sure you also 'comment the line containing the current echo can (probably MARK2).

Can you test that and let us know? (I’m very curious about the results)

By the way, what type of phones are you using?

Thanks for your reply stofell,

For the moment I use ECHO_CAN_MARK2.
I have tried to use ECHO_CAN_MARK3, but the result is not very good.

You told me about the ECHO_CAN_MG2, but I don’t find it in my zconfig.h …
I have:
/* #define ECHO_CAN_STEVE /
/
#define ECHO_CAN_STEVE2 /
/
#define ECHO_CAN_MARK /
#define ECHO_CAN_MARK2
/
#define ECHO_CAN_MARK3 */

I’m very happy to meet someone who use a QuadeBri card.
The SIP phones I use are some SwissVoice IP10s.

Regards,
Cordialement.

I think that you use a more recent version of the zaptel driver.
I will go immediately make an install of zaptel 1.2.0 and will let you know about the ECHO_CAN_MG2.

Correct, I was talking about 1.2.0. Let’s hear the results? :wink:

Hello,

I tried to install zaptel 1.2, but I have a problem with it… :cry:
I do a ‘make load’ for qozap and It’s give me the following:

modprobe zaptel
insmod ./qozap.ko
qozap: no version for “zt_receive” found: kernel tainted
ztcfg -v

Zaptel configuration: 12 channel configured

Then my BRI card is unstable
qozap: re-activating layer 1 span 1
qozap: not re-activating layer 1 span 0
qozap: not re-activating layer 1 span 1
qozap: not re-activating layer 1 span 0

Perhaps can you help me

Regards,
Cordialement.

[quote=“bastien”]I tried to install zaptel 1.2, but I have a problem with it… :cry:
I do a ‘make load’ for qozap and It’s give me the following:
[/quote]
Never seen this error. Did you download the bristuff experimental from the website? (junghanns.net/)
At the moment it’s 0.3.0pre1c. Works perfect here.

Can you try doing a ./install of this one? If installing works, how does the compilation of zaptel goes? (should do without errors)

cheers

Thanks for your reply,

Yes, I have downloaded this ‘experimental’ bristuff.
I don’t have any error with the zaptel, libpri and asterisk compilations.
But when I load the qozap, I see this error and this switching on my NT mode (TE mode works perfect and I can use my SIP phones to take calls)

Regards,
Cordialement.

I have some news from Junghanns who tells me:
the output message ‘qozap: no version for “zt_receive” found: kernel
tainted’ is to be ignored (there are no problems known when receiving this
message).
But for the moment they don’t tells me why I have this problem on my NT mode:
I can’t make calls using the NT mode,
the lights of my quadBRI ignite and die out periodically in green and in red
and I have the following message:
qozap: re-activating layer 1 span 1
qozap: not re-activating layer 1 span 0
qozap: not re-activating layer 1 span 1
qozap: not re-activating layer 1 span 0
qozap: not re-activating layer 1 span 1

On the other hand, the lights on TE mode are stable and stay in green
so I can make calls with my SIP phones (the echo seems to be better).

(It is like I have a timer who controls the quadBRI in NT mode)

Perhaps do you have an idea?

Regards,
Cordialement.

[quote=“bastien”]I have some news from Junghanns who tells me:
the output message ‘qozap: no version for “zt_receive” found: kernel
tainted’ is to be ignored (there are no problems known when receiving this
message).[/quote]
That’s good news, since the last version I’m also seeing this :smile:

I was re-looking at your zapata.conf, for your NT mode, can you try using:
signalling=bri_net_ptmp

That’s what I use to connect a quadBRI on the internal side to a HFC pci card also on asterisk. I’m not sure if it will make a difference, but it’s worth a try… You did set the jumpers correct, did you?

cheers
kristof

Thanks for reply,

junghanns don’t reply me again since I send my
’cat /proc/zaptel/*’ and the output of my Asterisk
when trying to make a call using the NT-Ports and TE-Ports.

I will try to put ‘bri_net_ptmp’ for my NT mode.
I’m sure my jumpers are correct, the card works fine with zaptel.0.9 (but with echo…).

Regards,
Cordialement.

Hi,

the problem don’t come from ‘signalling=bri_net_ptmp’.
It’s do excatly the same thing…

Regards,
Cordialement.