Tech-invite3GPPspaceIETFspace
96959493929190898887868584838281807978777675747372717069686766656463626160595857565554535251504948474645444342414039383736353433323130292827262524232221201918171615141312111009080706050403020100
in Index   Prev   Next

RFC 8506

Diameter Credit-Control Application

Pages: 130
Proposed Standard
Obsoletes:  4006
Part 5 of 9 – Pages 50 to 65
First   Prev   Next

Top   ToC   RFC8506 - Page 50   prevText

7. Credit-Control Application State Machines

This section defines five credit-control application state machines. The first four state machines are to be observed by credit-control clients. The first state machine describes session-based credit-control where the first interrogation is executed as part of the authorization/ authentication process. The second state machine describes session-based credit-control where the first interrogation is executed after the authorization/authentication process. The requirements regarding what has to be supported for these two state machines are discussed in Section 5.2. The third state machine describes session-based credit-control for the intermediate and final interrogations. The fourth state machine describes event-based credit-control. These two state machines are to be observed by all implementations that conform to this specification. The fifth state machine describes the credit-control session from a credit-control server's perspective. Any event not listed in the state machines MUST be considered an error condition, and a corresponding answer, if applicable, MUST be returned to the originator of the message. In Tables 3, 4, and 5, the event "failure to send" means that the Diameter Credit-Control client is unable to communicate with the desired destination or, if a failover procedure is supported, with a possibly defined alternative destination (e.g., the request times out and the Answer message is not received). This could be due to (1) the peer being down or (2) a physical link failure in the path to or from the credit-control server. The event "temporary error" means that the Diameter Credit-Control client received a protocol error notification (DIAMETER_TOO_BUSY, DIAMETER_UNABLE_TO_DELIVER, or DIAMETER_LOOP_DETECTED) in the Result-Code AVP of the Credit-Control-Answer command. This type of notification may ultimately be received in answer to the retransmitted request to a defined alternative destination, if failover is supported.
Top   ToC   RFC8506 - Page 51
   The event "failed answer" means that the Diameter Credit-Control
   client received a non-transient failure (permanent failure)
   notification in the Credit-Control-Answer command.  This type of
   notification may ultimately be received in answer to the
   retransmitted request to a defined alternative destination, if
   failover is supported.

   The action "store request" means that a request is stored in
   credit-control application-level non-volatile storage.

   The event "not successfully processed" means that the credit-control
   server could not process the message, e.g., due to an unknown
   end user, an account being empty, or errors defined in [RFC6733].

   The event "user service terminated" can be triggered for various
   reasons, e.g., normal user termination, network failure, and ASR
   (Abort-Session-Request).  The Termination-Cause AVP contains
   information about the reason for termination, as specified in
   [RFC6733].

   The Tx timer, which is used to control the waiting time in the
   credit-control client in the Pending state, is stopped upon exit of
   the Pending state.  The stopping of the Tx timer is omitted in the
   state machine when the new state is Idle, as moving to Idle state
   implies the clearing of the session and all the variables associated
   to it.

   The states PendingI, PendingU, PendingT, PendingE, and PendingB stand
   for pending states to wait for an answer to a credit-control request
   related to Initial, Update, Termination, Event, or Buffered request,
   respectively.

   In Table 2, failover to a secondary server upon "temporary error" or
   "failure to send" is not explicitly described.  However, moving an
   ongoing credit-control message stream to an alternative server is
   possible if the CC-Session-Failover AVP is set to FAILOVER_SUPPORTED,
   as described in Section 5.7.

   Resending a credit-control event to an alternative server is
   supported as described in Section 6.5.
Top   ToC   RFC8506 - Page 52
   +----------+-------------------------------+-------------+----------+
   | State    | Event                         | Action      | New      |
   |          |                               |             | State    |
   +----------+-------------------------------+-------------+----------+
   | Idle     | Client or device requests     | Send        | PendingI |
   |          | access/service                | AA-Request  |          |
   |          |                               | with added  |          |
   |          |                               | CC AVPs,    |          |
   |          |                               | start Tx    |          |
   |          |                               | timer       |          |
   |          |                               |             |          |
   | PendingI | Successful answer to          | Grant       | Open     |
   |          | AA-Request received           | service to  |          |
   |          |                               | end user,   |          |
   |          |                               | stop Tx     |          |
   |          |                               | timer       |          |
   |          |                               |             |          |
   | PendingI | Tx timer expired              | Disconnect  | Idle     |
   |          |                               | user/dev    |          |
   |          |                               |             |          |
   | PendingI | Failed AA-Answer received     | Disconnect  | Idle     |
   |          |                               | user/dev    |          |
   |          |                               |             |          |
   | PendingI | AA-Answer received with       | Grant       | Idle     |
   |          | Result-Code equal to          | service to  |          |
   |          | CREDIT_CONTROL_NOT_APPLICABLE | end user    |          |
   |          |                               |             |          |
   | PendingI | User service terminated       | Queue       | PendingI |
   |          |                               | termination |          |
   |          |                               | event       |          |
   |          |                               |             |          |
   | PendingI | Change in rating condition    | Queue       | PendingI |
   |          |                               | changed     |          |
   |          |                               | rating      |          |
   |          |                               | condition   |          |
   |          |                               | event       |          |
   +----------+-------------------------------+-------------+----------+

            Table 2: Session-Based Client State Machine for the
                    First Interrogation with AA-Request
Top   ToC   RFC8506 - Page 53
   +----------+-------------------------------+-------------+----------+
   | State    | Event                         | Action      | New      |
   |          |                               |             | State    |
   +----------+-------------------------------+-------------+----------+
   | Idle     | Client or device requests     | Send CC     | PendingI |
   |          | access/service                | initial     |          |
   |          |                               | req., start |          |
   |          |                               | Tx timer    |          |
   |          |                               |             |          |
   | PendingI | Successful CC initial answer  | Stop Tx     | Open     |
   |          | received                      | timer       |          |
   |          |                               |             |          |
   | PendingI | Failure to send, or temporary | Grant       | Idle     |
   |          | error and CCFH equal to       | service to  |          |
   |          | CONTINUE                      | end user    |          |
   |          |                               |             |          |
   | PendingI | Failure to send, or temporary | Terminate   | Idle     |
   |          | error and CCFH equal to       | end user's  |          |
   |          | TERMINATE or to               | service     |          |
   |          | RETRY_AND_TERMINATE           |             |          |
   |          |                               |             |          |
   | PendingI | Tx timer expired and CCFH     | Terminate   | Idle     |
   |          | equal to TERMINATE            | end user's  |          |
   |          |                               | service     |          |
   |          |                               |             |          |
   | PendingI | Tx timer expired and CCFH     | Grant       | PendingI |
   |          | equal to CONTINUE or to       | service to  |          |
   |          | RETRY_AND_TERMINATE           | end user    |          |
   |          |                               |             |          |
   | PendingI | CC initial answer received    | Terminate   | Idle     |
   |          | with Result-Code equal to     | end user's  |          |
   |          | END_USER_SERVICE_DENIED or to | service     |          |
   |          | USER_UNKNOWN                  |             |          |
   |          |                               |             |          |
   | PendingI | CC initial answer received    | Grant       | Idle     |
   |          | with Result-Code equal to     | service to  |          |
   |          | CREDIT_CONTROL_NOT_APPLICABLE | end user    |          |
   |          |                               |             |          |
   | PendingI | Failed CC initial answer      | Grant       | Idle     |
   |          | received and CCFH equal to    | service to  |          |
   |          | CONTINUE                      | end user    |          |
   |          |                               |             |          |
   | PendingI | Failed CC initial answer      | Terminate   | Idle     |
   |          | received and CCFH equal to    | end user's  |          |
   |          | TERMINATE or to               | service     |          |
   |          | RETRY_AND_TERMINATE           |             |          |
   |          |                               |             |          |
Top   ToC   RFC8506 - Page 54
   | PendingI | User service terminated       | Queue       | PendingI |
   |          |                               | termination |          |
   |          |                               | event       |          |
   |          |                               |             |          |
   | PendingI | Change in rating condition    | Queue       | PendingI |
   |          |                               | changed     |          |
   |          |                               | rating      |          |
   |          |                               | condition   |          |
   |          |                               | event       |          |
   +----------+-------------------------------+-------------+----------+

            Table 3: Session-Based Client State Machine for the
                       First Interrogation with CCR


   +----------+-------------------------------+-------------+----------+
   | State    | Event                         | Action      | New      |
   |          |                               |             | State    |
   +----------+-------------------------------+-------------+----------+
   | Open     | Granted unit elapses and no   | Send CC     | PendingU |
   |          | final-unit indication         | update      |          |
   |          | received                      | req., start |          |
   |          |                               | Tx timer    |          |
   |          |                               |             |          |
   | Open     | Granted unit elapses and      | Terminate   | PendingT |
   |          | final unit action equal to    | end user's  |          |
   |          | TERMINATE received            | service,    |          |
   |          |                               | send CC     |          |
   |          |                               | termination |          |
   |          |                               | req.        |          |
   |          |                               |             |          |
   | Open     | Change in rating condition in | Send CC     | PendingU |
   |          | queue                         | update      |          |
   |          |                               | req., start |          |
   |          |                               | Tx timer    |          |
   |          |                               |             |          |
   | Open     | Service terminated in queue   | Send CC     | PendingT |
   |          |                               | termination |          |
   |          |                               | req.        |          |
   |          |                               |             |          |
   | Open     | Change in rating condition or | Send CC     | PendingU |
   |          | Validity-Time elapses         | update      |          |
   |          |                               | req., start |          |
   |          |                               | Tx timer    |          |
   |          |                               |             |          |
   | Open     | User service terminated       | Send CC     | PendingT |
   |          |                               | termination |          |
   |          |                               | req.        |          |
Top   ToC   RFC8506 - Page 55
   |          |                               |             |          |
   | Open     | RAR received                  | Send RAA    | PendingU |
   |          |                               | followed by |          |
   |          |                               | CC update   |          |
   |          |                               | req., start |          |
   |          |                               | Tx timer    |          |
   |          |                               |             |          |
   | PendingU | Successful CC update answer   | Stop Tx     | Open     |
   |          | received                      | timer       |          |
   |          |                               |             |          |
   | PendingU | Failure to send, or temporary | Grant       | Idle     |
   |          | error and CCFH equal to       | service to  |          |
   |          | CONTINUE                      | end user    |          |
   |          |                               |             |          |
   | PendingU | Failure to send, or temporary | Terminate   | Idle     |
   |          | error and CCFH equal to       | end user's  |          |
   |          | TERMINATE or to               | service     |          |
   |          | RETRY_AND_TERMINATE           |             |          |
   |          |                               |             |          |
   | PendingU | Tx timer expired and CCFH     | Terminate   | Idle     |
   |          | equal to TERMINATE            | end user's  |          |
   |          |                               | service     |          |
   |          |                               |             |          |
   | PendingU | Tx timer expired and CCFH     | Grant       | PendingU |
   |          | equal to CONTINUE or to       | service to  |          |
   |          | RETRY_AND_TERMINATE           | end user    |          |
   |          |                               |             |          |
   | PendingU | CC update answer received     | Terminate   | Idle     |
   |          | with Result-Code equal to     | end user's  |          |
   |          | END_USER_SERVICE_DENIED       | service     |          |
   |          |                               |             |          |
   | PendingU | CC update answer received     | Grant       | Idle     |
   |          | with Result-Code equal to     | service to  |          |
   |          | CREDIT_CONTROL_NOT_APPLICABLE | end user    |          |
   |          |                               |             |          |
   | PendingU | Failed CC update answer       | Grant       | Idle     |
   |          | received and CCFH equal to    | service to  |          |
   |          | CONTINUE                      | end user    |          |
   |          |                               |             |          |
   | PendingU | Failed CC update answer       | Terminate   | Idle     |
   |          | received and CCFH equal to    | end user's  |          |
   |          | TERMINATE or to               | service     |          |
   |          | RETRY_AND_TERMINATE           |             |          |
   |          |                               |             |          |
   | PendingU | User service terminated       | Queue       | PendingU |
   |          |                               | termination |          |
   |          |                               | event       |          |
   |          |                               |             |          |
Top   ToC   RFC8506 - Page 56
   | PendingU | Change in rating condition    | Queue       | PendingU |
   |          |                               | changed     |          |
   |          |                               | rating      |          |
   |          |                               | condition   |          |
   |          |                               | event       |          |
   |          |                               |             |          |
   | PendingU | RAR received                  | Send RAA    | PendingU |
   |          |                               |             |          |
   | PendingT | Successful CC termination     |             | Idle     |
   |          | answer received               |             |          |
   |          |                               |             |          |
   | PendingT | Failure to send, temporary    |             | Idle     |
   |          | error, or failed answer       |             |          |
   |          |                               |             |          |
   | PendingT | Change in rating condition    |             | PendingT |
   +----------+-------------------------------+-------------+----------+

     Table 4: Session-Based Client State Machine for Intermediate and
                           Final Interrogations


   +----------+--------------------------------+------------+----------+
   | State    | Event                          | Action     | New      |
   |          |                                |            | State    |
   +----------+--------------------------------+------------+----------+
   | Idle     | Client or device requests a    | Send CC    | PendingE |
   |          | one-time service               | event      |          |
   |          |                                | req.,      |          |
   |          |                                | start Tx   |          |
   |          |                                | timer      |          |
   |          |                                |            |          |
   | Idle     | Request in storage             | Send       | PendingB |
   |          |                                | stored     |          |
   |          |                                | request    |          |
   |          |                                |            |          |
   | PendingE | Successful CC event answer     | Grant      | Idle     |
   |          | received                       | service to |          |
   |          |                                | end user   |          |
   |          |                                |            |          |
   | PendingE | Failure to send, temporary     | Indicate   | Idle     |
   |          | error, failed CC event answer  | service    |          |
   |          | received, or Tx timer expired; | error      |          |
   |          | requested action CHECK_BALANCE |            |          |
   |          | or PRICE_ENQUIRY               |            |          |
   |          |                                |            |          |
Top   ToC   RFC8506 - Page 57
   | PendingE | CC event answer received with  | Terminate  | Idle     |
   |          | Result-Code equal to           | end user's |          |
   |          | END_USER_SERVICE_DENIED or to  | service    |          |
   |          | USER_UNKNOWN and Tx timer      |            |          |
   |          | running                        |            |          |
   |          |                                |            |          |
   | PendingE | CC event answer received with  | Grant      | Idle     |
   |          | Result-Code equal to           | service to |          |
   |          | CREDIT_CONTROL_NOT_APPLICABLE; | end user   |          |
   |          | requested action               |            |          |
   |          | DIRECT_DEBITING                |            |          |
   |          |                                |            |          |
   | PendingE | Failure to send, temporary     | Grant      | Idle     |
   |          | error, or failed CC event      | service to |          |
   |          | answer received; requested     | end user   |          |
   |          | action DIRECT_DEBITING; DDFH   |            |          |
   |          | equal to CONTINUE              |            |          |
   |          |                                |            |          |
   | PendingE | Failed CC event answer         | Terminate  | Idle     |
   |          | received or temporary error;   | end user's |          |
   |          | requested action               | service    |          |
   |          | DIRECT_DEBITING; DDFH equal to |            |          |
   |          | TERMINATE_OR_BUFFER and Tx     |            |          |
   |          | timer running                  |            |          |
   |          |                                |            |          |
   | PendingE | Tx timer expired; requested    | Grant      | PendingE |
   |          | action DIRECT_DEBITING         | service to |          |
   |          |                                | end user   |          |
   |          |                                |            |          |
   | PendingE | Failure to send; requested     | Store      | Idle     |
   |          | action DIRECT_DEBITING; DDFH   | request    |          |
   |          | equal to TERMINATE_OR_BUFFER   | with       |          |
   |          |                                | T flag     |          |
   |          |                                |            |          |
   | PendingE | Temporary error; requested     | Store      | Idle     |
   |          | action DIRECT_DEBITING; DDFH   | request    |          |
   |          | equal to TERMINATE_OR_BUFFER;  |            |          |
   |          | Tx timer expired               |            |          |
   |          |                                |            |          |
   | PendingE | Failed answer or answer        |            | Idle     |
   |          | received with Result-Code      |            |          |
   |          | equal to END_USER_SERVICE      |            |          |
   |          | DENIED or to USER_UNKNOWN;     |            |          |
   |          | requested action               |            |          |
   |          | DIRECT_DEBITING; Tx timer      |            |          |
   |          | expired                        |            |          |
   |          |                                |            |          |
Top   ToC   RFC8506 - Page 58
   | PendingE | Failed CC event answer         | Indicate   | Idle     |
   |          | received; requested action     | service    |          |
   |          | REFUND_ACCOUNT                 | error and  |          |
   |          |                                | delete     |          |
   |          |                                | request    |          |
   |          |                                |            |          |
   | PendingE | Failure to send or Tx timer    | Store      | Idle     |
   |          | expired; requested action      | request    |          |
   |          | REFUND_ACCOUNT                 | with       |          |
   |          |                                | T flag     |          |
   |          |                                |            |          |
   | PendingE | Temporary error; requested     | Store      | Idle     |
   |          | action REFUND_ACCOUNT          | request    |          |
   |          |                                |            |          |
   | PendingB | Successful CC answer received  | Delete     | Idle     |
   |          |                                | request    |          |
   |          |                                |            |          |
   | PendingB | Failed CC answer received      | Delete     | Idle     |
   |          |                                | request    |          |
   |          |                                |            |          |
   | PendingB | Failure to send or temporary   |            | Idle     |
   |          | error                          |            |          |
   +----------+--------------------------------+------------+----------+

               Table 5: One-Time Event Client State Machine


   +-------+------------------------+--------------------------+-------+
   | State | Event                  | Action                   | New   |
   |       |                        |                          | State |
   +-------+------------------------+--------------------------+-------+
   | Idle  | CC initial request     | Send CC initial answer,  | Open  |
   |       | received and           | reserve units, start Tcc |       |
   |       | successfully processed |                          |       |
   |       |                        |                          |       |
   | Idle  | CC initial request     | Send CC initial answer   | Idle  |
   |       | received but not       | with Result-Code !=      |       |
   |       | successfully processed | SUCCESS                  |       |
   |       |                        |                          |       |
   | Idle  | CC event request       | Send CC event answer     | Idle  |
   |       | received and           |                          |       |
   |       | successfully processed |                          |       |
   |       |                        |                          |       |
   | Idle  | CC event request       | Send CC event answer     | Idle  |
   |       | received but not       | with Result-Code !=      |       |
   |       | successfully processed | SUCCESS                  |       |
   |       |                        |                          |       |
Top   ToC   RFC8506 - Page 59
   | Open  | CC update request      | Send CC update answer,   | Open  |
   |       | received and           | debit used units,        |       |
   |       | successfully processed | reserve new units,       |       |
   |       |                        | restart Tcc              |       |
   |       |                        |                          |       |
   | Open  | CC update request      | Send CC update answer    | Idle  |
   |       | received but not       | with Result-Code !=      |       |
   |       | successfully processed | SUCCESS, debit used      |       |
   |       |                        | units                    |       |
   |       |                        |                          |       |
   | Open  | CC termination request | Send CC termin. answer,  | Idle  |
   |       | received and           | stop Tcc, debit used     |       |
   |       | successfully processed | units                    |       |
   |       |                        |                          |       |
   | Open  | CC termination request | Send CC termin. answer   | Idle  |
   |       | received but not       | with Result-Code !=      |       |
   |       | successfully processed | SUCCESS, debit used      |       |
   |       |                        | units                    |       |
   |       |                        |                          |       |
   | Open  | Session supervision    | Release reserved units   | Idle  |
   |       | timer Tcc expired      |                          |       |
   +-------+------------------------+--------------------------+-------+

        Table 6: Session-Based and Event-Based Server State Machine

8. Credit-Control AVPs

This section defines the Credit-Control AVPs that are specific to the Diameter Credit-Control application and that MAY be included in the Diameter Credit-Control messages. The AVPs defined in this section MAY also be included in authorization commands defined in authorization-specific applications, such as [RFC7155] and [RFC4004], if the first interrogation is performed as part of the authorization/ authentication process, as described in Section 5.2. The Diameter AVP rules are defined in [RFC6733], Section 4. These AVP rules are observed in AVPs defined in this section. The following table describes the Diameter AVPs defined in the credit-control application, their AVP Code values, types, and possible flag values. The AVP Flag rules ('M', 'V') are explained in [RFC6733], Section 4.1.
Top   ToC   RFC8506 - Page 60
                                                       +---------------+
                                                       |AVP Flag Rules |
                                   Defined             |----+-----+----|
                             AVP   in                  |    |     |MUST|
   Attribute Name            Code  Section Data Type   |MUST| MAY |NOT |
   ----------------------------------------------------|----+-----+----|
   CC-Correlation-Id         411   8.1     OctetString |    |  M  |  V |
   CC-Input-Octets           412   8.24    Unsigned64  | M  |     |  V |
   CC-Money                  413   8.22    Grouped     | M  |     |  V |
   CC-Output-Octets          414   8.25    Unsigned64  | M  |     |  V |
   CC-Request-Number         415   8.2     Unsigned32  | M  |     |  V |
   CC-Request-Type           416   8.3     Enumerated  | M  |     |  V |
   CC-Service-Specific-      417   8.26    Unsigned64  | M  |     |  V |
     Units                                             |    |     |    |
   CC-Session-Failover       418   8.4     Enumerated  | M  |     |  V |
   CC-Sub-Session-Id         419   8.5     Unsigned64  | M  |     |  V |
   CC-Time                   420   8.21    Unsigned32  | M  |     |  V |
   CC-Total-Octets           421   8.23    Unsigned64  | M  |     |  V |
   CC-Unit-Type              454   8.32    Enumerated  | M  |     |  V |
   Check-Balance-Result      422   8.6     Enumerated  | M  |     |  V |
   Cost-Information          423   8.7     Grouped     | M  |     |  V |
   Cost-Unit                 424   8.12    UTF8String  | M  |     |  V |
   Credit-Control            426   8.13    Enumerated  | M  |     |  V |
   Credit-Control-           427   8.14    Enumerated  | M  |     |  V |
     Failure-Handling                                  |    |     |    |
   Currency-Code             425   8.11    Unsigned32  | M  |     |  V |
   Direct-Debiting-          428   8.15    Enumerated  | M  |     |  V |
     Failure-Handling                                  |    |     |    |
   Exponent                  429   8.9     Integer32   | M  |     |  V |
   Final-Unit-Action         449   8.35    Enumerated  | M  |     |  V |
   Final-Unit-Indication     430   8.34    Grouped     | M  |     |  V |
   QoS-Final-Unit-Indication 669   8.68    Grouped     |    |  M  |  V |
   Granted-Service-Unit      431   8.17    Grouped     | M  |     |  V |
   G-S-U-Pool-Identifier     453   8.31    Unsigned32  | M  |     |  V |
   G-S-U-Pool-Reference      457   8.30    Grouped     | M  |     |  V |
   Multiple-Services-        456   8.16    Grouped     | M  |     |  V |
     Credit-Control                                    |    |     |    |
   Multiple-Services-        455   8.40    Enumerated  | M  |     |  V |
     Indicator                                         |    |     |    |
   Rating-Group              432   8.29    Unsigned32  | M  |     |  V |
   Redirect-Address-Type     433   8.38    Enumerated  | M  |     |  V |
   Redirect-Server           434   8.37    Grouped     | M  |     |  V |
   Redirect-Server-Address   435   8.39    UTF8String  | M  |     |  V |
   Redirect-Server-Extension 665   8.64    Grouped     |    |  M  |  V |
   Redirect-Address-         666   8.65    Address     |    |  M  |  V |
     IPAddress                                         |    |     |    |
   Redirect-Address-URL      667   8.66    UTF8String  |    |  M  |  V |
   Redirect-Address-SIP-URI  668   8.67    UTF8String  |    |  M  |  V |
Top   ToC   RFC8506 - Page 61
   Requested-Action          436   8.41    Enumerated  | M  |     |  V |
   Requested-Service-Unit    437   8.18    Grouped     | M  |     |  V |
   Restriction-Filter-Rule   438   8.36    IPFilterRule| M  |     |  V |
   Service-Context-Id        461   8.42    UTF8String  | M  |     |  V |
   Service-Identifier        439   8.28    Unsigned32  | M  |     |  V |
   Service-Parameter-Info    440   8.43    Grouped     |    |  M  |  V |
   Service-Parameter-Type    441   8.44    Unsigned32  |    |  M  |  V |
   Service-Parameter-Value   442   8.45    OctetString |    |  M  |  V |
   Subscription-Id           443   8.46    Grouped     | M  |     |  V |
   Subscription-Id-Data      444   8.48    UTF8String  | M  |     |  V |
   Subscription-Id-Type      450   8.47    Enumerated  | M  |     |  V |
   Subscription-Id-Extension 659   8.58    Grouped     |    |  M  |  V |
   Subscription-Id-E164      660   8.59    UTF8String  |    |  M  |  V |
   Subscription-Id-IMSI      661   8.60    UTF8String  |    |  M  |  V |
   Subscription-Id-SIP-URI   662   8.61    UTF8String  |    |  M  |  V |
   Subscription-Id-NAI       663   8.62    UTF8String  |    |  M  |  V |
   Subscription-Id-Private   664   8.63    UTF8String  |    |  M  |  V |
   Tariff-Change-Usage       452   8.27    Enumerated  | M  |     |  V |
   Tariff-Time-Change        451   8.20    Time        | M  |     |  V |
   Unit-Value                445   8.8     Grouped     | M  |     |  V |
   Used-Service-Unit         446   8.19    Grouped     | M  |     |  V |
   User-Equipment-Info       458   8.49    Grouped     |    |  M  |  V |
   User-Equipment-Info-Type  459   8.50    Enumerated  |    |  M  |  V |
   User-Equipment-Info-Value 460   8.51    OctetString |    |  M  |  V |
   User-Equipment-Info-      653   8.52    Grouped     |    |  M  |  V |
     Extension                                         |    |     |    |
   User-Equipment-Info-      654   8.53    OctetString |    |  M  |  V |
     IMEISV                                            |    |     |    |
   User-Equipment-Info-MAC   655   8.54    OctetString |    |  M  |  V |
   User-Equipment-Info-EUI64 656   8.55    OctetString |    |  M  |  V |
   User-Equipment-Info-      657   8.56    OctetString |    |  M  |  V |
     ModifiedEUI64                                     |    |     |    |
   User-Equipment-Info-IMEI  658   8.57    OctetString |    |  M  |  V |
   Value-Digits              447   8.10    Integer64   | M  |     |  V |
   Validity-Time             448   8.33    Unsigned32  | M  |     |  V |

8.1. CC-Correlation-Id AVP

The CC-Correlation-Id AVP (AVP Code 411) is of type OctetString and contains information to correlate credit-control requests generated for different components of the service, e.g., transport and service level. Whoever allocates the Service-Context-Id (i.e., a unique identifier of a service-specific document) is also responsible for defining the content and encoding of the CC-Correlation-Id AVP.
Top   ToC   RFC8506 - Page 62

8.2. CC-Request-Number AVP

The CC-Request-Number AVP (AVP Code 415) is of type Unsigned32 and identifies this request within one session. As Session-Id AVPs are globally unique, the combination of the Session-Id AVP and the CC-Request-Number AVP is also globally unique and can be used in matching credit-control messages with confirmations. An easy way to produce unique numbers is to set the value of the CC-Request-Number AVP to 0 for a credit-control request with a CC-Request-Type AVP of INITIAL_REQUEST (the initial request in a session). The value of the CC-Request-Number AVP should be set to 1 for the first UPDATE_REQUEST, to 2 for the second, and so on until the value for TERMINATION_REQUEST is one more than the value for the last UPDATE_REQUEST. In the case of event charging (when the CC-Request- Type AVP has the value EVENT_REQUEST), the CC-Request-Number AVP should be set to 0 for a credit-control request.

8.3. CC-Request-Type AVP

The CC-Request-Type AVP (AVP Code 416) is of type Enumerated and contains the reason for sending the Credit-Control-Request message. It MUST be present in all Credit-Control-Request messages. The following values are defined for the CC-Request-Type AVP (the value of 0 (zero) is reserved): INITIAL_REQUEST 1 This request is used to initiate a credit-control session. It contains credit-control information that is relevant to the initiation. UPDATE_REQUEST 2 This request contains credit-control information for an existing credit-control session. Credit-control requests of this type SHOULD be sent every time a credit-control re-authorization is needed at the expiry of the allocated quota or validity time. Further, additional service-specific events MAY trigger a spontaneous UPDATE_REQUEST. TERMINATION_REQUEST 3 This request is sent to terminate a credit-control session. It contains credit-control information relevant to the existing session.
Top   ToC   RFC8506 - Page 63
   EVENT_REQUEST         4

   This request is used when there is no need to maintain any
   credit-control session state in the credit-control server.  It
   contains all information relevant to the service and is the only
   request of the service.  The reason for this request is further
   detailed in the Requested-Action AVP.  The Requested-Action AVP MUST
   be included in the Credit-Control-Request message when CC-Request-
   Type is set to EVENT_REQUEST.

8.4. CC-Session-Failover AVP

The CC-Session-Failover AVP (AVP Code 418) is of type Enumerated and contains information as to whether moving the credit-control message stream to a backup server during an ongoing credit-control session is supported. In the case of communication failures, the credit-control message streams can be moved to an alternative destination if the credit-control server supports failover to an alternative server. The secondary credit-control server name, if received from the home Diameter AAA server, can be used as an address of the backup server. An implementation is not required to support moving a credit-control message stream to an alternative server, as this also requires moving information related to the credit-control session to the backup server. The following values are defined for the CC-Session-Failover AVP: FAILOVER_NOT_SUPPORTED 0 When the CC-Session-Failover AVP is set to FAILOVER_NOT_SUPPORTED, the credit-control message stream MUST NOT be moved to an alternative destination in the case of a communication failure. This is the default behavior if the AVP isn't included in the reply from the authorization or credit-control server. FAILOVER_SUPPORTED 1 When the CC-Session-Failover AVP is set to FAILOVER_SUPPORTED, the credit-control message stream SHOULD be moved to an alternative destination in the case of a communication failure. Moving the credit-control message stream to a backup server MAY require that information related to the credit-control session should also be forwarded to an alternative server.
Top   ToC   RFC8506 - Page 64

8.5. CC-Sub-Session-Id AVP

The CC-Sub-Session-Id AVP (AVP Code 419) is of type Unsigned64 and contains the credit-control sub-session identifier. The combination of the Session-Id AVP and this AVP MUST be unique per sub-session, and the value of this AVP MUST be monotonically increased by one for all new sub-sessions. The absence of this AVP implies that no sub-sessions are in use.

8.6. Check-Balance-Result AVP

The Check-Balance-Result AVP (AVP Code 422) is of type Enumerated and contains the result of the balance check. This AVP is applicable only when the Requested-Action AVP indicates CHECK_BALANCE in the Credit-Control-Request command. The following values are defined for the Check-Balance-Result AVP: ENOUGH_CREDIT 0 There is enough credit in the account to cover the requested service. NO_CREDIT 1 There isn't enough credit in the account to cover the requested service.

8.7. Cost-Information AVP

The Cost-Information AVP (AVP Code 423) is of type Grouped, and it is used to return the cost information of a service, which the credit-control client can transfer transparently to the end user. The included Unit-Value AVP contains the cost estimate (always of type "money") of the service in the case of price inquiries, or the accumulated cost estimation in the case of a credit-control session. The Currency-Code AVP specifies in which currency the cost was given. The Cost-Unit AVP specifies the unit when the service cost is a cost per unit (e.g., cost for the service is $1 per minute). When the Requested-Action AVP with the value PRICE_ENQUIRY is included in the Credit-Control-Request command, the Cost-Information AVP sent in the succeeding Credit-Control-Answer command contains the cost estimation for the requested service, without any reservations being made.
Top   ToC   RFC8506 - Page 65
   The Cost-Information AVP included in the Credit-Control-Answer
   command with the CC-Request-Type set to UPDATE_REQUEST contains the
   accumulated cost estimation for the session, without taking any
   credit reservations into account.

   The Cost-Information AVP included in the Credit-Control-Answer
   command with the CC-Request-Type set to EVENT_REQUEST or
   TERMINATION_REQUEST contains the estimated total cost for the
   requested service.

   The Cost-Information AVP is defined as follows (per grouped-avp-def
   as defined in [RFC6733]):

                   Cost-Information ::= < AVP Header: 423 >
                                        { Unit-Value }
                                        { Currency-Code }
                                        [ Cost-Unit ]

8.8. Unit-Value AVP

The Unit-Value AVP is of type Grouped (AVP Code 445) and specifies the cost as a floating-point value. The Unit-Value is a significand with an exponent; i.e., Unit-Value = Value-Digits AVP * 10^Exponent. This representation avoids unwanted rounding off. For example, the value of 2,3 is represented as Value-Digits = 23 and Exponent = -1. The absence of the exponent part MUST be interpreted as an exponent equal to zero. The Unit-Value AVP is defined as follows (per grouped-avp-def as defined in [RFC6733]): Unit-Value ::= < AVP Header: 445 > { Value-Digits } [ Exponent ]

8.9. Exponent AVP

The Exponent AVP is of type Integer32 (AVP Code 429) and contains the exponent value to be applied for the Value-Digits AVP within the Unit-Value AVP.


(next page on part 6)

Next Section