<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hello,</p>
    <p>replied to the other email on the topic of the last question
      here, but for sake of having it in the archive of this thread as
      well, in case people end up here by web searching: look at tmx
      module, it has some cancel-related functions.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <div class="moz-cite-prefix">On 10.02.21 10:57, David Villasmil
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAFGRPVr1EeF+THhUSfny8xKtShT+JezHXn5AaC+LACK+jd2wPQ@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">Hello Alex,
        <div><br>
        </div>
        <div>Again thanks.</div>
        <div><br>
        </div>
        <div>I'm using that calculation to, when receiving a 180/3, if
          it comes in too quickly (i.e. 100ms) i cancel that call, and
          send a 480 the the A leg.</div>
        <div>I haven't found way of doing this, is this possible at all?
          I trired setting a very low t_set_fr(10,10) (0 means set the
          default), but that's not working...</div>
        <div><br>
        </div>
        <div>Is there a way of doing this?</div>
        <div><br>
        </div>
        <div>Thanks!<br clear="all">
          <div>
            <div dir="ltr" class="gmail_signature"
              data-smartmail="gmail_signature">
              <div dir="ltr">
                <div>Regards,</div>
                <div><br>
                </div>
                David Villasmil
                <div>email: <a
                    href="mailto:david.villasmil.work@gmail.com"
                    target="_blank" moz-do-not-send="true">david.villasmil.work@gmail.com</a></div>
                <div>phone: +34669448337</div>
              </div>
            </div>
          </div>
          <br>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Tue, Feb 9, 2021 at 3:31 PM
          David Villasmil <<a
            href="mailto:david.villasmil.work@gmail.com"
            moz-do-not-send="true">david.villasmil.work@gmail.com</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div dir="auto">Thanks Alex, </div>
          <div dir="auto"><br>
          </div>
          <div dir="auto">Exactly what I was thinking. Just wondering
            whether there was a better way.</div>
          <div dir="auto"><br>
          </div>
          <div dir="auto">Again THANKS!</div>
          <div dir="auto"><br>
          </div>
          <div dir="auto">David</div>
          <div><br>
            <div class="gmail_quote">
              <div dir="ltr" class="gmail_attr">On Tue, 9 Feb 2021 at
                14:56, Alex Balashov <<a
                  href="mailto:abalashov@evaristesys.com"
                  target="_blank" moz-do-not-send="true">abalashov@evaristesys.com</a>>
                wrote:<br>
              </div>
              <blockquote class="gmail_quote" style="margin:0px 0px 0px
                0.8ex;border-left:1px solid
                rgb(204,204,204);padding-left:1ex">
                <div dir="auto">Hi,
                  <div><br>
                  </div>
                  <div>You can store the timestamp of the last message
                    of interest in a transaction-persistent variable -
                    that is, an AVP or XAVP - using $TV():</div>
                  <div><br>
                  </div>
                  <div><a
href="https://www.kamailio.org/wiki/cookbooks/5.4.x/pseudovariables#tv_name"
                      target="_blank" moz-do-not-send="true">https://www.kamailio.org/wiki/cookbooks/5.4.x/pseudovariables#tv_name</a></div>
                  <div><br>
                  </div>
                  <div>Then, you can do some arithmetic like this to
                    turn the difference between two timestamps into
                    milliseconds. This is stolen straight from CSRP so
                    adapt to your needs. :-)</div>
                  <div><br>
                  </div>
                  <div>
                    <pre style="color:rgb(0,0,0)">      # Log request processing time.

        $var(cur_time) = $TV(Sn);

        $var(proc_diff) = (
                (((
                  $(var(cur_time){s.select,0,.}{<a href="http://s.int" target="_blank" moz-do-not-send="true">s.int</a>}) - 
                  $(avp(proc_start){s.select,0,.}{<a href="http://s.int" target="_blank" moz-do-not-send="true">s.int</a>})
                ) * 1000000)
                + 
                (
                 $(var(cur_time){s.select,1,.}{<a href="http://s.int" target="_blank" moz-do-not-send="true">s.int</a>}) - 
                 $(avp(proc_start){s.select,1,.}{<a href="http://s.int" target="_blank" moz-do-not-send="true">s.int</a>}) 
                ) / 1000) mod 1000
        );</pre>
                    <pre style="color:rgb(0,0,0)">
</pre>
                  </div>
                  <div>
                    <div dir="ltr">— Alex</div>
                    <div
                      id="gmail-m_49640794330124725m_7301064894727756338AppleMailSignature"
                      dir="ltr"><br>
                    </div>
                    <div dir="ltr">—
                      <div>Sent from my iPad</div>
                    </div>
                    <div dir="ltr"><br>
                      <blockquote type="cite">On Feb 9, 2021, at 9:40
                        AM, David Villasmil <<a
                          href="mailto:david.villasmil.work@gmail.com"
                          target="_blank" moz-do-not-send="true">david.villasmil.work@gmail.com</a>>
                        wrote:<br>
                        <br>
                      </blockquote>
                    </div>
                    <blockquote type="cite">
                      <div dir="ltr">Hello all,</div>
                    </blockquote>
                  </div>
                </div>
                <div dir="auto">
                  <div>
                    <blockquote type="cite">
                      <div dir="ltr">
                        <div dir="auto"><br>
                        </div>
                        <div dir="auto">Is it possible to know the
                          elapsed time since the previously received
                          message?</div>
                        <div dir="auto"><br>
                        </div>
                        <div dir="auto">On outgoing calls, I.e: when i
                          get a 180, how long did the 100 arrived? Or
                          the INVITE...</div>
                        <div dir="auto"><br>
                        </div>
                        <div dir="auto">Thanks</div>
                        <div dir="auto"><br>
                        </div>
                        <div dir="auto">David </div>
                        -- <br>
                        <div dir="ltr">
                          <div dir="ltr">
                            <div>Regards,</div>
                            <div><br>
                            </div>
                            David Villasmil
                            <div>email: <a
                                href="mailto:david.villasmil.work@gmail.com"
                                target="_blank" moz-do-not-send="true">david.villasmil.work@gmail.com</a></div>
                            <div>phone: +34669448337</div>
                          </div>
                        </div>
                      </div>
                    </blockquote>
                  </div>
                </div>
                <div dir="auto">
                  <div>
                    <blockquote type="cite">
                      <div dir="ltr"><span>_______________________________________________</span><br>
                        <span>Kamailio (SER) - Users Mailing List</span><br>
                        <span><a
                            href="mailto:sr-users@lists.kamailio.org"
                            target="_blank" moz-do-not-send="true">sr-users@lists.kamailio.org</a></span><br>
                        <span><a
                            href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users"
                            target="_blank" moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a></span><br>
                      </div>
                    </blockquote>
                  </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>
          <div dir="ltr">
            <div dir="ltr">
              <div>Regards,</div>
              <div><br>
              </div>
              David Villasmil
              <div>email: <a
                  href="mailto:david.villasmil.work@gmail.com"
                  target="_blank" moz-do-not-send="true">david.villasmil.work@gmail.com</a></div>
              <div>phone: +34669448337</div>
            </div>
          </div>
        </blockquote>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </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>