<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body>
<div dir="auto">Hi,</div>
<div dir="auto"><br>
</div>
<div dir="auto">I'm encountering an issue with removing an Identity header in OpenSIPS 3.4. Here’s the situation:</div>
<div dir="auto"><br>
</div>
<div dir="auto">1. An incoming call with an Identity header is received.</div>
<div dir="auto">2. I perform a `stir_shaken_verify()` and remove the Identity header in a request route.</div>
<div dir="auto">3. The call is forwarded to an upstream server, but it fails.</div>
<div dir="auto">4. In the `failure_route`, I need to forward the call to a PSTN number. </div>
<div dir="auto"><br>
</div>
<div dir="auto">5. Before sending the call to the PSTN (in compliance with French STIR/SHAKEN regulations), I need to sign it with my certificate.</div>
<div dir="auto"><br>
</div>
<div dir="auto">However, when I call `stir_shaken_auth()`, I receive an error -2 indicating that the Identity header already exists. Despite running `remove_hf(identity)` before calling this function, the header isn't removed, and `$hdr(identity)` still returns
the initial value of the Identity header.</div>
<div dir="auto"><br>
</div>
<div dir="auto">What is the best way to remove the existing Identity header and re-sign the call?</div>
<div dir="auto"><br>
</div>
<div dir="auto">Thank you,</div>
<div dir="auto">Srigo</div>
</body>
</html>