Hi,<div>Try reloading the dispatcher , 'kamctl dispatcher reload' - How exactly is your HA failover working? do it keeps Kamailio on secondary resource shutdown and turn it on when becoming active? I don't have anything much to say on this issue now.</div>
<div><br></div><div>Hope I was of some help to you.</div><div>--</div><div>Sammy</div><div><br></div><div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Nov 29, 2012 at 2:44 PM, Rumen Mihailov <span dir="ltr"><<a href="mailto:zealas1662@gmail.com" target="_blank">zealas1662@gmail.com</a>></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 driving me nuts.<br>
<br>
take a look at that:<br>
Kamailio 1<br>
<div class="im">[root@kamailio-1 ~]# kamctl dispatcher show<br>
dispatcher gateways<br>
+----+-------+----------------------+-------+----------+-------+-------------------+<br>
| id | setid | destination | flags | priority | attrs |<br>
description |<br>
+----+-------+----------------------+-------+----------+-------+-------------------+<br>
| 1 | 1 | sip:<a href="http://10.2.45.98:5060" target="_blank">10.2.45.98:5060</a> | 8 | 1 | | asterisk-1 |<br>
</div>| 2 | 1 | sip:<a href="http://10.2.45.103:5060" target="_blank">10.2.45.103:5060</a> | 8 | 1 | | asterisk-2 |<br>
+----+-------+----------------------+-------+----------+-------+-------------------+<br>
[root@kamailio-1 ~]# kamctl dispatcher dump<br>
<div class="im">SET_NO:: 1<br>
SET:: 1<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>
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>
</div>All is OK.<br>
<div class="im">KAMAILIO 2<br>
[root@kamailio-2 ~]# kamctl dispatcher show<br>
dispatcher gateways<br>
+----+-------+----------------------+-------+----------+-------+-------------------+<br>
| id | setid | destination | flags | priority | attrs |<br>
description |<br>
+----+-------+----------------------+-------+----------+-------+-------------------+<br>
</div><div class="im">| 1 | 1 | sip:<a href="http://10.2.45.98:5060" target="_blank">10.2.45.98:5060</a> | 8 | 1 | | asterisk-1 |<br>
</div>| 2 | 1 | sip:<a href="http://10.2.45.103:5060" target="_blank">10.2.45.103:5060</a> | 8 | 1 | | asterisk-2 |<br>
+----+-------+----------------------+-------+----------+-------+-------------------+<br>
<br>
as we can see setid = 1 for both servers, they actually read the data<br>
from one and the same location which is a MySQL table.<br>
[root@kamailio-2 ~]# kamctl dispatcher dump<br>
<div class="im">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>
</div>Why the .... are they in different sets ?!?!?!?!<br>
<br>
I really can't understand this one...<br>
Anyone ... help ?<br>
<br>
Thanks<br>
<div class="HOEnZb"><div class="h5"><br>
On 28 November 2012 19:31, SamyGo <<a href="mailto:govoiper@gmail.com">govoiper@gmail.com</a>> wrote:<br>
> 1 - Why do you get two different SET Ids for two asterisk servers ? Is it<br>
> intentional ?<br>
> 2 - Please ensure that after failing back to primary the linux routes are<br>
> working and there is no issue with network layer connectivity.<br>
> Also how are your calls failing ? What do Kamailio complain ? Enable SIP<br>
> debug on your asterisk server and get a tcpdump on your kamailio server when<br>
> you get this issue.<br>
> Im pretty sure tcpdump will tell you whats happening.<br>
><br>
> On Nov 28, 2012 10:07 PM, "Rumen Mihailov" <<a href="mailto:zealas1662@gmail.com">zealas1662@gmail.com</a>> wrote:<br>
>><br>
>> The two configuration files are 100% identical.<br>
>><br>
>> On 28 November 2012 19:01, Rumen Mihailov <<a href="mailto:zealas1662@gmail.com">zealas1662@gmail.com</a>> wrote:<br>
>> > Hi again and thank you for your help,<br>
>> ><br>
>> > This is what happened when I changed the flags to 8 and restarted both<br>
>> > kamailios<br>
>> > ACTIVE KAMAILIO<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=AP 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=AP priority=1 attrs=<br>
>> ><br>
>> > PASSIVE KAMAILIO<br>
>> > SET_NO:: 1<br>
>> > SET:: 1<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>
>> > 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>
>> > When I stop kamailio 1 kamailio two takes the Virtual IP and<br>
>> > everything works like a charm, when I start kamailio 1 again the same<br>
>> > issue appears calls are only routed to the 10.2.45.103 asterisk....<br>
>> ><br>
>> > What might be the problem that they are in different set ?<br>
>> ><br>
>> ><br>
>> > On 28 November 2012 18:37, SamyGo <<a href="mailto:govoiper@gmail.com">govoiper@gmail.com</a>> wrote:<br>
>> >><br>
>> >> Well these are two different dispatcher groups, one is SET:1 10.2.45.98<br>
>> >> where the calls are routed - the other one is SET:2 which you are<br>
>> >> definitely<br>
>> >> not calling in your ds_select() function.<br>
>> >><br>
>> >> Also the flags=IP are, I think, saying that asterisk servers are<br>
>> >> inactive<br>
>> >> and kamailio is probing them, not sure about it. mine always show me<br>
>> >> flags=AP for active servers.<br>
>> >><br>
>> >> Also how have you defined the<br>
>> >><br>
>> >> ds_ping_reply_codes<br>
>> >><br>
>> >> <a href="http://www.kamailio.net/docs/modules/3.2.x/modules_k/dispatcher.html#id2495999" target="_blank">http://www.kamailio.net/docs/modules/3.2.x/modules_k/dispatcher.html#id2495999</a><br>
>> >><br>
>> >> Parameter such that if asterisk responds with a 484 or 404 or anyother<br>
>> >> negative response to the dispatcher OPTIONS SIP ping then consider it<br>
>> >> active.<br>
>> >><br>
>> >> Hope this will get your issue resolved.<br>
>> >><br>
>> >> The thing is the dispatcher in kamailio or load-balancer in OpenSIPS<br>
>> >> both<br>
>> >> set the Initial flags of all the servers in the table to Active/Enabled<br>
>> >> !<br>
>> >> that means if I have a server which is down and I reload the dispatcher<br>
>> >> module it will mark that down server to UP and my calls will timeout<br>
>> >> trying<br>
>> >> to send calls to that instance !<br>
>> >><br>
>> >> Thanks,<br>
>> >> Sammy<br>
>> >><br>
>> >><br>
>> >><br>
>> >><br>
>> >> On Wed, Nov 28, 2012 at 9:25 PM, Rumen Mihailov <<a href="mailto:zealas1662@gmail.com">zealas1662@gmail.com</a>><br>
>> >> wrote:<br>
>> >>><br>
>> >>> 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>
>> >>><br>
>> >>> On 28 November 2012 18:20, SamyGo <<a href="mailto:govoiper@gmail.com">govoiper@gmail.com</a>> wrote:<br>
>> >>> > Hi again,<br>
>> >>> ><br>
>> >>> > I think instead of dispatcher show use "kamctl dispatcher dump" That<br>
>> >>> > will<br>
>> >>> > show you the kamailio status of these servers. The flag 0, I'm not<br>
>> >>> > sure<br>
>> >>> > about that I always use 8 to re-activate the server if the ping gets<br>
>> >>> > back.<br>
>> >>> ><br>
>> >>> > Hope to hear from you<br>
>> >>> > --<br>
>> >>> > Sammy<br>
>> >>> ><br>
>> >>> ><br>
>> >>> ><br>
>> >>> ><br>
>> >>> > On Wed, Nov 28, 2012 at 8:57 PM, Rumen Mihailov<br>
>> >>> > <<a href="mailto:zealas1662@gmail.com">zealas1662@gmail.com</a>><br>
>> >>> > wrote:<br>
>> >>> >><br>
>> >>> >> Hello again,<br>
>> >>> >><br>
>> >>> >> I was able to perform tests and this is the output:<br>
>> >>> >> Kamailio-1: 10.2.45.106<br>
>> >>> >> Kamailio-2: 10.2.45.109<br>
>> >>> >> Asterisk-1: 10.2.45.98<br>
>> >>> >> Asterisk-2: 10.2.45.103<br>
>> >>> >><br>
>> >>> >> I can ping both asterisks from both kamailios<br>
>> >>> >> here are stats:<br>
>> >>> >> FROM KAMAILIO-1<br>
>> >>> >> [root@kamailio-1 ~]# ping 10.2.45.98<br>
>> >>> >> PING 10.2.45.98 (10.2.45.98) 56(84) bytes of data.<br>
>> >>> >> 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>
>> >>> >> ^C<br>
>> >>> >> --- 10.2.45.98 ping statistics ---<br>
>> >>> >> 1 packets transmitted, 1 received, 0% packet loss, time 773ms<br>
>> >>> >> rtt min/avg/max/mdev = 0.315/0.315/0.315/0.000 ms<br>
>> >>> >> [root@kamailio-1 ~]# ping 10.2.45.103<br>
>> >>> >> PING 10.2.45.103 (10.2.45.103) 56(84) bytes of data.<br>
>> >>> >> 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>
>> >>> >> 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>
>> >>> >><br>
>> >>> >> FROM KAMAILIO-2<br>
>> >>> >> [root@kamailio-2 ~]# ping 10.2.45.98<br>
>> >>> >> PING 10.2.45.98 (10.2.45.98) 56(84) bytes of data.<br>
>> >>> >> 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>
>> >>> >> 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>
>> >>> >> ^C<br>
>> >>> >> --- 10.2.45.98 ping statistics ---<br>
>> >>> >> 2 packets transmitted, 2 received, 0% packet loss, time 1036ms<br>
>> >>> >> rtt min/avg/max/mdev = 0.324/0.893/1.462/0.569 ms<br>
>> >>> >> [root@kamailio-2 ~]# ping 10.2.45.103<br>
>> >>> >> PING 10.2.45.103 (10.2.45.103) 56(84) bytes of data.<br>
>> >>> >> 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>
>> >>> >> 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>
>> >>> >> ^C<br>
>> >>> >><br>
>> >>> >> Those are the 'kamctl dispatcher show' outputs:<br>
>> >>> >> KAMAILIO 1<br>
>> >>> >> [root@kamailio-1 ~]# kamctl dispatcher show<br>
>> >>> >> dispatcher gateways<br>
>> >>> >><br>
>> >>> >><br>
>> >>> >><br>
>> >>> >> +----+-------+----------------------+-------+----------+-------+-------------------+<br>
>> >>> >> | id | setid | destination | flags | priority | attrs |<br>
>> >>> >> description |<br>
>> >>> >><br>
>> >>> >><br>
>> >>> >><br>
>> >>> >> +----+-------+----------------------+-------+----------+-------+-------------------+<br>
>> >>> >> | 1 | 1 | sip:<a href="http://10.2.45.98:5060" target="_blank">10.2.45.98:5060</a> | 0 | 1 | |<br>
>> >>> >> asterisk-1 |<br>
>> >>> >> | 2 | 1 | sip:<a href="http://10.2.45.103:5060" target="_blank">10.2.45.103:5060</a> | 0 | 1 | |<br>
>> >>> >> asterisk-2 |<br>
>> >>> >><br>
>> >>> >><br>
>> >>> >><br>
>> >>> >> +----+-------+----------------------+-------+----------+-------+-------------------+<br>
>> >>> >><br>
>> >>> >> KAMAILIO 2<br>
>> >>> >> [root@kamailio-2 ~]# kamctl dispatcher show<br>
>> >>> >> dispatcher gateways<br>
>> >>> >><br>
>> >>> >><br>
>> >>> >><br>
>> >>> >> +----+-------+----------------------+-------+----------+-------+-------------------+<br>
>> >>> >> | id | setid | destination | flags | priority | attrs |<br>
>> >>> >> description |<br>
>> >>> >><br>
>> >>> >><br>
>> >>> >><br>
>> >>> >> +----+-------+----------------------+-------+----------+-------+-------------------+<br>
>> >>> >> | 1 | 1 | sip:<a href="http://10.2.45.98:5060" target="_blank">10.2.45.98:5060</a> | 0 | 1 | |<br>
>> >>> >> asterisk-1 |<br>
>> >>> >> | 2 | 1 | sip:<a href="http://10.2.45.103:5060" target="_blank">10.2.45.103:5060</a> | 0 | 1 | |<br>
>> >>> >> asterisk-2 |<br>
>> >>> >><br>
>> >>> >><br>
>> >>> >><br>
>> >>> >> +----+-------+----------------------+-------+----------+-------+-------------------+<br>
>> >>> >><br>
>> >>> >> Both asterisks can also ping both kamailios<br>
>> >>> >><br>
>> >>> >> ds_select_dst("1","4");<br>
>> >>> >><br>
>> >>> >> this is what I have in my route[TOASTERISK]<br>
>> >>> >><br>
>> >>> >> Any thought guys ?<br>
>> >>> >><br>
>> >>> >> Best regards,<br>
>> >>> >> Rumen<br>
>> >>> >><br>
>> >>> >> On 28 November 2012 09:55, Rumen Mihailov <<a href="mailto:zealas1662@gmail.com">zealas1662@gmail.com</a>><br>
>> >>> >> wrote:<br>
>> >>> >> > Hello Samy,<br>
>> >>> >> ><br>
>> >>> >> > Thank you for the hint, I will test later today and let you know<br>
>> >>> >> > the<br>
>> >>> >> > results.<br>
>> >>> >> ><br>
>> >>> >> > Best regards,<br>
>> >>> >> > Rumen<br>
>> >>> >> ><br>
>> >>> >> > On 28 November 2012 07:00, SamyGo <<a href="mailto:govoiper@gmail.com">govoiper@gmail.com</a>> wrote:<br>
>> >>> >> >> Hi,<br>
>> >>> >> >><br>
>> >>> >> >> Just few quick questions , can you ping the second asterisk from<br>
>> >>> >> >> secondary<br>
>> >>> >> >> Kamailio ? what is the routing set for that. Does your second<br>
>> >>> >> >> asterisk<br>
>> >>> >> >> box<br>
>> >>> >> >> gets inactive in dispatcher show command after 30 seconds ?<br>
>> >>> >> >> Mine worked fine, the key is the linux routing table.<br>
>> >>> >> >><br>
>> >>> >> >> BR<br>
>> >>> >> >> Sammy<br>
>> >>> >> >><br>
>> >>> >> >><br>
>> >>> >> >> On Tue, Nov 27, 2012 at 7:29 PM, Rumen Mihailov<br>
>> >>> >> >> <<a href="mailto:zealas1662@gmail.com">zealas1662@gmail.com</a>><br>
>> >>> >> >> wrote:<br>
>> >>> >> >>><br>
>> >>> >> >>> .s. Thank you for creating such a wonderful product. Thank you<br>
>> >>> >> >>> !!!<br>
>> >>> >> >><br>
>> >>> >> >><br>
>> >>> >> >><br>
>> >>> >> >> _______________________________________________<br>
>> >>> >> >> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users<br>
>> >>> >> >> mailing<br>
>> >>> >> >> 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>
>> >>> >> >><br>
>> >>> >><br>
>> >>> >> _______________________________________________<br>
>> >>> >> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing<br>
>> >>> >> 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>
>> >>> ><br>
>> >>> ><br>
>> >>> ><br>
>> >>> > _______________________________________________<br>
>> >>> > SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing<br>
>> >>> > 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>
>> >>> ><br>
>> >>><br>
>> >>> _______________________________________________<br>
>> >>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing<br>
>> >>> 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>
>> >><br>
>> >><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>
>> >><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>
><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>
><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>