SUMMARY
This article describes the steps required to configure an additional listening TCP port that supports the Unitrac API.
MORE INFORMATION
Due to customer requirements, it is sometimes necessary to have a particular port number which the customer must use to communicate with Unitrac using the Unitrac API. The remainder of this document describes adding another port so that Unitrac is using both its default port of 1000 and an additional port of 20000.
General Steps:
1. Clone the Unigate service and set its properties and its registry settings.
2. Create a private message queue for use by the cloned Unigate service.
3. Reconfigure the main Unitrac service CtiUniSvc to recognize the cloned Unigate service.
Clone the Unigate service and set its properties and its registry settings
First, make a copy of the existing Unigate service. In this example, the cloned service is named Unigate2. Following that, install the service. The commands that accomplish these two steps are shown below.
Once installed, use the Computer Management window to set the Recovery parameters for the cloned Service as shown below.
Now set the configuration parameters in the registry. Note the name of the service is part of the registry key. Also note that a queue name and port number must be selected for the service. In this example, the queue name is “CtiTcp2Svr” and the port number is 20000.
Here is the exported registry file for this example.
REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\CorpTen\UniGate2]
"ListenPort"=dword:00004E20
"RecvQueueName"=".\\PRIVATE$\\CtiTcp2Svr"
"SendQueueName"=".\\PRIVATE$\\CtiUniSvr"
"SessionPrefix"="tcp2"
(Note that 4E20 is 20000 in hexadecimal.)
Create a private message queue for use by the cloned Unigate service
The message queue is how the service communicates with the rest of Unitrac. In this example the name of the queue is CtiTcp2Svr. The queue is created using the computer management window, shown below.
Create the new private message queue as follows.
The cloned service may now be started. Check the application event log for any errors originating from the newly created service. If there are no errors, set the cloned service for automatic startup at boot time.
Reconfigure the main Unitrac service CtiUniSvc to recognize the cloned Unigate service
In this step the main Unitrac service is configured to send messages properly to the cloned service.
NOTE: this procedure requires changes to the registry. Failure to make the changes correctly could cause Unitrac to stop functioning. Before making the changes described below, export the key HKEY_LOCAL_MACHINE\ SOFTWARE\ Corp Ten International\ UniTrac Services\ CtiUniSvc registry key to a file for safe keeping.
The point of this step is to add the newly created queue to the list of queues handled by the main Unitrac service CtiUniSvc. In order to add to the list, the next available queue number must be manually located. The queues are ordered starting from zero and each number has two entries in the registry, one for Name and one for Queue (i.e. QueueOut1Name and QueueOut1Queue). Note the highest number in the list, scrolling to ensure all entries have been considered.
In this example, the highest number was 22. Two entries must be made in the registry so they are numbered 23 and 24. See the screen shot below.
Here is the registry file necessary to make the changes for this example. Replace XX and YY with the two consecutive numbers selected as described above.
REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\Corp Ten International\UniTrac Services\CtiUniSvc]
"Externals"="[tcp][tcp2][NT_]"
"QueueOutXXName"=""
"QueueOutXXQueue"=".\\PRIVATE$\\CtiTcp2Svr"
"QueueOutYYName"="tcp2"
"QueueOutYYQueue"=".\\PRIVATE$\\CtiTcp2Svr"
At this point, restart the main Unitrac service CtiUniSvc and check the Application Event log for errors. If there are no errors, Unitrac is now ready to handle client connections on the newly configured port of 20000.
Comments
0 comments
Please sign in to leave a comment.