<div dir="ltr">Hi Bogdan,<div> <div>Not so crazy idea, in fact you make me think that maybe I can listen on a new/different tcp port for pn-enabled terminals and then I can catch the dst_port param in E_CORE_TCP_DISCONNECT event to decide whether to use remove_ip_port() or not.<br><br>Thanks!!<div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Oct 9, 2024 at 3:21 AM Bogdan-Andrei Iancu <<a href="mailto:bogdan@opensips.org">bogdan@opensips.org</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>
    <font face="monospace">Hi Federico,<br>
      <br>
      That's a very good point. And the only way to do this would be by
      some extension in the remove_ip_port() to skip certain contacts,
      maybe based on some branch flag (bflag).....Currently there is no
      way to do this kind of skipping with the existing code.<br>
      <br>
      Maybe a crazy idea here....to use 2 usrloc domains/tables, like
      "location" for regular contacts and "location-pn" for the push
      notification contacts. You do (based on E_CORE_TCP_DISCONNECT)
      removal only from "location"...and when you do lookup, you do from
      both ..  Again, crazy idea :)<br>
      <br>
      Regards, <br>
    </font>
    <pre cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a href="https://www.opensips-solutions.com" target="_blank">https://www.opensips-solutions.com</a>
  <a href="https://www.siphub.com" target="_blank">https://www.siphub.com</a></pre>
    <div>On 08.10.2024 14:09, Federico Edorna
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">
        <div dir="ltr">Thanks Bogan, very useful information. Regarding
          the E_CORE_TCP_DISCONNECT event, I wonder if it is possible to
          avoid removing the contact for Push Notification user agents.
          Because the TCP connection may go down, but we must keep the
          contact in usrloc. Do you think it is possible to detect this
          special case in some way?
          <div>Best regards</div>
        </div>
        <br>
        <div class="gmail_quote">
          <div dir="ltr" class="gmail_attr">On Thu, Oct 3, 2024 at
            11:49 AM Bogdan-Andrei Iancu <<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</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">
            <div> <font face="monospace">Sure, it will do it!<br>
                <br>
                Regards,<br>
              </font>
              <pre cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a href="https://www.opensips-solutions.com" target="_blank">https://www.opensips-solutions.com</a>
  <a href="https://www.siphub.com" target="_blank">https://www.siphub.com</a></pre>
              <div>On 03.10.2024 17:26, M S wrote:<br>
              </div>
              <blockquote type="cite">
                <div dir="ltr">What if I add a header (in local_route)
                  to locally generated unregister messages from
                  midregistrar opensips to tell the main registrar that
                  it is a special message, and in the main registrar
                  just call save("location") for these messages without
                  any www_authorize?</div>
                <br>
                <div class="gmail_quote">
                  <div dir="ltr" class="gmail_attr">On Thu, Oct 3, 2024
                    at 4:00 PM Bogdan-Andrei Iancu <<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</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">
                    <div> <font face="monospace">Well, good question.
                        The mechanism will perfectly work between the
                        mid_registrar and the end-devices. But if the
                        mid_registrar detects and remove a zombie
                        contact, it may have to preform a
                        de-registration (depending on the mid registrar
                        mode) with the main registrar. That means an
                        REGISTER generated by mid-registrar OpenSIPS -
                        and if you do digest auth on the main registrar,
                        this will fail :(<br>
                        <br>
                        Regards,<br>
                      </font>
                      <pre cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a href="https://www.opensips-solutions.com" target="_blank">https://www.opensips-solutions.com</a>
  <a href="https://www.siphub.com" target="_blank">https://www.siphub.com</a></pre>
                      <div>On 03.10.2024 16:20, M S wrote:<br>
                      </div>
                      <blockquote type="cite">
                        <div dir="ltr">Hi Bogdan,
                          <div>Thank you for your post and explanation,
                            does this work the same with mid_registrar
                            too, i.e. if a contact is marked with RTO is
                            it discarded from mid_registrar location if
                            it is zombie?</div>
                          <div><br>
                          </div>
                          <div>Thank you!</div>
                        </div>
                        <br>
                        <div class="gmail_quote">
                          <div dir="ltr" class="gmail_attr">On Thu, Oct
                            3, 2024 at 1:04 PM Bogdan-Andrei Iancu <<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</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"><br>
                            Here is a short post on how to improve your
                            OpenSIPS registrar <br>
                            performance and also your user's experience
                            in the same time.... by <br>
                            fighting the zombies.... the zombie
                            registrations 🙂<br>
                            <br>
                            <a href="https://blog.opensips.org/2024/10/03/how-to-eliminate-zombie-registrations-in-opensips/" rel="noreferrer" target="_blank">https://blog.opensips.org/2024/10/03/how-to-eliminate-zombie-registrations-in-opensips/</a><br>
                            <br>
                            Enjoy,<br>
                            <br>
                            -- <br>
                            Bogdan-Andrei Iancu<br>
                            <br>
                            OpenSIPS Founder and Developer<br>
                               <a href="https://www.opensips-solutions.com" rel="noreferrer" target="_blank">https://www.opensips-solutions.com</a><br>
                               <a href="https://www.siphub.com" rel="noreferrer" target="_blank">https://www.siphub.com</a><br>
                            <br>
                            <br>
_______________________________________________<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>
                        <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>
                      <br>
                    </div>
                  </blockquote>
                </div>
              </blockquote>
              <br>
            </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>
      </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>
    <br>
  </div>

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