<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hello,<br>
      <br>
      It will do fail-over.<br>
      <br>
      Best Regards,<br>
      <pre class="moz-signature" cols="72">Vlad Paiu
OpenSIPS Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a> </pre>
      On 19.03.2015 18:39, Satish Patel wrote:<br>
    </div>
    <blockquote
cite="mid:CAPgF-fp0oCCCyW_KV0PHe7Zb=rH9Ve0Xic+r8JtGhdB2o9ez8w@mail.gmail.com"
      type="cite">
      <div dir="ltr">Thanks Vlad,&nbsp;
        <div><br>
        </div>
        <div>Superb! so it will do round-robin? or fail-over?&nbsp;</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Thu, Mar 19, 2015 at 12:30 PM, Vlad
          Paiu <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:vladpaiu@opensips.org" target="_blank">vladpaiu@opensips.org</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div text="#000000" bgcolor="#FFFFFF">
              <div>Hello,<br>
                <br>
                If you want to do dispatching between multiple setids,
                ds_select_dst() allows that. See the docs at [1] , you
                can provide a comma separated list of setids - so your
                $avp(zone) can contain '1,2' and OpenSIPS will try to
                first send to the servers in setid 1, and then, if those
                fail, to the servers in setid 2.<br>
                <br>
                [1] <a moz-do-not-send="true"
href="http://www.opensips.org/html/docs/modules/1.11.x/dispatcher#id294368"
                  target="_blank">http://www.opensips.org/html/docs/modules/1.11.x/dispatcher#id294368</a><br>
                <br>
                Best Regards,<br>
                <pre cols="72">Vlad Paiu
OpenSIPS Developer
<a moz-do-not-send="true" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a> </pre>
                <div>
                  <div class="h5"> On 19.03.2015 06:17, Satish Patel
                    wrote:<br>
                  </div>
                </div>
              </div>
              <blockquote type="cite">
                <div>
                  <div class="h5">
                    <div dir="ltr">I have add extra "zone" column in
                      subscriber table, <br>
                      <div><br>
                        +--------------+---------+<br>
                        | username |&nbsp; zone |<br>
                        +--------------+---------+<br>
                        |&nbsp;&nbsp;&nbsp; 1001&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp; &nbsp; 1&nbsp;&nbsp;&nbsp; |<br>
                        |&nbsp;&nbsp;&nbsp; 1002&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp; &nbsp; 2&nbsp; &nbsp; |<br>
                        +--------------+---------+<br>
                        <br>
                        <br>
                      </div>
                      <div>In dispatcher table I have following two
                        Freeswitch in two groups. <br>
                      </div>
                      <div><br>
+-------+-----------------------------+--------------------+<br>
                        | setid | destination&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; |
                        description&nbsp;&nbsp;&nbsp; |<br>
+-------+------------------------------+-------------------+<br>
                        |&nbsp;&nbsp;&nbsp;&nbsp; 1 | sip:<a moz-do-not-send="true"
                          href="http://fs1.example.com" target="_blank">fs1.example.com</a>
                        | Freeswitch-1 |<br>
                        |&nbsp;&nbsp;&nbsp;&nbsp; 2 | sip:<a moz-do-not-send="true"
                          href="http://fs2.example.com" target="_blank">fs2.example.com</a>
                        | Freeswitch-2 |<br>
+-------+------------------------------+-------------------+<br>
                        <br>
                        <br>
                      </div>
                      <div>in opensips.cfg script i am query subscriber
                        table base on incoming username and storing zone
                        in avp(zone) variable, and calling same variable
                        in following code<br>
                        <br>
                        if ( !ds_select_dst("$avp(zone)", "4", "FM10"))<br>
                        <br>
                      </div>
                      <div>Question: now either user belongs to zone 1
                        or 2, so it is *NOT* going to do load-balancing
                        between two. But if I want to allow some user to
                        do load-balancing then how it will be possible
                        in above scenario?&nbsp; <br>
                        <br>
                      </div>
                      <div>Can i set "setid" on fly so i can pass
                        request along with user request and set same
                        group for both switch and user call load-balance
                        on both switch? <br>
                        <br>
                      </div>
                      <div>Any other idea? <br>
                      </div>
                    </div>
                    <br>
                    <fieldset></fieldset>
                    <br>
                  </div>
                </div>
                <pre>_______________________________________________
Users mailing list
<a moz-do-not-send="true" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a moz-do-not-send="true" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
              </blockquote>
              <br>
            </div>
            <br>
            _______________________________________________<br>
            Users mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
            <a moz-do-not-send="true"
              href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
              target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
            <br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <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>
    <br>
  </body>
</html>