<div><br></div>Well these are two different dispatcher groups, one is SET:1 10.2.45.98 where the calls are routed - the other one is SET:2 which you are definitely not calling in your ds_select() function.<div><br></div><div>
Also the flags=IP are, I think, saying that asterisk servers are inactive and kamailio is probing them, not sure about it. mine always show me flags=AP for active servers.</div><div><br></div><div>Also how have you defined the </div>
<h3 class=""><span style="font-weight:normal"><font><code class="" style="color:rgb(0,0,0);font-family:Helvetica,Arial">ds_ping_reply_codes</code><font color="#000000" face="Helvetica, Arial">  </font><a href="http://www.kamailio.net/docs/modules/3.2.x/modules_k/dispatcher.html#id2495999">http://www.kamailio.net/docs/modules/3.2.x/modules_k/dispatcher.html#id2495999</a><font color="#000000" face="Helvetica, Arial"> </font></font></span></h3>
<div>Parameter such that if asterisk responds with a 484 or 404 or anyother negative response to the dispatcher OPTIONS SIP ping then consider it active.<br></div><div><br></div><div>Hope this will get your issue resolved. </div>
<div><br></div><div>The thing is the dispatcher in kamailio or load-balancer in OpenSIPS both set the Initial flags of all the servers in the table to Active/Enabled ! that means if I have a server which is down and I reload the dispatcher module it will mark that down server to UP and my calls will timeout trying to send calls to that instance !</div>
<div><br></div><div>Thanks,</div><div>Sammy</div><div><br></div><div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Nov 28, 2012 at 9:25 PM, Rumen Mihailov <span dir="ltr">&lt;<a href="mailto:zealas1662@gmail.com" target="_blank">zealas1662@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">Hello Samy,<br>
<br>
this is what I got:<br>
<br>
<br>
SET_NO:: 2<br>
SET:: 2<br>
        URI:: sip:<a href="http://10.2.45.103:5060" target="_blank">10.2.45.103:5060</a> flags=IP priority=1 attrs=<br>
SET:: 1<br>
        URI:: sip:<a href="http://10.2.45.98:5060" target="_blank">10.2.45.98:5060</a> flags=IP priority=1 attrs=<br>
<br>
<br>
on both machines. Moreover now without any changes dispatcher is not<br>
working at all. Only sending calls to the asterisk-1 (10.2.45.98)<br>
<div class="HOEnZb"><div class="h5"><br>
On 28 November 2012 18:20, SamyGo &lt;<a href="mailto:govoiper@gmail.com">govoiper@gmail.com</a>&gt; wrote:<br>
&gt; Hi again,<br>
&gt;<br>
&gt; I think instead of dispatcher show use &quot;kamctl dispatcher dump&quot; That will<br>
&gt; show you the kamailio status of these servers.  The flag 0, I&#39;m not sure<br>
&gt; about that I always use 8 to re-activate the server if the ping gets back.<br>
&gt;<br>
&gt; Hope to hear from you<br>
&gt; --<br>
&gt; Sammy<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Wed, Nov 28, 2012 at 8:57 PM, Rumen Mihailov &lt;<a href="mailto:zealas1662@gmail.com">zealas1662@gmail.com</a>&gt;<br>
&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Hello again,<br>
&gt;&gt;<br>
&gt;&gt; I was able to perform tests and this is the output:<br>
&gt;&gt; Kamailio-1: 10.2.45.106<br>
&gt;&gt; Kamailio-2: 10.2.45.109<br>
&gt;&gt; Asterisk-1: 10.2.45.98<br>
&gt;&gt; Asterisk-2: 10.2.45.103<br>
&gt;&gt;<br>
&gt;&gt; I can ping both asterisks from both kamailios<br>
&gt;&gt; here are stats:<br>
&gt;&gt; FROM KAMAILIO-1<br>
&gt;&gt; [root@kamailio-1 ~]# ping 10.2.45.98<br>
&gt;&gt; PING 10.2.45.98 (10.2.45.98) 56(84) bytes of data.<br>
&gt;&gt; 64 bytes from <a href="http://10.2.45.98" target="_blank">10.2.45.98</a>: icmp_seq=1 ttl=64 time=0.315 ms<br>
&gt;&gt; ^C<br>
&gt;&gt; --- 10.2.45.98 ping statistics ---<br>
&gt;&gt; 1 packets transmitted, 1 received, 0% packet loss, time 773ms<br>
&gt;&gt; rtt min/avg/max/mdev = 0.315/0.315/0.315/0.000 ms<br>
&gt;&gt; [root@kamailio-1 ~]# ping 10.2.45.103<br>
&gt;&gt; PING 10.2.45.103 (10.2.45.103) 56(84) bytes of data.<br>
&gt;&gt; 64 bytes from <a href="http://10.2.45.103" target="_blank">10.2.45.103</a>: icmp_seq=1 ttl=64 time=0.489 ms<br>
&gt;&gt; 64 bytes from <a href="http://10.2.45.103" target="_blank">10.2.45.103</a>: icmp_seq=2 ttl=64 time=0.268 ms<br>
&gt;&gt;<br>
&gt;&gt; FROM KAMAILIO-2<br>
&gt;&gt; [root@kamailio-2 ~]# ping 10.2.45.98<br>
&gt;&gt; PING 10.2.45.98 (10.2.45.98) 56(84) bytes of data.<br>
&gt;&gt; 64 bytes from <a href="http://10.2.45.98" target="_blank">10.2.45.98</a>: icmp_seq=1 ttl=64 time=1.46 ms<br>
&gt;&gt; 64 bytes from <a href="http://10.2.45.98" target="_blank">10.2.45.98</a>: icmp_seq=2 ttl=64 time=0.324 ms<br>
&gt;&gt; ^C<br>
&gt;&gt; --- 10.2.45.98 ping statistics ---<br>
&gt;&gt; 2 packets transmitted, 2 received, 0% packet loss, time 1036ms<br>
&gt;&gt; rtt min/avg/max/mdev = 0.324/0.893/1.462/0.569 ms<br>
&gt;&gt; [root@kamailio-2 ~]# ping 10.2.45.103<br>
&gt;&gt; PING 10.2.45.103 (10.2.45.103) 56(84) bytes of data.<br>
&gt;&gt; 64 bytes from <a href="http://10.2.45.103" target="_blank">10.2.45.103</a>: icmp_seq=1 ttl=64 time=2.09 ms<br>
&gt;&gt; 64 bytes from <a href="http://10.2.45.103" target="_blank">10.2.45.103</a>: icmp_seq=2 ttl=64 time=0.350 ms<br>
&gt;&gt; ^C<br>
&gt;&gt;<br>
&gt;&gt; Those are the &#39;kamctl dispatcher show&#39; outputs:<br>
&gt;&gt; KAMAILIO 1<br>
&gt;&gt; [root@kamailio-1 ~]# kamctl dispatcher show<br>
&gt;&gt; dispatcher gateways<br>
&gt;&gt;<br>
&gt;&gt; +----+-------+----------------------+-------+----------+-------+-------------------+<br>
&gt;&gt; | id | setid | destination          | flags | priority | attrs |<br>
&gt;&gt; description       |<br>
&gt;&gt;<br>
&gt;&gt; +----+-------+----------------------+-------+----------+-------+-------------------+<br>
&gt;&gt; |  1 |     1 | sip:<a href="http://10.2.45.98:5060" target="_blank">10.2.45.98:5060</a>  |     0 |        1 |       |<br>
&gt;&gt; asterisk-1 |<br>
&gt;&gt; |  2 |     1 | sip:<a href="http://10.2.45.103:5060" target="_blank">10.2.45.103:5060</a> |     0 |        1 |       |<br>
&gt;&gt; asterisk-2 |<br>
&gt;&gt;<br>
&gt;&gt; +----+-------+----------------------+-------+----------+-------+-------------------+<br>
&gt;&gt;<br>
&gt;&gt; KAMAILIO 2<br>
&gt;&gt; [root@kamailio-2 ~]# kamctl dispatcher show<br>
&gt;&gt; dispatcher gateways<br>
&gt;&gt;<br>
&gt;&gt; +----+-------+----------------------+-------+----------+-------+-------------------+<br>
&gt;&gt; | id | setid | destination          | flags | priority | attrs |<br>
&gt;&gt; description       |<br>
&gt;&gt;<br>
&gt;&gt; +----+-------+----------------------+-------+----------+-------+-------------------+<br>
&gt;&gt; |  1 |     1 | sip:<a href="http://10.2.45.98:5060" target="_blank">10.2.45.98:5060</a>  |     0 |        1 |       |<br>
&gt;&gt; asterisk-1 |<br>
&gt;&gt; |  2 |     1 | sip:<a href="http://10.2.45.103:5060" target="_blank">10.2.45.103:5060</a> |     0 |        1 |       |<br>
&gt;&gt; asterisk-2 |<br>
&gt;&gt;<br>
&gt;&gt; +----+-------+----------------------+-------+----------+-------+-------------------+<br>
&gt;&gt;<br>
&gt;&gt; Both asterisks can also ping both kamailios<br>
&gt;&gt;<br>
&gt;&gt; ds_select_dst(&quot;1&quot;,&quot;4&quot;);<br>
&gt;&gt;<br>
&gt;&gt; this is what I have in my route[TOASTERISK]<br>
&gt;&gt;<br>
&gt;&gt; Any thought guys ?<br>
&gt;&gt;<br>
&gt;&gt; Best regards,<br>
&gt;&gt; Rumen<br>
&gt;&gt;<br>
&gt;&gt; On 28 November 2012 09:55, Rumen Mihailov &lt;<a href="mailto:zealas1662@gmail.com">zealas1662@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt; Hello Samy,<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Thank you for the hint, I will test later today and let you know the<br>
&gt;&gt; &gt; results.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Best regards,<br>
&gt;&gt; &gt; Rumen<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; On 28 November 2012 07:00, SamyGo &lt;<a href="mailto:govoiper@gmail.com">govoiper@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt;&gt; Hi,<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Just few quick questions , can you ping the second asterisk from<br>
&gt;&gt; &gt;&gt; secondary<br>
&gt;&gt; &gt;&gt; Kamailio ? what is the routing set for that. Does your second asterisk<br>
&gt;&gt; &gt;&gt; box<br>
&gt;&gt; &gt;&gt; gets inactive in dispatcher show command after 30 seconds ?<br>
&gt;&gt; &gt;&gt; Mine worked fine, the key is the linux routing table.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; BR<br>
&gt;&gt; &gt;&gt; Sammy<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; On Tue, Nov 27, 2012 at 7:29 PM, Rumen Mihailov &lt;<a href="mailto:zealas1662@gmail.com">zealas1662@gmail.com</a>&gt;<br>
&gt;&gt; &gt;&gt; wrote:<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; .s. Thank you for creating such a wonderful product. Thank you !!!<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; _______________________________________________<br>
&gt;&gt; &gt;&gt; SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
&gt;&gt; &gt;&gt; <a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
&gt;&gt; &gt;&gt; <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
&gt;&gt; <a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
&gt;&gt; <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
&gt; <a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
&gt; <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
&gt;<br>
<br>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</div></div></blockquote></div><br></div>