Mapping Example
Mapping of CDR fields to ASN.1 syntax can be configured.
The following is an example mapping configuration:
# Source Message
source:
type: "openapi"
name: "CDR"
# Target Message
target:
type: "asn.1"
name: "CHFRecord"
# Validation:
# The validation configuration can be used to control whether the Source message should be validated and what to do in the event
# that validation issues are detected.
validation:
enabled: true
outputIssuesToLog: true
failOnIssue: false
# Field Mappings:
# Field Mappings describe which fields from the Source message should be mapped to the Target message and how.
fieldMappings:
CHFRecord:
chargingFunctionRecord:
recordType: {default: "200"}
recordingNetworkFunctionID: "CDR.networkInteraction.nfConsumerIdentification.nFName"
subscriberIdentifier:
subscriptionIDType: {from: "CDR.networkInteraction.subscriberIdentifier", fieldValueMapperName: "cdr-subscription-type"}
subscriptionIDData: {from: "CDR.networkInteraction.subscriberIdentifier", fieldValueMapperName: "cdr-identifying-type-stripper"}
nFunctionConsumerInformation:
networkFunctionality: {default: 1}
networkFunctionName: "CDR.networkInteraction.nfConsumerIdentification.nFName"
networkFunctionIPv4Address:
iPTextRepresentedAddress:
iPTextV4Address: "CDR.networkInteraction.nfConsumerIdentification.nFIPv4Address"
networkFunctionPLMNIdentifier: "CDR.networkInteraction.nfConsumerIdentification.nFPLMNID.mcc"
networkFunctionIPv6Address:
iPTextRepresentedAddress:
iPTextV6Address: "CDR.networkInteraction.nfConsumerIdentification.nFIPv6Address"
networkFunctionFQDN:
domainName: "CDR.networkInteraction.nfConsumerIdentification.nFFqdn"
triggers:
sMFTrigger: {from: "CDR.networkInteraction.triggers.triggerType", fieldValueMapperName: "smf-trigger"}
listOfMultipleUnitUsage:
ratingGroup: "CDR.networkInteraction.multipleUnitUsage.ratingGroup"
usedUnitContainers:
serviceIdentifier: "CDR.networkInteraction.multipleUnitUsage.usedUnitContainer.serviceId"
time: "CDR.networkInteraction.multipleUnitUsage.usedUnitContainer.time"
triggers:
sMFTrigger: {from: "CDR.networkInteraction.multipleUnitUsage.usedUnitContainer.triggers.triggerType", fieldValueMapperName: "smf-trigger"}
triggerTimeStamp: "CDR.networkInteraction.multipleUnitUsage.usedUnitContainer.triggerTimestamp"
dataTotalVolume: "CDR.networkInteraction.multipleUnitUsage.usedUnitContainer.totalVolume"
dataVolumeUplink: "CDR.networkInteraction.multipleUnitUsage.usedUnitContainer.uplinkVolume"
dataVolumeDownlink: "CDR.networkInteraction.multipleUnitUsage.usedUnitContainer.downlinkVolume"
serviceSpecificUnits: "CDR.networkInteraction.multipleUnitUsage.usedUnitContainer.serviceSpecificUnits"
eventTimeStamp: "CDR.networkInteraction.multipleUnitUsage.usedUnitContainer.eventTimeStamps" # OpenAPI is array, ASN.1 is not
localSequenceNumber: "CDR.networkInteraction.multipleUnitUsage.usedUnitContainer.localSequenceNumber"
pDUContainerInformation:
chargingRuleBaseName: "CDR.networkInteraction.multipleUnitUsage.usedUnitContainer.pDUContainerInformation.chargingRuleBaseName"
timeOfFirstUsage: "CDR.networkInteraction.multipleUnitUsage.usedUnitContainer.pDUContainerInformation.timeofFirstUsage"
timeOfLastUsage: "CDR.networkInteraction.multipleUnitUsage.usedUnitContainer.pDUContainerInformation.timeofLastUsage"
qoSInformation:
fiveQi: "CDR.networkInteraction.multipleUnitUsage.usedUnitContainer.pDUContainerInformation.qoSInformation.5qi"
aRP:
priorityLevel: "CDR.networkInteraction.multipleUnitUsage.usedUnitContainer.pDUContainerInformation.qoSInformation.arp.priorityLevel"
priorityLevel: "CDR.networkInteraction.multipleUnitUsage.usedUnitContainer.pDUContainerInformation.qoSInformation.priorityLevel"
averWindow: "CDR.networkInteraction.multipleUnitUsage.usedUnitContainer.pDUContainerInformation.qoSInformation.averWindow"
maxDataBurstVol: "CDR.networkInteraction.multipleUnitUsage.usedUnitContainer.pDUContainerInformation.qoSInformation.maxDataBurstVol"
userLocationInformation: {from: "CDR.networkInteraction.multipleUnitUsage.usedUnitContainer.pDUContainerInformation.userLocationInformation", fieldValueMapperName: "json-object-string"}
presenceReportingAreaInfo:
presenceReportingAreaIdentifier: "CDR.networkInteraction.multipleUnitUsage.usedUnitContainer.pDUContainerInformation.presenceReportingAreaInformation.praId"
rATType: {from: "CDR.networkInteraction.multipleUnitUsage.usedUnitContainer.pDUContainerInformation.rATType", fieldValueMapperName: "rat-type"}
sponsorIdentity: "CDR.networkInteraction.multipleUnitUsage.usedUnitContainer.pDUContainerInformation.sponsorIdentity"
applicationServiceProviderIdentity: "CDR.networkInteraction.multipleUnitUsage.usedUnitContainer.pDUContainerInformation.applicationserviceProviderIdentity"
servingNetworkFunctionID:
servingNetworkFunctionInformation:
networkFunctionality: "CDR.networkInteraction.multipleUnitUsage.usedUnitContainer.pDUContainerInformation.servingNodeID.servingNetworkFunctionInformation.nodeFunctionality"
networkFunctionName: "CDR.networkInteraction.multipleUnitUsage.usedUnitContainer.pDUContainerInformation.servingNodeID.servingNetworkFunctionInformation.nFName"
networkFunctionIPv4Address:
iPTextRepresentedAddress:
iPTextV4Address: "CDR.networkInteraction.multipleUnitUsage.usedUnitContainer.pDUContainerInformation.servingNodeID.servingNetworkFunctionInformation.nFIPv4Address"
networkFunctionIPv6Address:
iPTextRepresentedAddress:
iPTextV6Address: "CDR.networkInteraction.multipleUnitUsage.usedUnitContainer.pDUContainerInformation.servingNodeID.servingNetworkFunctionInformation.nFIPv6Address"
aMFIdentifier: "CDR.networkInteraction.multipleUnitUsage.usedUnitContainer.pDUContainerInformation.servingNodeID.aMFId"
uETimeZone: "CDR.networkInteraction.multipleUnitUsage.usedUnitContainer.pDUContainerInformation.uetimeZone"
quotaManagementIndicator: {from: "CDR.networkInteraction.multipleUnitUsage.usedUnitContainer.quotaManagementIndicator", fieldValueMapperName: "quota-management-indicator"}
uPFID: "CDR.networkInteraction.multipleUnitUsage.uPFID"
recordOpeningTime: "CDR.networkInteraction.invocationTimeStamp"
# duration: "CDR.networkInteraction.duration"
recordSequenceNumber: "CDR.networkInteraction.invocationSequenceNumber"
causeForRecClosing: {from: "CDR.recordCloseReason", fieldValueMapperName: "record-close-reason"}
pDUSessionChargingInformation:
pDUSessionChargingID: "CDR.networkInteraction.pDUSessionChargingInformation.chargingId"
userEquipmentInfo:
subscriberEquipmentNumberType: { default: 0 }
subscriberEquipmentNumberData: "CDR.networkInteraction.pDUSessionChargingInformation.userInformation.servedPEI"
userLocationInformation: {from: "CDR.networkInteraction.pDUSessionChargingInformation.userLocationinfo", fieldValueMapperName: "json-object-string" }
userRoamerInOut: "CDR.networkInteraction.pDUSessionChargingInformation.userInformation.roamerInOut"
presenceReportingAreaInfo:
presenceReportingAreaIdentifier: "CDR.networkInteraction.pDUSessionChargingInformation.presenceReportingAreaInformation.praId"
pDUSessionId: "CDR.networkInteraction.pDUSessionChargingInformation.pduSessionInformation.pduSessionID"
networkSliceInstanceID: #SEQUENCE
sST: "CDR.networkInteraction.pDUSessionChargingInformation.pduSessionInformation.networkSlicingInfo.sNSSAI.sst"
sD: "CDR.networkInteraction.pDUSessionChargingInformation.pduSessionInformation.networkSlicingInfo.sNSSAI.sd"
pDUType: {from: "CDR.networkInteraction.pDUSessionChargingInformation.pduSessionInformation.pduType", fieldValueMapperName: "pdu-type"}
sUPIPLMNIdentifier: "CDR.networkInteraction.pDUSessionChargingInformation.pduSessionInformation.hPlmnId.mcc"
servingNetworkFunctionID: # SEQUENCE OF
servingNetworkFunctionInformation: #SEQUENCE
networkFunctionality: { default: 3 }
networkFunctionName: "CDR.networkInteraction.pDUSessionChargingInformation.pduSessionInformation.servingNetworkFunctionID.servingNetworkFunctionInformation.nFName"
networkFunctionIPv4Address:
iPTextRepresentedAddress:
iPTextV4Address: "CDR.networkInteraction.pDUSessionChargingInformation.pduSessionInformation.servingNetworkFunctionID.servingNetworkFunctionInformation.nFIPv4Address"
networkFunctionPLMNIdentifier: "CDR.networkInteraction.pDUSessionChargingInformation.pduSessionInformation.servingNetworkFunctionID.servingNetworkFunctionInformation.nFPLMNID.mcc"
networkFunctionIPv6Address:
iPTextRepresentedAddress:
iPTextV4Address: "CDR.networkInteraction.pDUSessionChargingInformation.pduSessionInformation.servingNetworkFunctionID.servingNetworkFunctionInformation.nFIPv6Address"
networkFunctionFQDN:
domainName: "CDR.networkInteraction.pDUSessionChargingInformation.pduSessionInformation.servingNetworkFunctionID.servingNetworkFunctionInformation.nFFqdn"
aMFIdentifier: "CDR.networkInteraction.pDUSessionChargingInformation.pduSessionInformation.servingNetworkFunctionID.aMFId"
rATType: {from: "CDR.networkInteraction.pDUSessionChargingInformation.pduSessionInformation.ratType", fieldValueMapperName: "rat-type"}
dataNetworkNameIdentifier: "CDR.networkInteraction.pDUSessionChargingInformation.pduSessionInformation.dnnId"
pDUAddress: #SEQUENCE
pDUIPv4Address:
iPTextRepresentedAddress:
iPTextV4Address: "CDR.networkInteraction.pDUSessionChargingInformation.pduSessionInformation.pduAddress.pduIPv4Address"
pDUIPv6AddresswithPrefix:
iPBinaryAddress:
iPBinV6Address:
iPBinV6AddressWithPrefix:
iPBinV6Address: "CDR.networkInteraction.pDUSessionChargingInformation.pduSessionInformation.pduAddress.pduIPv6AddresswithPrefix"
pDPAddressPrefixLength: "CDR.networkInteraction.pDUSessionChargingInformation.pduSessionInformation.pduAddress.pduAddressprefixlength"
iPV4dynamicAddressFlag: "CDR.networkInteraction.pDUSessionChargingInformation.pduSessionInformation.pduAddress.iPv4dynamicAddressFlag"
iPV6dynamicPrefixFlag: "CDR.networkInteraction.pDUSessionChargingInformation.pduSessionInformation.pduAddress.iPv6dynamicPrefixFlag"
authorizedQoSInformation: #SEQUENCE
fiveQi: "CDR.networkInteraction.pDUSessionChargingInformation.pduSessionInformation.authorizedQoSInformation.5qi"
aRP:
priorityLevel: "CDR.networkInteraction.pDUSessionChargingInformation.pduSessionInformation.authorizedQoSInformation.arp.priorityLevel"
priorityLevel: "CDR.networkInteraction.pDUSessionChargingInformation.pduSessionInformation.authorizedQoSInformation.priorityLevel"
averWindow: "CDR.networkInteraction.pDUSessionChargingInformation.pduSessionInformation.authorizedQoSInformation.averWindow"
maxDataBurstVol: "CDR.networkInteraction.pDUSessionChargingInformation.pduSessionInformation.authorizedQoSInformation.maxDataBurstVol"
uETimeZone: "CDR.networkInteraction.pDUSessionChargingInformation.uetimeZone"
pDUSessionstartTime: "CDR.networkInteraction.pDUSessionChargingInformation.pduSessionInformation.startTime"
pDUSessionstopTime: "CDR.networkInteraction.pDUSessionChargingInformation.pduSessionInformation.stopTime"
diagnostics: "CDR.networkInteraction.pDUSessionChargingInformation.pduSessionInformation.diagnostics"
chargingCharacteristics: "CDR.networkInteraction.pDUSessionChargingInformation.pduSessionInformation.chargingCharacteristics"
chChSelectionMode: {from: "CDR.networkInteraction.pDUSessionChargingInformation.pduSessionInformation.chargingCharacteristicsSelectionMode", fieldValueMapperName: "charging-characteristics-selection-mode", default: 3}
threeGPPPSDataOffStatus: "CDR.networkInteraction.pDUSessionChargingInformation.pduSessionInformation.3gppPSDataOffStatus"
rANSecondaryRATUsageReport: # SEQUENCE
nGRANSecondaryRATType: "CDR.networkInteraction.pDUSessionChargingInformation.rANSecondaryRATUsageReport.rANSecondaryRATType"
qosFlowsUsageReports: # SEQUENCE OF SEQUENCE
qosFlowId: "CDR.networkInteraction.pDUSessionChargingInformation.rANSecondaryRATUsageReport.qosFlowsUsageReports.qFI"
startTime: "CDR.networkInteraction.pDUSessionChargingInformation.rANSecondaryRATUsageReport.qosFlowsUsageReports.startTimestamp"
endTime: "CDR.networkInteraction.pDUSessionChargingInformation.rANSecondaryRATUsageReport.qosFlowsUsageReports.endTimestamp"
dataVolumeDownlink: "CDR.networkInteraction.pDUSessionChargingInformation.rANSecondaryRATUsageReport.qosFlowsUsageReports.downlinkVolume"
dataVolumeUplink: "CDR.networkInteraction.pDUSessionChargingInformation.rANSecondaryRATUsageReport.qosFlowsUsageReports.uplinkVolume"
subscribedQoSInformation: # SEQUENCE
fiveQi: "CDR.networkInteraction.pDUSessionChargingInformation.pduSessionInformation.subscribedQoSInformation.5qi"
aRP:
preemptionCapability: {from: "CDR.networkInteraction.pDUSessionChargingInformation.pduSessionInformation.subscribedQoSInformation.arp.preemptCap", fieldValueMapperName: "preempt-capability"}
preemptionVulnerability: {from: "CDR.networkInteraction.pDUSessionChargingInformation.pduSessionInformation.subscribedQoSInformation.arp.preemptVuln", fieldValueMapperName: "preempt-vulnerability"}
priorityLevel: "CDR.networkInteraction.pDUSessionChargingInformation.pduSessionInformation.subscribedQoSInformation.arp.priorityLevel"
priorityLevel: "CDR.networkInteraction.pDUSessionChargingInformation.pduSessionInformation.subscribedQoSInformation.priorityLevel"
authorizedSessionAMBR: #SEQUENCE
ambrUL: "CDR.networkInteraction.pDUSessionChargingInformation.pduSessionInformation.authorizedSessionAMBR.uplink"
ambrDL: "CDR.networkInteraction.pDUSessionChargingInformation.pduSessionInformation.authorizedSessionAMBR.downlink"
subscribedSessionAMBR:
ambrUL: "CDR.networkInteraction.pDUSessionChargingInformation.pduSessionInformation.subscribedSessionAMBR.uplink"
ambrDL: "CDR.networkInteraction.pDUSessionChargingInformation.pduSessionInformation.subscribedSessionAMBR.downlink"
servingCNPLMNID: "CDR.networkInteraction.pDUSessionChargingInformation.pduSessionInformation.servingCNPlmnId.mcc"
dNNSelectionMode: "CDR.networkInteraction.pDUSessionChargingInformation.pduSessionInformation.dnnSelectionMode"
chargingSessionIdentifier: "CDR.sessionId"
# Custom Field Value Mappers allow custom behavior to be specified when copying the the value of the source field to the target field.
# Field Values Mappers for translation between common data types (string, int, boolean, etc) are provided by the mapper and are
# automatically detected and added by default
customFieldValueMappers:
# Convert Subscription Prefixes to ASN.1 SubscriptionIDType
- name: "cdr-subscription-type"
className: "com.matrixx.asn1.mapping.fieldvaluemapper.SubscriberTypeFieldValueMapper"
targetType: "integer"
default: "1"
# String Identifying Type from Identifiers such as IMSIs
- name: "cdr-identifying-type-stripper"
className: "com.matrixx.asn1.mapping.fieldvaluemapper.IdentifyingTypeStrippingFieldValueMapper"
# String Identifying Type from Identifiers such as IMSIs
- name: "json-object-string"
className: "com.matrixx.asn1.mapping.fieldvaluemapper.JsonObjectStringFieldValueMapper"
# Convert Trigger values into numeric value
- name: "smf-trigger"
targetType: "integer"
map:
- QUOTA_THRESHOLD: 401 # 401 = volumeThresholdReached
- QHT: 401 # 401 = volumeThresholdReached
- FINAL: 503 # 503 = endOfPDUSession
- QUOTA_EXHAUSTED: 404 # 404 = volumeQuotaExhausted
- VALIDITY_TIME: 406 # 406 = expiryOfQuotaValidityTime
- OTHER_QUOTA_TYPE: 409 # 409 = otherQuotaType
- FORCED_REAUTHORISATION: 407 # 407 = reAuthorizationRequest
- UNIT_COUNT_INACTIVITY_TIMER: 502 # 502 = unitCountInactivityTimer
- ABNORMAL_RELEASE: 506 # 506 = abnormalRelease
- QOS_CHANGE: 100 # 100 = qosChange
- VOLUME_LIMIT: 201 # 201 = pDUSessionExpiryDataVolumeLimit
- TIME_LIMIT: 200 # 200 = pDUSessionExpiryDataTimeLimit
- PLMN_CHANGE: 107 # 107 = pLMNChange
- USER_LOCATION_CHANGE: 101 # 101 = userLocationChange
- RAT_CHANGE: 108 # 108 = rATTypeChange
- UE_TIMEZONE_CHANGE: 106 # 106 = uETimeZoneChange
- TARIFF_TIME_CHANGE: 105 # 105 = tariffTimeChange
- MAX_NUMBER_OF_CHANGES_IN_CHARGING_CONDITIONS: 203 # 203 = pDUSessionExpiryChargingConditionChanges
- MANAGEMENT_INTERVENTION: 501 # 501 = managementIntervention
- CHANGE_OF_UE_PRESENCE_IN_PRESENCE_REPORTING_AREA: 103 # 103 = presenceReportingAreaChange
- CHANGE_OF_3GPP_PS_DATA_OFF_STATUS: 104 # 104 = threeGPPPSDataOffStatusChange
- SERVING_NODE_CHANGE: 102 # 102 = servingNodeChange
- REMOVAL_OF_UPF: 111 # 111 = removalOfUPF
- ADDITION_OF_UPF: 110 # 110 = additionOfUPF
- START_OF_SERVICE_DATA_FLOW: 108 # 108 = startOfServiceDataFlowNoValidQuota
# Convert 5G RAT Types
- name: "rat-type"
targetType: "integer"
map:
- NR: 51 # From 29.061 says use 51. 29.274 says use 10.
- EUTRA: 6 # From 29.274
- WLAN: 53 # From 29.061 (R16)
- VIRTUAL: 7 # From 29.274
# Convert Quota Management Indicator
- name: "quota-management-indicator"
targetType: "boolean"
map:
- ONLINE_CHARGING: "true"
# Convert Record Close Reason
- name: "record-close-reason"
targetType: "integer"
map:
- SESSION: 0 # normalRelease (0)
- VOLUME: 16 # volumeLimit (16)
- NUMBER_OF_INTERACTIONS: 19 # maxChangeCond (19)
# Convert PDU Type
- name: "pdu-type"
targetType: "integer"
map:
- IPV4V6: 0
- IPV4: 1
- IP46: 2
- UNSTRUCTURED: 3
- ETHERNET: 4
# Convert Charging Characteristics Selection Mode
- name: "charging-characteristics-selection-mode"
targetType: "integer"
map:
- SERVING_NODE_SUPPLIED: 0 # servingNodeSupplied (0), -- For S-GW/P-GW
- SUBSCRIPTION_SPECIFIC: 1 # subscriptionSpecific (1), -- For SGSN only
- APN_SPECIFIC: 2 # aPNSpecific (2), -- For SGSN only
- HOME_DEFAULT: 3 # homeDefault (3), -- For SGSN, S-GW, P-GW, TDF and IP-Edge
- ROAMING_DEFAULT: 4 # roamingDefault (4), -- For SGSN, S-GW, P-GW, TDF and IP-Edge
- VISITING_DEFAULT: 5 # visitingDefault (5), -- For SGSN, S-GW, P-GW, TDF and IP-Edge
- FIXED_DEFAULT: 6 # fixedDefault (6) -- For TDF and IP-Edge
# Convert Preempt Capability
- name: "preempt-capability"
targetType: "integer"
map:
- NOT_PREEMPT: 0
- MAY_PREEMPT: 1
# Convert Preempt Vulnerability
- name: "preempt-vulnerability"
targetType: "integer"
map:
- NOT_PREEMPTABLE: 0
- PREEMPTABLE: 1