<div dir="ltr"><div><div><div><div><div>Hello,<br></div>Thanks for the hint to use cherry-pick,<br><br></div>After applying these two patches the issue seems to be fixed.<br>Please find out the attachment with kamailio logs.<br></div><br></div><div>Thank you for your help.<br><br></div>Regards<br></div>José<br></div><div class="gmail_extra"><br><div class="gmail_quote">2016-06-21 10:41 GMT+01:00 Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <p>Hello,</p>
    <p>you should cherry-pick them with git into the branch 4.4.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p><div><div class="h5">
    <br>
    <div>On 21/06/16 11:04, José Seabra wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>Hi Daniel,<br>
            </div>
            I have applied your last two patchs on tm module but i can't
            compile the module because kemi framwork.<br>
            <br>
            I'm using kamailio version 4.4.<br>
            <br>
            Compile Errors:<br>
            <br>
            t_fwd.c:61:24: error: ../../kemi.h: No such file or
            directory<br>
            t_fwd.c: In function ‘prepare_new_uac’:<br>
            t_fwd.c:157: error: ‘sr_kemi_eng_t’ undeclared (first use in
            this function)<br>
            t_fwd.c:157: error: (Each undeclared identifier is reported
            only once<br>
            t_fwd.c:157: error: for each function it appears in.)<br>
            t_fwd.c:157: error: ‘keng’ undeclared (first use in this
            function)<br>
            t_fwd.c:346: warning: implicit declaration of function
            ‘sr_kemi_eng_get’<br>
            t_fwd.c:348: warning: implicit declaration of function
            ‘sr_kemi_act_ctx_get’<br>
            t_fwd.c:348: warning: assignment makes pointer from integer
            without a cast<br>
            t_fwd.c:350: warning: implicit declaration of function
            ‘sr_kemi_act_ctx_set’<br>
            t_fwd.c:352: warning: implicit declaration of function
            ‘sr_kemi_cbname_lookup_idx’<br>
            t_fwd.c: In function ‘add_blind_uac’:<br>
            t_fwd.c:715: error: ‘TM_UAC_FLAG_BLIND’ undeclared (first
            use in this function)<br>
            make: *** [t_fwd.o] Error 1<br>
            <br>
          </div>
          Regards<br>
        </div>
        José<br>
        <div>
          <div><br>
          </div>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">2016-06-21 9:38 GMT+01:00 José Seabra <span dir="ltr"><<a href="mailto:joseseabra4@gmail.com" target="_blank">joseseabra4@gmail.com</a>></span>:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr">
              <div>
                <div>
                  <div>
                    <div>Hello Daniel,<br>
                      <br>
                    </div>
                    I confirm that the phone receives 200 OK to the
                    CANCEL and  487 to the INVITE.<br>
                    <br>
                  </div>
                  I will backport the tm module to the last two patchs,
                  then, after make all tests I will report back to you.<br>
                  <br>
                </div>
                Regards <br>
              </div>
              José<br>
            </div>
            <div class="gmail_extra">
              <div>
                <div><br>
                  <div class="gmail_quote">2016-06-21 5:33 GMT+01:00
                    Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank"></a><a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span>:<br>
                    <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      <div bgcolor="#FFFFFF" text="#000000">
                        <p>Can you try with master branch or backport
                          the last two patches from tm module? I pushed
                          two commits that should catch and handle
                          better this case.</p>
                        <p>Cheers,<br>
                          Daniel<br>
                        </p>
                        <div>
                          <div> <br>
                            <div>On 20/06/16 18:14, Daniel-Constantin
                              Mierla wrote:<br>
                            </div>
                            <blockquote type="cite">
                              <p>Hello,</p>
                              <p>it seems it tries to generate an
                                outgoing cancel for the suspended
                                branch. I will check the code, likely
                                there has to be added condition for this
                                cases.</p>
                              <p>Is the 487 reply for invite sent back?
                                Also, the 200ok for cancel?</p>
                              <p>Cheers,<br>
                                Daniel<br>
                              </p>
                              <br>
                              <div>On 20/06/16 16:38, José Seabra wrote:<br>
                              </div>
                              <blockquote type="cite">
                                <div dir="ltr">
                                  <div>
                                    <div>
                                      <div>
                                        <div>Hello,<br>
                                          <br>
                                        </div>
                                        I'm attaching more logs to this
                                        email regarding to the issue on 
                                        SIP CANCEL  to an INVITE that is
                                        suspended.<br>
                                        <br>
                                      </div>
                                      If do you think that i should open
                                      an issue on git regarding to this
                                      let me know.<br>
                                      <br>
                                    </div>
                                    <div>Thank you for your help.<br>
                                      <br>
                                    </div>
                                    Best Regards<br>
                                  </div>
                                  José<br>
                                </div>
                                <div class="gmail_extra"><br>
                                  <div class="gmail_quote">2016-06-15
                                    14:42 GMT+01:00 José Seabra <span dir="ltr"><<a href="mailto:joseseabra4@gmail.com" target="_blank"></a><a href="mailto:joseseabra4@gmail.com" target="_blank">joseseabra4@gmail.com</a>></span>:<br>
                                    <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                                      <div dir="ltr">
                                        <div>
                                          <div>
                                            <div>
                                              <div>Hi Daniel,<br>
                                                <br>
                                                But when Kamailio
                                                receives a CANCEL prints
                                                the following error
                                                messages:<br>
                                                <br>
                                                2016-06-15 14:39:10.354 
                                                ERROR: tm
                                                [t_msgbuilder.c:287]:
                                                build_local_reparse():
                                                ERROR:
                                                build_local_reparse:
                                                INVITE is missing<br>
                                                2016-06-15 14:39:10.354 
                                                ERROR: tm
                                                [t_msgbuilder.c:494]:
                                                build_local_reparse():
                                                ERROR:
                                                build_local_reparse:
                                                cannot build CANCEL
                                                request<br>
                                                2016-06-15 14:39:10.354 
                                                ERROR: tm
                                                [t_cancel.c:310]:
                                                cancel_branch(): ERROR:
                                                attempt to build a
                                                CANCEL failed<br>
                                                2016-06-15 14:39:10.354 
                                                ERROR: tm
                                                [t_fwd.c:1389]:
                                                e2e_cancel(): ERROR:
                                                cancel error<br>
                                                <br>
                                              </div>
                                              I'm handling the CANCEL in
                                              the script by the
                                              following way:<br>
                                              <br>
                                              <br>
                                               if (is_method("CANCEL"))
                                              {<br>
                                                              if
                                              (t_check_trans()) {<br>
                                                                     
                                              route(RELAY);<br>
                                                              } else {<br>
                                                                     
                                              sl_send_reply("481", "Call
                                              leg/transaction does not
                                              exist");<br>
                                                              }<br>
                                                              exit();<br>
                                              ...<br>
                                              ...<br>
                                              ...<br>
                                              <br>
                                            </div>
                                            <span>Thank you for your
                                              support.<br>
                                              <br>
                                            </span></div>
                                          Regards<span><font color="#888888"><br>
                                            </font></span></div>
                                        <span><font color="#888888">José<br>
                                            <div>
                                              <div>
                                                <div>
                                                  <div>
                                                    <div>
                                                      <div>
                                                        <div>
                                                          <div><br>
                                                          </div>
                                                        </div>
                                                      </div>
                                                    </div>
                                                  </div>
                                                </div>
                                              </div>
                                            </div>
                                          </font></span></div>
                                      <div>
                                        <div>
                                          <div class="gmail_extra"><br>
                                            <div class="gmail_quote">2016-06-15
                                              12:15 GMT+01:00
                                              Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank"></a><a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span>:<br>
                                              <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                                                <div bgcolor="#FFFFFF" text="#000000">
                                                  <p>Hello,<br>
                                                  </p>
                                                  <span> <br>
                                                    <div>On 14/06/16
                                                      16:33, José Seabra
                                                      wrote:<br>
                                                    </div>
                                                    <blockquote type="cite">
                                                      <div dir="ltr">
                                                        <div>
                                                          <div>
                                                          <div>
                                                          <div>
                                                          <div>Hi Olle
                                                          and Daniel,<br>
                                                          </div>
                                                          Thank you for
                                                          your replies,
                                                          After receive
                                                          your msg I
                                                          looked again
                                                          to my script
                                                          and i found
                                                          the problem.<br>
                                                          <br>
                                                          </div>
                                                          I didn't
                                                          configure the
                                                          correct
                                                          failure_route
                                                          block and the
                                                          failure route
                                                          configured
                                                          didn't print
                                                          any msg on the
                                                          logs, so I <span lang="en"><span>thought</span></span>
                                                          that it wasn't
                                                          entering on
                                                          failure route.<br>
                                                          <br>
                                                          </div>
                                                          Sorry for my
                                                          mistake.<br>
                                                          <br>
                                                          </div>
                                                          <div>Anyway,
                                                          How should i
                                                          handle the
                                                          CANCEL sip msg
                                                          to an INVITE
                                                          that is
                                                          suspended?
                                                          (still related
                                                          with this
                                                          implementation)<br>
                                                          </div>
                                                        </div>
                                                      </div>
                                                    </blockquote>
                                                  </span> Just handling
                                                  it as done in the
                                                  default configuration
                                                  file is ok -- the
                                                  suspended transaction
                                                  will be canceled.<br>
                                                  <br>
                                                  Cheers,<br>
                                                  Daniel </div>
                                              </blockquote>
                                            </div>
                                          </div>
                                        </div>
                                      </div>
                                    </blockquote>
                                  </div>
                                </div>
                              </blockquote>
                            </blockquote>
                            <br>
                          </div>
                        </div>
                        <span>
                          <pre cols="72">-- 
Daniel-Constantin Mierla
<a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a> - <a href="http://www.kamailio.org" target="_blank">http://www.kamailio.org</a>
<a href="http://twitter.com/#%21/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a></pre>
                        </span></div>
                    </blockquote>
                  </div>
                  <br>
                  <br clear="all">
                  <br>
                </div>
              </div>
              <span><font color="#888888">-- <br>
                  <div data-smartmail="gmail_signature">Cumprimentos
                    <div>José Seabra</div>
                  </div>
                </font></span></div>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <br>
        -- <br>
        <div data-smartmail="gmail_signature">Cumprimentos
          <div>José Seabra</div>
        </div>
      </div>
    </blockquote>
    <br>
    <pre cols="72">-- 
Daniel-Constantin Mierla
<a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a> - <a href="http://www.kamailio.org" target="_blank">http://www.kamailio.org</a>
<a href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a></pre>
  </div></div></div>

</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Cumprimentos<div>José Seabra</div></div>
</div>