Asterisk sip incominglimit
Created by: oej,Last modification on Thu 01 of Nov, 2007 [11:04 UTC] by neutrino38
In Asterisk 1.4
incominglimit and call-limit are equivalent. outgoinglimit is not supported anymore.
In Asterisk 1.2
incominglimit and outgoinglimit is replaced by call-limit.
Setting the call-limit will limit the number of simultaneous calls for a user or a peer.
(It does not require a username= setting, regardless of the comment below).
incominglimit and call-limit are equivalent. outgoinglimit is not supported anymore.
In Asterisk 1.2
incominglimit and outgoinglimit is replaced by call-limit.
Setting the call-limit will limit the number of simultaneous calls for a user or a peer.
(It does not require a username= setting, regardless of the comment below).
- Back to Asterisk SIP Channels

Comments
333How to decrease
When we hangup,will the ${GROUP_COUNT} can decrease automatic ?
333take care of the syntax
so use
call-limit=1
to allow only one incoming or outgoing call on an extension
333call-limit only works with type=peer
however, 1.2.4 is broken now, as it is continually setting the device state 1 (not in use). I don't see anything obvious in the source code, but then again, I'm not a programmer by trade.
but, after the patch in bug 6111 was applied, call-limit WAS working properly, and I would be upgrading all of our servers to 1.2.4 if it was working still.
EDIT: the fix is to change type=friend to type=peer in sip.conf. All of a sudden, call-limit works again. What else this might affect, I do not know, but hopefully someone with more expertise might.
this was on version 1.2.1, i'm trying 1.2.4 shortly (as soon as it's done compiling)
EDIT AGAIN: same on 1.2.4 - type=friend allows any number of calls through, while type=peer works properly with call-limit=1 (or 2, or whatever).
333
333
333call_limit seems not to work in 1.2.4
setting limit=1 in a sip peer, seems to do nothing at all anyway ... sip show peer <peername> shows the call limit always as zero, whatever combinations you seem to use ...
a better solution is to use the current variant of the SetGroup() command .. (which is also dprecated, along with outgoinglimit etc)
as of 1.0.2.4, this seems to work and uses current * functions
exten => _0.,1,Set(GROUP()=SOME_PROVIDER) ;Set Group
exten => _0.,2,GotoIf($${GROUP_COUNT()} > 1 ?103) ;Exceeded the 1 channel we are aloowed with this provider?
exten => _0.,3,dial(sip/8001/${EXTEN}) ; ok, dial out on SIP
exten => _0.,103,dial(${TRUNK}/g1/${EXTEN}/B,30) ; bah, ok then just fall back to our regular ISDN service.
333This requires username= entry