dahdi: Only watch transitions of ABIT when using E&M signalling.

This resolves an issue with a Glenayre GL3000 Paging Terminal with v8.000
software. The Glenayre would change both A and B bits to signal on/off hook
states, but there were a couple of milliseconds between when those bits changed.
This resulted in DAHDI generating an on-hook event to Asterisk before generating
the off-hook event and therefore Asterisk terminated the call prematurely.

Looking the A and B bits before this patch:

Asterisk (AB)   Glenayre (AB)
00              00                 Both sides on-hook
11              00                 Asterisk goes off hook to sieze line.
11              01                 Glenayre starts going-offhook. On-hook event
                                     sent to Asterisk from drivers since bits
                                     changed but ABIT was still 0.
11              11                 Glenayre finishes going off-hook. Off-hook
                                     event sent to Asterisk since ABIT changed
                                     from 0 to 1.
00              11                 Asterisk, processes on-hook event and goes
                                     on-hook itself to release line.
00              00                 Glenayre releases line. Call fails.

After this patch:

Asterisk (AB)   Glenayre (AB)
00              00                 Both sides on-hook
11              00                 Asterisk initiates call
11              01                 Glenayre starts handling call. No event is
                                     sent to Asterisk since only ABIT is checked.
11              11                 Glanayre finishes going off-hook. Call
                                     proceeds normally.

Internal-Issue-ID: DAHDI-1009
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
This commit is contained in:
Shaun Ruffell
2012-11-29 12:24:52 -06:00
committed by Russ Meyerriecks
parent ef065a5e2a
commit 5f7ebe98da

View File

@@ -8353,7 +8353,6 @@ void dahdi_rbsbits(struct dahdi_chan *chan, int cursig)
break;
}
/* Fall through */
case DAHDI_SIG_EM: /* E and M */
case DAHDI_SIG_EM_E1:
case DAHDI_SIG_FXOLS: /* FXO Loopstart */
case DAHDI_SIG_FXOKS: /* FXO Kewlstart */
@@ -8362,7 +8361,13 @@ void dahdi_rbsbits(struct dahdi_chan *chan, int cursig)
else /* on hook */
__dahdi_hooksig_pvt(chan,DAHDI_RXSIG_ONHOOK);
break;
case DAHDI_SIG_EM: /* E and M */
/* Watch only the ABIT for changes. */
if ((cursig & DAHDI_ABIT) == (chan->rxsig & DAHDI_ABIT))
break;
__dahdi_hooksig_pvt(chan, (cursig & DAHDI_ABIT) ?
DAHDI_RXSIG_OFFHOOK : DAHDI_RXSIG_ONHOOK);
break;
case DAHDI_SIG_FXSKS: /* FXS Kewlstart */
case DAHDI_SIG_FXSGS: /* FXS Groundstart */
/* Fall through */