Hi<br><br>I get the following unexpected behavior:<br><br>Two kamailio servers configured to handle REGISTER and OPTIONS receive a traffic load-balanced by a third kamailio/dispatcher node. This works and both servers are receiving equal loads of REGISTER and periodic OPTIONS.<br>
<br>I shutdown first kamailio gateway and I see that almost imediately all the traffic goes to this server instead of being rerouted to the running server ?! After some seconds (eg. 10 seconds) the running gateway does not receive anymore traffic and all the traffic is sent to the server that is shutdown. After more than 20 seconds, the running gateway starts receiving all the traffic.<br>
<br>Nevertheless, when I start again the gateway I&#39;ve shutdowned, traffic is almost immediately load-balanced again.<br><br>I&#39;m testing the following configuration:<br><br>modparam(&quot;dispatcher&quot;, &quot;list_file&quot;, &quot;/usr/local/etc/kamailio/dispatcher.list&quot;)<br>
modparam(&quot;dispatcher&quot;, &quot;flags&quot;, 3)<br>modparam(&quot;dispatcher&quot;, &quot;dst_avp&quot;, &quot;$avp(i:271)&quot;)<br>modparam(&quot;dispatcher&quot;, &quot;grp_avp&quot;, &quot;$avp(i:272)&quot;)<br>
modparam(&quot;dispatcher&quot;, &quot;cnt_avp&quot;, &quot;$avp(i:273)&quot;)<br>modparam(&quot;dispatcher&quot;, &quot;ds_ping_method&quot;, &quot;OPTIONS&quot;)<br>modparam(&quot;dispatcher&quot;, &quot;ds_ping_interval&quot;, 3)<br>
modparam(&quot;dispatcher&quot;, &quot;ds_ping_from&quot;, &quot;<a href="mailto:sip%3Afend1@10.132.184.33">sip:fend1@10.132.184.33</a>&quot;)<br>modparam(&quot;dispatcher&quot;, &quot;ds_probing_threshhold&quot;, 1)<br>modparam(&quot;dispatcher&quot;, &quot;ds_probing_mode&quot;, 1)<br>
<br>route{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (is_method(&quot;REGISTER&quot;) || is_method(&quot;OPTIONS&quot;)) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ds_select_dst(&quot;1&quot;, &quot;0&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_on_failure(&quot;1&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_relay();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>}<br><br>failure_route[1] {<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xlog(&quot;L_INFO&quot;, &quot;Marking GW as failed...\n&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ds_mark_dst(&quot;p&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ds_next_dst();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_on_failure(&quot;1&quot;);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_relay();<br><br>}<br><br><br>Any idea of what is wrong ?<br><br>Regards,<br>Pascal<br><br><br><br><br><br><br><br><div class="gmail_quote">On Mon, Oct 27, 2008 at 11:04 AM, Pascal Maugeri <span dir="ltr">&lt;<a href="mailto:pascal.maugeri@gmail.com">pascal.maugeri@gmail.com</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<br><br>Thanks this is what I was testing right now :-)<br>I&#39;m also testing the &quot;ds_probing_mode&quot; = 1 that recommended me Klaus.<br>
<br>I understand that the scenario you describe is that OPTIONS are sent when the gw is set in &quot;probe&quot; mode ? I have exactly the opposite behaviour here:<br>
<br>modparam(&quot;dispatcher&quot;, &quot;list_file&quot;, &quot;/usr/local/etc/kamailio/dispatcher.list&quot;)<br>modparam(&quot;dispatcher&quot;, &quot;flags&quot;, 3)<br>modparam(&quot;dispatcher&quot;, &quot;dst_avp&quot;, &quot;$avp(i:271)&quot;)<br>

modparam(&quot;dispatcher&quot;, &quot;grp_avp&quot;, &quot;$avp(i:272)&quot;)<br>modparam(&quot;dispatcher&quot;, &quot;cnt_avp&quot;, &quot;$avp(i:273)&quot;)<div class="Ih2E3d"><br>modparam(&quot;dispatcher&quot;, &quot;ds_ping_method&quot;, &quot;OPTIONS&quot;)<br>

modparam(&quot;dispatcher&quot;, &quot;ds_ping_interval&quot;, 3)<br></div>modparam(&quot;dispatcher&quot;, &quot;ds_ping_from&quot;, &quot;<a href="mailto:sip%3Afend1@10.132.184.33" target="_blank">sip:fend1@10.132.184.33</a>&quot;)<div class="Ih2E3d">
<br>modparam(&quot;dispatcher&quot;, &quot;ds_probing_threshhold&quot;, 3)<br></div>
modparam(&quot;dispatcher&quot;, &quot;ds_probing_mode&quot;, 1)<br><br>I have a simple scenario of load-balancing REGISTER and it looks to work somehow also when I shutdown one gateway my load-balancer takes to much time to detect it.<br>

Does the failure-route also apply to timeout error (REGISTER messages are not handled by the gw that is shutdown) ?<br><br>Regards,<br><font color="#888888">Pascal</font><div><div></div><div class="Wj3C7c"><br> <br><br><div class="gmail_quote">
On Mon, Oct 27, 2008 at 10:45 AM, Carsten Bock <span dir="ltr">&lt;<a href="mailto:lists@bock.info" target="_blank">lists@bock.info</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,<br>
<br>
you have to add a failure-route, where you set the state to probing<br>
(e.g. ds_set_state(&quot;p&quot;)). If this is set 3 times<br>
(ds_probing_threshhold), the gateway will be longer selected from<br>
ds_select_domain / .._dst and will be queried with an OPTIONS-request.<br>
In case of a successful query, the gateway will be enabled again.<br>
As long as the state is active, you will not see any OPTIONS-request.<br>
<br>
Carsten<br>
<br>
Am Freitag, den 24.10.2008, 18:08 +0200 schrieb Klaus Darilion:<br>
<div><div></div><div>&gt; Maybe try<br>
&gt; <a href="http://www.kamailio.org/docs/modules/devel/dispatcher.html#id2467955" target="_blank">http://www.kamailio.org/docs/modules/devel/dispatcher.html#id2467955</a><br>
&gt;<br>
&gt; klaus<br>
&gt;<br>
&gt; Pascal Maugeri schrieb:<br>
&gt; &gt; Hi<br>
&gt; &gt;<br>
&gt; &gt; How do you configure dispatcher to send OPTIONS ping to load-balanced<br>
&gt; &gt; proxies ?<br>
&gt; &gt;<br>
&gt; &gt; I&#39;m using kamailio 1.4.2 with this of configuration:<br>
&gt; &gt;<br>
&gt; &gt; [...]<br>
&gt; &gt; modparam(&quot;dispatcher&quot;, &quot;ds_ping_method&quot;, &quot;OPTIONS&quot;)<br>
&gt; &gt; modparam(&quot;dispatcher&quot;, &quot;ds_ping_interval&quot;, 5)<br>
&gt; &gt; modparam(&quot;dispatcher&quot;, &quot;ds_ping_from&quot;, &quot;<a href="mailto:sip%3Afend1@10.132.184.33" target="_blank">sip:fend1@10.132.184.33</a><br>
&gt; &gt; &lt;mailto:<a href="mailto:sip%253Afend1@10.132.184.33" target="_blank">sip%3Afend1@10.132.184.33</a>&gt;&quot;)<br>
&gt; &gt; modparam(&quot;dispatcher&quot;, &quot;ds_probing_threshhold&quot;, 3)<br>
&gt; &gt; [...]<br>
&gt; &gt;<br>
&gt; &gt; The load-balancing works properly : I see the traffic being sent to my<br>
&gt; &gt; proxies. But I don&#39;t see any SIP OPTIONS packets.<br>
&gt; &gt;<br>
&gt; &gt; I&#39;ve read in module doc &quot;This method is only available, if compiled with<br>
&gt; &gt; the probing of failed gateways enabled. &quot; but I can&#39;t find how to<br>
&gt; &gt; activate this on compilation time, so I&#39;m not sure if I have this<br>
&gt; &gt; feature or not enable.<br>
&gt; &gt;<br>
&gt; &gt; Regards,<br>
&gt; &gt; Pascal<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; ------------------------------------------------------------------------<br>
&gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; Users mailing list<br>
&gt; &gt; <a href="mailto:Users@lists.kamailio.org" target="_blank">Users@lists.kamailio.org</a><br>
&gt; &gt; <a href="http://lists.kamailio.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.kamailio.org/cgi-bin/mailman/listinfo/users</a><br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Users mailing list<br>
&gt; <a href="mailto:Users@lists.kamailio.org" target="_blank">Users@lists.kamailio.org</a><br>
&gt; <a href="http://lists.kamailio.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.kamailio.org/cgi-bin/mailman/listinfo/users</a><br>
<br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>