Limit SIP registrations

Is there a way to limit the number of SIP devices that can register to Asterisk? What I would like to do is limt my PBX so only 20 SIP devices can register to the PBX concurrently. Is this possible in the sip.conf settings?

I tried using ‘tcpauthlimit’ which states:

tcpauthlimit = 20 ; tcpauthlimit specifies the maximum number of
; unauthenticated sessions that will be allowed
; to connect at any given time. (default: 100)

However I can still register over 20 SIP devices to the pbx with this setting in place.

Any help please?


No, there’s no real way to allow that.