Running an additional copy of the module
Several copies of the module can be running on one Asterisk server. They can be connected to the same telephony, but to different CRMs.
It's important:
Internal numbers on portals must not overlap (otherwise one call will hit multiple portals).
Each copy of the module should have its own config file and network ports for connecting to the admin area and receiving commands from CRM.
Each copy of the module should have its own customizer.
Licensing is done through portal addresses.
When running several copies of the module on the same portal, it is possible to exceed the limit of CRM API requests (copies of the module do not coordinate the frequency of requests among themselves).
The changes are described for itgrix_bx. For itgrix_kmo everything is the same, only paths will contain itgrix_kmo instead of itgrix_bx.
Steps for creating a copy
1. Create the second config
Let's call it /etc/itgrix_bx/config-1.json
We will fix it in the new config:
port, secure_port
another port other than 8077, 8078
Example of updated values:
2. Create a configuration file for the new service
In the new file for systemd, make the following changes:
Description
change to the name of the new service (itgrix_bx-1
);В
ExecStart
add a flag--config
with the name of the new config that was created in step 2;В
ExecStart
change the name of the log file to a new one.
Example of updated values:
3. Registration of the second service of the integration module
Run the module executable with the --register-instances switch in order for the module to detect the additional copy:
4. Configure log rotation
We need to create a separate log file cp /var/log/itgrix_bx{,-1}.log
and change its owner to the user under which the service will be started.
In /etc/logrotate.d/itgrix_bx
copy the entire contents with the new log name.
New file contents:
5. Creating a second customizer
For the first copy of the module, the customizer is located in the folder /opt/itgrix_bx/customizer/
.
In the file /opt/itgrix_bx/customizer/settings.json
. The config and log of the first copy are listed.
For the second copy, create a folder /opt/itgrix_bx/customizer-1/
and in the file /opt/itgrix_bx/customizer-1/settings.json
configure and log the second copy.:
For Itgrix_kmo "configCrmField": "kmo"
, path values contain itgrix_kmo
.
Also in the second copy's config /etc/itgrix_bx/config-1.json
you need to specify the appropriate customizer:
Now we set up the customizations in /opt/itgrix_bx/customizer-1/actions/
according to the needs of the second copy.
6. Start/stop/restart/status/auto start
systemctl start itgrix_bx-1
systemctl stop itgrix_bx-1
systemctl restart itgrix_bx-1
systemctl status itgrix_bx-1
systemctl enable itgrix_bx-1
systemctl disable itgrix_bx-1
7. Authorize on the portal
When the service is running, go to the CRM settings page in the admin area: localhost:8075/config/master/crm
Perform authorization.
Last updated