<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" rel="noreferrer nofollow noopener" href="http://myhost-q01.mydomain.net">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 target="_blank" rel="noreferrer nofollow noopener" href="https://myhost-adm.mydomain.net">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 class="protonmail_signature_block" style="font-family: arial; font-size: 14px;">
    <div class="protonmail_signature_block-user protonmail_signature_block-empty">

            </div>

            <div class="protonmail_signature_block-proton">
        Sent with <a target="_blank" href="https://protonmail.com/" rel="noopener noreferrer">ProtonMail</a> secure email.
    </div>
</div>
<div style="font-family: arial; font-size: 14px;"><br></div><div class="protonmail_quote">
        ------- Original Message -------<br>
        On Friday, March 11th, 2022 at 2:19 PM, Igor Olhovskiy <igorolhovskiy@gmail.com> wrote:<br><br>
        <blockquote class="protonmail_quote" 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 href="https://datatracker.ietf.org/doc/html/rfc6455#section-5.5.2" rel="noreferrer nofollow noopener" target="_blank">https://datatracker.ietf.org/doc/html/rfc6455#section-5.5.2</a></div></div><br><div class="gmail_quote"><div class="gmail_attr" dir="ltr">чт, 10 мар. 2022 г. в 16:57, Xuo Guoto <<a 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;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 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 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>

        </blockquote><br>
    </div>