aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-02-18 22:28:56 +0000
committerqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-02-18 22:28:56 +0000
commit560357d7fe44948b4c91d39c21901831ae51d682 (patch)
tree38c1b61481d62a76ad81f389443a4f50ec46accd /channels
parent8adbdd97e4be8d8bb0300bceea7f936d9148d646 (diff)
Fix previous commit so that we actually disable echocanbridged if echocancel is off.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@103795 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_zap.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c
index 0f5c2d028..9cce246aa 100644
--- a/channels/chan_zap.c
+++ b/channels/chan_zap.c
@@ -7426,7 +7426,13 @@ static struct zt_pvt *mkintf(int channel, struct zt_chan_conf conf, struct zt_pr
tmp->echocancel = conf.chan.echocancel;
tmp->echotraining = conf.chan.echotraining;
tmp->pulse = conf.chan.pulse;
- tmp->echocanbridged = conf.chan.echocanbridged;
+ if (tmp->echocancel)
+ tmp->echocanbridged = conf.chan.echocanbridged;
+ else {
+ if (conf.chan.echocanbridged)
+ ast_log(LOG_NOTICE, "echocancelwhenbridged requires echocancel to be enabled; ignoring\n");
+ tmp->echocanbridged = 0;
+ }
tmp->busydetect = conf.chan.busydetect;
tmp->busycount = conf.chan.busycount;
tmp->busy_tonelength = conf.chan.busy_tonelength;
@@ -9990,7 +9996,7 @@ static int zap_show_channel(int fd, int argc, char **argv)
ast_cli(fd, "Default law: %s\n", tmp->law == ZT_LAW_MULAW ? "ulaw" : tmp->law == ZT_LAW_ALAW ? "alaw" : "unknown");
ast_cli(fd, "Fax Handled: %s\n", tmp->faxhandled ? "yes" : "no");
ast_cli(fd, "Pulse phone: %s\n", tmp->pulsedial ? "yes" : "no");
- ast_cli(fd, "Echo Cancellation: %d taps%s, currently %s\n", tmp->echocancel, (!tmp->echocancel || tmp->echocanbridged) ? "" : " unless TDM bridged", tmp->echocanon ? "ON" : "OFF");
+ ast_cli(fd, "Echo Cancellation: %d taps%s, currently %s\n", tmp->echocancel, tmp->echocanbridged ? "" : " unless TDM bridged", tmp->echocanon ? "ON" : "OFF");
if (tmp->master)
ast_cli(fd, "Master Channel: %d\n", tmp->master->channel);
for (x = 0; x < MAX_SLAVES; x++) {