...
Code Block | ||
---|---|---|
| ||
Please edit .env file with the appropriate values. Current .env contents:
TZ=Europe/Madrid
SSH_USERNAME=opengate
DATA_BINDADDR=10.X.X.X
VOICE_BINDADDR=10.X.X.X
SIP_REGISTRAR_IP=10.X.X.X
# DB_NAME MUST be opengate (hardcoded at OpenGate Proxy)
DB_NAME=opengate
DB_USER=opengaterw
RECORDING_SHARE=//X.X.X.X/recording
RECORDING_SHARE_USER=Administrator
RECORDING_SHARE_PASSWORD=PASSWORD
RECORDING_MOUNT_POINT=/recordings
# set to true to restore from a backup
RESTORE_MODE=false
Generate the secrets using the following commands and instructions:
- DB password: echo "MYPASSWORD" > secrets/db_password.txt
- SSH Key: ssh-keygen -N "" -f secrets/ssh_key
- TLS certificates (generate self-signed): openssl req -x509 -nodes -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 3650
or copy your own to the apropriate files:
cat key.pem cert.pem > secrets/asterisk.pem
When done, start the environment by executing: docker compose up -d |
...
Replace MYPASSWORD with the password you want:
Code Block echo "MYPASSWORD" > secrets/db_password.txt
This password and the value of the DB_USER variable (opengaterw by default) must match what is configured in the OpenGate Proxy Server configuration.
Generate the SSH keys:
Code Block ssh-keygen -N "" -f secrets/ssh_key
Generate self-signed certificates if you don't have your own:
Code Block openssl req -x509 -nodes -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 3650
And concatenate the two resulting files into a single one at the corresponding path:
Code Block cat key.pem cert.pem > secrets/asterisk.pem
...
Copy the SSH public key you generated on the Master. Either manually with a graphical SFTP/SCP client or by executing on the node:
Code Block scp opengate@MASTERIP:secrets/ssh_key.pub secrets/ssh_key.pub
Where opengate is the user you configured on the operating system of the Master, and MASTERIP is its IP address. You will need to correctly enter the password for the opengate user of the Master machine when prompted.
Generate self-signed certificates if you don't have your own:
Code Block openssl req -x509 -nodes -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 3650
And concatenate the two resulting files into a single one at the corresponding path:
Code Block cat key.pem cert.pem > secrets/asterisk.pem
Finally, start with the command below:
Code Block |
---|
docker compose up -d |
3.3. OpenGate WebRTC Gateway installation
...
Copy the SSH public key you generated on the Master. Either manually with a graphical SFTP/SCP client or by executing on the node:
Code Block scp opengate@MASTERIP:secrets/ssh_key.pub secrets/ssh_key.pub
Where opengate is the user you configured on the operating system of the Master, and MASTERIP is its IP address. You will need to correctly enter the password for the opengate user of the Master machine when prompted.
Generate self-signed certificates if you don't have your own:
Code Block openssl req -x509 -nodes -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 3650
And concatenate the two resulting files into a single one at the corresponding path:
Code Block cat key.pem cert.pem > secrets/freeswitch.pem
Finally, start with the command below:
Code Block |
---|
docker compose up -d |
4. Update
Edit the
docker-compose.yml
file and check tags from all images.Tags pointing to
:latest
will automatically download the latest version.Alternatively, indicate a specific release (example:
release-01
). Check https://enghouseglobal.atlassian.net/wiki/spaces/PSRN.
Run the following commands to update and start the environment again:
Code Block docker compose pull docker compose up -d
The above commands will cause that containers with changes (and also depending containers) to restart.
...