[sr-dev] [kamailio/kamailio] usrloc keepalive does not work for TLS connections (Issue #3178)

abrezinsky notifications at github.com
Sat Jul 9 16:16:01 CEST 2022


> According to the OPTIONS message above, Kamailio tries to use UDP transport for "sips" schema. 

I started debugging parse_uri() first and couldn't see any place where the proto was set to TLS (or TCP) when the schema was sips.  Given how widely used parse_uri() is, I felt that change might be very disruptive without the feedback of more experienced people.

The only place in parse_uri() the proto is changed is based on the transport.  

https://github.com/kamailio/kamailio/blob/a466d0b73a66b18419555eca437136f1bcaebff9/src/core/parser/parse_uri.c#L743

Ultimately, it seems like parse_uri() is wrong based on RFC3261.  Detecting 'sips' and setting proto to TLS would work for TLS connections.  This bug would still exist for TCP connections if the transport is missing.

> Another approach, as a workaround, update the Contac header and add "transport=tcp" when using "sips" schema.

I agree, I can work around part of the problem in the config.  Not setting the tcpconn_id is still a problem for reusing the connection.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3178#issuecomment-1179551952
You are receiving this because you are subscribed to this thread.

Message ID: <kamailio/kamailio/issues/3178/1179551952 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20220709/5768d313/attachment.htm>


More information about the sr-dev mailing list