[asterisk-bugs] [Asterisk 0013917]: [patch] fxo modules incorrectly believes channel is answered, if telco reverses line polarity at off hook.

Asterisk Bug Tracker noreply at bugs.digium.com
Sat Dec 13 17:47:28 CST 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13917 
====================================================================== 
Reported By:                alecdavis
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   13917
Category:                   Channels/chan_dahdi
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     confirmed
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 155671 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-11-18 01:22 CST
Last Modified:              2008-12-13 17:47 CST
====================================================================== 
Summary:                    [patch] fxo modules incorrectly believes channel is
answered, if telco reverses line polarity at off hook.
Description: 
With answeronpolarityswitch=yes in chan_dahdi.conf
In our setup channels 63-65 in attached chan_dahdi.conf

When fxo modules are connected to analog lines that reverse polarity when
the line is picked up, the fxo driver (wcdtm) sends a polarity reversal
event, causing the channel to be answered, which is incorrect, as the call
is yet to be dialled.

The caller hears a very short ring, then silence for a while as the call
is set up, then finally remote ringing. This is very off putting for the
unaware user.

The attached patch chan_dahdi.diff.txt patch, sets the polaritydelaytv at
call setup, then uses the same sytle of checking mechnism as is used for
hanguponpolarityswitch=yes.

The DAHDI_EVENT_POLARITY in dahdi_handle_event has been reworked, from
using IF/ELSE statements with multiple OR's to easier to read SWITCH
statements.

Has been on a production box for nearly a month with around 100 calls out
of the fxo channels a day, with clean sounding ringing, with audio passed
as soon as the called party answers.



======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0013716 [patch] Prevent false answer of channel...
====================================================================== 

---------------------------------------------------------------------- 
 (0096359) alecdavis (reporter) - 2008-12-13 17:47
 http://bugs.digium.com/view.php?id=13917#c96359 
---------------------------------------------------------------------- 
related??: http://bugs.digium.com/bug_view_page.php?bug_id=2847

4 Years ago, others were having the same problem, When going off hook, the
line reverses. During that bug report answeronpolarityswitch and
hanguponpolarityswitch were born, but it appears as though it's become
broken over time.

Quoting marty 'The line also does a Polarity Reversal as the line goes off
hook, so this code stores the time of the off hook event and when the
polarity reversal event triggers, the timestamps are compared. If the
duration is greater than the (configurable) allowed period, the signal is
assumed to be a remote end disconnect and the channel is then hungup'

Seems as though his intial intensions, are similar to mine.
That is
 1). take a snapshot of the time at call start
 2). if a reversal happens before timeout, then ignore, else it's remote
answer
 3). take another snapshot of the time for remote disconnect timing
 4). if a reversal happens before timeout, then ignore, else it's remote
disconnect

Step 1 and 2 are relevant if answeronpolarityswitch=yes
Step 1 to 4 are relevant if (answeronpolarityswitch=yes and
hanguponpolarityswitch=yes) 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-12-13 17:47 alecdavis      Note Added: 0096359                          
======================================================================




More information about the asterisk-bugs mailing list