[asterisk-bugs] [Asterisk 0008066]: [patch] hanguponpolarityswitch hangs up on incoming call during ring phase

noreply at bugs.digium.com noreply at bugs.digium.com
Fri Dec 14 14:33:59 CST 2007


The following issue has been RESOLVED. 
====================================================================== 
http://bugs.digium.com/view.php?id=8066 
====================================================================== 
Reported By:                jared
Assigned To:                qwell
====================================================================== 
Project:                    Asterisk
Issue ID:                   8066
Category:                   Channels/chan_zap
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     resolved
Asterisk Version:            SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 44144 
Disclaimer on File?:        Yes 
Request Review:              
Resolution:                 no change required
Fixed in Version:           
====================================================================== 
Date Submitted:             10-02-2006 02:17 CDT
Last Modified:              12-14-2007 14:33 CST
====================================================================== 
Summary:                    [patch] hanguponpolarityswitch hangs up on incoming
call during ring phase
Description: 
I am in Australia and use Telstra as my provider. During the ringing phase
of the call I see reversal of polarities, which asterisk interprets
incorrectly. It assumes that the polarity reversal during the ring phase
means that the caller has hung up. This is definitely not the case.
(Telstra may be sending the polarity reversal for good reason during the
ring phase, i just don't know what that reason might be though). 

Below in (Appendix 1: Zaptel Driver Log) the zaptel driver debug output
showing the polarity reversals as they come from the Telstra exchange. In
the example, I ring from an outside phone into the the zaptel line and just
let it ring... no one inside answers. 

When asterisk finds the polarity reversal during this ring phase it does a
ast_softhangup(p->owner, AST_SOFTHANGUP_EXPLICIT) of the incoming channel
see (Appendix 2:  chan_zap.c source code fragment). I think the purpose of
this is so that it will stop ringing extensions that may have started
ringing immediately, so that the users wont pick a call which has actually
stopped ringing but asterisk hasn't detected that fact yet.

I suspect that other users of the reverseonpolarityswitch feature don't
have exchanges that generate these polarity events during the ring phase.

I have made a patch which I have attached that works for my purposes, but
I'm not sure how to go about making it work in a more general sense with
what I think the existing code is trying to achieve. 

I would like to ask how people think this could be improved so that it
could be included in the svn trunk without breaking the existing features.

I have 2 ideas:

1) Add a new config option in zapata.conf. 

nohanguponpolarityswitchinringphase=yes

2) Some how find an alogithm that detects real hangups during ringing
phase rather than just these random reversal pulses.

Any ideas welcome.

Thanks


====================================================================== 

---------------------------------------------------------------------- 
 qwell - 12-14-07 14:33  
---------------------------------------------------------------------- 
Per the wiki link posted, the fix here is to just change the polarity
debounce, so that we don't detect false positives. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
12-14-07 14:33  qwell          Status                   ready for testing =>
resolved
12-14-07 14:33  qwell          Resolution               open => no change
required
12-14-07 14:33  qwell          Assigned To               => qwell           
12-14-07 14:33  qwell          Note Added: 0075417                          
======================================================================




More information about the asterisk-bugs mailing list