Syntax
set the scope state variable variable-name to time-type time-variance random value within seconds seconds and save save-mode
Parameters
- scope
- The scope of the variable. Select one of the following:
- subscriber — Subscriber variable in the remote SPR as long as the subscriber exists in the SPR. The variable must be named User.State.variable.
- pool — Quota pool variable defined on the SPR as long as the pool exists in the SPR. The variable must be named User.Pool.State.variable.
- subscriber_local — Subscriber variable in the local MPE device as long as the subscriber has at least one session on the MPE device. The variable must be named User.LocalState.variable.
- session — Session variable that has a value as long as the session it is associated with is open. The variable must be named Session.State.variable.
- policy_evaluation — Policy evaluation variables that last for the duration of the policy evaluation cycle. The variable must be named Policy.Variable.variable.
Note: If you are using a policy table for this parameter, click Use Policy Table, choose the field (column) representing the parameter.
Click OK.
- variable-name
- String — Name of the variable.
Note: If you are using a policy table for this parameter, click Use Policy Table, choose the field (column) representing the parameter.
Click OK.
- time-type
- Supports time configured as:
- Specific Time — Specifies settings:
- Set date and time:
- A policy variable.
- now (default)—The local date and time.
- A date-time in the format: yyyy-mm-ddThh:mm:ss+UTCoffset.
Note: Enter the date-time directly into the field or click the calendar icon for assistance:
- Date — Select the date from the calendar interface.
- Time — Select hh:mm:ss.
- UTC Offset — Select number of hours before or after UTC time to start.
- now — Select for the local date-time.
- Time only — Select to use the time only.
- A JavaScript code snippet — Enter a JavaScript statement that evaluates to a date-time in the format: yyyy-mm-ddThh:mm:ss+UTCoffset. Click Evaluate as expression to bypass date-time format validation.
- Select Time Mode — The optional time zone. Select one of the following:
- N/A
- CONFIGURED LOCAL TIME — Calculate the time from the location configured for this MPE device
- SYSTEM LOCAL TIME — Calculate the time from the location of this MPE device
- USER LOCAL TIME (default) — Calculate the time from the location configured for the user equipment's location
- Relative Time — Specifies the number of hours, minutes, or seconds from the current time to the execution time. Select the time unit (Hours, Minutes, or Seconds) and enter a positive integer. For example, select Hours and enter 12 to set the execution time to 12 hours from now. You can instead enter a policy rule variable.
- Policy Counter ID — Select one or more policy counter IDs defined in the CMP database; or enter a comma-separated string of policy counter IDs.
- Day Of Week — Specifies one or more days of the week, plus a time during the day:
- Choose the day(s) of the week to check:
- Sunday
- Monday
- Tuesday
- Wednesday
- Thursday
- Friday
- Saturday
- Enter time: The execution time during the day, in the form hh:mm.
- Select Time Mode — The optional time zone. Select one of the following:
- N/A
- CONFIGURED LOCAL TIME — Calculate the time from the location configured for this MPE device
- SYSTEM LOCAL TIME — Calculate the time from the location of this MPE device
- USER LOCAL TIME (default) — Calculate the time from the location configured for the user equipment's location
- time-variance
- Supports a randomization interval:
- seconds
- A numeric value that specifies time in units of seconds.
- Valid range is 0-1000000000.
- save-mode
- One of the following:
- always (default)
- unless rejected
Description
Sets a state variable with specified scope and name to a time with a specified time variance. To avoid message storms, you can specify that a random time value be used, within specified limits, for rule activation and execution; a random value is used in the time window you specify in time-variance.
Example
The following example shows how you can define state variables and use them in policy actions which add conditional policy information, set re-validation time, and which install a PCC rule:
set the session state variable {Session.State.StartTimeRandVar} to 1Hour minus random value within 30 seconds and save always
set the session state variable {Session.State.EndTimeRandVar} to 2Hour minus random value within 30 seconds and save always
add Conditional Policy Information with Execution-Time to {Session.State.StartTimeRandVar} and parameters
Diameter APN-Aggregate-Max-Bitrate-DL 1000
revalidate the session at {Session.State.StartTimeRandVar} using CONFIGURED LOCAL TIME
install pccrule1 PCC rule(s) for session active between {Session.State.StartTimeRandVar} and {Session.State.EndTimeRandVar}