Harri Hakala, Ericsson INTERNET-DRAFT October, 2001 Category: Informational Draft: Expires: 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. It allows asking price of the service, rating of services, deduction of the corresponding amount from the End User account or deduction of already priced service from the End User account. Diameter Accounting messages with additional AVPs is used to transfer service information from the Service Element to the Credit Control Server. TABLE OF CONTENTS 1.0 Introduction 1.1 Requirements language 1.2 Terminology 1.3 Advertising application support 2.0 Architecture Model Hakala expires March 2002 [Page 1] INTERNET-DRAFT Diameter Credit Control Application October, 2001 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 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. Hakala expires March 2002 [Page 2] INTERNET-DRAFT Diameter Credit Control Application October, 2001 The next generation wireless networks specifies (e.g. 3G Charging and Billing requirements [3]) the 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 exist also requirements 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 charges prior to execution of that Service Event. All the chargeable events related to a specific account must be prevented to the End User when the credit of that account is exhausted or expired. In the next generation 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 accounting information in the service environment from the Service Element to the Credit Control Server to minimize the financial risk. This Accounting protocol is not only restricted to be used in the service environment (it can be used also for example 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 translated it into session records. It acts as an interface to back-end rating, billing, Credit Control Server and operations support systems. Billing The act of preparing an invoice. Charging In the Telecom world charging is almost synonym with accounting. A Hakala expires March 2002 [Page 3] INTERNET-DRAFT Diameter Credit Control Application October, 2001 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 with an account and controls or monitors the charges, related to the Service usage. A process of checking if credit is available, pre- reservation, reduction of credit from the End User account when service is completed and refunding of pre-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 one that interacts with Credit Control Server. Diameter Credit Control Server A Diameter Credit Control server is one that handles Credit Control request. Rating The act of determining the cost of the Service Event. Real-time accounting When the accounting process is performed as part of rendering a service. Real-time accounting gives the possibility to price and perform credit control for the Service Event before it is delivered to the End User without any noticeable delay. 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 End-User. 1.3 Advertising application support Hakala expires March 2002 [Page 4] INTERNET-DRAFT Diameter Credit Control Application October, 2001 Diameter nodes conforming to this specification MAY advertise support by including the value of TBD (X) in the Auth-Application-Id or 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. If the Real-time Accounting 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. Alternately, the Service Element can deliver the Service Event Information to the Accounting Server, which MAY contact the Credit Control Server. The Credit Control Server and Accounting Server in this architecture model are logical entities. The real configuration MAY combine them into a single host. Accounting +------------+ +-----------+ Protocol +--------------+ | Service |<----->| Service |------------->| Accounting | | Consumer | +-->| Element |------+ | Server | +------------+ | +-----------+ | +--------------+ | | | +------------+ | | V | Service |<--+ | +--------------+ | Consumer | +------>|Credit Control| +------------+ Credit Control | Server | Protocol +--------------+ 3.0 Service Control When End User request a service the request is forwarded to a Service Element in 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 MUST 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 Specifications or other legacy authentication methods can be used. The Diameter Credit Control Client in the Service Element gets information from the authorization server (if contacted) regarding the way accounting data shall be forwarded (accounting protocol or Hakala expires March 2002 [Page 5] INTERNET-DRAFT Diameter Credit Control Application October, 2001 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. 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 interim interval to be allowed to be used for the consuming of the granted service unit. 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 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 an error has occurred 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 exist 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 Hakala expires March 2002 [Page 6] INTERNET-DRAFT Diameter Credit Control Application October, 2001 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 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 know the exact price of a Service Event before requesting the Service Event. 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 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. 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 the information relevant to the Service Event, and 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 Hakala expires March 2002 [Page 7] INTERNET-DRAFT Diameter Credit Control Application October, 2001 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 refers always 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 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- Service-Unit AVP. If the Diameter Credit Control Client does not know the cost of the Service Event, then the Service-Parameter-Info AVP contains the Service Event information to be rated by the Credit Control Server. The Service-Parameter-Info AVP refers always 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. Hakala expires March 2002 [Page 8] INTERNET-DRAFT Diameter Credit Control Application October, 2001 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 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 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 would have not 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 is set to the value INTERIM_RECORD in the intermediate request message. The Subscription-Id-Data AVP MUST be also included in the intermediate message to identify the account owner (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 type that is used in 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, returning the granted service unit 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 is set to the value INTERIM_RECORD MAY include the Cost-Information AVP Hakala expires March 2002 [Page 9] INTERNET-DRAFT Diameter Credit Control Application October, 2001 containing the accumulated cost for this session without taking into account any credit-reservation. There MAY be several intermediate interrogations within a session. 3.2.3 Final Interrogation When the End User finishes the Service Event or when all the granted units are used (after Final-Unit-Indication AVP is received from Credit Control Server), the Diameter Credit Control Client MUST send a final Accounting-Request message to the Credit Control Server. The Accounting-Record-Type 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 is 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] 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 this application specific AVPs are included. Message Format Hakala expires March 2002 [Page 10] INTERNET-DRAFT Diameter Credit Control Application October, 2001 ::= < 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 contains 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 this 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 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 Hakala expires March 2002 [Page 11] INTERNET-DRAFT Diameter Credit Control Application October, 2001 The Cost AVP (AVP Code TBD) is of type Float64 and contains the cost or price of the service. 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 Cost AVP contains the cost or price of the Service Event and the Currency-Code specifies in which currency the price was given. When the Pricing-Enquiry-Indication AVP is included in the Accounting Request command this AVP in the Accounting-Answer command contains the price estimation of the requested service. 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 into account any credit-reservation. 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. 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 Hakala expires March 2002 [Page 12] INTERNET-DRAFT Diameter Credit Control Application October, 2001 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 only action asked for is the price of a specified Service Event. 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 units that the Diameter Credit Control Client in a Service Element has requested. 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.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 Hakala expires March 2002 [Page 13] INTERNET-DRAFT Diameter Credit Control Application October, 2001 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. 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. It contains a Subscription-Id- Data AVP containing the actual identifier and a Subscription-Id-Type AVP saying which type of identifier the Subscription-Id-Data AVP contains. 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 is used to inform the host which of the different identifier types 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 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 [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 Hakala expires March 2002 [Page 14] INTERNET-DRAFT Diameter Credit Control Application October, 2001 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 a 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. The Unit-Type AVP defines the type of the unit and the Unit-Value AVP contains the used unit value. 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. SERVICE_CREDIT_VOLUME 1 The unit is of type volume, given in Kbytes. 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 is specified by the Currency-Code AVP. 5.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 bytes, number of events or monetary amount depending on the given Hakala expires March 2002 [Page 15] INTERNET-DRAFT Diameter Credit Control Application October, 2001 Unit-Type. The Time Unit-Type in the Answer command specifies the 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. The Time type in the Request command specifies the elapsed time since previous report or the whole elapsed session time. The Volume Unit-Type in the Answer command specifies the volume in Kbytes (measured from the moment when the services becomes active or from the previous Answer command) until a new Accounting-Request MUST be sent. The Volume type in the Request command specifies the used volume since previous report or the whole session volume. The Event Unit-Type in the Answer command specifies the 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. The Event type in the Request command specifies the number of events since previous report or the number of events during the whole session. The Money Unit-Type in the Answer command specifies the monetary amount, which the End User can use until a new Accounting-Request MUST be sent. The Money Type in the Request command specifies the monetary amount since previous report or the monetary amount during the whole session. 6.0 Result Code AVP values This section defines new Result-Code [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 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 Hakala expires March 2002 [Page 16] INTERNET-DRAFT Diameter Credit Control Application October, 2001 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 | 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. Hakala expires March 2002 [Page 17] INTERNET-DRAFT Diameter Credit Control Application October, 2001 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 [1]. 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 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. Hakala expires March 2002 [Page 18] INTERNET-DRAFT Diameter Credit Control Application October, 2001 [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 Joukahaisenkatu 1 20520 Turku Finland Phone: +358 2 265 3722 EMail: Harri.Hakala@lmf.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 Hakala expires March 2002 [Page 19] INTERNET-DRAFT Diameter Credit Control Application October, 2001 "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 March 2002. Hakala expires March 2002 [Page 20]