# Receiving AOC data

This topic describes:

- Advice of charge - start of call (AOC-S)

- Advice of charge - during call (AOC-D)

- Advice of charge - end of call (AOC-E)

- AOC and explicit call transfer (ECT) services

- AOC and call deflection services

When AOC data is available, the application receives an ACU indication or confirmation message containing an acu_ss_aoc_inform_invoke extended data structure.

Charging information is delivered to the application using the extended service data area of an ACU primitive during the active part of the call.

## Advice of charge - start of call (AOC-S)

If AOC-S is active, the aoc_type field in acu_ss_aoc_inform_invoke is set to ACU_SS_AOC_TYPE_AOC_S_INFORM. The tAcuSSAocSInform data structure and substructures carry advice of charge data.

Different charging rates are associated with each of the charged item types. If a charged item is not included, the default value is interpreted as free of charge.

Charged item | Included | Possible charging rate values
--- | --- | ---
Basic communication | Always. | Price per time unit and time unit. Flat rate (a fixed currency value per event). Free of charge. Special charging code. Not available.
Call attempt | Only in the initial charging information sent to the served user. | Flat rate (a fixed currency value per event). Free of charge. Special charging code. Not available.
Call setup | Only in the initial charging information sent to the served user. | Flat rate (a fixed currency value per event). Free of charge. Special charging code. Not available.
Operation of supplementary services | Only if the served user requested a supplementary service. | Price per time unit and time unit. Flat rate (a fixed currency value per event). Free of charge. Special charging code. Not available.
User-to-user information transfer | Only if the served user requested the user-to-user signaling supplementary service. | Price per volume unit and volume unit. Flat rate (a fixed currency value per event). Free of charge. Special charging code. Not available.

The charging rate is specified in the charging_rate field in the tAcuSSAocSInform structure. Depending upon its setting, one of the following data structures contains additional data:

- tAcuSSAocDuration: provides the currency value for a particular time unit, and the length of the time unit.

- tAcuSSAocVolume: provides the currency value for a particular volume unit, and the length of the volume unit.

- tAcuSSAocSpecific: provides a specific currency value.

The following table lists the charging_rate field setting and associated data structure for each charging rate type:

Rate type | charging_rate field setting | Associated data structure | Structure description
--- | --- | --- | ---
Price per volume unit and volume unit | VOLUME | tAcuSSAocVolume | Currency value for a particular volume unit, together with the length of the volume unit.
Price per time unit and time unit | DURATION | tAcuSSAocDuration | Currency value for a particular time unit, together with the length of the time unit.
Flat rate | SPECIFIC | tAcuSSAocSpecific | A fixed currency value per event. rate_type in this structure is set to FLAT_RATE.
Free of charge | SPECIFIC | tAcuSSAocSpecific | A fixed currency value per event. rate_type in this structure is set to FREE_OF_CHARGE or FREE_OF_CHARGE_FROM_BEGINNING.
Special charging code | SPECIFIC | tAcuSSAocSpecific | A fixed currency value per event. rate_type in this structure is set to SPECIAL_CHARGING.
Not available | SPECIFIC | tAcuSSAocSpecific | rate_type in this structure is set to NOT_AVAIL.

## Advice of charge - during call (AOC-D)

If AOC-D is active, the aoc_type field in the acu_ss_aoc_inform_invoke structure is set to ACU_SS_AOC_TYPE_AOC_D_INFORM. The tAcuSSAocDInform data structure and substructures carry advice of charge data.

## Advice of charge - end of call (AOC-E)

If AOC-E is active, the aoc_type field in the acu_ss_aoc_inform_invoke structure is set to ACU_SS_AOC_TYPE_AOC_E_INFORM. The tAcuSSAocEInform data structure and substructures carry advice of charge data.

Transfer of charging information during the active state of a call

Transfer of charging information during the call clearing phase, clearing initiated by the calling user

Transfer of charging information during the call clearing phase, clearing initiated by the called user

## AOC and explicit call transfer (ECT) services

AOC interacts with ECT. This section describes how the services interact.

### AOC-S and ECT

If AOC-S is active at the time the served user invokes ECT, AOC-S is stopped, and the application may get advice of charge prior to the clearing of the call.

### AOC-D and ECT

If AOC-D is active at the time the served user invokes ECT, the application receives advice of charge information prior to the clearing of the call, and the service is stopped.

### AOC-E and ECT

If the served user continues to be charged for a call after the call is transferred elsewhere, the served user can associate an identifier with the call, so AOC-E information for the call can be returned to the served user even though the served user is no longer involved in the call.

The identifier is specified in the charge_association field in the explicit call transfer or data structure. When AOC-E information is returned at the end of the call, the information is presented to the application using the management SAPI (ACU_MGMT_SAPI) in the AOC_INFORM structure, using a dummy connection ID. The charge_association field in the AcuSSAocEInform data structure is filled in, enabling the application to associate the charging information with the specific invocation of the service.

If an identifier is not specified with the call, no AOC information is returned.

If AOC-E is activated for a call, and ECT is called without a charge identifier included, then the AOC-E service is stopped, and the application receives AOC-E information for the portion of the call prior to the transfer.

AOC and call transfer

## AOC and call deflection services

The AOC service interacts with the call deflection service. This section describes how the services interact.

### AOC-S, AOC-D, and call deflection

AOC-S and AOC-D services are not applicable to the user performing the deflection.

### AOC-E and call deflection

If the served user continues to be charged for a call after the call is deflected elsewhere, the served user can associate an identifier with the call, so AOC-E information for the call can be returned to the served user even though the served user is no longer involved in the call.

The identifier is specified in the charge_association field in the call deflection data structure. When AOC-E information is returned at the end of the call, the information is presented to the application using the management SAPI (ACU_MGMT_SAPI) in the AOC_INFORM structure, using a dummy connection ID. The charge_association field in the AcuSSAocEInform data structure is filled in, enabling the application to associate the charging information to the specific invocation of the service.

If AOC-E is activated for a call, and the call deflection service is called without a charge identifier included, the AOC-E service is stopped, and the application receives AOC-E information for the portion of the call prior to the deflection.