Selector Rules

Selector Rules

Selector Rules are used in various configuration contexts to define rules for selecting a value for a parameter based on a list of rules.

Rules are matched based on selectors to fields in the InitialDP (e.g. MSC address), derived from it (e.g. normalised calling party), or configured tags. Each rule must provide a value, either as a literal or copied from an InitialDP, derived, or tag field. All selectors in a rule must match in order for the rule to be selected. If no selectors are present (e.g. only a literal is configured), the rule will always match, acting as a catch-all.

Rules are traversed in order, and the first matching rule found will have its value extracted.

Note that, depending on the source network and the InitialDPeventTypeBCSM, some fields may not be available for selection. In such cases, rules using these fields for selection will be skipped.

An example configuration extract might be:

      <config>
        <diameter>
          <request>
              <service_identifiers>
                <rule eventTypeBCSM="3" serviceKey="1" bearerCap_itc="0" literal="201"/>
                <rule serviceKey="1" bearerCap_itc="0" literal="201"/>
                <rule serviceKey="1" literal="201"/>
                <rule serviceKey="2" literal="202"/>
                <rule bearerCap_itc="8" literal="301"/>
                <rule callingPartysCategory_hex="8" literal="401"/>
                <rule location="roaming" literal="402" />
                <rule literal="501"/>
              </service_identifiers>
              <rating_groups>
                <rule service_key="1" literal="2"/>
                <rule literal="2"/>
              </rating_groups>
              <requested_times>
                <rule literal="60"/>
              </requested_times>

The service_identifier rules here will attempt to assign a Diameter Service-Identifier based on the service key, bearer capability, calling party category, or derived location, with a fallback value if no deeper match occurs. The rating_group rules will check service key only, with a fallback value used otherwise. All InitialDP messages rececived will always use 60 as the Diameter Requested-Service-Unit.CC-Time value from the fallback rule.

Match Inversion

Some fields in selector rules may have their match be made inverted. To do this, add the character ! to the start of the match value.

If the string to be matched starts with an exclamation mark, add an additional !, i.e. !! for a normal match and !!! for an inverted match.

Some examples of using and not using inversion:

Refer to the specific field information for details of which fields can have their match inverted.

Configuration Details

Each rule object for IDP selection can support the following attributes:

Attribute Type Can Invert? Description
literal String No [Conditional] The literal value to return when the rule is selected. One of literal, idp, or from_tag must be present for each rule.
idp String No [Conditional] An available field name to return as the value when the rule is selected. One of literal, idp, or from_tag must be present for each rule.
from_tag String No [Conditional] A tag name to return the value of when the rule is selected. One of literal, idp, or from_tag must be present for each rule.
tag String No [Conditional] Selector for a tag name to match the value for. If tag is present, value must also be present.
tag_prefix String No [Conditional] Selector for a tag name to match the value prefix for. If tag_prefix is present, value must also be present.
tag_x String No [Conditional] As for tag, but with x representing a unique pairing, e.g. tag_1 or tag_a. A matching value_x must also be present.
tag_prefix_x String No [Conditional] As for tag_x, but for matching against the value prefix. A matching value_x must also be present.
value (various) Yes [Conditional] The string or integer value to match against during rule selection. Required when either tag or tag_prefix is present.
value_x (various) Yes [Conditional] As for value, but with x representing a unique pairing, e.g. value_1 or value_a. A matching tag_x or tag_prefix_x must also be present.
originating Boolean No Whether this rule applies for originating calls.
(Default: true)
forwarding Boolean No Whether this rule applies for forwarding calls.
(Default: true)
terminating Boolean No Whether this rule applies for terminating calls.
(Default: true)
at_initial Boolean No Whether this rule applies at the initial OCS interrogation, i.e. the Diameter CC-Request-Type is 1 (INITIAL_REQUEST).
(Default: true)
at_update Boolean No Whether this rule applies at interim OCS interrogations, i.e. the Diameter CC-Request-Type is 2 (UPDATE_REQUEST).
(Default: true)
at_terminate Boolean No Whether this rule applies at the final OCS interrogation, i.e. the Diameter CC-Request-Type is 3 (TERMINATE_REQUEST).
(Default: false)
(other available fields) (various) Yes Any number of available fields.

Available Fields

Initial DP Fields

The following fields sourced from the IDP are available as parameter names for action rule selectors and for value extraction when using the idp source type parameter.

Note that the idp is added by default if it is not already present for the key namespace.

Attribute Type Description
idp.normalised_calling_party String Alias for callingPartyNumber_digits_n.
idp.normalised_called_party String Alias for calledPartyNumber_digits_n or calledPartyBCDNumber_digits_n (whichever is populated) May be modified if special number translation or CUG action lookup has occurred.
idp.normalised_redirecting_party String Alias for redirectingPartyID_digits_n.
idp.normalised_logical_party String Alias for idp.normalised_calling_party, idp.normalised_called_party, or idp.normalised_redirecting_party for originating, terminating, or forwarding calls, respectively.
idp.normalised_other_party String Alias for idp.normalised_called_party or idp.normalised_calling_party for originating/forwarding or terminating calls, respectively.
idp.eventTypeBCSM Integer Selector for the InitialDPeventTypeBCSM decoded value.
idp.serviceKey Integer Selector for the InitialDPserviceKey decoded value.
idp.iMSI_length_min String The minimum length of the InitialDPiMSI decoded digits.
idp.iMSI_length_max String The maximum length of the InitialDPiMSI decoded digits.
idp.iMSI_digits String Selector for the InitialDPiMSI decoded digits.
idp.iMSI_prefix String Selector for the InitialDPiMSI decoded digits prefix.
idp.callingPartyNumber_length_min String The minimum length of the InitialDPcallingPartyNumber decoded digits.
idp.callingPartyNumber_length_max String The maximum length of the InitialDPcallingPartyNumber decoded digits.
idp.callingPartyNumber_digits String Selector for the InitialDPcallingPartyNumber decoded digits.
idp.callingPartyNumber_length_min_n String The minimum length of the normalised InitialDPcallingPartyNumber decoded digits.
idp.callingPartyNumber_length_max_n String The maximum length of the normalised InitialDPcallingPartyNumber decoded digits.
idp.callingPartyNumber_digits_n String Selector for the normalised InitialDPcallingPartyNumber decoded digits.
idp.callingPartyNumber_prefix String Selector for the InitialDPcallingPartyNumber decoded digits prefix.
idp.callingPartyNumber_prefix_n String Selector for the normalised InitialDPcallingPartyNumber decoded digits prefix.
idp.callingPartyNumber_noa Integer Selector for the InitialDPcallingPartyNumberNature of address indicator decoded value.
idp.callingPartyNumber_npi Integer Selector for the InitialDPcallingPartyNumberNumbering plan indicator decoded value.
idp.callingPartyNumber_pri Integer Selector for the InitialDPcallingPartyNumberAddress presentation restricted indicator decoded value.
idp.callingPartyNumber_si Integer Selector for the InitialDPcallingPartyNumberScreening indicator decoded value.
idp.callingPartyNumber_ni Integer Selector for the InitialDPcallingPartyNumberNumber incomplete indicator decoded value.
idp.callingPartysCategory_hex String Selector for the InitialDPcallingPartysCategory received value.
idp.calledPartyNumber_length_min String The minimum length of the InitialDPcalledPartyNumber decoded digits.
idp.calledPartyNumber_length_max String The maximum length of the InitialDPcalledPartyNumber decoded digits.
idp.calledPartyNumber_digits String Selector for the InitialDPcalledPartyNumber decoded digits.
idp.calledPartyNumber_length_min_n String The minimum length of the normalised InitialDPcalledPartyNumber decoded digits.
idp.calledPartyNumber_length_max_n String The maximum length of the normalised InitialDPcalledPartyNumber decoded digits.
idp.calledPartyNumber_digits_n String Selector for the normalised InitialDPcalledPartyNumber decoded digits.
idp.calledPartyNumber_prefix String Selector for the InitialDPcalledPartyNumber decoded digits prefix.
idp.calledPartyNumber_prefix_n String Selector for the normalised InitialDPcalledPartyNumber decoded digits prefix.
idp.calledPartyNumber_noa Integer Selector for the InitialDPcalledPartyNumberNature of address indicator decoded value.
idp.calledPartyNumber_npi Integer Selector for the InitialDPcalledPartyNumberNumbering plan indicator decoded value.
idp.calledPartyNumber_pri Integer Selector for the InitialDPcalledPartyNumberAddress presentation restricted indicator decoded value.
idp.calledPartyNumber_si Integer Selector for the InitialDPcalledPartyNumberScreening indicator decoded value.
idp.calledPartyNumber_inn Integer Selector for the InitialDPcalledPartyNumberInternal network number indicator decoded value.
idp.calledPartyBCDNumber_length_min String The minimum length of the InitialDPcalledPartyBCDNumber decoded digits.
idp.calledPartyBCDNumber_length_max String The maximum length of the InitialDPcalledPartyBCDNumber decoded digits.
idp.calledPartyBCDNumber_digits String Selector for the InitialDPcalledPartyBCDNumber decoded digits.
idp.calledPartyBCDNumber_length_min_n String The minimum length of the normalised InitialDPcalledPartyBCDNumber decoded digits.
idp.calledPartyBCDNumber_length_max_n String The maximum length of the normalised InitialDPcalledPartyBCDNumber decoded digits.
idp.calledPartyBCDNumber_digits_n String Selector for the normalised InitialDPcalledPartyBCDNumber decoded digits.
idp.calledPartyBCDNumber_prefix String Selector for the InitialDPcalledPartyBCDNumber decoded digits prefix.
idp.calledPartyBCDNumber_prefix_n String Selector for the normalised InitialDPcalledPartyBCDNumber decoded digits prefix.
idp.calledPartyBCDNumber_noa Integer Selector for the InitialDPcalledPartyBCDNumberNature of address indicator decoded value.
idp.calledPartyBCDNumber_npi Integer Selector for the InitialDPcalledPartyBCDNumberNumbering plan indicator decoded value.
idp.redirectionInformation_ind Integer Selector for the InitialDPredirectionInformationRedirecting indicator decoded value.
idp.redirectionInformation_orig Integer Selector for the InitialDPredirectionInformationOriginal redirecting reason decoded value.
idp.redirectionInformation_num Integer Selector for the InitialDPredirectionInformationRedirection counter decoded value.
idp.redirectionInformation_nat Integer Selector for the InitialDPredirectionInformationNational indicator decoded value.
idp.redirectionInformation_reason Integer Selector for the InitialDPredirectionInformationRedirecting reason decoded value.
idp.redirectingPartyID_length_min String The minimum length of the InitialDPredirectingPartyID decoded digits.
idp.redirectingPartyID_length_max String The maximum length of the InitialDPredirectingPartyID decoded digits.
idp.redirectingPartyID_digits String Selector for the InitialDPredirectingPartyID decoded digits.
idp.redirectingPartyID_length_min_n String The minimum length of the normalised InitialDPredirectingPartyID decoded digits.
idp.redirectingPartyID_length_max_n String The maximum length of the normalised InitialDPredirectingPartyID decoded digits.
idp.redirectingPartyID_digits_n String Selector for the normalised InitialDPredirectingPartyID decoded digits.
idp.redirectingPartyID_prefix String Selector for the InitialDPredirectingPartyID decoded digits prefix.
idp.redirectingPartyID_prefix_n String Selector for the normalised InitialDPcallingPartyNumber. InitialDPredirectingPartyID decoded digits prefix.
idp.redirectingPartyID_noa String Selector for the InitialDPredirectingPartyIDNature of address indicator decoded value.
idp.redirectingPartyID_npi String Selector for the InitialDPredirectingPartyIDNumbering plan indicator decoded value.
idp.redirectingPartyID_pri String Selector for the InitialDPredirectingPartyIDAddress presentation restricted indicator decoded value.
idp.originalCalledPartyID_length_min String The minimum length of the InitialDPoriginalCalledPartyID decoded digits.
idp.originalCalledPartyID_length_max String The maximum length of the InitialDPoriginalCalledPartyID decoded digits.
idp.originalCalledPartyID_digits String Selector for the InitialDPoriginalCalledPartyID decoded digits.
idp.originalCalledPartyID_prefix String Selector for the InitialDPoriginalCalledPartyID decoded digits prefix.
idp.originalCalledPartyID_noa Integer Selector for the InitialDPoriginalCalledPartyIDNature of address indicator decoded value.
idp.originalCalledPartyID_npi Integer Selector for the InitialDPoriginalCalledPartyIDPartyIDing plan indicator decoded value.
idp.originalCalledPartyID_pri Integer Selector for the InitialDPoriginalCalledPartyIDAddress presentation restricted indicator decoded value.
idp.additionalCallingPartyNumber_length_min String The minimum length of the InitialDPadditionalCallingPartyNumber decoded digits.
idp.additionalCallingPartyNumber_length_max String The maximum length of the InitialDPadditionalCallingPartyNumber decoded digits.
idp.additionalCallingPartyNumber_digits String Selector for the InitialDPadditionalCallingPartyNumber decoded digits.
idp.additionalCallingPartyNumber_prefix String Selector for the InitialDPadditionalCallingPartyNumber decoded digits prefix.
idp.additionalCallingPartyNumber_noa Integer Selector for the InitialDPadditionalCallingPartyNumberNature of address indicator decoded value.
idp.additionalCallingPartyNumber_npi Integer Selector for the InitialDPadditionalCallingPartyNumberNumbering plan indicator decoded value.
idp.additionalCallingPartyNumber_nqi Integer Selector for the InitialDPadditionalCallingPartyNumberNumber qualifier indicator decoded value.
idp.additionalCallingPartyNumber_pri Integer Selector for the InitialDPadditionalCallingPartyNumberAddress presentation restricted indicator decoded value.
idp.additionalCallingPartyNumber_si Integer Selector for the InitialDPadditionalCallingPartyNumberScreening indicator decoded value.
idp.additionalCallingPartyNumber_ni Integer Selector for the InitialDPadditionalCallingPartyNumberNumber incomplete indicator decoded value.
idp.location String Selector for derived location classification for the call.
idp.locationNumber_length_min String The minimum length of the InitialDPlocationNumber decoded digits.
idp.locationNumber_length_max String The maximum length of the InitialDPlocationNumber decoded digits.
idp.locationNumber_digits String Selector for the InitialDPlocationNumber decoded digits.
idp.locationNumber_prefix String Selector for the InitialDPlocationNumber decoded digits prefix.
idp.locationNumber_noa Integer Selector for the InitialDPlocationNumberNature of address indicator decoded value.
idp.locationNumber_npi Integer Selector for the InitialDPlocationNumberNumbering plan indicator decoded value.
idp.locationNumber_pri Integer Selector for the InitialDPlocationNumberAddress presentation restricted indicator decoded value.
idp.locationNumber_si Integer Selector for the InitialDPlocationNumberScreening indicator decoded value.
idp.locationNumber_inn Integer Selector for the InitialDPlocationNumberInternal network number indicator decoded value.
idp.mscAddress_length_min String The minimum length of the InitialDPmscAddress decoded digits.
idp.mscAddress_length_max String The maximum length of the InitialDPmscAddress decoded digits.
idp.mscAddress_digits String Selector for the InitialDPmscAddress decoded digits.
idp.mscAddress_prefix String Selector for the InitialDPmscAddress decoded digits prefix.
idp.mscAddress_noa Integer Selector for the InitialDPmscAddressNature of address indicator decoded value.
idp.mscAddress_npi Integer Selector for the InitialDPmscAddressNumbering plan indicator decoded value.
idp.vlrNumber_length_min String The minimum length of the InitialDPlocationInformationvlrNumber decoded digits.
idp.vlrNumber_length_max String The maximum length of the InitialDPlocationInformationvlrNumber decoded digits.
idp.vlrNumber_digits String Selector for the InitialDPlocationInformationvlrNumber decoded digits.
idp.vlrNumber_prefix String Selector for the InitialDPlocationInformationvlrNumber decoded digits prefix.
idp.vlrNumber_noa Integer Selector for the InitialDPlocationInformationvlrNumberNature of address indicator decoded value.
idp.vlrNumber_npi Integer Selector for the InitialDPlocationInformationvlrNumberNumbering plan indicator decoded value.
idp.ageOfLocationInformation Integer Selector for the InitialDPlocationInformationageOfLocationInformation decoded value.
idp.cellIdOrLAI_mcc String Selector for the InitialDPlocationInformationcellGlobalIdOrServiceAreaIdOrLAIcellGlobalIdOrServiceAreaIdFixedLengthMobile country code decoded value.
idp.cellIdOrLAI_mnc String Selector for the InitialDPlocationInformationcellGlobalIdOrServiceAreaIdOrLAIcellGlobalIdOrServiceAreaIdFixedLengthMobile network code decoded value.
idp.cellIdOrLAI_lac_hex String Selector for the InitialDPlocationInformationcellGlobalIdOrServiceAreaIdOrLAIcellGlobalIdOrServiceAreaIdFixedLengthLocation area code decoded value.
idp.cellIdOrLAI_ci_hex String Selector for the InitialDPlocationInformationcellGlobalIdOrServiceAreaIdOrLAIcellGlobalIdOrServiceAreaIdFixedLengthCell ID decoded value.
idp.ext-BearerService String Selector for the InitialDPext-basicServiceCodebearerService decoded value, in hex.
idp.ext-Teleservice String Selector for the InitialDPext-basicServiceCodeteleService decoded value, in hex.
idp.bearerCap_hex String Selector for the InitialDPbearerCapability decoded value.
idp.bearerCap_itc Integer Selector for the InitialDPbearerCapabilityInformation transfer capability value.
idp.cf_pending Integer Selector for the InitialDPgsm-ForwardingPending/callForwardingSS-Pending flag value.
idp.highLayerCompatibility_hex String Selector for the InitialDPhighLayerCompatibility decoded value.
idp.callReferenceNumber String Selector for the InitialDPcallReferenceNumber decoded value.
idp.timeAndTimezone_digits String Selector for the InitialDPtimeAndTimezone decoded value.
idp.timeAndTimezone_epoch Integer Selector for the InitialDPtimeAndTimezone decoded value as a Unix epoch value.
idp.timeAndTimezone_offset Integer Selector for the InitialDPtimeAndTimezone decoded value’s timezone offset value.
idp.ipSSPCapabilities Integer Selector for the InitialDPipSSPCapabilities decoded value.
idp.serviceInteractionIndicators_hex String Selector for the InitialDPserviceInteractionIndicators_hex decoded value.
idp.forwardCallIndicators_hex String Selector for the InitialDPforwardCallIndicators decoded value.
idp.idp_key String Selector for the INITIALDP.IDP_KEY EDR correlation field.

Dynamic Fields

The following fields are managed automatically by the system as a result of data received or actiosn performed.

Attribute Type Description
context.pending_tn String Selector for the current pending termination number that will be used to connect to if the call is allowed. At the start of the call, defaults to normalised_called_party but may be changed by number translation, etc.

CUG Fields

The following fields sourced from the most recent CUG query (if any) are available as parameter names for action rule selectors and for value extraction when using the idp source type parameter:

Attribute Type Description
cug.user_found Boolean 1 if a CUG user was found, otherwise 0.
cug.user_number String The user number found in the CUG lookup. Note that this may be different to the match number initially provided for the CUG query.
cug.group_id Integer The database ID of the CUG group for the CUG user.
cug.group_name String The name of the CUG user’s CUG group.
cug.user_id Integer The database ID of the CUG user.
cug.user_short_code String The short code of the CUG user.
cug.user_long_number String The long number of the CUG user.
cug.user_prefix_match Boolean 1 if the CUG user was matched by prefix, otherwise 0.
cug.user_range_size Integer The range size of the CUG user.
cug.user_orig_on_net_allowed Boolean 1 if the CUG user is allowed to make calls within the CUG group, otherwise 0.
cug.user_orig_off_net_allowed Boolean 1 if the CUG user is allowed to make calls outside the CUG group, otherwise 0.
cug.user_term_on_net_allowed Boolean 1 if the CUG user is allowed to receive calls from within the CUG group, otherwise 0.
cug.user_term_off_net_allowed Boolean 1 if the CUG user is allowed to receive calls from outside the CUG group, otherwise 0.
cug.match_found Boolean 1 if a CUG match was found, otherwise 0.
cug.match_id Integer The database ID of the CUG match user.
cug.match_short_code String The short code of the CUG match user.
cug.match_long_number String The long number of the CUG match user.
cug.match_is_ln Boolean 1 if the match was made against the long number of the CUG match user, otherwise 0.
cug.match_is_prefix Boolean 1 if the match was made by prefix, otherwise 0.
cug.match_range_size Integer The range size of the CUG match user.
cug.match_virtual Boolean 1 if the CUG match user is virtual, otherwise 0.
cug.match_display_caller_sc Boolean 1 if the caller shortcode was sent for presentation in the Connect messages, otherwise 0.
cug.list_found Boolean 1 if a match was made to a blacklist or a whitelist, otherwise 0.
cug.list_disallowed Boolean 1 if the applicable list disallowed the call, otherwise 0.
cug.list_entry_id Integer The database ID of the applicable list entry number.
cug.list_whitelist_match String The match number found in the list lookup. Note that this may be different to the match number initially provided for the CUG query.
cug.list_is_prefix Boolean 1 if the applicable list is a whitelist, otherwise 0.