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

markster at lists.digium.com markster at lists.digium.com
Tue Jun 8 17:31:27 CDT 2004


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

Modified Files:
	chan_zap.c 
Log Message:
Make fax detect configurable by direction (bug #1803)


Index: chan_zap.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_zap.c,v
retrieving revision 1.257
retrieving revision 1.258
diff -u -d -r1.257 -r1.258
--- chan_zap.c	7 Jun 2004 23:38:39 -0000	1.257
+++ chan_zap.c	8 Jun 2004 22:34:25 -0000	1.258
@@ -4200,7 +4200,8 @@
 		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 @@
 			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);




More information about the svn-commits mailing list