Hi Bogdan,<br><br>I used your approach and defined the same resource name &quot;sip&quot; for both definitions. It is working now as expected but another requirement raised for my scenario.<br><br>When all destinations for a specific group id are busy I want to re load-balance the request to a different group id. I expect this to run with the following configuration but it is not possible to re load_balance the request. I hope you can help me to find a solution.<br>
<br>I&#39;m testing this the following configuration. I&#39;m making a call to 8080. If <a href="mailto:service@host1.net">service@host1.net</a> is busy or if it receives timeout I expect call to be re load-balanced to a destination from group id 9090. But it is not. <br>
<br>load_balancer<br>+----+----------+-----------------------+-----------+------------+-------------+<br>

| id | group_id | dst_uri               | resources | probe_mode | description |<br>+----+----------+-----------------------+-----------+------------+-------------+<br>| 1 |  8080 |  <a href="mailto:sip%3Aservice@host1.net" target="_blank">sip:service@host1.net</a>   | sip=1     |          2 |             | <br>


| 2 |  9090 |  <a href="mailto:sip%3Aservice@host2.net" target="_blank">sip:service@host2.net</a>   | sip=1     |          2 |             |  <br>+----+----------+-----------------------+-----------+------------+-------------+<br>
<br>opensips.cfg<br>....<br>
route {<br>        ...<br>        route(3);<br>}<br><br>route[3] {<br>        if (is_method(&quot;INVITE&quot;)) {<br><br>            load_balance(&quot;8080&quot;, &quot;sip&quot;);<br>            if ($retcode &lt; 0) {<br>
                xlog(&quot;L_INFO&quot;, &quot;load_balancer: Insufficient resource to balance request from $fu to $tu . Re-balancing to route 4!\n&quot;);<br>                route(4);<br>            }<br>        }<br><br>
        t_on_failure(&quot;2&quot;);<br><br>        # send request<br>        if (!t_relay()) {<br>                sl_reply_error();<br>        }<br>        exit;<br>}<br><br>route[4] {<br>        if (is_method(&quot;INVITE&quot;)) {<br>
<br>            load_balance(&quot;9090&quot;, &quot;sip&quot;);<br>            if ($retcode &lt; 0) {<br>                xlog(&quot;L_INFO&quot;, &quot;load_balancer: Insufficient resource to balance request from $fu to $tu . Sending error!\n&quot;);<br>
                sl_send_reply(&quot;500&quot;, &quot;Service full&quot;);<br>                exit;<br>            }<br>        }<br><br>        t_on_failure(&quot;2&quot;);<br><br>        # send request<br>        if (!t_relay()) {<br>
                sl_reply_error();<br>        }<br>        exit;<br>}<br><br>failure_route[2] {<br>        if (t_was_cancelled()) {<br>                exit;<br>        }<br><br>        if (t_check_status(&quot;486|408&quot;)) {<br>
            xlog(&quot;L_INFO&quot;, &quot;load_balancer: Request from $fu to $tu failed. Re-balancing to 8080!\n&quot;);<br>            lb_disable();<br>            load_balance(&quot;8080&quot;, &quot;sip&quot;);<br><br>
            if ($retcode &lt; 0) {<br>                xlog(&quot;L_INFO&quot;, &quot;load_balancer: Insufficient resource to balance request from $fu to $tu . Re-balancing to route 4!\n&quot;);<br>                route(4);<br>
            }<br>            t_on_failure(&quot;2&quot;);<br>            t_relay();<br>        }<br>}<br><br>opensips.log<br>...<br>
Dec  8 10:56:57 sipproxy /sbin/opensips[11299]: load_balancer: Request
from <a href="mailto:sip%3Atest@10.10.5.10">sip:test@10.10.5.10</a> to <a href="http://sip:8080@10.10.6.6:5060">sip:8080@10.10.6.6:5060</a> failed.
Re-balancing to 8080! <br>
Dec  8 10:56:57 sipproxy /sbin/opensips[11299]: load_balancer:
Insufficient resource to balance request from <a href="mailto:sip%3Atest@10.10.5.10">sip:test@10.10.5.10</a> to <a href="http://sip:8080@10.10.6.6:5060">sip:8080@10.10.6.6:5060</a> .
Re-balancing to route 4! <br>
Dec  8 10:56:57 sipproxy /sbin/opensips[11299]: load_balancer:
Insufficient resource to balance request from <a href="mailto:sip%3Atest@10.10.5.10">sip:test@10.10.5.10</a> to <a href="http://sip:8080@10.10.6.6:5060">sip:8080@10.10.6.6:5060</a> . Sending
error!<br><br><br>Thanks,<br>Taner<br><br><br><div class="gmail_quote">On Sun, Nov 15, 2009 at 10:12 PM, Bogdan-Andrei Iancu <span dir="ltr">&lt;<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Hi Taner,<br>
<br>
I would suggest a different approach - as from LB point of view you do<br>
not care too much if it VM or CONF - what is important is that each of<br>
your box has only on channel, so I would define a resource the number of<br>
channels each box can handle .<br>
<div><br>
+----+----------+------------------------+---------------------------------+<br>
| id | group_id | dst_uri                | resources                       |<br>
+----+----------+------------------------+---------------------------------+<br>
<br>
</div>|  1 |      555 |  <a href="mailto:sip%3Aservice@host1.net" target="_blank">sip:service@host1.net</a> &lt;mailto:<a href="mailto:sip%253Aservice@host1.net" target="_blank">sip%3Aservice@host1.net</a>&gt; | channel=1                       |<br>


|  2 |      555 |  <a href="mailto:sip%3Aservice@host2.net" target="_blank">sip:service@host2.net</a> &lt;mailto:<a href="mailto:sip%253Aservice@host2.net" target="_blank">sip%3Aservice@host2.net</a>&gt; | channel=1                       |<br>


<br>
+----+----------+------------------------+---------------------------------+<br>
<br>
<br>
and do (when routing a VM or conference call) :<br>
    &#39;load_balance(.., &quot;channel&quot;);&#39;<br>
<br>
Regards,<br>
Bogdan<br>
<div><br>
<br>
Taner Sener wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; I&#39;m using load balancer module on 1.6.0-notls (i386/linux) to balance<br>
&gt; incoming sip calls to sip clients. The case is; my sip clients are<br>
&gt; capable of serving multiple types of calls. But not in the same time<br>
&gt; like in the definition &quot;vm=1;conf=1&quot;. Only one of them is available at<br>
&gt; that moment. They can process either a vm call, either a conf call;<br>
&gt; not one vm call and one conf call. Is there a way to define it?<br>
&gt;<br>
&gt; +----+----------+------------------------+---------------------------------+<br>
&gt; | id | group_id | dst_uri                | resources                       |<br>
&gt; +----+----------+------------------------+---------------------------------+<br>
&gt;<br>
</div>&gt; |  1 |      555 |  <a href="mailto:sip%3Aservice@host1.net" target="_blank">sip:service@host1.net</a> &lt;mailto:<a href="mailto:sip%253Aservice@host1.net" target="_blank">sip%3Aservice@host1.net</a>&gt; | vm=1; conf=1                    |<br>



&gt; |  2 |      555 |  <a href="mailto:sip%3Aservice@host2.net" target="_blank">sip:service@host2.net</a> &lt;mailto:<a href="mailto:sip%253Aservice@host2.net" target="_blank">sip%3Aservice@host2.net</a>&gt; | vm=1; conf=1                    |<br>


<div>&gt;<br>
&gt; +----+----------+------------------------+---------------------------------+<br>
&gt;<br>
&gt; Current &#39;resources&#39; field of load_balancer table ANDs resource types<br>
&gt; given with semi-colon and I when I invoke<br>
&gt;<br>
&gt; &#39;load_balance(.., &quot;vm&quot;)&#39;<br>
&gt;<br>
&gt; and<br>
&gt;<br>
&gt; &#39;load_balance(.., &quot;conf&quot;)&#39;<br>
&gt;<br>
&gt; second load balanced call receives busy and balancing fails there<br>
&gt; because that client is serving to vm call. How can I configure<br>
&gt; load_balanced module to select it right?<br>
&gt;<br>
&gt; Thanks,<br>
&gt; Taner<br>
</div>&gt; ------------------------------------------------------------------------<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Users mailing list<br>
&gt; <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
&gt; <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
&gt;<br>
<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div><br>