25 About Performing AAA for Prepaid GPRS Services

This chapter provides an overview of Oracle Communications Billing and Revenue Management (BRM) GPRS AAA Manager and describes how to implement AAA functionality in your BRM system.

Before you read this document, you should be familiar with BRM concepts and architecture. See BRM Concepts.

About Processing AAA Requests for GPRS Services

GPRS AAA Manager allows you to perform authentication, authorization, and accounting (AAA) for prepaid GPRS services. For example, when a prepaid customer accesses a GPRS service, you can use GPRS AAA Manager to perform the following:

  • Verify the customer's identity by using the MSID.

  • Determine whether the customer's account balance has enough resources to cover the cost of usage.

  • Reserve a portion of the customer's resources for the GPRS session.

  • Record usage information about the GPRS session while it is in progress.

  • When the session ends, rate any usage and update the customer's account balance.

For more information about how BRM performs prepaid AAA, see "Understanding Prepaid AAA".

About GPRS AAA Manager

GPRS AAA Manager is an API that consists of opcodes, storable classes, and utilities that allow you to quickly implement AAA support for GPRS services.

About the GPRS AAA Manager Opcodes

GPRS AAA Manager includes two types of opcodes:

  • Services Framework AAA standard opcodes. Services Framework AAA standard opcodes pass AAA requests to the BRM PCM API. These opcodes are abstract opcodes for processing AAA requests for any prepaid service type. Because the Services Framework AAA opcodes are abstract, they cannot perform GPRS-specific operations by themselves. They call helper opcodes to do this. See "About Performing AAA for Prepaid Services".

  • GPRS AAA helper opcodes. The GPRS AAA helper opcodes perform GPRS-specific operations, such as building search templates for GPRS session objects or preparing GPRS-specific flists, for the Services Framework AAA standard opcodes. See "Preparing GPRS-Specific Data by Using Helper Opcodes".

A Services Framework AAA opcode can call a GPRS AAA helper opcode at any of these processing stages in the opcode's execution: SEARCH_SESSION, PREP_INPUT, VALIDATE_LIFECYCLE, and ACC_ON_OFF_SEARCH. The Services Framework AAA opcode determines which helper opcode to call at each processing stage by reading the /config/opcodemap/tcf object.

For example, at the PREP_INPUT processing stage, the Services Framework AAA opcode calls the GPRS AAA helper opcode specified in the /config/opcodemap/tcf object. The GPRS AAA helper opcode aggregates the GPRS data and then returns a GPRS-specific flist to the Services Framework AAA opcode. The Services Framework AAA opcode passes the flist to the PCM API, which processes the request and then returns that the request either passed or failed.

For more information, see "Services Framework AAA Manager Process Overview".

By default, the Services Framework AAA opcodes call GPRS AAA helper opcodes when processing /service/telco/gprs services only. You can add support for additional service types or change which helper opcodes are called by using the "load_aaa_config_opcodemap_tcf" utility. See "Configuring Services Framework to Call Helper Opcodes".

About the GPRS AAA Manager Storable Classes

By default, BRM stores information about prepaid GPRS sessions in these storable classes:

  • /active_session/telco/gprs: Stores information about a GPRS session while it is in progress. This object can be subclassed for specific GPRS services.

  • /active_session/telco/gprs/master: Stores information about a GPRS master session that is in progress.

  • /active_session/telco/gprs/master/subsession: Stores information about a GPRS subsession that is in progress.

  • /event/session/telco/gprs: Stores information about a GPRS session that has been rated and closed. This object can be subclassed for specific GPRS services.

  • /event/session/telco/gprs/master: Stores information about a GPRS master session that has been rated and closed.

    Note:

    By default, BRM stores information about master sessions in /active_session/telco/gprs objects. However, to differentiate master and subsession types, you can configure BRM to store master sessions in /active_session/telco/gprs/master objects.
  • /event/session/telco/gprs/subsession: Stores information about a GPRS subsession that has been rated and closed.

  • /reservation/active: Stores information about a single reservation for one balance group.

  • /reservation_list: Tracks the total resources a balance group has reserved in /reservation/active objects.

  • /reservation: For policy-driven charging sessions, this object holds the consumed reservation amount for those resources.

  • /config/reserve/gprs: Stores the default authorization and reauthorization values for GPRS services. This object can be subclassed for specific GPRS services.

  • /config/aaa/gprs: Stores default preferences for processing prepaid GPRS sessions.

About the GPRS AAA Manager Utilities

GPRS AAA Manager utilities specify default preferences for processing GPRS services, including the following:

  • How to store and rate GPRS accounting subsessions. See "About Tracking Data in Master Sessions and Subsessions".

  • Whether to keep or delete /active_session and /reservation/active objects when a prepaid GPRS session ends.

  • Whether to check for duplicate /active_session or /event/session objects.

  • Default authorization and reauthorization values for GPRS services.

  • The expiration time interval for /active_session objects stored in memory.

See "Specifying Default AAA Preferences for GPRS Services".

Setting Up Your System to Perform AAA for Prepaid GPRS Services

To set up your system to process AAA requests for prepaid GPRS services, perform the following tasks:

  1. Specify your default preferences for prepaid GPRS services. See "Specifying Default AAA Preferences for GPRS Services".

  2. Configure your client application to send GPRS AAA requests to the GPRS AAA Manager opcodes. See "Sending AAA Requests to GPRS AAA Manager".

  3. (Optional) Customize the GPRS data used by the helper opcodes. See "Preparing GPRS-Specific Data by Using Helper Opcodes".

  4. (Optional) Modify which helper opcodes are called by the Services Framework AAA opcodes or the service types that are supported. See "Configuring Services Framework to Call Helper Opcodes".

    Important:

    By default, the Services Framework AAA opcodes call GPRS AAA helper opcodes when processing /service/telco/gprs events only. To call the helper opcodes when processing additional GPRS service types, you must configure Services Framework to do so.
  5. (Optional) Configure BRM to reserve a portion of a customer's resources for a prepaid GPRS session by installing and configuring Resource Reservation Manager. See "Reserving Resources for Concurrent Network Sessions" in BRM Configuring and Collecting Payments.

Specifying Default AAA Preferences for GPRS Services

You specify how BRM processes AAA requests for GPRS services by using the Services Framework AAA Manager utilities and configuration files:

Sending AAA Requests to GPRS AAA Manager

To perform AAA for prepaid GPRS services, your system must be designed to collect the information needed from the customer and pass the appropriate fields in the input flist to the Services Framework AAA opcodes.

You can use the Services Framework AAA opcodes to perform the following:

Authorizing GPRS Services

To authorize prepaid customers to use GPRS services, call the PCM_OP_TCF_AAA_AUTHORIZE opcode with the following information in the input flist:

  • GPRS service type

  • MSID

  • Name of the calling program

  • GGSN address

  • SGSN address

  • APN name

  • Starting time

You can specify what to rate by passing the optional PIN_FLD_REQ_MODE input flist field set to one of the following:

  • 1 specifies that the events were prerated.

  • 2 specifies to rate the duration. This is the default.

  • 4 specifies to rate the volume.

  • 6 specifies to rate the duration and volume.

  • 8 specifies to rate the occurrence. This applies to activity events only.

For more information, see "How BRM Authorizes Users to Access Prepaid Services".

By default, this opcode calls the following GPRS AAA helper opcodes in Table 25-1 when processing /service/telco/gprs events:

Table 25-1 GPRS AAA Helper Codes

Processing Stage Helper Opcode Called

SEARCH_SESSION

PCM_OP_GPRS_AAA_POL_SEARCH_SESSION

PREP_INPUT

PCM_OP_GPRS_AAA_POL_AUTHORIZE_PREP_INPUT


Note:

To configure PCM_OP_TCF_AAA_AUTHORIZE to call these helper opcodes when processing additional service types or to change which helper opcodes are called, see "Configuring Services Framework to Call Helper Opcodes".

Reauthorizing GPRS Sessions

To reauthorize a customer to continue a GPRS session, call the PCM_OP_TCF_AAA_REAUTHORIZE opcode with the following information in the input flist:

  • GPRS service type

  • MSID

  • Authorization ID or, if one is not provided, the GGSN address, SGSN address, APN name, and starting time

  • Name of the calling program

  • Requested reauthorization amount or quantity

You can specify what to rate by passing the optional PIN_FLD_REQ_MODE input flist field set to one of the following:

  • 1 specifies that the events were prerated.

  • 2 specifies to rate the duration. This is the default.

  • 4 specifies to rate the volume.

  • 6 specifies to rate the duration and volume.

  • 8 specifies to rate the occurrence. This applies to activity events only.

You can also specify whether the reauthorization amount or quantity has been aggregated or is incremental by passing the optional PIN_FLD_AGGREGATE_MODE input flist field set to one of the following:

  • 4 specifies that the reauthorization amount or quantity passed in the input flist is aggregated (that is, it represents the original authorization amount plus a requested extension amount). BRM reauthorizes by using the amount or quantity passed in the input flist.

  • 8 specifies that the amount or quantity passed in the input flist is incremental (that is, it represents the requested extension amount or quantity only). This is the default.

    Note:

    If you specify incremental mode (8), you can also specify how to calculate the reauthorization amount or quantity by setting the PIN_FLD_RATING_MODE input flist field to the following:
    • 0: Calculates the reauthorization amount or quantity by adding the value from the /reservation/active object to the value passed in the input flist. This is the default.

    • 1: Calculates the reauthorization amount or quantity by adding the value from the /active_session object to the value passed in the input flist.

For more information about this opcode, see "How BRM Reauthorizes Prepaid Services".

By default, PCM_OP_TCF_AAA_REAUTHORIZE calls the following helper opcodes in Table 25-2 when processing /service/telco/gprs events:

Table 25-2 AAA Reauthorize Helper Opcodes

Processing Stage Helper Opcode Called

SEARCH_SESSION

PCM_OP_GPRS_AAA_POL_SEARCH_SESSION

PREP_INPUT

PCM_OP_GPRS_AAA_POL_REAUTHORIZE_PREP_INPUT


Note:

To configure PCM_OP_TCF_AAA_REAUTHORIZE to call these helper opcodes when processing additional service types or to change which helper opcodes are called, see "Configuring Services Framework to Call Helper Opcodes".

Updating and Reauthorizing GPRS Sessions

To update customer usage data and reauthorize a prepaid GPRS session, call the PCM_OP_TCF_AAA_UPDATE_AND_REAUTHORIZE opcode with the following information in the input flist:

  • GPRS service type

  • MSID

  • Authorization ID or, if one is not provided, the GGSN address, SGSN address, APN name, and starting time

  • Name of the calling program

  • Consumed quantity or amount

  • Requested reauthorization quantity or amount

You can specify what to rate by passing the optional PIN_FLD_REQ_MODE input flist field set to one of the following:

  • 1 specifies that the events were prerated.

  • 2 specifies to rate the duration. This is the default.

  • 4 specifies to rate the volume.

  • 6 specifies to rate the duration and volume.

  • 8 specifies to rate the occurrence. This applies to activity events only.

You can also specify whether the reauthorization amount or quantity has been aggregated or is incremental by passing the optional PIN_FLD_AGGREGATE_MODE input flist field set to one of the following:

  • 1 specifies that the update amount or quantity passed in the input flist is aggregated (that is, it represents the total amount or quantity used during the session).

  • 2 specifies that the update amount or quantity passed in the input flist is incremental (that is, it represents the amount or quantity used since BRM last updated the /active_session object). BRM calculates the total usage amount or quantity by adding the value passed in the input flist to the value in the /active_session object. This is the default update mode.

  • 4 specifies that the reauthorization amount or quantity passed in the input flist is aggregated (that is, it represents the original authorization amount plus a requested extension amount). BRM reauthorizes by using the amount or quantity passed in the input flist.

  • 8 specifies that the reauthorization amount or quantity passed in the input flist is incremental (that is, it represents the requested extension amount or quantity only). This is the default reauthorization mode.

    Note:

    If you specify incremental mode (8), you can also specify how to calculate the reauthorization amount or quantity by setting the PIN_FLD_RATING_MODE input flist field to the following:
    • 0: Calculates the reauthorization amount or quantity by adding the value from the /reservation/active object to the value passed in the input flist. This is the default.

    • 1: Calculates the reauthorization amount or quantity by adding the value from the /active_session object to the value passed in the input flist.

For more information about this opcode, see "How BRM Updates and Reauthorizes Prepaid Sessions".

By default, PCM_OP_TCF_AAA_UPDATE_AND_REAUTHORIZE calls the following helper opcodes in Table 25-3 when processing /service/telco/gprs events:

Table 25-3 AAA Update and Reauthorize Helper Opcodes

Processing Stage Helper Opcode Called

SEARCH_SESSION

PCM_OP_GPRS_AAA_POL_SEARCH_SESSION

PREP_INPUT

PCM_OP_GPRS_AAA_POL_UPDATE_ACCOUNTING_PREP_INPUT and then PCM_OP_GPRS_AAA_POL_REAUTHORIZE_PREP_INPUT


Note:

To configure PCM_OP_TCF_AAA_UPDATE_AND_REAUTHORIZE to call these helper opcodes when processing additional service types or to change which helper opcodes are called, see "Configuring Services Framework to Call Helper Opcodes".

Canceling Authorization for GPRS Services

To cancel an existing authorization and return reserved resources back to the customer's account balance, call the PCM_OP_TCF_AAA_CANCEL_AUTHORIZATION opcode with the following information in the input flist:

  • GPRS service type

  • MSID

  • Name of the calling program

  • Authorization ID or, if one is not provided, the GGSN address, SGSN address, APN name, and starting time

For more information about this opcode, see "How BRM Cancels Prepaid Service Authorizations".

By default, PCM_OP_TCF_AAA_CANCEL_AUTHORIZATION calls the following helper opcode in Table 25-4 when processing /service/telco/gprs events:

Table 25-4 AAA Cancel Authorization Helper Opcode

Processing Stage Helper Opcode Called

SEARCH_SESSION

PCM_OP_GPRS_AAA_POL_SEARCH_SESSION


Note:

To configure PCM_OP_TCF_AAA_CANCEL_AUTHORIZATION to call these helper opcodes when processing additional service types or to change which helper opcodes are called, see "Configuring Services Framework to Call Helper Opcodes".

Rating and Recording Activity Events

To rate and record activity events or other events that occur at a single point in time, such as sending an SMS message or changing a password, call the PCM_OP_TCF_AAA_ACCOUNTING opcode with the following information in the input flist:

  • GPRS service type

  • MSID

  • Name of the calling program

  • Authorization ID or, if one is not provided, the GGSN address, SGSN address, APN name, and starting time

For more information, see "How BRM Rates and Records Prepaid Activity Events".

By default, PCM_OP_TCF_AAA_ACCOUNTING calls the following helper opcodes in Table 25-5 when processing /service/telco/gprs events:

Table 25-5 AAA Accounting Helper Opcodes

Processing Stage Helper Opcode Called

SEARCH_SESSION

PCM_OP_GPRS_AAA_POL_SEARCH_SESSION

PREP_INPUT

PCM_OP_GPRS_AAA_POL_STOP_ACCOUNTING_PREP_INPUT


Note:

To configure PCM_OP_TCF_AAA_ACCOUNTING to call these helper opcodes when processing additional service types or to change which helper opcodes are called, see "Configuring Services Framework to Call Helper Opcodes".

Managing Prepaid GPRS Sessions

After a customer is authorized to access a GPRS service, the external network connects the service and begins collecting information about the customer's usage, such as the starting time. The network sends this information to BRM, which records the information in /active_session objects.

When the session ends, BRM rates any usage, closes or deletes the associated /active_session object, and records the data in an /event/session object in the BRM database.

You use the AAA ACCOUNTING standard opcodes to perform the following tasks:

  • Start a prepaid GPRS session.

  • Update information about a prepaid GPRS session that is currently in progress.

  • End a prepaid GPRS session.

  • Close any open GPRS sessions when the external network shuts down abnormally or restarts.

Starting Prepaid GPRS Sessions

To start a prepaid GPRS session, call the PCM_OP_TCF_AAA_START_ACCOUNTING opcode with the following information in the input flist:

  • GPRS service type

  • MSID

  • Authorization ID or, if one is not provided, the GGSN address, SGSN address, APN name, and starting time

  • Session start time

  • Name of the calling program

For more information about this opcode, see "How BRM Starts Prepaid Sessions".

By default, PCM_OP_TCF_AAA_START_ACCOUNTING calls the following helper opcode in Table 25-6 when processing /service/telco/gprs events:

Table 25-6 AAA Start Accounting Helper Opcode

Processing Stage Helper Opcode Called

SEARCH_SESSION

PCM_OP_GPRS_AAA_POL_SEARCH_SESSION


Note:

To configure PCM_OP_TCF_AAA_START_ACCOUNTING to call these helper opcodes when processing additional service types or to change which helper opcodes are called, see "Configuring Services Framework to Call Helper Opcodes".

Updating a Prepaid GPRS Session

To update information about an existing prepaid GPRS session, call the PCM_OP_TCF_AAA_UPDATE_ACCOUNTING opcode with the following information in the input flist:

  • GPRS service type

  • MSID

  • Name of the calling program

  • Authorization ID or, if one is not provided, the GGSN address, SGSN address, APN name, and starting time

  • Session end time

  • Details that changed

You can specify whether the usage amount or quantity has been aggregated or is incremental by passing the optional PIN_FLD_AGGREGATE_MODE input flist field:

  • 1 specifies that the update amount or quantity passed in the input flist is aggregated (that is, it represents the total amount or quantity used during the session). BRM applies the usage amount or quantity from the input flist.

  • 2 specifies that the update amount or quantity passed in the input flist is incremental (that is, it represents the amount or quantity used since BRM last updated the /active_session object). BRM calculates the total usage amount or quantity by adding the value passed in the input flist to the value in the /active_session object.

For more information about this opcode, see "How BRM Updates Prepaid Sessions".

By default, PCM_OP_TCF_AAA_UPDATE_ACCOUNTING calls the following helper opcode in Table 25-7 when processing /service/telco/gprs events:

Table 25-7 AAA Update Accounting Helper Opcode

Processing Stage Helper Opcode Called

SEARCH_SESSION

PCM_OP_GPRS_AAA_POL_SEARCH_SESSION

PREP_INPUT

PCM_OP_GPRS_AAA_POL_UPDATE_ACCOUNTING_PREP_INPUT


Note:

To configure PCM_OP_TCF_AAA_UPDATE_ACCOUNTING to call these helper opcodes when processing additional service types or to change which helper opcodes are called, see "Configuring Services Framework to Call Helper Opcodes".

Ending Prepaid GPRS Sessions

To end a prepaid GPRS session when it completes successfully, call the PCM_OP_TCF_AAA_STOP_ACCOUNTING opcode with the following information in the input flist:

  • GPRS service type

  • MSID

  • Name of the calling program

  • The amount or quantity consumed during the session

You use this opcode to perform the following operations:

  • Close, cancel, or delete the /active_session object.

  • Release or delete any associated reservation objects.

  • Rate any usage.

  • Record information about the GPRS session in an /event/session object in the BRM database.

You can specify whether the amount or quantity consumed has been aggregated or is incremental by passing the optional PIN_FLD_AGGREGATE_MODE input flist field set to one of the following:

  • 1 specifies that the amount or quantity passed in the input flist is aggregated (that is, it represents the total amount or quantity used during the session).

  • 2 specifies that the amount or quantity passed in the input flist is incremental (that is, it represents the amount or quantity used since BRM last updated the /active_session object). BRM calculates the total usage amount or quantity by adding the value passed in the input flist to the /active_session object's previous usage amount or quantity.

For more information about this opcode, see "How BRM Ends Prepaid Sessions".

By default, PCM_OP_TCF_AAA_STOP_ACCOUNTING calls the following helper opcodes in Table 25-8 when processing /service/telco/gprs events:

Table 25-8 AAA Stop Accounting Helper Opcodes

Processing Stage Helper Opcode Called

SEARCH_SESSION

PCM_OP_GPRS_AAA_POL_SEARCH_SESSION

PREP_INPUT

PCM_OP_GPRS_AAA_POL_STOP_ACCOUNTING_PREP_INPUT


Note:

To configure PCM_OP_TCF_AAA_STOP_ACCOUNTING to call these helper opcodes when processing additional service types or to change which helper opcodes are called, see "Configuring Services Framework to Call Helper Opcodes".

Closing Prepaid GPRS Sessions when the External Network Shuts Down

To close all open GPRS sessions when the external network is being shut down or encounters problems, call the PCM_OP_TCF_AAA_ACCOUNTING_OFF opcode with the following information in the input flist:

  • GPRS service type

  • Originating network ID (SCP name)

  • Name of the calling program

  • (Optional) Start time and end time

  • (Optional) Termination cause

This opcode closes all sessions that match the criteria passed in the input flist.

GPRS sessions with a status of STARTED or UPDATED are automatically rated before they are closed. You specify how BRM handles GPRS sessions with a CREATED status by passing the optional PIN_FLD_ACC_FLAG flist field:

  • If this flag is passed, CREATED sessions are rated before they are closed.

  • If the flag is not passed, CREATED sessions are canceled.

For more information about this opcode, see "How BRM Closes Prepaid Sessions When the External Network Shuts Down".

By default, PCM_OP_TCF_AAA_ACCOUNTING_OFF calls the following helper opcode in Table 25-9 when processing /service/telco/gprs events:

Table 25-9 AAA Accounting Off Helper Opcode

Processing Stage Helper Opcode Called

ACC_ON_OFF_SEARCH

PCM_OP_GPRS_AAA_POL_ACC_ON_OFF_SEARCH


Note:

To configure PCM_OP_TCF_AAA_ACCOUNTING_OFF to call these helper opcodes when processing additional service types or to change which helper opcodes are called, see "Configuring Services Framework to Call Helper Opcodes".

Closing Prepaid GPRS Sessions when the External Network Restarts

To close all open GPRS sessions when the external network restarts, call the PCM_OP_TCF_AAA_ACCOUNTING_ON opcode with the following information in the input flist:

  • GPRS service type

  • Originating network ID (SCP name)

  • Name of the calling program

  • (Optional) Start time and end time

  • (Optional) Termination cause

This opcode closes all sessions that match the criteria passed in the input flist.

GPRS sessions with a status of STARTED or UPDATED are automatically rated before they are closed. You specify how BRM handles GPRS sessions with a CREATED status by passing the optional PIN_FLD_ACC_FLAG input flist field:

  • If this flag is passed, CREATED sessions are rated before they are closed.

  • If the flag is not passed, CREATED sessions are canceled.

For more information about this opcode, see "How BRM Closes Prepaid Sessions When the External Network Restarts".

By default, PCM_OP_TCF_AAA_ACCOUNTING_ON calls the following helper opcode in Table 25-10 when processing /service/telco/gprs events:

Table 25-10 AAA Accounting On Helper Opcode

Processing Stage Helper Opcode Called

ACC_ON_OFF_SEARCH

PCM_OP_GPRS_AAA_POL_ACC_ON_OFF_SEARCH


Note:

To configure PCM_OP_TCF_AAA_ACCOUNTING_ON to call these helper opcodes when processing additional service types or to change which helper opcodes are called, see "Configuring Services Framework to Call Helper Opcodes".

Customizing GPRS Authorization IDs

Use the PCM_OP_GPRS_AAA_POL_AUTHORIZE policy opcode to generate a unique authorization ID if one is not passed in the input flist. By default, this opcode generates IDs that use the following format:

APN – GGSN_Address – SGSN_Address - START_T

However, you can customize this opcode to use another ID format.

This policy opcode is called by the PCM_OP_GPRS_AAA_POL_SEARCH_SESSION policy opcode during the authorization process.

Preparing GPRS-Specific Data by Using Helper Opcodes

Use these GPRS AAA helper opcodes to prepare GPRS-specific data for the Services Framework AAA opcodes.

Important:

Do not call these helper opcodes directly. You configure an opcode to call helper opcodes by using the "load_aaa_config_opcodemap_tcf" utility. See "Configuring Services Framework to Call Helper Opcodes".

Preparing GPRS-Specific Flists for Authorization

Use the PCM_OP_GPRS_AAA_POL_AUTHORIZE_PREP_INPUT helper opcode to aggregate GPRS data and then prepare an flist for authorizing a prepaid GPRS session. By default, this opcode is called by PCM_OP_TCF_AAA_AUTHORIZE at the PREP_INPUT processing stage.

This opcode aggregates GPRS data by amount, duration, volume, or occurrence, depending on the value passed in the PIN_FLD_REQ_MODE flist field:

  • 1 specifies that the events were prerated.

  • 2 specifies to rate the duration. This is the default.

  • 4 specifies to rate the volume.

  • 6 specifies to rate the duration and volume.

  • 8 specifies to rate the occurrence. This applies to activity events only.

For Prerated Events:

When aggregating prerated events, the helper opcode prepares the PIN_FLD_BALANCES array in the PIN_FLD_RATING_INFO substruct, indexed by the currency type.

For Duration-Based Aggregation:

When aggregating the duration, the helper opcode performs the following:

  1. Assigns a starting timestamp to the PIN_FLD_START_T field in the PIN_FLD_RATING_INFO.PIN_FLD_EVENT substruct. The opcode uses the starting timestamp from the input flist or, if one is not passed in, from "pin_virtual_time" (see BRM Developer's Guide).

    Note:

    This is a temporary starting timestamp only and is later replaced with the actual starting timestamp by the reauthorization or stop accounting opcode.
  2. Assigns an ending timestamp to the PIN_FLD_END_T field in the PIN_FLD_RATING_INFO.PIN_FLD_EVENT substruct:

    • If PIN_FLD_END_T is supplied in the input flist, the opcode assigns the ending timestamp directly to the PIN_FLD_END_T field.

    • If PIN_FLD_QUANTITY is supplied in the input flist, the opcode calculates the ending timestamp by adding the quantity passed in the input flist to the starting timestamp.

    • If an ending timestamp or quantity is not passed in, the opcode retrieves the default authorization quantity from the /config/reserve/gprs object. The opcode calculates the ending timestamp by adding the default authorization quantity to the starting timestamp.

For Volume-Based Aggregation:

When aggregating the volume, the helper opcode adds the bytes uploaded and the bytes downloaded and assigns the value to the PIN_FLD_BYTES_UPLINK and PIN_FLD_BYTES_DOWNLINK fields in the PIN_FLD_RATING_INFO.PIN_FLD_EVENT.PIN_FLD_TELCO_INFO substruct.

Preparing GPRS-Specific Flists for Reauthorization

Use the PCM_OP_GPRS_AAA_POL_REAUTHORIZE_PREP_INPUT helper opcode to aggregate GPRS data and then prepare an flist for reauthorizing a prepaid GPRS session. By default, this opcode is called by PCM_OP_TCF_AAA_REAUTHORIZE at the PREP_INPUT processing stage.

This opcode aggregates GPRS data by amount, duration, volume, or occurrence, depending on the value passed in the PIN_FLD_REQ_MODE flist field:

  • 1 specifies that the events were prerated.

  • 2 specifies to rate the duration. This is the default.

  • 4 specifies to rate the volume.

  • 6 specifies to rate the duration and volume.

  • 8 specifies to rate the occurrence. This applies to activity events only.

For Prerated Events:

When aggregating prerated events, the helper opcode assigns a reauthorization amount to the PIN_FLD_AMOUNT field in the PIN_FLD_RATING_INFO substruct. The method the opcode uses to calculate the reauthorization amount depends on the value passed in the PIN_FLD_AGGREGATE_MODE field:

  • If PIN_FLD_AGGREGATE_MODE is set to 4, the opcode uses the amount passed in the input flist.

  • If PIN_FLD_AGGREGATE_MODE is set to 8, the opcode calculates the reauthorization amount based on the PIN_FLD_RATING_MODE field:

    • If PIN_FLD_RATING_MODE is 0, the opcode adds the amount passed in the input flist to the amount in the /active_session object.

    • If PIN_FLD_RATING_MODE is 1, the opcode adds the amount passed in the input flist to the amount in the /reservation/active object.

For Duration-Based Requests:

When aggregating the duration, the helper opcode assigns a starting timestamp and ending timestamp to the PIN_FLD_START_T and PIN_FLD_END_T fields in the PIN_FLD_RATING_INFO.PIN_FLD_EVENT substruct.

The opcode assigns a starting timestamp based on the following:

  • If PIN_FLD_START_T is passed in the input flist and the timestamp is earlier than the timestamp in the /active_session object, the opcode assigns the starting timestamp from the input flist.

  • If PIN_FLD_START_T is passed in the input flist and the /active_session object does not already exist, the opcode assigns the starting timestamp from the input flist.

  • If PIN_FLD_START_T is not passed in and the /active_session object does not already exist, the opcode assigns the starting timestamp from "pin_virtual_time" (see BRM Developer's Guide).

The opcode assigns an ending timestamp based on the following:

  • If PIN_FLD_END_T is passed in the input flist, the opcode assigns the ending timestamp from the input flist.

  • If PIN_FLD_QUANTITY is passed in the input flist, the opcode calculates the ending timestamp based on the values passed in the PIN_FLD_AGGREGATE_MODE field:

    • If PIN_FLD_AGGREGATE_MODE is 4, the opcode calculates the ending timestamp by adding the starting timestamp and the quantity.

    • If PIN_FLD_AGGREGATE_MODE is 8, the opcode populates the value based on the PIN_FLD_RATING_MODE field:

      • If PIN_FLD_RATING_MODE is 0, the opcode calculates the ending timestamp by adding together the ending timestamp from the /active_session object and the quantity from the input flist.

      • If PIN_FLD_RATING_MODE is 1, the opcode calculates the ending timestamp by adding together the starting timestamp, the reserved quantity from /reservation/active, and the quantity from the input flist.

  • If an ending timestamp or quantity is not passed in, the opcode retrieves the default reauthorization quantity from the /config/reserve/gprs object. The opcode calculates the ending timestamp by adding together the default reauthorization quantity and the starting timestamp.

For Volume-Based Requests:

When aggregating the volume, the helper opcode assigns the reauthorization volume to the PIN_FLD_BYTES_UPLINK and PIN_FLD_BYTES_DOWNLINK fields in the PIN_FLD_RATING_INFO substruct. The method the opcode uses to calculate the reauthorization volume depends on the value passed in the PIN_FLD_AGGREGATE_MODE field:

  • If PIN_FLD_AGGREGATE_MODE is set to 4, the opcode assigns the volume passed in the input flist.

  • If PIN_FLD_AGGREGATE_MODE is set to 8, the opcode calculates the reauthorization volume based on the PIN_FLD_RATING_MODE field:

    • If PIN_FLD_RATING_MODE is set to 0, the opcode adds the bytes uploaded or downloaded from the input flist to the value in the /active_session object.

    • If PIN_FLD_RATING_MODE is set to 1, the opcode adds the bytes uploaded or downloaded from the input flist to the value in the /reservation/active object.

Preparing GPRS-Specific Flists for Updating Sessions

Use the PCM_OP_GPRS_AAA_POL_UPDATE_ACCOUNTING_PREP_INPUT helper opcode to aggregate GPRS data and then prepare an flist for updating an existing prepaid GPRS session.

This opcode aggregates GPRS data by amount, duration, volume, or occurrence, depending on the value passed in the PIN_FLD_REQ_MODE flist field:

  • 1 specifies that the events were prerated.

  • 2 specifies to rate the duration. This is the default.

  • 4 specifies to rate the volume.

  • 6 specifies to rate the duration and volume.

  • 8 specifies to rate the occurrence. This applies to activity events only.

For Prerated Events:

When aggregating prerated events, the helper opcode prepares the PIN_FLD_BALANCES array in the PIN_FLD_RATING_INFO substruct, indexed by the currency type.

  • If PIN_FLD_AGGREGATE_MODE is 4, the opcode assigns the amount from the input flist.

  • If PIN_FLD_AGGREGATE_MODE is 8, the opcode calculates the amount by adding together the amount passed in the input flist and the amount from the /active_session object.

For Duration-Based Requests:

When aggregating the duration, the helper opcode assigns a starting timestamp and ending timestamp to the PIN_FLD_START_T and PIN_FLD_END_T fields in the PIN_FLD_RATING_INFO.PIN_FLD_EVENT substruct.

  • For the starting timestamp, the helper opcode assigns the timestamp from either the /active_session object or the input flist, whichever is earlier. If a starting timestamp is not present in the input flist or the /active_session object, the helper opcode does not modify the existing starting timestamp.

  • For the ending timestamp, the helper opcode assigns the timestamp from either the /active_session object or the input flist, whichever is later. If an ending timestamp is not present in the input flist or the /active_session object, the helper opcode does not modify the existing ending timestamp.

For Volume-Based Requests:

When aggregating the volume, the helper opcode assigns the volume uploaded or downloaded by the customer to the PIN_FLD_BYTES_UPLINK or PIN_FLD_BYTES_DOWNLINK field in the PIN_FLD_RATING_INFO.PIN_FLD_EVENT.PIN_FLD_TELCO_INFO substruct. The method the helper opcode uses to calculate the volume depends on the value passed in the PIN_FLD_AGGREGATE_MODE flist field:

  • If PIN_FLD_AGGREGATE_MODE is 4, the opcode uses the bytes passed in the input flist.

  • If PIN_FLD_AGGREGATE_MODE is 8, the opcode calculates the volume by adding together the bytes passed in the input flist and the bytes in the /active_session object.

Preparing GPRS-Specific Flists for Ending Sessions

Use the PCM_OP_GPRS_AAA_POL_STOP_ACCOUNTING_PREP_INPUT helper opcode to aggregate GPRS data and then prepare an flist for ending a prepaid GPRS session.

This opcode aggregates GPRS data based on the value passed in the PIN_FLD_SUBSESSION_MODE flist field:

  • 1 specifies aggregate mode.

  • 2 specifies rate mode.

  • 3 specifies deferred rate mode.

For more information about the rating modes, see "Specifying How to Rate Subsessions".

For Aggregate Mode:

When set to aggregate mode, the helper opcode reads the PIN_FLD_STOP_INDICATOR field to determine whether the session is still in progress (0) or has ended (1). When the field is set to 0, the helper opcode does nothing. When the field is set to 1, the helper opcode performs the following:

  1. Aggregates the amount or quantity passed in the input flist with the amount or quantity in the /active_session object.

  2. Aggregates the volume information from all of the subsession objects and records it in the master session object.

  3. Determines the session's starting timestamp and ending timestamp by choosing the earliest and latest timestamps from all of the subsession objects and then records them in the master session object.

  4. Sets the status of all subsession objects to Closed And Unrated, which indicates that the objects should be closed and the event should not be recorded.

If the object is a master session object, the information is passed in the top level of the flist; if it is a subsession object, the information is passed in the PIN_FLD_SESSION_INFO array.

For Rate Mode:

When set to rate mode, the helper opcode reads the PIN_FLD_STOP_INDICATOR field to determine whether the session is still in progress (0) or has ended (1). When the field is set to 0, the helper opcode does nothing. When the field is set to 1, the helper opcode performs the following:

  1. Aggregates the amount or quantity passed in the input flist with the amount or quantity in the /active_session object.

  2. Passes the /active_session object with the status set to Closed.

If the object is a master session object, the information is passed in the top level of the flist; if it is a subsession object, the information is passed in the PIN_FLD_SESSION_INFO array.

For Deferred Rate Mode:

When set to deferred rate mode, the helper opcode reads the PIN_FLD_STOP_INDICATOR field to determine whether the session is still in progress (0) or has ended (1). When the field is set to 0, the helper opcode does nothing. When the field is set to 1, the helper opcode performs the following:

  1. Aggregates the amount or quantity passed in the input flist with the amount or quantity in the /active_session object.

  2. Passes all of the master and subsession objects with the status set to Closed, which indicates that all of the objects should be rated and recorded as events.

If the object is a master session object, the information is passed in the top level of the flist; if it is a subsession object, the information is passed in the PIN_FLD_SESSION_INFO array.

Building Search Templates for GPRS Session Objects

Use the PCM_OP_GPRS_AAA_POL_SEARCH_SESSION helper opcode to build a search template for finding /active_session/telco/gprs objects or /event/session/telco/gprs objects. These search templates are used by the Services Framework AAA opcodes to look for duplicate session objects.

By default, this helper opcode sets the search criteria to the following, but you can customize it to use other criteria:

  • Authorization ID

  • APN name

  • GGSN address

  • SGSN address

  • Starting timestamp

  • For /active_session/telco/gprs objects, the authorization ID

  • For /event/session/telco/gprs objects, the network session ID, MSISDN, and start time

Building Search Templates for GPRS Active Session Objects

Use the PCM_OP_GPRS_AAA_POL_ACC_ON_OFF_SEARCH helper opcode to build a search template that can be used to find /active_session/telco/gprs objects when the external network shuts down or restarts.

By default, this helper opcode uses the following search criteria, but you can customize it to use custom search criteria:

  • Status of the /active_session objects

  • GGSN address

  • SGSN address

  • (Optional) Starting timestamp