Generic Connector Configuration
Connector Configuration Parameters
The following are the CUCM configurations that can be set in the env file.
|
Parameter |
Default Value |
Description |
|
|---|---|---|---|
|
1 |
KEY |
ASDFGHJKLZXCVBNM234RFGHUIOKJMNBFEWSDFGHNJMNBV |
License key. Must be obtained from EF Team |
|
2 |
CUCM_IP1 |
CUCM_Server_IP1 |
Primary CUCM |
|
3 |
CUCM_IP2 |
CUCM_Server_IP2 |
Secondary CUCM |
|
4 |
HEARTBEAT_SLEEP |
5 |
Delay in ping to check ping service (seconds) |
|
5 |
ACTIVEMQ1 |
localhost:61616 |
ActiveMQ Primary URL |
|
6 |
ACTIVEMQ2 |
localhost:61616 |
ActiveMQ Secondary URL |
|
7 |
CUCM_USER |
Jtapi_USer |
Jtapi users are required to login into CUCM |
|
8 |
CUCM_PASSWORD |
Jtapi_Password |
Password for the jtapi user to login |
|
9 |
ACTIVEMQ_TIMEOUT |
30000 |
ActiveMQ connection timeout (in milliseconds) |
|
10 |
PREFECT_SIZE |
20000 |
Prefect Size of the messages |
|
11 |
GRC_CONSUMER_PRIORITY |
127 |
0-127 priority to read the message first in case of multiple consumers. Details are mentioned in HA section. |
|
12 |
PRIORITY_BACKUP |
true |
Property to enable amq failover support. Details are mentioned in HA section. |
|
13 |
|
false |
Property to randomize traffic on amqs! This will be required for HA. Details are mentioned in HA section. |
|
14 |
AGENT_STATES_PUBLISHER_DURATION |
5000 |
Time after which states of all agents will be published on the topic |
|
15 |
MESSAGE_FORMAT |
JSON |
Type of Events returned to the client (Only JSON supported currently) |
|
16 |
LOG LEVEL |
TRACE |
Log Level |
|
17 |
AGENT_LOGS_PATH |
/app/logs/agents/ |
Agent Logs Storage path |
|
18 |
AGENT_LOGS_LEVEL |
TRACE |
Agent Logs Level |
|
19 |
AGENT_LOGS_MAX_FILES |
10 |
Max No of Files per agent for logs |
|
20 |
AGENT_LOGS_FILE_SIZE |
10MB |
Max file size for agent logs |
|
21 |
|
|
Expiry time for a message to read in a queue |
Deployment Steps
-
Run the following command to create a network
// For docker based deplyment docker network create appnet // For podman based deployment podman network create appnet-
In case of if podman network creation fails and user sees following error
-
In that case user needs to configure a subnet pool, run following command to do so or you can refer to the official podman documentation .
podman network create \ --subnet 10.88.0.0/16 \ --gateway 10.88.0.1 \ appnet
-
-
Download the deploy.sh file from here.
-
Place deploy.sh file inside some folder eg. Jtapi_Connector.
-
Run the following commands to start the procedure.
Commands to execute deploy.sh file
cd /root/Jtapi_Connector bash deploy.sh
-
A cloned folder 'cucm_connector_deployment' can be seen on the command ls.
-
Go into the cloned folder, where two folders can be seen.
-
Run the following set of commands to install ActiveMQ.
cd Stand_alone_Active_MQ -
Create ssl self sigined certs (broker.ts and broker.ks) if not provided by the customer. Run the following command
// Genrate Keystore keytool -genkeypair \ -alias broker \ -keyalg RSA \ -keysize 2048 \ -validity 365 \ -keystore broker.ks \ -storepass password \ -dname "CN=10.192.9.35" // Export Certificate keytool -exportcert \ -alias broker \ -keystore broker.ks \ -storepass password \ -file broker.crt // Create Trust Store keytool -importcert \ -alias broker \ -file broker.crt \ -keystore broker.ts \ -storepass password \ -noprompt -
Now edit activemq.xml file available on the same path and update the passwords
-
If you are using podman deployment, then do this step else skip
-
Edit docker-compose file and update the volumes as follow (add :Z at the end)
-
-
Now run following command to install activemq
// Docker docker-compose up -d // Podman podman-compose up -d -
After above command user can access admin console on a browser to confirm its availability.
http://machine_ip:8161/admin/queues.jsp
-
After amq installation, go back to the main repo directory 'cucm_connector_deployment'. And go into the connector folder 'Connector_Compose_Env'.
-
You can see the files like this.
-
Edit the env file and add the required configurations as explained here!
-
After adding configurations, run the following commands to install connector application:
docker-compose up -d -
After successful execution of step 13, run the following command to check if the container is up and running!
docker container ps -a
ActiveMQ Configuration (Redundant Deployment Only)
ActiveMQ “Config” button opens the ActiveMQ configuration file %ACTIVEMQ%/conf/activemq.xml in your default text editor (e.g. notepad).
Configuring Network of Brokers
Settings for a network of brokers are mandatory for redundant deployment only. These configurations should however be done on one side only.
ActiveMQ brokers should be configured to run as a network of brokers to communicate with each other both for Active-Active and Active-Passive deployment models.
-
Edit the ActiveMQ Network brokers in activemq.xml file
In activemq.xml, the “Network of Broker” configuration please add the following configuration mentioned in the screenshot below. There are 2 instances of <networkConnector> (i) for Queues, (ii) for topics, where you need to set the value of the URI parameter specifying other broker’s (site-B) address.
Make sure that the configurations are active on only one side. On the other side, it should remain commented out.
If the above-commented configurations are not available in activemq.xml file then copy following and add it inside <broker> tag.
Here the URI IP should be IP of the remote amq.
Configurations
<networkConnectors>
<networkConnector
name="T:broker1->broker2"
uri="static:(tcp://192.168.2.162:61616)"
duplex="true"
decreaseNetworkConsumerPriority="true"
networkTTL="2"
dynamicOnly="true">
<excludedDestinations>
<queue physicalName=">" />
</excludedDestinations>
</networkConnector>
<networkConnector
name="Q:broker1->broker2"
uri="static:(tcp://192.168.2.162:61616)"
duplex="true"
decreaseNetworkConsumerPriority="true"
networkTTL="2"
dynamicOnly="true">
<excludedDestinations>
<topic physicalName=">" />
</excludedDestinations>
</networkConnector>
</networkConnectors>
After adding the above configuration, the user needs to restart the same service.
Run the following commands to restart the Service
docker-compose down
docker-compose up -d
The URI on site-A should point to site-B URI “static:(tcp://SITE-B:PORT)” to configure it in network bridge mode.
For more information about configuring a network of brokers, see this article.