<div dir="ltr">Hi Bogdan<div><br></div><div>I could reproduce the problem on lab. This is the scenario:</div><div><br></div><div>A INVITE -> OPENSIPS</div><div>OPENSIPS INVITE -> B</div><div><br></div><div>OPENSIPS <- B 200 OK </div><div><br></div><div>A <- 200 OK <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">OPENSIPS<span> </span></span>

</div><div>This 200 OK is lost or discarded on A, not sure if was on network or problem at client. Then:</div><div><br></div><div>A CANCEL -> OPENSIPS</div><div>A <- 200 OK (of Cancel) OPENSIPS</div><div><br></div><div>Then the call is up for ever. </div><div><br></div><div>Here is the log at the moment the CANCEL is received: <a href="https://pastebin.com/79qanD2H">https://pastebin.com/79qanD2H</a><br></div><div><br></div><div>And PCAP: <a href="https://drive.google.com/file/d/1lpHWN1uRD1SOwBTZdijSodXBWhUX-rM8/view?usp=sharing">https://drive.google.com/file/d/1lpHWN1uRD1SOwBTZdijSodXBWhUX-rM8/view?usp=sharing</a></div><div><br></div><div>Can you help?</div><div><br></div><div>Thanks</div><div><br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 22, 2018 at 1:24 PM, Bogdan-Andrei Iancu <span dir="ltr"><<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <tt>Daniel,<br>
      <br>
      The pcap shows only one leg of the the communication (I guess
      caller versus OpenSIPS). So I cannot see what happens on the
      callee side. Still, I see the first cancel is rejected with 400 (I
      guess by OpenSIPS - check the logs to see the reason) and the
      second one is accepted by OpenSIPS (no idea if relayed to callee
      or not). Still, if there is a race between the cancel from caller
      and the answer from callee, it is up to the caller to sort it
      out....according to RFC, the caller must ACK the received 200 OK
      (even if CANCEL was sent) and if it really wants to terminate the
      call, it has to fire a BYE.<br>
      <br>
      Regards,<br>
    </tt><span class="">
    <pre class="m_1182694063665725255moz-signature" cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a class="m_1182694063665725255moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.<wbr>com</a>
OpenSIPS Summit 2018
  <a class="m_1182694063665725255moz-txt-link-freetext" href="http://www.opensips.org/events/Summit-2018Amsterdam" target="_blank">http://www.opensips.org/<wbr>events/Summit-2018Amsterdam</a>
</pre>
    </span><div><div class="h5"><div class="m_1182694063665725255moz-cite-prefix">On 02/22/2018 04:22 PM, Daniel Zanutti
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">Hi Bogdan
        <div><br>
        </div>
        <div>Thanks for replying.</div>
        <div><br>
        </div>
        <div>Here is the PCAP, please take a look: <a href="https://drive.google.com/file/d/1e7SKjxDtdVYmN-7fCHSEqNEsNHjPsaKo/view?usp=sharing" target="_blank">https://drive.google.<wbr>com/file/d/1e7SKjxDtdVYmN-<wbr>7fCHSEqNEsNHjPsaKo/view?usp=<wbr>sharing</a></div>
        <div><br>
        </div>
        <div>Thanks</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Thu, Feb 22, 2018 at 7:30 AM,
          Bogdan-Andrei Iancu <span dir="ltr"><<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000"> <tt>Hi Daniel,<br>
                <br>
                Without a pcap showing the signaling is hard to
                understand (not to mention helping) your scenario.
                Please provide a link to the pcap or ngrep.<br>
                <br>
                Regards,<br>
              </tt>
              <pre class="m_1182694063665725255m_2452133488272620956moz-signature" cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a class="m_1182694063665725255m_2452133488272620956moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.<wbr>com</a>
OpenSIPS Summit 2018
  <a class="m_1182694063665725255m_2452133488272620956moz-txt-link-freetext" href="http://www.opensips.org/events/Summit-2018Amsterdam" target="_blank">http://www.opensips.org/events<wbr>/Summit-2018Amsterdam</a>
</pre>
              <div>
                <div class="m_1182694063665725255h5">
                  <div class="m_1182694063665725255m_2452133488272620956moz-cite-prefix">On
                    02/20/2018 06:43 PM, Daniel Zanutti wrote:<br>
                  </div>
                </div>
              </div>
              <blockquote type="cite">
                <div>
                  <div class="m_1182694063665725255h5">
                    <div dir="ltr"> Hey
                      <div><br>
                      </div>
                      <div>I had a problem when receiving simultaneous
                        CANCEL from customer and 200 OK from gateway.</div>
                      <div><br>
                      </div>
                      <div>Seems that the first CANCEL was rejected, but
                        the second CANCEL was accepted. This second
                        CANCEL did NOT go to the gateway, just Opensips
                        received and replied with 200 OK.</div>
                      <div><br>
                      </div>
                      <div>This is the log of the first CANCEL:<br>
                      </div>
                      <div>
                        <div>Feb 15 18:39:22 /sbin/opensips[28845]:
                          SCRIPT:TRAFFIC:WARNING: method CANCEL (<span> </span><a href="http://7Qbq3O3CReMfPflAtl8NY3ddTqPVBHO2785126@2.2.2.2/" style="color:rgb(17,85,204)" target="_blank">7Qbq3O3CReMfPflAtl8NY3ddTqPV<wbr>BHO2785126@2.2.2.2/</a><span> </span>XAeG2xj278<wbr>512T2
                          / 1839212581509953 ) not validated and not
                          fixed ( code=-1 )</div>
                      </div>
                      <div><br>
                      </div>
                      <div>code -1 is the return of validate_dialog()</div>
                      <div><br>
                      </div>
                      <div>Second CANCEL didn't generated a log.</div>
                      <div><br>
                      </div>
                      <div>Shouldn't all CANCELs be rejected? On this
                        case, just the first one was rejected.<br>
                      </div>
                      <div><br>
                      </div>
                      <div>I'm using version 1.9.11.</div>
                      <div><br class="m_1182694063665725255m_2452133488272620956gmail-Apple-interchange-newline">
                      </div>
                      <br>
                    </div>
                    <br>
                    <fieldset class="m_1182694063665725255m_2452133488272620956mimeAttachmentHeader"></fieldset>
                    <br>
                  </div>
                </div>
                <pre>______________________________<wbr>_________________
Users mailing list
<a class="m_1182694063665725255m_2452133488272620956moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a class="m_1182694063665725255m_2452133488272620956moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a>
</pre>
              </blockquote>
              <br>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </div></div></div>

</blockquote></div><br></div>