<p>i see it as a bug since <code>tosocket</code> is using <code>msg</code> to determine the transport instead of parsed uri from input, try to run it in a timer route and you'll see but i guess that it will also give wrong result if you receive a <code>udp</code> message and then try to apply the transform to "sip:xxx@yyy;transport=tcp". as for the backport, i think this is in 5.2 but not 5.1.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/pull/1882#issuecomment-470771629">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZZQwVFrIBGbP3Sa1EXRNPOrFN0bEks5vUcBigaJpZM4beWrX">mute the thread</a>.<img src="https://github.com/notifications/beacon/AF36Zf4CO0fRJwJ3Yad7cWGtxDz83dV8ks5vUcBigaJpZM4beWrX.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"PERSON","message":"@lazedo in #1882: i see it as a bug since `tosocket` is using `msg` to determine the transport instead of parsed uri from input, try to run it in a timer route and you'll see but i guess that it will also give wrong result if you receive a `udp` message and then try to apply the transform to \"sip:xxx@yyy;transport=tcp\". as for the backport, i think this is in 5.2 but not 5.1."}],"action":{"name":"View Pull Request","url":"https://github.com/kamailio/kamailio/pull/1882#issuecomment-470771629"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/pull/1882#issuecomment-470771629",
"url": "https://github.com/kamailio/kamailio/pull/1882#issuecomment-470771629",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>