<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hello,</p>
    <p>the pcap shows only the OPTIONS requests, not the replies. Maybe
      you have to capture the traffic also on 8080 to catch it. It would
      important to see the reply and where it is sent back to kamailio.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <div class="moz-cite-prefix">On 24.06.21 09:24, Shahid Hussain
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAFHR7W+7a9b9CmNk8QDcXYB-nc2dFKzpGp_eA8t+E=LtViO_PA@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div>Hi,<br>
          I have configured the dispatcher default socket as below IP ,
          the expectation here is that kamailio should send all traffic
          from this IP (port will be ephemeral) over TCP.<br>
          modparam("dispatcher", "ds_default_socket", "tcp:<a
            href="http://172.27.45.219:5060" moz-do-not-send="true">172.27.45.219:5060</a>")<br>
          <br>
          This system also listens on port 8080 which is meant for
          websocket communication (dispatcher communication is over non
          websocket).<br>
          <br>
          Kamailio is sending an OPTION message to dispatcher IP over
          TCP on 5060 and getting 200 OK response but Kamailio
          considering the response is on websocket port 8080 ,$Rp value
          is 8080.<br>
          <br>
          onreply_route {<br>
               if (($Rp == 8080 ) && !(proto == WS))<br>
                  {<br>
                          xlog("L_WARN", "SIP response received on $Rp
          protocol:proto RIP:$Ri <a class="moz-txt-link-freetext" href="SIP:$si">SIP:$si</a> method:$rm <a class="moz-txt-link-freetext" href="cid:$ci">cid:$ci</a>
          replystatus:$rs len:$ml\n");<br>
                          xlog("L_WARN", "SIP message received: $mb\n");<br>
                          drop;<br>
                  }<br>
          <br>
          .....<br>
          ....<br>
          }<br>
          <br>
          Following is the output of above logs:<br>
          Jun 24 15:10:08 localhost /usr/sbin/kamailio[6223]: WARNING:
          {2 10 OPTIONS <a
            href="mailto:1ab6573a4640823b-6209@172.27.45.198"
            moz-do-not-send="true">1ab6573a4640823b-6209@172.27.45.198</a>}
          <script>: SIP response received on <span
            style="background-color:rgb(255,255,0)">8080 protocol:tcp</span>
           RIP:172.27.45.219 <a class="moz-txt-link-freetext" href="SIP:172.27.44.125">SIP:172.27.44.125</a> method:OPTIONS <a
            href="mailto:cid%3A1ab6573a4640823b-6209@172.27.45.198"
            moz-do-not-send="true">cid:1ab6573a4640823b-6209@172.27.45.198</a>
          replystatus:200 len:416<br>
          <br>
        </div>
        <div>Jun 24 15:10:08 localhost /usr/sbin/kamailio[6223]:
          WARNING: {2 10 OPTIONS <a
            href="mailto:1ab6573a4640823b-6209@172.27.45.198"
            moz-do-not-send="true">1ab6573a4640823b-6209@172.27.45.198</a>}
          <script>: SIP message received: SIP/2.0 200
          OK#015#012Via: SIP/2.0/TCP
172.27.45.198:5060;branch=z9hG4bK4526.92b79f34000000000000000000000000.0;received=172.27.45.219#015#012From:
<a class="moz-txt-link-rfc2396E" href="sip:dispatcher@localhost"><sip:dispatcher@localhost></a>;tag=1ae6c95d92f9ea9ce927f715de5c48c8-eb141029#015#012To:
<a class="moz-txt-link-rfc2396E" href="sip:172.27.44.125:5060;transport=tcp"><sip:172.27.44.125:5060;transport=tcp></a>;tag=a9d542e0#015#012Call-ID:
          <a
            href="http://1ab6573a4640823b-6209@172.27.45.198#015#012CSeq"
            moz-do-not-send="true">1ab6573a4640823b-6209@172.27.45.198#015#012CSeq</a>:
          10 OPTIONS#015#012Allow: INVITE, ACK, BYE, OPTIONS, CANCEL,
          INFO, UPDATE, NOTIFY#015#012Content-Length: 0<br>
          <br>
          <br>
          Also I have attached a pcap.<br>
          <br>
          Dispatcher.list configuration:<br>
          1 <a class="moz-txt-link-freetext" href="sip:172.27.44.125:5060;transport=tcp">sip:172.27.44.125:5060;transport=tcp</a> 0 0
          duid=sample-cas;maxload=1000<br>
        </div>
        <div><br>
        </div>
        <div>Thanks,</div>
        <div>Shahid</div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
  * <a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
  * <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>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a></pre>
  </body>
</html>