Problem With Echo Cancellation (Inbound Calls) (Emergency..)


#1

Hi All- I’m a new Asterisk user in a very big bind. I have an Asterisk @ Home 1.5 server running Kernel 2.4.21-37.ELsmp that I’m having terrible echo issues with on calls originating inbound/outbound on a PRI (the PRI has been tested on other PBXs and runs clean).

Using ztmonitor as documented in the wiki, TXGain is pegging out all the way to the right. However no matter how much I tweak TXGain in zapata.conf (see below) it doesn’t seem to get any better. I’ve tried aggressive echo cancellation, etc. but nothing seems to work. SIP to SIP or SIP to IAX calls work fine though (which they should) so I know it’s got to be something with zapata.conf or echo cancellation on Asterisk in general.

The big gottcha is that we moved our corporate HQ today and this PBX is supposed to be live for 50 users right now so any help would be appriciated. Below are my zapata.conf, and zconfig.h files.

Thanks- David

Zconfig.h

/*

  • Zaptel configuration options

*/

#ifndef _ZCONFIG_H

#define _ZCONFIG_H

#ifdef KERNEL

#include <linux/config.h>

#include <linux/version.h>

#endif

/* Zaptel compile time options */

/*

  • Uncomment to disable calibration and/or DC/DC converter tests

  • (not generally recommended)

*/

/* #define NO_CALIBRATION */

/* #define NO_DCDC */

/*

  • Boost ring voltage (Higher ring voltage, takes more power)

*/

/* #define BOOST_RINGER */

/*

  • Define CONFIG_CALC_XLAW if you have a small number of channels and/or

  • a small level 2 cache, to optimize for few channels

*/

/* #define CONFIG_CALC_XLAW */

/*

  • Define if you want MMX optimizations in zaptel

  • Note: CONFIG_ZAPTEL_MMX is generally incompatible with AMD

  • processors and can cause system instability!

*/

/* #define CONFIG_ZAPTEL_MMX */

/*

Pick your echo canceller: MARK2, MARK3, STEVE, or STEVE2 :smile:

  • Pick your echo canceller: MARK2, MARK3, STEVE, or STEVE2 :smile:

*/

/* #define ECHO_CAN_STEVE */

/* #define ECHO_CAN_STEVE2 */

/* #define ECHO_CAN_MARK */

#define ECHO_CAN_MARK2

/* #define ECHO_CAN_MARK3 */

/*

  • Uncomment for aggressive residual echo supression under

  • MARK2 echo canceller

*/

/* #define AGGRESSIVE_SUPPRESSOR */

/*

  • Define to turn off the echo canceler disable tone detector,

  • which will cause zaptel to ignore the 2100 Hz echo cancel disable

  • tone.

*/

/* #define NO_ECHOCAN_DISABLE */

/* udev support */

#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,1)

#define CONFIG_ZAP_UDEV

#endif

/* We now use the linux kernel config to detect which options to use */

/* You can still override them below */

#if defined(CONFIG_HDLC) || defined(CONFIG_HDLC_MODULE)

/* #define CONFIG_ZAPATA_NET / / NEVER implicitly turn on ZAPATA_NET */

#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,4,20)

#define CONFIG_OLD_HDLC_API

#else

#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,23)

/* Starting with 2.4.23 the kernel hdlc api changed again */

/* Now we have to use hdlc_type_trans(skb, dev) instead of htons(ETH_P_HDLC) */

#define ZAP_HDLC_TYPE_TRANS

#endif

#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,3)

#define HDLC_MAINTAINERS_ARE_MORE_STUPID_THAN_I_THOUGHT

#endif

#endif

#endif

#ifdef CONFIG_PPP

#define CONFIG_ZAPATA_PPP

#endif

/*

  • Uncomment CONFIG_ZAPATA_NET to enable SyncPPP, CiscoHDLC, and Frame Relay

  • support.

*/

/* #define CONFIG_ZAPATA_NET */

/*

  • Uncomment CONFIG_OLD_HDLC_API if your are compiling with ZAPATA_NET

  • defined and you are using the old kernel HDLC interface (or if you get

  • an error about ETH_P_HDLC while compiling).

*/

/* #define CONFIG_OLD_HDLC_API */

/*

  • Uncomment for Generic PPP support (i.e. ZapRAS)

*/

/* #define CONFIG_ZAPATA_PPP */

/*

  • Uncomment to enable “watchdog” to monitor if interfaces

  • stop taking interrupts or otherwise misbehave

*/

/* #define CONFIG_ZAPTEL_WATCHDOG */

/* Tone zone info */

#define DEFAULT_TONE_ZONE 0

/*

  • Uncomment for Non-standard FXS groundstart start state (A=Low, B=Low)

  • particularly for CAC channel bank groundstart FXO ports.

*/

/* #define CONFIG_CAC_GROUNDSTART */

/*

  • Uncomment if you happen have an early TDM400P Rev H which

  • sometimes forgets its PCI ID to have wcfxs match essentially all

  • subvendor ID’s

*/

/* #define TDM_REVH_MATCHALL */

/*

  • Uncomment the following if you want to support E&M trunks being

  • able to “flash” after going off-hook (dont ask why, just nod :smile: ).

*/

/* #define EMFLASH */

Zapata.conf

;

; Zapata telephony interface

;

; Configuration file

[trunkgroups]

[channels]

language=en

context=from-pstn

rxwink=300 ; Atlas seems to use long (250ms) winks

;

; Whether or not to do distinctive ring detection on FXO lines

;

;usedistinctiveringdetection=yes

echocancel=yes

echocancelwhenbridged=yes

echotraining=400

usecallerid=yes

hidecallerid=no

callwaiting=yes

usecallingpres=yes

callwaitingcallerid=yes

threewaycalling=yes

transfer=yes

cancallforward=yes

callreturn=yes

rxgain=0.0

txgain=-3.0

group=0

callgroup=1

pickupgroup=1

immediate=no

faxdetect=no

switchtype = national

signalling = pri_cpe

group = 2

channel => 1-23

#include zapata-auto.conf

;Include AMP configs

#include zapata_additional.conf


#2

The first thing that comes to mind is the Line Build Out (LBO) setting for the PRI.

If the PRI is a little hot, you’ll get echo.

Check to see if someone made a setting in the associated CSU to tell the CSU that the length of wire from the CSU to the Asterisk box is much longer than it really is.

Some things (Like PBX’s) can adjust for bad LBO settings…


#3

Turned out to be a firmware issue. Thanks!