[svn-commits] jpeeler: trunk r207902 - /trunk/channels/chan_dahdi.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Jul 21 17:02:29 CDT 2009


Author: jpeeler
Date: Tue Jul 21 17:02:25 2009
New Revision: 207902

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=207902
Log:
Fix my_is_off_hook to check rxbits only for FXS signaling

Modified:
    trunk/channels/chan_dahdi.c

Modified: trunk/channels/chan_dahdi.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/channels/chan_dahdi.c?view=diff&rev=207902&r1=207901&r2=207902
==============================================================================
--- trunk/channels/chan_dahdi.c (original)
+++ trunk/channels/chan_dahdi.c Tue Jul 21 17:02:25 2009
@@ -2381,7 +2381,14 @@
 		ast_log(LOG_WARNING, "Unable to check hook state on channel %d: %s\n", p->channel, strerror(errno));
 	}
 
-	return (par.rxbits > -1) || par.rxisoffhook;
+    if ((p->sig == SIG_FXSKS) || (p->sig == SIG_FXSGS)) {
+        /* When "onhook" that means no battery on the line, and thus
+         it is out of service..., if it's on a TDM card... If it's a channel
+         bank, there is no telling... */
+        return (par.rxbits > -1) || par.rxisoffhook;
+    }
+
+    return par.rxisoffhook;
 }
 
 static void dahdi_enable_ec(struct dahdi_pvt *p);




More information about the svn-commits mailing list