[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
Wed Mar 26 07:30:16 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-26-2008 07:30 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.
====================================================================== 

---------------------------------------------------------------------- 
 oej - 03-26-08 07:30  
---------------------------------------------------------------------- 
Well, you don't need the "user" object for that, you can still define two
peers with the same account code and different limits. Another way is to
use groupcount in the dialplan, so there are many ways you can enforce a
limit that will stay during a reload.

Anyway, I don't see any easy solution here. Use peers instead of users to
keep the call counter. The user object doesn't work like you want by design
and I am not sure that we want to make such a big change to released code
to implement new functionality. That's something you might want to discuss
on the asterisk-dev list to see what the rest of the development team
think. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
03-26-08 07:30  oej            Note Added: 0084558                          
======================================================================




More information about the asterisk-bugs mailing list