<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <tt>Hi,<br>
      <br>
      It is hard to say without a pcap - try to make a call capturing on
      the LB server, showing both in and out SIP packets.<br>
      <br>
      Regards,<br>
    </tt>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
    <div class="moz-cite-prefix">On 10.07.2016 11:43, Chandan PR wrote:<br>
    </div>
    <blockquote
cite="mid:CADh=FyjF+uZdoPRXJ71BFicDaO1kgk65eUY=-39shX=d4L0d_w@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi Guys,
        <div><br>
        </div>
        <div>Our Load Balancer configuration is as below:</div>
        <div><br>
        </div>
        <div>
          <div>route{</div>
          <div><span class="" style="white-space:pre">        </span>if
            (!mf_process_maxfwd_header("3")) {</div>
          <div><span class="" style="white-space:pre">                </span>send_reply("483","looping");</div>
          <div><span class="" style="white-space:pre">                </span>exit;</div>
          <div><span class="" style="white-space:pre">        </span>}</div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div><span class="" style="white-space:pre">        </span>if (
            has_totag() ) {</div>
          <div><span class="" style="white-space:pre">                </span>#
            sequential request -&gt; obey Route indication</div>
          <div><span class="" style="white-space:pre">                </span>loose_route();</div>
          <div>                t_relay();</div>
          <div>                exit;</div>
          <div>        }</div>
          <div><br>
          </div>
          <div>        # handle cancel and re-transmissions</div>
          <div><span class="" style="white-space:pre">        </span>if (
            is_method("CANCEL") ) {</div>
          <div><span class="" style="white-space:pre">                </span>if (
            t_check_trans() )</div>
          <div><span class="" style="white-space:pre">                        </span>t_relay();</div>
          <div><span class="" style="white-space:pre">                </span>exit;</div>
          <div><span class="" style="white-space:pre">        </span>}</div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div>        # from now on we have only the initial requests</div>
          <div>        if (!is_method("INVITE")) {</div>
          <div>                send_reply("405","Method Not Allowed");</div>
          <div>                exit;</div>
          <div>        }</div>
          <div><br>
          </div>
          <div>        # initial request</div>
          <div><span class="" style="white-space:pre">        </span>record_route();</div>
          <div><span class="" style="white-space:pre">        </span># LB
            function returns negative if no suitable destination (for
            requested resources) is found,</div>
          <div>        # or if all destinations are full</div>
          <div>        if ( !load_balance("1","channel") ) {</div>
          <div>             send_reply("500","Service full");</div>
          <div>             exit;</div>
          <div>        }</div>
          <div><span class="" style="white-space:pre">        </span>t_on_reply("test");</div>
          <div>        # arm a failure route for be able to catch a
            failure event and to do </div>
          <div>        # failover to the next available destination</div>
          <div>        t_on_failure("LB_failed");</div>
          <div><br>
          </div>
          <div>        # send it out</div>
          <div><span class="" style="white-space:pre">        </span>if
            (!t_relay()) {</div>
          <div><span class="" style="white-space:pre">                </span>sl_reply_error();</div>
          <div><span class="" style="white-space:pre">        </span>}</div>
          <div><br>
          </div>
          <div>}</div>
        </div>
        <div><br>
        </div>
        <div>
          <div>onreply_route[test] {</div>
          <div><span class="" style="white-space:pre">        </span>xlog("Reply
            $rs received from $si for the call $avp(iurl)");</div>
          <div>}</div>
        </div>
        <div><br>
        </div>
        <div>In the opensips.log file, for some of the calls I see the
          reply 200 logged 4 times. And whenever that happens, the same
          is not sent back to the originator of the call.</div>
        <div><br>
        </div>
        <div>At the end of the day some calls are ending up in ambiguous
          result codes as they don't receive 200 OK. And all the calls
          in this category, we see the reply 200 logged 4 times in the
          log.</div>
        <div><br>
        </div>
        <div>Any clue on what could be the issue?</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>Regards,</div>
        <div>Chandan</div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
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>
    <br>
  </body>
</html>