<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hello,<br>
    <br>
    if I have understood correctly the module, the first parameter on
    the function is the group id you use to choose the destination on
    the database table.<br>
    <br>
    So if you use 1, select between configured destinations on group 1
    (column setid on the database), if you set 2, select between
    destinations on group 2 (column setid on the database). So the
    function look like:<br>
    <br>
    UserA ---&gt; ds_select_dst("1", "4")<br>
    UserB ---&gt; ds_select_dst("2", "4")<br>
    <br>
    If you save the first value of user in a variable like $var(group)
    you can use:<br>
    <br>
    UserA ---&gt; ds_select_dst("$var(group)", "4")<br>
    UserB ---&gt; ds_select_dst("$var(group)", "4")<br>
    <br>
    where set $var(group)=$rU<br>
    <br>
    then <br>
    <br>
    $var(group)=$var(group){s.substr,0,1})<br>
    <br>
    I think this work<br>
    <br>
    Regards<br>
    <br>
    <div class="moz-cite-prefix">El 19/11/2014 12:10, Satish Patel
      escribi&oacute;:<br>
    </div>
    <blockquote
cite="mid:CAPgF-foXsysz3jibriNaPYDPTeHQQJcd56VQk990WxNNwaqbQQ@mail.gmail.com"
      type="cite">
      <div dir="ltr"><br>
        <div>Thanks for reply, But i am confused here how do i pass that
          variable to ds_select_dst(set, alg) function?</div>
        <div><br>
        </div>
        <div>currently i have following set in my script, how do i
          replace "0" with variable? do you know? is there built in
          variable?&nbsp;</div>
        <div><br>
        </div>
        <div>ds_select_dst("0", "4")&nbsp;<br>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Wed, Nov 19, 2014 at 11:58 AM,
          campusvtv <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:campusvtv@gmail.com" target="_blank">campusvtv@gmail.com</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"> Hello,<br>
              <br>
              maybe you can configure the users using the same initial
              number for the same group.<br>
              <br>
              Example:<br>
              group 1<br>
              1001<br>
              1002<br>
              1003<br>
              1104<br>
              <br>
              group2<br>
              2001<br>
              2002<br>
              2003<br>
              2004<br>
              <br>
              then extract first value from $rU pseudo variable (group 1
              is 1, group 2 is 2) and use this group on the
              ds_select_dst(set, alg [, max_results]) function.<br>
              <br>
              Regards<br>
              <br>
              <br>
              <div>El 19/11/2014 11:31, Satish Patel escribi&oacute;:<br>
              </div>
              <blockquote type="cite">
                <div>
                  <div class="h5">
                    <div dir="ltr">Hi,
                      <div><br>
                      </div>
                      <div>We have running opensips 1.12 with
                        dispatcher, we want to route call to dispatcher
                        bases on specific users. Is there any way we can
                        implement that scenario?&nbsp;</div>
                      <div><br>
                      </div>
                      <div>Ex:</div>
                      <div><br>
                      </div>
                      <div>UserA ---&gt; dispatcherA</div>
                      <div>UserB ---&gt; dispatcherB &nbsp;</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>