<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#ffffff">
    <tt>Hello Miha,<br>
      <br>
      So you actually do not want to do failover for first LB (to try to
      find next less loaded destination on set 1), but rather do a
      completely different LB (if the first one failed) - different one
      as set of destinations and resources.<br>
      <br>
      Is this correct ?<br>
      <br>
      Regards,<br>
    </tt>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
    <br>
    On 06/26/2013 09:37 AM, Miha wrote:
    <blockquote cite="mid:51CA8C0D.4070502@softnet.si" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      <div class="moz-cite-prefix">Hello Bogdan,<br>
        <br>
        no, fisrt one is route[] is using (!load_balance("1","tran"))
        and second one in failoure route is using <small>(!load_balance("2","test"))

          parameteres. So, they are using different resources.<br>
          <br>
          BR,<br>
          Miha<br>
        </small><br>
        Dne 6/24/2013 4:44 PM, pi&#353;e Bogdan-Andrei Iancu:<br>
      </div>
      <blockquote cite="mid:51C85B4D.80901@opensips.org" type="cite">
        <meta content="text/html; charset=ISO-8859-1"
          http-equiv="Content-Type">
        Hello Miha,<br>
        <br>
        The CRITICAL error says that the the destinations previously
        selected (on first LB) do not have the resources requested by
        the second LB function.<br>
        <br>
        So, my first question is : when doing LB (first and second time
        in failure route), are you using the same set of resources ?<br>
        <br>
        Best regards,<br>
        <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
        <br>
        On 06/24/2013 04:54 PM, Miha wrote:
        <blockquote cite="mid:51C84F9D.9030206@softnet.si" type="cite">
          <meta http-equiv="content-type" content="text/html;
            charset=ISO-8859-1">
          HI,<br>
          <br>
          I need a little help regarding load_balance issue. I am doing
          load_balance, for 408 responses I am doing again in
          failure_route as I would like to implement callforward after
          some periad of time.<br>
          <br>
          Fist time load_balance from route[] works like it should but
          when I am doing it in failure_route I am getting this:<br>
          <br>
          DBG:load_balancer:do_load_balance: found requested (0)
          resource test<br>
          DBG:load_balancer:do_load_balance: sequential call of LB -
          previous selected dst is 1<br>
          DBG:load_balancer:do_load_balance: skipping destination <a
            moz-do-not-send="true" class="moz-txt-link-rfc2396E"
            href="sip:xxx.xxx.xxx.xxx:5060">&lt;sip:xxx.xxx.xxx.xxx:5060&gt;</a>
          (used=1 , disabled=0)<br>
          CRITICAL:load_balancer:get_dst_load: bug - cannot find request
          resource in dst<br>
          DBG:load_balancer:do_load_balance: destination <a
            moz-do-not-send="true" class="moz-txt-link-rfc2396E"
            href="sip:xxx.xxx.xxx.xxx:5060">&lt;sip:xxx.xxx.xxx.xxx:5060&gt;</a>
          selected for LB set with free=0 (max=0)<br>
          &nbsp;ERROR:load_balancer:do_load_balance: failed to remove from
          profile<br>
          <br>
          <br>
          <br>
          I tried with different resource and id group in failure_route
          as in route[] but still the same.<br>
          <br>
          not working:<br>
          <small>failure_route[CFW_NR]<br>
            {<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(t_check_status("408")){<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xlog("Zgodi se CFW_NR po $avp(cfw_nr_timeout)
            sekundah, cfwnr stevilka: $avp(cfw_nr)");<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $rU=$avp(cfw_nr);<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; route(number_translation_to_sbc);<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!load_balance("2","test")) {<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xlog("gre v !load_balance");<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; send_reply("503","Service
            Unavailable");<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit;<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
            <br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #route(from_sbc_slo);<br>
            <br>
            <br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
            }</small><br>
          <br>
          <br>
          works:<br>
          route[from_sbc_slo]{<br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xlog("from_sbc_slo load balancing");<br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!load_balance("1","tran")) {<br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xlog("gre v !load_balance");<br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; send_reply("503","Service
          Unavailable");<br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit;<br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xlog("doing load balancing");<br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; route(group_calls);<br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_relay();<br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit;<br>
          }<br>
          <br>
          <br>
          <table id="table_results" class="data">
            <thead><tr>
                <th><a moz-do-not-send="true"
href="http://212.13.252.2/phpmyadmin/sql.php?db=opensips&amp;table=load_balancer&amp;sql_query=SELECT+%2A+FROM+%60load_balancer%60+ORDER+BY+%60load_balancer%60.%60id%60+ASC&amp;token=c0371a75d6d4c9c17d156b486f075de6"
                    title="Razvrsti">id</a> </th>
                <th> <a moz-do-not-send="true"
href="http://212.13.252.2/phpmyadmin/sql.php?db=opensips&amp;table=load_balancer&amp;sql_query=SELECT+%2A+FROM+%60load_balancer%60+ORDER+BY+%60load_balancer%60.%60group_id%60+ASC&amp;token=c0371a75d6d4c9c17d156b486f075de6"
                    title="Razvrsti">group_id</a> </th>
                <th> <a moz-do-not-send="true"
href="http://212.13.252.2/phpmyadmin/sql.php?db=opensips&amp;table=load_balancer&amp;sql_query=SELECT+%2A+FROM+%60load_balancer%60+ORDER+BY+%60load_balancer%60.%60dst_uri%60+ASC&amp;token=c0371a75d6d4c9c17d156b486f075de6"
                    title="Razvrsti">dst_uri</a> </th>
                <th> <a moz-do-not-send="true"
href="http://212.13.252.2/phpmyadmin/sql.php?db=opensips&amp;table=load_balancer&amp;sql_query=SELECT+%2A+FROM+%60load_balancer%60+ORDER+BY+%60load_balancer%60.%60resources%60+ASC&amp;token=c0371a75d6d4c9c17d156b486f075de6"
                    title="Razvrsti">resources</a> </th>
                <th> <a moz-do-not-send="true"
href="http://212.13.252.2/phpmyadmin/sql.php?db=opensips&amp;table=load_balancer&amp;sql_query=SELECT+%2A+FROM+%60load_balancer%60+ORDER+BY+%60load_balancer%60.%60probe_mode%60+ASC&amp;token=c0371a75d6d4c9c17d156b486f075de6"
                    title="Razvrsti">probe_mode</a> </th>
                <th> <a moz-do-not-send="true"
href="http://212.13.252.2/phpmyadmin/sql.php?db=opensips&amp;table=load_balancer&amp;sql_query=SELECT+%2A+FROM+%60load_balancer%60+ORDER+BY+%60load_balancer%60.%60description%60+ASC&amp;token=c0371a75d6d4c9c17d156b486f075de6"
                    title="Razvrsti">description</a> </th>
              </tr>
            </thead> <tbody>
              <tr class="odd">
                <td align="center"> <input id="id_rows_to_delete0"
                    name="rows_to_delete[%60load_balancer%60.%60id%60+%3D+1]"
                    onclick="copyCheckboxesRange('rowsDeleteForm',
                    'id_rows_to_delete0','l');" value="DELETE FROM
                    `opensips`.`load_balancer` WHERE
                    `load_balancer`.`id` = 1" type="checkbox"> </td>
                <td align="center"> <a moz-do-not-send="true"
href="http://212.13.252.2/phpmyadmin/tbl_change.php?db=opensips&amp;table=load_balancer&amp;where_clause=%60load_balancer%60.%60id%60+%3D+1&amp;clause_is_unique=1&amp;sql_query=SELECT+%2A+FROM+%60load_balancer%60&amp;goto=sql.php&amp;token=c0371a75d6d4c9c17d156b486f075de6"><img
                      src="cid:part1.00040605.03010500@opensips.org"
                      title="Uredi" alt="Uredi" class="icon" height="16"
                      width="16"></a> </td>
                <td align="center"> <a moz-do-not-send="true"
href="http://212.13.252.2/phpmyadmin/sql.php?db=opensips&amp;table=load_balancer&amp;sql_query=DELETE+FROM+%60opensips%60.%60load_balancer%60+WHERE+%60load_balancer%60.%60id%60+%3D+1&amp;zero_rows=Vrstica+je+izbrisana&amp;goto=sql.php%3Fdb%3Dopensips%26table%3Dload_balancer%26sql_query%3DSELECT%2B%252A%2BFROM%2B%2560load_balancer%2560%26zero_rows%3DVrstica%2Bje%2Bizbrisana%26goto%3Dtbl_structure.php%26token%3Dc0371a75d6d4c9c17d156b486f075de6&amp;token=c0371a75d6d4c9c17d156b486f075de6"
                    onclick="return confirmLink(this, 'DELETE FROM
                    `opensips`.`load_balancer` WHERE
                    `load_balancer`.`id` = 1')"><img
                      src="cid:part2.05060604.04080406@opensips.org"
                      title="Izbri&#353;i" alt="Izbri&#353;i" class="icon"
                      height="16" width="16"></a> </td>
                <td class=" nowrap" align="right">1</td>
                <td class=" nowrap" align="right">1</td>
                <td class=""><a moz-do-not-send="true"
                    class="moz-txt-link-freetext"
                    href="sip:xxx.xxx.xxx.xxx:5060">sip:xxx.xxx.xxx.xxx:5060</a></td>
                <td class="">tran=20;test=30</td>
                <td class=" nowrap" align="right">2</td>
                <td class="">FS</td>
              </tr>
              <tr class="even">
                <td align="center"> <input id="id_rows_to_delete1"
                    name="rows_to_delete[%60load_balancer%60.%60id%60+%3D+2]"
                    onclick="copyCheckboxesRange('rowsDeleteForm',
                    'id_rows_to_delete1','l');" value="DELETE FROM
                    `opensips`.`load_balancer` WHERE
                    `load_balancer`.`id` = 2" type="checkbox"> </td>
                <td align="center"> <a moz-do-not-send="true"
href="http://212.13.252.2/phpmyadmin/tbl_change.php?db=opensips&amp;table=load_balancer&amp;where_clause=%60load_balancer%60.%60id%60+%3D+2&amp;clause_is_unique=1&amp;sql_query=SELECT+%2A+FROM+%60load_balancer%60&amp;goto=sql.php&amp;token=c0371a75d6d4c9c17d156b486f075de6"><img
                      src="cid:part1.00040605.03010500@opensips.org"
                      title="Uredi" alt="Uredi" class="icon" height="16"
                      width="16"></a> </td>
                <td align="center"> <a moz-do-not-send="true"
href="http://212.13.252.2/phpmyadmin/sql.php?db=opensips&amp;table=load_balancer&amp;sql_query=DELETE+FROM+%60opensips%60.%60load_balancer%60+WHERE+%60load_balancer%60.%60id%60+%3D+2&amp;zero_rows=Vrstica+je+izbrisana&amp;goto=sql.php%3Fdb%3Dopensips%26table%3Dload_balancer%26sql_query%3DSELECT%2B%252A%2BFROM%2B%2560load_balancer%2560%26zero_rows%3DVrstica%2Bje%2Bizbrisana%26goto%3Dtbl_structure.php%26token%3Dc0371a75d6d4c9c17d156b486f075de6&amp;token=c0371a75d6d4c9c17d156b486f075de6"
                    onclick="return confirmLink(this, 'DELETE FROM
                    `opensips`.`load_balancer` WHERE
                    `load_balancer`.`id` = 2')"><img
                      src="cid:part2.05060604.04080406@opensips.org"
                      title="Izbri&#353;i" alt="Izbri&#353;i" class="icon"
                      height="16" width="16"></a> </td>
                <td class=" nowrap" align="right">2</td>
                <td class=" nowrap" align="right">1</td>
                <td class=""><a moz-do-not-send="true"
                    class="moz-txt-link-freetext"
                    href="sip:xxx.xxx.xxx.xxx:5060">sip:xxx.xxx.xxx.xxx:5060</a></td>
                <td class="">tran=20</td>
                <td class=" nowrap" align="right">2</td>
                <td class="">FS2</td>
              </tr>
              <tr class="odd">
                <td align="center"> <input id="id_rows_to_delete2"
                    name="rows_to_delete[%60load_balancer%60.%60id%60+%3D+3]"
                    onclick="copyCheckboxesRange('rowsDeleteForm',
                    'id_rows_to_delete2','l');" value="DELETE FROM
                    `opensips`.`load_balancer` WHERE
                    `load_balancer`.`id` = 3" type="checkbox"> </td>
                <td align="center"> <a moz-do-not-send="true"
href="http://212.13.252.2/phpmyadmin/tbl_change.php?db=opensips&amp;table=load_balancer&amp;where_clause=%60load_balancer%60.%60id%60+%3D+3&amp;clause_is_unique=1&amp;sql_query=SELECT+%2A+FROM+%60load_balancer%60&amp;goto=sql.php&amp;token=c0371a75d6d4c9c17d156b486f075de6"><img
                      src="cid:part1.00040605.03010500@opensips.org"
                      title="Uredi" alt="Uredi" class="icon" height="16"
                      width="16"></a> </td>
                <td align="center"> <a moz-do-not-send="true"
href="http://212.13.252.2/phpmyadmin/sql.php?db=opensips&amp;table=load_balancer&amp;sql_query=DELETE+FROM+%60opensips%60.%60load_balancer%60+WHERE+%60load_balancer%60.%60id%60+%3D+3&amp;zero_rows=Vrstica+je+izbrisana&amp;goto=sql.php%3Fdb%3Dopensips%26table%3Dload_balancer%26sql_query%3DSELECT%2B%252A%2BFROM%2B%2560load_balancer%2560%26zero_rows%3DVrstica%2Bje%2Bizbrisana%26goto%3Dtbl_structure.php%26token%3Dc0371a75d6d4c9c17d156b486f075de6&amp;token=c0371a75d6d4c9c17d156b486f075de6"
                    onclick="return confirmLink(this, 'DELETE FROM
                    `opensips`.`load_balancer` WHERE
                    `load_balancer`.`id` = 3')"><img
                      src="cid:part2.05060604.04080406@opensips.org"
                      title="Izbri&#353;i" alt="Izbri&#353;i" class="icon"
                      height="16" width="16"></a> </td>
                <td class=" nowrap" align="right">3</td>
                <td class=" nowrap" align="right">2</td>
                <td class=""><a moz-do-not-send="true"
                    class="moz-txt-link-freetext"
                    href="sip:xxx.xxx.xxx.xxx2:5060">sip:xxx.xxx.xxx.xxx2:5060</a></td>
                <td class="">test=30</td>
                <td class=" nowrap" align="right">2</td>
                <td class="">FS2 test</td>
              </tr>
              <tr class="even">
                <td align="center"> <input id="id_rows_to_delete3"
                    name="rows_to_delete[%60load_balancer%60.%60id%60+%3D+4]"
                    onclick="copyCheckboxesRange('rowsDeleteForm',
                    'id_rows_to_delete3','l');" value="DELETE FROM
                    `opensips`.`load_balancer` WHERE
                    `load_balancer`.`id` = 4" type="checkbox"> </td>
                <td align="center"> <a moz-do-not-send="true"
href="http://212.13.252.2/phpmyadmin/tbl_change.php?db=opensips&amp;table=load_balancer&amp;where_clause=%60load_balancer%60.%60id%60+%3D+4&amp;clause_is_unique=1&amp;sql_query=SELECT+%2A+FROM+%60load_balancer%60&amp;goto=sql.php&amp;token=c0371a75d6d4c9c17d156b486f075de6"><img
                      src="cid:part1.00040605.03010500@opensips.org"
                      title="Uredi" alt="Uredi" class="icon" height="16"
                      width="16"></a> </td>
                <td align="center"> <a moz-do-not-send="true"
href="http://212.13.252.2/phpmyadmin/sql.php?db=opensips&amp;table=load_balancer&amp;sql_query=DELETE+FROM+%60opensips%60.%60load_balancer%60+WHERE+%60load_balancer%60.%60id%60+%3D+4&amp;zero_rows=Vrstica+je+izbrisana&amp;goto=sql.php%3Fdb%3Dopensips%26table%3Dload_balancer%26sql_query%3DSELECT%2B%252A%2BFROM%2B%2560load_balancer%2560%26zero_rows%3DVrstica%2Bje%2Bizbrisana%26goto%3Dtbl_structure.php%26token%3Dc0371a75d6d4c9c17d156b486f075de6&amp;token=c0371a75d6d4c9c17d156b486f075de6"
                    onclick="return confirmLink(this, 'DELETE FROM
                    `opensips`.`load_balancer` WHERE
                    `load_balancer`.`id` = 4')"><img
                      src="cid:part2.05060604.04080406@opensips.org"
                      title="Izbri&#353;i" alt="Izbri&#353;i" class="icon"
                      height="16" width="16"></a> </td>
                <td class=" nowrap" align="right">4</td>
                <td class=" nowrap" align="right">2</td>
                <td class=""><a moz-do-not-send="true"
                    class="moz-txt-link-freetext"
                    href="sip:xxx.xxx.xxx.xxx:5060">sip:xxx.xxx.xxx.xxx:5060</a></td>
                <td class="">test=20</td>
                <td class=" nowrap" align="right">2</td>
                <td class="">test</td>
              </tr>
            </tbody>
          </table>
          <br>
          <br>
          <br>
          <br>
          <br>
          <pre wrap=""><fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a moz-do-not-send="true" 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>
      </blockquote>
      <br>
    </blockquote>
  </body>
</html>