[asterisk-dev] sip.conf limitonpeer and counteronpeer removed?

Mark Michelson mmichelson at digium.com
Fri Jun 25 12:28:42 CDT 2010

On 06/25/2010 05:46 AM, John Fawcett wrote:
> I saw the note in the 1.6 upgrade file about the migration from
> limitonpeer to counteronpeer for chan_sip.
> * SIP: The "call-limit" option is marked as deprecated. It still works
> in this version of
>    Asterisk, but will be removed in the following version. Please use the
> groupcount functions
>    in the dialplan to enforce call limits. The "limitonpeer"
> configuration option is
>    now renamed to "counteronpeer".
> Strange to say I cannot see either option in the chan_sip.c code in the
> current version Seems to have been removed from the sip global
> options sometime bwteen 1.6.0 and 1.6.1.
> Are these no longer needed? I didn't see that referenced in the change log.
> Thanks,
> John

limitonpeer is not in because the option would no longer 
actually do anything if enabled. The reason was that in 1.6.1, the 
sip_user and sip_peer structures were merged together, and so there no 
longer is a special case needed to say to apply the configured 
call-limit on a peer in addition to the user.

call-limit still works in a peer context, though I am not sure at all 
why it was removed from the global context. The note about call-limit 
being removed in a future version is likely untrue, since the policy of 
Asterisk since the time that this entry in UPGRADE.txt was written has 
changed to not remove options unless they prove to be a hindrance to 
keep around or have security problems.

As Bradley Watkins has already pointed out to you, the "callcounter" 
option can be used in the general section, so this may suffice for your 
current needs. The option is documented in the CHANGES file, likely 
because it was not meant to be a replacement for call-limit, so much as 
it is meant to be an alternative for those who wish to have SIP device 
state updates without having to place a limit on the number of calls a 
peer may have at a time.

Hope this helps out some.
Mark Michelson

More information about the asterisk-dev mailing list