summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormalcolmd <malcolmd@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2004-07-02 13:04:54 +0000
committermalcolmd <malcolmd@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2004-07-02 13:04:54 +0000
commit6ed63353c415782d93d2e8fb01b48afc8a3ec16c (patch)
tree1d53c5d9ed982d2dbdf56c18810fa868e83be978
parent3a9a4fce1c740f4837640214e98754f3fa723ea2 (diff)
Add option to cause Zaptel to ignore the 2100 Hz echo cancel
disable tone git-svn-id: http://svn.digium.com/svn/zaptel/trunk@431 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rwxr-xr-xzaptel.c4
-rwxr-xr-xzconfig.h7
2 files changed, 11 insertions, 0 deletions
diff --git a/zaptel.c b/zaptel.c
index b12229b..5e26181 100755
--- a/zaptel.c
+++ b/zaptel.c
@@ -4394,6 +4394,7 @@ static inline void __zt_process_getaudio_chunk(struct zt_chan *ss, unsigned char
/* Okay, now we've got something to transmit */
for (x=0;x<ZT_CHUNKSIZE;x++)
getlin[x] = ZT_XLAW(txb[x], ms);
+#ifndef NO_ECHOCAN_DISABLE
if (ms->ec) {
for (x=0;x<ZT_CHUNKSIZE;x++) {
/* Check for echo cancel disabling tone */
@@ -4409,6 +4410,7 @@ static inline void __zt_process_getaudio_chunk(struct zt_chan *ss, unsigned char
}
}
}
+#endif
if ((!ms->confmute && !ms->dialing) || (ms->flags & ZT_FLAG_PSEUDO)) {
/* Handle conferencing on non-clear channel and non-HDLC channels */
switch(ms->confmode & ZT_CONF_MODE_MASK) {
@@ -5131,6 +5133,7 @@ static inline void __zt_process_putaudio_chunk(struct zt_chan *ss, unsigned char
putlin[x] = ZT_XLAW(rxb[x], ms);
}
+#ifndef NO_ECHOCAN_DISABLE
if (ms->ec) {
for (x=0;x<ZT_CHUNKSIZE;x++) {
if (echo_can_disable_detector_update(&ms->rxecdis, putlin[x])) {
@@ -5145,6 +5148,7 @@ static inline void __zt_process_putaudio_chunk(struct zt_chan *ss, unsigned char
}
}
}
+#endif
/* if doing rx tone decoding */
if (ms->rxp1 && ms->rxp2 && ms->rxp3)
{
diff --git a/zconfig.h b/zconfig.h
index 740e66c..936c15a 100755
--- a/zconfig.h
+++ b/zconfig.h
@@ -55,6 +55,13 @@
*/
/* #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 */
+
/* 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)