Installing IraDialer/IraCpa on Debian 12

IMPORTANT

This document explains the process for installing iradialer versions 1.6.x and newer on servers running Debian 12 OS.

The Epicode releases for Debian consist of multiple deb packages. They are as follows:

ira-dependency-repo: This contains the deb packages for all the dependencies required. It will copy them to the machine and configure a local repository so that apt-get will pull dependencies from the local repo.

irahive: Required for all sites. This contains Epicode interprocess messaging framework and licensing framework. This sets up:

  • Redis server or stunnel based on the configuration in serverdetails.json

  • IraHive

  • IraPass for cloud or node licensing

iradialer: Required only  if the site needs iradialer APIs. This sets up:

  • Freeswitch with iradialer module for calling and CPA

  • iradialerweb for HTTP APIs

  • Iraeventdispatcher for notifying the webhook url.

iracpa: Required only if the site needs web socket API to stream media to IraCPA engine and get CPA results. This sets up:

  • IraCPA with web socket interface

NOTE:

  1. iradialer deb has CPA functionality built in. You can use the CPA via dialer APIs without having to install iracpa. Just install irahive and iradialer. iracpa is only required if you also need the web socket interface for streaming media for CPA analysis.

  2. If a site only needs the CPA web socket interface and does not need to handle dialing and calls, you need not install iradialer. Just install irahive and iracpa.

Step 1: Download the latest debs

Download the latest debs from the shared Google drive folder below:
https://drive.google.com/drive/folders/1P3MTurB4mgygLBg00pyXPLYkIJ7iDKCh?usp=drive_link

Step 2: Setup prerequisites

Run the latest version of the deb package ira-dependency-repo. This will create a local repo with all the dependencies which will be installed while installing IraCpa and IraDialer.

sudo apt install ./ira-dependency-repo_1.5.0-1.deb

Step 3: apt-get update

Make sure to run the command below so that Debian is made aware of the new repo that is added.

sudo apt-get update

Step 4: serverdetails.json

Ensure that the file /AEC/serverdetails.json exists and is of the format shown below.

{
"redis_endpoint": "master.redis-xxxx-xxxx.xxxx.xxxx.cache.amazonaws.com",
"unique_hive_name": "AEC_TEST_1",
"gateways": [
    { "name": "chime", "username": "aecuser", "password": "aec2307", "realm": "xxxx.voiceconnector.chime.aws", "From-user": "+16692004912", "transport": "tls"}
    ]
}

Refer the article below for more details on serverdetails.json:
https://support.epicode.in/help/en-gb/2-iradialer/9-configuring-serverdetails-json

Step 5: Install the debs

First install irahive (During future updations, this step only needs to be performed if a new version of irahive is available)

sudo apt install ./irahive_1.2.1-1.deb

If there are no errors while installing irahive, install the iradialer and/or iracpa in the same way.

sudo apt install ./<package_name>.deb

Step 6: Check logs

Check the latest logs from all components in /var/log/epi and ensure that there are no errors logged and that IraPass log shows that it has successfully acquired the licenses.


Fixes for known issues

During installation of irahive, if you choose to install and use local redis server, then it is possible that the setup might end with the message below:

This means that the redis-server was unable to start, most likely due to a port conflict. This usually happens when the stunnel process is running and is binding to the same port.

Run the command:

sudo /usr/local/epi/scripts/kill_stunnel_process.sh

If the stunnel process was running, and it is killed by the script it would print “stunnel running. Stopping it”. If it does this, you should now be able to restart redis-server and resume operation.

sudo service redis-server restart

Check the redis-server status to ensure that it is running.

sudo service redis-server status

If the stunnel process was not running, the script would print “stunnel is not running”. This means that the cause for redis-server failing to start is not the port conflict. This is usually resolved by rebooting the server.

HA Setup

In case of HA Setup, to upgrade the Iradialer the following are the steps to follow:

  1. Stop all ira services on all servers in the cluster. If it’s a 2 server cluster then let’s call the servers 1a and 1b.

  2. Install/Upgrade IraDialer on 1a and check logs to see if the installation/upgradation went through smoothly.

  3. Install/Upgrade IraDialer on 1b and check logs to see if the installation/upgradation went through smoothly.


FAQs

What is the recommended procedure for upgrading from IraDialer 1.4.x on Debian 10 to 1.6.x on Debian 12?

Epicode does not recommend doing an OS upgrade. Instead terminate the old Debian 10 servers and launch new Debian 12 servers with the same serverdetails.json file and install the latest version on the new servers.

How do I know if the site is using local redis or cloud redis?

Check the value for redis_endpoint in /AEC/serverdetails.json. If it is localhost, that means it is set to use local redis, else it is set to use cloud redis.

Also check the service status of “redis-server” and “redistunnel” by running:

sudo service <service_name> status

For local redis, redis-server should be running and redistunnel should be inactive.

For cloud redis, redis-server should be inactive and redistunnel should be running.

How do I change a site from local redis to cloud redis or vice versa?

Update /AEC/serverdetails.json with the right redis endpoint and run the command:

sudo /usr/local/epi/scripts/reconfigure_ira_services.sh

Check the latest logs in /var/log/epi to confirm no errors.

How do I change the proxy_web url or the HTTP proxy settings?

Update /AEC/serverdetails.json with the right redis endpoint and run the command:

sudo /usr/local/epi/scripts/reconfigure_ira_services.sh

Check the latest logs in /var/log/epi to confirm no errors. Check IraPass log if it has acquired the licenses through the proxy web.