<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <br>
    <br>
    On 3/2/12 1:53 PM, Reda Aouad wrote:
    <blockquote
cite="mid:CAA30pc7nYe59AtAFZJhZ32xYm=6ECFJQ=v814vzExnOWGbDCgw@mail.gmail.com"
      type="cite">
      <div dir="ltr"><font color="#3366ff"><font><font
              face="tahoma,sans-serif">Thank you all, but I already know
              the above params / functions. They don't fulfill my need.<br>
              I still need multiple registrations per subscriber, but
              either one registration per user agent, or new
              registrations overwriting earliest ones.<br>
              <br>
              It seems I can't do that using usrloc or registrar modules
              for that.<br clear="all">
            </font></font></font></div>
    </blockquote>
    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.<br>
    <br>
    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.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <blockquote
cite="mid:CAA30pc7nYe59AtAFZJhZ32xYm=6ECFJQ=v814vzExnOWGbDCgw@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div dir="ltr"><font color="#3366ff" face="tahoma, sans-serif"><br>
          </font>
          <div><font color="#3366ff" face="tahoma, sans-serif">Reda</font></div>
        </div>
        <br>
        <br>
        <br>
        <div class="gmail_quote">On Fri, Mar 2, 2012 at 13:16,
          Daniel-Constantin Mierla <span dir="ltr">&lt;<a
              moz-do-not-send="true" href="mailto:daniel@kamailio.org">daniel@kamailio.org</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div text="#000000" bgcolor="#FFFFFF"> Hello,
              <div class="im"><br>
                <br>
                On 3/2/12 1:01 PM, Marius Zbihlei wrote:
                <blockquote type="cite"> On 03/02/2012 12:44 PM, Reda
                  Aouad wrote:
                  <blockquote type="cite">
                    <div dir="ltr"><font color="#3366ff"><font><font
                            face="tahoma,sans-serif">Hi,<br>
                            <br>
                            Is there a way to ensure single-registration
                            per user-agent for a user, which overwrites
                            previous registration ?<br>
                            Or is there a way to limit the number of
                            registrations per user, but overwriting the
                            earliest registration for each new one ?<br>
                            <br clear="all">
                          </font></font></font></div>
                  </blockquote>
                  Hello, <br>
                  <br>
                  From the registrar module documentation <a
                    moz-do-not-send="true"
href="http://kamailio.org/docs/modules/stable/modules_k/registrar.html#id2494545"
                    target="_blank">http://kamailio.org/docs/modules/stable/modules_k/registrar.html#id2494545</a><br>
                  <br>
                  3.12. max_contacts (integer)<br>
                  <br>
                  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.<br>
                  <br>
                  Default value is 0. <br>
                  <br>
                  But this will not overwrite the previous contact
                  AFAIK.<br>
                </blockquote>
              </div>
              For one contact per user, use save() with flags parameter
              (value 4):<br>
              <br>
              <a moz-do-not-send="true"
href="http://kamailio.org/docs/modules/stable/modules_k/registrar.html#id2497967"
                target="_blank">http://kamailio.org/docs/modules/stable/modules_k/registrar.html#id2497967</a><br>
              <br>
              Cheers,<br>
              Daniel<br>
              <br>
              <blockquote type="cite">
                <div class="im"> <br>
                  Marius<br>
                  <br>
                  <blockquote type="cite">
                    <div dir="ltr">
                      <div dir="ltr"><font color="#3366ff" face="tahoma,
                          sans-serif">Thanks,<br>
                        </font>
                        <div><font color="#3366ff" face="tahoma,
                            sans-serif">Reda</font></div>
                      </div>
                      <br>
                    </div>
                  </blockquote>
                  <br>
                  <br>
                  <pre cols="72">-- 
Zbihlei Marius

Head of
Linux Development Services Romania

1&amp;1 Internet Development srl    Tel KA: 754-9152
Str Mircea Eliade 18            Tel RO: <a moz-do-not-send="true" href="tel:%2B40-31-223-9152" value="+40312239152" target="_blank">+40-31-223-9152</a>
Sect 1, Bucuresti               mailto: <a moz-do-not-send="true" href="mailto:marius.zbihlei@1and1.ro" target="_blank">marius.zbihlei@1and1.ro</a>
71295, Romania
</pre>
                  <br>
                  <fieldset></fieldset>
                  <br>
                </div>
                <div class="im">
                  <pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
                </div>
              </blockquote>
            </div>
            <br>
            _______________________________________________<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"
              target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
            <br>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://linkedin.com/in/miconda">http://linkedin.com/in/miconda</a> -- <a class="moz-txt-link-freetext" href="http://twitter.com/miconda">http://twitter.com/miconda</a></pre>
  </body>
</html>