Harri Hakala, INTERNET-DRAFT Stefan Karlsson Category: Informational Ericsson Draft: November, 2001 Expires: April 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. It allows requesting price information of a service, rating of services, credit-reservation from the end user's account, deduction of the corresponding amount from the end user's account or deduction of already priced service from the end user's account. Diameter accounting messages with additional AVPs are used to transfer service information from the service element to the Credit Control Server. TABLE OF CONTENTS 1.0 Introduction Hakala expires April 2002 [Page 1] INTERNET-DRAFT Diameter Credit Control Application November, 2001 1.1 Requirements language 1.2 Terminology 1.3 Advertising application support 2.0 Architecture Model 3.0 Service Credit Control 3.1 One Time Event 3.1.1 Service Price Enquiry 3.1.2 Service Credit Control 3.2 Several Interrogations 3.2.1 First Interrogation 3.2.2 Interim Interrogation 3.2.3 final Interrogation 4.0 Command Codes Values 4.1 Accounting-Request (ACR) command 4.2 Accounting-Answer (ACA) Command 5.0 Accounting AVPs 5.1 Abnormal-Termination-Reason AVP 5.2 Cost AVP 5.3 Cost-Information AVP 5.4 Currency-Code AVP 5.5 Final-Unit-Indication AVP 5.6 Granted-Service-Unit AVP 5.7 Pricing-Enquiry-Indication AVP 5.8 Requested-Service-Unit AVP 5.9 Service-Parameter-Info AVP 5.10 Service-Parameter-type AVP 5.11 Service-Parameter-Value AVP 5.12 Subscription-Id AVP 5.13 Subscription-Id-Data AVP 5.14 Subscription-Id-Type AVP 5.15 Time-Stamp AVP 5.16 Used-Service-Unit AVP 5.17 Unit-Type AVP 5.18 unit-Value AVP 6.0 Result-Code AVP Values 6.1 Permanent Failures 7.0 AVP Occurrence Table 8.0 IANA Considerations 8.1 Command Codes 8.2 AVP Codes 8.3 Result-Code AVP Values 8.4 Abnormal-Termination-Reason AVP 8.5 Subscription-Id-Type AVP 8.6 Unit-Type AVP 8.7 Application Identifier 9.0 Security Considerations 10.0 References 11.0 Acknowledgements 12.0 Authors addresses 13.0 Full Copyright Statement 14.0 Expiration Date 1.0 Introduction Hakala expires April 2002 [Page 2] INTERNET-DRAFT Diameter Credit Control Application November, 2001 This Diameter application, combined with the Diameter base protocol [2], 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 [3]) 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. In the next generation wireless networks the number of services offered to the end user and the number of actors delivering these services to end users will also grow. 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 [1]. 1.2 Terminology Accounting The collection of resource consumption data for the purposes of capacity and trend analysis, cost allocation, auditing, and billing. Accounting Server The accounting server receives accounting data from the service elements and other devices and translates it into session records. Hakala expires April 2002 [Page 3] INTERNET-DRAFT Diameter Credit Control Application November, 2001 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. 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. Hakala expires April 2002 [Page 4] INTERNET-DRAFT Diameter Credit Control Application November, 2001 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, credit- reservation or money deduction from the account. The credit control protocol is the Diameter base protocol with the Diameter credit control application. 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 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 Hakala expires April 2002 [Page 5] INTERNET-DRAFT Diameter Credit Control Application November, 2001 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 MUST authenticate 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 application or other legacy authentication 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 [2] 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 [2]. 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 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 [2], is used during the authorization phase 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. The Credit Control Server does not support multiple credit sub-sessions. If the Diameter Credit Control Client requests Multiple credit sub-sessions a Result-Code AVP indicating that Hakala expires April 2002 [Page 6] INTERNET-DRAFT Diameter Credit Control Application November, 2001 sub-sessions are not supported by credit control application is returned to the client. The Diameter Credit Control Client and Server MUST support the accounting session state machine defined in the Diameter base protocol [2]. There exists two main service scenarios for credit control application: A one time event and several interrogations. The one time event is used for price enquiry and credit control, and several interrogations are used for session based credit control. 3.1 One Time Event The one time event can be used when the service element wants to know the cost of the service event without any credit-reservation. It can be used also for a credit control when one time event has occurred in the service environment. 3.1.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 and MUST include the Pricing-Enquiry-Indication AVP and 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.1.2 Service Credit Control 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 real-time credit control. The Diameter Credit Control Client MUST be sure that the requested service event execution will be successful, when this scenario is used. This Diameter application does not provide any mechanism to return already deducted money back to the end user's account. Hakala expires April 2002 [Page 7] INTERNET-DRAFT Diameter Credit Control Application November, 2001 The Diameter Credit Control Client MUST send the Accounting-Request message to the Credit Control Server before the Credit Control Client allows the service event to the end user. This credit control request contains all relevant information to the service event, and it is the only credit control request of the service. The Accounting-Record-Type is set to the value EVENT_RECORD in the Accounting-Request message. The Subscription-Id-Data AVP MUST be included to identify the account owner (End-User) in the Credit Control Server. The Time-Stamp 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 of the Granted-Service-Unit can be time, volume, event or money depending on the type of service event. The Accounting-Answer message MAY also include the Cost-Information AVP containing the total cost of the requested service. 3.2 Several Interrogations For a session based Credit Control several interrogations are needed: the first, intermediate (optional) and the final interrogation. 3.2.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 account owner (end-user) in the Credit Control Server. If the Diameter Credit Control Client knows the cost of the service event the monetary amount to be charged is included in the Requested- Hakala expires April 2002 [Page 8] INTERNET-DRAFT Diameter Credit Control Application November, 2001 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 unit. The Time-Stamp 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. The type of the Granted-Service-Unit AVP can be time, volume, event or money depending on the type of service event. Only one type of units (defined by the Unit Type AVP) MUST be used during the credit control session. It is not possible to change the unit type 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 by sending the final interrogation to the Credit Control Server. 3.2.2 Intermediate Interrogation When all the granted service units 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. 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 not have been spent upon expiration of the interim interval allocated by the Credit Control Server, the Diameter Credit Control Client MUST send a new Accounting request to the Credit Control Server. 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 account owner (end user) the in Credit Control Server. Hakala expires April 2002 [Page 9] INTERNET-DRAFT Diameter Credit Control Application November, 2001 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 type that is used in the previous message MUST be used. 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.2.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. The Used-Service-Unit AVP contains the amount of used service units since the previous answer message. 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 MAY include the Cost-Information AVP containing the total cost for the session in question. 4.0 Command-Code Values This section defines Command-Code values that MUST be supported by all Diameter implementations conforming to this specification. This application uses the Accounting-Request and Accounting-Answer commands from the Diameter base protocol [2] with the credit control application specific AVPs included. Command-Name Abbrev. Code Reference -------------------------------------------------------- Accounting-Request ACR 271 [2] Hakala expires April 2002 [Page 10] INTERNET-DRAFT Diameter Credit Control Application November, 2001 Accounting-Answer ACA 271 [2] 4.1 Accounting-Request (ACR) Command The Accounting-Request command, indicated by the Command-Code field set to 271 and the Command Flag 'R' bit set, is sent by a Diameter node, acting as a Diameter Credit Control Client in a service element, in order to exchange service event information with a Credit Control Server. In addition to the AVPs specified in [2] the following application specific AVPs are included. Message Format ::= < Diameter Header: 271, REQ, PXY > { Subscription-Id } [ Pricing-Enquiry-Indication ] [ Time-Stamp ] [ Requested-Service-Unit ] [ Used-Service-Unit ] * [ Service-Parameter-Info ] [ Abnormal-Termination-Reason ] 4.2 Accounting-Answer (ACA) Command The Accounting-Answer command, indicated by the Command-Code field set to 271 and the Command Flags 'R' bit cleared, is used to acknowledge an Accounting-Request command. The Accounting-Answer command contains the same Session-Id and MAY contain the same accounting description and usage AVPs that were sent in the Accounting-Request command. In addition to the AVPs specified in [2] the following application specific AVPs are included. Message Format ::= < Diameter Header: 271, PXY > [ Subscription-Id ] [ Granted-Service-Unit ] [ Cost-Information ] [ Final-Unit-Indication ] 5.0 Accounting AVPs This section contains AVPs that describe service event information related to a specific credit control session. 5.1 Abnormal-Termination-Reason AVP Hakala expires April 2002 [Page 11] INTERNET-DRAFT Diameter Credit Control Application November, 2001 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. 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. 5.2 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. 5.3 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 Pricing-Enquiry-Indication AVP 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 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 } 5.4 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. Hakala expires April 2002 [Page 12] INTERNET-DRAFT Diameter Credit Control Application November, 2001 5.5 Final-Unit-Indication AVP The Final-Unit-Indication AVP (AVP Code TBD) is of type Unsigned32 and indicates that an 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. 5.6 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 > { Unit-Type } { Unit-Value } [ Currency-Code ] 5.7 Pricing-Enquiry-Indication AVP The Pricing-Enquiry-Indication AVP (AVP Code TBD) is of type Unsigned32 and indicates that the Accounting-Request command 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. If included in a command, the value of this AVP is always 1. 5.8 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 > { Unit-Type } { Unit-Value } [ Currency-Code ] Hakala expires April 2002 [Page 13] INTERNET-DRAFT Diameter Credit Control Application November, 2001 5.9 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. It has the following ABNF grammar: ::=< AVP Header: TBD > { Service-Parameter-Type } { Service-Parameter-Value } 5.10 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. 5.11 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. 5.12 Subscription-Id AVP The Subscription-Id AVP (AVP Code TBD) is used to identify an end user and is of type Grouped. The Subscription-Id defines the account owner in the Credit Control Server. 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 } 5.13 Subscription-Id-Data AVP The Subscription-Id-Data AVP (AVP Code TBD) is used to identify the account owner (end-user) and is of type UTF8String. The Subscription- Id-Type AVP defines which type of identifier is used. 5.14 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. Hakala expires April 2002 [Page 14] INTERNET-DRAFT Diameter Credit Control Application November, 2001 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 [7a] and [7b]. END_USER_IMSI 1 The identifier is in international IMSI format, according to the ITU-T E.212 numbering plan as defined in [8a] and [8b]. END_USER_SIP_URL 2 The identifier is in the form of a SIP URL as defined in [5]. END_USER_NAI 3 The identifier is in the form of a Network Access Identifier as defined in [6]. END_USER_PRIVATE 4 The Identifier is a Credit Control Server private identifier. 5.15 Time-Stamp AVP The Time-Stamp AVP is of type Time (AVP Code TBD). It contains the time when the service is requested in the service element. 5.16 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 ] 5.17 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. Hakala expires April 2002 [Page 15] INTERNET-DRAFT Diameter Credit Control Application November, 2001 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. 5.18 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 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. 6.0 Result Code AVP values Hakala expires April 2002 [Page 16] INTERNET-DRAFT Diameter Credit Control Application November, 2001 This section defines new Result-Code AVP [2] values that must be supported by all Diameter implementations that conform to this specification. 6.1 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 subscription could not be found in the Credit Control Server. DIAMETER_END_USER_SERVICE_DENIED 50XX The Credit Control Server denies the service. DIAMETER_ACCOUNTING_SUB_SESSIONS_NOT_SUPPORTED 50XX This application does not support Accounting Sub-Sessions. 7.0 AVP Occurrence Table The following tables 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. 7.1 Accounting AVP Table 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 | Cost-Information | 0 | 0-1 | Final-Unit-Indication | 0 | 0-1 | Hakala expires April 2002 [Page 17] INTERNET-DRAFT Diameter Credit Control Application November, 2001 Granted-Service-Unit | 0 | 0-1 | Pricing-Enquiry-Indication | 0-1 | 0 | Requested-Service-Unit | 0-1 | 0 | Service-Parameter-Info | 0+ | 0 | Subscription-Id | 1 | 0-1 | Time-Stamp | 0-1 | 0 | Used-Service-Unit | 0-1 | 0 | ------------------------------|-----+-----+ 8.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. 8.1 Command Codes This specification used value 271 from the Command code namespace defined in [2]. 8.2 AVP Codes This specification assigns the values TBD - TBD from the AVP code namespace defined in [2] See section 5.0 for the assignment of the namespace in this specification. 8.3 Result-Code AVP Values This specification assigns the values 50XX-50XX from the Result-Code AVP (AVP Code 268) value namespace defined in [2]. See section 6.0 for the assignment of the namespace in this specification. 8.4 Abnormal-Termination-Reason AVP As defined in Section 5.1, the Abnormal-Termination-Reason AVP (AVP Code TBD) defines the values 0-1. All remaining values are available for assignment via Designated Expert [9]. 8.5 Subscription-Id-Type AVP As defined in Section 5.14, the Subscription-Id-Type AVP (AVP Code TBD) defines the values 0-4. All remaining values are available for assignment via Designated Expert [9]. 8.6 Unit-Type AVP As defined in Section 5.17, the Unit-Type AVP (AVP Code TBD) defines the values 0-3. All remaining values are available for assignment via Designated Expert [9]. 8.7 Application Identifier Hakala expires April 2002 [Page 18] INTERNET-DRAFT Diameter Credit Control Application November, 2001 This specification assigns the value TBD to the application Identifier namespace define in [1]. See section 1.3 for more information. 9.0 Security Considerations The Diameter base protocol [2] assumes that messages are secured by using either IP security, or TLS. This security model is acceptable in environments where there are no untrusted third party relay, proxy or redirect servers. 10.0 References [1] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [2] P. Calhoun, H. Akhtar, J. Arkko, E. Guttman, A. Rubens, "Diame- ter Base Protocol", draft-ietf-aaa-diameter-07.txt, IETF work in progress, July 2001. [3] 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 [4] B.Aboba, J.Arkko, D.Harrington. "Introduction to Accounting Management", RFC 2975, October 2000. [5] M. Handley, H. Schulzrinne, E. Schooler, J. Rosenberg. "SIP: Session Initiation Protocol", RFC 2543, March 1999. [6] Aboba, Beadles "The Network Access Identifier." RFC 2486. January [7a] Recommendation E.164/I.331 (05/97): The International Public Telecommunication Numbering Plan. 1997. [7b] Complement to ITU-T Recommendation E.164 (05/1997):"List of ITU-T Recommendation E.164 assigned country codes", June 2000. [8a] Recommendation E.212 (11/98): The international identification plan for mobile terminals and mobile users. 1998. [8b] Complement to ITU-T Recommendation E.212 (11/1997):" List of mobile country or geographical area codes ", February 1999. [9] Narten, Alvestrand, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 2434, October 1998 11.0 Acknowledgement 12.0 Author's Address Harri Hakala Oy L M Ericsson Ab Hakala expires April 2002 [Page 19] INTERNET-DRAFT Diameter Credit Control Application November, 2001 Joukahaisenkatu 1 20520 Turku Finland Phone: +358 2 265 3722 EMail: Harri.Hakala@lmf.ericsson.se Stefan Karlsson Ericsson Software Technology Ab Karlskrona, Sweden Phone: +46 455 395885 Email: Stefan.Karlsson@epk.ericsson.se 13.0 Full Copyright Statement Copyright (C) The Internet Society (2001). 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. 14.0 Expiration Date This memo is filed as and expires in April 2002. Hakala expires April 2002 [Page 20]