Index: drivers/dahdi/wctdm.c =================================================================== --- drivers/dahdi/wctdm.c (revision 6676) +++ drivers/dahdi/wctdm.c (working copy) @@ -997,6 +997,16 @@ if (debug) #endif printk(KERN_DEBUG "wctdm: Card %d Going off hook\n", card); + + switch ( wc->mod[card].fxs.lasttxhook ) { + case 0x04: /* Ringing */ + case 0x02: /* Forward On Hook Transfer */ + case 0x06: /* Reverse On Hook Transfer */ + /* just detected OffHook, during Ringing or OnHookTransfer */ + wc->mod[card].fxs.idletxhookstate = POLARITY_XOR(card) ? 0x5 : 0x1; /* Active */ + break; + } + dahdi_hooksig(wc->chans[card], DAHDI_RXSIG_OFFHOOK); if (robust) wctdm_init_proslic(wc, card, 1, 0, 1); @@ -1857,7 +1867,7 @@ if (get_user(x, (__user int *) data)) return -EFAULT; wc->mod[chan->chanpos - 1].fxs.ohttimer = x << 3; - wc->mod[chan->chanpos - 1].fxs.idletxhookstate = POLARITY_XOR(chan->chanpos - 1) ? 0x6 : 0x2; /* OHT mode when idle */ + wc->mod[chan->chanpos - 1].fxs.idletxhookstate = POLARITY_XOR(chan->chanpos - 1) ? 0x5 : 0x1; /* Active mode when idle */ if (wc->mod[chan->chanpos - 1].fxs.lasttxhook == 0x1 || wc->mod[chan->chanpos - 1].fxs.lasttxhook == 0x5) { /* Apply the change if appropriate */ wc->mod[chan->chanpos - 1].fxs.lasttxhook = POLARITY_XOR(chan->chanpos - 1) ? 0x6 : 0x2;