[zaptel-commits] kpfleming: branch 1.4 r3932 - /branches/1.4/kernel/zaptel-base.c

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Tue Mar 4 17:58:36 CST 2008


Author: kpfleming
Date: Tue Mar  4 17:58:35 2008
New Revision: 3932

URL: http://svn.digium.com/view/zaptel?view=rev&rev=3932
Log:
don't add an unnecessary delayed battery transition on FXS ports when we know the other end is already on-hook

(closes issue #9660)
Reported by: mmacvicar
Patches:
      zaptel-base-c_patch_1_4_rev3121 uploaded by meneault (license 260)
Tested by: jmhunter


Modified:
    branches/1.4/kernel/zaptel-base.c

Modified: branches/1.4/kernel/zaptel-base.c
URL: http://svn.digium.com/view/zaptel/branches/1.4/kernel/zaptel-base.c?view=diff&rev=3932&r1=3931&r2=3932
==============================================================================
--- branches/1.4/kernel/zaptel-base.c (original)
+++ branches/1.4/kernel/zaptel-base.c Tue Mar  4 17:58:35 2008
@@ -2141,7 +2141,9 @@
 	if (chan->span->flags & ZT_FLAG_RBS) {
 		if (chan->sig == ZT_SIG_CAS) {
 			zt_cas_setbits(chan, chan->idlebits);
-		} else if ((chan->sig == ZT_SIG_FXOKS) && (chan->txstate != ZT_TXSTATE_ONHOOK)) {
+		} else if ((chan->sig == ZT_SIG_FXOKS) && (chan->txstate != ZT_TXSTATE_ONHOOK)
+			/* if other party is already on-hook we shouldn't do any battery drop */
+			&& !((chan->rxhooksig == ZT_RXSIG_ONHOOK) && (chan->itimer <= 0))) {
 			/* Do RBS signalling on the channel's behalf */
 			zt_rbs_sethook(chan, ZT_TXSIG_KEWL, ZT_TXSTATE_KEWL, ZT_KEWLTIME);
 		} else




More information about the zaptel-commits mailing list