<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hello,</p>
    <p>that flag is used to mark a contact for storage only in memory.
      The save() function has a parameter with flags where this kind of
      storage can be set. Can you check the RPC command is setting this
      flag?<br>
    </p>
    Cheers,<br>
    Daniel<br>
    <br>
    <div class="moz-cite-prefix">On 13/01/2017 15:06, Vik Killa wrote:<br>
    </div>
    <blockquote
cite="mid:CAC-LwPMeT-0orArov3WYDD3DPSbuW+JChtcfU40xj8RxESCGsA@mail.gmail.com"
      type="cite">
      <div dir="ltr">following up here
        <div>i found if we comment out a single line of code, kamcmd
          ul.flush works</div>
        <div><br>
        </div>
        <div>here is the git diff</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>
          <div>diff --git a/src/modules/usrloc/ucontact.c
            b/src/modules/usrloc/ucontact.c</div>
          <div>index 47f3c2f..633ca81 100644</div>
          <div>--- a/src/modules/usrloc/ucontact.c</div>
          <div>+++ b/src/modules/usrloc/ucontact.c</div>
          <div>@@ -474,7 +474,7 @@ int db_insert_ucontact(ucontact_t*
            _c)</div>
          <div>        int nr_cols;</div>
          <div>        </div>
          <div>        if (_c->flags & FL_MEM) {</div>
          <div>-               return 0;</div>
          <div>+               //return 0;</div>
          <div>        }</div>
          <div>        if(unlikely(_c->ruid.len<=0)) {</div>
          <div>                LM_ERR("invalid ruid for aor: %.*s\n",</div>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>I don't quite understand the logic in that code.</div>
        <div>Does anyone have an idea of why `        if (_c->flags
          & FL_MEM) {`   returns?</div>
        <div><br>
        </div>
        <div>Thanks,</div>
        <div>/V</div>
        <div><br>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Thu, Jan 12, 2017 at 4:34 PM, Vik
          Killa <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:vipkilla@gmail.com" target="_blank">vipkilla@gmail.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr">Hello,
              <div>we've noticed that the usrloc module does not "sync"
                all the records from memory into the database.</div>
              <div>I use a bash script to generate in-memory AoRs (<a
                  moz-do-not-send="true"
                  href="http://paste.debian.net/plain/908521"
                  target="_blank">http://paste.debian.net/<wbr>plain/908521</a>)</div>
              <div>then i perform</div>
              <div>kamcmd ul.flush </div>
              <div>and no records are inserted.</div>
              <div>We have tried various usrloc parameters but none seem
                to work</div>
              <div>Here is our basic setup</div>
              <div><br>
              </div>
              <div>
                <div># ----- usrloc params -----</div>
                <div>modparam("usrloc", "db_url", DBURL)</div>
                <div>modparam("usrloc", "db_mode", 2)</div>
                <div>modparam("usrloc", "use_domain", 1)</div>
                <div>modparam("usrloc", "timer_interval", 120)</div>
                <div>modparam("usrloc", "timer_procs", 4)</div>
                <div><br>
                </div>
              </div>
              <div>We are using postgresql.</div>
              <div>are we missing something?<br>
                <br>
              </div>
              <div>Thanks</div>
              <span class="HOEnZb"><font color="#888888">
                  <div>/V</div>
                </font></span></div>
          </blockquote>
        </div>
        <br>
      </div>
      <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-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>
Kamailio World Conference - May 8-10, 2017 - <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
  </body>
</html>