aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-09-04 15:00:05 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-09-04 15:00:05 +0000
commit2f012515e2552237403f2819ee29ff33c8e1bc2a (patch)
tree56e97b191699ebb10cf28aeb0979685af5f56af3
parentea0e9e5f6f2b335855d31ad2e71136a4afacb62c (diff)
Turn off the hook detection unless explicitly compiled in
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3724 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-xchannels/chan_zap.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c
index 660c59c48..e9cb8e316 100755
--- a/channels/chan_zap.c
+++ b/channels/chan_zap.c
@@ -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 @@ static inline int available(struct zt_pvt *p, int channelmatch, int groupmatch,
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 */