GithubHelp home page GithubHelp logo

shootme-ha's Introduction

Shootme-HA

This project is a testing implementation of a custom cache for jain-sip-ha from Mobicents.

Shootme is a simple example from jain-sip library. Jain-sip implementation has been taken from mobicents project. Dependencies are managed by maven.

A timestamp is stored in dialog application data on INVITE request and call length is printed on disconnection. This application data is replicated between nodes.

dialogId is stored in cache on ACK request. In case of attending node failure, if other node has to hangup call (pressing 'h' key in console), it can recover dialog from stack using saved dialogId.

Compilation

You will need jain-sip-ri 1.2.X-SNAPSHOT from mobicents sip-servlets 3.0 distribution and install into your local maven repository. Mobicents 3.0-SNAPSHOT can be downloaded from here: https://mobicents.ci.cloudbees.com/job/Mobicents-SipServlets-Release/lastSuccessfulBuild/artifact/

Execute:

mvn clean install

You can create eclipse files with:

mvn eclipse:eclipse

then import this project into eclipse as regular java project

Installation

You need 2 instances or more of shootme-ha for testing. Create 2 forlders and copy these files in each of them:

  • shootme-ha-1.0-jar-with-dependencies.jar in target directory
  • shootme.properties, jain-sip.properties and log4j.properties in resources directory

You will need also a sip-balancer 1.6+ installation.

Configuration

You need to configure these parameters in shootme.properties:

  • sip.stack.address: ip address for stack
  • sip.stack.port: sip port, set up different ports for each instance

And this one on jain-sip.properties:

  • org.mobicents.ha.javax.sip.BALANCERS: ip:port of balancer (select internal port of sipbalancer)

You can also tune log4j.properties for more or less traces. jain-sip and hazelcast can write a lot of information.

Running

  • cd to sip-balancer folder and start it:

$ java -jar sip-balancer-jar-1.6.0.FINAL-jar-with-dependencies.jar -mobicents-balancer-config=./lb-configuration.properties

  • cd to each shootme instance folder and start it:

$ java -cp shootme-ha-1.0-jar-with-dependencies.jar -Dorg.mobicents.properties.httpPort=81 com.iccapps.sip.ha.shootme.Shootme

Now you can call to sip-balancer external port and will see the call progresing on one of the nodes.

Testing

Shootme-ha has been tested in these scenarios:

Node failure

  • Call to balancer
  • Call attended on node1
  • Kill node1
  • Hangup call on sip phone
  • Node2 hangups call succesfully

Balancer failure

  • Call to balancer
  • Call attended on node1
  • Kill balancer
  • Start balancer
  • Hangup call on sip phone
  • Node1 hangups call succesfully

Node failure and hangup from node

  • Call to balancer
  • Call attended on node1
  • Kill node1
  • Press 'h' on node2
  • Call is disconnected succesfully

References

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.