<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hello,</p>
    <p>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.</p>
    <p>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.</p>
    <p>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.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 01/12/2016 23:59, Colin Morelli
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAPtU-Uo0h1ZdWxM+WF8BvCTLgZc9tU3zFtHm2=ts3vdXJ7avoQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">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.</div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Thu, Dec 1, 2016 at 5:57 PM, Alex
          Balashov <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:abalashov@evaristesys.com" target="_blank">abalashov@evaristesys.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">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?<br>
            <div>
              <div class="h5"><br>
                On December 1, 2016 5:54:06 PM EST, Colin Morelli <<a
                  moz-do-not-send="true"
                  href="mailto:colin.morelli@gmail.com">colin.morelli@gmail.com</a>>
                wrote:<br>
                >Hey all,<br>
                ><br>
                >I know Kamailio's registrar module has a
                max_contacts parameter that<br>
                >will<br>
                >limit the number of active contacts for an AOR.
                However, is there any<br>
                >mechanism to control what happens when that number
                is hit?<br>
                ><br>
                >When using a web client where every page refresh
                registers a new<br>
                >contact<br>
                >with Kamailio, it would be useful to automatically
                roll off the oldest<br>
                >registrations and replace to make room for the new
                ones. I know this<br>
                >can be<br>
                >manually accomplished with sqlops, but I was hoping
                something like this<br>
                >already existed.<br>
                ><br>
                >Best,<br>
                >Colin<br>
                ><br>
                ><br>
              </div>
            </div>
            >-----------------------------<wbr>------------------------------<wbr>-------------<br>
            ><br>
            >_____________________________<wbr>__________________<br>
            >SIP Express Router (SER) and Kamailio (OpenSER) -
            sr-users mailing list<br>
            ><a moz-do-not-send="true"
              href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
            ><a moz-do-not-send="true"
              href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users"
              rel="noreferrer" target="_blank">http://lists.sip-router.org/<wbr>cgi-bin/mailman/listinfo/sr-<wbr>users</a><br>
            <br>
            <br>
            -- Alex<br>
            <br>
            --<br>
            Principal, Evariste Systems LLC (<a moz-do-not-send="true"
              href="http://www.evaristesys.com" rel="noreferrer"
              target="_blank">www.evaristesys.com</a>)<br>
            <br>
            Sent from my Google Nexus.<br>
            <br>
            <br>
            ______________________________<wbr>_________________<br>
            SIP Express Router (SER) and Kamailio (OpenSER) - sr-users
            mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
            <a moz-do-not-send="true"
              href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users"
              rel="noreferrer" target="_blank">http://lists.sip-router.org/<wbr>cgi-bin/mailman/listinfo/sr-<wbr>users</a><br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio World Conference - May 8-10, 2017 - <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
  </body>
</html>