13 Managing Midsession-Rated Events

You can configure Oracle Communications Elastic Charging Engine (ECE) to generate a rated event during the middle of a network session based on trigger criteria that you specify.

Topics in this document:

Configuring ECE to Generate Midsession-Rated Events

By default, ECE generates a rated event for a network session when a session ends. You can configure ECE to also generate rated events when an update operation occurs during the session. Such events are called midsession-rated events.

To generate midsession-rated events, you enable the feature and then define conditions, called triggers, that initiate the generation of these events. Triggers are based on one or more of the following criteria:

  • Duration (for example, every 4 hours that a session is active)

  • Quantity (for example, whenever downloaded data totals 70 MB or more)

  • Time of day (for example, daily at 23:00:00 during the life of the session)

  • Custom criteria, such as network condition changes or spans from one offer to another due to balance exhaustion

    Note:

    To trigger a midsession-rated event based on custom criteria, you must extend ECE at the pre-rating or post-rating extension points. See "Pre-Rating Extension – Generating Midsession-Rated Event" and "Post-Rating Extension – Generating Midsession-Rated Events" for more information.

Each trigger is associated with a service-event pair. If an ongoing session meets the trigger conditions when an update operation occurs, a midsession-rated event for the specified service is generated.

Note:

ECE checks for trigger conditions only during update operations. For example, if a trigger condition is "every 200 MB" but an update operation does not occur until the total is 288 MB, the rated event is for 288 MB, not 200 MB.

To configure ECE to generate midsession-rated events:

  1. Access the ECE configuration MBeans in a JMX editor, such as JConsole. See "Accessing ECE Configuration MBeans".

  2. Expand the ECE Configuration node.

  3. Expand charging.midSessionCdrConfiguration.

  4. Expand Attributes.

  5. Set the MidSessionCdrEnabled attribute to true.

  6. Define trigger conditions for one or more service-event pairs:

    1. Expand Operations.

    2. Click addOrUpdateMidSessionCdrTriggerDetails.

    3. Specify values for the fields listed in Table 13-1.

      Table 13-1 Fields for Defining Midsession-Rated Event Triggers

      Field Description

      productType

      Name of the service for which you are creating the trigger (for example, "DATA").

      eventType

      Name of the event for which you are creating the trigger (for example, "DATA_USAGE").

      triggerName

      Name of the trigger you are defining.

      qtyFields

      Name of one or more event fields to which a quantity condition applies (for example, "input_volume; output_volume"). Use a semicolon ( ; ) to separate field names. Values in the fields are summed.

      qtyUnit

      Unit of measure for conditions based on quantity (for example, "MEGABYTES").

      qtyValue

      Total quantity of the unit that triggers event generation (for example, "70").

      durationUnit

      Unit of measure for conditions based on duration (for example, "HOURS").

      durationValue

      Amount of the unit that triggers event generation (for example, "70").

      timeOfDay

      A particular time of day in a 24-hour clock at which to generate the event (for example, "23:00:00", which indicates 11 p.m.). Use the hh:mm:ss format.

      midSessionForNonCounterGrants

      Whether to generate an event based on the consumed unit.

      A trigger with one TriggerConfiguration block is created for the specified service-event pair. All conditions in the block (quantity, duration, time of day) must be met to generate a midsession-rated event.

    4. (Optional) Do one of the following:

      • To define another trigger, click the plus sign in the panel's upper right corner, and repeat step 4 for a different service-event pair.

      • To add a TriggerConfiguration block to the current trigger, click the plus sign in the panel's upper right corner, and repeat step 4 for the same service-event pair.

Note:

  • All conditions in a TriggerConfiguration block must be met (criteria are assumed to be joined by AND).

  • If a trigger contains multiple TriggerConfiguration blocks, the conditions in only one block must be met (blocks are assumed to be joined by OR).

Generating Midsession-Rated Events When USU Block Missing

When the network sends a Final Unit Indicator (FUI) followed by a top up, ECE generates a reauthorization request (RAR). The network then sends an update request, sometimes not including the Used Service Units (USU) block for the ongoing session. When this occurs, ECE generates a midsession-rated event. This ensures that any part of the reservation consumed by the account is reported, preventing revenue loss.

Customizing the Worst-Case Charging Reservation

When resources are requested around tariff-time changes, ECE performs reverse rating to calculate the usage the subscriber can afford and reserves the balance for the requested service units based on the worst-case charging condition.

You can customize how ECE performs the worst-case charging reservation by using the ECE SDK. To do so, extend ECE at the post-rating or post-charging extension point to do the following in ExtensionRatingPeriod:

  • Invoke the isAdjustedForWorstCost method, which determines whether worst-case charging was applied when calculating the reservation amount. The method returns a Boolean value.

  • Add customizations to perform if isAdjustedForWorstCose is true.

For example:

Collection<ExtensionRatingPeriod> ratingPeriodCollection = 
extensionContext.getRatingPeriods();
        
for (ExtensionRatingPeriod ratingPeriod : ratingPeriodCollection) {
        if(ratingPeriod.isAdjustedForWorstCost()){
                //your customizations
        }
}

Viewing Reason for Midsession-Rated Event

When ECE generates a midsession-rated event, it automatically records why the event was split in the event's midSessionCDRSplitReason field. ECE sets the field to one of the preconfigured reason codes in Table 13-2.

Table 13-2 Reasons for Creating Midsession-Rated Event

Reason Code Description Enum Value

CONFIGURED_VOLUME_REACHED

The event exceeded a configured volume, such as 100 MB.

1

CONFIGURED_DURATION_REACHED

The event exceeded a configured amount of time, such as 2 hours.

2

RATING_CONDITION_CHANGE

The trigger was caused by a change in tariffs.

3

CONFIGURED_TIME_OF_THE_DAY_CROSSED

The event crossed a configured time of day, such as midnight.

4

INTERNAL_TRIGGER

The trigger was caused by a context change.

5

EXTERNAL_TRIGGER

The midsession trigger condition was met.

6

MULTIPLE_USU

The event contained multiple Used Service Units (USUs).

ECE generates a midsession-rated event for each USU.

7

MULTIPLE_USU_AND_EXTERNAL_TRIGGER_OR_INTERNAL_TRIGGER

The event was caused by any of the above triggers.

8

PRE_MIDSESSION_CONDITION

The event reached a custom trigger at the prerating extension point.

9

POST_MIDSESSION_CONDITION

The event reached a custom trigger at the post-rating extension point.

10

ZONE_CHANGE

The trigger was caused by a change in zone.

11

BALANCE_EXHAUST

The event was triggered after the complete exhaustion of an existing balance.

12

The following shows a sample snippet of a midsession-rated event with the reasonForMidSessionCDRSplit field set:

balanceOutputMap = {BALANCE=BalanceOutputImpl{ customerId=39384585, balanceId='BALANCE', status='SUCCESS', firstUsageValidityMap{},
impacts{840=[OutImpactImpl{ balanceItemId=1, impact=UnitValue{quantity=60.00, unit=Money{curr=USD}}, validityRule=null, 
firstUsageCreatedTime=null, type=0}]}, grantValidityMap={840={1=[Pair{first=null},{second=null}]}}, recurringImpactMap=null,
firstUsageValidityRuleMap={}, firstUsageCreatedTimeMap={}, currentAndLoanAmounts={840=[Pair{first=60.00}, {second=0}]}}}}'}}
{reasonForMidSessionCDRSplit=[CONFIGURED_DURATION_REACHED]}]

You can also extend ECE to add these preconfigured reason codes to midsession-rated events generated by custom criteria. To do so, you extend ECE at the pre-rating and post-rating midsession extension points.

For more information, see these ECE SDK sample programs: