For secure websocket connections (wss), Kamailio seems to forget that the connection is secure, later trying to use a regular TCP listen
option to send out messags.
I'd be happy to propose a patch, but I'm not sure what the expected behavior of Kamailio would be here.
Setup:
We have traced the issue:
REGISTER
over secure websockets
Path: <sip:kamailio1:port1;lr;received=sip:1.1.1.1:11111%3Btransport%3Dws>
registrar.store
received = sip:1.1.1.1:11111;transport=ws
Route:
with option transport=ws
t_relay
get_send_socket2
, with parameter proto = ws
sendipv4_tcp
as send_sock
Record-Route
header, causing issues in the SIP dialog later onReproducing from scratch requires quite some setup, hopefully the above information will be enough to diagnose.
See above.
See above.
See above, can provide exact SIP traces if required.
We have been able to work around the issue like this:
if (pcre_match("$(hdr(Route)[0]{nameaddr.uri}{uri.param,received})", "%3Btransport%3Dws")) {
# Kamailio bug?
# in the received parameter of the route header, there is ';transport=ws'
# so kamailio starts looking for a *tcp* connection, while it should be looking for a *tls*
# connection.
xlog("L_NOTICE", "Websocket detected; forcing wss transport");
set_send_socket("tls:WEBSOCKET_IP:WEBSOCKET_PORT");
}
kamailio -v
Tested with 5.4.4, but code doesn't seem to be changed in master.
Ubuntu Focal.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.