<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello Guillaume,<br>
    <br>
    thanks, I will backport. Is this solving the issue reported in this
    email thread, or the one related to the drop of another early dialog
    is still there?<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <div class="moz-cite-prefix">On 11/25/13 4:47 PM, Guillaume Bour
      wrote:<br>
    </div>
    <blockquote cite="mid:529370F8.6050300@gmail.com" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      <div class="moz-cite-prefix">On 24/11/2013 16:35,
        Daniel-Constantin Mierla wrote:<br>
      </div>
      <blockquote cite="mid:52921CD7.9030909@gmail.com" type="cite">
        <meta content="text/html; charset=ISO-8859-1"
          http-equiv="Content-Type">
        Hello Guillaume,<br>
        <br>
        I pushed two commits on master branch:<br>
        <br>
        - <a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=777dd5e28ff6b4fcc3b1c44e841eb415c974075f">http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=777dd5e28ff6b4fcc3b1c44e841eb415c974075f</a><br>
        - <a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=60372d613544af1f8f06122eb77fa2a9636a6c3a">http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=60372d613544af1f8f06122eb77fa2a9636a6c3a</a><br>
        <br>
        The changes restore the previous values for T and T_branch,
        should be safer for the case when t_cancel_callid() is used in
        the context of another transaction.<br>
        <br>
        The patches are for master branch, but should apply easily to
        4.0 branch. If you confirm they are working fine, then I will
        backport to git branch 4.0 as well.<br>
        <br>
      </blockquote>
      <br>
      Hi Daniel,<br>
      <br>
      I have tested it on 4.0 branch, and its working fine<br>
      <br>
      Regards,<br>
      Guillaume<br>
      <br>
      <blockquote cite="mid:52921CD7.9030909@gmail.com" type="cite">
        Cheers,<br>
        Daniel<br>
        <br>
        <div class="moz-cite-prefix">On 11/21/13 5:19 PM, Guillaume Bour
          wrote:<br>
        </div>
        <blockquote cite="mid:528E3286.2080409@gmail.com" type="cite">
          <meta content="text/html; charset=ISO-8859-1"
            http-equiv="Content-Type">
          <div class="moz-cite-prefix"><br>
            Hi Daniel<br>
            <br>
            No, replies are not dropped.<br>
            <br>
            I looked into source code, particularly
            tmx_mod.c::t_cancel_callid() function.<br>
            It alter the global pointer T (pointing to the transaction
            currently processed), but do not restore original value at
            the end:<br>
              - at the beginning of t_cancel_callid(), T is NULL<br>
              - then t_lookup_callid() make it point to the transaction
            we want to cancel<br>
              - and the pointer is not cleanup before exiting
            t_cancel_callid<br>
            <br>
            Here is a patch that fix this issue (it may not be the
            correct way to do it)<br>
            <br>
            <br>
            Regards,<br>
            Guillaume<br>
            <br>
            On 20/11/2013 22:57, Daniel-Constantin Mierla wrote:<br>
          </div>
          <blockquote cite="mid:528D302C.2050004@gmail.com" type="cite">
            <meta content="text/html; charset=ISO-8859-1"
              http-equiv="Content-Type">
            Hello,<br>
            <br>
            are you dropping replies? I don't see the 'SIP/2.0 487
            Request Terminated' being sent to caller, it looks ok and
            has two Via headers.<br>
            <br>
            Cheers,<br>
            Daniel<br>
            <br>
            <div class="moz-cite-prefix">On 11/20/13 4:06 PM, Guillaume
              Bour wrote:<br>
            </div>
            <blockquote cite="mid:528CCFDE.9050202@gmail.com"
              type="cite">
              <meta content="text/html; charset=ISO-8859-1"
                http-equiv="Content-Type">
              <div class="moz-cite-prefix">On 20/11/2013 12:01,
                Daniel-Constantin Mierla wrote:<br>
              </div>
              <blockquote cite="mid:528C968D.9070707@gmail.com"
                type="cite">
                <meta content="text/html; charset=ISO-8859-1"
                  http-equiv="Content-Type">
                Hello,<br>
                <br>
                <div class="moz-cite-prefix">On 11/20/13 11:50 AM,
                  Guillaume Bour wrote:<br>
                </div>
                <blockquote cite="mid:528C93DD.3090509@gmail.com"
                  type="cite">
                  <meta http-equiv="content-type" content="text/html;
                    charset=ISO-8859-1">
                  Hi All<br>
                  <br>
                  We wan't to prevent our users to make more than one
                  call at time, so we choose to disconnect the previous
                  call.<br>
                  When the previous call is established, we use
                  dlg_bye(), and its ok.<br>
                  But when it is in early state, we use
                  t_cancel_callid() to cancel its INVITE transaction.<br>
                  <br>
                  We face 2 issues:<br>
                      1) we use local-request event route to account
                  calls on timeout. Sometimes this route is called for
                  the cancelled call (after default timeout of 1 hour)<br>
                </blockquote>
                <br>
                what is in the local-request in this case? Is it a BYE?<br>
                <br>
                <blockquote cite="mid:528C93DD.3090509@gmail.com"
                  type="cite">     2) t_cancel_callid() cancel previous
                  call, but also <u>make current dialog disappear</u>:
                  call is still ongoing and we can answer and talk to
                  each other, but the dialog does not appear in 'kamctl
                  stats dialog' and 'kamctl mi dlg_list' commands<br>
                  <br>
                  Is there a known limitation, or do we misuse
                  t_cancel_callid() ?<br>
                </blockquote>
                Can you send the log with debug=3 in kamailio.cfg? It
                will help to see what happens. Otherwise, if the call id
                is different for current dialog, it should not happen.
                The ngrep output in this situation (for both first and
                second invite) will help.<br>
                <br>
                Cheers,<br>
                Daniel<br>
                <br>
              </blockquote>
              <br>
              <br>
              Hi Daniel,<br>
              <br>
              local-request is triggered by a BYE<br>
              I have attached sample log and trace<br>
              <br>
              There is some kind of dialogs mixing. Here is the 1st call
              dialog as reported by "kamctl mi dlg_list" <u>before and
                after</u> the 2d call is answered:<br>
              <br>
              # kamctl mi dlg_list<br>
              dialog::  hash=2790:3231<br>
                      state:: 2<br>
                      ref_count:: 1<br>
                      timestart:: 0<br>
                      timeout:: 0<br>
                      callid:: GoXhk8GfkIEEqFyFNcySEjSOOpVKg4Uq<br>
                      from_uri:: <a moz-do-not-send="true"
                class="moz-txt-link-abbreviated"
                href="mailto:sip:15909901@staging.voip">sip:15909901@staging.voip</a><br>
                      from_tag:: swYh88AkicGbSHpK.D1z7uo3EX9Q-.AZ<br>
                      caller_contact:: <a moz-do-not-send="true"
                class="moz-txt-link-abbreviated"
                href="mailto:sip:37984520-gch2kindtioq8@10.0.1.10:5060;transport=udp">sip:37984520-gch2kindtioq8@10.0.1.10:5060;transport=udp</a><br>
                      caller_cseq:: 24899<br>
                      caller_route_set::<br>
                      caller_bind_addr:: <a moz-do-not-send="true"
                class="moz-txt-link-freetext" href="udp:10.0.1.10:5060">udp:10.0.1.10:5060</a><br>
                      callee_bind_addr::<br>
                      to_uri:: <a moz-do-not-send="true"
                class="moz-txt-link-abbreviated"
                href="mailto:sip:+3360000011@staging.voip">sip:+3360000011@staging.voip</a><br>
                      to_tag::<br>
                      callee_contact::<br>
                      callee_cseq::<br>
                      callee_route_set::<br>
              <br>
              # kamctl mi dlg_list<br>
              dialog::  hash=2790:3231<br>
                      state:: 3<br>
                      ref_count:: 2<br>
                      timestart:: 1384952191<br>
                      timeout:: 20242152<br>
                      callid:: GoXhk8GfkIEEqFyFNcySEjSOOpVKg4Uq<br>
                      from_uri:: <a moz-do-not-send="true"
                class="moz-txt-link-abbreviated"
                href="mailto:sip:15909901@staging.voip">sip:15909901@staging.voip</a><br>
                      from_tag:: swYh88AkicGbSHpK.D1z7uo3EX9Q-.AZ<br>
                      caller_contact:: <a moz-do-not-send="true"
                class="moz-txt-link-abbreviated"
                href="mailto:sip:37984520-gch2kindtioq8@10.0.1.20:5060;transport=udp">sip:37984520-gch2kindtioq8@10.0.1.20:5060;transport=udp</a><br>
                      caller_cseq:: 24899<br>
                      caller_route_set::<br>
                      caller_bind_addr:: <a moz-do-not-send="true"
                class="moz-txt-link-freetext" href="udp:10.0.1.10:5060">udp:10.0.1.10:5060</a><br>
                      callee_bind_addr:: <a moz-do-not-send="true"
                class="moz-txt-link-freetext" href="udp:10.0.1.10:5060">udp:10.0.1.10:5060</a><br>
                      to_uri:: <a moz-do-not-send="true"
                class="moz-txt-link-abbreviated"
                href="mailto:sip:+3360000011@staging.voip">sip:+3360000011@staging.voip</a><br>
                      to_tag:: as6c8b935a<br>
                      callee_contact:: <a moz-do-not-send="true"
                class="moz-txt-link-abbreviated"
                href="mailto:sip:+3360000022@10.0.1.11:5060">sip:+3360000022@10.0.1.11:5060</a><br>
                      callee_cseq::<br>
                      callee_route_set::<br>
              <br>
              <br>
              <br>
              <br>
              <fieldset class="mimeAttachmentHeader"></fieldset>
              <br>
              <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
            </blockquote>
            <br>
            <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla - <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://twitter.com/#%21/miconda">http://twitter.com/#!/miconda</a> - <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Kamailio Advanced Trainings - Berlin, Nov 25-28
  - more details about Kamailio trainings at <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a> -
</pre>
            <br>
            <fieldset class="mimeAttachmentHeader"></fieldset>
            <br>
            <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
          </blockquote>
          <br>
          <br>
          <fieldset class="mimeAttachmentHeader"></fieldset>
          <br>
          <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
        </blockquote>
        <br>
        <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla - <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://twitter.com/#%21/miconda">http://twitter.com/#!/miconda</a> - <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a></pre>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <br>
        <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
      </blockquote>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a></pre>
  </body>
</html>