<p></p>
<blockquote>
<p dir="auto">According to the OPTIONS message above, Kamailio tries to use UDP transport for "sips" schema.</p>
</blockquote>
<p dir="auto">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.</p>
<p dir="auto">The only place in parse_uri() the proto is changed is based on the transport.</p>
<p dir="auto"><a href="https://github.com/kamailio/kamailio/blob/a466d0b73a66b18419555eca437136f1bcaebff9/src/core/parser/parse_uri.c#L743">https://github.com/kamailio/kamailio/blob/a466d0b73a66b18419555eca437136f1bcaebff9/src/core/parser/parse_uri.c#L743</a></p>
<p dir="auto">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.</p>
<blockquote>
<p dir="auto">Another approach, as a workaround, update the Contac header and add "transport=tcp" when using "sips" schema.</p>
</blockquote>
<p dir="auto">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.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/3178#issuecomment-1179551952">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZOOBTFXWEQ5QNQ4VFTVTGCSDANCNFSM53CLIALQ">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/ABO7UZK634NN4PAPDKEJB6TVTGCSDA5CNFSM53CLIAL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOIZHIRUA.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><kamailio/kamailio/issues/3178/1179551952</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/3178#issuecomment-1179551952",
"url": "https://github.com/kamailio/kamailio/issues/3178#issuecomment-1179551952",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>