<div dir="ltr"><font color="#3366ff"><font><font face="tahoma,sans-serif">I think I didn&#39;t define well my need. Or I miss something in my comprehension of the modules/function.<br><br>I need one registration per subscriber and user agent combination. If a new registration comes for the same combination, it should replace the old one.<br>

<br>save(&quot;location&quot;) doesn&#39;t replace the old registration. and save(&quot;location&quot;, 0x04) doesn&#39;t take into account the user agent.<br><br>I think I should do it manually...<br clear="all"></font></font></font><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 Sat, Mar 3, 2012 at 12:20, Daniel-Constantin Mierla <span dir="ltr">&lt;<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</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"><div>
    <br>
    <br>
    On 3/2/12 1:53 PM, Reda Aouad wrote:
    <blockquote 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&#39;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&#39;t do that using usrloc or registrar modules
              for that.<br clear="all">
            </font></font></font></div>
    </blockquote></div>
    you can use it for one registration per user agent, why you say you
    don&#39;t? Nobody stops you using save(&quot;location&quot;) or save(&quot;location&quot;,
    &quot;0x4&quot;) 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<div><div><br>
    <blockquote 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 href="mailto:daniel@kamailio.org" target="_blank">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><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 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 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> <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 href="tel:%2B40-31-223-9152" value="+40312239152" target="_blank">+40-31-223-9152</a>
Sect 1, Bucuresti               mailto: <a href="mailto:marius.zbihlei@1and1.ro" target="_blank">marius.zbihlei@1and1.ro</a>
71295, Romania
</pre>
                  <br>
                  <fieldset></fieldset>
                  <br>
                </div>
                <div>
                  <pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a 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 href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
            <a 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>
    </div></div><span><font color="#888888"><pre cols="72">-- 
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
<a href="http://linkedin.com/in/miconda" target="_blank">http://linkedin.com/in/miconda</a> -- <a href="http://twitter.com/miconda" target="_blank">http://twitter.com/miconda</a></pre>
  </font></span></div>

</blockquote></div><br></div>