4 Credit Control Requests

Overview

Introduction

This chapter describes the mappings between INAP parameters and Diameter AVPs.

Introduction

Introduction

The DCD can send both session and event based credit control requests. The type used is determined by the CCS request made of the DCD , and the CCS configuration.

To enable the maximum interoperability with billing engines, the structure of the CCRs that the client sends (and the CCAs that it expects to receive) is highly configurable. This configuration is per CCS action type requested, so not all CCRs need have the same structure.

Non-configurable AVPs

AVP List descriptions

The first set of AVPs in any CCR or CCA are not determined by the structure config, but rather the current CCS state and the action requested.

These AVPs are:

AVP Name AVP Code Data Type Comment
Session-Id 263 UTF8String

Format: DiameterIdentity;Unix time_t;SLEE_CallID

where the time is the time of the first request.

Origin-Host 264 DiameterIdentity Set from configuration
Origin-Realm 296 DiameterIdentity Set from configuration
Destination-Realm 283 DiameterIdentity From CCS configuration
Auth-Application-Id 258 Unsigned32 Set from configuration
Service-Context-Id 461 UTF8String Set from configuration
CC-Request-Type 416 Enumerated All 4 values are used.
CC-Request-Number 415 Unsigned32 Starts at 0, and consecutively incremented by each message of the session.
Destination-Host 293 DiameterIdentity Set from configuration
User-Name 1 UTF8String Not included in CCRs
CC-Sub-Session-Id 419 Unsigned64 Not included in CCRs
Acct-Multi-Session-Id 50 UTF8String Not included in CCRs
Origin-State-Id 278 Unsigned32 Can be set from configuration. Due to the multiple process nature of slee_acs, this should not be set, and this AVP will then not be included.
Event-Timestamp 55 Time The time of the request construction.

Re-Authorization Answer (RAA)

DCD can be configured to handle Re-A uthorization Request (RAR) messages. Incoming RAR messages are converted to SLEE events for upstream processing by the DIAMETER Control Agent (DCA). When DCD receives an RAA response from DCA, that message is forwarded to the requesting server. If there is no matching session, DCD responds with DIAMETER_UNKNOWN_SESSION_ID. If RAR support is not configured, DCD responds with DIAMETER_COMMAND_UNSUPPORTED.

Structure Configurable AVPs

Structure configurable AVPs

The AVPs following the Event-Timestamp are massively configurable. The configuration defines a tree structure of which AVPs to include, which CCS variables they represent, and how they are formatted. There is separate configuration for each CCS action involved. The CCS actions for which CCRs can be configured are:

  • ConfirmNamedEventReservation
  • ConfirmTimeReservation
  • DirectNamedEvent
  • DirectTimeCharge
  • ExtendTimeReservation
  • GetNamedEventRates
  • InitialTimeReservation
  • NamedEventReservation
  • RevokeNamedEventReservation
  • RevokeTimeReservation
  • WalletInfo
  • CreateEDR
  • WalletRecharge

ccsConcepts

To match an AVP to a variable in CCS, the DCD has "ccsConcepts". These can be a specific parameter of the CCS action, a general CCS variable, some of the call's context, or even an ACS profile value.

The DCD provides functionality to scale values by a factor, and also allows a mapping of one set of integers to another while reading/writing to CCS concepts. The specific formatting of the value field is quite configurable, see the Diameter Charging Driver Technical Guide for formatting details.

Note: All concepts are available to be set from Responses. The availability only refers to requests.

The complete list of CCS concepts that are available to CCRs/CCAs is:

Concept Label Availability Comment
acsCallID always The call ID from the SLEE
acsProductType always The ACS product type ID
acsServiceProvider always The ACS service provider ID
acsSubscriber always The CCS subscriber ID
acsSubscriberReference always The CCS subscriber number (ie their MSISDN)
acsWallet always The CCS wallet ID (BE_WALLET.ID)
acsWalletReference always The CCS wallet Reference (the Billing System's reference to the wallet)
acsWalletType always The CCS wallet type. (CCS_WALLET_TYPE.ID)
acsChargingDomain always The destined billing domain (logical collection of wallets) for this request.
acsTariffCode After an initial reservation. Tariff Code string returned in the Initial Reservation Response (if present).
acsUnnormalisedCalledNumber always The called party number digits from the IDP, without any attempt at normalization.
acsProfile always An ACS profile buffer from the Call plan. If the buffer is not set, then the AVP is not included.
discountMaxCharge After a setDiscount Present after a setDiscount node or a response that has the discountMaxCharge present.
discountPeriod After a setDiscount Present after a setDiscount node or a response that has the discountPeriod present.
tariffPlan After a setTariffPlan Integer representing the tariff Plan.
tariffCugName After a setTariffPlan The Closed User Group Name.
cascade After a setCascade Override. Also can be set by previous responses. The integer ID of the cascade to apply.
chargeInfoBalanceType After a chargeInfo response The CCS ID of the balance Type for the current balance of the Charge structure.
chargeInfoBalanceUnitType After a chargeInfo response The CCS ID of the balance Unit for the current balance of the Charge structure. This is not necessary for a ChargeInfo in a response, it can be derived from the balance type.
chargeInfoBalanceSystemValue After a chargeInfo response The balance Unit for the current item of the Charge structure. This is in units of the system currency.
chargeInfoBalanceUserValue After a chargeInfo response The balance Unit for the current item of the Charge structure. This is in units of the user's currency. Note that the system currency value is mandatory, while this entry is optional.
walletInfoBalanceUnitType After a walletInfo response The CCS ID of the balance Unit for the current balance item of the Wallet structure. This is not necessary for a balance in a response, it can be derived from the balance type.
walletInfoBalanceType After a walletInfo response The CCS ID of the balance Type for the current balance of the Wallet structure.
walletInfoBalanceSystemValue After a walletInfo response The balance Unit for the current item of the balance structure. This is in units of the system currency.
walletInfoBalanceUserValue After a walletInfo response The balance Unit for the current item of the balance structure. This is in units of the user's currency. Note that the system currency value is mandatory, while this entry is optional.
walletInfoBalanceExpiry After a walletInfo response The expiry date (in time_t) of the current balance. The DCD handles conversion from time_t to DIAMETER times.
walletInfoBalanceMaxCredit After a walletInfo response The maximum amount of credit allowed for this subscriber.
walletInfoBalanceLimitType After a walletInfo response The balances limit type: An integer representing one of: limitedPostpaid, postpaid, prepaid, singleUsePrepaid
walletInfoBalanceExponent After a walletInfo response An exponent to apply to the balance system value.
walletInfoExpiry After a walletInfo response The expiry date (in time_t) of the wallet. The DCD handles conversion from time_t to DIAMETER times.
walletInfoState After a walletInfo response A single character representing the wallet's state. One of: 'A' = Active, 'D' = Dormant, 'F' = Frozen, 'P' = Pre-Use, 'S' = Suspended, 'T' = Terminated. Note that conversion to different representations is possible.
walletInfoLastAccess After a walletInfo response time_t of the wallet's last access. The DCD handles conversion from time_t to DIAMETER times.
walletInfoActivationDate After a walletInfo response time_t of the wallet's activation date. The DCD handles conversion from time_t to DIAMETER times.
walletInfoMaxConcurrent After a walletInfo response The maximum number of concurrent users allowed for this wallet.
walletInfoSystemCurrency After a walletInfo response The system currency.
walletInfoUserCurrency After a walletInfo response The CCS_ACCT.CURRENCY value for this wallet.
cli After a DirectTimeCharge or InitialTimeReservation  
destinationNumber After a DirectTimeCharge or InitialTimeReservation  
callerTimeZone After a DirectTimeCharge or InitialTimeReservation  
expectedReservationTotal InitialTimeReservation and ExtendTimeReservation  
expectedReservationDelta InitialTimeReservation and ExtendTimeReservation  
callDurationTotal Any Time Charging Action  
callDurationDelta Any Time Charging Action  
lowCreditBuffer After set from a response Usually part of an initialTimeReservationResponse. Number of seconds from the end of the last good reservation period until a low credit beep should be played
freeCallDisposition After set from a response Usually part of an initialTimeReservationResponse.
singleReservation After set from a response Usually part of an initialTimeReservationResponse.
initialLowBalanceIndicator After set from a response Usually part of an initialTimeReservationResponse. If present and non zero the indicated pre call warning announcement should be played to the subscriber.
initialLowBalanceAnnouncement After set from a response Usually part of an initialTimeReservationResponse. The Announcement ID of the announcement to play.
maxCallLength After set from a response Usually part of an initialTimeReservationResponse.
retrieveLCRNumbers After set from a response Usually part of an initialTimeReservationResponse.
validityPeriod After set from a response  
reservedLengthTotal After set from a response Usually part of an xxxTimeReservationResponse.
reservedLengthDelta After set from a response Usually part of an xxxTimeReservationResponse.
timeReservationStatus After set from a response Usually part of an xxxTimeReservationResponse.
maxSeconds After set from a response Session Time left. Usually part of an xxxTimeReservationResponse.
callAnsweredTime ConfirmTimeReservation  
confirmTimeReservationStatus After set from a response Usually part of an confirmTimeReservationResponse.
revokeTimeReservationStatus After set from a response Usually part of an revokeTimeReservationResponse.
eventClass NamedEvent Actions A string representing the CCS event Class.
eventName NamedEvent Actions A string of the CCS event name.
eventType NamedEvent Actions An integer representing the type of CCS named event.
minUnitsRequested NamedEvent Actions  
maxUnitsRequested NamedEvent Actions  
discountPercentage After a setDiscount or DirectNamedEvent or NamedEventReservation Present after a setDiscount node or a response that has the discountPeriod present.
extraInformation   Usually call information for adding to Billing EDRs. Contents varies for each action.
ignoreBalanceLimit DirectNamedEvent, DirectTimeCharge, NamedEventReservation  
numUnitsGranted After set from a response  
numUnitsUsed ConfirmNamedEventReservation  
ratingPrecision InitialTimeReservation Integer representing one of seconds, tenths-of-a-second or hundredths-of-a-second
callDate DirectTimeCharge  
balanceUnitFilter WalletInfo Request the billing engine to only return balances of this unit.
balanceTypeFilter WalletInfo Request the billing engine to only return balances of this type.
setFreeform always The next AVP of concept "freeform" will instead use/update the concept indexed by the value of this AVP.
freeform always Uses/updates the concept previously defined by setFreeform.
voucherInfoVoucher After a VoucherRedeem response The ID of the voucher that was redeemed (for example in the Voucher Management system). Not to be confused with voucher number as known to customer – that will normally be available as a profile variable set or captured in the control plan.
voucherInfoWalletExpiryExtension After a VoucherRedeem response How much of an extension to apply to the wallet (expressed in units of time given by VoucherInfoWalletExpiryExtensionType).
voucherInfoWalletExpiryExtensionType After a VoucherRedeem response Specifies the unit of time referred to by the value in voucherInfoWalletExpiryExtension. Hours (0) or Months (1).
voucherInfoWalletExpiryExtensionPolicy After a VoucherRedeem response

An enumeration that shows how the wallet expiry is to be updated by a voucher redemption:

best = 0

extend

extendFromToday

override

dontChange

voucherInfoBalanceType After a VoucherRedeem response This is the ID of the CCS balance type of the current VoucherValue ‘slot’ in the VoucherInfo structure, obtained from the last voucher redemption.
voucherInfoValue After a VoucherRedeem response This is the monetary value from the current VoucherValue ‘slot’ in the VoucherInfo structure, obtained from the last voucher redemption.
voucherInfoBalanceExpiryExtension After a VoucherRedeem response How much of an extension to apply to the wallet balance referred to by the current VoucherValue ‘slot’ in the VoucherInfo structure (expressed in units of time given by VoucherInfoBalanceExpiryExtensionType).
voucherInfoBalanceExpiryExtensionType After a VoucherRedeem response Specifies the unit of time referred to by the voucherInfoBalanceExpiryExtension value in the current VoucherValue ‘slot’ of the VoucherInfo structure. Hours (0) or Months (1).
voucherInfoWalletExpiryExtensionPolicy After a VoucherRedeem response

An enumeration that shows how the current voucher value balance expiry is to be updated by a voucher redemption:

  • best = 0
  • extend
  • extendFromToday
  • override
  • dontChange
voucherInfoNewBucket After a VoucherRedeem response States whether the money amount from the current VoucherValue ‘slot’ of the VoucherInfo structure should be stored in a new bucket ir added to an existing one.
voucherInfoMissingBalancePolicy After a VoucherRedeem response

States how to handle the lack of any existing balance of this type in the wallet:

  • allow = 0,
  • fail,
  • ignoreBalance
voucherInfoReplaceBalance After a VoucherRedeem response Specifies whether or not the current voucher value replaces any existing balance of that type in the wallet.
scpAction Set after a response

For handling CCAs only.

May be set based on an enumerated AVP to indicate combinations of:

  • supervise (1)
  • release (2)
  • sendMessage (3)
  • playAnnouncement (4)
  • superviseWithoutControlling (5)

Where such an enumerated AVP exists, it may appear more than once with different values. This will result in DCD context values (booleans) being set according to each of the above names. These boolean values may be copied back into profile locations using the ContextCopy section in eserv.config, for the purposes of branching within control plans.

See Diameter Charging Driver Technical Guide for further details.

Balance structure limitations

There is a small limitation to the flexibility of AVP structures to define balances. Multiple balances are allowed for charge, wallet and voucher information, but all properties of the balance must be grouped together.

Basically, CCS must parse all information about a particular balance before parsing a different balance. So two grouped AVPs of balance value and balance type is fine, but a grouped AVP of all balance values and another grouped AVP of all balance types cannot be parsed by CCS.

This approach was established for the BalanceInfo transaction, and has been followed for the management of VoucherInfo structures, which define the proceeds from a voucher redemption. The information comprises a set of wallet information, and a recurring set of VoucherValue structures that each identify how to update a single wallet balance type. Accordingly CCS must parse all information about a particular voucher value before parsing fields from a different one.

Configuring different types of DirectNamedEvent

This CCS action allows for highly configurable types of billing even to be triggered by the SLC. It is obviously desirable to be able to configure different AVPs for different types of DirectNamedEvent. The feature node that is used to emit a DirectNamedEvent is told what type of event it should trigger, categorized by event class (a kind of subject matter grouping) and event name. Both aspects are fully configurable in the CCS screens.

To make the DNE action more useful, its DCD implementation looks first for a request AVP named DirectNamedEventRequest-xxx, where xxx is the configured name of the CCS named event.

  • If one is found, it is used to generate the outgoing AVP.
  • If none is found, the code then falls back to the more general "DirectNamedEventRequest".

A similar logic applies to the processing of responses: that is, DCD looks first for DirectNamedEventResponse-xxx, then DirectNamedEventResponse.

Result Code Mapping

Introduction

The mapping of DIAMETER result codes to CCS node responses is not configurable, and depends on the CCS Action involved.

Initial time reservation

This table lists the mapped responses for initial time reservation.

DIAMETER Result Code InitialTimeReservationResponse
DIAMETER_SUCCESS success
DIAMETER_LIMITED_SUCCESS success
DIAMETER_UNABLE_TO_DELIVER declineCommunicationError
DIAMETER_CREDIT_LIMIT_REACHED declineInsufficientFunds
DIAMETER_USER_UNKNOWN declineUnknownWallet
DIAMETER_END_USER_SERVICE_DENIED declineCallRestricted
DIAMETER_CREDIT_CONTROL_NOT_APPLICABLE freecall
DIAMETER_RATING_FAILED declineSystemError
all others declineSystemError

Extend time reservation

This table lists the mapped responses for extend time reservation.

DIAMETER Result Code InitialTimeReservationResponse
DIAMETER_SUCCESS success
DIAMETER_LIMITED_SUCCESS success
DIAMETER_UNABLE_TO_DELIVER declineCommunicationError
DIAMETER_CREDIT_LIMIT_REACHED declineInsufficientFunds
DIAMETER_USER_UNKNOWN declineUnknownWallet
DIAMETER_END_USER_SERVICE_DENIED declineSystemError
DIAMETER_CREDIT_CONTROL_NOT_APPLICABLE freecall
DIAMETER_RATING_FAILED declineSystemError
all others declineSystemError

Confirm time reservation

This table lists the mapped responses for confirm time reservation.

DIAMETER Result Code InitialTimeReservationResponse
DIAMETER_SUCCESS success
DIAMETER_LIMITED_SUCCESS success
DIAMETER_UNABLE_TO_DELIVER declineCommunicationError
DIAMETER_CREDIT_LIMIT_REACHED declineInsufficientFunds
DIAMETER_END_USER_SERVICE_DENIED declineWalletDisabled
all others declineSystemError

Revoke time reservation

This table lists the mapped responses for revoke time reservation.

DIAMETER Result Code InitialTimeReservationResponse
DIAMETER_SUCCESS success
DIAMETER_LIMITED_SUCCESS success
DIAMETER_UNABLE_TO_DELIVER declineCommunicationError
all others declineSystemError

Named event reservation

This table lists the mapped responses for named event reservation.

DIAMETER Result Code InitialTimeReservationResponse
DIAMETER_SUCCESS success
DIAMETER_CREDIT_CONTROL_NOT_APPLICABLE declineSystemError
DIAMETER_CREDIT_LIMIT_REACHED declineInsufficientFunds
DIAMETER_END_USER_SERVICE_DENIED declineNotAllowed
all others declineSystemError

Confirm named event reservation

This table lists the mapped responses for confirm named event reservation.

DIAMETER Result Code InitialTimeReservationResponse
DIAMETER_SUCCESS success
all others declineSystemError

Revoke named event reservation

This table lists the mapped responses for revoke named event reservation.

DIAMETER Result Code InitialTimeReservationResponse
DIAMETER_SUCCESS success
all others failed

Direct named event

This table lists the mapped responses for direct named event.

DIAMETER Result Code InitialTimeReservationResponse
DIAMETER_SUCCESS success
DIAMETER_CREDIT_LIMIT_REACHED declineInsufficientFunds
DIAMETER_END_USER_SERVICE_DENIED declineNotAllowed
all others declineSystemError

Direct time charge

This table lists the mapped responses for direct time charge.

DIAMETER Result Code InitialTimeReservationResponse
DIAMETER_SUCCESS success
all others declineSystemError

Get named event rates

This table lists the mapped responses for get named event rates.

DIAMETER Result Code InitialTimeReservationResponse
DIAMETER_SUCCESS success
DIAMETER_CREDIT_CONTROL_NOT_APPLICABLE success
DIAMETER_RATING_FAILED rateNotAvailable
DIAMETER_END_USER_SERVICE_DENIED declineNotAllowed
all others declineSystemError

Wallet Info

This table lists the mapped responses for wallet info.

DIAMETER Result Code InitialTimeReservationResponse
DIAMETER_SUCCESS success
all others failed

Create EDR

This table lists the mapped responses for create edr.

DIAMETER Result Code InitialTimeReservationResponse
DIAMETER_SUCCESS success
all others failed

Wallet recharge

This table lists the mapped responses for wallet recharge.

DIAMETER Result Code InitialTimeReservationResponse
DIAMETER_SUCCESS success
all others failed