External Actions

Prior to having their initial Diameter request constructed, calls may require external actions to occur in order to enrich the data available for or otherwise modify the processing that will occur.

External processing rules can therefore be defined that allow other N2SVCD applications and features to be called as part of the pre-session handling. Rules are applied in the order listed and any match made is processed accordingly before proceeding with the remainder of the rule checking (if applicable). All external action rules will be checked for each session, regardless of any matches made.

If a rule does not specify any matching criteria, it will always match. Depending on the action called, this may impact performance of the system.

External processing rules are defined in the EXTERNAL_ACTIONS LogicApp service global variable. Each of these rules must also refer to an external action type, defined in the EXTERNAL_ACTION_TYPES LogicApp service global variable.

An example external processing configuration might be:

<global name="EXTERNAL_ACTIONS" type="array">
    <rule var="vlr" value="" external="ati_msisdn" mandatory="1"/>
    <rule normalised_calling_party_prefix="642" external="cug"/>
</global>

<global name="EXTERNAL_ACTION_TYPES" type="array">
    <external name="cug" action="n2cug_lookup">
        <user_number from_var="logical"/>
        <match_number type="array">
            <rule originating="1" source="normalised_called_party"/>
            <rule source="normalised_calling_party"/>
        </match_number>
        <allow_match_sc type="array">
            <rule originating="1" literal="1"/>
            <rule literal="0"/>
        </allow_match_sc>
        <allow_sc_user type="array">
            <rule originating="1" literal="0"/>
            <rule literal="1"/>
        </allow_sc_user>
        <terminating type="array">
            <rule originating="1" literal="0"/>
            <rule literal="1"/>
        </terminating>
        <suppress_edr literal="0"/>
    </external>
    <external name="ati_msisdn" action="map_ati">
        <gsm_scf_digits literal="6412345"/>
        <hlr_gt_digits literal="642000001"/>
        <hlr_ssn literal="6"/>
        <hlr_timer_secs literal="1"/>
        <msisdn_source from_var="logical"/>
        <store_vlr literal="vlr"/>
    </external>
</global>

External Actions

In addition to both the standard rules engine and N2IWF selector rule extensions, each rule in the EXTERNAL ACTIONS global variable supports the following attributes:

Attribute Type Description
external String [Required] The external action type to invoke when this rule is matched.
mandatory Boolean Whether this external action must complete successfully for the session to continue. If false, the session will be allowed to continue regardless of the external processing outcome. If true, error handling rules will be used to determine the session handling.
(Default = false, continue on failure)

External action rules do not have any default rules. If no rules apply, no external actions will occur.

External Action Types

The available external action types that can be applied by external action rules are defined in the EXTERNAL_ACTION_TYPES global variable.

Each external action type must specify the following parameters:

Attribute Type Description
name String [Required] The name of the external action type, as referred to by external action rules.
action String [Required] The external action to apply. One of n2cug_lookup for performing an N2CUG lookup or map_ati/map_srism to send a MAP Message

MAP Messages

Specifying the external action types map_ati or map_srism causes a MAP Any Time Interrogation or Send Routing Information for Short Message operation, respectively, to be sent to an HLR in the network. Such messages will return information about the subscriber’s mobile details and current location. Both messages use MAP v3.

Using these external action requires N2SVCD MAP integration.

Parameters for MAP messages are listed below, as:

Note that each parameter listed (except required) is an N2SVCD rule engine ruleset and that the N2IWF selector rule extensions apply.

If a successful response is received, the subscriber’s applicable details will be populated into the specified variable(s).

Common MAP Parameters

Parameter Type Description
hlr_sigtran_route String The TCAP agent route to use when sending the MAP message. If not specified, the default route will be used.
hlr_timer_secs Integer The number of seconds to wait for a response from the HLR when sending MAP.
(Default = 3.0).
hlr_ri Integer The Routing Indicator for routing the MAP message to the HLR. Possible values are:
  • 0 - route on Global Title
  • 1 - route on Point Code and Subsystem Number
(Default = 0, route on Global Title).
hlr_gt_digits Hex String [Conditional] The destination SCCP Global Title for routing the MAP message to the HLR. Must be provided if hlr_ri is 0.
hlr_gt_noa Integer The destination SCCP Global Title Nature of Address for routing the MAP message to the HLR. Only applicable when hlr_ri is 0. Possible values are: <ul class="tablelist"> <li>0 - Unknown</li><li>1 - Subscriber Number</li><li>2 - Reserved (National)</li><li>3 - National Significant</li><li>4- International</li></ul>_(Default =4`, International)_.
hlr_gt_np Integer The destination SCCP Global Title Numbering Plan for routing the MAP message to the HLR. Only applicable when hlr_ri is 0. Possible values are:
  • 0 - Unknown
  • 1 - ISDN/telephony (E.163, E.164)
  • 2 - Generic
  • 3 - Data (X.121)
  • 4 - Telex (F.69)
  • 5 - Maritime (E.210, E.211)
  • 6 - Land mobile (E.212)
  • 7 - ISDN/mobile (E.214)
  • 14 - Private or network-specific
(Default = 1, ISDN/telephony).
hlr_pc Integer [Conditional] The destination SCCP Point Code for routing the MAP message to the HLR. Must be provided if hlr_ri is 1.
hlr_gt_tt Integer The destination SCCP Global Title Translation Type for routing the MAP message to the HLR. Only applicable when hlr_ri is 0. Refer to Q.713 for applicable values.
(Default = 0).
hlr_ssn Integer The destination SCCP SubSystem Number for routing the MAP message to the HLR. Only applicable when hlr_ri is 1. Refer to Q.713 for applicable values.
(Default = 7).
source_noa Integer The Nature of Address to set for the source MSISDN when sending requests to the HLR. Possible values are:
  • 0 - Unknown
  • 1 - International
  • 2 - National Significant
  • 3 - Network Specific
  • 4 - Subscriber
  • 5 - Reserved
  • 6 - Abbreviated
Note that this does not apply when IMSI is used as a source.
(Default = 1, International).
source_npi Integer The Number Plan Indicator to set for the source MSISDN when sending requests to the HLR. Possible values are:
  • 0 - Unknown
  • 1 - ISDN/telephony (E.163, E.164)
  • 2 - Generic
  • 3 - Data (X.121)
  • 4 - Telex (F.69)
  • 5 - Maritime (E.210, E.211)
  • 6 - Land mobile (E.212)
  • 7 - ISDN/mobile (E.214)
  • 14 - Private or network-specific
Note that this does not apply when IMSI is used as a source.
(Default = 1, ISDN/telephony).
optional Array of
>String
Which suffixes (e.g. vlr or sgsn) of the store_* fields are not required to be populated in order for the action to be considered successful. If empty or not specified, all fields are required to be populated in the response.
(Default: empty, all store locations are required to be populated)

MAP ATI Parameters

The following parameters are available when sending an ATI:

Parameter Type Description
gsm_scf_digits Hex String [Required] The GSM SCF ID digits of the N2IWF node (normally its SCCP Global Title).
gsm_scf_noa Integer The GSM SCF ID Nature of Address to use for the N2IWF for the gsm_scf_digits. Possible values are:
  • 0 - Unknown
  • 1 - International
  • 2 - National Significant
  • 3 - Network Specific
  • 4 - Subscriber
  • 5 - Reserved
  • 6 - Abbreviated
(Default = 1, International).
gsm_scf_npi Integer The GSM SCF ID Number Plan Indicator to use for the N2IWF for the gsm_scf_digits. Possible values are:
  • 0 - Unknown
  • 1 - ISDN/telephony (E.163, E.164)
  • 2 - Generic
  • 3 - Data (X.121)
  • 4 - Telex (F.69)
  • 5 - Maritime (E.210, E.211)
  • 6 - Land mobile (E.212)
  • 7 - ISDN/mobile (E.214)
  • 14 - Private or network-specific
  • (Default = 1, ISDN/telephony).
store_vlr String [Conditional] The variable to store the received VLR in. At least one of store_vlr, store_mcc, or store_mnc must be specified.
store_mcc String [Conditional] The variable to store the received MCC in. At least one of store_vlr, store_mcc, or store_mnc must be specified.
store_mnc String [Conditional] The variable to store the received MNC in. At least one of store_vlr, store_mcc, or store_mnc must be specified.
edr_vlr String The variable EDR tag to write the stored VLR value to. No EDR update will occur unless both an VLR is found and an EDR tag is defined.
edr_mcc String As for edr_vlr, but for the received MCC.
edr_mnc String As for edr_vlr, but for the received MNC.
msisdn_source String [Conditional] The selector rule field or variable to read the subscriber MSISDN to query from. One and only one of msisdn_source and imsi_source must be provided.
imsi_source String [Conditional] The selector rule field or variable to read the subscriber IMSI to query from. One and only one of msisdn_source and imsi_source must be provided.

MAP SRI-SM Parameters

The following parameters are available when sending an SRI-SM:

Parameter Type Description
sca_digits Hex String [Required] The Service Centre Address digits of the N2IWF node (normally its SCCP Global Title).
sca_noa Integer The Service Centre Address Nature of Address to use for the N2IWF for the sca_digits. Possible values and default are as for the MAP ATI parameter gsm_scf_noa.
sca_npi Integer The Service Centre Address Number Plan Indicator to use for the N2IWF for the sca_digits. Possible values and default are as for the MAP ATI parameter gsm_scf_npi.
store_imsi String [Conditional] The variable to store the received IMSI in. Note that this will also be stored as the subscriber’s IMSI if the lookup is successful. At least one of store_imsi, store_sgsn, or store_msc is required.
store_sgsn String [Conditional] The variable to store the received SGSN number in. At least one of store_imsi, store_sgsn, or store_msc is required.
store_msc String [Conditional] The variable to store the received MSC address in. At least one of store_imsi, store_sgsn, or store_msc is required.
edr_imsi String The variable EDR tag to write the stored IMSI value to. No EDR update will occur unless both an IMSI is found and an EDR tag is defined.
edr_sgsn String As for edr_imsi, but for the received SGSN number.
edr_msc String As for edr_imsi, but for the received MSC address.
priority Boolean The priority flag for the message.
(Default = true, message has priority).

N2CUG Lookup

Specifying the external processing action n2cug_lookup causes a lookup to be done using the N-Squared Closer User Groups library framework.

Using this external action requires N2SVCD N2CUG integration.

The following parameters are available when specifying an N2CUG lookup:

Parameter Type Description
user_number Hex String [Required] The user number to use in the CUG lookup.
match_number Hex String [Required] The match number to use in the CUG lookup.
allow_match_sc Boolean Whether to allow the match number to be applied against short codes.
(Default: true)
allow_sc_user Boolean Whether to allow the user number to be applied against short codes.
(Default: false)
terminating Boolean Whether the session is considered to be a terminating leg or not. Note that this is used solely for statistics purposes and does not affect the lookup.
(Default: false)
suppress_edr Boolean Whether to suppress N2CUG lookup EDRs.
(Default: false)

Note that each parameter is an N2SVCD rule engine ruleset and that the N2IWF selector rule extensions apply.

If a successful response is received, the lookup details will be populated into the field service.cug as per a normal N2CUG lookup.

Refer to the N2CUG lookup function documentation for further details.