This tutorial focuses on how to use Telscale Loadbalancer to distribute SIP traffic between two Restcomm Servers. The diagram below shows the network topology.

Telscale load balancer for Restcomm


  • Basic knowledge of Restcomm

Step 1 - Install and Configure Telscale Load Balancer

The Restcomm Loader Balancer is packaged with Restcomm Connect.

  • You must copy the load balancer binary from the $RESTCOMM_HOME/tools/sip-balancer to the install directory of your server.

  • In this example, the sip-balancer directory has been copied to /opt/telestax/sip-balancer

  • You will see the following files in the sip-balancer directory:

lb-log4j.xml  logs  sip-balancer-jar-with-dependencies.jar

open and edit the  file file

  • change the host parameter to the IP address of the load balancer server

# The binding address of the load balancer
  • change the externalPort  variables to 5080 .

  • Ports 5080 is the default port used by Restcomm

# The SIP port used where client should connect
  • Leave the rest of the variables as default, save and exit the file

  • Start the load balancer (as shown below) whilst you are in the directory /opt/telestax/sip-balancer

java -DlogConfigFile=./lb-log4j.xml -jar ./sip-balancer-jar-with-dependencies.jar
  • If the server is successfully started, you will see an output similar to the one below:

2016-02-25 01:05:23,104 INFO main - the sip stack timer gov.nist.javax.sip.stack.timers.DefaultSipTimer has been started
2016-02-25 01:05:23,334 INFO main - Sip Balancer started on external address 192.168.1, external port : 5080, internalPort : 5085
2016-02-25 01:05:23,436 INFO main - HTTP LB listening on port 2080
2016-02-25 01:05:24,285 INFO RMI TCP Connection(4)- - Balancer algorithm loaded succesfully for cluster version = 0

Step 2 - Configure Restcomm Servers to Point to the Load Balancer

Restcomm Server 1
  • Open and edit the file  $RESTCOMM_HOME/bin/restcomm/proxy.conf as shown below

# Proxy variable declarations
ACTIVE_PROXY='true'                     # values: TRUE or FALSE
TP_LOGIN=''                         # Username
TP_PASSWORD=''                      # Password
INSTANCE_ID=''                      # EC2 Instance id (will be used as endpoint - VI or accountId - BW)
SITE_ID=''                          # Only for BW integration
PROXY_IP=''                         # Public IP Address of the Telestax Proxy
PROXY_PRIVATE_IP=''    # Private IP Address of the Telestax Proxy
  • Open and edit the file  $RESTCOMM_HOME/bin/restcomm/restcomm.conf as shown below

# Network configuration
  • Start Restcomm and you will see the following in the startup console

02:38:52,455 INFO  [org.mobicents.ha.javax.sip.LoadBalancerHeartBeatingServiceImpl] (Timer-2) Keepalive: SIP Load Balancer Found! /
  • In the load balancer console, you will see the output below.

2016-02-25 01:05:24,287 INFO RMI TCP Connection(4)- - NodeExpirationTimerTask Run NSync[SIPNode hostname[telscalerestcomcore01] ip[] httpPort[8080] sslPort[8443] wsPort[5082] tcpPort[5080] udpPort[5080] version[0] ] added
Restcomm Server 2
  • Repeat Step 2 for Restcomm Server 2 using the IP address

Step 3 - Making a Call to the Load Balancer from Restcomm

Make a call to the SIP IP address of the load balancer sip:1234@

The load balancer will distribute the call evenly between the two Restcomm servers. The first call will go to and the next call will go to