Coder Social home page Coder Social logo

kamailio-ha's Introduction

kamailio-ha

Kamailio+rtpengine failover demo infrastructure for kamailio-rus-2020 conference.

Requirements

You have to have virtualbox, vagrand and ansible installed and operational. I have used it only on Linux host and did't test it on Windows.

Usage

Clone this repo to your computer:

$ cd
$ git clone https://github.com/akam-it/kamailio-ha.git
$ cd kamailio-ha

Run vagrand, it will download a Debian box image and will use this image for deploying virtual machines, described in the file Vagrantfile:

$ vagrant up

After virtual machines are deployed vagrant will start provisioning described in the folder .ansilbe

Installed machines

  • 192.168.51.10 - Virtual IP address that belong to MAIN kamailio+rtpengine node
  • 192.168.51.11 - kamailio1
  • 192.168.51.12 - kamailio2
  • 192.168.51.21 - asterisk1
  • 192.168.51.22 - asterisk2
  • 192.168.51.100 - redis database

Make a call

  • Register your softphone(s) on 192.168.51.10, you can use 2XX number and any password.
  • Call to 1XX for hello-world and Echo() application or 2XX for call to another registered user.

After call is established you can check active dialogs and rtp sessions on both kamailio nodes:

$ kamcmd dmq.list_nodes
$ kamcmd dlg.list
$ rtpengine-ctl list sessions all

Kill kamailio application on main node or pause virtual machhine 'kamailio1' and see how active calls, after little pause of 3 seconds, migrate to kamailio2. New calls will be handled by kamailio2 node.

Hightlights

Subscripbsions and events should be enabled for Redis:

redis.conf

notify-keyspace-events "KEA"

Kamalio and rtpengine should be allowed to bind to nonlocal IP

# echo net.ipv4.ip_nonlocal_bind=1 >> /etc/sysctl.conf
# sysctl -p

kamailio-ha's People

Contributors

akam-it avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.