This chapter describes how to use the AG ISDN Advice of Charge (AOC) supplementary services, available within the ETS 300 variant.
The Advice of Charge services provide users with a way of tracking the costs of a specific call, in real time. Three AOC services are available, each of which causes AOC information to be returned at a different point in the call:
Invocation of the Advice of Charge service is performed by the originating node, on a call-by-call basis. Once AOC is invoked, the originating node receives charging information using supplementary service data structures.
Alternatively, as a subscription option, the interface can be configured to provide Advice of Charge on all calls. In this case, the originating user side does not need to invoke the service. However, the NAI must be configured locally with the AOC subscription options (see Section 8.4).
Note: The basic call signaling over the network is affected by AOC services. In call clearing cases, the call clearing procedure will be delayed until AOC signaling is completed.
Note: Advice of Charge services are not available under Q.SIG.
If Advice of Charge services are not provided using a subscription service, they must be invoked to be used. Invocation of the services at the originating node is accomplished on a per-call basis. To invoke AOC services, an ACU_CONN_RQ primitive is sent to the stack, containing an acu_ss_aoc_request_invoke extended data structure. The service header to this structure must contain:
The following is a listing of the acu_ss_aoc_request_invoke extended data structure:
struct acu_ss_aoc_request_invoke
{
struct acu_ext_hdr ext_hdr; /* Extension header */
struct acu_ss_hdr ss_hdr; /* Supp. services header */
uchar aoc_s; /* Request AOC-S services (ON/OFF) */
uchar aoc_d; /* Request AOC-D services (ON/OFF) */
uchar aoc_e; /* Request AOC-E services (ON/OFF) */
pad5
};
The following is a list of the fields in this structure (other than the header fields). All fields are mandatory.
|
Field |
Description |
Must be filled in this request? |
aoc_s |
Yes | |
aoc_d |
Yes | |
aoc_e |
Yes |
Any combination of one or more AOC services is allowed in the request message.
Successful AOC Invocation
If AOC services are successfully invoked, an acu_ss_aoc_request_ret_result extended data structure is returned in an ACU indication or confirmation message. The service header to this structure contains:
The following is a listing of the acu_ss_aoc_request_ret_result extended data structure:
struct acu_ss_aoc_request_ret_result
{
struct acu_ext_hdr ext_hdr; /* Extension header */
struct acu_ss_hdr ss_hdr; /* Supp. services header */
uchar aoc_s; /* AOC-S services active (ON/OFF) */
uchar aoc_d; /* AOC-D services active (ON/OFF) */
uchar aoc_e; /* AOC-E services active (ON/OFF) */
pad5
};
The following is a list of the fields in this structure (other than the header fields). All fields are mandatory.
|
Field |
Description |
Will be filled in this response? |
aoc_s |
Yes | |
aoc_d |
Yes | |
aoc_e |
Yes |
The application may receive one acu_ss_aoc_request_ret_result message indicating the activation of all AOC services, or one for each service. If the application receives a message indicating that not all requested services are activated, this does not necessarily imply an error. Instead, it may mean that results are not yet available for the other services. Subsequent messages contain the activation results for these services.
Unsuccessful AOC Invocation
If AOC services are not successfully invoked, an acu_ss_aoc_request_ret_error extended data structure is returned in an ACU indication or confirmation message. The service header to this structure contains:
The following is a listing of the acu_ss_aoc_request_ret_error extended data structure:
struct acu_ss_aoc_request_ret_error
{
struct acu_ext_hdr ext_hdr; /* Extension header */
struct acu_ss_hdr ss_hdr; /* Supp. services header */
ushort cause; /* From ACU_SS_AOC_ERR.. constants */
uchar aoc_s; /* Error applies to AOC-S service (ON/OFF) */
uchar aoc_d; /* Error applies to AOC-D service (ON/OFF) */
uchar aoc_e; /* Error applies to AOC-E service (ON/OFF) */
pad3
};
The following is a list of the fields in this structure (other than the header fields).
|
Field |
Description |
Will be filled in this response? |
cause |
Error cause. From SS_AOC_ERR constants. |
Yes |
aoc_s |
(ON/OFF) Error in AOC-S services. |
Yes |
aoc_d |
(ON/OFF) Error in AOC-D services. |
Yes |
aoc_e |
(ON/OFF) Error in AOC-E services. |
Yes |

Figure 42: AOC Request Procedure During Call Establishment
When Advice of Charge data is available, the application receives an ACU indication or confirmation message, containing an acu_ss_aoc_inform_invoke extended data structure with:
The following is a listing of the acu_ss_aoc_inform_invoke extended data structure:
struct acu_ss_aoc_inform_invoke
{
struct acu_ext_hdr ext_hdr; /* Extension header */
struct acu_ss_hdr ss_hdr; /* Supp. services header */
uchar aoc_type; /* From ACU_SS_AOC_TYPE... constants */
pad7
union
{
tAcuSSAocSInform aoc_s; /* aoc_type==AOC_SS_TYPE_AOC_S_INFORM */
tAcuSSAocDInform aoc_d; /* aoc_type==AOC_SS_TYPE_AOC_D_INFORM */
tAcuSSAocEInform aoc_e; /* aoc_type==AOC_SS_TYPE_AOC_E_INFORM */
} aoc_data;
};
The following is a list of the fields in this structure (other than the header fields), and when they are used.
|
Field |
Description |
Will be filled in this response? |
aoc_type |
Indicates the type of AOC service returning the data.. From SS_AOC_TYPE constants. |
Yes |
aoc_data |
aoc_s contains data if aoc_type= ACU_SS_AOC_TYPE_AOC_S_INFORM aoc_d contains data if aoc_type= ACU_SS_AOC_TYPE_AOC_D_INFORM aoc_e contains data if aoc_type= ACU_SS_AOC_TYPE_AOC_E_INFORM |
Yes |
Charging information is delivered to the application using the extended service data area of an ACU primitive during the active part of the call.
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 are used to carry Advice of Charge data.
The following is a listing of the tAcuSSAocSInform structure.
typedef struct tAcuSSAocSInform
{
uchar type_of_info; /* From ACU_SS_AOC_TYPE_OF_INFO_ constants */
uchar charged_item; /* Bitmap of charged item constants */
uchar charging_rate; /* One of charging rate constants */
pad5
union
{
tAcuSSAocDuration duration; /* charging_rate=CHARGING_RATE_DURATION */
tAcuSSAocSpecific specific; /* charging_rate=CHARGING_RATE_SPECIFIC */
tAcuSSAocVolume volume; /* charging_rate=CHARGING_RATE_VOLUME */
}rate;
};
The following is a list of the fields in this structure (other than the header fields). Fields marked "M" in the "IN"column are mandatory in ACU indication or confirmation messages. Fields marked "O" are optional.
|
Fields |
I N |
Description |
type_of_info |
M |
From SS_AOC_TYPE_OF_INFO constants. |
charge_item |
O |
Bitmap of charged item constants. From SS_AOC_CHARGED_ITEM constants. |
charging_rate |
O |
One of SS_AOC_CHARGING_RATE constants. |
rate |
O |
References structure containing data associated with charging rate. |
If there is charging rate information returned, the type_of_info field in the tAcuSSAocSInform structure contains CHARGE_RATE. Otherwise, the field contains NOT_AVAILABLE.
If type_of_info in tAcuSSAocSInform contains CHARGE_RATE, the charged_item field in the structure contains the charged item. The following are valid values for this field:
|
Value |
Description |
BASIC |
Indicates the "basic communication" charged item. This charged item indicates the rate to be applied to the basic communication between the users. If the rate changes, the served user is informed by a repetition of this charged item indicating the new rate. |
ATTEMPT |
Indicates the "call attempt" charged item. This charged item indicates the cost applied for successful call attempt before the called user accepts the call. |
SETUP |
Indicates the "call setup" charged item. This charged item indicates the cost applied when the connection between the users is established. |
SPECIAL |
Indicates the "special charging arrangement" charged item. This charged item indicates that a special arrangement exists for calculating the cost of the call. Note that the use of this charged item is not standardized: its meaning is a matter for the network operator and the user to which it is sent. |
USER_TO_USER |
Indicates the "user-to-user information transfer" charged item. This charged item indicates the rate to be applied to the transfer of user-to-user information. If the rate changes, the served user is informed by a repetition of this charged item indicating the new rate. |
SUP_SERV |
Indicates the "operation of supplementary services" charged item. This charged item indicates the cost applied for the operation of requested supplementary services. |
Note: Network providers will only use those charged items which are appropriate to that service provider's charging mechanism. Thus, in some networks, users may or may not receive some of these items or combinations of items. Different networks may give information about the same call in different ways.
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 has 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 has 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:
The following table lists the charging_rate field setting and associated data structure for each charging rate type:
|
Rate Type |
charging_ |
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_ |
|
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. |
The following is a listing of the tAcuSSAocDuration structure.
typedef struct tAcuSSAocDuration
{
struct op_byte_field multiplier; /* Applies to currency amount */
struct op_long_field currency_amount; /* No. of currency units charged */
struct op_long_field time; /* Number of time units charged */
struct op_long_field granularity; /* Integer or not included */
struct op_byte_field time_scale; /* Applies to time */
struct op_byte_field granularity_scale; /* Applies to granularity */
struct op_byte_field currency_id_size; /* 0 if currency id not included */
uchar currency_id[MAX_CURRENCY_SIZE]; /* Currency ID */
uchar type_of_charging; /* From SS_AOC_S_TYPE_OF_CHARGE */
pad3 /* constants */
};
The following is a list of the fields in this structure. Fields marked "M" in the "IN"column are mandatory in ACU indication or confirmation messages. Fields marked "O" are optional.
|
Fields |
I N |
Description |
multiplier |
M |
This value plus currency_amount indicates the currency amount. From ACU_SS_AOC_MULTIPLIER constants. |
currency_amount |
M |
This value plus multiplier indicates the currency amount. |
time |
M |
This field plus time_scale indicates the length of time unit. |
granularity |
O |
This value plus granularity_scale indicates the time unit applied for calculation of charges by the network. Integer or not included. |
time_scale |
M |
This field plus time indicates the length of time unit. From SS_AOC_SCALE constants |
granularity_scale |
O |
This value plus granularity indicates the time unit applied for calculation of charges by the network. Only included if granularity field is included. |
currency_id_size |
M |
Size of currency_id. |
currency_id[MAX_ |
M |
Currency id. |
type_of_charging |
M |
Step function (charge is incurred for the time unit, or part thereof) or continuous (charges are incurred evenly throughout). From SS_AOC_S_TYPE_OF_CHARGE constants. |
The following is a listing of the tAcuSSAocSpecific structure.
typedef struct tAcuSSAocSpecific
{
struct op_byte_field multiplier; /* From ACU_SS_AOC_MULTIPLIER_ */
/* constants */
struct op_long_field currency_amount; /* No. of currency units charged */
struct op_byte_field charge_code; /* 10 */
struct op_byte_field currency_id_size; /* No. of bytes from currency_id */
uchar currency_id[MAX_CURRENCY_SIZE]; /* Currency ID string */
uchar rate_type; /* From ACU_SS_AOC_RATE_TYPE_ */
pad3 /* constants */
};
The following is a list of the fields in this structure. Fields marked "M" in the "IN"column are mandatory in ACU indication or confirmation messages. Fields marked "O" are optional.
|
Fields |
I N |
Description |
multiplier |
M |
Yes when rate_type is FLAT_RATE. This value plus currency_amount indicate the currency amount. From ACU_SS_AOC_MULTIPLIER constants. |
currency_amount |
M |
Yes when rate_type is FLAT_RATE. This value plus multiplier indicate the currency amount. Raw numeric value. |
charge_code |
M |
Yes when rate_type is SPECIAL_CHARGING. Integer value from 1 to 10. Identifies special charge arrangement for the NAI. |
currency_id_size |
M |
Number of bytes from currency_id. |
currency_id[MAX_ |
M |
Character array identifying the currency. |
rate_type |
M |
Free of charge, flat rate (a fixed currency value per event), special charging code, or not available. From ACU_SS_AOC_RATE_TYPE constants. |
The following is a listing of the tAcuSSAocVolume structure.
typedef struct tAcuSSAocVolume
{
struct op_long_field currency_amount; /* No of currency units charged */
struct op_byte_field currency_id_size; /* No of bytes from currency_id */
struct op_byte_field multiplier; /* From ACU_SS_AOC_MULTIPLIER_ */
/* constants */
uchar currency_id[MAX_CURRENCY_SIZE]; /* Currency ID string */
uchar volume_type; /* From ACU_SS_AOC_VOLUME_TYPE_ */
pad3 /* constants */
};
The following is a list of the fields in this structure. Fields marked "M" in the "IN"column are mandatory in ACU indication or confirmation messages. Fields marked "O" are optional.
|
Fields |
I N |
Description |
currency_amount |
M |
This value plus multiplier indicates the currency amount. Raw numeric value. |
currency_id_size |
M |
Number of bytes from currency_id. |
multiplier |
M |
This value plus currency_amount indicates the currency amount. From ACU_SS_AOC_MULTIPLIER constants. |
currency_id[MAX_ |
M |
Character array identifying the currency. |
volume_type |
M |
Octet, segment, or message to which UUI has been attached. From ACU_SS_AOC_VOLUME_TYPE constants. |
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 are used to carry Advice of Charge data.
The following is a listing of the tAcuSSAocDInform structure.
typedef struct tAcuSSAocDInform
{
struct op_byte_field currency_id_size; /* Used only if type_of_charging */
/* is CURRENCY_UNITS */
struct op_long_field currency_amount; /* Used only if type_of_charging */
/* is CURRENCY_UNITS */
struct op_byte_field multiplier; /* Used only if type_of_charging */
/* is CURRENCY_UNITS */
struct op_byte_field billing_id; /* From ACU_SS_AOC_BILLING_ID */
/* constants */
struct acu_ss_association charge_association; /* Returns ID of charge */
/* for AOC-E after call clearing */
tRecordedUnits recorded_units; /* Used only if type_of_charging */
/* is CHARGING_UNITS */
uchar currency_id[MAX_CURRENCY_SIZE]; /* Used only if type_of_charging */
/* is CURRENCY_UNITS */
uchar type_of_charging; /* From SS_AOC_TYPE_OF_CHARGE... */
/* constants */
uchar recorded_charges; /* From SS_AOC_RECORDED_CHARGES */
/* constants */
uchar completed; /* Set to OFF if additional */
/* recorded units are queued */
pad1 /* in a subsequent message */
};
The following is a list of the fields in this structure (other than the header fields).
|
Fields |
Description |
currency_id_size |
Size of currency_id. Used only if type_of_charging is CURRENCY_UNITS. |
currency_amount |
This value plus multiplier indicates the currency amount. Used only if type_of_charging is CURRENCY_UNITS. |
multiplier |
This value plus currency_amount indicates the currency amount. From ACU_SS_AOC_MULTIPLIER constants. Used only if type_of_charging is CURRENCY_UNITS. |
billing_id |
From ACU_SS_AOC_BILLING_ID constants. |
charge_association |
Currently not used. |
recorded_units |
Used only if type_of_charging is CHARGING_UNITS. |
currency_id[MAX_ |
Currency id. Used only if type_of_charging is CURRENCY_UNITS. |
type_of_charging |
Step function (charge is incurred for the time unit, or part thereof) or continuous (charges are incurred evenly throughout). From SS_AOC_S_TYPE_OF_CHARGE constants. |
recorded_charges |
From SS_AOC_RECORDED_CHARGES constants. |
completed |
Set to OFF if additional recorded units are queued in a subsequent message. |
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 are used to carry Advice of Charge data.
The following is a listing of the tAcuSSAocEInform structure.
typedef struct tAcuSSAocEInform
{
struct op_byte_field currency_id_size;/* Used only if type_of_charging */
/* is CURRENCY_UNITS */
struct op_long_field currency_amount; /* Used only if type_of_charging */
/* is CURRENCY_UNITS */
struct op_byte_field multiplier; /* Used only if type_of_charging */
/* is CURRENCY_UNITS */
struct op_byte_field billing_id; /* From ACU_SS_AOC_BILLING_ID */
/* constants */
struct acu_ss_association charge_association; /* Returns ID of charge */
/* for AOC-E after call clearing */
tRecordedUnits recorded_units; /* Used only if type_of_charging */
/* is CHARGING_UNITS */
uchar currency_id[MAX_CURRENCY_SIZE]; /* Used only if type_of_charging */
/* is CURRENCY_UNITS */
uchar type_of_charging; /* From SS_AOC_TYPE_OF_CHARGE... */
/* constants */
uchar recorded_charges; /* From SS_AOC_RECORDED_CHARGES */
/* constants */
uchar completed; /* Set to OFF if additional */
/* recorded units are queued */
pad1 /* in a subsequent message */
};
The following is a list of the fields in this structure (other than the header fields).
|
Fields |
Description |
currency_id_size |
Size of currency_id. Used only if type_of_charging is CURRENCY_UNITS. |
currency_amount |
This value plus multiplier indicates the currency amount. Used only if type_of_charging is CURRENCY_UNITS. |
multiplier |
This value plus currency_amount indicates the currency amount. From ACU_SS_AOC_MULTIPLIER constants. Used only if type_of_charging is CURRENCY_UNITS. |
billing_id |
From ACU_SS_AOC_BILLING_ID constants. |
charge_association |
Currently not used. |
recorded_units |
Used only if type_of_charging is CHARGING_UNITS. |
currency_id[MAX_ |
Currency id. Used only if type_of_charging is CURRENCY_UNITS. |
type_of_charging |
Step function (charge is incurred for the time unit, or part thereof) or continuous (charges are incurred evenly throughout). From SS_AOC_S_TYPE_OF_CHARGE constants. |
recorded_charges |
From SS_AOC_RECORDED_CHARGES constants. |
completed |
Set to OFF if additional recorded units are queued in a subsequent message. |

Figure 43: Transfer of Charging Information During the Active State of a Call

Figure 44: Transfer of Charging Information During the Call Clearing Phase, Clearing Initiated by the Calling User

Figure 45: Transfer of Charging Information During the Call Clearing Phase, Clearing Initiated by the Called User
The Advice of Charge service interacts with the Explicit Call Transfer service. This section describes how the services interact.
AOC-S and ECT
If AOC-S is active at the time the served user invokes the Explicit Call Transfer service, then 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 the Explicit Call Transfer service, then 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. (See Figure 46.)
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 to 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 the Explicit Call Transfer service 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.

Figure 46: AOC and Call Transfer
The Advice of Charge 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, then the AOC-E service is stopped, and the application receives AOC-E information for the portion of the call prior to the deflection.
If you have subscribed to Advice of Charge services, to use the services in this manner you must specify which AOC service you have subscribed to when you start the ISDN stack on an NAI. You can specify this information in the ISDN_PROTOCOL_PARMS_Q931CC structure referenced in the initial call to isdnStartProtocol. The fields to fill are as follows:
For more information, see your AG ISDN Messaging API Developer's Reference Manual.
Natural MicroSystems, Inc.
100 Crossing Boulevard
Framingham, MA 01702