summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2004-06-07 23:38:39 +0000
committerMark Spencer <markster@digium.com>2004-06-07 23:38:39 +0000
commit68c45465c8b1ea76af4588b5a3be119191fb7af4 (patch)
tree2e6871dac30e0a600037fe9e80c69ec4176a8ef6 /channels
parentad49896f6b328b49beef422ae0891a9a4b1c9857 (diff)
Make faxdetect configurable and turn OFF by default
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3170 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rwxr-xr-xchannels/chan_zap.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c
index 9cc2cb444..835f37ebc 100755
--- a/channels/chan_zap.c
+++ b/channels/chan_zap.c
@@ -4197,9 +4197,12 @@ static struct ast_channel *zt_new(struct zt_pvt *i, int state, int startpbx, int
if (i->busydetect && CANBUSYDETECT(i)) {
features |= DSP_FEATURE_BUSY_DETECT;
}
- if (i->callprogress && CANPROGRESSDETECT(i)) {
+ if ((i->callprogress & 1) && CANPROGRESSDETECT(i)) {
features |= DSP_FEATURE_CALL_PROGRESS;
}
+ if (i->callprogress & 2) {
+ features |= DSP_FEATURE_FAX_DETECT;
+ }
features |= DSP_FEATURE_DTMF_DETECT;
if (features) {
if (i->dsp) {
@@ -6589,7 +6592,6 @@ static void *pri_dchannel(void *vpri)
struct zt_pri *pri = vpri;
pri_event *e;
struct pollfd fds[NUM_DCHANS];
- struct zt_spaninfo si;
int res;
int chanpos = 0;
int x;
@@ -8406,7 +8408,15 @@ static int setup_zap(void)
} else if (!strcasecmp(v->name, "busycount")) {
busycount = atoi(v->value);
} else if (!strcasecmp(v->name, "callprogress")) {
- callprogress = ast_true(v->value);
+ if (ast_true(v->value))
+ callprogress |= 1;
+ else
+ callprogress &= ~1;
+ } else if (!strcasecmp(v->name, "faxdetect")) {
+ if (ast_true(v->value))
+ callprogress |= 2;
+ else
+ callprogress &= ~2;
} else if (!strcasecmp(v->name, "echocancel")) {
if (v->value && !ast_strlen_zero(v->value)) {
y = atoi(v->value);