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, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <kamailio/kamailio/issues/3178/1179551952@github.com>