<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>Can you provide full DEBUG level logs on the server while you
      are dialing "sip3"?  Thanks!<br>
    </tt>
    <pre class="moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
    <div class="moz-cite-prefix">On 29.07.2019 13:01, Sasmita Panda
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CALf-Q46yxA2sPB0sM01Cd0YdnTST8Kjqtn+LJwhkqiz3eR-8Cg@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">Thank you Liviu ,
        <div><br>
        </div>
        <div>I got your explanation .  fullsharing and
          fullsharing_cachedb , these two works when there is no NAT
          between the user and opensips node .  This is clear now . </div>
        <div><br>
        </div>
        <div>I am facing another problem . May be I am doing any silly
          mistake . </div>
        <div><br>
        </div>
        <div>> db.userlocation.find({ "_id" : "<a
            href="mailto:sip3@opensips-local.com" moz-do-not-send="true">sip3@opensips-local.com</a>"})<br>
          { "_id" : "<a href="mailto:sip3@opensips-local.com"
            moz-do-not-send="true">sip3@opensips-local.com</a>",
          "aorhash" : 101148538, "contacts" : { "c2lwOnNpcDNAMTk" : {
          "attr" : null, "sip_instance" : null, "methods" : 5888, "sock"
          : "udp:<a href="http://192.168.0.1:5508"
            moz-do-not-send="true">192.168.0.1:5508</a>", "path" : null,
          "received" : null, "cflags" : "", "last_mod" :
          NumberLong(1564393280), "ua" : "WebAstra", "flags" : 0, "cseq"
          : 34914, "callid" : "ad275697703", "q" : 100, "expires" :
          1564393580, "contact" : <a class="moz-txt-link-rfc2396E" href="mailto:sip:sip3@192.168.0.x:56401">"sip:sip3@192.168.0.x:56401"</a> } } }<br>
          <br>
          > db.userlocation.find({ "_id" : "<a
            href="mailto:5656@opensips-local.com" moz-do-not-send="true">5656@opensips-local.com</a>"})<br>
          { "_id" : "<a href="mailto:5656@opensips-local.com"
            moz-do-not-send="true">5656@opensips-local.com</a>",
          "aorhash" : 1015579193, "contacts" : { "c2lwOjU2NTZAMT" : {
          "attr" : null, "sip_instance" : null, "methods" : 8063, "sock"
          : "udp:<a href="http://192.168.0.2:5508"
            moz-do-not-send="true">192.168.0.2:5508</a>", "path" : null,
          "received" : null, "cflags" : "", "last_mod" :
          NumberLong(1564392892), "ua" : "MicroSIP/3.15.10", "flags" :
          0, "cseq" : 29098, "callid" : "5355813986f94a2", "q" : -1,
          "expires" : 1564393192, "contact" :
          <a class="moz-txt-link-rfc2396E" href="mailto:sip:5656@192.168.0.x:49396;ob">"sip:5656@192.168.0.x:49396;ob"</a> } } }<br>
        </div>
        <div><br>
        </div>
        <div>I have 2 user sip3 , 5656  . The contact exists in the
          cachedb also . But when I am dialing 5656 (configure in a
          softphone )call goes to that user . But when I am dialing sip3
          (username of 1 agent)  then opensips gives "404 Not Found" .  </div>
        <div>Why so ? Both the contact in the cache looks similar .
          Still why call wont go to sip3 .  In other mode of clustering
          also this thing happens . What mistake  am I doing ?</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br clear="all">
          <div>
            <div dir="ltr" class="gmail_signature"
              data-smartmail="gmail_signature">
              <div dir="ltr">
                <div>
                  <div dir="ltr"><b><i>Thanks & Regards</i></b>
                    <div><i>Sasmita Panda</i></div>
                    <div><i>Senior Network Testing and Software Engineer</i></div>
                    <div><i>3CLogic , ph:07827611765</i></div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <br>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Thu, Jul 25, 2019 at 4:03
          PM Liviu Chircu <<a href="mailto:liviu@opensips.org"
            moz-do-not-send="true">liviu@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 bgcolor="#FFFFFF">
            <p><tt>Hi Sasmita,</tt></p>
            <p><tt>As I have written with bold font in the docs of each
                cluster parameter:</tt><br>
              <br>
              <tt><strong
style="color:rgb(0,0,0);font-family:Helvetica,Arial;font-size:12px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;text-align:justify;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">This
                  parameter will get overridden if either<span> </span><a
                    class="gmail-m_-2482416658997679248xref"
href="https://opensips.org/html/docs/modules/3.0.x/usrloc.html#param_working_mode_preset"
                    title="1.5.26. working_mode_preset (string)"
                    style="color:rgb(4,31,197);text-decoration:none"
                    target="_blank" moz-do-not-send="true">working_mode_preset</a><span> </span>or<span> </span><a
                    class="gmail-m_-2482416658997679248xref"
href="https://opensips.org/html/docs/modules/3.0.x/usrloc.html#param_db_mode"
                    title="1.5.25. db_mode (integer, deprecated)"
                    style="color:rgb(4,31,197);text-decoration:none"
                    target="_blank" moz-do-not-send="true">db_mode</a><span> </span>is
                  set.</strong></tt><br>
              <br>
              <tt><tt>If you want some low-level configuration for your
                  usrloc cluster (and not the defaults),<br>
                  do not set the "working_mode_preset".  It's job is to
                  make it easy to get everything<br>
                  working.</tt></tt></p>
            <p><tt><tt>Regarding 2): the default of
                  "full-sharing-cluster" is to sync from cluster. 
                  That's why<br>
                  you get no data in MySQL.  Just remove
                  "working_mode_preset", and change the persistency<br>
                  to "sync-from-sql", so it starts writing the data over
                  there.</tt></tt></p>
            <p><tt><tt>An architecture comment regarding 2): you are
                  doing full sharing (any node should be able<br>
                  to take over any contact), so make sure your network
                  topology supports this.  A<br>
                  front-end SIP entity that's balancing traffic to this
                  cluster + SIP path headers is needed<br>
                  here before it can logically work, otherwise you'll
                  run into NAT issues (only the home server<br>
                  will be able to route back to the phone, rather than
                  any node which has the data)</tt></tt></p>
            <p><tt><tt>Regarding 3): same architectural issue as in 2). 
                  You are attempting to builkd a homogeneous cluster,<br>
                  yet this is not true, because of all sort of NAT
                  limitations, restraining traffic to be only<br>
                  sent from a certain node at a time.</tt></tt></p>
            <p><tt><tt>Conclusion:  we didn't make these multiple modes
                  just for fun, each of them serves its purpose :)<br>
                  And I agree that for your current needs, it seems like
                  the "federated" clustering is the way to go.<br>
                </tt></tt></p>
            <p><tt><tt>Best regards,<br>
                </tt></tt></p>
            <pre class="gmail-m_-2482416658997679248moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a class="gmail-m_-2482416658997679248moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank" moz-do-not-send="true">http://www.opensips-solutions.com</a></pre>
            <div class="gmail-m_-2482416658997679248moz-cite-prefix">On
              25.07.2019 13:05, Sasmita Panda wrote:<br>
            </div>
            <blockquote type="cite">
              <div dir="ltr">I need some clarification on cluster_mode
                and working_mode_preset parameter . 
                <div><br>
                </div>
                <div>modparam("usrloc", "location_cluster", 1)<br>
                  modparam("usrloc", "working_mode_preset",
                  "federation-cachedb-cluster")<br>
                  modparam("usrloc", "cluster_mode",
                  "federation-cachedb")<br>
                  modparam("usrloc", "restart_persistency",
                  "sync-from-cluster")<br>
                  <b>1. metadata in mongoDB and exact AOR in opensips
                    memory through which user is registered  .  call
                    work fine even when both registered through
                    different node .</b><br>
                  <br>
                  modparam("usrloc", "working_mode_preset",
                  "full-sharing-cluster")<br>
                  modparam("usrloc", "cluster_mode", "full-sharing")<br>
                  modparam("usrloc", "restart_persistency",
                  "sync-from-cluster")<br>
                  <b>2. no metadata in mongoDB . AOR of user in opensips
                    memory oly and synced with each node . So call wont
                    work when 2 user register through different node . </b><br>
                  <br>
                  modparam("usrloc", "working_mode_preset",
                  "full-sharing-cachedb-cluster")<br>
                  modparam("usrloc", "cluster_mode",
                  "full-sharing-cachedb")<br>
                  <b>3. exact AOR in mongoDB . nothing exist in the
                    opensips memory . This even wont work when both user
                    registered through different node . </b><br>
                  <br>
                  I was assuming things will work fine in every
                  condition . but its not working . Am I missing
                  anything in the config so that its not working for me
                  in 2nd and 3rd scenario ?<br>
                  <br>
                  In any of above case the data is not getting saved in
                  the mysql DB . I think it wont even get saved in mysql
                  DB . when we use working_mode_preset we cant use
                  db_mode . <br>
                  <br>
                  I think the 1st option is only preferable .  Is the
                  2nd and 3rd option has this limitations ? Or I have to
                  add something in the config as well to make this work
                  ?<br>
                </div>
                <div><br>
                </div>
                <div><br>
                </div>
                <div><br>
                </div>
                <div>
                  <div>
                    <div dir="ltr"
                      class="gmail-m_-2482416658997679248gmail_signature">
                      <div dir="ltr">
                        <div>
                          <div dir="ltr"><b><i>Thanks & Regards</i></b>
                            <div><i>Sasmita Panda</i></div>
                            <div><i>Senior Network Testing and Software
                                Engineer</i></div>
                            <div><i>3CLogic , ph:07827611765</i></div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                  <br>
                </div>
              </div>
              <br>
              <div class="gmail_quote">
                <div dir="ltr" class="gmail_attr">On Wed, Jul 24, 2019
                  at 6:32 PM Liviu Chircu <<a
                    href="mailto:liviu@opensips.org" target="_blank"
                    moz-do-not-send="true">liviu@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 bgcolor="#FFFFFF"> On 24.07.2019 15:33, Sasmita
                    Panda wrote:<br>
                    <blockquote type="cite">
                      <div>Questions :</div>
                      <div>1. In user location of mongo db , it saves
                        the data of the user with the node IP . Its not
                        the actual AOR of the user . Where does the
                        actual AOR get saved ? Is that saved in the
                        memory of opensips node only?<br>
                      </div>
                    </blockquote>
                    <tt>Correct: the MongoDB only holds metadata,
                      showing where the user is reachable from to all
                      nodes.  The actual AoR is saved<br>
                      in OpenSIPS memory, which is then sync'ed to the
                      local MySQL "location" table, for restart
                      persistency purposes.  See<br>
                      the restart_persistency [1] modparam for more
                      details.<br>
                    </tt><br>
                    <blockquote type="cite">
                      <div> 2. As the cluster info is in the mysql DB  ,
                        If 1 node will get down , then I have to update
                        the DB immediately and restart the service ? OR
                        that node will be disabled automatically no need
                        of service restart ? <br>
                      </div>
                    </blockquote>
                    <tt>No need to edit anything.  The cluster detects
                      when a node is down and acts accordingly.</tt><tt> 
                      <br>
                      The cluster nodes will keep sending "probing"
                      pings, to detect when it comes back online.</tt><tt><br>
                    </tt>
                    <p><tt>Regards,</tt><br>
                    </p>
                    <tt>[1]: </tt><tt><a
href="https://opensips.org/html/docs/modules/3.0.x/usrloc.html#param_restart_persistency"
                        target="_blank" moz-do-not-send="true">https://opensips.org/html/docs/modules/3.0.x/usrloc.html#param_restart_persistency<br>
                        <br>
                      </a></tt>
                    <pre class="gmail-m_-2482416658997679248gmail-m_3485052808611004700moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a class="gmail-m_-2482416658997679248gmail-m_3485052808611004700moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank" moz-do-not-send="true">http://www.opensips-solutions.com</a></pre>
                    <a
href="https://opensips.org/html/docs/modules/3.0.x/usrloc.html#param_restart_persistency"
                      target="_blank" moz-do-not-send="true"><br>
                    </a> </div>
                  _______________________________________________<br>
                  Users mailing list<br>
                  <a href="mailto:Users@lists.opensips.org"
                    target="_blank" moz-do-not-send="true">Users@lists.opensips.org</a><br>
                  <a
                    href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
                    rel="noreferrer" target="_blank"
                    moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
                </blockquote>
              </div>
              <br>
              <fieldset
                class="gmail-m_-2482416658997679248mimeAttachmentHeader"></fieldset>
              <pre class="gmail-m_-2482416658997679248moz-quote-pre">_______________________________________________
Users mailing list
<a class="gmail-m_-2482416658997679248moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" target="_blank" moz-do-not-send="true">Users@lists.opensips.org</a>
<a class="gmail-m_-2482416658997679248moz-txt-link-freetext" 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>
          </div>
          _______________________________________________<br>
          Users mailing list<br>
          <a href="mailto:Users@lists.opensips.org" target="_blank"
            moz-do-not-send="true">Users@lists.opensips.org</a><br>
          <a
            href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
            rel="noreferrer" target="_blank" moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
        </blockquote>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
  </body>
</html>