[asterisk-bugs] [Asterisk 0014399]: wrong call-limit count when counteronpeer=yes

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Feb 10 09:37:09 CST 2009


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=14399 
====================================================================== 
Reported By:                caspy
Assigned To:                file
====================================================================== 
Project:                    Asterisk
Issue ID:                   14399
Category:                   Channels/chan_sip/General
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     assigned
Asterisk Version:           1.6.0.3-rc1 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-02-04 05:17 CST
Last Modified:              2009-02-10 09:37 CST
====================================================================== 
Summary:                    wrong call-limit count when counteronpeer=yes
Description: 
If i set counteronpeer=yes in sip.conf, then inuse and inringing counters
will be dropped to zero on nearest call to device.

This is result of combined 'if':
 if ((*inuse > 0) && ast_test_flag(&fup->flags[0], SIP_INC_COUNT)) {
   (*inuse)--;
   ast_clear_flag(&fup->flags[0], SIP_INC_COUNT);
 } else {
   *inuse = 0;
 }

if inuse>0, but no flag SIP_INC_COUNT, -  inuse will be cleared, but
should be left untouched. (and the same for inringing)


in attached patch there is a dirty hack - i simply comment out setting
zero.
in my case it works ok, but i'm not sure that it is don't break anything
else.

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

---------------------------------------------------------------------- 
 (0099786) svnbot (reporter) - 2009-02-10 09:37
 http://bugs.digium.com/view.php?id=14399#c99786 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 174543

U   trunk/channels/chan_sip.c

------------------------------------------------------------------------
r174543 | file | 2009-02-10 09:37:07 -0600 (Tue, 10 Feb 2009) | 6 lines

Make the logic for inuse and inringing manipluation match that of 1.4. The
old broken logic would reset the values back to 0 during certain scenarios
causing the wrong state to be reported.
(closes issue http://bugs.digium.com/view.php?id=14399)
Reported by: caspy
(issue http://bugs.digium.com/view.php?id=13238)
Reported by: kowalma

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=174543 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-02-10 09:37 svnbot         Checkin                                      
2009-02-10 09:37 svnbot         Note Added: 0099786                          
======================================================================




More information about the asterisk-bugs mailing list