<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Maybe a option is leave the secondary like primary when primary
      go up newly.</p>
    <p>Example: Primary go down, Secondary is the new Primary. Primary
      came back up but Secondary still is the VIP and still process the
      calls.<br>
    </p>
    <p>Only if Secondary go down, primary is the new VIP.</p>
    <p>The keepalived parameter for this behaviour is:<br>
    </p>
    <p class="western" style="margin-bottom: 0cm" align="justify"> <font
        face="Times New Roman, serif"><font style="font-size: 12pt"
          size="3"><span style="font-style: normal"><b>nopreempt</b></span></font></font></p>
    <pre class="moz-signature" cols="72">---
I'm SoCIaL, MayBe</pre>
    <div class="moz-cite-prefix">El 16/12/2020 a las 11:57 a. m.,
      harneet singh escribió:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAHTs8D_EtwxFi5Hw6J1jNfX-zZDjg0iQ7_1ygV+J_T6mJyswPw@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">Hi All,
        <div><br>
        </div>
        <div>I am using Kamailio in HA mode with Keepalived providing
          the VIP(Virtual IP) functionality, and have run into a rather
          peculiar issue.</div>
        <div><br>
        </div>
        <div><u>Setup:</u></div>
        <div>
          <div><br>
          </div>
          <div>Caller ------------ KamailioVIP(<b>Primary </b>and <b>Secondary</b>
            Kamailio)------- Callee</div>
          <div><br>
          </div>
          <div>    HA provided by Keepalived</div>
          <div>    DMQ is used between the Primary and Secondary
            Kamailio for dialog sync</div>
          <div><br>
          </div>
          <div><b><i><u>Issue Seen:</u></i></b></div>
          <div><b><i><u><br>
                </u></i></b></div>
          <div><b><i><u>Suppose the Primary Kamailio has been
                  brought down</u></i></b> and the Secondary one is
            actually active and tied to the VIP.</div>
          <div><br>
          </div>
          <div>When a call is fired from the Caller, it traverses
            through the Secondary Kamailio and lands onto the callee.
            The dialogs are updated properly. At this point, the Primary
            Kamailio is brought up, and dialog state is synced due to
            the DMQ module.</div>
          <div>The Keepalived will now attach the VIP to the Primary
            Instance. If the caller hangs up the phone at this point,
            the BYE sip message traverses through the Primary Kamailio
            instance to the callee and the call is cleared, but there
            are two issues here.</div>
          <div><br>
          </div>
          <div>  1.  The Primary Kamailio throws an error in <b>ds_load_remove()
            </b>saying that it cannot find the load for the specific
            call id. This is apparently due to the fact that the
            dispatcher data is not synced between the two modules but
            dialog data is. So dialog wise, things are fine. Can this be
            fixed somehow?</div>
          <div><br>
          </div>
          <div>  2. The above is still as grave a problem as the dialogs
            are cleared. BUT, if we check the '<b>kamcmd dispatcher.list</b>'
            on the <b>SECONDARY</b> kamailio even well after the call
            is cleared, the <b>DLGLOAD</b> shows 1. Since we are using
            the <b>Call Load based distribution</b> for the
            dispatching, this is effectively one call stuck on the
            dispatcher, which leads to resource leak.</div>
          <div><br>
          </div>
          <div>Is this a known issue, and if so, do we have a way to
            circumvent this? </div>
          <div><br>
          </div>
          <div>Regards,</div>
          <div>Harneet Singh </div>
          -- <br>
          <div dir="ltr" class="gmail_signature"
            data-smartmail="gmail_signature">"Once you eliminate the
            impossible, whatever remains, no matter how improbable, must
            be the truth" - Sir Arthur Conan Doyle<br>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
  </body>
</html>