<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    it seems you created the location table a while ago, before the
    official release of 4.4, when there was an invalid constraint in its
    definition. You have to drop database location and install it using
    the sql statement from the file:<br>
    <br>
    utils/kamctl/mysql/usrloc-create.sql<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <div class="moz-cite-prefix">On 07/04/16 22:20, Alberto Sagredo
      wrote:<br>
    </div>
    <blockquote
cite="mid:CADqf3zAZHoTwTyBWJtbKdoWvik0V4DOU-P48=+ZoEt5Xn9AgMQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">Im getting this error using USERLOCDB
        <div><br>
        </div>
        <div>
          <p
            style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span
              style="">Apr  7 22:11:56 kamailio-int
              /usr/local/sbin/kamailio[29717]: ERROR: db_mysql
              [km_dbase.c:128]: db_mysql_submit_query(): driver error on
              query: Duplicate entry '0--1' for key 'connection_idx'
              (1062)</span></p>
          <p
            style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span
              style="">Apr  7 22:11:56 kamailio-int
              /usr/local/sbin/kamailio[29717]: ERROR: <core>
              [db_query.c:235]: db_do_insert_cmd(): error while
              submitting query</span></p>
          <p
            style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span
              style="">Apr  7 22:11:56 kamailio-int
              /usr/local/sbin/kamailio[29717]: ERROR: usrloc
              [ucontact.c:684]: db_insert_ucontact(): inserting contact
              in db failed xxxx (uloc-5706bebd-7415-3)</span></p>
          <p
            style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span
              style="">Apr  7 22:11:56 kamailio-int
              /usr/local/sbin/kamailio[29717]: ERROR: usrloc
              [urecord.c:591]: insert_ucontact(): failed to insert in
              database</span></p>
          <p
            style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span
              style="">Apr  7 22:11:56 kamailio-int
              /usr/local/sbin/kamailio[29717]: ERROR: registrar
              [save.c:522]: insert_contacts(): failed to insert contact</span></p>
          <div><br>
          </div>
          <div>My config </div>
          <div><br>
          </div>
          <div>
            <p
              style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span
                style=""># ----- usrloc params -----</span></p>
            <p
              style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span
                style="">/* enable DB persistency for location entries
                */</span></p>
            <p
              style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span
                style="">#!ifdef WITH_USRLOCDB  </span></p>
            <p
              style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span
                style="">modparam("usrloc", "db_url", DBURL)</span></p>
            <p
              style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span
                style="">modparam("usrloc", "timer_interval", 60)</span></p>
            <p
              style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span
                style="">modparam("usrloc", "db_mode", 1)</span></p>
            <p
              style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span
                style="">modparam("usrloc", "db_timer_clean", 1)</span></p>
            <p
              style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span
                style="">modparam("usrloc", "use_domain", MULTIDOMAIN)</span></p>
            <p
              style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span
                style="">modparam("usrloc", "db_ops_ruid", 1)</span></p>
            <p
              style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span
                style="">modparam("usrloc", "db_check_update", 1)</span></p>
            <p
              style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span
                style="">#!endif</span></p>
            <p
style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px"><span
                style=""> </span></p>
            <div>I have been using it without any problems in other
              installations but in a  new one with 4. KAMAILIO im
              getting this error. I can see registrations on kamctl ul
              show but seems that option 1 is not working . Option 2
              does not update registrations from that device. </div>
          </div>
        </div>
        <div><br>
        </div>
        <div>Thanks</div>
      </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-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>
Kamailio World Conference, Berlin, May 18-20, 2016 - <a class="moz-txt-link-freetext" href="http://www.kamailioworld.com">http://www.kamailioworld.com</a></pre>
  </body>
</html>