<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body>
    <p>Hello,</p>
    <p><br>
    </p>
    <p>do you have reparse invite modparam for tm set?</p>
    <p><br>
    </p>
    <p>The Contact header should not be added to locally generated
      cancel requests as I could see on a quick check over the code in
      master branch (but I do not recall changes in this part for many
      years). Maybe you can grab the pcap/ngrep output with sip traffic
      for such case to see if we can spot any leads about what happens
      there.</p>
    <p><br>
    </p>
    <p>Cheers,<br>
      Daniel</p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 29.09.20 02:54, Lars Olsson wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:HE1PR0102MB266888316CB455CDFB54A0F7E0320@HE1PR0102MB2668.eurprd01.prod.exchangelabs.com">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;}</style>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0);">
        Hi</div>
      <div id="Signature">
        <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
          font-size:12pt; color:rgb(0,0,0)">
          <p style="margin:0cm 0cm 0.0001pt; font-size:11pt;
            font-family:Calibri,sans-serif; color:rgb(32,31,30);
            text-align:start; background-color:rgb(255,255,255)">
             </p>
          <p style="margin:0cm 0cm 0.0001pt; font-size:11pt;
            font-family:Calibri,sans-serif; color:rgb(32,31,30);
            text-align:start; background-color:rgb(255,255,255)">
            A follow up question on a almost one year old case.</p>
          <p style="margin:0cm 0cm 0.0001pt; font-size:11pt;
            font-family:Calibri,sans-serif; color:rgb(32,31,30);
            text-align:start; background-color:rgb(255,255,255)">
            <br>
          </p>
          <p style="margin:0cm 0cm 0.0001pt; font-size:11pt;
            font-family:Calibri,sans-serif; color:rgb(32,31,30);
            text-align:start; background-color:rgb(255,255,255)">
            t_cancel_callid() is still working good.</p>
          <p style="margin:0cm 0cm 0.0001pt; font-size:11pt;
            font-family:Calibri,sans-serif; color:rgb(32,31,30);
            text-align:start; background-color:rgb(255,255,255)">
            <br>
          </p>
          <p style="margin:0cm 0cm 0.0001pt; font-size:11pt;
            font-family:Calibri,sans-serif; color:rgb(32,31,30);
            text-align:start; background-color:rgb(255,255,255)">
            However, a new calling scenario towards the same system just
            got me another issue. </p>
          <p style="margin:0cm 0cm 0.0001pt; font-size:11pt;
            font-family:Calibri,sans-serif; color:rgb(32,31,30);
            text-align:start; background-color:rgb(255,255,255)">
            <br>
          </p>
          <p style="margin:0cm 0cm 0.0001pt; font-size:11pt;
            font-family:Calibri,sans-serif; color:rgb(32,31,30);
            text-align:start; background-color:rgb(255,255,255)">
            The Cancel request generated by <span style="caret-color:
              rgb(32, 31, 30); font-family: Calibri, sans-serif;
              background-color: rgb(255, 255, 255); display: inline
              !important">t_cancel_callid()<span
                class="Apple-converted-space"> is not accepted by this
                old legacy system.</span></span></p>
          <p style="margin:0cm 0cm 0.0001pt; font-size:11pt;
            font-family:Calibri,sans-serif; color:rgb(32,31,30);
            text-align:start; background-color:rgb(255,255,255)">
            <span style="caret-color: rgb(32, 31, 30); font-family:
              Calibri, sans-serif; background-color: rgb(255, 255, 255);
              display: inline !important"><span
                class="Apple-converted-space">I have not yet confirmed
                it, but it looks like the only difference form other
                Cancel request is that <span style="caret-color: rgb(32,
                  31, 30); font-family: Calibri, sans-serif;
                  background-color: rgb(255, 255, 255); display: inline
                  !important">t_cancel_callid() generates a Cancel with
                  a Contact header.</span></span></span></p>
          <p style="margin:0cm 0cm 0.0001pt; font-size:11pt;
            font-family:Calibri,sans-serif; color:rgb(32,31,30);
            text-align:start; background-color:rgb(255,255,255)">
            <span style="caret-color: rgb(32, 31, 30); font-family:
              Calibri, sans-serif; background-color: rgb(255, 255, 255);
              display: inline !important"><span
                class="Apple-converted-space"><span style="caret-color:
                  rgb(32, 31, 30); font-family: Calibri, sans-serif;
                  background-color: rgb(255, 255, 255); display: inline
                  !important"><br>
                </span></span></span></p>
          <p style="margin:0cm 0cm 0.0001pt; font-size:11pt;
            font-family:Calibri,sans-serif; color:rgb(32,31,30);
            text-align:start; background-color:rgb(255,255,255)">
            <span style="caret-color: rgb(32, 31, 30); font-family:
              Calibri, sans-serif; background-color: rgb(255, 255, 255);
              display: inline !important"><span
                class="Apple-converted-space"><span style="caret-color:
                  rgb(32, 31, 30); font-family: Calibri, sans-serif;
                  background-color: rgb(255, 255, 255); display: inline
                  !important">Should the Contact header really be inside
                  the Cancel request?</span></span></span></p>
          <p style="margin:0cm 0cm 0.0001pt; font-size:11pt;
            font-family:Calibri,sans-serif; color:rgb(32,31,30);
            text-align:start; background-color:rgb(255,255,255)">
            <span style="caret-color: rgb(32, 31, 30); font-family:
              Calibri, sans-serif; background-color: rgb(255, 255, 255);
              display: inline !important"><span
                class="Apple-converted-space"><span style="caret-color:
                  rgb(32, 31, 30); font-family: Calibri, sans-serif;
                  background-color: rgb(255, 255, 255); display: inline
                  !important">Is it possible to disable it?</span></span></span></p>
          <p style="margin:0cm 0cm 0.0001pt; font-size:11pt;
            font-family:Calibri,sans-serif; color:rgb(32,31,30);
            text-align:start; background-color:rgb(255,255,255)">
            <span style="caret-color: rgb(32, 31, 30); font-family:
              Calibri, sans-serif; background-color: rgb(255, 255, 255);
              display: inline !important"><span
                class="Apple-converted-space"><span style="caret-color:
                  rgb(32, 31, 30); font-family: Calibri, sans-serif;
                  background-color: rgb(255, 255, 255); display: inline
                  !important"><br>
                </span></span></span></p>
          <p style="margin:0cm 0cm 0.0001pt; font-size:11pt;
            font-family:Calibri,sans-serif; color:rgb(32,31,30);
            text-align:start; background-color:rgb(255,255,255)">
            Running Kamailio 5.3.6</p>
          <p style="margin:0cm 0cm 0.0001pt; font-size:11pt;
            font-family:Calibri,sans-serif; color:rgb(32,31,30);
            text-align:start; background-color:rgb(255,255,255)">
            <br>
          </p>
          <p style="margin:0cm 0cm 0.0001pt; font-size:11pt;
            font-family:Calibri,sans-serif; color:rgb(32,31,30);
            text-align:start; background-color:rgb(255,255,255)">
            Best Regards,</p>
          <p style="margin:0cm 0cm 0.0001pt; font-size:11pt;
            font-family:Calibri,sans-serif; color:rgb(32,31,30);
            text-align:start; background-color:rgb(255,255,255)">
            Lars</p>
          <p style="margin:0cm 0cm 0.0001pt; font-size:11pt;
            font-family:Calibri,sans-serif; color:rgb(32,31,30);
            text-align:start; background-color:rgb(255,255,255)">
            <span style="caret-color: rgb(32, 31, 30); font-family:
              Calibri, sans-serif; background-color: rgb(255, 255, 255);
              display: inline !important"><span
                class="Apple-converted-space"><span style="caret-color:
                  rgb(32, 31, 30); font-family: Calibri, sans-serif;
                  background-color: rgb(255, 255, 255); display: inline
                  !important"><br>
                </span></span></span></p>
        </div>
      </div>
      <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
        font-size:12pt; color:rgb(0,0,0)">
        <br>
      </div>
      <hr tabindex="-1" style="display:inline-block; width:98%">
      <div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt"
          face="Calibri, sans-serif" color="#000000"><b>From:</b> Lars
          Olsson <a class="moz-txt-link-rfc2396E" href="mailto:lars.olsson@optimobile.se"><lars.olsson@optimobile.se></a><br>
          <b>Sent:</b> Saturday, October 26, 2019 4:10 PM<br>
          <b>To:</b> Kamailio (SER) - Users Mailing List
          <a class="moz-txt-link-rfc2396E" href="mailto:sr-users@lists.kamailio.org"><sr-users@lists.kamailio.org></a>; <a class="moz-txt-link-abbreviated" href="mailto:miconda@gmail.com">miconda@gmail.com</a>
          <a class="moz-txt-link-rfc2396E" href="mailto:miconda@gmail.com"><miconda@gmail.com></a><br>
          <b>Subject:</b> Re: [SR-Users] Rewrite BYE to Cancel</font>
        <div> </div>
      </div>
      <div dir="ltr">
        <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
          font-size:12pt; color:rgb(0,0,0)">
          Hi all,</div>
        <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
          font-size:12pt; color:rgb(0,0,0)">
          <br>
        </div>
        <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
          font-size:12pt; color:rgb(0,0,0)">
          I just want to report back. </div>
        <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
          font-size:12pt; color:rgb(0,0,0)">
          Daniels suggestion worked great!</div>
        <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
          font-size:12pt; color:rgb(0,0,0)">
          Thanks a lot for your input.</div>
        <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
          font-size:12pt; color:rgb(0,0,0)">
          <br>
        </div>
        <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
          font-size:12pt; color:rgb(0,0,0)">
          On the "incorrect" BYE request, trigger a cancel for the
          INVITE with t_cancel_callid() using call-id and cseq of the
          INVITE request.  (Cseq was not the same on INVITE and BYE).<br>
          Then reply with 200 OK to the BYE message.</div>
        <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
          font-size:12pt; color:rgb(0,0,0)">
          <br>
        </div>
        <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
          font-size:12pt; color:rgb(0,0,0)">
          Cheers,</div>
        <div style="font-family:Calibri,Arial,Helvetica,sans-serif;
          font-size:12pt; color:rgb(0,0,0)">
          Lars</div>
        <hr tabindex="-1" style="display:inline-block; width:98%">
        <div id="x_divRplyFwdMsg" dir="ltr"><font style="font-size:11pt"
            face="Calibri, sans-serif" color="#000000"><b>From:</b>
            Daniel-Constantin Mierla <a class="moz-txt-link-rfc2396E" href="mailto:miconda@gmail.com"><miconda@gmail.com></a><br>
            <b>Sent:</b> Friday, October 25, 2019 1:32 PM<br>
            <b>To:</b> Lars Olsson <a class="moz-txt-link-rfc2396E" href="mailto:lars.olsson@optimobile.se"><lars.olsson@optimobile.se></a>;
            Kamailio (SER) - Users Mailing List
            <a class="moz-txt-link-rfc2396E" href="mailto:sr-users@lists.kamailio.org"><sr-users@lists.kamailio.org></a><br>
            <b>Subject:</b> Re: [SR-Users] Rewrite BYE to Cancel</font>
          <div> </div>
        </div>
        <div style="background-color:#FFFFFF">
          <p style="margin-top: 0px; margin-bottom: 0px;margin-top: 0px;
            margin-bottom: 0px;margin-top: 0px; margin-bottom:
            0px;margin-top: 0px; margin-bottom: 0px;">
            Run with debug=3 and see if you get other log messages from
            t_cancel_callid() execution.</p>
          <p style="margin-top: 0px; margin-bottom: 0px;margin-top: 0px;
            margin-bottom: 0px;margin-top: 0px; margin-bottom:
            0px;margin-top: 0px; margin-bottom: 0px;">
            <br>
          </p>
          <p style="margin-top: 0px; margin-bottom: 0px;margin-top: 0px;
            margin-bottom: 0px;margin-top: 0px; margin-bottom:
            0px;margin-top: 0px; margin-bottom: 0px;">
            Cheers,<br>
            Daniel</p>
          <p style="margin-top: 0px; margin-bottom: 0px;margin-top: 0px;
            margin-bottom: 0px;margin-top: 0px; margin-bottom:
            0px;margin-top: 0px; margin-bottom: 0px;">
            <br>
          </p>
          <div class="x_x_moz-cite-prefix">On 25.10.19 13:09, Lars
            Olsson wrote:<br>
          </div>
          <blockquote type="cite">
            <div>Sorry for forgetting to that result:</div>
            <div>ERROR: <script>: Failed to cancel transaction</div>
            <hr tabindex="-1" style="display:inline-block; width:98%">
            <div id="x_x_divRplyFwdMsg" dir="ltr"><font
                style="font-size:11pt" face="Calibri, sans-serif"
                color="#000000"><b>From:</b> Daniel-Constantin Mierla
                <a class="x_x_moz-txt-link-rfc2396E"
                  href="mailto:miconda@gmail.com" moz-do-not-send="true"><miconda@gmail.com></a><br>
                <b>Sent:</b> Friday, October 25, 2019 1:08 PM<br>
                <b>To:</b> Lars Olsson <a
                  class="x_x_moz-txt-link-rfc2396E"
                  href="mailto:lars.olsson@optimobile.se"
                  moz-do-not-send="true">
                  <lars.olsson@optimobile.se></a>; Kamailio (SER)
                - Users Mailing List <a
                  class="x_x_moz-txt-link-rfc2396E"
                  href="mailto:sr-users@lists.kamailio.org"
                  moz-do-not-send="true">
                  <sr-users@lists.kamailio.org></a><br>
                <b>Subject:</b> Re: [SR-Users] Rewrite BYE to Cancel</font>
              <div> </div>
            </div>
            <div style="background-color:#FFFFFF">
              <p style="margin-top: 0px; margin-bottom: 0px;margin-top:
                0px; margin-bottom: 0px;margin-top: 0px; margin-bottom:
                0px;margin-top: 0px; margin-bottom: 0px;">
                Hello,</p>
              <p style="margin-top: 0px; margin-bottom: 0px;margin-top:
                0px; margin-bottom: 0px;margin-top: 0px; margin-bottom:
                0px;margin-top: 0px; margin-bottom: 0px;">
                <br>
              </p>
              <p style="margin-top: 0px; margin-bottom: 0px;margin-top:
                0px; margin-bottom: 0px;margin-top: 0px; margin-bottom:
                0px;margin-top: 0px; margin-bottom: 0px;">
                which of the xlog messages were printed?</p>
              <p style="margin-top: 0px; margin-bottom: 0px;margin-top:
                0px; margin-bottom: 0px;margin-top: 0px; margin-bottom:
                0px;margin-top: 0px; margin-bottom: 0px;">
                <br>
              </p>
              <p style="margin-top: 0px; margin-bottom: 0px;margin-top:
                0px; margin-bottom: 0px;margin-top: 0px; margin-bottom:
                0px;margin-top: 0px; margin-bottom: 0px;">
                Cheers,<br>
                Daniel</p>
              <p style="margin-top: 0px; margin-bottom: 0px;margin-top:
                0px; margin-bottom: 0px;margin-top: 0px; margin-bottom:
                0px;margin-top: 0px; margin-bottom: 0px;">
                <br>
              </p>
              <div class="x_x_x_moz-cite-prefix">On 25.10.19 13:04, Lars
                Olsson wrote:<br>
              </div>
              <blockquote type="cite">
                <div
                  style="font-family:Calibri,Arial,Helvetica,sans-serif;
                  font-size:12pt; color:rgb(0,0,0)">
                  Hi Daniel,</div>
                <div
                  style="font-family:Calibri,Arial,Helvetica,sans-serif;
                  font-size:12pt; color:rgb(0,0,0)">
                  <br>
                </div>
                <div
                  style="font-family:Calibri,Arial,Helvetica,sans-serif;
                  font-size:12pt; color:rgb(0,0,0)">
                  Thanks for your reply.</div>
                <div
                  style="font-family:Calibri,Arial,Helvetica,sans-serif;
                  font-size:12pt; color:rgb(0,0,0)">
                  <br>
                </div>
                <div
                  style="font-family:Calibri,Arial,Helvetica,sans-serif;
                  font-size:12pt; color:rgb(0,0,0)">
                  Used the following script for testing:</div>
                <div
                  style="font-family:Calibri,Arial,Helvetica,sans-serif;
                  font-size:12pt; color:rgb(0,0,0)">
                  <br>
                </div>
                <div
                  style="font-family:Calibri,Arial,Helvetica,sans-serif;
                  font-size:12pt; color:rgb(0,0,0)">
                  <span>if (is_method("BYE")) {<br>
                  </span>
                  <div><br>
                  </div>
                  <div>            xlog("CALLID: $ci\n");<br>
                  </div>
                  <div>            xlog("CSEQ: $cs\n");<br>
                  </div>
                  <div><br>
                  </div>
                  <div>            if (t_cancel_callid("$ci", "$cs",
                    "0")) {<br>
                  </div>
                  <div>               xlog("Transaction cancelled\n");<br>
                  </div>
                  <div>            } else {<br>
                  </div>
                  <div>               xlog("Failed to cancel
                    transaction\n");<br>
                  </div>
                  <div>            }<br>
                  </div>
                  <div>            send_reply("200", "OK");<br>
                  </div>
                  <div>            exit;<br>
                  </div>
                  <div>}<br>
                  </div>
                  <span></span><br>
                </div>
                <div
                  style="font-family:Calibri,Arial,Helvetica,sans-serif;
                  font-size:12pt; color:rgb(0,0,0)">
                  No cancel message was triggered.</div>
                <div
                  style="font-family:Calibri,Arial,Helvetica,sans-serif;
                  font-size:12pt; color:rgb(0,0,0)">
                  <br>
                </div>
                <div
                  style="font-family:Calibri,Arial,Helvetica,sans-serif;
                  font-size:12pt; color:rgb(0,0,0)">
                  Best Regards,</div>
                <div
                  style="font-family:Calibri,Arial,Helvetica,sans-serif;
                  font-size:12pt; color:rgb(0,0,0)">
                  Lars</div>
                <hr tabindex="-1" style="display:inline-block;
                  width:98%">
                <div id="x_x_x_divRplyFwdMsg" dir="ltr"><font
                    style="font-size:11pt" face="Calibri, sans-serif"
                    color="#000000"><b>From:</b> Daniel-Constantin
                    Mierla
                    <a class="x_x_x_moz-txt-link-rfc2396E"
                      href="mailto:miconda@gmail.com"
                      moz-do-not-send="true"><miconda@gmail.com></a><br>
                    <b>Sent:</b> Friday, October 25, 2019 12:32 PM<br>
                    <b>To:</b> Kamailio (SER) - Users Mailing List <a
                      class="x_x_x_moz-txt-link-rfc2396E"
                      href="mailto:sr-users@lists.kamailio.org"
                      moz-do-not-send="true">
                      <sr-users@lists.kamailio.org></a>; Lars
                    Olsson <a class="x_x_x_moz-txt-link-rfc2396E"
                      href="mailto:lars.olsson@optimobile.se"
                      moz-do-not-send="true">
                      <lars.olsson@optimobile.se></a><br>
                    <b>Subject:</b> Re: [SR-Users] Rewrite BYE to Cancel</font>
                  <div> </div>
                </div>
                <div style="background-color:#FFFFFF">
                  <p style="margin-top: 0px; margin-bottom:
                    0px;margin-top: 0px; margin-bottom: 0px;margin-top:
                    0px; margin-bottom: 0px;margin-top: 0px;
                    margin-bottom: 0px;">
                    Hello,</p>
                  <p style="margin-top: 0px; margin-bottom:
                    0px;margin-top: 0px; margin-bottom: 0px;margin-top:
                    0px; margin-bottom: 0px;margin-top: 0px;
                    margin-bottom: 0px;">
                    <br>
                  </p>
                  <p style="margin-top: 0px; margin-bottom:
                    0px;margin-top: 0px; margin-bottom: 0px;margin-top:
                    0px; margin-bottom: 0px;margin-top: 0px;
                    margin-bottom: 0px;">
                    actually sending BYE for an in-progress call setup
                    (initial INVITE routed, but 200ok was not received
                    yet) is valid from SIP RFC point of view. So it is
                    not really a broken implementation (or, not to put
                    all my money in, it can be, but not because of this
                    kind of BYE).</p>
                  <p style="margin-top: 0px; margin-bottom:
                    0px;margin-top: 0px; margin-bottom: 0px;margin-top:
                    0px; margin-bottom: 0px;margin-top: 0px;
                    margin-bottom: 0px;">
                    <br>
                  </p>
                  <p style="margin-top: 0px; margin-bottom:
                    0px;margin-top: 0px; margin-bottom: 0px;margin-top:
                    0px; margin-bottom: 0px;margin-top: 0px;
                    margin-bottom: 0px;">
                    Practically the BYE can be used to terminate a
                    specific branch in a call setup. Think about
                    parallel forking, and many branches start sending
                    back 183. The caller UA can send BYE to some of the
                    branches and let the others wait to complete.</p>
                  <p style="margin-top: 0px; margin-bottom:
                    0px;margin-top: 0px; margin-bottom: 0px;margin-top:
                    0px; margin-bottom: 0px;margin-top: 0px;
                    margin-bottom: 0px;">
                    <br>
                  </p>
                  <p style="margin-top: 0px; margin-bottom:
                    0px;margin-top: 0px; margin-bottom: 0px;margin-top:
                    0px; margin-bottom: 0px;margin-top: 0px;
                    margin-bottom: 0px;">
                    The CANCEL has to be used when all the branches
                    should be terminated. If there is a single branch,
                    then the BYE terminates the call in progress, I am
                    not sure what the callee UA should reply to the
                    INVITE.</p>
                  <p style="margin-top: 0px; margin-bottom:
                    0px;margin-top: 0px; margin-bottom: 0px;margin-top:
                    0px; margin-bottom: 0px;margin-top: 0px;
                    margin-bottom: 0px;">
                    <br>
                  </p>
                  <p style="margin-top: 0px; margin-bottom:
                    0px;margin-top: 0px; margin-bottom: 0px;margin-top:
                    0px; margin-bottom: 0px;margin-top: 0px;
                    margin-bottom: 0px;">
                    On the other hand, in the very few cases when I saw
                    UAs sending BYE for early call setup, the other side
                    was rejecting it, expecting the cancel.</p>
                  <p style="margin-top: 0px; margin-bottom:
                    0px;margin-top: 0px; margin-bottom: 0px;margin-top:
                    0px; margin-bottom: 0px;margin-top: 0px;
                    margin-bottom: 0px;">
                    <br>
                  </p>
                  <p style="margin-top: 0px; margin-bottom:
                    0px;margin-top: 0px; margin-bottom: 0px;margin-top:
                    0px; margin-bottom: 0px;margin-top: 0px;
                    margin-bottom: 0px;">
                    I expect it should work with kamailio to send 200ok
                    for such BYE and then use t_cancel_callid():</p>
                  <p style="margin-top: 0px; margin-bottom:
                    0px;margin-top: 0px; margin-bottom: 0px;margin-top:
                    0px; margin-bottom: 0px;margin-top: 0px;
                    margin-bottom: 0px;">
                    <br>
                  </p>
                  <p style="margin-top: 0px; margin-bottom:
                    0px;margin-top: 0px; margin-bottom: 0px;margin-top:
                    0px; margin-bottom: 0px;margin-top: 0px;
                    margin-bottom: 0px;">
                    <a
href="https://www.kamailio.org/docs/modules/stable/modules/tmx.html#tmx.f.t_cancel_callid"
                      moz-do-not-send="true">https://www.kamailio.org/docs/modules/stable/modules/tmx.html#tmx.f.t_cancel_callid</a></p>
                  <p style="margin-top: 0px; margin-bottom:
                    0px;margin-top: 0px; margin-bottom: 0px;margin-top:
                    0px; margin-bottom: 0px;margin-top: 0px;
                    margin-bottom: 0px;">
                    <br>
                  </p>
                  <div class="x_x_x_x_moz-cite-prefix">The call-id and
                    cseq values should be the same in the BYE request.</div>
                  <div class="x_x_x_x_moz-cite-prefix"><br>
                  </div>
                  <div class="x_x_x_x_moz-cite-prefix">Try it and write
                    back if works, I am quite curious about...<br>
                  </div>
                  <div class="x_x_x_x_moz-cite-prefix"><br>
                  </div>
                  <div class="x_x_x_x_moz-cite-prefix">Cheers,<br>
                    Daniel</div>
                  <div class="x_x_x_x_moz-cite-prefix"><br>
                  </div>
                  <div class="x_x_x_x_moz-cite-prefix">On 25.10.19
                    12:17, Lars Olsson wrote:<br>
                  </div>
                  <blockquote type="cite">
                    <div
                      style="font-family:Calibri,Arial,Helvetica,sans-serif;
                      font-size:12pt; color:rgb(0,0,0)">
                      Yes it is a BROKEN behavior from the remote
                      system, unfortunately it can not be changed.</div>
                    <div
                      style="font-family:Calibri,Arial,Helvetica,sans-serif;
                      font-size:12pt; color:rgb(0,0,0)">
                      <span style="color:rgb(0,0,0);
                        font-family:Calibri,Arial,Helvetica,sans-serif;
                        font-size:12pt">Besides this issue, the remote
                        system works as it should.</span><br>
                    </div>
                    <div
                      style="font-family:Calibri,Arial,Helvetica,sans-serif;
                      font-size:12pt; color:rgb(0,0,0)">
                      <span style="color:rgb(0,0,0);
                        font-family:Calibri,Arial,Helvetica,sans-serif;
                        font-size:12pt"><br>
                      </span></div>
                    <div
                      style="font-family:Calibri,Arial,Helvetica,sans-serif;
                      font-size:12pt; color:rgb(0,0,0)">
                      <span style="color:rgb(0,0,0);
                        font-family:Calibri,Arial,Helvetica,sans-serif;
                        font-size:12pt">A custom b2bua can for sure
                        resolve this, but perhaps not in a standard way.</span></div>
                    <div
                      style="font-family:Calibri,Arial,Helvetica,sans-serif;
                      font-size:12pt; color:rgb(0,0,0)">
                      <span style="color:rgb(0,0,0);
                        font-family:Calibri,Arial,Helvetica,sans-serif;
                        font-size:12pt">Question is if it is possible to
                        resolve with Kamailio or if I need to patch SEMS
                        to handle this.</span></div>
                    <div
                      style="font-family:Calibri,Arial,Helvetica,sans-serif;
                      font-size:12pt; color:rgb(0,0,0)">
                      <span style="color:rgb(0,0,0);
                        font-family:Calibri,Arial,Helvetica,sans-serif;
                        font-size:12pt"><br>
                      </span></div>
                    <div
                      style="font-family:Calibri,Arial,Helvetica,sans-serif;
                      font-size:12pt; color:rgb(0,0,0)">
                      Something like this:</div>
                    <div
                      style="font-family:Calibri,Arial,Helvetica,sans-serif;
                      font-size:12pt; color:rgb(0,0,0)">
                      <br>
                    </div>
                    <div
                      style="font-family:Calibri,Arial,Helvetica,sans-serif;
                      font-size:12pt; color:rgb(0,0,0)">
                      if ("BYE" && dialog not confirmed)</div>
                    <div
                      style="font-family:Calibri,Arial,Helvetica,sans-serif;
                      font-size:12pt; color:rgb(0,0,0)">
                          reply back 200 OK</div>
                    <div
                      style="font-family:Calibri,Arial,Helvetica,sans-serif;
                      font-size:12pt; color:rgb(0,0,0)">
                          cancel other side of dialog</div>
                    <div
                      style="font-family:Calibri,Arial,Helvetica,sans-serif;
                      font-size:12pt; color:rgb(0,0,0)">
                      <br>
                    </div>
                    <div
                      style="font-family:Calibri,Arial,Helvetica,sans-serif;
                      font-size:12pt; color:rgb(0,0,0)">
                      As Kamailio can terminate active dialog with
                      sending bye in both directions, I thought that it
                      might be possible to resolve this as well.  <span
                        style="color:rgb(0,0,0);
                        font-family:Calibri,Arial,Helvetica,sans-serif;
                        font-size:12pt">Hence asking for ideas.</span></div>
                    <div
                      style="font-family:Calibri,Arial,Helvetica,sans-serif;
                      font-size:12pt; color:rgb(0,0,0)">
                      <br>
                    </div>
                    <div
                      style="font-family:Calibri,Arial,Helvetica,sans-serif;
                      font-size:12pt; color:rgb(0,0,0)">
                      Best Regards,</div>
                    <div
                      style="font-family:Calibri,Arial,Helvetica,sans-serif;
                      font-size:12pt; color:rgb(0,0,0)">
                      Lars</div>
                    <div
                      style="font-family:Calibri,Arial,Helvetica,sans-serif;
                      font-size:12pt; color:rgb(0,0,0)">
                      <br>
                    </div>
                    <hr tabindex="-1" style="display:inline-block;
                      width:98%">
                    <div id="x_x_x_x_divRplyFwdMsg" dir="ltr"><font
                        style="font-size:11pt" face="Calibri,
                        sans-serif" color="#000000"><b>From:</b>
                        sr-users
                        <a class="x_x_x_x_moz-txt-link-rfc2396E"
                          href="mailto:sr-users-bounces@lists.kamailio.org"
                          moz-do-not-send="true">
                          <sr-users-bounces@lists.kamailio.org></a>
                        on behalf of Steve Davies <a
                          class="x_x_x_x_moz-txt-link-rfc2396E"
                          href="mailto:steve-lists-srusers@connection-telecom.com"
                          moz-do-not-send="true">
<steve-lists-srusers@connection-telecom.com></a><br>
                        <b>Sent:</b> Friday, October 25, 2019 11:25 AM<br>
                        <b>To:</b> Kamailio (SER) - Users Mailing List <a
                          class="x_x_x_x_moz-txt-link-rfc2396E"
                          href="mailto:sr-users@lists.kamailio.org"
                          moz-do-not-send="true">
                          <sr-users@lists.kamailio.org></a><br>
                        <b>Subject:</b> Re: [SR-Users] Rewrite BYE to
                        Cancel</font>
                      <div> </div>
                    </div>
                    <div>
                      <div dir="ltr">Hi,
                        <div><br>
                        </div>
                        <div>I'm normally a bystander.  But on this
                          occasion I've got to comment - there are
                          broken SIP implementations, and there are
                          BROKEN ones.  Surely there is no hope with
                          this one?  If they can't get this right just
                          imagine how many more problems it will have.</div>
                        <div><br>
                        </div>
                        <div>Steve</div>
                        <div><br>
                        </div>
                      </div>
                      <br>
                      <div class="x_x_x_x_x_gmail_quote">
                        <div dir="ltr" class="x_x_x_x_x_gmail_attr">On
                          Fri, 25 Oct 2019 at 11:19, Lars Olsson <<a
                            href="mailto:lars.olsson@optimobile.se"
                            moz-do-not-send="true">lars.olsson@optimobile.se</a>>
                          wrote:<br>
                        </div>
                        <blockquote class="x_x_x_x_x_gmail_quote"
                          style="margin:0px 0px 0px 0.8ex;
                          border-left:1px solid rgb(204,204,204);
                          padding-left:1ex">
                          <div dir="ltr">
                            <div
                              style="font-family:Calibri,Arial,Helvetica,sans-serif;
                              font-size:12pt; color:rgb(0,0,0)">
                              hi,</div>
                            <div
                              style="font-family:Calibri,Arial,Helvetica,sans-serif;
                              font-size:12pt; color:rgb(0,0,0)">
                              <br>
                            </div>
                            <div
                              style="font-family:Calibri,Arial,Helvetica,sans-serif;
                              font-size:12pt; color:rgb(0,0,0)">
                              I have a Kamailio setup infront of a SIP
                              system that do not handle cancellation of
                              a INVITE correctly.</div>
                            <div
                              style="font-family:Calibri,Arial,Helvetica,sans-serif;
                              font-size:12pt; color:rgb(0,0,0)">
                              The system sends out a BYE request instead
                              of a Cancel request on non connected
                              dialogs.</div>
                            <div
                              style="font-family:Calibri,Arial,Helvetica,sans-serif;
                              font-size:12pt; color:rgb(0,0,0)">
                              <br>
                            </div>
                            <div
                              style="font-family:Calibri,Arial,Helvetica,sans-serif;
                              font-size:12pt; color:rgb(0,0,0)">
                              I am trying to find a way to let Kamailio
                              "translate" the BYE request to a Cancel
                              reqeust for the ongoing INVITE dialog.</div>
                            <div
                              style="font-family:Calibri,Arial,Helvetica,sans-serif;
                              font-size:12pt; color:rgb(0,0,0)">
                              <br>
                            </div>
                            <div
                              style="font-family:Calibri,Arial,Helvetica,sans-serif;
                              font-size:12pt; color:rgb(0,0,0)">
                              Alternative if SEMS b2bua can do it, but
                              currently it replies: "not sip-relaying
                              BYE in not connected dlg", and I have not
                              found any obvious way to rewrite it there.</div>
                            <div
                              style="font-family:Calibri,Arial,Helvetica,sans-serif;
                              font-size:12pt; color:rgb(0,0,0)">
                              <br>
                            </div>
                            <div
                              style="font-family:Calibri,Arial,Helvetica,sans-serif;
                              font-size:12pt; color:rgb(0,0,0)">
                              Any thoughts. I can not change the
                              behavior of the remote system.</div>
                            <div
                              style="font-family:Calibri,Arial,Helvetica,sans-serif;
                              font-size:12pt; color:rgb(0,0,0)">
                              <br>
                            </div>
                            <div
                              style="font-family:Calibri,Arial,Helvetica,sans-serif;
                              font-size:12pt; color:rgb(0,0,0)">
                              Best Regards,</div>
                            <div
                              style="font-family:Calibri,Arial,Helvetica,sans-serif;
                              font-size:12pt; color:rgb(0,0,0)">
                              Lars</div>
                          </div>
_______________________________________________<br>
                          Kamailio (SER) - Users Mailing List<br>
                          <a href="mailto:sr-users@lists.kamailio.org"
                            target="_blank" moz-do-not-send="true">sr-users@lists.kamailio.org</a><br>
                          <a
                            href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users"
                            rel="noreferrer" target="_blank"
                            moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
                        </blockquote>
                      </div>
                    </div>
                    <br>
                    <fieldset class="x_x_x_x_mimeAttachmentHeader"></fieldset>
                    <pre class="x_x_x_x_moz-quote-pre">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="x_x_x_x_moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org" moz-do-not-send="true">sr-users@lists.kamailio.org</a>
<a class="x_x_x_x_moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
                  </blockquote>
                  <pre class="x_x_x_x_moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="x_x_x_x_moz-txt-link-abbreviated" href="http://www.asipto.com" moz-do-not-send="true">www.asipto.com</a>
<a class="x_x_x_x_moz-txt-link-abbreviated" href="http://www.twitter.com/miconda" moz-do-not-send="true">www.twitter.com/miconda</a> -- <a class="x_x_x_x_moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda" moz-do-not-send="true">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training, Oct 21-23, 2019, Berlin, Germany -- <a class="x_x_x_x_moz-txt-link-freetext" href="https://asipto.com/u/kat" moz-do-not-send="true">https://asipto.com/u/kat</a></pre>
                </div>
              </blockquote>
              <pre class="x_x_x_moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="x_x_x_moz-txt-link-abbreviated" href="http://www.asipto.com" moz-do-not-send="true">www.asipto.com</a>
<a class="x_x_x_moz-txt-link-abbreviated" href="http://www.twitter.com/miconda" moz-do-not-send="true">www.twitter.com/miconda</a> -- <a class="x_x_x_moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda" moz-do-not-send="true">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training, Oct 21-23, 2019, Berlin, Germany -- <a class="x_x_x_moz-txt-link-freetext" href="https://asipto.com/u/kat" moz-do-not-send="true">https://asipto.com/u/kat</a></pre>
            </div>
          </blockquote>
          <pre class="x_x_moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="x_x_moz-txt-link-abbreviated" href="http://www.asipto.com" moz-do-not-send="true">www.asipto.com</a>
<a class="x_x_moz-txt-link-abbreviated" href="http://www.twitter.com/miconda" moz-do-not-send="true">www.twitter.com/miconda</a> -- <a class="x_x_moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda" moz-do-not-send="true">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training, Oct 21-23, 2019, Berlin, Germany -- <a class="x_x_moz-txt-link-freetext" href="https://asipto.com/u/kat" moz-do-not-send="true">https://asipto.com/u/kat</a></pre>
        </div>
      </div>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Funding: <a class="moz-txt-link-freetext" href="https://www.paypal.me/dcmierla">https://www.paypal.me/dcmierla</a></pre>
  </body>
</html>