[SR-Users] Problems with dispatcher policy in HA/LB kamailio/asterisk environment

Sören Berger soeren.berger at rus.uni-stuttgart.de
Fri Apr 8 00:20:59 CEST 2011


Hi all,
I currently setup a HA/LB conference. I currently have 1 SER and 2 asterisk conference servers. The goal is to distribute the conferences based on the room number on different server. I use ubuntu 10.04 LTS and the packages from http://deb.kamailio.org/kamailio (kamailio_3.1.2+lucid1_amd64.deb)

During the implementation I run into trouble with the "8 - first destination" policy which choose not my second server in case of a failure.

The dial in is eg. 330 with round robin to any of my asterisk servers. There they check the room number and append it to the dial number. When somebody calls 330 and enter the room number 12345 the asterisk route it back to kamilio with 33012345

route[ASTERISK_CONFERENCE_AUTH] {
  if ($rU=~"(33[0-4]$)") {
    if ( method=="INVITE" ) {
      ds_select_dst("1","4");
      forward();
      exit();
    }
  }
}

When the number 33012345 arrives kamailio decides on which server the conference takes place. For redundancy reasons I use the dispatcher again. If one of the server fails, another will take over the conferences. For the scenario with 2 servers this is trivial. There I also could do it another way. But when I add more conference servers it looks like the best solution to me. Here are my rules for the servers.
In this case I used the policy "8" which should use the first destination according to the dispatcher.list file. So if I add more servers I can decide about a order for the fail over servers.

route [ASTERISK_CONFERENCE] {
  if ($rU=~"(33[0-4][0-4][0-9][0-9][0-9][0-9]$)") {
    if ( method=="INVITE" ) {
      ds_select_dst("2","8");
      forward();
      exit();
    }
  }
  if ($rU=~"(33[0-4][5-9][0-9][0-9][0-9][0-9]$)") {
    if ( method=="INVITE" ) {
      ds_select_dst("3","8");
      forward();
      exit();
    }
  }
}


distpatcher.list

# This group will be used with round robin for getting the room number
1 sip:172.16.1.88:5060 0 1
1 sip:172.16.1.89:5060 0 2

# failover schedule for ast-conf1
2 sip:172.16.1.88:5060 0 1
2 sip:172.16.1.89:5060 0 2

# failover schedule for ast-conf2
3 sip:172.16.1.89:5060 0 1
3 sip:172.16.1.88:5060 0 2

My current problem is, that the policy "8" don't select the other server in case of an failure. I simply blocks and the clients retransmit the request to kamailio.I am currently going crazy with that. :)
When I change the policy to round robin (replacing "8" with "4"), everything is working fine. But this an option because in the normal case all calls to a conference room should be placed on the same server. Could this be a bug or something like that?

Maybe not the right list here, but I didn't find anything about meetme implementation with more that one server or a HA/LB solution for that and was really wondering about that. Somebody maybe heart from such a implementation?

Kind Regards,
Sören Berger




-- 
Dipl.-Inf. Sören Berger

Rechenzentrum Universität Stuttgart
Allmandring 30
70550 Stuttgart
soeren.berger at rus.uni-stuttgart.de
+49-(0)711-685-65871



More information about the sr-users mailing list