[SR-Users] Registration Limits

Daniel-Constantin Mierla miconda at gmail.com
Sat Mar 3 12:20:31 CET 2012



On 3/2/12 1:53 PM, Reda Aouad wrote:
> Thank you all, but I already know the above params / functions. They 
> don't fulfill my need.
> I still need multiple registrations per subscriber, but either one 
> registration per user agent, or new registrations overwriting earliest 
> ones.
>
> It seems I can't do that using usrloc or registrar modules for that.
you can use it for one registration per user agent, why you say you 
don't? Nobody stops you using save("location") or save("location", 
"0x4") based on user agent id, in the same config file.

For removing the oldest contact, you will need a bit of coding, or, if 
you do db only mode, you can do a sql query to remove the oldest record.

Cheers,
Daniel
>
> Reda
>
>
>
> On Fri, Mar 2, 2012 at 13:16, Daniel-Constantin Mierla 
> <daniel at kamailio.org <mailto:daniel at kamailio.org>> wrote:
>
>     Hello,
>
>
>     On 3/2/12 1:01 PM, Marius Zbihlei wrote:
>>     On 03/02/2012 12:44 PM, Reda Aouad wrote:
>>>     Hi,
>>>
>>>     Is there a way to ensure single-registration per user-agent for
>>>     a user, which overwrites previous registration ?
>>>     Or is there a way to limit the number of registrations per user,
>>>     but overwriting the earliest registration for each new one ?
>>>
>>     Hello,
>>
>>     From the registrar module documentation
>>     http://kamailio.org/docs/modules/stable/modules_k/registrar.html#id2494545
>>
>>     3.12. max_contacts (integer)
>>
>>     The parameter can be used to limit the number of contacts per AOR
>>     (Address of Record) in the user location database. Value 0
>>     disables the check. This parameter can be modified via ser config
>>     framework.
>>
>>     Default value is 0.
>>
>>     But this will not overwrite the previous contact AFAIK.
>     For one contact per user, use save() with flags parameter (value 4):
>
>     http://kamailio.org/docs/modules/stable/modules_k/registrar.html#id2497967
>
>     Cheers,
>     Daniel
>
>>
>>     Marius
>>
>>>     Thanks,
>>>     Reda
>>>
>>
>>
>>     -- 
>>     Zbihlei Marius
>>
>>     Head of
>>     Linux Development Services Romania
>>
>>     1&1 Internet Development srl    Tel KA: 754-9152
>>     Str Mircea Eliade 18            Tel RO:+40-31-223-9152  <tel:%2B40-31-223-9152>
>>     Sect 1, Bucuresti               mailto:marius.zbihlei at 1and1.ro  <mailto:marius.zbihlei at 1and1.ro>
>>     71295, Romania
>>
>>
>>     _______________________________________________
>>     SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>     sr-users at lists.sip-router.org  <mailto:sr-users at lists.sip-router.org>
>>     http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>     _______________________________________________
>     SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
>     list
>     sr-users at lists.sip-router.org <mailto:sr-users at lists.sip-router.org>
>     http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>

-- 
Daniel-Constantin Mierla -- http://www.asipto.com
http://linkedin.com/in/miconda -- http://twitter.com/miconda

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20120303/cbb35cb5/attachment.htm>


More information about the sr-users mailing list