<p></p>
<p>Hello Daniel!<br>
Thanks for your prompt reply, greatly appreciated!<br>
I can confirm that your solution works, but with a slight modification to the <code>record_route()</code> function to get rid of the error:</p>
<pre><code>ERROR: <core> [core/msg_translator.c:3355]: sip_msg_apply_changes(): cannot apply msg changes after adding record-route header - it breaks conditional 2nd header
</code></pre>
<p>The solution of storing the <code>Identity</code> header in a separate variable and using it with the <code>append_to_reply()</code> function is the perfect solution for me, so I'll be looking forward to the implementation.</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/2770#issuecomment-857641603">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZK3DPBAOA5QY6JIL6LTR5LCFANCNFSM46LZXTSQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZITWY3QXREXFQLRXI3TR5LCFA5CNFSM46LZXTS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGMPJFAY.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/2770#issuecomment-857641603",
"url": "https://github.com/kamailio/kamailio/issues/2770#issuecomment-857641603",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>