Restcomm is a next generation Cloud Communications Platform to rapidly build voice, video, and messaging applications, using mainstream development skills. Created by the people at Telestax.
Learn more at http://www.restcomm.com
Using the Restcomm docker image you will be able to run Restcomm with the minimum effort and no pain.
Restcomm binds to the ip address of the host and following ports:
- http: 8080
- sip/udp: 5080
- sip/tcp: 5080
- sip/ws: 5082 (Used for WebRTC)
- rtp/udp: 65000 - 65535
Please report any issues at https://github.com/gvagenas/Restcomm-Docker/issues
The image has been tested with Docker 1.7.
- latest: Using this tag you will get the latest Restcomm build. gvagenas/restcomm:latest
- 7.4.0: Using this tag you will get the Restcomm 7.4.0.GA release. gvagenas/restcomm:7.4.0
- 7.3.1: Using this tag you will get the Restcomm 7.3.1.GA release. gvagenas/restcomm:7.3.1
- 7.3.0: Using this tag you will get the Restcomm 7.3.0.GA release. gvagenas/restcomm:7.3.0
For the rest of this README document, the latest tag will be used and you can replace it with the proper tag from the above list, for example 7.3.1
The Restcomm docker image supports a set of environment variables to configure the application.
- STATIC_ADDRESS Set the public ip address that Restcomm should use
- OUTBOUND_PROXY Set the SIP Outbound proxy
- OUTBOUND_PROXY_USERNAME Set the SIP Outbound proxy username
- OUTBOUND_PROXY_PASSWORD Set the SIP Outbound proxy password
- MEDIASERVER_LOWEST_PORT Set the Media Server lowest RTP port
- MEDIASERVER_HIGHEST_PORT Set the Media Server highest RTP port
- PROVISION_PROVIDER Set the Provision Provider, choose one of the following: VI (VoipInnovation), BW (Bandwidth), NX (Nexmo), VB (Voxbone)
- DID_LOGIN Set the DID Provider username
- DID_PASSWORD Set the DID Provider password
- DID_ENDPOINT Set the Endpoint ID for VoipInnovation Provision Provider
- DID_SITEID Set the Site Id for Bandwidth Provision Provider
- DID_ACCOUNTID Set the Account Id for Bandwidth Provision Provider
- INTERFAX_USER Set the Interfax username
- INTERFAX_PASSWORD Set the Interfax password
- ISPEECH_KEY Set the iSpeech speech recognition key
- VOICERSS_KEY Set the VoiceRss Text-To-Speech key
- ACAPELA_APPLICATION Set the Acapela Text-To-Speech application key
- ACAPELA_LOGIN Set the Acapela Text-To-Speech username
- ACAPELA_PASSWORD Set the Acapela Text-To-Speech password
- Using the default values
docker run --name=restcomm -d -p 8080:8080 -p 5080:5080 -p 5082:5082 -p 5080:5080/udp -p 65000-65535:65000-65535/udp gvagenas/restcomm:latest
- Provide your VoiceRSS key for Text-To-Speech by setting environment variable VOICERSS_KEY
docker run -e VOICERSS_KEY="YOUR_VOICESS_KEY_HERE" --name=restcomm -d -p 8080:8080 -p 5080:5080 -p 5082:5082 -p 5080:5080/udp -p 65000-65535:65000-65535/udp gvagenas/restcomm:latest
- Provide your VoiceRSS key for Text-To-Speech and Outbound proxy by setting environment variable VOICERSS_KEY and OUTBOUND_PROXY
docker run -e VOICERSS_KEY="YOUR_VOICESS_KEY_HERE" -e OUTBOUND_PROXY="YOUR_OUTBOUND_PROXY_HERE" --name=restcomm -d -p 8080:8080 -p 5080:5080 -p 5082:5082 -p 5080:5080/udp -p 65000-65535:65000-65535/udp gvagenas/restcomm:latest
- To automatically restart the container in case of a failure or host restart, you have to use the --restart-always flag
docker run -e VOICERSS_KEY="YOUR_VOICESS_KEY_HERE" --name=restcomm --restart=always -d -p 8080:8080 -p 5080:5080 -p 5082:5082 -p 5080:5080/udp -p 65000-65535:65000-65535/udp gvagenas/restcomm:latest
Important Notice for Restcomm networking
When using a sip client that is not running on the same machine as the Restcomm docker image, for example when calling from sip desk phone to Restcomm docker image, you won't be able to properly setup the call and receive any RTP traffic, because Restcomm docker image will be using the ip address of the container, that docker assigned to the container, thus all the SIP and SDP messages will be tagged with the container's ip address that can't be reached outside the local machine.
The fix for that is to provide the IP Address of the host machine using the STATIC_ADDRESS environment variable so Restcomm will properly configured:
docker run -e VOICERSS_KEY="YOUR_VOICESS_KEY_HERE" -e STATIC_ADDRESS="YOUR_HOST_IP_ADDRESS_HERE" -e OUTBOUND_PROXY="YOUR_OUTBOUND_PROXY_HERE" --name=restcomm -d -p 8080:8080 -p 5080:5080 -p 5082:5082 -p 5080:5080/udp -p 65000-65535:65000-65535/udp gvagenas/restcomm:latest
Using the STATIC_ADDRESS and given that the sip client can reach the host's ip address, you will be able now to properly setup a call and receive RTP traffic.
Quick test
After you started the Restcomm container, you can quickly make a call to verify that everything works by using the Olympus WebRTC applicatin that is shipped with Restcomm.
- Point your browser to
http://HOST_IP_ADDRESS:8080/olympus
- Press "Sign in"
- Your browser will ask for permission to share microphone and camera, press allow
- Go to "Contact", click on the "+1234" and press the "Audio Call" button (phone icon)
- You should hear the "Welcome to Restcomm, a Telestax Sponsored project" announcement
To stop container: docker stop restcomm
To start container: docker start restcomm
To remove container: docker rm restcomm
You can persist the logs, database, recordings, text-to-speech cache and RVD workspace using shared filesystem, so even if you stop and remove your container, your work won't be lost.
Download the restcomm_workspace that contains the default database, default RVD workspace and the required folders and unzip it to a folder in your filesystem.
Next run Restcomm image using the following volume arguments:
- Restcomm logs
-v $YOUR_FOLDER/restcomm_workspace/restcomm/log:/opt/Mobicents-Restcomm-JBoss-AS7/standalone/log
- Restcomm recordings
-v $YOUR_FOLDER/restcomm_workspace/restcomm/recordings:/opt/Mobicents-Restcomm-JBoss-AS7/standalone/deployments/restcomm.war/recordings
- Restcomm tts cache
-v $YOUR_FOLDER/restcomm_workspace/restcomm/cache:/opt/Mobicents-Restcomm-JBoss-AS7/standalone/deployments/restcomm.war/cache
- Restcomm HSQL database
-v $YOUR_FOLDER/restcomm_workspace/restcomm/data:/opt/Mobicents-Restcomm-JBoss-AS7/standalone/deployments/restcomm.war/WEB-INF/data/hsql
- Media Server logs
-v $YOUR_FOLDER/restcomm_workspace/mms/log:/opt/Mobicents-Restcomm-JBoss-AS7/mediaserver/log
- Restcomm Visual Designer workspace
-v $YOUR_FOLDER/restcomm_workspace/rvd/workspace:/opt/Mobicents-Restcomm-JBoss-AS7/standalone/deployments/restcomm-rvd.war/workspace
For example if you unzip the restcomm_workspace.zip to /opt/restcomm_workspace/ then the docker run command will be:
docker run --name=restcomm --restart=always -d -e VOICERSS_KEY="YOUR_VOICERSS_KEY" -p 8080:8080 -p 5080:5080 -p 5080:5080/udp -p 65000-65535/udp -v /opt/restcomm_workspace/restcomm/log:/opt/Mobicents-Restcomm-JBoss-AS7/standalone/log -v /opt/restcomm_workspace/restcomm/recordings:/opt/Mobicents-Restcomm-JBoss-AS7/standalone/deployments/restcomm.war/recordings -v /opt/restcomm_workspace/restcomm/cache:/opt/Mobicents-Restcomm-JBoss-AS7/standalone/deployments/restcomm.war/cache -v /opt/restcomm_workspace/restcomm/data:/opt/Mobicents-Restcomm-JBoss-AS7/standalone/deployments/restcomm.war/WEB-INF/data/hsql -v /opt/restcomm_workspace/mms/log:/opt/Mobicents-Restcomm-JBoss-AS7/mediaserver/log -v /opt/restcomm_workspace/rvd/workspace:/opt/Mobicents-Restcomm-JBoss-AS7/standalone/deployments/restcomm-rvd.war/workspace gvagenas/restcomm:latest
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 --entrypoint=/bin/bash -it -p 8080:8080 -p 5080:5080 -p 5082:5082 -p 5080:5080/udp -p 65000-65535/udp gvagenas/restcomm:latest
docker exec rc [command]
For example
docker exec rc ps -ef | grep java