RPC Custom Action DLL

You can use a remote procedure call with custom call action DLLs, so the DLLs are loaded in a separate process from the Platform Call Engine process. This allows for safer operation of the Call Engine since the custom code in the user DLL cannot affect memory in the Call Engine.

It is also useful when reloading custom call DLLs, since the Call Engine will not need to be restarted as it would otherwise need to be -- though calls using custom action DLLs will immediately hang-up when those DLLs are reloaded. The time to debug custom action DLLs can also be decreased since the Call Engine does not have to be restarted after each change.

The custom call action DLLs are loaded with a service called Lumenvox Platform RPC Client. This service is started automatically by the Call Engine when it starts. If for any reason, the Call Engine loses communication with the RPC Client, the Call Engine will attempt to restart this service.

To create custom action DLLs for use with this mode, you will need to replace references to the LVCA.h header in your code with LVCA2.h. Also, make sure your DLL does not include LVSpeechPort.h or any other headers related to the LumenVox Engine. LVCA2.h should include all functionality you will need to make use of the custom action API.

CAPI RPC Settings

Many of the settings related to how CAPI RPC operates are in the Platform.ini file under the [PLATFORM_RPC] section. For normal operation, these settings do not need to be changed. For debugging the DLL, however, you will need to change some settings.

The following settings are controlled through the Platform.ini file:

Setting Default Value Comments
ACTIVE TRUE Must be true to use CAPI RPC, otherwise the standard DLL loading methodology will be used.
USE_SERVICE TRUE Specifies if the RPC client is the LumenVox Platform RPC Client service, otherwise the console process will be used.
AUTO_START TRUE If true and the service is used, the Call Engine will start the service when it begins. If communication is interrupted with the client, the Call Engine will attempt to restart the RPC service.
SERVICE_NAME LumenvoxPlatformRPC Should only be changed if advised by a LumenVox technician.
RPC_PORT 4013 The port that the Call Engine and the RPC client will communicate. Should only be changed if a conflict with another application is discovered.
PROCESS LumenvoxPlatformRPC Command line of the process to run if not using the client service. Not Currently Used.
RPC_IP 127.0.0.1 IP address the client RPC application will use to communicate with the Call Engine. Should not be changed at this time.
RPC_TIMEOUT 60000 Amount of time (in milliseconds) that the RPC client will wait for a CAPI call to complete on the Call Engine or for the custom call DLL to handle an event from the Call Engine. Should ordinarily only be changed for debugging.
RPC_PING 0 The client and call engine can be set to periodically exchange pings to ensure continuous connection. This does not ordinarily need to be turned on.

Debugging

To run your custom call DLL in a debugger, use the following altered ini file settings:

AUTO_START=FALSE
USE_SERVICE=FALSE
PROCESS=LumenvoxPlatformRPC -console
RPC_TIMEOUT=240000

Then start the Call Engine and be sure that at least one line uses a project that makes use of your DLL.

Next, run this command line in your debugger:

LumenvoxPlatformRPC -console

If your DLL is not used as the primary project for any lines, but is switched by a project once it runs, your DLL will not be available to debug until the project using it actually runs.

© 2012 LumenVox LLC. All rights reserved.