Description

Promotions selection conditional expressions determine promotion applicability by analysing the set of Request Service Unit AVPs which are present in one or more MultipleServicesCreditControl AVPs.

Promotion Conditional Expressions

Promotion Selection Expressions are Boolean expressions using the follow operators (in descending precedence):

! (NOT), && (AND) and || (OR)

Parenthesis () may be used in the expressions.

Comparison operators: > < == != >= ⇐

Types: Boolean, String, Integer

Access to session state: variables are prefixed with sessionstate. or ss.

Constants: string (“string”); boolean (true|false|TRUE|FALSE); integer (1, -1)

XPath expressions

XPath expressions on Diameter messages are used to select an AVP from the message for use in the expressions (see XPath Language Component):

ss.LatestClientRequest/MultipleServicesCreditControl\[ServiceID = 1\]
ss.LatestClientRequest/MultipleServicesCreditControl\[ServiceID = 1\]/RequestedServiceUnit/CCInputOctets

Predicates and variables

Function Arguments Description

promotionIsCurrent

N/A

Uses the validity information in the promotion’s configuration in PromotionsTable

subscriberIsEligible

N/A

Uses the validity information in the subscriber’s promotion configuration

timeOfDayBetween

integer: start time, Integer: stop time (For example, timeOfDay(800, 1400) means inclusive hours between 0800 and 1400

Returns true if current time of day is between the start and stop time. If the start time is > stop time, then timeOfDay will check between start time — 2400 and 0000 — stop

todayOneOf

Any of “Mon”,“Tue”,“Wed”,“Thur”,“Fri”, “Sat”,“Sun” (for example, todayOneOf("Mon", "Fri"))

Returns true if current day of week is one of the listed days

sessionstate.<varname>, ss.<varname>

N/A

In predicate context, returns true if not null, an empty array, an empty collection, an empty string or a Boolean with value of true, otherwise false. In expression context (that is, as argument to function or comparator) returns the actual value.

Note Boolean sessionstate fields always evaluate to true in predicate context unless they are null. To test for false, compare the returned object to false using ==

chargingServiceIDOneOf

Comma-delimited list of serviceNames (see ServiceIDConfigTable Configuration)

returns true if the service name of the charging info is in the argument list

chargingUnitTypeOneOf

Comma-delimited list of any of CCServiceSpecificUnits, CCMoney, CCInputOctets, CCOutputOctets, CCTotalOctets, CCTime

returns true if the charging unit type of the charging info is in the argument list

Functions may be added by using the SDK to provide extensions.

Example

    subscriberIsEligible()
    && ss.ccr/Multiple-Service-Credit-Control[Service-Id = 1 and */CC-Input-Octets]
    && ss.isRoaming
    && (   timeOfDayBetween(800, 1000)
        || timeOfDayBetween(1800, 1900))
    && todayOneOf("Mon","Fri")
Previous page Next page
Sentinel Express Version 4.0.0