OMniLeads over FreePBX / Issabel

A partir de la versión 1.4.0, OMniLeads puede ser desplegado en producción utilizando Docker. En esta sección se cubren todos los aspectos necesarios para correr la aplicación utilizando esta novedosa tecnología de “virtualización” que nos facilita la co-existencia entre OMniLeads y el software de IPPBX dentro del sistema operativo subyacente.

Note

First of all, we want to emphasize, that all things exposed here havewarranty on `Issabel-20200102<https://razaoinfo.dl.sourceforge.net/project/issabelpbx/Issabel%204/issabel4-USB-DVD-x86_64-20200102.iso>`_. For FreePBX-15 exists a workaround detailed at the end of this section.

When executing installation procedure on the repository, we can proced with the installation of:

  • Docker
  • docker-compose
  • PostgreSQL
  • RTPEngine

This components will be installed and executed directly over the base operating system(Sangoma-OS or Issabel-OS, as appropriate)

For other part, the remaining application components, will be executed as a Docker containers.

In the following figure a representative scheme about how is deployed OMniLeadsalongside an IPPBX stack is shown

_images/pbx_integration_oml_arq.png

As we can see the components: Asterisk, Kamailio, Nginx, Wombat Dialer, Redis and OMni-App are executed on containers, while RTPengine, PostgreSQL and MySQL over the base operating system.

Installation procedure

As a first step we proced to login into the host where the PBX is running for then download the OMniLeads repository, and once its cloned we must go to the relative path: ominicontacto/deploy/docker/prodenv

yum -y install git kernel-devel kernel-headers
cd /var/tmp
git clone https://gitlab.com/omnileads/ominicontacto.git
cd ominicontacto/deploy/docker/prodenv

Once we are in the Path indicated, we must edit the file .env in order to associate values to the variables used on OMniLeads deployment

Environment variables .env

In this file environment variables that will be used by the containers are configured

The file is documented con comments, however we are going to cite the main parameters next

The variables DOCKER_HOSTNAME and DOCKER_IP are related with the IP LAN address assigned to the IPPBX host main interface

Then we have the variable RELEASE that makes allusion to the OMniLeads version to deploy, the variable TZ (Time Zone) and the variable DJANGO_PASS which sets the password for the OMniLeads web user ‘admin’

###############################################################################
#                       IP and hostname of the docker host:                   #
#  If you want to use a hostname to connect web OMnileads type your hostname  #
#  If not type the IP address in both variables                               #
###############################################################################
#DOCKER_HOSTNAME=your.hostname.com
#DOCKER_IP=X.X.X.X

#####################
# Omnileads release #
#####################
#RELEASE=release-1.3.4

################################
# Timezone for the environment #
################################
TZ=America/Argentina/Cordoba

##############################
# Password of admin web user #
##############################
#DJANGO_PASS=my_very_strong_pass

We make focus on the variables block related to MySQL, where the variable MYSQL_ROOT_PASS must be edited with the value of the MySQL root user.On CentOS-7 MySQL got without password for localhost connections, in that case uncomment the parameter and left empty (MYSQL_ROOT_PASS=), if you did not generated a root password. Regarding the second parameter to configure, MYSQL_HOST,the host IP LAN direction must be used.

#####################
# MYSQL credentials #
#####################
#MYSQL_ROOT_PASS=my_very_strong_pass
#MYSQL_HOST=X.X.X.X
WOMBAT_DB=wombat
WOMBAT_DB_USER=wombat
WOMBAT_DB_PASS=dials

Finally, the parámetros PGHOST must be filled with the host IP LAN and PGPASSWORD is the omnileads user password on the PostgreSQL instance used by the application. Here we can choose freely a password for our like, because PostgreSQL is installed with OML as a part, unlike MySQL which is installed as part of the IPPBX software stack

##########################
# PostgreSQL credentials #
##########################
#PGHOST=X.X.X.X
PGDATABASE=omnileads
PGUSER=omnileads
#PGPASSWORD=my_very_strong_pass

Once edited the selected variables, we are ready to execute the OMniLeads deployment.

Note

The SUBNET=192.168.15.0/24 should ONLY be modified in case your PBX hosthost LAN IP (where docker-engine runs) does not match with this range mentioned.

Inside the folder where .env variables file resides, in which we were working we have the installation script: install.sh. This script must be executed as a root, after set every parameter on file .env previously mentioned

./install.sh

Then, from here the install process will starts and then also the application running

Important

Inside the installation steps there is the execution of the first *docker-compose that makes up the containers. Being the first execution the Docker images for every component will be downloaded now, and for that reason could be slow for up to some dozens of minutes, depending of the Internet connection speed.

_images/install_docker_download_img.png

Systemd - omnileads-prodenv

A partir de la isntalación se deja disponible el servicio: omnileads-prodenv.service el cual servirá para parar/levantar la aplicación. El sistema se deja configurado para que inicie automáticamente luego de cada reinicio del sistema operativo de base.

To verify the service:

systemctl status omnileads-prodenv

If everything is correct we should get the following output:

_images/install_docker_systemctl_status.png

To stop the service:

systemctl stop omnileads-prodenv

To start the service

systemctl start omnileads-prodenv

Important

In case we have been executing this procedure on FreePBX, we must consider the following workaround due to its management of Iptables.

First login

For access to the system and start the Initial configuration and then the configuration of Integration between OMniLeads & PBXs we must access from a web browser to the URL formed by the Linux host IP using https and the port 444, as shown in the figure.

_images/install_docker_1st_access.png

Workaround for FreePBX

After every operating system reboot we must execute the following commands in order to make the instance ready to start to work

systemctl restart docker
systemctl restart omnileads-prodenv

This two commands will make ready the OMniLeads instance in FreePBX

Note

On next versions we will try to optimize the OMniLeads execution in FreePBX