I think I hijacked a thread when I posted this previously. Sorry &#39;bout that.<br><br>The issue we are having is where Kamailio relays an INVITE with the correct To header field domain, however when it relays the subsequent CANCEL it seems like it does not correctly change the To header field domain.<br>
<br>Here is what we use to try and put in the correct To header in the CANCEL:<br><br>                  remove_hf(&quot;To&quot;);<br>                   if ($tt == null)<br>                       insert_hf(&quot;To: &lt;sip:$<a href="mailto:rU@1.2.3.4">rU@1.2.3.4</a>&gt;\r\n&quot;, &quot;From&quot;);<br>
                   else<br>                       insert_hf(&quot;To: &lt;sip:$<a href="mailto:rU@1.2.3.4">rU@1.2.3.4</a>&gt;;tag=$tt\r\n&quot;, &quot;From&quot;);<br>                   xlog(&quot;DBG1: Trying to fix CANCEL: td=$td ci=$ci rm=$rm ru=$ru ou=$ou\n&quot;);<br>
<br>Changes to the left side of the at-symbol persist, however changes to the domain are reverted and changed back to what was received from adjacent proxy.<br><br>Any ideas why it reverts?<br>