<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">The issue we are having is where Kamailio relays an INVITE with&nbsp;the correct To header field domain, however when it relays the subsequent CANCEL&nbsp;it seems like it does not correctly change the To header field domain.<div><br></div><div>Here is what we use to try and put in the correct To header in the CANCEL:</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;remove_hf("To");<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if ($tt == null)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;insert_hf("To: &lt;<a href="sip:$rU@1.2.3.4">sip:$rU@1.2.3.4</a>>\r\n", "From");<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;insert_hf("To: &lt;<a href="sip:$rU@1.2.3.4">sip:$rU@1.2.3.4</a>>;tag=$tt\r\n", "From");<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xlog("DBG1: Trying to fix CANCEL: td=$td ci=$ci&nbsp;rm=$rm ru=$ru ou=$ou\n");<br><br>Changes to the left side of the at-symbol persist, however changes to&nbsp;the domain are reverted and changed back to what was received from adjacent proxy.</div><div><br></div><div>Any ideas why it reverts?</div></body></html>