Subject: Re: [AAA-WG]: CCA: Separation of sent and received bytes in CCA R ev 2

From: "Leena Mattila (TU/LMF)" <[email-masked]>
Date: Thu, 9 Oct 2003 14:48:38 +0200

An updated proposal for the Separation of sent and received bytes in CCA:

ADD:
Section 5.x CC-Input-Octets AVP: 

   The CC-Input-Octets AVP (AVP Code TBD) is of type Unsigned64,
   and contains the number of requested, granted or used octets
   that can be/have been received from the end user.

ADD:
Section 5.x CC-Money AVP: 

   The CC-Money AVP (AVP Code TBD) is of type Grouped, and specifies
   the monetary amount in the given currency. The Currency-Code AVP
   SHOULD be included. It has the following ABNF grammar:  
         
      CC-Money ::= < AVP Header: TBD >  
                   { Unit-Value }  
                   [ Currency-Code ]

ADD:
Section 5.x CC-Output-Octets AVP: 

   The CC-Output-Octets AVP (AVP Code TBD) is of type Unsigned64,
   and contains the number of requested, granted or used octets
   that can be/have been sent to the end user.

ADD:
Section 5.x CC-Service-Specific-Units AVP: 

   The CC-Service-Specific-Units AVP (AVP Code TBD) is of type
   OctetString, and specifies the number of service specific units
   (e.g. number of events, points) given in a selected service.

ADD:
Section 5.x CC-Time AVP: 

   The CC-Time AVP (AVP Code TBD) is of type Unsigned32, and indicates
   the length of the requested, granted or used time in seconds.

ADD:
Section 5.x CC-Total-Octets AVP: 

   The CC-Total-Octets AVP (AVP Code TBD) is of type Unsigned64,
   and contains the total number of requested, granted or used
   octets regardless of the direction (sent or received).

Section 5.15 Granted-Service-Unit AVP  

FROM:
   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 Credit-Control-Request must be sent. The Unit-Value AVP contains 
   the granted units and the Unit-Type AVP defines the type of the unit.  
        
   If the Unit-Type AVP is set to time in the Credit-Control-Answer or 
   AA Answer command, the Unit Value AVP specifies the granted time in 
   seconds.  
    
   If the Unit-Type AVP is set to volume in the Credit-Control-Answer or 
   AA Answer command, the Unit-Value AVP specifies the granted volume in 
   bytes.    
            
   If the Unit-Type AVP is set to service specific in the Credit-
   Control-Answer command or AA Answer, the Unit-Value AVP specifies the 
   granted number of service specific units (e.g. number of events, 
   points) given in a selected service.   
            
   If the Unit-Type AVP is set to money in the Credit-Control-Answer or 
   AA answer command, the Unit-Value AVP specifies the granted monetary 
   amount in the given currency. If the unit type is money, a Currency-
   Code AVP SHOULD be included.   
    
   It has the following ABNF grammar:  
         
             <Granted-Service-Unit>::=< AVP Header: TBD >  
                                          { Unit-Type }  
                                          { Unit-Value }  
                                          [ Currency-Code ]

TO:
   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 Credit-Control-Request must be sent. A client is not required to 
   implement all of the unit types, and must treat unknown or unsupported 
   unit types in the answer message as an incorrect CCA answer. In that case
   the client shall terminate credit control session and indicate in the
   Termination-Cause AVP reason DIAMETER_BAD_ANSWER.

   It has the following ABNF grammar:  
         
      Granted-Service-Unit ::= < AVP Header: TBD >  
                               [ CC-Time ]
                               [ CC-Money ]  
                               [ CC-Total-Octets ]
                               [ CC-Input-Octets ]
                               [ CC-Output-Octets ]
                               [ CC-Service-Specific-Units ]

Section 5.17 Requested-Service-Unit AVP:  

FROM:
   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. A server is not required to implement all of the unit types, 
   and must treat unknown or unsupported unit types as invalid AVP 
   values.  
        
   If the Unit Type AVP is set to time in the Credit-Control-Request 
   command, the Unit-Value AVP specifies the requested time in seconds.  
     
   If the Unit-type AVP is set to volume in the Credit-Control-Request 
   command, the Unit-Value AVP specifies the requested volume in bytes.  
     
   If the Unit-type AVP is set to service specific in the Credit-
   Control-Request command, the Unit-Value AVP specifies the requested 
   number of service specific units (e.g. number of events) given in a 
   selected service.  
     
   If the Unit-Type AVP is set to money in the Credit-Control-Request 
   command, the Unit-Value AVP specifies the monetary amount in the 
   given currency. If the unit type is money, a Currency-Code AVP SHOULD 
   be included.  
        
   It has the following ABNF grammar:  
        
             <Requested-Service-Unit>::=< AVP Header: TBD >  
                                      { Unit-Type }  
                                      { Unit-Value }  
                                      [ Currency-Code ]

TO:
   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. A server is not required to implement all of
   the unit types, and must treat unknown or unsupported unit types as
   invalid AVPs.

   It has the following ABNF grammar:  
        
      Requested-Service-Unit ::= < AVP Header: TBD >
                                 [ CC-Time ]
                                 [ CC-Money ]  
                                 [ CC-Total-Octets ]
                                 [ CC-Input-Octets ]
                                 [ CC-Output-Octets ]
                                 [ CC-Service-Specific-Units ]
Section 5.24 Unit-Type AVP:

REMOVE.

Section 5.25 Unit-Value AVP:

FROM:
   Unit-Value AVP is of type Grouped (AVP Code TBD). The value can be 
   time in seconds, volume in bytes, number of service specific units or 
   monetary amount depending on the given unit type.   

TO:
   Unit-Value AVP is of type Grouped (AVP Code TBD) and specifies the
   units as decimal value.

Section 5.26 Used-Service-Unit AVP  

FROM:
   The Used-Service-Unit AVP is of type Grouped AVP (AVP Code TBD) and 
   contains the amount of used units measured from the point when the 
   service became active or, in case of interim interrogations are used 
   during the session, from the point when the previous measurement 
   ended. The included Unit-Type AVP defines the type of the unit and 
   the Unit-Value AVP contains the used amount.   
     
   If the Unit Type AVP is set to time in the Credit-Control-Request 
   command, the Unit-Value AVP specifies the used time in seconds.  
        
   If the Unit-Type AVP is set to volume in the Credit-Control-Request 
   command, the Unit-Value AVP specifies the used volume in bytes.   
     
   If the Unit-type AVP is set to service specific in the Credit-
   Control-Request command, the Unit-Value AVP specifies the used number 
   of service specific units (e.g. number of events) given in a selected 
   service.  
     
   If the Unit-Type AVP is set to money in the Credit-Control-Request 
   command, the Unit-Value AVP specifies the used monetary amount in the 
   given currency. If the unit type is money, a Currency-Code AVP SHOULD 
   be included.  
    
   It has the following ABNF grammar:
                 <Used-Service-Unit>::=< AVP Header: TBD >  
                                       { Unit-Type }  
                                       { Unit-Value }  
                                       [ Currency-Code ]

TO:
   The Used-Service-Unit AVP is of type Grouped AVP (AVP Code TBD) and 
   contains the amount of used units measured from the point when the 
   service became active or, in case of interim interrogations are used 
   during the session, from the point when the previous measurement 
   ended.

   It has the following ABNF grammar:

      Used-Service-Unit ::= < AVP Header: TBD >  
                            [ CC-Time ]
                            [ CC-Money ]  
                            [ CC-Total-Octets ]
                            [ CC-Input-Octets ]
                            [ CC-Output-Octets ]
                            [ CC-Service-Specific-Units ]

Section 5.27 Value-Digits AVP  

FROM:
   The Value-Digits AVP is of type Unsigned64 (AVP code TBD) and 
   contains the number of seconds, volume in bytes, number of service 
   specific units or monetary amount depending on the given Unit-Type 
   AVP.  

TO:
   The Value-Digits AVP is of type Unsigned64 (AVP code TBD) and 
   contains the significant digits of the number.  

Section 8.1 Initial RADIUS Access-Request:

FROM:
      - If the Granted-Service-Unit AVP with the Unit-Type Time or the 
        Validity-Time AVP is returned by the credit control server, 
        then the smallest value should be included in the RADIUS VSA 
        Duration-Quota.
      - If the Granted-Service-Unit AVP with the Unit-Type Volume is 
        returned by the credit-control server, then the volume should 
        be included in the RADIUS VSA Volume-Quota.
TO:
      - If the Granted-Service-Unit AVP including the CC-Time AVP or
        the Validity-Time AVP is returned by the credit control server, 
        then the smallest value should be included in the RADIUS VSA 
        Duration-Quota.
      - If the Granted-Service-Unit AVP including the CC-Total-Octets
        AVP is returned by the credit-control server, then the volume
        should be included in the RADIUS VSA Volume-Quota.

Section 8.2 Subsequent RADIUS Access-Request message:

FROM:
     - If the RADIUS Access-Request message contains the RADIUS VSA 
       Volume-Quota, the value shall be included in the Used-Service-
       Unit AVP and Unit-Type shall be set to Volume.
     - If the RADIUS Access-Request message contains RADIUS VSA Time-
       Quota, the value shall be included in the Used-Service-Unit AVP 
       and the Unit-Type shall be set to Time.
TO:
     - If the RADIUS Access-Request message contains the RADIUS VSA 
       Volume-Quota, the value shall be included in the CC-Total-
       Octets AVP within the Used-Service-Unit AVP.
     - If the RADIUS Access-Request message contains RADIUS VSA Time-
       Quota, the value shall be included in the CC-Time AVP within
       the Used-Service-Unit AVP.

FROM:
     - If RADIUS VSA Volume-Quota, the value shall be included in the 
       Used-Service-Unit AVP and Unit-Type shall be set to Volume. 
     - If RADIUS VSA Time-Quota, the value shall be included in the 
       Used-Service-Unit AVP and the Unit-Type shall be set to Time.
TO:
     - If RADIUS VSA Volume-Quota is present, the value shall be
       included in the Used-Service-Unit AVP as CC-Total-Octets. 
     - If RADIUS VSA Time-Quota is present, the value shall be included
       in the Used-Service-Unit AVP as CC-Time.

Section 9.12 Unit-Type AVP: 
        
REMOVE.

/Leena
> -----Original Message-----
> From: Jari Arkko [mailto:[email-masked]]
> Sent: 7. lokakuuta 2003 18:51
> To: Leena Mattila (TU/LMF)
> Cc: [email-masked]'; [email-masked]'
> Subject: Re: [AAA-WG]: CCA: Separation of sent and received 
> bytes in CCA
> 
> 
> Leena Mattila (TU/LMF) wrote:
> 
> > As a mixture of general and specific AVPs, no. But after 
> thinking this over and taking into account your discussion in 
> the other thread about keeping CCA in line with 
> RADIUS/DIAMETER NASREQ, maybe the general definition should 
> be abandoned and the units should be defined as follows instead:
> > <XXX-Service-Unit>::=< AVP Header: TBD > 
> >                          [ CC-Time ] 
> >                          [ CC-Money ] (grouped, consists of 
> monetary amount and currency code)
> >                          [ CC-Total-Octets ]
> >                          [ CC-Input-Octets ]
> >                          [ CC-Output-Octets ]
> >                          [ CC-Service-Specific-Units ]
> >                          *AVP
> > where XXX stands for Used, Requested or Granted.
> 
> This would work for me.
> 
> --Jari