Harri Hakala, Leena Mattila INTERNET-DRAFT Ericsson, Draft: Juha-Pekka Expires: September 2002 Koskinen Nokia March 2002 Diameter Credit Control Application Status of this memo This document is an Internet-Draft and is subject to all provisions of Section 10 of RFC2026 except that the right to produce derivative works is not granted. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet- Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or cite them other than as "work in progress". The list of current Internet-Drafts can be accessed at http://www.ietf.org/ietf/lid-abstracts.txt The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html This document is an individual submission to the IETF. Comments should be directed to the authors. Abstract This document specifies a Diameter application that is used for real- time cost and credit control between a service element and a Credit Control Server in service environment. Diameter accounting messages with additional AVPs are used to transfer service and credit control information between the service element and the Credit Control Server. TABLE OF CONTENTS 1.0 Introduction Hakala et al. expires September 2002 [Page 1] INTERNET-DRAFT Diameter Credit Control Application March, 2002 1.1 Requirements language 1.2 Terminology 1.3 Advertising application support 2.0 Architecture Model 3.0 Service Credit Control 3.1 Session Based Credit Control 3.1.1 First Interrogation 3.1.2 Interim Interrogation 3.1.3 Final Interrogation 3.2 One Time Event 3.2.1 Service Price Enquiry 3.2.2 Balance Check 3.2.3 Direct Debiting 3.2.4 Refund 4.0 Accounting AVPs 4.1 Abnormal-Termination-Reason AVP 4.2 Accounting-Correlation-Id AVP 4.3 Check-Balance-Result AVP 4.4 Cost AVP 4.5 Cost-Information AVP 4.6 Currency-Code AVP 4.7 Event-Timestamp 4.8 Final-Unit-Indication AVP 4.9 Granted-Service-Unit AVP 4.10 Requested-Action AVP 4.11 Requested-Service-Unit AVP 4.12 Service-Parameter-Info AVP 4.13 Service-Parameter-type AVP 4.14 Service-Parameter-Value AVP 4.15 Subscription-Id AVP 4.16 Subscription-Id-Data AVP 4.17 Subscription-Id-Type AVP 4.18 Unit-Type AVP 4.19 Unit-Value AVP 4.20 Used-Service-Unit AVP 5.0 Result-Code AVP Values 5.1 Transient Failures 5.2 Permanent Failures 6.0 AVP Occurrence Table 6.1 Accounting AVP Table 7.0 IANA Considerations 7.1 Command Codes 7.2 AVP Codes 7.3 Result-Code AVP Values 7.4 Abnormal-Termination-Reason AVP 7.5 Check-Balance-Result AVP 7.6 Requested-Service-Unit AVP 7.7 Subscription-Id-Type AVP 7.8 Unit-Type AVP 7.9 Application Identifier 8.0 Security Considerations 9.0 References 9.1 Normative Hakala et al. expires September 2002 [Page 2] INTERNET-DRAFT Diameter Credit Control Application March, 2002 9.2 Non-Normative 10.0 Acknowledgements 11.0 Authors addresses 12.0 Full Copyright Statement 13.0 Expiration Date 1.0 Introduction This Diameter application, combined with the Diameter base protocol [DIAMBASE], describes the accounting protocol that can be used for real time cost and credit control in the service environment. The next generation wireless networks specify (e.g. 3G Charging and Billing requirements [3GPPCHARG]) more critical requirements for the accounting applications. The accounting application must be able to rate accounting information in real-time. For example, for the service environment it is vital to be able to rate service event information instantly. There also exists a demand for the end user credit control. The accounting application must be able to check the end user's account for coverage for the requested service event charge prior to execution of that service event. All the chargeable events related to a specific account must be prevented from the end user when the credit of that account is exhausted or expired. Also a mechanism SHOULD be provided to indicate to the end user of the charges to be levied for a chargeable event. There are as well services such as gaming or advertising that in some situations rather refund than deduct the end userÆs account. To fulfill all these needs a new type of accounting application is needed, the credit control application. This application is used for real-time delivery of service event information in the service environment from the service element to the Credit Control Server to minimize the financial risk. This protocol is not only restricted to be used in the service environment (it can for example also be used for access control), but the focus is service control in service environment. 1.1. Requirements language In this document, the key words "MAY", "MUST, "MUST NOT", "optional", "recommended", "SHOULD", and "SHOULD NOT", are to be interpreted as described in [KEYWORDS]. 1.2 Terminology AAA Authentication, Authorization and Accounting Accounting Hakala et al. expires September 2002 [Page 3] INTERNET-DRAFT Diameter Credit Control Application March, 2002 The act of collection of information on resource usage for the purposes of trend analysis, auditing, billing or cost allocation. Accounting Server The accounting server receives accounting data from the service elements and other devices and translates it into session records. It acts as an interface to back-end rating, billing, and operations support systems. Billing The act of preparing an invoice. Charging In the telecom world charging is almost synonym with accounting. A function whereby information related to a chargeable event is transferred in order to make it possible to determine usage for which the charged party may be billed. Credit Control Credit Control is a mechanism, which directly interacts in real- time with an account and controls or monitors the charges, related to the service usage. Credit control is a process of checking if credit is available, credit-reservation, reduction of credit from the end user account when service is completed and refunding of reserved credit not used. Credit Control Server It is located in the home environment and is accessed by service elements in real-time for purpose of price determination and credit control before the service event is delivered to the end-user. It also interacts with business support systems. Diameter Credit Control Client A Diameter Credit Control Client is an entity that interacts with a Credit Control Server. Diameter Credit Control Server A Diameter Credit Control server is an entity that handles credit control request. Rating The act of determining the cost of the service event. Service A type of task that is performed by a service element for a service consumer. Service Consumer Client of a service element. End user of a network service. Service Element A network element that provides a service to service consumers. Hakala et al. expires September 2002 [Page 4] INTERNET-DRAFT Diameter Credit Control Application March, 2002 A service element itself can include the application service providers or application service providers can be located in an other domain. Service Event Any event which creates value for the end-user. 1.3 Advertising application support Diameter nodes conforming to this specification MAY advertise support by including the value of TBD (X) in the Acct-Application-Id AVP of the Capabilities-Exchange-Request and Capabilities-Exchange-Answer command [2]. 2.0 Architecture Model A service element provides services to service consumers. When accounting is used a service element collects service event information and reports it while and/or after services are provided to an accounting server by using an accounting protocol. Alternatively the accounting server may query the service element for service event information. The accounting protocol can for example be RADIUS accounting protocol or the Diameter base protocol with a Diameter application. If real-time Credit Control is required, the service element contacts the Credit Control Server with service event information included before the service is provided. The Credit Control Server, depending on the service event information, MAY perform the rating of the service event, pricing of the service event, credit check and credit- reservation from the account. The service element monitors the service execution according to the instructions returned by the Credit Control Server. After the service completion the Credit Control Server deducts the money from the account. If direct debiting/refunding is requested, the Credit Control Server deducts/increases the end userÆs account, respectively. The service element can also enquire the price of the service or the account balance status from the Credit Control Server. The credit control protocol is the Diameter base protocol with the Diameter credit control application. Hakala et al. expires September 2002 [Page 5] INTERNET-DRAFT Diameter Credit Control Application March, 2002 accounting +------------+ +-----------+ protocol +--------------+ | Service |<----->| Service |<------------>| Accounting | | Consumer | +-->| Element |<-----+ | Server | +------------+ | +-----------+ | +--------------+ | | +------------+ | | | Service |<--+ | +--------------+ | Consumer | +------>|Credit Control| +------------+ credit control | Server | protocol +--------------+ The Credit Control Server and Accounting Server in this architecture model are logical entities. The real configuration MAY combine them into a single host. 3.0 Service Control When an end user requests a service the request is forwarded to a service element in the home domain, that is the same administrative domain, in which the end user's Credit Control Server is located. In some cases it might be possible that the service element in the visited domain can offer service event to the end user, but in that case a commercial agreement must exist between the service element in the visited domain and Credit Control Server in the home domain. The service element SHOULD authenticate and authorize the end user before any request is sent to the Credit Control Server. The way how the authentication and/or authorization are performed in the service element and the authentication and/or authorization messages that are used are not defined in this application. The methods defined in other Diameter applications or other legacy authentication and authorization methods can be used. The Diameter Credit Control Client in the service element gets information from the authorization server regarding the way accounting data shall be forwarded (accounting protocol or credit control protocol) based on its knowledge of the end user. This means that the accounting information is forwarded to the accounting server as defined [DIAMBASE] or the Credit Control Server must be contacted before the service event is offered to the end user. The authorization server MAY include the Accounting-Interim-Interval AVP to control the operation of the device in the service element operating as a client as defined in [DIAMBASE]. If the Accounting- Interim-Interval AVP is included then the interim interval must be present in the request message sent to the Credit Control Server. The Diameter Credit Control Server MAY override the interim interval. It is up to the Credit Control Server to determine, even independently from the requested value, the allowed interim interval to be used for consumption of the granted service units. The Credit Hakala et al. expires September 2002 [Page 6] INTERNET-DRAFT Diameter Credit Control Application March, 2002 Control Server MAY return the interim interval in the Answer message to the Credit Control Client. It can be included in the Answer message even in case it is not present in the Request message. Alternatively the accounting interim interval can be omitted from the Answer message. The Diameter protocol's Session-Id AVP, which is globally and eternally unique [DIAMBASE], is used to identify a particular session. Each credit control session MUST have globally unique Session-Id and it MUST NOT be changed during a life of credit control session. During authorization, the authorization server MAY return the Accounting-Multi-Session-Id, which the Diameter Credit Control Clients MUST include in all subsequent accounting messages. The Accounting-Multi-Session-Id AVP MAY include the value of the original Session-Id. It's contents are implementation specific, but MUST be globally unique across other Accounting-Multi-Session-Id, and MUST NOT be changed during the life of a credit control session. There are certain applications that require multiple accounting sub- sessions. Such applications would send messages with a constant Session-Id AVP, but a different Accounting Sub-Session-Id AVP. If several credit sub-sessions will be used, all sub-sessions MUST be closed separately before the closing the main session. The absence of this AVP implies no sub-sessions are in use. The Diameter Credit Control Client and Server MUST support the accounting session state machine defined in the Diameter base protocol [DIAMBASE]. If the Credit Control Client wants to perform credit-reservation before granting service to the end user it MUST use several interrogations towards the Credit Control Server. In this case the Credit Control Server MUST maintain the accounting session state. A one time event MAY be used when there is no need to maintain any state in the Diameter Credit Control Server, for example enquiring the price of the service. 3.1 Session Based Credit Control For a session based Credit Control several interrogations are needed: the first, intermediate (optional) and the final interrogation. 3.1.1 First Interrogation The first interrogation MUST be sent before the Diameter Credit Control Client in a service element allows any service event to the end user. The Accounting-Record-Type is set to the value START_RECORD in the first request message. The Subscription-Id-Data AVP MUST be included to identify the end-user in the Credit Control Server. Hakala et al. expires September 2002 [Page 7] INTERNET-DRAFT Diameter Credit Control Application March, 2002 If the Diameter Credit Control Client knows the cost of the service event the monetary amount to be charged is included in the Requested- Service-Unit AVP. If the Diameter Credit Control Client does not know the cost of the service event, the Requested-Service-Unit AVP MAY contain the number of requested service events and the Service- Parameter-Info AVP SHOULD contain the service event information to be rated by the Credit Control Server. The Service-Parameter-Info AVP always refers to the requested service units. The Event-Timestamp AVP contains the time when the service event is requested in the service element. The Credit Control Server SHOULD rate the service event and make a credit-reservation from the end user's account that covers the cost of the service event. If the type of the Requested-Service-Unit AVP is money, no rating is needed but the corresponding monetary amount is reserved from end user's account. The Credit Control Server returns the Granted-Service-Unit AVP in the Answer message to the Diameter Credit Control Client. The Granted- Service-Unit AVP contains the amount of service units that the Diameter Credit Control Client can provide to the end user until a new Accounting-Request MUST be sent to the Credit Control Server. If several unit types are sent in the Answer message the Credit Control Client MUST handle each unit type separately. When the granted service units for one unit type have been spent a new Accounting- Request MUST be sent to the Credit Control Server even though there would be service units left for other units types. The type of the Granted-Service-Unit AVP can be time, volume, event or money depending on the type of service event. It is not possible to change the unit type(s) within the session. The Accounting-Answer message MAY also include the Final-Unit- Indication AVP to indicate that the Answer message contains the final units for the service session. After these units have been used by the end user, the Diameter Credit Control Client is responsible for terminating the service session and the credit control session by sending the final interrogation to the Credit Control Server. 3.1.2 Intermediate Interrogation When all the granted service units for one unit type are spent by the end user or the interim interval is expired the Diameter Credit Control Client MUST send a new Accounting-Request to the Credit Control Server. In case the Accounting-Interim-Interval is used it is always up to the Diameter Credit Control Client to send a new request well in advance before the expiration of the previous request in order to avoiding interruption in the service element. Even if the granted service units reserved by the Credit Control Server have not been spent upon expiration of the accounting interim interval, the Diameter Credit Control Client MUST send a new Accounting-Request to the Credit Control Server. Hakala et al. expires September 2002 [Page 8] INTERNET-DRAFT Diameter Credit Control Application March, 2002 There can be also mid-session service events, which might affect the rating of the current service events. In this case a spontaneous updating (a new Accounting-Request) SHOULD be sent including information related to the service event even if all the granted service units have not been spent or the accounting interim interval has not expired. When the used units are reported to the Credit Control Server the Credit Control Client will not have any units in its possession before new granted units are received from the Credit Control Server. When the new granted units are received from the Credit control Server these units apply from the point where the measurement of the reported used units stopped. The Accounting-Record-Type AVP is set to the value INTERIM_RECORD in the intermediate request message. The Subscription-Id-Data AVP MUST also be included in the intermediate message to identify the end user the in Credit Control Server. The Requested-Service-Unit AVP contains the new amount of requested service units, the Used-Service-Unit AVP contains the amount of used service units since the previous Answer message. The same unit types that are used in the previous message MUST be used. If several unit types were included in the previous Answer message the used service units for each unit type MUST be reported. The Event-Timestamp AVP contains the time of the event that triggered the sending of the new Accounting-Request. The Credit Control Server MUST refund the reserved credit amount not used to the end user's account and deduct the used monetary amount from the end user's account. The rating of the new service event, the credit-reservation from the end user's account and the possible final unit indication SHOULD be handled a similar way as described in the first interrogation. The Accounting-Answer message with the Accounting-Record-Type AVP is set to the value INTERIM_RECORD MAY include the Cost-Information AVP containing the accumulated cost for the session without taking any credit-reservation into account. There MAY be several intermediate interrogations within a session. 3.1.3 Final Interrogation When the end user terminates the service session or when all the granted units are used after a Final-Unit-Indication AVP has been received from the Credit Control Server, the Diameter Credit Control Client MUST send a final Accounting-Request message to the Credit Control Server. The Accounting-Record-Type AVP is set to the value STOP_RECORD. Hakala et al. expires September 2002 [Page 9] INTERNET-DRAFT Diameter Credit Control Application March, 2002 The Event-Timestamp AVP MAY contain the time of the session was terminated. The Used-Service-Unit AVP contains the amount of used service units since the previous answer message. If several unit types were included in the previous answer message the used service units for each unit type MUST be reported. After final interrogation the Credit Control Server MUST refund the reserved credit amount not used to the end user's account and deduct the used monetary amount from the end user's account. The Accounting-Answer message with the Accounting-Record-Type set to the value STOP_RECORD SHOULD include the Cost-Information AVP containing the total cost for the session in question. 3.2 One Time Event The one time event is used when there is no need to maintain accounting session state in the Credit Control Server. The one time event can be used when the service element wants to know the cost of the service event without any credit-reservation or to check the account balance without any credit-reservation. It can be used also for refunding service units on the user's account or direct debiting without any credit-reservation. 3.2.1 Service Price Enquiry Sometimes the service element needs to know the price of the service event. There might exist services offered by application service providers, whose prices are not known in the service element. End user might also want to get an estimation of the price of a service event before requesting it. A Diameter Credit Control Client requesting the cost information MUST set the Accounting-Record-Type AVP equal to EVENT_RECORD, include the Requested-Action AVP set to PRICE_ENQUIRY and set the requested service event information into the Service-Parameter-Info AVP in the Accounting-Request message. The Credit Control Server calculates the cost of the requested service event, but it does not perform any account balance check or credit-reservation from the account. The price of the requested service event is returned to the Credit Control Client in the Cost-Information AVP in the Accounting-Answer message. 3.2.2 Balance Check Sometimes Diameter Credit Control Client needs only to verify that the end userÆs account balance covers the cost for a certain service Hakala et al. expires September 2002 [Page 10] INTERNET-DRAFT Diameter Credit Control Application March, 2002 without reserving any units from the account at the time of the enquiry. This method does not guarantee that there would be credit left when the Diameter Credit Control Client requests the debiting of the account with a separate request. A Diameter Credit Control Client requesting the balance check MUST set the Accounting-Record-Type AVP equal to EVENT_RECORD, include Requested-Action AVP set to CHECK_BALANCE and include the Subscription-Id-Data to identify the End-User in the Credit Control Server. The Credit Control Server makes the balance check, but it does not do any credit-reservation from the account. The result of balance check (Credit/No Credit) is returned to the Credit Control Client in the Check-Balance-Result AVP in the Accounting-Answer message. 3.2.3 Direct Debiting There are certain one time events for which service execution is always successful in the service environment. In these cases the Diameter Credit Control Client can use the one time event scenario for direct debiting. The Diameter Credit Control Client MUST be sure that the requested service event execution will be successful, when this scenario is used. The Accounting-Record-Type is set to the value EVENT_RECORD and the Requested-Action AVP set to DIRECT_DEBITING in the Accounting-Request message. The Subscription-Id-Data AVP MUST be included to identify the End-User in the Credit Control Server. The Event-Timestamp AVP contains the time when the service event is requested in the service element. The Diameter Credit Control Client MAY include the monetary amount to be charged in the Request-Service-Unit AVP, if it knows the cost of the service event. If the Diameter Credit Control Client does not know the cost of the service event, then the Service-Parameter-Info AVP SHOULD contain the service event information to be rated by the Credit Control Server. The Service-Parameter-Info AVP always refers to the requested service unit. The Credit Control Server SHOULD rate the service event and deduct the corresponding monetary amount from end user's account. If the type of the Requested-Service-Unit AVP is money, no rating is needed but the corresponding monetary amount is deducted from the End User's account. The Credit Control Server returns the Granted-Service-Unit AVP in the Answer message to the Diameter Credit Control Client. The Granted- Service-Unit AVP contains the amount of service units that the Diameter Credit Control Client can provide to the end user. The type Hakala et al. expires September 2002 [Page 11] INTERNET-DRAFT Diameter Credit Control Application March, 2002 of the Granted-Service-Unit can be time, volume, event or money depending on the type of service event. The Accounting-Answer message SHOULD also include the Cost- Information AVP containing the total cost of the requested service. 3.2.4 Refund There MAY be a need to refund service units on the end userÆs account, for example gaming services. The Credit Control Client MUST set Accounting-Record-Type AVP to the value EVENT_RECORD and the Requested-Action AVP to REFUND in the Accounting-Request message. The Subscription-Id-Data AVP MUST be included to identify the End-User in the Credit Control Server. The Diameter Credit Control Client MAY include the monetary amount to be refunded in the Request-Service-Unit AVP, if it knows the cost of the service event. If the Diameter Credit Control Client does not know the cost of the service event, then the Service-Parameter-Info AVP SHOULD contain the service event information to be rated by the Credit Control Server. The Service-Parameter-Info AVP always refers to the requested service unit. 4.0 Accounting AVPs This section defines the accounting AVPs that are specific to Diameter Credit Control Application and MAY be included in the Diameter accounting messages [DIAMBASE]. Accounting-Request command MAY include a following additional AVPS: [ Subscription-Id ] [ Requested-Action ] [ Event-Timestamp] *[ Requested-Service Unit ] *[ Used-Service-Unit ] *[ Service-Parameter-Info ] [ Abnormal-Termination-Reason] *[ Accounting-Correlation-Id ] Accounting-Answer command MAY include a following additional AVPS: [ Subscription-Id ] *[ Granted-Service-Unit ] [ Cost-Information] [ Final-Unit-Indication ] [ Check-Balance-Result ] 4.1 Abnormal-Termination-Reason AVP The Abnormal-Termination-Reason AVP (AVP Code TBD) is of type Enumerated and contains information about the reason for an abnormal service termination in a service element. Hakala et al. expires September 2002 [Page 12] INTERNET-DRAFT Diameter Credit Control Application March, 2002 The following reasons are defined: SERVICE_ELEMENT_TERMINATION 0 An error occurred in the service element. CONNECTION_TO_END-USER_BROKEN 1 The connection to the end-user is broken. 4.2 Accounting-Correlation-Id AVP The Accounting-Correlation-Id AVP (AVP Code TBD) is type of OctetString and contains information to correlate accounting data generated for different components of the service, e.g. transport and service level. 4.3 Check-Balance-Result AVP The Check Balance Result AVP (AVP code TBD) is of type Enumerated and contains the result of the balance check. This AVP is applicable only when the Requested-Action AVP indicates CHECK_BALANCE in the Accounting-Request command. The following values are defined for the Check-Balance-Result AVP. ENOUGH_CREDIT 0 There is enough credit in the account to cover the requested service. NO_CREDIT 1 There isnÆt enough credit in the account to cover the requested service. 4.4 Cost AVP The Cost AVP (AVP Code TBD) is of type Float64 and contains the cost estimate of the service in case of price enquiry or the accumulated cost in the case of credit control session. 4.5 Cost-Information AVP The Cost-Information AVP (AVP Code TBD) is of type Grouped and is used to return the cost information of a service in the Accounting- Answer command. The included Cost AVP contains the cost of the service event and the Currency-Code specifies in which currency the cost was given. When the Requested-Action AVP with value PRICE_ENQUIRY is included in the Accounting-Request command the Cost-Information AVP sent in the succeeding Accounting-Answer command contains the cost estimation of the requested service, without any reservation being made. The Cost-Information AVP included in the Accounting-Answer command with the Accounting-Record-Type set to INTERIM_RECORD contains the Hakala et al. expires September 2002 [Page 13] INTERNET-DRAFT Diameter Credit Control Application March, 2002 accumulated cost for the session without taking any credit- reservation into account. The Cost-Information AVP included in the Accounting-Answer command with the Accounting-Record-Type set to EVENT_RECORD or STOP_RECORD contains the total cost for the requested service. It has the following ABNF grammar: ::=< AVP Header: TBD > { Cost } { Currency-Code } 4.6 Currency-Code AVP The Currency-Code AVP (AVP Code TBD) is of type Unsigned32 and contains a currency code that specifies in which currency the values of AVPs containing monetary units were given. It is specified using the numeric values defined in the ISO 4217 standard. 4.7 Event-Timestamp AVP The Event-Timestamp AVP is of type Time (AVP Code TBD). In the first Accounting-Request message it contains the time when the service is requested in the service element. The succeeding Accounting-Request messages it contains the time of the event that triggered the sending of the Accounting-Request message (e.g. mid-session service event, expiry of granted units or interim interval, termination of service). 4.8 Final-Unit-Indication AVP The Final-Unit-Indication AVP (AVP Code TBD) is of type Unsigned32 and indicates that the Granted-Service-Unit AVP in the accounting command contains the final units for the service. After these units have expired, the Diameter Credit Control Client in a service element is responsible for terminating the service and sending the STOP_RECORD to the Credit Control Server. If included in a command, the value of this AVP is always 1. 4.9 Granted-Service-Unit AVP Granted-Service-Unit AVP (AVP Code TBD) is of type Grouped and contains the amount of units that the Diameter Credit Control Client can provide to the end user until the service must be released or the new Accounting-Request must be sent. The Unit-Value AVP contains the granted Unit-Value and the Unit-Type AVP defines the type of the unit. If the unit type is money, a Currency-Code AVP SHOULD be included. It has the following ABNF grammar: ::=< AVP Header: TBD > Hakala et al. expires September 2002 [Page 14] INTERNET-DRAFT Diameter Credit Control Application March, 2002 { Unit-Type } { Unit-Value } [ Currency-Code ] 4.10 Requested-Action AVP The Requested-Action AVP (AVP Code TBD) is type of Enumerated and contains the requested action being sent by Accounting-Request command where the Accounting-Record-Type is set to EVENT_RECORD. The following values are defined for the Requested-Action AVP: DIRECT DEBITING 0 Direct debiting indicates that the request is to decrease the end userÆs account according to information specified in the Requested-Service-Unit AVP and/or Service-Parameter-Info AVP. The Granted-Service Unit AVP in the Accounting-Answer command contains the debited units. REFUND ACCOUNT 1 Refund account indicates that the request is to increase the end userÆs account according to information specified in the Requested-Service-Unit AVP and/or Service-Parameter-Info AVP. The Granted-Service Unit AVP in the Accounting-Answer command contains the refunded units. CHECK_BALANCE 2 Check balance indicates that the request is a balance check request. In this case the checking of the account balance is done without any credit reservation from the account. The Check- Balance-Result AVP in the Accounting-Answer command contains the result of the Balance Check. PRICE_ENQUIRY 3 Price Enquiry indicates that the request is a price enquiry request. In this case neither checking of the account balance nor reservation from the account will be done, only the price of the service will be returned in the Cost-Information AVP in the Accounting-Answer Command. 4.11 Requested-Service-Unit AVP The Requested-Service-Unit AVP (AVP Code TBD) is of type Grouped and contains the amount of requested units specified by the Diameter Credit Control Client. The included Unit-Value AVP contains the requested Unit-Value and the Unit-Type AVP defines the type of the unit. If the unit type is money, a Currency-Code AVP SHOULD be included. It has the following ABNF grammar: ::=< AVP Header: TBD > Hakala et al. expires September 2002 [Page 15] INTERNET-DRAFT Diameter Credit Control Application March, 2002 { Unit-Type } { Unit-Value } [ Currency-Code ] 4.12 Service-Parameter-Info AVP The Service-Parameter-Info AVP (AVP Code TBD) is of type Grouped and contains a service specific information used for price calculation or rating. The Service-Parameter-Type AVP defines the service parameter type and the Service-Parameter-Value AVP contains the parameter value. The actual contents of these AVPs are not within the scope of this document and SHOULD be defined in additional service specific documentation. It has the following ABNF grammar: ::=< AVP Header: TBD > { Service-Parameter-Type } { Service-Parameter-Value } 4.13 Service-Parameter-Type AVP The Service-Parameter-Type AVP is of type Unsigned32 (AVP Code TBD) and defines the type of the service event specific parameter (e.g. it can be end-user location, contents provider Id, tax percentage). The different parameters and their types are service specific and the meanings of these parameters are defined between the service element and the Credit Control Server. 4.14 Service-Parameter-Value AVP The Service-Parameter-Value AVP is of type UTF8String (AVP Code TBD) and contains the value of the service parameter type. 4.15 Subscription-Id AVP The Subscription-Id AVP (AVP Code TBD) is used to identify the end userÆs subscription and is of type Grouped. The Subscription-Id AVP includes a Subscription-Id-Data AVP that defines the identifier type and a Subscription-Id-Type AVP that holds the identifier. It has the following ABNF grammar: ::=< AVP Header: TBD > { Subscription-Id-Data } { Subscription-Id-Type } 4.16 Subscription-Id-Data AVP The Subscription-Id-Data AVP (AVP Code TBD) is used to identify the end-user and is of type UTF8String. The Subscription-Id-Type AVP defines which type of identifier is used. Hakala et al. expires September 2002 [Page 16] INTERNET-DRAFT Diameter Credit Control Application March, 2002 4.17 Subscription-Id-Type AVP The Subscription-Id-Type AVP (AVP Code TBD) is of type Enumerated and it is used to determine which type of identifier that is carried by the Subscription-Id AVP. The identifier can be one of the following: END_USER_MSISDN 0 The identifier is in international MSISDN format, according to the ITU-T E.164 numbering plan as defined in [E164] and [CE164]. END_USER_IMSI 1 The identifier is in international IMSI format, according to the ITU-T E.212 numbering plan as defined in [E121] and [CE121]. END_USER_SIP_URL 2 The identifier is in the form of a SIP URL as defined in [SIP]. END_USER_NAI 3 The identifier is in the form of a Network Access Identifier as defined in [NAI]. END_USER_PRIVATE 4 The Identifier is a Credit Control Server private identifier. 4.18 Unit-Type AVP The Unit-Type AVP is of type Enumerated (AVP Code TBD) and contains the type of the unit. The unit type can be one of the following: SERVICE_CREDIT_TIME 0 The unit is of type time, given in seconds. SERVICE_CREDIT_VOLUME 1 The unit is of type volume, given in kB. SERVICE_CREDIT_EVENT 2 The unit is of type event, given as a number of events. SERVICE_CREDIT_MONEY 3 The unit is of type money, given as a monetary value, whose currency SHOULD be specified by the Currency-Code AVP. 4.19 Unit-Value AVP Unit-Value AVP is of type Float64 (AVP Code TBD) and contains the granted or used Unit-Value. The value can be time in seconds, volume in kB, number of events or monetary amount depending on the given Hakala et al. expires September 2002 [Page 17] INTERNET-DRAFT Diameter Credit Control Application March, 2002 Unit-Type. If the Unit-Type AVP is set to time in the Accounting-Answer command, the Unit Value AVP specifies the granted time in seconds (measured from the moment when the services becomes active or from the previous Answer command) until a new Accounting-Request MUST be sent. If the Unit Type AVP is set to time in the Accounting-Request command, the Unit-Value AVP specifies the used time since previous report or time requested by the Credit Control Client. If the Unit-Type AVP is set to volume in the Accounting-Answer command, the Unit-Value AVP specifies the granted volume in kB (measured from the moment when the services becomes active or from the previous Answer command) until a new Accounting-Request MUST be sent. If the Unit-type AVP is set to volume in the Accounting-Request command, the Unit-Value AVP specifies the used volume since previous report or volume requested by the Credit Control Client. If the Unit-Type AVP is set to event in the Accounting-Answer command, the Unit-Value AVP specifies the granted number of events (measured from the moment when the service becomes active or from the previous Answer command) until a new Accounting-Request MUST be sent. If the Unit-type AVP is set to event in the Accounting-Request command, the Unit-Value AVP specifies the used number of events since previous report or number of events requested by the Credit Control Client. If the Unit-Type AVP is set to money in the Accounting-Answer command, the Unit-Value AVP specifies the granted monetary amount, which the end user can use until a new Accounting-Request MUST be sent. If the Unit-Type AVP is set to money in the Accounting-Request command, the Unit-Value AVP specifies the used monetary amount since previous report or the monetary amount requested by the Credit control Client. 4.20 Used-Service-Unit AVP The Used-Service-Unit AVP is of type Grouped AVP (AVP Code TBD) and contains the amount of used units since the previous Accounting- Answer command. The included Unit-Type AVP defines the type of the unit and the Unit-Value AVP contains the used amount. If the unit type is money, a Currency-Code AVP SHOULD be included. It has the following ABNF grammar: ::=< AVP Header: TBD > { Unit-Type } { Unit-Value } [ Currency-Code ] Hakala et al. expires September 2002 [Page 18] INTERNET-DRAFT Diameter Credit Control Application March, 2002 5.0 Result Code AVP values This section defines new Result-Code AVP [DIAMBASE] values that must be supported by all Diameter implementations that conform to this specification. The Accounting-Answer message includes the Result-Code AVP, which MAY indicate that an error was present in the Accounting-Request message. A rejected Accounting-Request message SHOULD cause the userÆs session to be terminated. 5.1 Transient Failure Errors that fall within the transient failures category are used to inform a peer that the request could not be satisfied at the time it was received, but MAY be able to satisfy the request in the future. DIAMETER_END_USER_SERVICE_DENIED 40XX The Credit Control Server denies the service request due to service restrictions or limitations related to the end-user, for example the end-userÆs account could not cover the requested service. 5.2 Permanent Failures Errors that fall within permanent failure category are used to inform the peer that the request failed, and should not be attempted again. DIAMETER_END_USER_NOT_FOUND 50XX The specified end user could not be found in the Credit Control Server. 6.0 AVP Occurrence Table The following table presents the AVPs defined in this document, and specifies in which Diameter messages they MAY, or MAY NOT be present. Note that AVPs that can only be present within a Grouped AVP are not represented in this table. The table uses the following symbols: 0 The AVP MUST NOT be present in the message. 0+ Zero or more instances of the AVP MAY be present in the message. 0-1 Zero or one instance of the AVP MAY be present in the message. It is considered an error if there are more than once instance of the AVP. 1 One instance of the AVP MUST be present in the message. 1+ At least one instance of the AVP MUST be present in the message. 6.1 Accounting AVP Table Hakala et al. expires September 2002 [Page 19] INTERNET-DRAFT Diameter Credit Control Application March, 2002 The table in this section is used to represent which Credit Control applications specific AVPs defined in this document are to be present in the accounting messages. +-----------+ | Command | | Code | |-----+-----+ Attribute Name | ACR | ACA | ------------------------------|-----+-----+ Abnormal-Termination-Reason | 0-1 | 0 | Accounting-Correlation-Id | 0-1 | 0 | Check-Balance-Result | 0 | 0-1 | Cost-Information | 0 | 0-1 | Event-Timestamp | 0-1 | 0 | Final-Unit-Indication | 0 | 0-1 | Granted-Service-Unit | 0 | 0+ | Requested-Action | 0-1 | 0 | Requested-Service-Unit | 0-1 | 0 | Service-Parameter-Info | 0+ | 0 | Subscription-Id | 1 | 0-1 | Used-Service-Unit | 0+ | 0 | ------------------------------|-----+-----+ 7.0 IANA Considerations This section contains the namespaces that have either been created in this specification, or the values assigned to existing namespaces managed by IANA. 7.1 Command Codes This specification uses the value 271 from the Command code namespace defined in [DIAMBASE]. 7.2 AVP Codes This specification assigns the values TBD - TBD from the AVP code namespace defined in [DIAMBASE] See section 4.0 for the assignment of the namespace in this specification. 7.3 Result-Code AVP Values This specification assigns the values 40XX and 50XX from the Result- Code AVP (AVP Code 268) value namespace defined in [DIAMBASE]. See section 5.0 for the assignment of the namespace in this specification. 7.4 Abnormal-Termination-Reason AVP As defined in Section 4.1, the Abnormal-Termination-Reason AVP (AVP Code TBD) defines the values 0-1. All remaining values are available for assignment via Designated Expert [IANA]. Hakala et al. expires September 2002 [Page 20] INTERNET-DRAFT Diameter Credit Control Application March, 2002 7.5 Check-Balance-Result AVP As defined in Section 4.3, the Check-Balance-Result AVP (AVP Code TBD) defines the values 0-1. All remaining values are available for assignment via Designated Expert [IANA]. 7.6 Requested-Action AVP As defined in Section 4.10, the Requested-Action AVP (AVP Code TBD) defines the values 0-3. All remaining values are available for assignment via Designated Expert [IANA]. 7.7 Subscription-Id-Type AVP As defined in Section 4.17, the Subscription-Id-Type AVP (AVP Code TBD) defines the values 0-4. All remaining values are available for assignment via Designated Expert [IANA]. 7.8 Unit-Type AVP As defined in Section 4.18, the Unit-Type AVP (AVP Code TBD) defines the values 0-3. All remaining values are available for assignment via Designated Expert [IANA]. 7.9 Application Identifier This specification assigns the value TBD to the application Identifier namespace defined in [DIAMBASE]. See section 1.3 for more information. 8.0 Security Considerations The security models as defined in the Diameter base protocol [DIAMBASE] applies to this application too. 9.0 References 9.1 Normative [DIAMBASE] P. Calhoun, J. Arkko, E. Guttman, G Zorn, J Loughney "Diameter Base Protocol", draft-ietf-aaa-diameter-10.txt, IETF work in progress, March 2002. [3GPPCHARG] 3rd Generation Partnership Project; Technical Specification Group Services and System Aspects, Service aspects; Charging and Billing, (release 5), 3GPP TS 22.115 v. 5.1.1, 2001-06 [SIP] M. Handley, H. Schulzrinne, E. Schooler, J. Rosenberg. "SIP: Session Initiation Protocol", Hakala et al. expires September 2002 [Page 21] INTERNET-DRAFT Diameter Credit Control Application March, 2002 draft-ietf-sip-rfc2543bis-09.txt, IETF work in progress, February 2002. [NAI] Aboba, Beadles "The Network Access Identifier." RFC 2486. January 1999. [E164] Recommendation E.164/I.331 (05/97): The International Public Telecommunication Numbering Plan. 1997. [CE164] Complement to ITU-T Recommendation E.164 (05/1997):"List of ITU-T Recommendation E.164 assigned country codes", June 2000. [E212] Recommendation E.212 (11/98): The international identification plan for mobile terminals and mobile users. 1998. [CE212] Complement to ITU-T Recommendation E.212 (11/1997):" List of mobile country or geographical area codes ", February 1999. [IANA] Narten, Alvestrand, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 2434, October 1998 9.2 Non-Normative [KEYWORDS] S.Bradner, "Key words for use in RFCs to Indicate Requirement Levelsö, BCP 14, RFC 2119, March 1997. [ACCMGMT] B.Aboba, J.Arkko, D.Harrington. "Introduction to Accounting Management", RFC 2975, October 2000. 10.0 Acknowledgement 11.0 Author's Address Harri Hakala Oy L M Ericsson Ab Joukahaisenkatu 1 20520 Turku Finland Phone: +358 2 265 3722 EMail: Harri.Hakala@lmf.ericsson.se Leena Mattila Oy L M Ericsson Ab Joukahaisenkatu 1 20520 Turku Finland Phone: +358 2 265 3731 Hakala et al. expires September 2002 [Page 22] INTERNET-DRAFT Diameter Credit Control Application March, 2002 EMail: Leena.Mattila@lmf.ericsson.se Juha-Pekka Koskinen Nokia Networks Hatanp„„nvaltatie 30 33100 Tampere Finlad Phone: +358 7180 74027 Email: juha-pekka.koskinen@nokia.com 12.0 Full Copyright Statement Copyright (C) The Internet Society (2002). All Rights Reserved. This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this docu- ment itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English. The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns. This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 13.0 Expiration Date This memo is filed as and expires in September 2002. Hakala et al. expires September 2002 [Page 23]