<p></p>

<h3>Description</h3>
<p>I'm unable to add the generated <code>Identity</code> value to reply message when <code>kamailio</code> acts as a redirect server and replies with <code>302 Moved Temporarily</code> instead of relaying <code>INVITE</code>.<br>
This code doesn't work, i.e. no <code>Identity</code> header in <code>302 Moved Temporarily</code> message:</p>
<pre><code>if (stirshaken_add_identity($var(x5u), $var(attest), $var(origtn_val), $var(desttn_val), $var(origid)) == 1)
{
        append_branch("sip:$rU@127.0.0.1:6060");
        sl_send_reply("302", "Moved Temporarily");
        exit;
}
</code></pre>
<h3>Expected behavior</h3>
<p>It would be nice if the <code>stirshaken_add_identity_*</code> functions would add the generated <code>Identity</code> header to the reply messages too, or store the generated <code>Identity</code> header in a separate variable, like <code>$identity</code>, for the future processing.</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">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZN6SLZN2C6HGRLNME3TR5DGZANCNFSM46LZXTSQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZPH2NUKZZBWFPMMPITTR5DGZA5CNFSM46LZXTS2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4NU2GXOA.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",
"url": "https://github.com/kamailio/kamailio/issues/2770",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>