Rating Bypass and Response Generator Example Configuration
The following Rating Bypass configuration example includes one Response Generator handler:
ratingBypass:
enabled: true
handlers:
# These names are from the responseGenerator handler section
# This name uses the endpoints from the handler of the same name from "responseGenerator"
defaultChargingDataHandler:
ruleSets:
- #pathRegex: "some pathRegex
#headerRegex: "some headerRegex"
rules:
- jsonPath: '$.pDUSessionChargingInformation.pduSessionInformation.dnnId'
operation: EQUALS
value: 'sos'
The following Response Generator configuration example shows how the handler name is configured:
responseGenerator:
# Reusable Structures
structures:
mmuOne:
timeQuotaThreshold: 20
volumeQuotaThreshold: 100MB
grantedUnits:
totalVolume: 100
policyCounterOne:
currentStatus: OK
policyCounterDefault:
currentStatus: DEFAULT
handlers:
defaultChargingDataHandler:
validate: true
mappingTraceEnabled: true
requestMessageType: ChargingDataRequest
responseMessageType: ChargingDataResponse
responseMappingFilename: Backstop-ChargingDataResponse-mapping.yaml
# Listen on default ChargingData Endpoints
endpoints:
- chargingDataCreate
- chargingDataUpdate
- chargingDataDelete
fields:
ChargingCharacteristics:
path: ChargingDataRequest.pDUSessionChargingInformation.pduSessionInformation.chargingCharacteristics
DNN:
path: ChargingDataRequest.pDUSessionChargingInformation.pduSessionInformation.dnnId
UserEquipmentInfo:
path: ChargingDataRequest.sMSChargingInformation.userEquipmentInfo
DayOfWeek:
path: ChargingDataRequest.invocationTimeStamp
mapperName: dayOfWeek
NetworkSliceIdentifier:
path: ChargingDataRequest.pDUSessionChargingInformation.pduSessionInformation.networkSlicingInfo.sNSSAI.sd
mapperClass: com.matrixx.mapping.field.RegexMapBasedFieldValueMapper
mapperParameters:
"^ABC[0-9]{3}$": Consumer
"^XYZ[0-9]{3}$": IOT
"^[a-z,A-Z,0-9]*$": Unknown
ruleSets:
# Profile One
- weight: 10
profile: profileOne
rules:
- fieldName: ChargingCharacteristics
operation: EQUALS
value: ABCDEFG
- fieldName: DNN
operation: EQUALS
value: postpaid.mno.com
- fieldName: DayOfWeek
operation: IN
values:
- MONDAY
- TUESDAY
- WEDNESDAY
- THURSDAY
- FRIDAY
# Default - Catch All
- weight: 0
profile: profileDefault
rules: [ ]
profiles:
# Profile One (Rating Group 2)
profileOne:
structures:
- jsonPath: $.multipleUnitInformation[?(@.ratingGroup==2)]
structureName: mmuOne
# Default Profile - Catch All
profileDefault:
structures:
- jsonPath: $.multipleUnitInformation[*]
structureName: mmuOne