LogicApp Configuration
LogicApp Configuration
The core of an N2IWF deployment is a configured N2SVCD LogicApp instance.
The base of an example N2IWF LogicApp configuration might include:
<application name="N2IWF-Logic" module="LogicApp">
...
<config>
<services>
<service module="LhoScpApp::LhoScpLuaService"
libs="../../n2scp/apps/lho_scp/lib"
script_dir="../../n2iwf/lua/svc/"
lua_lib_path="../lua/lib/?.lua;../../n2iwf/lua/lib/?.lua;../../n2iwf/lua/svc/scp/?.lua;../../n2scp/lua/lib/?.lua;../../n2cug/lua/lib/?.lua">
<triggers>
<trigger script_key="iwf_svc"/>
</triggers>
...
</service>
</services>
...
</config>
</application>
The following points are relevant to LogicApp configuration for N2IWF:
- The
module
andlibs
parameters in theservice
must be as required for the appropriate protocol handler module in use for inbound messages. - The
script_dir
parameter in theservice
will always be../../n2iwf/lua/svc/
. - The
trigger
element must specify thescript_key
asiwf_svc
. - The
lua_lib_path
must be correctly specified.
Lua Library Path
For the lua_lib_path
parameter in the LogicApp service
, the following guidelines apply:
- The following library paths are required:
- N2SVCD libraries:
../lua/lib/?.lua
- N2IWF core libraries:
../../n2iwf/lua/lib/?.lua
- N2SVCD libraries:
- A path to the N2IWF protocol handler for the input protocol in use is required. One of:
- N2IWF CAMEL/INAP calls (SCP):
../../n2iwf/lua/svc/scp/?.lua
- N2IWF CAMEL SMS:
../../n2iwf/lua/svc/capsms/?.lua
- N2IWF SIP calls:
../../n2iwf/lua/svc/sip/?.lua
- N2IWF CAMEL/INAP calls (SCP):
- Paths to the appropriate API for the input protocol in use is required. One of:
- N2IWF CAMEL/INAP calls (SCP) or CAMEL SMS:
../../n2scp/lua/lib/?.lua
- N2IWF SIP calls:
../../n2sip/lua/lib/?.lua
- N2IWF CAMEL/INAP calls (SCP) or CAMEL SMS:
- If N2CUG external actions are being used, the following library paths are required:
- N2CUG core libraries:
../../n2cug/lua/lib/?.lua
- N2CUG core libraries:
- If custom Lua hooks are used, the path to the file is required.
Compiled Lua
Any Lua libraries, both supplied by N-Squared and custom, may be pre-compiled by using the
Lua compiler utility. If this
is done, ensure that the lua_lib_path
is updated to reflect the appropriate file suffix as generated by the compiler.