[SR-Users] Max registered users
Vitaliy Aleksandrov
vitalik.voip at gmail.com
Wed May 30 20:34:22 CEST 2012
Hello,
>
> On 5/30/12 4:12 PM, Vitaliy Aleksandrov wrote:
>> Hi all,
>>
>> I'm trying to find a way to get a number of the registered user
>> locations and if it is bigger that some limit then kamailio will not
>> save new registrations.
>>
>> reg_fetch_contacts() from registrar module doesn't help as it can
>> fetch contacts only for one user.
>> max_contacts parameter of the registrar module limits the number of
>> contacts per AOR, but i need to limit max number of all contacts that
>> proxy will keep in usrloc.
> the usrloc module exports a statistics counter with all existing
> contacts (iirc, it is named 'contacts'). You can access any of the
> internal statistics via $stat(name), like $stat(contacts).
>
> This should give you the value to compare against in the configuration
> file, not to exceed a specific upper limit.
>
> Cheers,
> Daniel
>
Thank you very much ! $stat() is just what i looked for.
More information about the sr-users
mailing list