<html><body><div id="edo-message"><div></div>Websockets are primarily web connections which are upgraded from HTTP (at transport layer). So you CAN authenticate them like regular HTTP connections before upgrade OR do authentication after upgrade using websocket sub-protocol specific implementation, e.g. SIP REGISTER or MSRP AUTH, etc. (Notice SIP and MSRP are sub-protocols here, you can write your own session level sub-protocol as well).</div><div id="edo-meta"></div><div id="edo-original"><div><br></div><div>See the sample implementation provided in websocket module at,</div><div><br></div><div><a href="https://kamailio.org/docs/modules/5.2.x/modules/websocket.html#idm1019420836">https://kamailio.org/docs/modules/5.2.x/modules/websocket.html#idm1019420836</a><br><br>Hope this helps.</div><div><br></div><div>Thank you.<br><br><br><blockquote type="cite" style="margin:1ex 0 0 0;border-left:1px #ccc solid;padding-left:0.5ex;"><div>On Jun 12, 2019 at 1:56 PM, <<a href="mailto:fatih.orhan@verimor.com.tr">Fatih ORHAN</a>> wrote:<br><br></div><div><div dir="ltr">Hello,<div><br></div><div>Websocket is a transport layer, you don't authenticate the client when establishing a websocket connection (just like you don't do authentication when establishing a UDP or TCP connection). You establish a websocket connection first, then do authentication when client sends a  REGISTER or INVITE message.</div><div><br></div><div>If you didn't setup UDP SIP messaging, I recommend doing that first to get a feeling for how to configure kamailio. You can add websocket later.</div><div><br></div><div>Hope this helps.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Grant Bagdasarian <<a href="mailto:grantbagdasarian@gmail.com">grantbagdasarian@gmail.com</a>>, 23 Nis 2019 Sal, 23:04 tarihinde şunu yazdı:<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 dir="ltr">Hello,<div><br></div><div>I was wondering if there are any best practices for authenticating websocket connection establishment inside the xhttp event route? </div><div><br></div><div>Thanks and regards,</div><div><br></div><div>Grant</div></div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><span style="color:rgb(136,136,136);font-size:12.8px">-- </span><br style="color:rgb(136,136,136);font-size:12.8px"><div style="color:rgb(136,136,136);font-size:12.8px"><div dir="ltr"><p><span style="color:rgb(38,38,38);font-family:"Segoe UI",sans-serif;font-size:9pt">Saygılarımla / Regards,</span><br></p><p><b><span style="font-size:9pt;font-family:"Segoe UI",sans-serif;color:rgb(255,51,0)">Fatih Orhan</span></b><b><span style="font-size:9pt;font-family:"Segoe UI",sans-serif;color:rgb(229,72,9)"><br></span></b><span style="font-size:9pt;font-family:"Segoe UI",sans-serif;color:rgb(23,23,23)">Yazılım Mühendisi<br><i>Software Engineer</i></span></p><p><i><span style="font-size:9pt"><font color="#171717" face="Segoe UI, sans-serif">Verimor Telekomünikasyon A.Ş.<br></font></span></i><i><span style="font-size:9pt"><a href="http://www.verimor.com.tr/" style="color:red;font-family:"Segoe UI",sans-serif" target="_blank">www.verimor.com.tr</a><font face="Segoe UI, sans-serif"><br></font></span></i><i><span style="font-size:9pt;font-family:"Segoe UI",sans-serif">0850 532 0000</span></i></p></div></div></div></div></div></div>
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
</div></blockquote></div></div></body></html>