Load balancer installation

SIP flow with load-balancer

    msc {

      arcgradient=0, hscale=2;

      C[label="Call originator\n11.11.11.11"],
      L[label="YETI Load balancer\n12.12.12.12"],
      S[label="SEMS Node\n13.13.13.13"];

      L alt S [label="POP", textbgcolor="#f7fff7"] {
      C => L [label="INVITE"];
      L => C [label="100 Trying"];
      L => S [label="INVITE\nX-ORIG-IP:\nX-ORIG-PORT:5060\nX-ORIG-PROTO:1"];
      S rbox S [label= "Routing procedures"];
      S => L [label="100 Trying"];
      S => L [label="180 Ringing"];
      L => C [label="180 Ringing"];
      S => L [label="200 OK"];
      L => C [label="200 OK"];
      C >> S [label="RTP from originator"];
      S >> C [label="RTP to originator"];
      C => L [label="ACK"];
      L => S [label="ACK"];
      C => L [label="BYE"];
      L => S [label="BYE"];
      S => L [label="200 OK"];
      L => C [label="200 OK"];
      S rbox S [label= "CDR writing"];

Packages installation

Install kamailio packages using system repository or https://deb.kamailio.org/ . Example kamailio configuration present at out yeti-lb repository: https://github.com/yeti-switch/yeti-lb/tree/master/src


You should register your Load balancer instance as trusted load balancer. See System->Load balancers menu.


Launch load balancer:

root@server:~# service kamailio start


Check kamailio running and listening desired sockets:

root@server:~# pgrep kamailio
root@server:~# netstat -lpn | grep kamailio
tcp 0 0* LISTEN 30857/kamailio
udp 0 0* 30853/kamailio
raw 0 0* 7 30853/kamailio
unix 2 [ ACC ] STREAM LISTENING 2673337 30856/kamailio /var/run/kamailio//kamailio_ctl

Check for /var/log/syslog on possible errors.

Also you can run daemon in foreground with logging to stderr for debugging purposes:

root@server:~# kamailio /etc/kamailio/kamailio.cfg