CX Dialer Deployment Guide
Prerequisites
Software Requirements
Item | Recommended | Installation guide |
Operating System | Debian 12 | - |
Docker | v24 or higher | |
Postgres | v13 or higher | |
Media Server | Latest version | |
Voice Connector | 4.5 |
Port Utilization Requirements
The following ports must be open on the server for the dialer to function.
Type | Application | Description | Port |
TCP | Media Server | ESL port | 8021 |
TCP | Media Server | 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:
CODEsudo 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_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.
- 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
psql --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 :
CODEversion: "3" services: outbound-dialer: image: gitimages.expertflow.com/rtc/outbound-dialer:TAG container_name: outbound-dialer ports: - 6666:8080 env_file: - docker-variables.env restart: always
Replace the 'TAG' keyword with the required image tag obtained from the releases page here.
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 :
CODEDB_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=60 CONTACT_RETRIEVAL_DELAY=20 MAX_CONCURRENT_CALLS=5 MAX_CALL_TIME=60 CALLS_PER_SECOND=10 LOG_LEVEL=INFO
Set these according to the following table:
Config Params | Expected Values | Notes |
---|---|---|
DB_URL | IP Address e.g. 192.168.1.2 | The URL of the database from which contacts are to be pulled. Change this to the IP address of the current server |
DB_USERNAME | Text e.g. admin | The dialer database username |
MAX_CONCURRENT_CALLS | Number e.g. 10 | Maximum number of 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. 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). To confirm the maximum concurrent calls allowed by the trunk, contact your SIP Trunk provider. |
DB_PASS | Text e.g. abc123 | The dialer database password |
DB_PORT | Number e.g. 5432 | The dialer database port (Default 5432) |
DB_NAME | Text e.g. dialer | The dialer database name |
DB_CONN_TIMEOUT | Number e.g. 3000 | Maximum time allowed (in milliseconds) for connecting to the database. (Default 3000) |
ESL_IP | IP Address e.g. 192.168.1.2 | IP address of the EFSwitch ESL to use. (The IP of the server that EFSwitch is deployed on) |
ESL_PORT | Number e.g. 8021 | Port of the EFSwitch ESL. (Default 8021, Same as in EFSwitch settings here) |
ESL_PASSWORD | Text e.g. ClueCon | Password for the EFSwitch ESL. (Default ClueCon, Same as in EFSwitch settings here) |
DEFAULT_IVR | IVR Dialing number e.g. *9664 | Default IVR to play in case of none provided for outbound call (Default *9664) |
SERVICE_IDENTIFIER | Number e.g. 1218 | Service Identifier for the voice connector. (Default 1218, set in EFSwitch IVR settings here) |
VOICE_CONNECTOR | FQDN with IP Address and port e.g. http://192.168.1.2:4321 | Webhook of the voice connector. Format: http://VC-IP:Port |
ESL_CONNECT_DELAY | Number e.g. 60 | Delay in seconds between checking EFSwitch ESL connection status |
CONTACT_RETRIEVAL_DELAY | Number e.g. 20 | Delay in seconds before retrieving contacts from the dialer database |
CALLS_PER_SECOND | Number e.g. 10 | 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 the value of sessions-per-second on EFSwitch:
|
MAX_CALL_TIME | Number e.g. 60 | The time in minutes for which each contact in the database is allowed to stay on the dialed or agent_pending states, after which it’s state is manually updated to pending state to be retried This value must always be greater that the Agent TTL value in the EF CX Channel Settings in Unified Admin. |
LOG_LEVEL | INFO/DEBUG | Determines 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:
CODEdocker 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