<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <font face="monospace">Hi Jason,<br>
      <br>
      In transactional stateful SIP, the CANCEL requests are hop by hop
      - each hop in the path is generating its own CANCEL requests to
      the next hop, which consumes it; there is no actual relaying of
      the CANCELs. So, the replacing (which works in relaying mode only)
      doesn't fit here.<br>
      <br>
      Even more, the RFC3261 gives a rigorous way for building the
      CANCEL requests, they are to be built 100% based on the INVITE
      request only (nothing more). OpenSIPS internally builds the CANCEL
      in accordance to the corresponding INVITE, so you should not need
      any such changes.<br>
      <br>
      May you detail why you think you need this FROM replacement?<br>
      <br>
      Regards, <br>
    </font>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
  <a class="moz-txt-link-freetext" href="https://www.siphub.com">https://www.siphub.com</a></pre>
    <div class="moz-cite-prefix">On 20.12.2023 12:38, nz deals wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CALOQYivKCFZYHHxE_TxUyD4dM22BSPA6Y6h_ORzZxh9UK52t_g@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">Hi,
        <div>I've been attempting to modify the From header in the
          CANCEL, but it seems the changes aren't taking effect. I've
          also experimented with remove_hf and append_hf, but
          unfortunately, these methods didn't work either. Could someone
          kindly offer suggestions if I might be overlooking something?<br>
        </div>
        <div><br>
        </div>
        <div>This is in the main request route </div>
        <div><br>
        </div>
                if (is_method("CANCEL")) {<br>
                        uac_replace_from("","<a
          href="mailto:sip%3Atest@test.com" moz-do-not-send="true">sip:test@test.com</a>");<br>
                        if (t_check_trans())<br>
                                t_relay(8);<br>
                        exit;<br>
                }<br>
        <div> 
          <div><br>
          </div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div>
            <div>Regards,</div>
            <div>Jason</div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>