<div dir="ltr"><div>you mean the global parameter of registrar module .</div><div>modparam("registrar", "max_contacts", 1)</div><div><br></div><div>This will keep 1 AOR per contact. AOR is address of record which is the combination of user@IP (<a href="mailto:user@20.0.0.1">user@20.0.0.1</a>). In my case for every registration the IP address changes with every registration. </div><div>So, OpenSIPS is considering this a different AOR and is saving multiple contacts. </div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><b><i><br></i></b></div><div dir="ltr"><b><i><br></i></b></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><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Wed, Apr 22, 2026 at 1:12 PM Richard Robson <<a href="mailto:richard@rikrobson.co.uk">richard@rikrobson.co.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>

  
    
  
  <div>
    <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 href="https://opensips.org/docs/modules/3.6.x/registrar.html" target="_blank">https://opensips.org/docs/modules/3.6.x/registrar.html</a></p>
    <p><br>
    </p>
    <p>Richard</p>
    <div>On 22/04/2026 08:24, Sasmita Panda via
      Users wrote:<br>
    </div>
    <blockquote type="cite">
      
      <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" target="_blank">user@10.0.0.1:45670</a></div>
        <div>     <a href="http://user@10.0.0.2:58095" target="_blank">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">
            <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></fieldset>
      <pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
  </div>

_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div>