<div style="font-family: arial; font-size: 14px;">Thanks for your inputs Daniel and Igor.</div><div style="font-family: arial; font-size: 14px;"><br></div><div style="font-family: arial; font-size: 14px;">I have confirmed that Kamailio is indeed sending out WebSocket ping as configured. Chrome's network tab do not show the control packets, but it can be viewed using firefox. <br></div><div style="font-family: arial; font-size: 14px;"><br></div><div style="font-family: arial; font-size: 14px;">X.</div><br><div style="font-family: arial; font-size: 14px;"><br></div><div class="protonmail_quote">
        ------- Original Message -------<br>
        On Friday, March 11th, 2022 at 3:25 PM, Daniel-Constantin Mierla <miconda@gmail.com> wrote:<br><br>
        <blockquote class="protonmail_quote" type="cite">

    <p>Indeed, the sipdump is not saving everything that comes in or
      goes out of kamailio, only the traffic that uses the functions for
      handling or sending sip traffic. http is mapped over sip
      internally, but ws pings are using directly lower api for tcp
      send.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <div class="moz-cite-prefix">On 11.03.22 10:34, Igor Olhovskiy
      wrote:<br>
    </div>
    <blockquote type="cite">

      <div dir="ltr">
        <div>Xuo,</div>
        <div><br>
        </div>
        <div>Can't say for Chrome Web Tools, but they most likely will
          filter these packets out as they are not part of "real
          traffic". I'd suggest you to do a capture directly on the wire
          with Wireshark or so.</div>
        <div><br>
        </div>
        <div>Same for Kamailio, I also don't expect em to be saved there
          for the same reason above.<br>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div class="gmail_attr" dir="ltr">пт, 11 мар. 2022 г. в 09:29,
          Xuo Guoto <<a class="moz-txt-link-freetext" href="mailto:xuoguoto@protonmail.com" rel="noreferrer nofollow noopener" target="_blank">xuoguoto@protonmail.com</a>>:<br>
        </div>
        <blockquote style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">
          <div style="font-family:arial;font-size:14px">Hi,</div>
          <div style="font-family:arial;font-size:14px"><br>
          </div>
          <div style="font-family:arial;font-size:14px">Yes, I
            understand that the SIP OPTIONS and websocket pings are
            different.</div>
          <div style="font-family:arial;font-size:14px"><br>
          </div>
          <div style="font-family:arial;font-size:14px">I check the ping
            using two methods. One at the client side using chrome
            developer tools. At the server side I use sipdump module to
            capture all traffic. <br>
          </div>
          <div style="font-family:arial;font-size:14px"><br>
          </div>
          <div style="font-family:arial;font-size:14px"><span>modparam("sipdump",
              "enable", 1)</span>
            <div><span>modparam("sipdump", "folder",
                "/var/log/kamailio/sip/")</span></div>
            <span></span></div>
          <div style="font-family:arial;font-size:14px"><br>
          </div>
          <div style="font-family:arial;font-size:14px">With this
            enabled, kamailio dumps all the traffic in a file for
            analysis. For example:</div>
          <div style="font-family:arial;font-size:14px"><br>
          </div>
          <div style="font-family:arial;font-size:14px"><span>tag: rcv</span>
            <div><span>pid: 1553531</span></div>
            <div><span>process: 16</span></div>
            <div><span>time: 1646982958.357033</span></div>
            <div><span>date: Fri Mar 11 12:45:58 2022</span></div>
            <div><span>proto: tls ipv4</span></div>
            <div><span>srcip: x9.xx.196.11</span></div>
            <div><span>srcport: 54640</span></div>
            <div><span>dstip: 1x8.xx.59.172</span></div>
            <div><span>dstport: 443</span></div>
            <div><span>~~~~~~~~~~~~~~~~~~~~</span></div>
            <div><span>GET /ws HTTP/1.1</span></div>
            <div><span>Host: <a target="_blank" href="http://myhost-q01.mydomain.net" rel="noreferrer nofollow noopener">myhost-q01.mydomain.net</a></span></div>
            <div><span>Connection: Upgrade</span></div>
            <div><span>Pragma: no-cache</span></div>
            <div><span>Cache-Control: no-cache</span></div>
            <div><span>User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64;
                x64) AppleWebKit/537.36 (KHTML, like Gecko)
                Chrome/99.0.4844.51 Safari/537.3</span></div>
            <div><span>6 Edg/99.0.1150.36</span></div>
            <div><span>Upgrade: websocket</span></div>
            <div><span>Origin: <a class="moz-txt-link-freetext" target="_blank" href="https://myhost-adm.mydomain.net" rel="noreferrer nofollow noopener">https://myhost-adm.mydomain.net</a></span></div>
            <div><span>Sec-WebSocket-Version: 13</span></div>
            <span></span><snip></div>
          <div style="font-family:arial;font-size:14px"><br>
          </div>
          <div style="font-family:arial;font-size:14px">I expect the
            ping websockets to be printed here, but this is not the only
            place I am checking for. If pings are being sent, I should
            get to see it at chrome websocket also. In my case neither
            place shows any trace of websocket pings packets. <br>
          </div>
          <div style="font-family:arial;font-size:14px"><br>
          </div>
          <div style="font-family:arial;font-size:14px">X.<br>
          </div>
          <div style="font-family:arial;font-size:14px"><br>
          </div>
          <div style="font-family:arial;font-size:14px"><br>
          </div>
          <div style="font-family:arial;font-size:14px">
            <div> </div>
            <div> Sent with <a target="_blank" rel="noreferrer nofollow noopener" href="https://protonmail.com/">ProtonMail</a> secure email. </div>
          </div>
          <div style="font-family:arial;font-size:14px"><br>
          </div>
          <div> ------- Original Message -------<br>
            On Friday, March 11th, 2022 at 2:19 PM, Igor Olhovskiy <<a class="moz-txt-link-freetext" target="_blank" href="mailto:igorolhovskiy@gmail.com" rel="noreferrer nofollow noopener">igorolhovskiy@gmail.com</a>>
            wrote:<br>
            <br>
            <blockquote type="cite">
              <div dir="ltr">
                <div>Xuo,</div>
                <div><br>
                </div>
                <div>How do you capture this traffic? WebSocket pings is
                  not an ordinary "SIP-style OPTIONS" pings, It's
                  packets described in RFC6455 - <a class="moz-txt-link-freetext" target="_blank" rel="noreferrer nofollow noopener" href="https://datatracker.ietf.org/doc/html/rfc6455#section-5.5.2">https://datatracker.ietf.org/doc/html/rfc6455#section-5.5.2</a></div>
              </div>
              <br>
              <div class="gmail_quote">
                <div dir="ltr" class="gmail_attr">чт, 10 мар. 2022 г. в
                  16:57, Xuo Guoto <<a class="moz-txt-link-freetext" target="_blank" rel="noreferrer nofollow noopener" href="mailto:xuoguoto@protonmail.com">xuoguoto@protonmail.com</a>>:<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 style="font-family:arial;font-size:14px;color:rgb(34,34,34)">Hello
                    list,</div>
                  <div style="font-family:arial;font-size:14px;color:rgb(34,34,34)"><br>
                  </div>
                  <div style="font-family:arial;font-size:14px;color:rgb(34,34,34)">I
                    have kamailio <span>5.5.3 (x86_64/linux)</span>
                    configured as an SBC in front of asterisk to front
                    end webrtc clients. Browser clients running <span>JsSIP
                      3.7.0</span> connect to kamailio via webrtc and
                    kamailio sends the traffic back to asterisk using
                    SIP. rtpengine is configured to relay the RTP
                    packets.</div>
                  <div style="font-family:arial;font-size:14px;color:rgb(34,34,34)"><br>
                  </div>
                  <div style="font-family:arial;font-size:14px;color:rgb(34,34,34)">I
                    need to send websocket pings every 10 seconds to the
                    browser clients.<br>
                  </div>
                  <div style="font-family:arial;font-size:14px;color:rgb(34,34,34)"><br>
                  </div>
                  <div style="font-family:arial;font-size:14px;color:rgb(34,34,34)">I
                    have the following config in kamailio:</div>
                  <div style="font-family:arial;font-size:14px;color:rgb(34,34,34)"><br>
                  </div>
                  <div style="font-family:arial;font-size:14px;color:rgb(34,34,34)"><span></span><span></span><span>modparam("websocket",
                      "keepalive_mechanism", 1)</span>
                    <div><span>modparam("websocket",
                        "keepalive_timeout", 10)</span></div>
                    <div><span>modparam("websocket",
                        "keepalive_interval", 2)</span></div>
                    <div><span>modparam("websocket",
                        "keepalive_processes", 2)</span></div>
                    <div><span>modparam("websocket", "verbose_list", 1)</span></div>
                    <span></span></div>
                  <br>
                  <div style="font-family:arial;font-size:14px;color:rgb(34,34,34)">If
                    my understanding of the documentation is correct, I
                    do not need to do any additional configuration. <br>
                  </div>
                  <div style="font-family:arial;font-size:14px;color:rgb(34,34,34)"><br>
                  </div>
                  <div style="font-family:arial;font-size:14px;color:rgb(34,34,34)">But
                    looking at the websocket traffic, I do not see any
                    ping packets in websocket. I am also using sipdump
                    module to capture all packets sent and received by
                    kamailio and the ping packets are not visible there
                    either.</div>
                  <div style="font-family:arial;font-size:14px;color:rgb(34,34,34)"><br>
                  </div>
                  <div style="font-family:arial;font-size:14px;color:rgb(34,34,34)">What
                    could be wrong here? Do I need to do any additional
                    config? <br>
                  </div>
                  <div style="font-family:arial;font-size:14px;color:rgb(34,34,34)"><br>
                  </div>
                  <div style="font-family:arial;font-size:14px;color:rgb(34,34,34)">Thanks
                    for every help!</div>
                  <div style="font-family:arial;font-size:14px;color:rgb(34,34,34)"><br>
                  </div>
                  <div style="font-family:arial;font-size:14px;color:rgb(34,34,34)">X.<br>
                  </div>
__________________________________________________________<br>
                  Kamailio - Users Mailing List - Non Commercial
                  Discussions<br>
                  * <a class="moz-txt-link-freetext" target="_blank" rel="noreferrer nofollow noopener" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a><br>
                  Important: keep the mailing list in the recipients, do
                  not reply only to the sender!<br>
                  Edit mailing list options or unsubscribe:<br>
                  * <a class="moz-txt-link-freetext" target="_blank" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer nofollow noopener">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
                </blockquote>
              </div>
              <br clear="all">
              <br>
              -- <br>
              <div dir="ltr">
                <div dir="ltr">Best regards,
                  <div>Igor</div>
                </div>
              </div>
            </blockquote>
            <br>
          </div>
          __________________________________________________________<br>
          Kamailio - Users Mailing List - Non Commercial Discussions<br>
            * <a class="moz-txt-link-freetext" target="_blank" href="mailto:sr-users@lists.kamailio.org" rel="noreferrer nofollow noopener">sr-users@lists.kamailio.org</a><br>
          Important: keep the mailing list in the recipients, do not
          reply only to the sender!<br>
          Edit mailing list options or unsubscribe:<br>
            * <a class="moz-txt-link-freetext" target="_blank" rel="noreferrer nofollow noopener" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
        </blockquote>
      </div>
      <br clear="all">
      <br>
      -- <br>
      <div class="gmail_signature" dir="ltr">
        <div dir="ltr">Best regards,
          <div>Igor</div>
        </div>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
  * <a href="mailto:sr-users@lists.kamailio.org" class="moz-txt-link-abbreviated" rel="noreferrer nofollow noopener" target="_blank">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 href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" class="moz-txt-link-freetext" rel="noreferrer nofollow noopener" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <pre cols="72" class="moz-signature">--
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" class="moz-txt-link-abbreviated" rel="noreferrer nofollow noopener" target="_blank">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" class="moz-txt-link-abbreviated" rel="noreferrer nofollow noopener" target="_blank">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" class="moz-txt-link-abbreviated" rel="noreferrer nofollow noopener" target="_blank">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - Online
  March 28-31, 2022 (Europe Timezone)
  * <a href="https://www.asipto.com/sw/kamailio-advanced-training-online/" class="moz-txt-link-freetext" rel="noreferrer nofollow noopener" target="_blank">https://www.asipto.com/sw/kamailio-advanced-training-online/</a></pre>



        </blockquote><br>
    </div>