Look Ahead Window for Session Management Policies
You use a policy look ahead window to determine if any Gx policy changes occur after the current policy period. By default, policy look ahead is configured and set to 24 hours.
Typically, when the Policy and Charging Enforcement Function (PCEF) sends a Credit Control Request (CCR) to the Charging Server over Gx, the Charging Server evaluates the current relevant policies, and sends a reply to the PCEF with a re-validation time. In this scenario, the Charging Server does not report any policy changes expected after the re-validation time. When the PCEF sends a CCR to the Charging Server just before the re-validation time, the Charging Server reports no changes within the re-validation time, because the policy changes are to occur after the re-validation time. This may cause Gx message storms and dropped sessions. You use the look ahead window configured on the Charging Server to avoid these issues. By default, Rule-Activation-Time is always included in the message if look ahead is enabled.
The look ahead window allows the Charging Server to determine whether any policy changes are to occur within a configurable period following the re-validation time. The Charging Server evaluates the current policies and the next policy change to occur within the look ahead window, which it returns in its reply to the PCEF.
You configure the policy look ahead feature by optionally specifying a value for the look ahead window in this global create_config.info question. The default is 1440 minutes (one day). To disable the look ahead window, set this value to 0:
create_config.info question: Global:Session:Policy:Notify:How long (in minutes) is the policy evaluation look ahead time?
The create_config.info question below determines whether to always include Rule-Activation-Time AVPs in CCR and RAR messages. The Rule-Activation-Time AVP is always sent by default if look ahead is enabled. To disable sending the Rule-Activation-Time AVP if the rule activation time is in the past or immediately in the future, set this answer to n: Global:Session:Policy:Notify:Include the Rule-Activation-Time for a PCC rule to always be included in Gx messages (y/n)?
Compensate for the difference between your PCEF system time and MATRIXX Charging Server system time by setting the "Always Include Rule-Activation-Time" setting to n, and adjusting this create_config.info parameter for the time differences. The time range is 0 to 60 seconds: Global:Session:Policy:Notify:How long (in seconds) is the time range within which the Rule-Activation-Time for a PCC rule should not be included in Gx messages?
For details on the create_config.info questions, see the discussion about configuring global system parameters in MATRIXX Configuration.
Re-evaluation Trigger Time
After evaluating policies, the Charging Server sets a re-evaluation trigger time for policy sessions. When the re-evaluation trigger awakens the Charging Server, the Charging Server:
- Re-evaluates the policies it has calculated previously.
- Uses the look ahead window to find future policy changes.
If the Charging Server detects any current or future policy changes, the Charging Server sends an RAR over Gx to the PCEF or an SNR over Sy to the Policy and Charging Rules Function (PCRF).
Re-evaluation Time
The Charging Server sets the re-evaluation trigger time in the policy session. The re-evaluation trigger time awakens the Charging Server at the configured time to re-evaluate the policy. This is different from the RevalidationTime set in the Gx CCA and Gx RAR.
The Charging Server normally sets a re-validation time in its answer to the PCEF (CCA over Gx, RAR over Gx), where the Charging Server re-validates policies at the specified re-validation time. When using the look ahead window, however, the Charging Server does not set a re-validation time.
If a look ahead window is not used, the Charging Server sets a re-validation time in the Gx RAR or Gx CCA. The PCEF must send a Gx CCR to request that the Charging Server re-validate the policies.
Storing Policy Changes
When the Charging Server reports policy changes to PCEF or PCRF, this information is stored as policy profiles in the policy session. When using the look ahead window, the Charging Server stores pending changes as pending policy profiles in the policy session. When the Charging Server re-evaluates policies at the specified re-evaluation time, the Charging Server can compare the current policy profile to the pending policy profile as reported earlier. The Charging Server sends a RAR over Gx or a SNR over Sy if a subsequent policy change is expected within the next look ahead window.
For details on creating a Gx policy profile, see the discussion about Gx policies in My MATRIXX Help.
Gx Policies Time of Day Procedures
Use Rule-Activation-Time and Rule-Deactivation-Time in Charging-Rule-Install to report changes to Gx policies within the look ahead window. Activation Times of PCC Rules shows how the activation time affects PCC rules.
Activation/De-activation Time | Occurrence | PCEF... | If Time Has Passed, PCEF... |
---|---|---|---|
Rule-Activation-Time only, set in the future | Future | ...sets the PCC rule inactive until activation time. | ...sets the PCC rule active. |
Rule-Deactivation-Time only, set in the future | Future | ...sets the PCC rule active until de-activation time. | ...sets the PCC rule inactive. |
Rule-Activation-Time and Rule-Deactivation-Time are set | Activation before de-activation PCC rule provided before or at de-activation time |
...behaves as in scenario 1. | ...behaves as in scenario 2. |
Rule-Activation-Time and Rule-Deactivation-Time are set | De-activation before activation PCC rule provided before or at activation time |
...behaves as in scenario 2. | ...behaves as in scenario 1. |
Rule-Activation-Time and Rule-Deactivation-Time are set in the past | Past Activation occurs before de-activation |
...immediately sets the PCC rule inactive. | |
Rule-Activation-Time and Rule-Deactivation-Time are set in the past | Past De-activation occurs before activation |
...immediately sets the PCC rule active. |
Set both the activation and de-activation times for the PCC rule in a Gx message, such that the PCEF correctly interprets both times. If the de-activation time of a PCC rule is outside the look ahead window, set the de-activation time to the end of the look ahead window plus a small delay. The end time of the look ahead window changes whenever the Charging Server re-evaluates the policies. Even if a PCC rule is reported to the PCEF as previously active, and the PCC rule is active within the current look ahead window, set the de-activation time of the PCC rule to the end time of current look ahead window, then report these changes to the PCEF.
The ActivationTime and DeactivationTime fields in the MtxPccRule MATRIXX Data Container (MDC) are used to configure the activation and de-activation times, respectively, for a PCC rule.
Gx Policy Change Events and Notifications
The Charging Server generates events and notifications regarding the start of Gx policy sessions or Gx policy changes. When the Charging Server evaluates policy changes within the look ahead window, policy change events and notifications are generated only for policies relevant to current time, and not for future pending policies. When a pending policy is active, meaning that it becomes the current policy after the pending policy change time, a policy change event and notification is generated for that policy.
If there is no policy change, no notification is sent. If there is a policy change, a notification is sent to the client. If the look ahead window is enabled, the revalidation time is not set. The engine sets the revalidation time in the session, and the wake up revalidation time to check if there is a policy change.
Gx Policy Look Ahead Window Example: Time of Day
Time of Day Example Parameters lists the parameters for this example:
Parameter | Duration |
---|---|
Look Ahead Time | 8 hours |
Re-evaluation Delay | five minutes |
De-activation Delay | one hour |
Happy Hour 1 Rule 2 = High Speed |
18:00-22:00 |
Happy Hour 2 Rule 2 = High speed |
05:00-07:00 |
All other times Rule 1 = Normal Speed |
07:01-17:59 22:01-04:59 |
Current Time | 2018-08-01 12:00 |
- At 2018-08-01 12:00, the Charging Server receives a Gx CCR(i) with a look ahead window that is
effective until 2018-08-01 20:00 and a default deactivation time of 2018-08-01
20:00 + one-hour delay, which would be 2018-08-01 21:00.
- The current policy is ALL_TRAFFIC_NORMAL_SPEED. The default de-activation time is used.
- The look ahead window lasts until 20:00, when the ALL_TRAFFIC_HIGH_SPEED rule must be installed. Activation is at 2018-08-01 18:00. The default de-activation time is used.
- A Gx CCA(i) is sent back with a policy of rule 1 ALL_TRAFFIC_NORMAL_SPEED with an activate time of 2018-08-01 12:00, a de-activate time of 2018-08-01 21:00, and rule 2 ALL_TRAFFIC_HIGH_SPEED with an activate time of 2018-08-01 18:00 and a de-activate time of 2018-08-01 21:00.
- The re-evaluation trigger time in the policy session object is 2018-08-01 18:00 plus a five-minute delay, namely 2018-08-01 18:05.
- At 2018-08-01 18:05, the Charging Server re-evaluates the policies. The look ahead window is
effective until 2018-08-02 02:05, with a default deactivation time of 2018-08-02
02:05 plus a one-hour delay, being 2018-08-02 03:05.
- In the current policy, the de-activation time for rule 1 ALL_TRAFFIC_NORMAL_SPEED is extended to the new default de-activation time, and rule 2 ALL_TRAFFIC_HIGH_SPEED is already activated.
- The look ahead window is effective until 2018-08-02 02:05, so rule 2 ALL_TRAFFIC_HIGH_SPEED must be de-activated at 2018-08-01 22:00.
- A Gx RAR message is sent back with rule 1 ALL_TRAFFIC_NORMAL_SPEED (activate=2018-08-01 12:00, de-activate=2018-08-02 03:05), and rule 2 ALL_TRAFFIC_HIGH_SPEED (activate=2018-08-01 18:00, de-activate=2018-08-01 22:00).
- The re-evaluation trigger time in the policy session object is 2018-08-01 22:00 plus a five-minute delay, or 2018-08-01 22:05.
- At 2018-08-01 22:05, the Charging Server re-evaluates the policies. The look window is
effective until 2018-08-02 06:05, with a default de-activation time of
2018-08-02 06:05, plus a one-hour delay, being 2018-08-02 07:05.
- In the current policy, the de-activation time for rule 1 ALL_TRAFFIC_NORMAL_SPEED is extended to the new default de-activation time. Rule 2 ALL_TRAFFIC_HIGH_SPEED is already de-activated.
- The look ahead window is effective until 2018-08-02 06:05, and rule 2 ALL_TRAFFIC_HIGH_SPEED must be activated at 2018-08-02 05:00. The default de-activation time is used.
- A Gx RAR is sent back with, rule1 ALL_TRAFFIC_NORMAL_SPEED (activate=2018-08-01 12:00, de-activate=2018-08-02 07:05), and rule 2 ALL_TRAFFIC_HIGH_SPEED (activate=2018-08-02 05:00, de-activate=2018-08-02 07:05).
- The re-evaluation trigger time in the policy session object is 2018-08-02 05:05 plus a five-minute delay, or 2018-08-02 05:10.
Gx Policy Look Ahead Window Example: Balance Range
Balance Range Example Parameters lists the parameters for this example.
Item | Description |
---|---|
Look ahead time | 24 hours |
Re-evaluation Delay | five minutes |
De-activation Delay | one hour |
Rule 1 | no balance amount |
Rule 2 | has balance amount |
Has a recurring offer that recurs on the first day of each month at 00:00 with a recurring grant. |
- At 2018-08-30 12:00, the Charging Server receives a Gx CCR(i) message with a look ahead window that is effective until
2018-08-31 12:00. The default de-activation time is 2018-08-31 12:00 plus a 1
hour delay, or 2018-08-31 13:00.
- The current policy has a balance amount, with rule 1 requiring installation, using the default de-activation time.
- The look ahead window is effective until 2018-08-31 12:00, with no policy change.
- A Gx CCA message is sent back with, rule 1 activating at 2018-08-30 12:00, and de-activating at 2018-08-31 13:00.
- The re-evaluation trigger time in the policy session object is 2018-08-31 12:00, plus a five-minute delay, or 2018-08-31 12:05.
- At 2018-08-30 15:00, the Charging Server receives a Gy CCR message with usage. There is no balance range change, no Gx RAR, and no session object change.
- At 2018-08-30 16:00, the Charging Server receives a Gy CCR message with usage. The balance range is now set to "no
balance amount." The look ahead window is effective until 2018-08-31 16:00, with
a default de-activation time of 2018-08-31 16:00, plus a one-hour delay or
2018-08-31 17:00.
- The current policy requires rule 1 to be removed and rule 2 to be installed.
- The look ahead window is effective until 2018-08-31 16:00 with no policy change.
- A Gx RAR is sent indicating that rule 1 is to be removed and rule 2 is to be installed with an activation time of 2018-08-30 16:00 and a de-activation time of 2018-08-31 17:00.
- The re-evaluation trigger time in the policy session object is 2018-08-31 16:00 plus a five-minute delay or 2018-08-31 16:05.
- At 2018-08-31 16:05, the Charging Server re-evaluates the policies, with a look ahead window effective until
2018-09-01 16:05, and a default de-activation time of 2018-09-01 16:05, plus an
hour delay, or 2018-09-01 17:05.
- The current policy requires the de-activation time of rule 2 to be extended to the new default de-activation time.
- The look ahead window is effective until 2018-09-01 16:05. At 2018-09-01 00:00, the recurring grant changes the balance range from no balance to balance. Rule 1 is in effect at 2018-09-01 00:00. Rule 2 is removed at 2018-09-01 00:00.
- A Gx RAR is sent indicating that rule 2 is to be activated at 2018-08-30 16:00 and de-activated at 2018-09-01 00:00), while rule 1 is to be activated at 2018-09-01 00:00 and de-activated at 2018-09-01 17:05.
- The re-evaluation trigger time in the policy session object is 2018-09-01 00:00 plus a five-minute delay or 2018-09-01 00:05.
- At 2018-09-01 00:05, the Charging Server re-evaluates the policies. The look ahead window is effective until
2018-09-02 00:05 and the default de-activation time is 2018-09-02 00:05 plus a
one-hour delay or 2018-09-02 01:05.
- Per the current policy, rule 2 has been de-activated. Rule 1 has been activated if the de-activation time must be extended to the new default de-activation time.
- The look ahead window is effective until 2018-09-02 00:05 with no policy change.
- A Gx RAR is sent with rule 1 activated at 2018-09-01 00:00 and de-activated at 2018-09-02 01:05.
- The re-evaluation trigger time in the policy session object is 2018-09-02 00:05 plus a five-minute delay or 2018-09-02 00:10.