10 About Performing AAA for Prepaid GSM Services

This chapter provides an overview of Oracle Communications Billing and Revenue Management (BRM) GSM 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 GSM Services

GSM AAA Manager allows you to perform authentication, authorization, and accounting (AAA) for prepaid GSM services, such as GSM telephone calls, SMS messages, data, and faxes. For example, when a prepaid customer accesses a GSM service, you can use GSM AAA Manager to perform the following:

  • Verify the customer's identity by using the phone's 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 GSM session.

  • Record usage information about the GSM 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 GSM AAA Manager

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

About the GSM AAA Manager Opcodes

GSM 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 GSM-specific operations by themselves. They call helper opcodes to do this.

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

A Services Framework AAA opcode calls a GSM AAA helper opcode at any of these processing stages in the opcode's execution:

  • SEARCH_SESSION

  • PREP_INPUT

  • VALIDATE_LIFECYCLE

  • TAG_SESSION

  • 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 GSM AAA helper opcode specified in the /config/opcodemap/tcf object. The GSM AAA helper opcode aggregates the GSM data and then returns a GSM-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 GSM AAA helper opcodes when processing /service/telco/gsm/data, /service/telco/gsm/fax, /service/telco/gsm/sms, and /service/telco/gsm/telephony 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 GSM AAA Manager Storable Classes

By default, BRM stores information for prepaid GSM sessions in these storable classes:

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

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

  • /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.

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

  • /config/aaa/gsm: Stores default preferences for GSM services. For example, it specifies whether to keep or delete active session objects when a GSM session ends.

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

About the GSM AAA Manager Utilities

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

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

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

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

  • Default authorization and reauthorization values for GSM services. BRM authorizes prepaid customers to use a service for a specified duration, volume, or amount. For example, BRM can authorize customers to initially make a 10-minute GSM telephone call or download 100 bytes of data.

See "Specifying Default AAA Preferences for GSM Services".

Setting Up Your System to Perform AAA for Prepaid GSM Services

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

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

  2. Configure the gateway application to send GSM AAA requests to the GSM AAA Manager opcodes. See "Sending AAA Requests to GSM AAA Manager".

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

  4. (Optional) Configure your system to perform AAA for custom RUMs. See "Configuring Services Framework AAA Manager for Custom RUMs".

  5. (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".

    Note:

    By default, the Services Framework AAA opcodes call GSM AAA helper opcodes when processing /service/telco/gsm/data, /service/telco/gsm/fax, /service/telco/gsm/sms, and /service/telco/gsm/telephony events only. To call the helper opcodes when processing additional GSM service types, you must configure Services Framework Manager to do so.
  6. (Optional) Configure BRM to reserve a portion of a customer's resources for a prepaid GSM 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 GSM Services

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

Sending AAA Requests to GSM AAA Manager

To perform AAA for GSM 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 GSM AAA Manager opcodes.

Your external network can pass information to the GSM AAA opcodes through Oracle Communications Service Broker (OCSB) or a custom gateway application.

You can use the GSM AAA Manager opcodes to perform the following:

Authenticating Users for GSM Services

To authenticate GSM users, call the PCM_OP_TCF_AAA_AUTHENTICATE opcode with the following information in the input flist:

  • GSM service type

  • MSID

  • Name of the calling program

  • (Optional) Password (if the PIN_FLD_PASSWORD field is passed in, BRM authenticates in PAP mode; if the field is not passed in, BRM authenticates in CHAP mode)

  • (Optional) Action

For more information, see "How BRM Authenticates Prepaid Customers".

Authorizing GSM Services

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

  • GSM service type

  • MSID

  • Name of the calling program

  • Direction of the call

  • Details about the call, such as the IMEI value, the dialed number, and the quality of service (QoS)

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

By default, PCM_OP_TCF_AAA_AUTHORIZE calls the helper opcodes shown in Table 10-1 when it processes /service/telco/gsm/data, /service/telco/gsm/fax, /service/telco/gsm/sms, and /service/telco/gsm/telephony events:

Table 10-1 Helper Opcodes Called for Processing

Processing Stage Helper Opcode Called

SEARCH_SESSION

PCM_OP_GSM_AAA_POL_SEARCH_SESSION

PREP_INPUT

PCM_OP_GSM_AAA_POL_AUTHORIZE_PREP_INPUT

VALIDATE_LIFECYCLE

PCM_OP_TCF_AAA_VALIDATE_LIFECYCLE
(for /service/telco/gsm/telephony only)


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 GSM Sessions

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

  • GSM service type

  • MSID

  • Name of the calling program

  • Direction of the call

  • Requested reauthorization amount or quantity

  • Details about the call, such as the IMEI value, the dialed number, and the QoS

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

  • 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, see "How BRM Reauthorizes Prepaid Services".

By default, PCM_OP_TCF_AAA_REAUTHORIZE calls the helper opcodes shown in Table 10-2 when it processes /service/telco/gsm/data, /service/telco/gsm/fax, /service/telco/gsm/sms, and /service/telco/gsm/telephony events:

Table 10-2 Helper Opcodes Called for Reauthorization

Processing Stage Helper Opcode Called

SEARCH_SESSION

PCM_OP_GSM_AAA_POL_SEARCH_SESSION

PREP_INPUT

PCM_OP_GSM_AAA_POL_REAUTHORIZE_PREP_INPUT

POST_PROCESS

PCM_OP_GSM_AAA_POL_POST_PROCESS


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 GSM Sessions

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

  • GSM service type

  • MSID

  • Name of the calling program

  • Direction of the call

  • Consumed quantity or amount

  • Requested reauthorization quantity or amount

  • Details about the call, such as the IMEI value, the dialed number, and the QoS

You can specify whether the reauthorization amount or quantity is aggregated or 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).

  • 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, see "How BRM Updates and Reauthorizes Prepaid Sessions".

By default, PCM_OP_TCF_AAA_UPDATE_AND_REAUTHORIZE calls the following helper opcodes when processing /service/telco/gsm/data, /service/telco/gsm/fax, /service/telco/gsm/sms, and /service/telco/gsm/telephony events:

Table 10-3 Helper Opcodes Called to Update and Reauthorize

Processing Stage Helper Opcode Called

SEARCH_SESSION

PCM_OP_GSM_AAA_POL_SEARCH_SESSION

PREP_INPUT

PCM_OP_GSM_AAA_POL_UPDATE_ACCOUNTING_PREP_INPUT and then PCM_OP_GSM_AAA_POL_REAUTHORIZE_PREP_INPUT

POST_PROCESS

PCM_OP_GSM_AAA_POL_POST_PROCESS


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 GSM 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:

  • GSM service type

  • MSID

  • Name of the calling program

  • Authorization ID

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

By default, PCM_OP_TCF_AAA_CANCEL_AUTHORIZATION calls the helper opcodes shown in Table 10-4 when processing /service/telco/gsm/data, /service/telco/gsm/fax, /service/telco/gsm/sms, and /service/telco/gsm/telephony events:

Table 10-4 Help Opcode Called for Cancellations

Processing Stage Helper Opcode Called

SEARCH_SESSION

PCM_OP_GSM_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".

Managing Prepaid GSM Sessions

After a customer is authorized to access a GSM service, the external network connects the call and begins collecting information about the customer's usage, such as the starting time, the dialed number, and the direction of the call. 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 reservation and active session objects, and records the data in /event/session objects in the BRM database.

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

  • Start prepaid GSM sessions.

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

  • End prepaid GSM sessions.

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

Starting Prepaid GSM Sessions

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

  • GSM service type

  • MSID

  • Authorization ID

  • Session start time

  • Direction of the call

  • Name of the calling program

  • Information about the call, such as the IMEI value, dialed number, and QoS

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

By default, PCM_OP_TCF_AAA_START_ACCOUNTING calls the helper opcode shown in Table 10-5 when processing /service/telco/gsm/data, /service/telco/gsm/fax, /service/telco/gsm/sms, and /service/telco/gsm/telephony events:

Table 10-5 Helper Opcodes Called For Start of Accounting

Processing Stage Helper Opcode Called

SEARCH_SESSION

PCM_OP_GSM_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 GSM Session

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

  • GSM service type

  • MSID

  • Name of the calling program

  • Authorization ID

  • Session end time

  • Direction of the call

  • Details that changed

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

  • 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 session object). BRM calculates the total usage amount or quantity by adding the value passed in the input flist to the session's previous usage amount or quantity.

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

By default, PCM_OP_TCF_AAA_UPDATE_ACCOUNTING calls the helper opcodes shown in Table 10-6 when processing /service/telco/gsm/data, /service/telco/gsm/fax, /service/telco/gsm/sms, and /service/telco/gsm/telephony events:

Table 10-6 Helper Opcodes Called to Update Accounting

Processing Stage Helper Opcode Called

SEARCH_SESSION

PCM_OP_GSM_AAA_POL_SEARCH_SESSION

PREP_INPUT

PCM_OP_GSM_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 GSM Sessions

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

  • GSM service type

  • MSID

  • Name of the calling program

  • Direction of the call

  • The amount or quantity consumed during the session

  • Information about the call, such as the IMEI value, dialed number, and QoS

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 GSM session in an /event/session object in the BRM database.

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

  • 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 session object). BRM calculates the total usage amount or quantity by adding the value passed in the input flist to the session's previous usage amount or quantity.

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

By default, PCM_OP_TCF_AAA_STOP_ACCOUNTING calls the helper opcodes shown in Table 10-7 when processing /service/telco/gsm/data, /service/telco/gsm/fax, /service/telco/gsm/sms, and /service/telco/gsm/telephony events:

Table 10-7 Helper Opcodes Called to Stop Accounting

Processing Stage Helper Opcode Called

SEARCH_SESSION

PCM_OP_GSM_AAA_POL_SEARCH_SESSION

PREP_INPUT

PCM_OP_GSM_AAA_POL_STOP_ACCOUNTING_PREP_INPUT

VALIDATE_LIFECYCLE

PCM_OP_TCF_AAA_VALIDATE_LIFECYCLE
(for /service/telco/gsm/telephony in Direct Debit mode only)


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 GSM Sessions When the External Network Shuts Down

To close all open GSM 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:

  • GSM service type

  • Originating network ID (SCP name)

  • Name of the calling program

  • (Optional) Start time

  • (Optional) Status

  • (Optional) Termination cause

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

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

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

  • When the flag is not passed, CREATED sessions are cancelled.

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

By default, PCM_OP_TCF_AAA_ACCOUNTING_OFF calls the helper opcode shown in Table 10-8 when processing /service/telco/gsm/data, /service/telco/gsm/fax, /service/telco/gsm/sms, and /service/telco/gsm/telephony events:

Table 10-8 Helper Opcodes Called to Shut Down Accounting

Processing Stage Helper Opcode Called

ACC_ON_OFF_SEARCH

PCM_OP_GSM_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 GSM Sessions when the External Network Restarts

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

  • GSM service type

  • Originating network ID (SCP name)

  • Name of the calling program

  • (Optional) Start time

  • (Optional) Status

  • (Optional) Termination cause

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

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

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

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

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

By default, PCM_OP_TCF_AAA_ACCOUNTING_ON calls the helper opcode shown in Table 10-9 when processing /service/telco/gsm/data, /service/telco/gsm/fax, /service/telco/gsm/sms, and /service/telco/gsm/telephony events.

Table 10-9 Helper Opcode Called to Restart Accounting

ProcessinG Stage HelpeR Opcode Called

ACC_ON_OFF_SEARCH

PCM_OP_GSM_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 GSM Authorization IDs

Use the PCM_OP_GSM_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:

Calling_Number – Called_Number – Start_Time – Origin_Network 

For example:

4085551212–9165551234–1095379771–Sample Network

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

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

Preparing GSM-Specific Data by Using Helper Opcodes

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

Important:

Do not call these 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 GSM-Specific Input Flists for Authorization

Use the PCM_OP_GSM_AAA_POL_AUTHORIZE_PREP_INPUT helper opcode to aggregate GSM data by duration, volume, or amount, and then prepare an input flist that can be used for AAA operations.

This opcode aggregates GSM data by the amount passed in the input flist. If an amount is not passed in the PIN_FLD_AMOUNT field, this opcode aggregates GSM data based on the value passed in the PIN_FLD_REQ_MODE flist field:

  • 1 specifies to rate the amount.

  • 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 Amount-Based Aggregation:

When aggregating the amount, 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 opcodes.
  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 GSM-Specific Input Flists for Reauthorization

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

This opcode aggregates GSM data by the amount passed in the input flist. If an amount is not passed in the PIN_FLD_AMOUNT field, this opcode aggregates GSM data based on the value passed in the PIN_FLD_REQ_MODE flist field:

  • 1 specifies to rate the amount.

  • 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 Amount-Based Aggregation:

When aggregating the amount, 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:

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

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

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

    • When 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.

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:

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

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

      • When 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.

      • When 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:

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

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

    • When 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.

    • When 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 GSM-Specific Input Flists for Stopping Accounting Sessions

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

This helper opcode performs the following actions:

  1. Compiles data from the input flist and the specified /active_session/telco/gsm object.

  2. Determines how to aggregate the data by reading the PIN_FLD_AGGREGATE_MODE field from the input flist:

    • 1 specifies that the amount or quantity passed in the input flist is cumulative (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 value.

  3. Aggregates the data according to a specified value. By default, the helper opcode aggregates by duration, volume, or amount, but you can customize it to use different aggregation criteria.

  4. Creates an input flist that can be passed to the appropriate Activity opcode. You can customize the information included in the input flist.

Preparing GSM-Specific Input Flists for Updating Accounting Sessions

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

This opcode aggregates GSM data by the amount passed in the input flist. If an amount is not passed in the PIN_FLD_AMOUNT field, this opcode aggregates GSM data based on the value passed in the PIN_FLD_REQ_MODE flist field:

  • 1 specifies to rate the amount.

  • 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 Amount-Based Aggregation:

When aggregating the amount, 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 1, the opcode assigns the amount from the input flist.

  • If PIN_FLD_AGGREGATE_MODE is 2, 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:

  • When PIN_FLD_AGGREGATE_MODE is 1, the opcode uses the bytes passed in the input flist.

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

Building Search Templates for GSM Session Objects

Use the PCM_OP_GSM_AAA_POL_SEARCH_SESSION helper opcode to build a search template for finding /active_session/telco/gsm objects or /event/session/telco/gsm objects. By default, this helper opcode sets the search criteria to the following, but you can customize it to use other criteria:

  • For /active_session/telco/gsm objects, the authorization ID.

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

You specify the value for the search criteria on the input flist. For example, if the search criteria is set to authorization ID, you specify the ID to search for in the PIN_FLD_AUTHORIZATION_ID field.

Building Search Templates for GSM Active Session Objects

Use the PCM_OP_GSM_AAA_POL_ACC_ON_OFF_SEARCH helper opcode to build a search template that can be used to find an /active_session/telco/gsm object.

By default, this helper opcode uses the call's origination network as the search criterion, but you can customize it to use this search criteria:

  • Authorization ID

  • SCP name

  • MSID

  • Your custom criteria

You specify the value for the search criteria on the input flist. For example, if the search criteria is set to origination network, you specify which network to search for in the PIN_FLD_ORIGIN_NETWORK field.

Aggregating Return GSM Data

Use the PCM_OP_GSM_AAA_POL_POST_PROCESS helper opcode to aggregate data returned by the reauthorization process. The method used to aggregate the data depends on the value passed in the PIN_FLD_AGGREGATE_MODE flist field:

For Amount-Based Requests:

  • When the field is set to 4 (aggregated mode), the helper opcode calculates the amount to return by adding the amount returned from the Activity opcode to the previously reserved amount.

  • When the field is set to 8 (incremental mode), the helper opcode does not modify the return data.

For Volume-Based Requests:

  • When the field is set to 4 (aggregated mode), the helper opcode does not modify the return data.

  • When the field is set to 8 (incremental mode), the helper opcode calculates the quantity to return by subtracting the previously reserved quantity from the quantity returned from the Activity opcode.

For Duration-Based Requests: (when the input is in INCREMENAL MODE)

  • When the field is set to 4 (aggregated mode), the helper opcode does not modify the return data.

  • When the field is set to 8 (incremental mode), the helper opcode calculates the quantity to return by subtracting the previously reserved quantity from the quantity returned from the Activity opcode.