<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On 30 September 2013 17:14, Vitaliy Aleksandrov <span dir="ltr"><<a href="mailto:vitalik.voip@gmail.com" target="_blank">vitalik.voip@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Could you please share why nathelper aggregates both WS and WSS transports to "ws" and then msg_translator have to detect the type of a connection to a destination to build correct via ?<br>
<br>
modules/nathelper/nathelper.c create_rcv_uri() function :<br>
        case PROTO_WS:<br>
        case PROTO_WSS:<br>
                proto.s = "WS";<br>
                proto.len = 2;<br>
                break;<div class="HOEnZb"><div class="h5"><br></div></div></blockquote><div><br></div><div>Because when the transport is WS (WebSockets over TCP) the URI has a transport parameter like this ";transport=ws" and when the transport is WSS (Secure WebSockets over TLS over TCP) the URI has a transport parameter like this ";transport=ws".  In other words, the transport parameter is the same for both and you need to make the determination within Kamailio core by checking how the specified socket is actually used.</div>
</div><div><br></div>-- <br><div dir="ltr"><div><font face="courier new, monospace">Peter Dunkley</font></div><div><font face="courier new, monospace">Technical Director</font></div><div><font face="courier new, monospace">Crocodile RCS Ltd</font></div>
</div>
</div></div>