<p></p>
<p>Making it available on a variable seems to offer more flexibility, then append_to_reply() can be used for your specific case.</p>
<p>With the current version, if the sip transaction is not created yet (which I assume is not, because of stateless reply with sl_send_reply()), you can try:</p>
<pre><code>if (stirshaken_add_identity($var(x5u), $var(attest), $var(origtn_val), $var(desttn_val), $var(origid)))
{
         msg_apply_changes();
         append_to_reply("Identity: $hdr(Identity)\r\n");
        append_branch("sip:$rU@127.0.0.1:6060");
        sl_send_reply("302", "Moved Temporarily");
        exit;
}
</code></pre>

<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-857609867">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZNKL2P3MZ3KPAKZ2YDTR5EWTANCNFSM46LZXTSQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZJMDE45ABHRCU2S4A3TR5EWTA5CNFSM46LZXTS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGMPBNCY.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-857609867",
"url": "https://github.com/kamailio/kamailio/issues/2770#issuecomment-857609867",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>