Input Context
Input Context
The input context is a Lua object that contains details about the input received for a network session. This includes the input data that is as received from the N2SVCD application that triggers the message handling to the N2IWF LogicApp.
Its structure and data are entirely specific to the protocol used, but will contain the received message plus other relevant input or derived parameters. It is a table of values that are retrieved by direct key access in all cases.
For example, an input context for an INAP/CAMEL call using the SCP protocol handler might be:
input_context = {
iwf_protocol = (table),
context_fields = {
call_trigger = 'ORIG',
initialdp_arg = {
calledPartyBCDNumber_digits = '6449040323',
...
},
normalised_called_party = '6449040323',
normalised_calling_party = '6449040123',
normalised_logical_party = '6449040123',
normalised_original_called_party = UNDEF,
normalised_other_party = '6449040323',
normalised_redirecting_party = UNDEF,
pending_tn = '6449040323',
ssp_inap = 'camel2',
...
}
}
It is expected that the input context is never modified. The service context should be used to store information about the session in progress.
Attributes
All input contexts have the following attributes:
Attribute | Type | Description |
---|---|---|
iwf_protocol |
Table | Holds the IWF protocol handler library that received the message from the network. |
context_fields |
Table | Holds the received input from the network. |
Methods
Note that as the input context is a Lua object, its methods should be accessed using the colon operator, e.g.:
input_context:get_by_dot ("key")
rule_context
This function returns the context_fields
attribute of the input context.
This is equivalent to accessing it directly, i.e. input_context.context_fields
.
This function takes no parameters.
get_by_dot
This function behaves identically to the N2SVCD utility function get_by_dot
but operates solely on the
context_fields
table within the input context and the input context
additional selectors.
This function takes three positional parameters:
- The table to examine. This is ignored for N2IWF input context additional selectors; the input context is always used for these.
- The (possibly dot-notated) key to retrieve.
- The comparison value being examined.