Installation Steps
Warning |
---|
Internet should be available on the machine where the application is being installed and connections on port 9242 should be allowed in the network firewall to carry out the installation steps. |
Note |
---|
All the commands start with a # indicating that root user privileges are required to execute these commands. Trailing # is not a part of the command. |
Allow ports in the firewall
If there is an active firewall, allow following ports.
Code Block |
---|
443/tcp 8088/tcp 5060/tcp 16386-32768/udp |
Installation Steps
- Follow this guide to install and configure Freeswitch
- Please make sure that Solution Prerequisites are met for the desired deployment type.
- Download the deployment script deployment.sh and place it in the user home or any desired directory. This script will:
- delete the recording-solution directory if it exists.
- clone the required files for deployment
To execute the script, give it the execute permissions and execute it. This command will clone the skeleton project for recording solution. the recording-solution directory contains all the required files for deployment.
Code Block language bash $ chmod 755 deployment.sh $ ./deployment.sh
- Create MySQL database schema for vrs using the script located in recording-solution/data/init.sql. This is an sql script which creates a database with name vrs and the required tables. Run this as an sql script/query in MySQL (For non-HA deployment)
- Open recording-solution/docker/config.env and update the following environment variable
Name Description 1 DB_HOST vrs database host machine IP 2 DB_NAME vrs database name 3 DB_USER vrs database username 4 DB_PASSWORD vrs database password5 KEYCLOAK_PERMISSION_GROUP Keycloak Group from step 12 of keycloak setup 6 VRS_URLURL 7Replace the IP with local machine in non-HA deployment, replace it with Virtual IP in case of HA
[IP of a local machine]
2 LOCAL_MACHINE_IP 8192.168.1.101 [local machine IP in no-HA deployment, replace it with Virtual IP in case of HA
since it is a non-HA deployment]
3 KC_HOSTNAME Keycloak hostname e.g 192.168.1.101 4 TZ Asia/Karachi 95 TRUST_STORE_PATH /app/ssl/truststore.jks
keep it same
106 TRUST_STORE_PASSWORD Expertflow464 117 KCCCX_DBPRIMARY_URLjdbc:mysql://IP Primary UCCX IP e.g 192.168.1.106:3306/keycloak
Replace the machine IP and database name for keycloak database12 KC_DB_USERNAME
Keycloak database username 13 KC_DB_PASSWORD
Keycloak database password 14 KEYCLOAK_USER
Keycloak admin username (A new user is created when keycloak runs for the first time) 15 KEYCLOAK_PASSWORD
Keycloak admin password 16 KC_HOSTNAME
Local machine IP or fqdn 17 CCX_PRIMARY_IP Primary UCCX IP 18 CCX_33 8 CCX_SECONDARY_IP Secondary UCCX IP 19e.g 192.168.1.33 9 CCX_ADMIN_USERNAME CCX Admin username 2010 CCX_ADMIN_PASSWORD CCX Admin password 2111 FINESSE_URL https://uccx12-5p.ucce.ipcc:8445 2212 DIRECTORY_PATH_TO_MONITOR The path for archival process to monitor, it should be the same path where sessions are kept, mostly /home/efadmin/cucmRecording/sessions/ OR /usr/share/freeswitch/cucmRecording/sessions/ 2313 ARCHIVED_MEDIA_FILES_EXTENSION mp4 #keep it same 2414 FILE_EXTENSION wav #keep it same 2515 NO_OF_DAYS 1 2616 SFTP_HOST SFTP host IP for archival 27e.g 192.168.1.106 17 SFTP_PORT 22 2818 SFTP_USERNAME 29User name of the sftp server e.g expertflow 19 SFTP_PASSWORD 30SFTP password e.g Expertflow464 20 ARCHIVAL_JOB_INTERVAL 15 3121 STEAM_DELETION_JOB_INTERVAL_HRS
24 3222 RETRY_LIMIT 2 3323 ARCHIVAL_PROCESS_NODE active 3424 NO_OF_DEL_DAYS 2 25 KEYCLOAK_CLIENT_ID Name of the client e.g vrs 26 KEYCLOAK_CLIENT_SECRET
27 KEYCLOAK_REALM_NAME
Name of the realm e.g vrs 28 KEYCLOAK_PERMISSION_GROUP
Permission group e.g AGENT_GROUP Navigate to recording solution directory and execute the following commands:
Code Block # chmod 755 install.sh # ./install.sh
Verify all the containers are up and healthy
- Verify if keycloak container is healthy (docker ps), if it is on restarting, kill (docker kill keycloak) and remove (docker rm keycloak) the keycloak container then run ./install.sh. Wait for keycloak container to become healthy.
- Set up keycloak
Once keycloak is set up, update below environment variables in
recording-solution/docker/config.env
file.Name Description 1 KEYCLOAK_REALM_NAME Realm name created in step 4 of keycloak setup 2 KEYCLOAK_CLIENT_ID Keycloak client id from step 6 of keycloak setup 3 KEYCLOAK_CLIENT_SECRET Keycloak client secret from step 8 of keycloak setup 4 KEYCLOAK_PERMISSION_GROUP Keep it same - To update the self signed certificates for VRS, get the public authority or domain signed certificate .crt and .key files, name them server.crt and server.key and replace the files in /recording-solution/config/certificates with these two new files. Names should be exactly same.
- Run ./install.sh again
Run the following command to ensure that all the components are up and running.
Code Block # docker ps
- Go to https://VRS-IP/#/login to access the application.
- Configure SIP trunk to enable CUCM to send SIP events to VRS for call recordings. Two sip trunks should be configured in case of HA.
(HA Only) Install and configure rsync to synchronize the recording folder on both machines in HA.Install Rsync using the below command
#
sudo apt-get install rsync - Note down the directory that is used for recordings, assume it is /home/efadmin/cucmRecording/
- Go to recording-solution/HA
Configure passwordless login to the other machine by running the below command. Press [Enter] When prompted for a passphrase to leave the field blank.
#
sudo ssh-keygen -t rsa -b 2048
Copy the generated keys to the other machine
#
sudo ssh-copy-id -i /root/.ssh/id_rsa.pub efadmin@other-machine-IP
#
sudo crontab -e
*/1 * * * * sudo rsync -avzhe ssh efadmin@other-machine-ip:/home/efadmin/cucmRecording/ /home/efadmin/cucmRecording/
This will run the Rsync command every minute which will sync the local /home/efadmin/cucmRecording/ directory with other-machine /home/efadmin/cucmRecording/ directory. Any files added there will show up here and vice versa.
Follow these steps on the other machine as well(HA Only) Repeat the following steps on both machines.
Give execute permission and execute the script. This will create a keep-alived directory.
# chmod +x keep-alive.sh
# ./keep-alive.sh
Update the following three variables in keep.env file inside HA directory.
Name
Description
KEEPALIVED_UNICAST_PEERS
IPs of the machines in the cluster. On each machine, this variable should have a list of IPs of all the other machines in the cluster. The format of the list is as below:
192.168.1.80
KEEPALIVED_VIRTUAL_IPS
KEEPALIVED_INTERFACE
if config
or ip addr
will show all the network interfaces and assigned addresses. This is important. If wrong value is entered then it won't work and will cause every container restarts.Give the execute permission and execute the script: VRS should be now accessible via virtual IP
# chmod +x keep-command.sh
# ./keep-alive.sh