[Asterisk-cvs] asterisk/channels chan_zap.c,1.332,1.333

markster at lists.digium.com markster at lists.digium.com
Sat Sep 4 10:57:05 CDT 2004


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

Modified Files:
	chan_zap.c 
Log Message:
Turn off the hook detection unless explicitly compiled in


Index: chan_zap.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_zap.c,v
retrieving revision 1.332
retrieving revision 1.333
diff -u -d -r1.332 -r1.333
--- chan_zap.c	2 Sep 2004 20:45:24 -0000	1.332
+++ chan_zap.c	4 Sep 2004 15:00:05 -0000	1.333
@@ -81,6 +81,13 @@
 
 /* #define ZHONE_HACK */
 
+/*
+ * Define if you want to check the hook state for an FXO (FXS signalled) interface
+ * before dialing on it.  Certain FXO interfaces always think they're out of
+ * service with this method however.
+ */
+/* #define ZAP_CHECK_HOOKSTATE */
+
 /* Typically, how many rings before we should send Caller*ID */
 #define DEFAULT_CIDRINGS 1
 
@@ -6312,7 +6319,11 @@
 				if (par.rxisoffhook)
 					return 1;
 				else
+#ifdef ZAP_CHECK_HOOKSTATE
 					return 0;
+#else
+					return 1;
+#endif
 			} else if (par.rxisoffhook) {
 				ast_log(LOG_DEBUG, "Channel %d off hook, can't use\n", p->channel);
 				/* Not available when the other end is off hook */




More information about the svn-commits mailing list