Mobile Session Inputs and Mappings

The TAP3 JSON Kafka CDR Consumer requires a specific JSON input format and mapping rules for mobile sessions.

Input Format

The following is an example messaging events JSON file. The JSON consists of only a subset of messaging event TAP3 definitions.
{
  "mobileSession": {
    "cellId": 6202,
    "serviceStartTimestamp": {
      "localTimeStamp": "20151203104920",
      "utcTimeOffset": "+0100"
    },
    "chargedParty": {
      "imsi": "250270700333276",
      "msisdn": "79083499160",
      "imei": "8663690213972323"
    },
    "requestedDestination": {
      "requestedNumber": "79869528070"
    },
    "sessionChargeInfoList": [
      {
        "chargedItem": "D",
        "chargeDetailList": [
          {
            "charge": 190.0,
            "chargeableUnits": 100
          }
        ]
      }
    ]
  }
}

Mapping Rules

Mapping Rules describes the mapping rules for processing the JSON input.
Table 1. Mapping Rules
JSON Field Required? Data Type MtxDiamRoMsg Field/Description Example
cellId N integer MtxDiamRoMsg.callingTowerId 6202
serviceStartTimestamp: Y
– localTimeStamp Y string MtxDiamRoMsg.eventTime

(Local timestamps are in YYYYMMDDhhmmss format.)

20151203104920
– utcTimeOffset Y string MtxDiamRoMsg.eventTime

(UTC time offsets are in +/-HHMM format within the range –1300 to +1400 in steps of 15MM (minutes).)

+0100
chargedParty: Y
– imsi Y string MtxDiamRoMsg.imsi 250270700333276
– msisdn N string MtxDiamRoMsg.accessNumber and MtxDiamRoMsg.callingStationId 79083499160
– imei N string MtxDiamRoMsg.deviceId 8663690213972323
requestedDestination: N
– requestedNumber N string MtxDiamRoMsg.calledStationId 79869528070
sessionChargeInfoList: N list
– chargedItem N Not used. Mobile Sessions are always voice usage.
The following fields are set for voice usage:
MtxDiamRoMsg.op = 4
MtxDiamRoMsg.serviceTypeObjectId = 3
D
– chargeDetailList N list
– – charge N number MtxDiamRoMsg.costInfo.unitValue 190.0
– – charge N integer The value is set on: MtxDiamRoMsg.multiServiceList[x].usedQuantityList[y].actualDurationQuantity
Extra values are set on:
MtxDiamRoMsg.multiServiceList[x].usedQuantityList[y].durationUnit = 100
MtxDiamRoMsg.multiServiceList[x].serviceId = 1
100

Example Mapped MtxDiamRoMsg Message

This example of an MtxDiamRoMsg message follows the mapping rules. The message is sent to MATRIXX Engine for rating:
{
  "$" : "MtxDiamRoMsg",
  "Op" : 4,
  "ApplicationId" : 3,
  "DiamOp" : 271,
  "SessionId" : "kafka-d3fddd168585-1662543322;5",
  "Imsi" : "250270700333276",
  "AccessNumber" : "79083499160",
  "DeviceId" : "8663690213972323",
  "ServiceTypeObjectId" : 3,
  "CallingStationId" : "79083499160",
  "CalledStationId" : "79869528070",
  "MultiServiceList" : [ {
    "$" : "MtxMultiServiceData",
    "UsedQuantityList" : [ {
      "$" : "MtxUsedQuantityData",
      "ActualDurationQuantity" : 100,
      "DurationUnit" : 100
    } ],
    "ServiceId" : 1
  } ],
  "EventTime" : "2015-12-03T10:49:20+01:00",
  "CallingTowerId" : 6202,
  "CostInfo" : {
    "$" : "MtxDiamCostInfoData",
    "UnitValue" : 190.0
  }
}