INFO: Link Cloning
This document covers the configuration of a clone link. It is sometimes helpful to have multiple instances of a particular link running concurrently. For example, you might want to have two different service provider accounts for different sets of NS2K units. In order to make this scheme work in Unitrac, each link must have its own unit ID prefix, so that the messages are routed properly, and it must have its own input message queue(s). To accomplish this, the new link is created as a clone of the original link.
Decide on a new link prefix. The convention is to add no more than two letters to the right of the default prefix. For this example, the prefix for a new NS2K link will be NS2KTS.
Private Message Queues
Use the Computer Management control panel applet to create new private message queues for the new link. In general when a link is cloned its message queues are cloned as well. There may be more than one message queue for a given link. For this example, create the queues .\Private$\CtiNS2KtsSvr and .\Private$\NS2Ksmtp and make them transactional. (In general, the queues are to be created as “Transactional.” The exception is the CtiV2KSvrPPC queue which is non-transactional. When in doubt, use the default, non-cloned queues as a model for the cloned queues. The transactional nature of a queue cannot be modified after creation.)
- Start > Administrative Tools > Computer Management (compmgmt.msc)
- Services and Applications > Message Queuing > Private Queues
- Check the base link to determine if the link is non-transactional or transactional. To check base link double-click the base link queue. Reference below image to determine if the base link is non-transactional or transactional.
- Create a new private queue
- Right Click Private Queues > New > Private Queue
- Enter the cloned link name. For this example, the base link name is CtiNS2KSvr so the cloned link name will be CtiNS2KtsSvr.
- Check box if the link is Transactional
- Create a new private queue for SMTP (Note: If the main link doesn’t have SMTP then skip this step.)
- Enter the cloned SMTP link name. For this example, the base SMTP link name is NS2KSmtp so the cloned link name will be NS2KtsSmtp. Confirm transactional and non-transactional with base SMTP link.
- Permissions for clone links need to be the same as the base links for user account Everyone. Right-click on the base link > properties > Security
Registry – Part 1
Export the original registry key to a temporary file. Edit that file and change the key to reflect the new service name. Also, change the link prefix to the new prefix and update any other configuration information such as queue names. Then merge the file into the registry.
- Export the original base link in the Registry located HKEY_LOCAL_MACHINE > SOFTWARE > UniTrac > UniTrac Services > base link and name it the name given to the new clone link. For this example, the base link name is CtiNS2KSvc so the cloned link name will be CtiNS2KtsSvc.
- Right click on clone link registry key > Edit. Note: When modifying the registry key do not alter MsgProgID, that should be the same as the base link.
- Modify Key Name
- Merge clone link key into the Registry
- Right Click on clone link key > Merge
- Confirm install and settings in Registry
Duplicate Base Link Executable & Install Clone Link
Copy the service executable to a new name incorporating the new prefix into the name. In this case copy CtiNS2KSvc.exe to CtiNS2KtsSvc.exe. Keep the copy in the Unitrac installation folder.
- Copy & Paste the original base link located in the UniTrac installation folder.
- Rename copy to clone link name. For this example, the base link name is CtiNS2KSvc so the cloned link name will be CtiNS2KtsSvc. Put new clone link executable back in the UniTrac installation folder.
- In the command prompt go to the UniTrac install folder where the clone link is located at. Type the following clonelinkname.exe –i. For this example, it would be CtiNS2KtsSvc.exe -i
Services – Part 1
Open the Service Control Manager (SCM) and set the recovery and log on parameters the same as for the original service.
- Start > Administrative Tools > Services (services.msc)
- Service Base Link > Right Click > Properties
- Review Log On and Recovery for the base link and replicate on clone link
Registry – Part 2
Edit the registry for the CtiUniSvc service to add the new prefix/queue name pair. Ensure that the queue numbering scheme is followed otherwise Unitrac will not recognize the new link.
- Start > Run > regedit
- Locate HKEY_LOCAL_MACHINE > SOFTWARE > Corp Ten International > UniTrac Services > CtiUniSvc
- Add new prefix/queue name pair. Must keep with the naming convention and find last. For this example, QueueOutXXName & QueueOutXXQueue where XX is a number one larger than the highest value already in the registry.
- Copy the base link values and change the values where needed for clone link. For this example, .\Private$\CtiNS2KSvr would be .\Private$\CtiNS2KtsSvr and ns2k would be ns2kts.
Services – Part 2
- Restart the CtiUniSvc service
- Start clone link service
- Check Event Log for errors
Add Prefix to Database
- Start > All Programs > Microsoft SQL Server 20XX > SQL Server Management Studio
- New Query
- SELECT * FROM Unitrac.dbo.Prefixes
- From the displayed results, find the base link under the szPrefixName column and cross-reference to the IPrefixUnitTypeID column. For this example szPrefixName is “ns2K:” and the IPrefixUnitTypeID is “51”.
- Enter a new record in the table as follows:
For these commands, note:
- IPrefixUnitTypeID, enter the value noted from base link. For this example, it would be 51.
- szPrefixName, enter the clone link prefix that was created. For this example it would be ns2kts:
insert into dbo.Prefixes(lPrefixUnitTypeID,szPrefixName)
- Confirm prefix has been added to database by using Step 2 – A above.
- Confirm prefix in UniTrac
If everything shows up and no errors the clone link has successfully been configured.