Hello.
I'm trying to configure kamailio as a gateway between Websocket and TCP/TLS transports.
When I call record_route() for an initial INVITE that comes via WS and will be forwarded via TCP to a registered UA kamailio inserts only a one record-route header with its IP and transport=ws instead of two record-route headers with both incoming/outgoing transports.
This behaviour breaks in-dialog requests routing.
rr module parameters are: modparam("rr", "enable_full_lr", 1) modparam("rr", "append_fromtag", 0) modparam("rr", "enable_double_rr", 1)
I use: - kamailio-4.0.2 - sipml5 as sip client
Can anybody point me in the right direction to understand why it happens ?
Are you using outbound? If you are I suggest trying git master rather than the 4.0 branch.
Regards,
Peter
On 31 July 2013 10:53, Vitaliy Aleksandrov vitalik.voip@gmail.com wrote:
Have you tried the latest code on the 4.0 branch as I am sure there are fixes that have been made since the last release?
Also, if using WebSockets I do strongly recommend you try Git master if you have any problems. There may well be fixes there that haven't been back-ported to the 4.0 branch yet.
Regards,
Peter
On 31 July 2013 11:56, Vitaliy Aleksandrov vitalik.voip@gmail.com wrote:
Hello,
does it add two record route headers when calling to an UDP destination? IIRC, the condition for double route is that incoming socket is different than outgoing socket and I am not sure if Peter updated it to detect a different sub-protocol type (as ws/wss are on top of tcp/tls).
Cheers, Daniel
On 7/31/13 1:21 PM, Peter Dunkley wrote:
Hello,
On 7/31/13 2:27 PM, Vitaliy Aleksandrov wrote:
ok, so that condition with sockets for record routing has to be revised for this case. What you can do for the moment (and what most of us probably did that they didn't discover this issue) is to use a different port just for websocket connections, for example 8080 for ws and 8443 for wss:
listen=tcp:x.y.z.w:8080 listen=tls:x.y.z.w:8443
You can use restrictions like:
if(dst_port==8080 && !nat_uac_test("64")) { send_reply("403", "Only WS allowed on port 8080"); exit; }
Cheers, Daniel