Skip to main content
Skip table of contents

EFCX Dialer deployment guide

Prerequisites

Software Requirements

Item

Recommended

Installation guide

Operating System

Debian 12

                                                           -

Docker

v24 or higher

https://docs.docker.com/engine/install/debian/

Postgres

v13 or higher

https://www.postgresql.org/download/linux/debian/

EFSwitch

Latest version

Installation

Configuration

Voice Connector

4.5

Deployment

Port Utilization Requirements

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

Type

Application

Description

Port

TCP

EFSwitch

ESL port

8021

TCP

EFSwitch

Websocket port

7443

TCP

Dialer

Access port

6666

TCP

Postgres

Database access port

5432

The ports can be opened as follows:

  • SSH into the Debian server.

    • Use command:

      • CODE
        ssh username@server-ip
    • Enter the ssh password.

    • Use command

      • CODE
        su
    • Enter the root user's password

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

    • CODE
      sudo iptables -A INPUT -p tcp -m tcp --dport PORT-j ACCEPT
    • Example:  

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

Set up Postgresql database and table

  • Navigate to the Postgresql folder.

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

  • Open the file postgresql.conf.

    • CODE
      vi postgresql.conf
    • Scroll down to find the line #listen_address='*' 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.

    • CODE
      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:

    • CODE
      systemctl restart postgresql
  • Create user 'efswitch':

    • CODE
      su - postgres
      createuser efswitch
  • Create database 'efcx'

    • CODE
      createdb efcx 
  • Assign password 'PASSWORD' to user 'efswitch':

    • CODE
      psql
      alter user efswitch with password 'PASSWORD';
      • Change PASSWORD to any password of your choice.

    • Check your Postgresql version:

      • CODE
        postgres --version
    • If the version is 15 or higher, also run the following command:

      • CODE
        ALTER DATABASE efcx OWNER TO efswitch;
  • Assign control of database 'efcx' to user 'efswitch':

    • CODE
      grant all privileges on database efcx to efswitch;
  • Exit back to root with command (twice)

    • CODE
      exit
      exit
  • Login to database 'efcx' with user 'efswitch':

    • CODE
      psql -h 127.0.0.1 -p 5432 -U efswitch -d efcx
    • Enter the password set earlier.

  • Create table 'contacts' by running the command:

    • CODE
      CREATE TABLE contacts (id varchar(40) PRIMARY KEY NOT NULL, customer_number varchar(20) NOT NULL, campaign_type varchar(20) NOT NULL, ivr varchar(20), gateway_id varchar(40) NOT NULL, status varchar(20), call_result varchar(40), received_time timestamp with time zone, dial_time timestamp with time zone, campaign_id varchar(40) NOT NULL, campaign_contact_id varchar(40), start_time timestamp with time zone, end_time timestamp with time zone, priority integer, dialing_mode varchar(20), routing_mode varchar(20), resource_id varchar(40), queue_name varchar(20));
  • Table can be queried after logging in to database with SQL commands such as:

    • CODE
      SELECT * FROM contacts;
      DELETE FROM contacts;

Container Deployment

The dialer is deployed as a docker image.

  • Create a folder outbound-dialer with the command

    • CODE
      mkdir outbound-dialer
  • Enter the folder with the command

    • CODE
      cd outbound-dialer
  • Create a file docker-compose.yml.

    • CODE
      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

    CODE
    version: "3"
    services:
      outbound-dialer:
        image: gitimages.expertflow.com/rtc/outbound-dialer:4.5
        container_name: outbound-dialer
        ports:
          - 6666:8080
        env_file:
          - docker-variables.env
        restart: always
  • Save and exit by :

    • Press the Esc key.

    • Enter the phrase :wq to save and exit.

  • Create a file docker-variables.env 

    • CODE
      vi docker-variables.env 
  • Enter editing mode with the 'I' or 'Insert' keys.

  • Copy the contents below and paste them into the file docker-variables.env

    CODE
    DB_URL=192.168.1.10
    DB_USERNAME=username
    DB_PASS=password
    DB_PORT=5432
    DB_NAME=name
    DB_CONN_TIMEOUT=3000
    ESL_IP=192.168.1.10
    ESL_PORT=8021
    ESL_PASSWORD=ClueCon
    DEFAULT_IVR=*9664
    SERVICE_IDENTIFIER=1218
    VOICE_CONNECTOR=http://192.168.1.10:8115
    ESL_CONNECT_DELAY=60000
    CONTACT_RETRIEVAL_DELAY=20000
    MAX_CONCURRENT_CALLS=5
    MAX_CALL_TIME=60
    CALLS_PER_SECOND=10
    LOG_LEVEL=INFO
    • DB_URL: The URL of the database from which contacts are to be pulled. Change this to the IP address of the current server.

    • DB_USERNAME: Username for database authentication. (set above)

    • DB_PASS: Password for database authentication. (set above)

    • DB_PORT: Database port, do not change from 5432.

    • DB_NAME: Database name.  (set above)

    • DB_CONN_TIMEOUT: Maximum time allowed (in milliseconds) for connecting to the database. (Default 3000)

    • ESL_IP: IP address of the EFSwitch ESL to use. (The IP of the server that EFSwitch is deployed on)

    • ESL_PORT: Port of the EFSwitch ESL. (Default 8021, Same as in EFSwitch settings here)

    • ESL_PASSWORD: Password for the EFSwitch ESL. (Default ClueCon, Same as in EFSwitch settings here)

    • DEFAULT_IVR: Default IVR to play in case of none provided for outbound call.

    • SERVICE_IDENTIFIER: Service Identifier for the voice connector. (Default 1218, set in EFSwitch IVR settings here).

    • VOICE_CONNECTOR: Webhook of the voice connector. Format: http://VC-IP:Port

    • ESL_CONNECT_DELAY: Delay in milliseconds between checking EFSwitch ESL connection status

    • CONTACT_RETRIEVAL_DELAY: Delay in milliseconds before retrieving contacts from the database.

    • MAX_CONCURRENT_CALLS: Maximum calls that can be active at a time.

  • This value must always be less than the maximum concurrent calls allowed on the EFSwitch SIP trunk in use for outbound calls.

  • If set higher, then the extra calls created by the dialer will be stuck in the database on the dialed state.

  • These stuck calls can only be removed by directly interacting with the database.

  • To confirm the maximum concurrent calls allowed by the trunk, contact your SIP Trunk provider.

  • Before setting this value also account for the call volumes and speed of the other types of calls taking place on the EFSwitch (manual outbound, IVR inbound etc).

  • CALLS_PER_SECOND: The maximum number of calls that can be generated in a second.

  • This value must always be less than the sessions-per-second value in EFSwitch otherwise the excess calls created per second by the dialer will be stuck in the database on the dialed state.

  • These stuck calls can only be removed by directly interacting with the database.

  • To confirm this value on EFSwitch, open the EFSwitch command line on the EFSwitch server via the command fs_cli -p <EFSwitch-CLI-Password>

  • Run the command fsctl sps and note the value displayed.

  • Before setting this value also account for the call volumes and speed of the other types of calls taking place on the EFSwitch (manual outbound, IVR inbound etc).

  • MAX_CALL_TIME: The time in minutes for which each contact waits to either get back an agent after requesting, or get back call result after dialing.

  • This value must always be more that the Agent TTL value in the EF CX Channel Settings in Unified Admin.

  • It must also be longer than the time in a minutes each call is expected to last.

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

  • Save and exit by :

    • Press the Esc key.

    • Enter the phrase :wq to save and exit.

  • Run the command:

    • CODE
      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:

    CODE
    docker compose up -d
  • Confirm that the docker container is running by using the command:

    • CODE
      docker ps
  • Confirm that the container is running correctly by opening the logs with command:

    • CODE
      docker logs -f containerID

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.