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:
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 ?
______________________________**_________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/**cgi-bin/mailman/listinfo/sr-**usershttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hello, Thanks for a quick reply.
No, outbound module is not loaded. As I understood from RR docs double_rr won't work if outbound module is present. I've added mhomed=1 to my config, but record_route() still inserts only one rr with transport=ws.
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 mailto:vitalik.voip@gmail.com> wrote:
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 ? _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Peter Dunkley Technical Director Crocodile RCS Ltd
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
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, Thanks for a quick reply.
No, outbound module is not loaded. As I understood from RR docs double_rr won't work if outbound module is present. I've added mhomed=1 to my config, but record_route() still inserts only one rr with transport=ws.
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.comwrote:
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 ?
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Peter Dunkley Technical Director Crocodile RCS Ltd
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
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:
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 mailto:vitalik.voip@gmail.com> wrote:
Hello, Thanks for a quick reply. No, outbound module is not loaded. As I understood from RR docs double_rr won't work if outbound module is present. I've added mhomed=1 to my config, but record_route() still inserts only one rr with transport=ws.
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 <mailto:vitalik.voip@gmail.com>> wrote: 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 ? _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users -- Peter Dunkley Technical Director Crocodile RCS Ltd _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Peter Dunkley Technical Director Crocodile RCS Ltd
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
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
Hello,
That's it ! I've connected the phone using udp as transport and kamailio added two record route headers.
Hello,
On 7/31/13 2:27 PM, Vitaliy Aleksandrov 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
Hello,
That's it ! I've connected the phone using udp as transport and kamailio added two record route headers.
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
On 07/31/2013 06:03 PM, Vitaliy Aleksandrov wrote:
On 07/31/2013 04:18 PM, Vitaliy Aleksandrov wrote:
It works. Thanks a lot.
I'm going to test this with the latest master branch as Peter Dunkley proposed. Should I add this issue to Jira if this "behaviour" is not fixed in the master ?
I meant http://sip-router.org/tracker/
Ok, I will try rr module from 4.0 branch and if it won't help from master branch.
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