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 the trigger criteria that you specify.

Topics in this document:

About Midsession-Rated Events

By default, ECE generates a rated event for a network session when a session ends. You can also configure ECE to 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.

Configuring ECE to Generate Midsession-Rated Events

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

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

      eventType

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

      triggerName

      The name of the trigger you are defining.

      qtyFields

      The 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

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

      qtyValue

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

      durationUnit

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

      durationValue

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

      timeOfDay

      The 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.

      offerChangeTrigger

      Whether to create midsession-rated events for charge offer changes. Can have values of true or false.

      Note: If this value is set to true, you must also enable the postRatingMidSessionExtension extension. For more information, see "Generating Midsession-Rated Events for Charge Offer Changes".

      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 for Charge Offer Changes

You can configure ECE to generate midsession-rated events whenever it starts rating a customer’s usage with a new charge offer. For example, assume a session that consists of the following:
  • Talk time reported: 30 minutes

  • First 12 minutes are rated using Charge Offer 1

  • Next 15 minutes are rated using Charge Offer 2

  • Last 3 minutes are rated using Charge Offer 3

For this session, ECE generates two midsession-rated events:
  • CDR 1 for the first 12 minutes

  • CDR 2 for the next 15 minutes

The remaining 3 minutes stay in the active session.

If the session is split into multiple CDRs, the start and end times of each CDR can be estimated.

To configure ECE to generate midsession-rated events for charge offer changes:
  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. To define a new trigger, follow the steps in "Configuring ECE to Generate Midsession-Rated Events".

  7. To update an existing trigger:
    1. Expand Operations.

    2. Click addOrUpdateMidSessionCdrTriggerDetails.

    3. In the offerChangeTrigger field, enter true.

  8. Under the ECE Configuration node, expand charging.extensions.

  9. Expand Attributes.

  10. Set the postRatingMidSessionExtension attribute to oracle.communication.brm.charging.sdk.extensions.Sample postRatingMidSessionExtension or to the name of your custom extension.

Note:

ECE does not generate midsession-rated events when:
  • Only one charge offer is applied to the rating result.

  • The postRatingMidSessionExtension extension hook class is not defined.

  • The charge offer has a rate plan with multiple tiers.

Table 13-2 describes how ECE behaves based on the settings of the postRatingMidSessionExtension attribute, the offerChangeTrigger attribute, and whether the rate plan has multiple tiers.

Table 13-2 Attribute and Rate Plan Settings

postRatingMidSessionExtension is defined offerChangeTrigger is enabled Rate plan is multi-tier Rated Event

True

True

False

A midsession-rated event is created for each charge offer, except for the last one.

True

True

True

No midsession-rated events are created for charge offer changes.

True

False

True or False

No midsession-rated events are created for charge offer changes.

False

True

True or False

No midsession-rated events are created for charge offer changes.

False

False

True or False

No midsession-rated events are created for charge offer changes.

Generating Midsession-Rated Events When the USU is 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 the Reason for a 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-3.

Table 13-3 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: