This is a quick user guide for Restcomm - Docker. You will learn how to install and start using Restcomm in a docker container.

Prerequisites

  • System requirements: Please, check RAM dedicated to your Docker container. Restcomm requires minimum 3GB to start 2 java processes: Jboss with Restcomm services and standalone mediaserver

  • Install docker on your sever : https://docs.docker.com/engine/installation/

  • Get a free API KEY VoiceRss account as explained  HERE

  • Ensure firewall is correctly configured (SELinux can be a problem on some systems)

  • SELinux has been known to cause "permission denied" issues on some Linux system, you might want to disable or set SELinux to permissive mode. (some basic commands : getenforce, will show the type of permission you currently have )

Supported Tags

  • Tag "latest". Points to the latest binary from the Continuous Delivery server. Uses the master development branch : restcomm/restcomm:latest. *We don’t advice to use "latest" tag for production as it is constantly changing, and as well new features and fixes may not be documented.

  • Tag "7.7.0" pointing to current specific GA release (v770ga).

To pull the "latest" image from the RestComm docker hub repository please use:

docker pull restcomm/restcomm:latest

Install and Run Restcomm Docker

  • Get your "ETHERNET_IP" by running ifconfig. Use 127.0.0.1 as "ETHERNET_IP" if you are running container on Docker for Mac.

  • Fill out the RCBCONF_STATIC_ADDRESS variable as shown below.

  • Start Restcomm as shown below:

  • This will start Restcomm in secure mode (https)

docker run  -i -d --name=restcomm-myInstance -v /var/log/restcomm/:/var/log/restcomm/ -e RCBCONF_STATIC_ADDRESS="YOUR_ETHERNET_IP" -e ENVCONFURL="https://raw.githubusercontent.com/RestComm/Restcomm-Docker/master/env_files/restcomm_env_locally.sh" -p 8080:8080 -p 8443:8443 -p 9990:9990 -p 5080:5080 -p 5081:5081 -p 5082:5082 -p 5083:5083 -p 5080:5080/udp -p 65000-65050:65000-65050/udp restcomm/restcomm:latest
  • OS X seems to have known for mount denied issue on /var/log/restcomm directory, in such case: mount logs with any directory under /Users. Here is an example:

docker run  -i -d --name=restcomm-myInstance -v /Users/username/var/log/restcomm:/var/log/restcomm/ -e RCBCONF_STATIC_ADDRESS="YOUR_ETHERNET_IP" -e ENVCONFURL="https://raw.githubusercontent.com/RestComm/Restcomm-Docker/master/env_files/restcomm_env_locally.sh" -p 8080:8080 -p 8443:8443 -p 9990:9990 -p 5080:5080 -p 5081:5081 -p 5082:5082 -p 5083:5083 -p 5080:5080/udp -p 65000-65050:65000-65050/udp restcomm/restcomm:latest

Text-to-Speech with VoiceRSS

Quick test

  1. Go to https://RCBCONF_STATIC_ADDRESS:8443/olympus

  2. Press "Sign in" (username alice or bob and password 1234)

  3. Your browser will ask for permission to share microphone and camera, press allow

  4. Go to "Contact", click on the "+1234" and press the "Audio Call" button (phone icon)

  5. You should hear the "Welcome to RestComm, a Telestax Sponsored project" announcement

  6. You can also make a call to the "+1235" to test your Text-to-Speech configuration

Accessing the Admin UI

  1. Go to https://RCBCONF_STATIC_ADDRESS:8443

  2. Username = administrator@company.com

  3. Password = RestComm

  4. Change the default password

Using the flag "INIT_PASSWORD" you can set administrator password when running RestComm for first time. More info RestComm-Docker Documentation

Basic Docker commands

  • To Get a list of running containers: sudo docker ps

  • To stop container: sudo docker stop RESTCOMM_Container_ID

  • To start container: sudo docker start RESTCOMM_Container_ID

  • To remove container: sudo docker rm RESTCOMM_Container_ID

To execute a command at the container
  • docker exec RESTCOMM_Container_ID [command]

  • Example : docker exec RESTCOMM_Container_ID ps -ef | grep java

To get bash console (for debugging only)

You can start the container and get a bash console to manually setup Restcomm and test it using the following command:

docker run --name=restcomm-myInstance --entrypoint=/bin/bash -it -p 8080:8080 -p 8443:8443 -p 9990:9990 -p 5080:5080 -p 5081:5081 -p 5082:5082 -p 5083:5083 -p 5080:5080/udp -p 65000-65050:65000-65050/udp restcomm/restcomm:latest

Get a bash console for a running RestComm container:

docker exec -it RESTCOMM_Container_ID bash

Excessive demand on memory when exposing a big range of ports.

Due to a known issue on Docker, exposing a big range of ports produce a big need in RAM. On RestComm the issue arises when a big range of RTP ports is exposed. For a system with 4Gb of RAM a range of 50 ports is a good approach (e.g -p 65000-65050:65000-65050/udp). *We are expecting that this issue will be solved soon from Docker team.

As a workaround and if a bigger range of port please use host mode for docker RUN command: "docker run –– net host…​" More information HERE
docker run  --net  host -i -d --name=restcomm-myInstance -v /var/log/restcomm/:/var/log/restcomm/ -e RCBCONF_STATIC_ADDRESS="YOUR_ETHERNET_IP" -e ENVCONFURL="https://raw.githubusercontent.com/RestComm/Restcomm-Docker/master/scripts/restcomm_env_locally.sh" restcomm/restcomm:latest

Important Notice for RestComm networking

When using a SIP client that is not running on the same local machine as the RestComm docker container, call-setup through SIP/SDP/RTP will fail as the docker container runs on a different network segment. You must set the STATIC_ADDRESS environment variable to address this issue as shown below:

docker run  -i -d --name=restcomm-myInstance -v /var/log/restcomm/:/var/log/restcomm/ -e RCBCONF_STATIC_ADDRESS="YOUR_ETHERNET_IP" -e ENVCONFURL="https://raw.githubusercontent.com/RestComm/Restcomm-Docker/master/scripts/restcomm_env_locally.sh" -p 8080:8080 -p 8443:8443 -p 9990:9990 -p 5080:5080 -p 5081:5081 -p 5082:5082 -p 5083:5083 -p 5080:5080/udp -p 65000-65050:65000-65050/udp restcomm/restcomm:latest

Known Issue on Firefox when running RestComm Olympus

It is possible that you will not be able to log in to olympus the first time that you will try to connect using Firefox. To fix this problem please follow the solution provided by Faisal Mq (stackoverflow).

  • When you would try to open up wss say using wss://RCBCONF_STATIC_ADDRESS:5083, Firefox will keep on giving you error until you open up a separate Firefox tab and do try hitting URL [https]://RCBCONF_STATIC_ADDRESS:5083 and Confirm Security Exception (like you do on Firefox normally for any https based connection). This only happens in Firefox.