[quote=“middletn”]try this in sip.conf
call-limit=1 ; Limit the number of calls!
incominglimit=1 ; Depricated function
Asterisk will report busy for any further calls
rgds[/quote]
tried both, neither work, in any combination, on either 1.0.7 or 1.2.1.
in fact, i’m in my office right now, working on this problem…
right now, we have a four phones set up for testing on a 1.2.1 box. all have call-limit=1 set in sip.conf. one is signed into queue, the rest call into that queue. the first call comes in, and the ‘agent’ phone picks up. sip show inuse gives us this:
* Peer name In use Limit
998 1 1
999 1 1
if we do a ‘show queues’, we get this:
Members:
sip/999 (dynamic) (Busy) has taken 11 calls (last was 26 secs ago)
No Callers
now, when a second call comes into queue, * should see that the agent is busy and can’t receive any more calls, right? because the inuse is showing 1 and the queue sees the agent as busy…so there is NO WAY the call should go to that agent phone!
-- Executing Queue("SIP/2001-90a2", "AML_CUSTOMER_SERVICE") in new stack
-- Started music on hold, class 'default', on channel 'SIP/2001-90a2'
[b]Jan 14 10:27:30 ERROR[14778]: chan_sip.c:2238 update_call_counter: Call to peer '999' rejected due to usage limit of 1
[/b] -- Stopped music on hold on SIP/2001-90a2
-- Playing 'queue-youarenext' (language 'en')
-- Told SIP/2001-90a2 in AML_CUSTOMER_SERVICE their queue position (which was 1)
-- Playing 'queue-thankyou' (language 'en')
-- Started music on hold, class 'default', on channel 'SIP/2001-90a2'
[b] -- Called sip/999
-- SIP/999-9c1b is ringing
-- SIP/999-9c1b is ringing
-- SIP/999-9c1b is ringing
-- SIP/999-9c1b is ringing
-- SIP/999-9c1b is ringing
[/b] -- Started music on hold, class 'default', on channel 'SIP/998-04b5'
-- SIP/999-9c1b answered SIP/2001-90a2
nope, asterisk calls anyway. it even says that the call is rejected due to a usage limit of 1, but rings the phone anyways. if we do a ‘sip show inuse’, the inuse counter now shows zero, even though there is an active call on the line.
we have replicated this issue on three types of phones now - two softphones (eyebeam and express talk) and a hardphone (polycom IP500). all the phones behave exactly the same.
EDIT
We just spent an hour watching the CLI with debug mode on, and were able to determine exactly where the problem is occurring. This is just doing SIP calls, without the queue, but this problem is what is causing the multiple queue calls issue as well.
Jan 14 11:32:20 DEBUG[22068]: chan_sip.c:2054 sip_call: Outgoing Call for 999
Jan 14 11:32:20 DEBUG[22068]: chan_sip.c:2195 update_call_counter: Updating call counter for outgoing call
Jan 14 11:32:20 ERROR[22068]: chan_sip.c:2238 update_call_counter: Call to peer '999' rejected due to usage limit of 1
Jan 14 11:32:20 DEBUG[22068]: app_dial.c:1112 dial_exec_full: ast call on peer returned -1
Jan 14 11:32:20 DEBUG[22068]: channel.c:1322 ast_hangup: Hanging up channel 'SIP/999-8033'
Jan 14 11:32:20 DEBUG[22068]: chan_sip.c:2402 sip_hangup: Hangup call SIP/999-8033, SIP callid 0fb6ccb62195755e0548e441209376b2@10.100.6.57)
Jan 14 11:32:20 DEBUG[22068]: chan_sip.c:2410 sip_hangup: update_call_counter(999) - decrement call limit counter
Jan 14 11:32:20 DEBUG[22068]: chan_sip.c:2195 update_call_counter: Updating call counter for outgoing call
Jan 14 11:32:20 DEBUG[22068]: chan_sip.c:2232 update_call_counter: Call to peer '999' removed from call limit 1
== Everyone is busy/congested at this time (0:0/0/0)
Jan 14 11:32:20 DEBUG[22068]: app_dial.c:1586 dial_exec_full: Exiting with DIALSTATUS=CHANUNAVAIL.
Jan 14 11:32:20 DEBUG[22068]: pbx.c:1667 pbx_extension_helper: Launching 'Goto'
-- Executing Goto("SIP/2001-d337", "s-CHANUNAVAIL|1") in new stack
-- Goto (macro-mgruser,s-CHANUNAVAIL,1)
Jan 14 11:32:20 DEBUG[22011]: chan_sip.c:11434 sip_devicestate: Checking device state for peer 999
Jan 14 11:32:20 DEBUG[22011]: devicestate.c:187 do_state_change: Changing state for SIP/999 - state 1 (Not in use)
Jan 14 11:32:20 DEBUG[22070]: app_queue.c:471 changethread: Device 'SIP/999' changed to state '1' (Not in use)
The code snippet above shows the CLI for exten 999. Note that 999 is ALREADY on an active call at this point. Note that the call counter is updated, and the call rejected due to a usage limit of 1. All is good, but when we get to the last three lines, the problem appears. chan_sip.c checks the devicestate, and ends up changing 999 to not in use, but the device is still active and on another call. This means that the inuse counter shows zero, and when we attempt to call in again, the call goes through.
This seems like a bug to me, and i’m starting to reach the limits of my understanding of the system. I can provide further information if needs be.
if the author of this thread reads this, please change the original thread title to include [BUG?] so that one of the devs will take a look - maybe they can chime in on this…