[SR-Users] Limiting Registration Contacts

Colin Morelli colin.morelli at gmail.com
Mon Dec 5 13:33:43 CET 2016


Hey Daniel,

This makes sense, thanks for the explanation.

While I can understand why it works the way it does now, I still think
having an option here would be great. My thought is, whether the mobile
phone that re-registers every 10 minutes or the desk phone is "older," the
point is that they're both older than the device which is currently trying
to register and is unable to. There's also some preferential logic you
could try to add here - perhaps try to remove .invalid contacts first,
which are generally used by browsers and likely less stable than contacts
with an IP address.

All that said, I appreciate the clarification. I believe it's fairly
trivial to do this with sqlops anyway so it's not a huge deal. I also may
be able to do something in the edge proxy to automatically send an
unregister if a websocket connection closes after a register request.

Thanks!
Colin
On Mon, Dec 5, 2016 at 6:02 AM Daniel-Constantin Mierla <miconda at gmail.com>
wrote:

> Hello,
>
> right now the rule is to reject the registrations that exceed the
> max_contacts limit. The main reason behind this policy is the registration
> mechanism in SIP which requires periodic update/refresh but also different
> expires intervals.
>
> In this way it's hard to select the "old device". Can be a desktop phone
> registering every hour and stable connection but also a mobile phone
> registering every 10 minutes, changing the ip every now and then. By just
> relying on the oldest registration, the desktop phone is likely the
> candidate to remove most of the time, but keep other invalid mobile
> contacts.
>
> The solution would be to use GRUU (or the instance parameter) for
> registration contacts. In this way each new registration from a device will
> replace its own old contact, even if it has a different contact address.
>
> Cheers,
> Daniel
>
> On 01/12/2016 23:59, Colin Morelli wrote:
>
> Hey Alex - not sure I'm quite following what you mean. The bindings are
> only for web clients. Are you suggesting the clients themselves
> de-register? I'd have no problem with that with the exception of the fact
> that there's simply no way to guarantee that happens. It's a race condition
> between whether the unregistration can be sent before the browser kills the
> websocket connection on refresh.
>
> On Thu, Dec 1, 2016 at 5:57 PM, Alex Balashov <abalashov at evaristesys.com>
> wrote:
>
> Wouldn't it be more fruitful to delete and reach old bindings in such a
> scenario? Or are these bindings not only for web clients?
>
> On December 1, 2016 5:54:06 PM EST, Colin Morelli <colin.morelli at gmail.com>
> wrote:
> >Hey all,
> >
> >I know Kamailio's registrar module has a max_contacts parameter that
> >will
> >limit the number of active contacts for an AOR. However, is there any
> >mechanism to control what happens when that number is hit?
> >
> >When using a web client where every page refresh registers a new
> >contact
> >with Kamailio, it would be useful to automatically roll off the oldest
> >registrations and replace to make room for the new ones. I know this
> >can be
> >manually accomplished with sqlops, but I was hoping something like this
> >already existed.
> >
> >Best,
> >Colin
> >
> >
> >------------------------------------------------------------------------
> >
> >_______________________________________________
> >SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> >sr-users at lists.sip-router.org
> >http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
> -- Alex
>
> --
> Principal, Evariste Systems LLC (www.evaristesys.com)
>
> Sent from my Google Nexus.
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> 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 listsr-users at lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Daniel-Constantin Mierlawww.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20161205/64274396/attachment.html>


More information about the sr-users mailing list