Notifications

Notification Messages

As part of handling any N2IWF action rule, a pre-configured notification message may be sent.

All notifications for the N2IWF are configured in the NOTIFICATIONS LogicApp service global variable.

Several default parameters may be defined as additional LogicApp service global variables and these may be overridden on a per-notification basis. Note that if default values are not specified, all notification messages must specify all values.

Each parameter, both per-notification and default parameters are N2SVCD rule engine rulesets where the N2IWF selector rule extensions apply.

A sample notification configuration might be:

<global name="NOTIFICATION_DEFAULT_TO" from_var="logical"/>
<global name="NOTIFICATION_DEFAULT_FROM" type="array">
    <rule from_var="notf_from"/>
</global>
<global name="NOTIFICATION_DEFAULT_PROTOCOL" literal="smpp"/>
<global name="NOTIFICATIONS" type="array">
    <notification name="notf1">I am a default notification.</notification>
    <notification name="notf2">
        <to from_var="called"/>
        <protocol type="array">
            <rule literal="ussd"/>
        </protocol>
        <route literal="smpp2"/>
        <text>I am a notification with overrides.</text>
    </notification>
</global>

In the above, two notifications are defined and would have the following configuration:

Name To Address From Address Protocol Lua Agent
Route
Body
notf1 Variable logical Variable notf_from SMPP (agent default) I am a default notification.
notf2 Variable called (none) USSD smpp2 I am a notification with overrides.

Note that sending notifications requires additional N2SVCD configuration for SMPP and/or USSD.

SMPP notifications are sent asynchronously and any response (submit_sm_resp) or delivery notification (deliver_sm) messages are not waited for nor checked.

USSD notifications are sent synchronously and the result (ussdNotify_RR) is waited for but not checked.

Notification Definition

Most notification parameters may be an N2IWF selector ruleset (either shorthand or full) or a simple scalar. Notification text and type may only be scalar values.

Common Notification Parameters

Each notification can support the following parameters:

Attribute Type Description
name Ruleset or
String
[Required] The unique name for this notification message. Used in rules to specify the notification to send.
to Ruleset or
String
[Conditional] The normalised destination address for the notification message. Must be specified if no default is specified.
route Ruleset or
String
The N2SVCD Lua agent route to use to send the notification message.
(Default: nil, use default N2SVCD Lua agent application route)
protocol String [Conditional] The protocol to send the notification message in on the wire, either smpp or ussd. Must be specified if no default is specified.
text String The plain text body of the notification message. Will be encoded into the appropriate on-the-wire characters by the sending N2SVCD application. May contain dynamic text definitions.
(Default: "", an empty string)

SMPP Notification Parameters

In addition to common notification parameters, each SMPP notification also supports the following additional parameters:

Attribute Type Description
from Ruleset or
String
[Conditional] The normalised from address for the notification message. Must be specified if no default is specified.
flash Ruleset or
Boolean
Whether the message should be treated as a flash message (i.e. displayed without storage).
(Default: false)

USSD Notification Parameters

In addition to common notification parameters, each USSD notification also supports the following additional parameters:

Attribute Type Description
msisdn_noa Ruleset or
Integer
The NOA of the MSISDN sent in the USSD notification.
(Default: 1)
msisdn_npi Ruleset or
Integer
The NPI of the MSISDN sent in the USSD notification.
(Default: 1)
dgt_noa Ruleset or
Integer
The NOA of the destination GT sent in the USSD notification.
(Default: 1)
dgt_npi Ruleset or
Integer
The NPI of the destination GT sent in the USSD notification.
(Default: 1)

Notification Parameter Defaults

Each notification parameter (whether common, SMPP-specific, or USSD-specific) may have a default value set as a separate global.

Like normal notification parameters, these defaults may be an N2IWF selector ruleset (either shorthand or full) or a simple scalar.

Defaults are specified with the prefix NOTIFICATION_DEFAULT_ followed by the upper-case parameter name. For example, all of the following defaults are supported:

<global name="NOTIFICATION_DEFAULT_PROTOCOL" value="smpp"/>
<global name="NOTIFICATION_DEFAULT_TO"       from_var="logical"/>
<global name="NOTIFICATION_DEFAULT_ROUTE"    type="array">
    <rule from_var="app_route"/>
</global>

In this example, three notification parameter defaults are defined:

Protocol-Specific Globals

When USSD notifications are used, an additional global (NOTIFICATION_WAIT_SECONDS, default 1) may be used to specify the number of seconds to wait for a network response to the notification.