[Asterisk-cvs] asterisk/channels chan_zap.c,1.256,1.257

markster at lists.digium.com markster at lists.digium.com
Mon Jun 7 18:35:57 CDT 2004


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv5014/channels

Modified Files:
	chan_zap.c 
Log Message:
Make faxdetect configurable and turn OFF by default


Index: chan_zap.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_zap.c,v
retrieving revision 1.256
retrieving revision 1.257
diff -u -d -r1.256 -r1.257
--- chan_zap.c	7 Jun 2004 15:57:18 -0000	1.256
+++ chan_zap.c	7 Jun 2004 23:38:39 -0000	1.257
@@ -4197,9 +4197,12 @@
 		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 @@
 	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 @@
 		} 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);




More information about the svn-commits mailing list