<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Can you give another try with latest master? I pushed a patch to
      use a static record, getting the one for all contacts in db seemed
      redundant there.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <div class="moz-cite-prefix">On 30.07.19 04:54, Pintu Lohar wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAB=mOZThR0sRwbVxnv0Ba_kEOqV1H7NYf_qwPiU+6L3Qq+yNnA@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div dir="ltr"><br>
        </div>
        <div class="gmail_quote">
          <div dir="ltr" class="gmail_attr">On Mon, Jul 29, 2019 at 7:16
            PM Pintu Lohar <<a
              href="mailto:pintulohargcetts@gmail.com"
              moz-do-not-send="true">pintulohargcetts@gmail.com</a>>
            wrote:<br>
            [Removed Attachment here due to size limit and resent]<br>
            <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="ltr">Took the master branch , Have noticed same
              problem , but noticed "<span
                style="color:rgb(85,85,85);font-family:"\00b9d1\00c740
\00ace0\00b515",seoul,arial,helvetica;font-size:13.3333px;background-color:rgb(250,246,246)">failed
                to get a record" and </span>
              <div><span
                  style="color:rgb(85,85,85);font-family:"\00b9d1\00c740
\00ace0\00b515",seoul,arial,helvetica;font-size:13.3333px;background-color:rgb(250,246,246)">not
                  executing uldb_delete_attrs_ruid() , however location
                  recored is removed not the location_attr record. </span><br>
                <br>
                Tried to check the log:<br>
                <p
style="margin:0px;padding:0px;color:rgb(85,85,85);font-family:"\00b9d1\00c740
\00ace0\00b515",seoul,arial,helvetica;font-size:13.3333px;line-height:1.3;background-color:rgb(250,246,246)">5(54869)
                  INFO: usrloc [udomain.c:996]:
                  udomain_contact_expired_cb(): calling contact expired
                  records - cycle [1]</p>
                <p style="margin:10px 0px
                  0px;padding:0px;color:rgb(85,85,85);font-family:"\00b9d1\00c740
\00ace0\00b515",seoul,arial,helvetica;font-size:13.3333px;line-height:1.3;background-color:rgb(250,246,246)">5(54869)
                  ERROR: usrloc [udomain.c:1017]:
                  udomain_contact_expired_cb(): failed to get a record</p>
                <p style="margin:10px 0px
                  0px;padding:0px;color:rgb(85,85,85);font-family:"\00b9d1\00c740
\00ace0\00b515",seoul,arial,helvetica;font-size:13.3333px;line-height:1.3;background-color:rgb(250,246,246)">5(54869)
                  INFO: usrloc [udomain.c:989]:
                  udomain_contact_expired_cb(): no rows to be contact
                  expired</p>
                <p style="margin:10px 0px
                  0px;padding:0px;color:rgb(85,85,85);font-family:"\00b9d1\00c740
\00ace0\00b515",seoul,arial,helvetica;font-size:13.3333px;line-height:1.3;background-color:rgb(250,246,246)">5(54869)
                  INFO: usrloc [udomain.c:989]:
                  udomain_contact_expired_cb(): no rows to be contact
                  expired</p>
                <p style="margin:10px 0px
                  0px;padding:0px;color:rgb(85,85,85);font-family:"\00b9d1\00c740
\00ace0\00b515",seoul,arial,helvetica;font-size:13.3333px;line-height:1.3;background-color:rgb(250,246,246)">5(54869)
                  INFO: usrloc [udomain.c:989]:
                  udomain_contact_expired_cb(): no rows to be contact
                  expired</p>
                <p style="margin:10px 0px
                  0px;padding:0px;color:rgb(85,85,85);font-family:"\00b9d1\00c740
\00ace0\00b515",seoul,arial,helvetica;font-size:13.3333px;line-height:1.3;background-color:rgb(250,246,246)">5(54869)
                  INFO: usrloc [udomain.c:989]:
                  udomain_contact_expired_cb(): no rows to be contact
                  expired</p>
                <p style="margin:10px 0px
                  0px;padding:0px;color:rgb(85,85,85);font-family:"\00b9d1\00c740
\00ace0\00b515",seoul,arial,helvetica;font-size:13.3333px;line-height:1.3;background-color:rgb(250,246,246)">5(54869)
                  INFO: usrloc [udomain.c:989]:
                  udomain_contact_expired_cb(): no rows to be contact
                  expired</p>
                <p style="margin:10px 0px
                  0px;padding:0px;color:rgb(85,85,85);font-family:"\00b9d1\00c740
\00ace0\00b515",seoul,arial,helvetica;font-size:13.3333px;line-height:1.3;background-color:rgb(250,246,246)">5(54869)
                  INFO: usrloc [udomain.c:989]:
                  udomain_contact_expired_cb(): no rows to be contact
                  expired</p>
                <p style="margin:10px 0px
                  0px;padding:0px;color:rgb(85,85,85);font-family:"\00b9d1\00c740
\00ace0\00b515",seoul,arial,helvetica;font-size:13.3333px;line-height:1.3;background-color:rgb(250,246,246)">5(54869)
                  INFO: usrloc [udomain.c:989]:
                  udomain_contact_expired_cb(): no rows to be contact
                  expired</p>
                <p style="margin:10px 0px
                  0px;padding:0px;color:rgb(85,85,85);font-family:"\00b9d1\00c740
\00ace0\00b515",seoul,arial,helvetica;font-size:13.3333px;line-height:1.3;background-color:rgb(250,246,246)">5(54869)
                  INFO: usrloc [udomain.c:996]:
                  udomain_contact_expired_cb(): calling contact expired
                  records - cycle [1] .  </p>
                <p style="margin:10px 0px
                  0px;padding:0px;color:rgb(85,85,85);font-family:"\00b9d1\00c740
\00ace0\00b515",seoul,arial,helvetica;font-size:13.3333px;line-height:1.3;background-color:rgb(250,246,246)">5(54869)
                  ERROR: usrloc [udomain.c:1017]:
                  udomain_contact_expired_cb(): failed to get a record </p>
                <br>
                <br>
                <div><br>
                  Am I missing something? </div>
              </div>
            </div>
          </blockquote>
          <div>   </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="ltr">
              <div>
                <div>Thanks. </div>
                <div>Pintu </div>
              </div>
            </div>
            <br>
            <div class="gmail_quote">
              <div dir="ltr" class="gmail_attr">On Mon, Jul 29, 2019 at
                6:08 PM Pintu Lohar <<a
                  href="mailto:pintulohargcetts@gmail.com"
                  target="_blank" moz-do-not-send="true">pintulohargcetts@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">Wow so fast. I will try the master
                  branch and share it with you the result soon.
                  <div dir="auto"><br>
                  </div>
                  <div dir="auto">Thanks indeed.</div>
                  <div dir="auto"><br>
                  </div>
                  <div dir="auto">Thanks & Regards </div>
                  <div dir="auto">Pintu </div>
                </div>
                <br>
                <div class="gmail_quote">
                  <div dir="ltr" class="gmail_attr">On Mon, Jul 29,
                    2019, 5:59 PM Daniel-Constantin Mierla <<a
                      href="mailto:miconda@gmail.com" target="_blank"
                      moz-do-not-send="true">miconda@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 bgcolor="#FFFFFF">
                      <p>Hello,</p>
                      <p>I pushed some changes to the master branch
                        trying to get to a solution without introducing
                        a new column to store expires value for attrs
                        records, but for the next version might be
                        better to just add that column and delete using
                        it.</p>
                      <p>Try the master branch and see if it works.</p>
                      <p>You can also run a rtimer with a delete on
                        condition for last modified value, as you
                        already said previously.</p>
                      <p>Cheers,<br>
                        Daniel<br>
                      </p>
                      <div
class="gmail-m_7252229076206441779gmail-m_1852741049703337486m_9171033713371966100moz-cite-prefix">On
                        29.07.19 10:16, Pintu Lohar wrote:<br>
                      </div>
                      <blockquote type="cite">
                        <div dir="ltr">Hi Daniel,<br>
                          <br>
                          It's about the contract expired and deleted
                          from "location" but not deleted from
                          location_attr table when expired contact is
                          found. My settings are below <br>
                          <br>
                          1<font face="arial, sans-serif">. <span
                              style="background-color:rgb(252,255,252);color:rgb(0,0,0)">modparam("usrloc",
                              "timer_interval", 120)<br>
                            </span>2. <span style="color:rgb(69,69,69)">modparam("tm|usrloc"</span><span
                              style="color:rgb(69,69,69)">,
                              "xavp_contact", "ulattrs")<br>
                            </span>3. Usrloc is set to DB_ONLY Mode.  </font><br>
                          4. //// route block when the extra location
                          attr before saving . <br>
                          # Handle SIP registrations<br>
                          route[REGISTRAR] {<br>
                          if (!is_method("REGISTER")) return;<br>
                          <br>
                          if(isflagset(FLT_NATS)) {<br>
                          setbflag(FLB_NATB);<br>
                          #!ifdef WITH_NATSIPPING<br>
                          # do SIP NAT pinging<br>
                          setbflag(FLB_NATSIPPING);<br>
                          #!endif<br>
                          }<br>
                          <b>$xavp(ulattrs=>did)=$hdr(P-Asserted-Identity);
                            # this adds to location_attr table.. </b><br>
                          if (!save("location")) {<br>
                          sl_reply_error();<br>
                          }<br>
                          <br>
                          <br>
                          <br>
                          Like if Client Registered , and went
                          offline/crashed,(expiry i.e 3600, proto=TLS)
                          then contact is expired after 1 hour then it's
                          removed from location table but the attribute
                          set which is added for location_attr(for same
                          ruid) is not deleted from db.<br>
                          Thanks & Regards<br>
                          Pintu <br>
                          <br>
                          <br>
                          -----------</div>
                        <br>
                        <div class="gmail_quote">
                          <div dir="ltr" class="gmail_attr">On Mon, Jul
                            29, 2019 at 4:32 PM Daniel-Constantin Mierla
                            <<a href="mailto:miconda@gmail.com"
                              rel="noreferrer" target="_blank"
                              moz-do-not-send="true">miconda@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 bgcolor="#FFFFFF">
                              <p>Hello,</p>
                              <p>is the contact expired and not updated,
                                or is about attributes set for a
                                REGISTER request that should be deleted
                                with the next REGISTER updating the
                                expires for same contact?</p>
                              <p>Cheers,<br>
                                Daniel<br>
                              </p>
                              <div
class="gmail-m_7252229076206441779gmail-m_1852741049703337486m_9171033713371966100gmail-m_-5655893853785452362moz-cite-prefix">On
                                29.07.19 08:44, Pintu Lohar wrote:<br>
                              </div>
                              <blockquote type="cite">
                                <div dir="ltr">
                                  <p
class="gmail-m_7252229076206441779gmail-m_1852741049703337486m_9171033713371966100gmail-m_-5655893853785452362gmail-p1">Hi
                                    All, </p>
                                  <p
class="gmail-m_7252229076206441779gmail-m_1852741049703337486m_9171033713371966100gmail-m_-5655893853785452362gmail-p2"><br>
                                  </p>
                                  <p
class="gmail-m_7252229076206441779gmail-m_1852741049703337486m_9171033713371966100gmail-m_-5655893853785452362gmail-p1">Regarding modparam("tm|usrloc",
                                    "xavp_contact", "ulattrs") </p>
                                  <p
class="gmail-m_7252229076206441779gmail-m_1852741049703337486m_9171033713371966100gmail-m_-5655893853785452362gmail-p1"><br>
                                    <span
class="gmail-m_7252229076206441779gmail-m_1852741049703337486m_9171033713371966100gmail-m_-5655893853785452362gmail-s1"
                                      style="color:rgb(228,175,10)">#ref
                                      : <a
href="https://www.kamailio.org/docs/modules/devel/modules/usrloc.html#usrloc.p.xavp_contact"
                                        rel="noreferrer" target="_blank"
                                        moz-do-not-send="true">https://www.kamailio.org/docs/modules/devel/modules/usrloc.html#usrloc.p.xavp_contact</a></span>
                                    . <br>
                                    <br>
                                    There is some requirement where we
                                    need to save some extra location
                                    attributes to <a
href="https://kamailio.org/docs/db-tables/kamailio-db-4.3.x.html#gen-db-location-attrs"
                                      rel="noreferrer" target="_blank"
                                      moz-do-not-send="true"><span
class="gmail-m_7252229076206441779gmail-m_1852741049703337486m_9171033713371966100gmail-m_-5655893853785452362gmail-s1"
                                        style="color:rgb(228,175,10)">location_attrs</span></a> tables <br>
                                    $xavp(ulattrs=>deviceIdentify)=
                                    "Some str values"<span
class="gmail-m_7252229076206441779gmail-m_1852741049703337486m_9171033713371966100gmail-m_-5655893853785452362gmail-Apple-converted-space"> 
                                    </span>and calling save(“location”)
                                    , It works well and saved<span
class="gmail-m_7252229076206441779gmail-m_1852741049703337486m_9171033713371966100gmail-m_-5655893853785452362gmail-Apple-converted-space"> 
                                    </span>location attribute table but<span
class="gmail-m_7252229076206441779gmail-m_1852741049703337486m_9171033713371966100gmail-m_-5655893853785452362gmail-Apple-converted-space"> 
                                    </span>But when contact expired
                                    callback is received,
                                    udomain_contact_expired_db() does
                                    not it delete the extra location
                                    attribute from database but deleting
                                    the record from location table only
                                    ?<span
class="gmail-m_7252229076206441779gmail-m_1852741049703337486m_9171033713371966100gmail-m_-5655893853785452362gmail-Apple-converted-space"> </span></p>
                                  <p
class="gmail-m_7252229076206441779gmail-m_1852741049703337486m_9171033713371966100gmail-m_-5655893853785452362gmail-p1"><span
class="gmail-m_7252229076206441779gmail-m_1852741049703337486m_9171033713371966100gmail-m_-5655893853785452362gmail-Apple-converted-space"></span>If
                                    not, is there any recommended
                                    approach to delete the extra
                                    location attributes from the
                                    database?<span
class="gmail-m_7252229076206441779gmail-m_1852741049703337486m_9171033713371966100gmail-m_-5655893853785452362gmail-Apple-converted-space"> or
                                      am I missing something to set?</span></p>
                                  <p
class="gmail-m_7252229076206441779gmail-m_1852741049703337486m_9171033713371966100gmail-m_-5655893853785452362gmail-p1"><br>
                                    Alternate I was thinking could be
                                    running timer from Kamailio config
                                    and check last_modified time and
                                    delete those(based on our UAC expiry
                                    setting), is it the right approach.<br>
                                    <br>
                                    Kamailio Version: 5.2.0.<br>
                                    <br>
                                    Thanks for your valuable suggestion
                                    in advance.<br>
                                    <br>
                                    Regards<span
class="gmail-m_7252229076206441779gmail-m_1852741049703337486m_9171033713371966100gmail-m_-5655893853785452362gmail-Apple-converted-space"> </span></p>
                                  <p
class="gmail-m_7252229076206441779gmail-m_1852741049703337486m_9171033713371966100gmail-m_-5655893853785452362gmail-p1">Pintu
                                    Lohar<br>
                                  </p>
                                  <span
style="background-color:rgb(252,255,252);color:rgb(0,0,0);font-size:15px"><br>
                                    <br>
                                    <br>
                                    <br>
                                  </span></div>
                                <br>
                                <fieldset
class="gmail-m_7252229076206441779gmail-m_1852741049703337486m_9171033713371966100gmail-m_-5655893853785452362mimeAttachmentHeader"></fieldset>
                                <pre class="gmail-m_7252229076206441779gmail-m_1852741049703337486m_9171033713371966100gmail-m_-5655893853785452362moz-quote-pre">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="gmail-m_7252229076206441779gmail-m_1852741049703337486m_9171033713371966100gmail-m_-5655893853785452362moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org" rel="noreferrer" target="_blank" moz-do-not-send="true">sr-users@lists.kamailio.org</a>
<a class="gmail-m_7252229076206441779gmail-m_1852741049703337486m_9171033713371966100gmail-m_-5655893853785452362moz-txt-link-freetext" 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>
</pre>
                              </blockquote>
                              <pre class="gmail-m_7252229076206441779gmail-m_1852741049703337486m_9171033713371966100gmail-m_-5655893853785452362moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="gmail-m_7252229076206441779gmail-m_1852741049703337486m_9171033713371966100gmail-m_-5655893853785452362moz-txt-link-abbreviated" href="http://www.asipto.com" rel="noreferrer" target="_blank" moz-do-not-send="true">www.asipto.com</a>
<a class="gmail-m_7252229076206441779gmail-m_1852741049703337486m_9171033713371966100gmail-m_-5655893853785452362moz-txt-link-abbreviated" href="http://www.twitter.com/miconda" rel="noreferrer" target="_blank" moz-do-not-send="true">www.twitter.com/miconda</a> -- <a class="gmail-m_7252229076206441779gmail-m_1852741049703337486m_9171033713371966100gmail-m_-5655893853785452362moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda" rel="noreferrer" target="_blank" moz-do-not-send="true">www.linkedin.com/in/miconda</a></pre>
                            </div>
                          </blockquote>
                        </div>
                      </blockquote>
                      <pre class="gmail-m_7252229076206441779gmail-m_1852741049703337486m_9171033713371966100moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="gmail-m_7252229076206441779gmail-m_1852741049703337486m_9171033713371966100moz-txt-link-abbreviated" href="http://www.asipto.com" rel="noreferrer" target="_blank" moz-do-not-send="true">www.asipto.com</a>
<a class="gmail-m_7252229076206441779gmail-m_1852741049703337486m_9171033713371966100moz-txt-link-abbreviated" href="http://www.twitter.com/miconda" rel="noreferrer" target="_blank" moz-do-not-send="true">www.twitter.com/miconda</a> -- <a class="gmail-m_7252229076206441779gmail-m_1852741049703337486m_9171033713371966100moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda" rel="noreferrer" target="_blank" moz-do-not-send="true">www.linkedin.com/in/miconda</a></pre>
                    </div>
                  </blockquote>
                </div>
              </blockquote>
            </div>
          </blockquote>
        </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></pre>
  </body>
</html>