Summary:ASTERISK-08920: Call-Limit Counter can be easily broken
Reporter:Andy Harrell (ajh)Labels:
Date Opened:2007-03-01 16:57:19.000-0600Date Closed:2007-06-19 08:28:48
Versions:Frequency of
Environment:Attachments:( 0) verbosedebug.txt
Description:The Call-limit counter can be easily broken.  What you need is 3 SIP phones.  I had an Aastra 480i and 2 other phones.  Set the call-limit for the 480i to 2 calls.  Make calls to the 480i from the other phones.  Answer the first call. Place the first call on hold.  Answer the second call.  The phone has 2 calls at this point and should not allow another call, however, hit the transfer (Xfer) button to perform an attended transfer, then call another phone.  Once the other phone starts ring, hit the 'Goodbye' button on the 480i.  The call will ring through to the other phone, answer it.  Hang up all the calls.  You will now be unable to make calls to the 480i.  If you type sip show channels there will be no active calls.  If you type sip show inuse the extension for the 480i will have 2 channels in use.  All calls are rejected due to call limit being reached.  I performed this test on r57297 from the 1.2 branch.  I've seen this a number of times but I've finally been able to reproduce it.
Comments:By: Serge Vecher (serge-v) 2007-03-02 09:37:48.000-0600

As per bug guidelines, you need to attach a SIP debug trace illustrating the problem. Please do the following:
1) Prepare test environment (reduce the amount of unrelated traffic on the server);
2) Make sure your logger.conf has the following line:
  console => notice,warning,error,debug
3) restart Asterisk with the following command:
  'asterisk -Tvvvvvdddddngc | tee /tmp/verbosedebug.txt'
4) Enable SIP transaction logging with the following CLI commands (1.4/trunk commands in parenthesis):
set debug 4 (core set debug 4)
set verbose 4 (core set verbose 4)
sip debug (sip set debug)
5) Reproduce the problem
6) Trim startup information and attach verbosedebug.txt to the issue.

By: Andy Harrell (ajh) 2007-03-02 10:07:56.000-0600

I uploaded the debug file.  At the end I typed in sip show inuse and sip show channels to illustrate the issue that I'm seeing.

By: Andy Harrell (ajh) 2007-03-02 10:11:24.000-0600

Please note that I made the calls from 3 phones in this scenario, (it's just easier than dealing w/ the extra calls on the same phone).  I called from 101 to 104 then put that on hold.  Then called from 102 to 104.  Then I pressed Xfer and 103 and goodbye.  I answered 103, then hung up all calls and 104 could not receive any more calls.

By: Olle Johansson (oej) 2007-04-27 09:58:16

Good catch. I'll certainly look into this.

By: David J Craigon (superdjc) 2007-05-22 04:19:08

I have the same problem in 1.4.4

By: Joshua C. Colp (jcolp) 2007-06-19 08:28:47

Fixed in 1.2 as of revision 69765, 1.4 as of revision 69775, and trunk as of revision 69779.