<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Have you tried to limit the number with max_contacts() parameter
      ? if you set the value to 1 it should only keep one AOR per
      contact. If that doesn't do what you want you are going to have to
      set up some logic to do a lookup foir a previous registration and
      manage the contacts that way, probably with a
      is_contact_registered function.<br>
      <br>
      there are plenty of optoins in the register module</p>
    <p><a class="moz-txt-link-freetext" href="https://opensips.org/docs/modules/3.6.x/registrar.html">https://opensips.org/docs/modules/3.6.x/registrar.html</a></p>
    <p><br>
    </p>
    <p>Richard</p>
    <div class="moz-cite-prefix">On 22/04/2026 08:24, Sasmita Panda via
      Users wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CALf-Q46GAZW6Mf=qSCSFZ0cEb3MtXZVL7N2TsxGhKARdHYMy-w@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div>Hi , </div>
        <div><br>
        </div>
        <div>I am using opensips 3.4 .</div>
        <div><br>
        </div>
        <div>While saving the contact I have called the save unction as
          below . </div>
        <div>               </div>
        <div>      
           if(!save("location","max-contacts=1,force-registration,path-lazy"))<br>
                                    sl_reply_error();</div>
        <div><br>
        </div>
        <div>My requirement was to save a single contact for a username.
          If there will be multiple registration then over ride the
          older one with the latest one . </div>
        <div><br>
        </div>
        <div>After this, I can see my calls getting forked between 2
          contacts . I can see that the IP addresses of both contacts
          are different, but the username part is the same. </div>
        <div>     <a href="http://user@10.0.0.1:45670"
            moz-do-not-send="true">user@10.0.0.1:45670</a></div>
        <div>     <a href="http://user@10.0.0.2:58095"
            moz-do-not-send="true">user@10.0.0.2:58095</a></div>
        <div><br>
        </div>
        <div>This means the system saves both contacts for the user.
          Consequently, during lookup, it finds 2 contacts and
          simultaneously forks the call to both destinations. </div>
        <div><br>
        </div>
        <div>In my case, the request comes from the ALB, which has a
          dynamic IP. Also the call id can be different. If I open
          multiple browser tabs and register the same user from both
          tabs, the registration will originate with different IPs and
          call IDs. </div>
        <div><br>
        </div>
        <div>How I will save single contact in this case ? </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>
          <div dir="ltr" class="gmail_signature"
            data-smartmail="gmail_signature">
            <div dir="ltr">
              <div>
                <div dir="ltr"><b><i>Thanks & Regards</i></b>
                  <div><i>Sasmita Panda</i></div>
                  <div><i>Senior Network Testing and Software Engineer</i></div>
                  <div><i>3CLogic , ph:07827611765</i></div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre wrap="" class="moz-quote-pre">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
  </body>
</html>