Breadcrumbs

Recording Link Uploader Deployment Guide

Prerequisites

Software Requirements

Item

Recommended

Installation guide

Operating System

Debian 12

-

Docker

v24 or higher

-

MongoDB

Latest version

Installation

EF CX

Latest version

Deployment

Media Server/Eleveo

Latest version

Media Server Installation

Media Server Configuration

Port Utilization Requirements

The following ports must be open on the server for the program to function.

Type

Application

Description

Port

TCP

MongoDB

Database access port

27017

TCP

Postgres

Database access port

5432

The ports can be opened as follows:

  • SSH into the Media Server.

    • Use command:

      ssh username@server-ip
      
    • Enter the ssh password and press Enter.

  • Use command:

    su
    
  • Enter the root user's password

  • Run the following command and replace PORT with each of the required ports listed above:

    sudo iptables -A INPUT -p tcp -m tcp --dport PORT-j ACCEPT
    
  • Example with port 8021:  

    sudo iptables -A INPUT -p tcp -m tcp --dport 8021 -j ACCEPT
    
  • Save this port configuration with command:

    sudo iptables-save
    

Media Server PostgreSQL Configuration

  • SSH into the Media Server.

    • Use command:

      ssh username@server-ip
      
    • Enter the ssh password and press Enter.

  • Use command:

    su
    
  • Enter the root user's password

  • Navigate to the Postgresql folder.

    • cd /etc/postgresql/<version>/main/
      
    • Where <version> is the version of Postgresql being used.

  • Open the file postgresql.conf.

    • vi postgresql.conf
      
    • Scroll down to find the line #listen_addresses='*' and remove the # symbol.

  • Save and exit by :

    • Press the Esc key.

    • Enter the phrase :wq to save and exit.

  • Open the file pg_hba.conf.

    • vi pg_hba.conf
      
    • Scroll down to the bottom and add the line:

      • host all all 0.0.0.0/0 md5

  • Save and exit by :

    • Press the Esc key.

    • Enter the phrase :wq to save and exit.

  • Restart the Postgresql service:

    • systemctl restart postgresql
      

Create MongoDB database

  1. SSH into the Media Server.

    • Use command:

      ssh username@server-ip
      
    • Enter the ssh password and press Enter.

  2. Use command:

    su
    
  3. Enter the root user's password.

  4. Run command:

    systemctl enable mongod
    
  5. Open the MongoDB config file:

    vi /etc/mongod.conf
    
  6. Locate the field bindIp and set its value to the IP address of the current server.

  7. Note the value of the port field as well.

  8. Run command:

    systemctl restart mongod
    
  9. Run command:

    mongosh --host HOST --port PORT
    
    1. Where HOST is the value of the bindIp field in Step 3.

    2. PORT is the value of the port field in Step 4.

  10. In the following text replace USER and PASS with your choice of username and password respectively, then copy and paste it in the Mongo CLI opened in the previous step, and press enter:

    use recording-link-activities
    db.createUser(
      {
        user: "USER",
        pwd: "PASS",
        roles: []
      }
    )
    
  11. Exit with the command:

    exit
    

Container Deployment

The voice connector is deployed as a docker image.

  • SSH into the Media Server.

    • Use command:

      ssh username@server-ip
      
    • Enter the ssh password and press Enter.

  • Use command:

    su
    
  • Enter the root user's password.

  • Create a folder recording-link-uploader with the command:

    mkdir recording-link-uploader
    
  • Enter the folder with the command:

    cd recording-link-uploader
    
  • Create a file docker-compose.yml.

    vi docker-compose.yml
    
  • Enter editing mode with the 'I' or 'Insert' keys.

  • Copy the contents below and paste them into the file docker-compose.yml

    version: "3"
    services:
      recording-link-uploader:
        container_name: recording-link-uploader
        image: gitimages.expertflow.com:voice-recording-solution/recording-link-activities:1.0
        ports:
          - 6115:8080
        env_file:
          - env.txt
        restart: 'no'
    
  • Save and exit by :

    • Press the Esc key.

    • Enter the phrase :wq to save and exit.

  • Create a file env.txt

    vi env.txt
    
  • Enter editing mode with the 'I' or 'Insert' keys.

  • Copy the contents below and paste them into the file env.txt

    CX_FQDN=https://ef-cx.expertflow.com
    LOG_LEVEL=DEBUG
    MIDDLEWARE_API=https://my-efcx.expertflow.com/recording-middleware
    RECORDING_BACKEND=ELEVEO
    RETRIEVAL_INTERVAL=15
    
    MONGO_IP=192.168.1.10
    MONGO_PASSWORD=password
    MONGO_PORT=27017
    MONGO_USERNAME=username
    
    ELEVEO_ADMIN=admin
    ELEVEO_MAX_CALL_TIME=60
    ELEVEO_PASSWORD=password
    ELEVEO_PROCESSING_TIME=5
    ELEVEO_TIMEZONE=Asia/Karachi
    ELEVEO_URL=http://192.168.1.10
    ELEVEO_USERNAME=username
    
    DB_IP=192.168.1.10
    DB_NAME=fusionpbx
    DB_PASS=password
    DB_PORT=5432
    DB_USERNAME=fusionpbx
    
    • RECORDING_BACKEND: The mechanism for recording files. Currently only supports ELEVEO or EFSWITCH.

      • EFSWITCH corresponds to the CX Media Server.

    • LOG_LEVEL: The amount of detail in the logs. Default is INFO, and for more detailed logs the value should be DEBUG.

    • CX_FQDN: The address of EF CX. https://FQDN

    • MIDDLEWARE_API: The EFCX FQDN with the recording middle-ware endpoint. https://FQDN/recording-middleware

    • MONGO_IP: IP address of the Mongo Database.

    • MONGO_PASSWORD: Password of the Mongo Database.

    • MONGO_PORT: Port of the Mongo Database. Default 27017.

    • MONGO_USERNAME: Username of the Mongo Database.

    • RETRIEVAL_INTERVAL: The number of past days to push recording links for on startup.

    • The following are only to be set when setting ELEVEO for RECORDING_BACKEND (leave at default values otherwise:

      • ELEVEO_MAX_CALL_TIME: The maximum possible time in minutes a call is assumed to last.

      • ELEVEO_PASSWORD: The administrator password for Eleveo.

      • ELEVEO_PROCESSING_TIME: The time in minutes it takes for a call to appear in Eleveo after ending.

      • ELEVEO_TIMEZONE: The timezone of the Eleveo deployment e.g. Asia/Karachi

      • ELEVEO_URL: The IP address of the Eleveo deployment.

      • ELEVEO_USERNAME: The username of the Eleveo deployment.

    • The following are only to be set when setting EFSWITCH for RECORDING_BACKEND (leave at default values otherwise):

      • DB_NAME: Media Server database name. Keep at default fusionpbx.

      • DB_URL: Media Server server IP address.

      • DB_PORT: Media Server database port. Keep at default 5432

      • DB_USERNAME: Media Server database name. Default is fusionpbx unless changed manually in Media Server.

      • DB_PASS: Media Server database password.

  • Run the command:

    docker login gitimages.expertflow.com
    
    • Enter your username and password as prompted (make sure that you were granted access to the repository).

  • Within the folder run the command:

    docker compose up --no-start
    
  • Confirm that the docker container is created:

    docker ps -a
    

Create CRON Job

  • SSH into the Media Server.

    • Use command:

      ssh username@server-ip
      
    • Enter the ssh password and press Enter.

  • Use command:

    su
    
  • Enter the root user's password.

  • Run the following command:

    echo '*/15 * * * * docker restart recording-link-uploader' > recording-link-uploader.cron
    
  • Run the following command to load the job into the cron scheduler:

    crontab recording-link-uploader.cron
    

Set Ingress and Service in EF CX

  • SSH into the EF CX server.

    • Use command:

      ssh username@server-ip
      
    • Enter the ssh password and press Enter.

  • Use command:

    su
    
  • Enter the root user's password.

  • Navigate to the kubernetes folder of this EFCX deployment.

  • Run the following commands, after replace myEfswitchIp with the IP address of the Media Server:

    sed -i 's/efswitchIp/myEfswitchIp/g' cx-voice-recording/Services/ef-recording-middleware-efswitch-service.yaml
    kubectl apply -f cx-voice-recording/Services/ef-recording-middleware-efswitch-service.yaml
    
  • Run the following commands, after replacing middlewarePort with the port of the recording middleware deployed on the Media Server:

    sed -i 's/8080/middlewarePort/g' cx-voice-recording/Ingresses/nginx/ef-recording-middleware-Ingress.yaml
    kubectl apply -f cx-voice-recording/Ingresses/nginx/ef-recording-middleware-Ingress.yaml