[asterisk-bugs] [Asterisk 0012249]: All SIP users InUse counters reset to zero(even if they are on call) during sip reload

noreply at bugs.digium.com noreply at bugs.digium.com
Tue Mar 25 06:10:14 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=12249 
====================================================================== 
Reported By:                rizwanhasham
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   12249
Category:                   Channels/chan_sip/General
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
Asterisk Version:           1.4.19 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             03-18-2008 07:51 CDT
Last Modified:              03-25-2008 06:10 CDT
====================================================================== 
Summary:                    All SIP users InUse counters reset  to zero(even if
they are on call) during sip reload
Description: 
Suppose a user is on a call whose call-limit=2. "sip show inuse"  shows the
inuse counter of the user is set to 1. But after reloading sip (the user is
still in conversation and call is up) the "sip show inuse" command shows
that its inuse counter is set to zero. It shouldnt do that. i have seen
inside the code in chan_sip.c that while doing sip reload, asterisk
destroys all the users (not peers) by freeing the memory allocated for all
users and destroying their channel variables. As it destroys all the users,
their inuse counter is also lost. So if a user whose call-limit was reached
before the sip reload, after doing sip reload, he can make more than
allowed simultaneous calls.

I have tested and can repeat this behaviour on any version of asterisk
(1.4.2, 1.4.18, 1.4.19, 1.6.0beta5)

I am using a Dell Pentium PC with CentOS4 Installed on it.

This bug has great importance for us as we have users with call-limit=30.
So if a user has inuse counter reached to 28, and then a one of my script
automatically issues a sip reload, the inuse counter is reset to zero and
the user is able to make 30 more simultaneous calls instead of 2. So i am
setting the severity of this bug to major.
====================================================================== 

---------------------------------------------------------------------- 
 rizwanhasham - 03-25-08 06:10  
---------------------------------------------------------------------- 
Well, if i created a new sip user or modified an existing user then sip
reload has to be issued.

So have you come up with an idea. I think there is only one way of fixing
this. We have to save the users inuse counter in some place in the code
before reloading sip and after reloading the inuse counter should be set
back to its original value for every user in a call. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
03-25-08 06:10  rizwanhasham   Note Added: 0084483                          
======================================================================




More information about the asterisk-bugs mailing list