summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2004-06-08 22:34:25 +0000
committerMark Spencer <markster@digium.com>2004-06-08 22:34:25 +0000
commitf105351643320fd12fa0faa9aebb7c6a404d7105 (patch)
tree7ab82613cb7176765bb6e2ee8259fe622d0147ee /channels
parent5ae7b48700c16ab3cc38b261c3548a1046063613 (diff)
Make fax detect configurable by direction (bug #1803)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3174 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rwxr-xr-xchannels/chan_zap.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c
index 835f37ebc..58a67ddf0 100755
--- a/channels/chan_zap.c
+++ b/channels/chan_zap.c
@@ -4200,7 +4200,8 @@ static struct ast_channel *zt_new(struct zt_pvt *i, int state, int startpbx, int
if ((i->callprogress & 1) && CANPROGRESSDETECT(i)) {
features |= DSP_FEATURE_CALL_PROGRESS;
}
- if (i->callprogress & 2) {
+ if ((!i->outgoing && (i->callprogress & 4)) ||
+ (i->outgoing && (i->callprogress & 2))) {
features |= DSP_FEATURE_FAX_DETECT;
}
features |= DSP_FEATURE_DTMF_DETECT;
@@ -8413,10 +8414,16 @@ static int setup_zap(void)
else
callprogress &= ~1;
} else if (!strcasecmp(v->name, "faxdetect")) {
- if (ast_true(v->value))
+ if (!strcasecmp(v->value, "incoming")) {
+ callprogress |= 4;
+ callprogress &= ~2;
+ } else if (!strcasecmp(v->value, "outgoing")) {
+ callprogress &= ~4;
callprogress |= 2;
+ } else if (!strcasecmp(v->value, "both") || ast_true(v->value))
+ callprogress |= 6;
else
- callprogress &= ~2;
+ callprogress &= ~6;
} else if (!strcasecmp(v->name, "echocancel")) {
if (v->value && !ast_strlen_zero(v->value)) {
y = atoi(v->value);