Variables Used to Define the Interim Accounting Interval for Services

Current Service Variables

Use the variables described in this section to define a formula for the interim accounting interval.




The maxUsageRate variable is calculated for a service by means of the following values for the variables in the corresponding usage formula:

If you use the parameters upStreamPackets (PA_IN_PACKETS) and downStreamPackets (PA_OUT_PACKETS) in the usage formula and at the same time maxUsageRate in the interim interval formula, the maxUsageRate is not accurate, because the values for maximum upStreamPackets and downStreamPackets are unknown.


For other events, the value is the usage formula divided by PA_SESSION_TIME. The usage formula is calculated from PA_IN_PACKETS, PA_OUT_PACKETS, PA_OUT_OCTETS, PA_IN_OCTETS, and PA_SESSION_TIME.


The value is calculated by using the result of the usage formula divided by the length of the service session since the previous usage report for the same service.

Other Service Variables

Use the variables described in this section to define an interim accounting formula that depends on usage of another service tracked by the SRC VTA.

System requirements to calculate service usage, in the form of the averageUsageRate and the sessionLength variables, can affect system performance. Using a longer interim interval means that there are fewer interim events to process, which requires fewer system resources.



Account Balance Variable

Use the variable described in this section to obtain balance information from each of the subscriber’s accounts.


Sample Formulas for Interim Accounting Interval

Table 53 provides examples of formulas to dynamically adjust the interim accounting interval for a service.

Table 53: Examples of Interim Accounting Interval



return 900

Accounting interval is fixed at 900 seconds (15 minutes).

return (<balance_Periodic> + <balance_Bought>) /<maxUsageRate>

Minimum time required for the subscriber to empty the periodic and bought accounts.

return <sessionLength> >= 60*15 ? (<balance_Periodic> + <balance_Bought>) /<averageUsageRate>/2 :
(<balance_Periodic> + <balance_Bought>) /<maxUsageRate>

Half the time required for the subscriber to empty the accounts at the current average rate, or the minimum time if the session is shorter than 15 minutes.

Because the average rate may not be representative early in the session, check when the account is half empty.

Related Documentation