<p>Kamailio msrp module handles the From-Path and To-Path.</p>
<p>For the sdp in the invite, you can try to add new msrp url with subst/replace functions from textops/textops module, or use some embedded scripting like python or lua if you need more complex operations, then there are functions to delete/set the body. Of course, if someone wants to add a function in the C code for it, I am fine to merge an eventual pull request.</p>
<p>Still my quick guess is that it is the job of UA to set all the msrp URLs there, otherwise it may not build correctly the From-Path and To-Path. But again I am fine if there is a use case for inserting additional msrp relays out of UAs control. Given that MSRP relay is more like a TURN server, the specs likely didn't allow interfering with the selected relay path by UAs for security/privacy reasons.</p>
<p>For sure the MSRP relay next to the end-point has to be set by the UA, otherwise the MSRP relay cannot connect to the endpoint via tcp/tls, especially for natted devices.</p>
<p>If there are no further comments that point to specs that say a msrp relay can be inserted by a middle node, then this item is going to be closed soon. A pull request can be made at any time.</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/issues/2186?email_source=notifications&email_token=ABO7UZMMKHXCZLPW6FQJZZDQ4OFD5A5CNFSM4J7FNIYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIGTUNY#issuecomment-571292215">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZKD46CJAKCHAS2EYTLQ4OFD5ANCNFSM4J7FNIYA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZMDJDPPWSU2JG7BPSDQ4OFD5A5CNFSM4J7FNIYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIGTUNY.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/2186?email_source=notifications\u0026email_token=ABO7UZMMKHXCZLPW6FQJZZDQ4OFD5A5CNFSM4J7FNIYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIGTUNY#issuecomment-571292215",
"url": "https://github.com/kamailio/kamailio/issues/2186?email_source=notifications\u0026email_token=ABO7UZMMKHXCZLPW6FQJZZDQ4OFD5A5CNFSM4J7FNIYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIGTUNY#issuecomment-571292215",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>