<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <font face="monospace">Hi Alberto,<br>
      <br>
      For the dialog replications, the noSQL is used only for counters
      on the dialog profiles, not for sharing the calls. The calls are
      shared directly via the clustering layer and you will see the same
      of dialogs on all OpenSIPs nodes (via MI dlg_list). Of course, you
      can combine a SQL DB in dialog module, for dumping the dialogs
      into DB. In this way, whatever is in memory (either calls started
      by the node, either calls received via replication) will also end
      up in the SQL DB.<br>
      <br>
      Best regards,<br>
    </font>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
OpenSIPS eBootcamp 2021 
  <a class="moz-txt-link-freetext" href="https://opensips.org/training/OpenSIPS_eBootcamp_2021/">https://opensips.org/training/OpenSIPS_eBootcamp_2021/</a></pre>
    <div class="moz-cite-prefix">On 1/18/22 6:26 PM, Alberto wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CANoA6_+=1pizrN6YsW=naD1uDVo5=BOyLU3ec5txs0KLpyAQyw@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div>Hi,</div>
        <div><br>
        </div>
        <div>Thanks, I was playing around with the clusterer module, but
          I can't quite figure something out.
          <div><br>
          </div>
          <div>In the database I have this entry in the clusterer table:</div>
          <div>
            <div>id: 1</div>
          </div>
          <div>cluster_id: 1</div>
          <div>node_id: 1</div>
          <div>url: bin:<a href="http://10.0.0.184:5555"
              moz-do-not-send="true">10.0.0.184:5555</a></div>
          <div>state: 1</div>
          <div>no_ping_retries: 3</div>
          <div>priority: 50</div>
          <div>sip_addr: 10.0.0.184</div>
          <div>flags: seed</div>
          <div><br>
          </div>
          <div>And here's my configuration:</div>
        </div>
        <div><br>
          loadmodule "clusterer.so"<br>
          modparam("clusterer", "db_url",
          "unixodbc://opensips:opensipsrw@localhost/opensips")<br>
          modparam("clusterer", "my_node_id", 1)</div>
        <div><br>
        </div>
        <div>loadmodule "dialog.so"<br>
          modparam("dialog", "default_timeout", 14400) # 4 hours<br>
          modparam("dialog", "dlg_match_mode", 1)<br>
          modparam("dialog", "enable_stats", 0)<br>
          modparam("dialog", "profiles_with_value", "caller")<br>
          modparam("dialog", "cachedb_url", "mongodb://db.dialog")<br>
          modparam("dialog", "dialog_replication_cluster", 1)</div>
        <div><br>
        </div>
        <div>loadmodule "usrloc.so"<br>
          modparam("usrloc", "nat_bflag", "NAT")<br>
          modparam("usrloc", "use_domain", 1)<br>
          modparam("usrloc", "cachedb_url", "mongodb://db.usrloc")<br>
          modparam("usrloc", "working_mode_preset",
          "federation-cachedb-cluster")<br>
          modparam("usrloc", "location_cluster", 1)</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>Now when a user registers, the usrloc collection in mongodb
          gets populated with some details.</div>
        <div>But when I start a call instead, the dialog collection
          stays empty. What do I need to do to write the dialogs?</div>
        <div>I'm testing with only one opensips server for now, so
          that's the only entry in the clusterer table.</div>
        <div>Thanks.<br>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Tue, 18 Jan 2022 at 12:50,
          Bogdan-Andrei Iancu <<a href="mailto:bogdan@opensips.org"
            moz-do-not-send="true">bogdan@opensips.org</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> <font face="monospace">Hi Aberto,<br>
              <br>
              It is not a good strategy to blindly share the tables for
              usrloc or dialog between multiple opensips instances, as
              this will lead to data conflicts. Of course, you can have
              all pointing to the same DB, but one table per opensips
              server.<br>
              <br>
              If you want to aggregate the data (between all opensips
              instances), there is no other way than using the
              clustering .<br>
              <br>
              Regards,<br>
            </font>
            <pre cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a href="https://www.opensips-solutions.com" target="_blank" moz-do-not-send="true">https://www.opensips-solutions.com</a>
OpenSIPS eBootcamp 2021 
  <a href="https://opensips.org/training/OpenSIPS_eBootcamp_2021/" target="_blank" moz-do-not-send="true">https://opensips.org/training/OpenSIPS_eBootcamp_2021/</a></pre>
            <div>On 1/16/22 1:47 PM, Alberto wrote:<br>
            </div>
            <blockquote type="cite">
              <div dir="ltr">
                <div>Hi,</div>
                <div>I need several opensips servers to save usrloc and
                  dialog to the same central database, not for
                  clustering/ha, but for reporting and billing.</div>
                <div>Is it safe to point multiple usrloc and dialog
                  modules to a central database using the db_url? Or
                  would they cause conflicts?</div>
                <div>Since it's not a cluster where they use the shared
                  information, I would prefer to avoid the complexity of
                  the clusterer module. But I need to know one server
                  won't cancel another server location or dialog.</div>
                <div>Thanks<br>
                </div>
              </div>
              <br>
              <fieldset></fieldset>
              <pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank" moz-do-not-send="true">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank" moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
            </blockquote>
            <br>
          </div>
        </blockquote>
      </div>
    </blockquote>
    <br>
  </body>
</html>