Lua Services

LogicApp Lua Services

Introduction

A Lua service is the inbound point which triggers the execution of a Lua script within the LogicApp application, in response to a new inbound transaction initiated by some external entity.

The service is responsible for:

Since the service implements all of the underlying infrastructure, the Lua script needs only to perform the business logic:

  1. Process the arguments which are provided to it.
  2. Return some final result.
  3. Call supplementary Lua Service actions (if required).
  4. Call other Lua Agent functions (if required).

This Technical Guide describes the core Lua Services provided as part of the base n2svcd package. Other protocol-specific Services are delivered by other packages, e.g. Services related to SIP functionality are delivered by the n2sip package.

Supplementary Service Actions

Every service library must provide the base input/output features.

The service may also offer actions that the script can use to interact with the external entity during Lua script execution (rather than waiting until the end of the Lua script processing).

For example:

Agent Actions

In addition to the actions provided by a services, the Lua script may freely call upon Lua Agents to perform its work.

Any actions supplied by agents are independent from the actions provided by the script’s Service.