Installation steps
Installation Steps
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.
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.
Requirements
Replay Server for HA
SQL Server 2019
Two SIP Trunks for HA
VRS solution on two separate machines for HA
EFCX Server (for KeyCloak)
Docker and Docker Compose
Git
There are two types of installation: EFCX and Cisco (UCCX & UCCE). For EFCX, most of the steps are not required, as Keycloak, JtapiConnector, and Mixer are not required.
Allow ports in the firewall
If there is an active firewall, allow the following ports.
443/tcp
444/tcp
8088/tcp
5060/tcp (only for Cisco)
16386-32768/udp (only for Cisco)
8021/tcp
1433 /tcp
5432 /tcp
# Additional port to open in case of High Avaliability (HA)
8500
8300
8301 /tcp/udp
8302 /tcp/udp
8303 /tcp/udp
8600 /tcp/udp
Installation Steps
Please make sure that the Solution Prerequisites are met for the desired deployment type.
Download the deployment script deployment.sh and place it in the user’s 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 permissions to execute and run it as follows.
BASH$ chmod 755 deployment.sh $ ./deployment.sh
This command will clone the skeleton project, recording-solution. This recording-solution directory contains all the required files for deployment. It will be cloned in the same place as the deployment script is placed.
Now, our cloning has been completed. Our VRS deployment files and directories have been downloaded. We can proceed to configure it.
Follow this guide to install and configure Freeswitch. The recording path in Free SWITCH and in Docker compose volume must be the same.
Follow this guide to configure ESL. (for Pause and Resume Recording)
Follow this guide to create an application user on CUCM for jtapi-connector.
Create a database in SQL Server for VRS with the name vrs and run the SQL script (sqlserver.sql) located in
recording-solution/data/scripts
. This script will generate the required database tables.Navigate to the
recording-solution/docker
directory.Only in case of non-HA, open
docker-compose-cisco.yml
and uncomment the archival-process container. For HA, keep it commented. Save and exit.Open
config.env
in the same directory and update the environment variables given below.
Name | Description | |
---|---|---|
1 | VRS_URL | CISCO → URL of a local machine. example, https: //192.168.1.101 EFCX → URL of VRS machine with port 444. eg IP/Url:444 or https: //192.168.1.101:444 |
2 | LOCAL_MACHINE_IP | CISCO → Local machine IP. example 192.168.1.101 * EFCX → IP of the local machine with port 444 |
3 | KC_HOSTNAME | Keycloak hostname where Keycloak is hosted. e.g 192.168.1.101 |
4 | TZ | Time Zone. e.g, Asia/Karachi |
5 | DEPLOYMENT_PROFILE | Set it either CISCO or EFCX as per the deployment profile |
6 | PEER_ADDRESS | Add the IP or FQDN of the Second Recorder VM (For HA) |
7 | JTAPI_HA_MODE | Set it to true for HA and false for Non-HA |
8 | SCREEN_RECORDING | If Screen recording is enabled, set it to true; otherwise, false |
9 | CONSUL_URL | (Only for CISCO HA) Add the ip address with port 8500 of the local machine http://192.168.1.101:8500 |
10 | DIRECTORY_PATH_TO_MONITOR | The path for the archival process to monitor. It should be the same path where sessions are kept, e.g, /var/vrs/recordings/cucmRecording/sessions/ |
11 | FINESSE_URL | Url or FQDN of FInesse e.g https: //uccx12-5p.ucce.ipcc:8445 |
12 | ARCHIVED_MEDIA_FILES_EXTENSION | mp4 [keep it same] |
13 | FILE_EXTENSION | wav [keep it same] |
14 | NO_OF_DAYS | No of days before which all the files will be archived. If set 2, then except for the last 2 days from the date and time of service started or triggered, all the files will be archived. |
15 | SFTP_HOST | SFTP host IP for archival |
16 | SFTP_PORT | 22 |
17 | SFTP_USERNAME | Username of the SFTP server |
18 | SFTP_PASSWORD | SFTP password |
19 | ARCHIVAL_JOB_INTERVAL | It is a duration that tells the service to trigger again. This value is in hours. For example, if set 24 the service would be triggered after 24 hrs to get the desired job done. |
20 | STEAM_DELETION_JOB_INTERVAL_HRS | Time in hours before which all the streams are to be deleted. e.g 24 |
21 | RETRY_LIMIT | limit to retry in case the connection fails. e.g 2 |
22 | ARCHIVAL_PROCESS_NODE | active |
23 | NO_OF_DEL_DAYS | No of days before which all the streams will be deleted. If set 2, then except for the last 2 days from the date and time of service started or triggered, all the files will be deleted. |
24 | CISCO_TYPE | Either UCCE or UCCX |
25 | CUCM_APPLICATION_USER_NAME | CUCM Application username that has been created in step 8. |
26 | CUCM_APPLICATION_USER_PASSWORD | Password for the CUCM Application User. |
27 | CUCM_IP | IP address of Call Manager |
The below Env variables are only for UCCX.
Name | Description | |
---|---|---|
1 | CCX_PRIMARY_IP | Primary UCCX IP address. |
2 | CCX_SECONDARY_IP | Secondary UCCX IP |
3 | CCX_ADMIN_USERNAME | CCX Admin username |
4 | CCX_ADMIN_PASSWORD | CCX Admin password |
The following Env variables are only for UCCE.
Name | Description | |
---|---|---|
1 | UCCE_IP | UCCE IP |
2 | UCCE_DATABASE | UCCE awdb database name |
3 | UCCE_USERNAME | UCCE awdb database user’s username |
4 | UCCE_PASSWORD | UCCE awdb database user’s password |
The following Environment variables are for Keycloak.
Names | Description | |
---|---|---|
1 | KEYCLOAK_REALM_NAME | Realm name from EFCX keycloak |
2 | KEYCLOAK_CLIENT_ID | KeyCloak client ID from EFCX Keycloak |
3 | KEYCLOAK_CLIENT_SECRET | Add the client secret from the EFCX keycloak |
4 | KEYCLOAK_PERMISSION_GROUP | AGENT_GROUP |
5 | KEYCLOAK_URL | FQDN of CX or URL of Keycloak |
6 | EFCX_FQDN (Only for EFCX) | FQDN of CX in case of CISCO, comment this out |
Add the Following environment variables for pause and resume recording.
Names | Description | |
---|---|---|
1 | ESL_HOST | IP address of the Recorder Machine |
2 | ESL_PORT | Port of the Record where ESL commonly used 8021 |
3 | ESL_PASSWORD | Password of ESL |
4 | REC_PATH_STREAMS | Path where streams are saved e.g vrs/var/recordings/cucmRecording/streams |
Update the Database environment variables in config.env.
Name | Description | |
---|---|---|
1 | DB_DRIVER | Driver on which database is running |
2 | DB_ENGINE | Engine on which database is running, i.e postgres, mysql or sqlserver |
3 | DB_HOST | Name or IP of the host on which the database is active |
4 | DB_NAME | Name of the database. In case of EFCX, it can be fetched from the config.conf on this path /etc/fusionpbx/ |
5 | DB_USER | Username for the database. In case of EFCX, it can be fetched from the config.conf on this path /etc/fusionpbx/ |
6 | DB_PASSWORD | Password for the database. In case of EFCX, it can be fetched from config.conf on this path /etc/fusionpbx/) |
8 | DB_PORT | Port of the Database |
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 the same.
Navigate to the recording-solution directory and assign permissions to the install script.
CODEchmod 755 install-cisco.sh #in case of CISCO chmod 755 install-efcx.sh #in case of EFCX chmod 755 install-replay.sh #in case of HA CISCO
Perform this step only if Deployment Profile is EFCX.
On the Media Server, run the following command and note the output password:
CODEcat /etc/fusionpbx/config.conf | grep database.0.password
Run the following command and enter the password noted before:
CODEpsql -h 127.0.0.1 -p 5432 -U fusionpbx -d fusionpbx
Run this command to create the required database index
CODECREATE INDEX idx_mykey ON v_xml_cdr USING GIN (json) WHERE json->'variables' ? 'sip_h_X-CALL-ID';
Run ./install-efcx.sh for EFCX Or run ./install-cisco.sh for Cisco UCCX and UCCE.
Run the following command to ensure all the components are running.
CODE# docker ps
In case of Cisco, go to https : //VRS-IP/#/login to access the application, whereas for EFCX go to https://VRS-IP:444/#/login.
For HA-specific deployment, proceed with the following steps.
Copy the Config. env file and paste it in the Recorder 2 VM and Replay Server, as most of the environment variables are the same
Follow this guide for the creation of an rsync job on All VMs Recorder 1, Recorder 2, and Replay Server.
Go to the replay server add permission to install.sh script and then run
./install-replay.sh
.Configure two SIP Trunks on Cisco Call Manager in HA Mode and set priorities for both Machines.
Do the following steps for both recorder1 and recorder2.
Open
recoding-solution/docker/docker-compose-cisco
Inside the docker-compose-cisco file, Uncomment the Consul Container.
In the
container_name
variable, set the name as consul1 for Recorder 1 and consul2 for Recorder 2.Add your interface card. This can be found using the ifconfig or ip address command.
- CONSUL_BIND_INTERFACE=ens192 #ens192 or end32
In the command section, set the name of the consul in the
-node=<any-name>
as shown in the code snippet below. This name must be different than the second recorder.Set the
-advertise=<Local-Machine-IP>
and set-retry-join=<IP-Second recorder>
. Keep the other values as it is
# command: "agent -node=consul-106 -server -ui -bind=0.0.0.0 -client=0.0.0.0 -advertise=192.168.1.106 -bootstrap-expect=2 -retry-join=192.168.1.101"
Save changes and exit.
Run ./install-cisco.sh
Check containers on both recorders using the
docker ps
commandDeploy the Recorder 2 in the same way.
Deploy the replay server. For the replay server, just add the config.env file. and run the
./install-replay.sh
command.