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

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Feb 10 09:39:02 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:                     closed
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:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2009-02-04 05:17 CST
Last Modified:              2009-02-10 09:39 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.

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

---------------------------------------------------------------------- 
 (0099788) svnbot (reporter) - 2009-02-10 09:39
 http://bugs.digium.com/view.php?id=14399#c99788 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 174544

_U  branches/1.6.0/
U   branches/1.6.0/channels/chan_sip.c

------------------------------------------------------------------------
r174544 | file | 2009-02-10 09:39:01 -0600 (Tue, 10 Feb 2009) | 13 lines

Merged revisions 174543 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
  r174543 | file | 2009-02-10 11:37:07 -0400 (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=174544 

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




More information about the asterisk-bugs mailing list