Update
Little correction, for API when manually trigger SessionSv1.ProcessCDR the ExtraFields are created, but no values preserved.
For diameter CDRs ExtraFields are not created at all.
Sessions ngrep
T 2020/01/16 12:52:14.332527 172.21.0.3:54382 -> 172.21.0.4:2012 [AP]
{
"method": "SessionSv1.ProcessCDR",
"params": [
{
"Tenant": "golant",
"ID": "aa8e1ac",
"Time": "2020-01-16T12:52:14.323731092Z",
"Event": {
"3GPP-Charging-Characteristics": "0600",
"3GPP-Charging-Id": "Q=EF=BF=BD\u0100\u020E",
"3GPP-GGSN-MCC-MNC": "918001",
"3GPP-IMSI-MCC-MNC": "75157",
"3GPP-MS-TimeZone": "=EF=BF=BD\u0001",
"3GPP-NSAPI": "4",
"3GPP-PDP-Type": "1",
"3GPP-RAT-Type": "\u0002",
"3GPP-SGSN-MCC-MNC": "75157",
"3GPP-Selection-Mode": "0",
"3GPP-User-Location-Info": "\u0001$=EF=BF=BD=EF=BF=BD=EF=BF=BDml=EF=BF=BD"=
,
"Account": "972523970022",
"AnswerTime": "2020-01-16T12:52:13Z",
"Called-Station-Id": "internet.example.net.ocs.prod",
"Category": "data",
"Destination": "75157",
"GGSN-Address": "1.2.3.4",
"LastUsed": 29590,
"OriginHost": "mscp01.PTmg01.example.net",
"OriginID": "PTmg01.example.net;04f21fcb;5e205c65;425089211494026-000751d5=
"
,
"PDP-Address": "41.127.254.26",
"Reporting-Reason": "2",
"RequestType": "*prepaid",
"SGSN-Address": "67.216.154.120",
"SetupTime": "2020-01-16T12:52:13Z",
"Tenant": "golant",
"Termination-Cause": "1",
"ToR": "*data"
}
}
],
"id": 29
}
#
T 2020/01/16 12:52:14.333257 172.20.0.2:51110 -> 172.20.0.6:2012 [AP]
{
"method": "CDRsV1.ProcessEvent",
"params": [
{
"Flags": [
"*chargers:false",
"*attributes:false"
],
"Tenant": "golant",
"ID": "c1c576c",
"Time": null,
"Event": {
"Account": "972523970022",
"AnswerTime": "2020-01-16T12:52:13Z",
"CGRID": "41e106e4d855a096404eacc2c54e720743e35dd5",
"Category": "data",
"Cost": 0,
"CostDetails":=20
"{\"CGRID\":\"41e106e4d855a096404eacc2c54e720743e35dd5\",\"RunID\":\"*defau=
lt\",\"StartTime\":\"2020-01-16T12:51:49Z\",\"Usage\":102400,\"Cost\":0,\"C=
harges\":[{\"RatingID\":\"17df465\",\"Increments\":[{\"Usage\":102400,\"Cos=
t\":0,\"AccountingID\":\"f9765aa\",\"CompressFactor\":1}],\"CompressFactor\=
":1}],\"AccountSummary\":{\"Tenant\":\"golant\",\"ID\":\"972523970022\",\"B=
alanceSummaries\":[{\"UUID\":\"2ef30e6d-0784-4b21-983a-8ea7f2ce8d51\",\"ID\=
":\"data\",\"Type\":\"*data\",\"Value\":9595785216,\"Disabled\":false},{\"U=
UID\":\"4ba2e3fa-94b0-4eae-a1e6-68cfedf49632\",\"ID\":\"sms\",\"Type\":\"*s=
ms\",\"Value\":1000,\"Disabled\":false},{\"UUID\":\"b8e19db4-db00-49a2-8be6=
-77022454d542\",\"ID\":\"voice\",\"Type\":\"*voice\",\"Value\":116267000000=
000,\"Disabled\":false}],\"AllowNegative\":false,\"Disabled\":false},\"Rati=
ng\":{\"17df465\":{\"ConnectFee\":0,\"RoundingMethod\":\"\",\"RoundingDecim=
als\":0,\"MaxCost\":0,\"MaxCostStrategy\":\"\",\"TimingID\":\"\",\"RatesID\=
":\"e6e0832\",\"RatingFiltersID\":\"da56bf1\"}},\"Accounting\":{\"f9765aa\"=
:{\"AccountID\":\"golant:972523970022\",\"BalanceUUID\":\"2ef30e6d-0784-4b2=
1-983a-8ea7f2ce8d51\",\"RatingID\":\"\",\"Units\":102400,\"ExtraChargeID\":=
\"*none\"}},\"RatingFilters\":{\"da56bf1\":{\"DestinationID\":\"DST_DATA_NA=
TIONAL\",\"DestinationPrefix\":\"75157\",\"RatingPlanID\":\"*none\",\"Subje=
ct\":\"2ef30e6d-0784-4b21-983a-8ea7f2ce8d51\"}},\"Rates\":{\"e6e0832\":[{\"=
GroupIntervalStart\":0,\"Value\":0,\"RateIncrement\":102400,\"RateUnit\":10=
2400}]},\"Timings\":{}}"
,
"CostSource": "*sessions",
"Destination": "75157",
"OriginHost": "mscp01.PTmg01.example.net",
"OriginID": "PTmg01.example.net;04f21fcb;5e205c65;425089211494026-000751d5=
"
,
"RequestType": "*prepaid",
"RunID": "*default",
"SetupTime": "2020-01-16T12:51:49Z",
"Tenant": "golant",
"ToR": "*data",
"Usage": 29590
}
}
],
"id": 1
}
Exported by post
{
"CGRID": "41e106e4d855a096404eacc2c54e720743e35dd5",
"RunID": "*default",
"OrderID": 0,
"OriginHost": "mscp01.PTmg01.golantelecom.net",
"Source": "",
"OriginID":=20
"PTmg01.golantelecom.net;04f21fcb;5e205c65;425089211494026-000751d5",
"ToR": "*data",
"RequestType": "*prepaid",
"Tenant": "golant",
"Category": "data",
"Account": "972523970022",
"Subject": "972523970022",
"Destination": "12323",
"SetupTime": "2020-01-16T12:51:49Z",
"AnswerTime": "2020-01-16T12:52:13Z",
"Usage": 29590,
"ExtraFields": {},
"ExtraInfo": "",
"Partial": false,
"PreRated": false,
"CostSource": "*sessions",
"Cost": 0,
"CostDetails": {
"CGRID": "41e106e4d855a096404eacc2c54e720743e35dd5",
"RunID": "*default",
"StartTime": "2020-01-16T12:51:49Z",
"Usage": 102400,
"Cost": 0,
"Charges": [
{
"RatingID": "17df465",
"Increments": [
{
"Usage": 102400,
"Cost": 0,
"AccountingID": "f9765aa",
"CompressFactor": 1
}
],
"CompressFactor": 1
}
],
"AccountSummary": {
"Tenant": "golant",
"ID": "972583970027",
"BalanceSummaries": [
{
"UUID": "2ef30e6d-0784-4b21-983a-8ea7f2ce8d51",
"ID": "data",
"Type": "*data",
"Value": 9595785216,
"Disabled": false
},
{
"UUID": "4ba2e3fa-94b0-4eae-a1e6-68cfedf49632",
"ID": "sms",
"Type": "*sms",
"Value": 1000,
"Disabled": false
},
{
"UUID": "b8e19db4-db00-49a2-8be6-77022454d542",
"ID": "voice",
"Type": "*voice",
"Value": 116267000000000,
"Disabled": false
}
],
"AllowNegative": false,
"Disabled": false
},
"Rating": {
"17df465": {
"ConnectFee": 0,
"RoundingMethod": "",
"RoundingDecimals": 0,
"MaxCost": 0,
"MaxCostStrategy": "",
"TimingID": "",
"RatesID": "e6e0832",
"RatingFiltersID": "da56bf1"
}
},
"Accounting": {
"f9765aa": {
"AccountID": "golant:972523970022",
"BalanceUUID": "2ef30e6d-0784-4b21-983a-8ea7f2ce8d51",
"RatingID": "",
"Units": 102400,
"ExtraChargeID": "*none"
}
},
"RatingFilters": {
"da56bf1": {
"DestinationID": "DST_DATA_NATIONAL",
"DestinationPrefix": "1234",
"RatingPlanID": "*none",
"Subject": "2ef30e6d-0784-4b21-983a-8ea7f2ce8d51"
}
},
"Rates": {
"e6e0832": [
{
"GroupIntervalStart": 0,
"Value": 0,
"RateIncrement": 102400,
"RateUnit": 102400
}
]
},
"Timings": {}
}
}
Here is my diameter config:
{
"id": "data_terminate",
"filters": ["*string:~*vars.*cmd:CCR",=20
"*string:~*req.CC-Request-Type:3",=20
"*string:~*req.Service-Co...@3gpp.org"],
"flags": ["*terminate", "*accounts", "*cdrs"],
"request_fields":[
{"tag": "TOR", =20
"field_id": "ToR", "type": "*constant", =20
"value": "*data", "mandatory": true},
{"tag": "OriginHost", =20
"field_id": "OriginHost", "type": "*composed", =20
"value": "~*req.Origin-Host", "mandatory": true},
{"tag": "OriginID", =20
"field_id": "OriginID", "type": "*composed", =20
"value": "~*req.Session-Id", "mandatory": true},
{"tag": "RequestType", =20
"field_id": "RequestType", "type": "*composed", =20
"value": "*prepaid", "mandatory": true},
{"tag": "Tenant", =20
"field_id": "Tenant", "type": "*composed", =20
"value": "golant", "mandatory": true},
{"tag": "Category", =20
"field_id": "Category", "type": "*constant", =20
"value": "data", "mandatory": true},
{"tag": "Account", =20
"field_id": "Account", "type": "*composed", =20
"value":=20
"~*req.Subscription-Id.Subscription-Id-Data[~Subscription-Id-Type(0)]" ,=20
"mandatory": true },
{"tag": "Destination", =20
"field_id": "Destination", "type": "*composed", =20
"value": "~*req.Service-Information.PS-Information.3GPP-SGSN-MCC-MNC",=20
"mandatory": true},
{"tag": "SetupTime", =20
"field_id": "SetupTime", "type": "*composed", =20
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "AnswerTime", =20
"field_id": "AnswerTime", "type": "*composed", =20
"value": "~*req.Event-Timestamp", "mandatory": true},
{"tag": "Reporting-Reason", "field_id":=20
"Reporting-Reason", "type": "*composed",=20
=20
//"filters": ["*rsr::~*req.Multiple-Services-Credit-Control.Reporting-Reaso=
n[~Rating-Group(1)](!^$)"],
"value":=20
"~*req.Multiple-Services-Credit-Control.Reporting-Reason[~Rating-Group(1)]"
, "mandatory": false},
{"tag": "Reporting-Reason", "field_id":=20
"Reporting-Reason", "type": "*composed",=20
=20
//"filters": ["*rsr::~*req.Multiple-Services-Credit-Control.Used-Service-Un=
it.Reporting-Reason[~Rating-Group(1)](!^$)"],
"value":=20
"~*req.Multiple-Services-Credit-Control.Used-Service-Unit.Reporting-Reason[=
~Rating-Group(1)]"
, "mandatory": false},
{"tag": "Termination-Cause", "field_id":=20
"Termination-Cause", "type": "*composed", "value": "~*req.Termination-Cause=
"
, "mandatory": true},
{"tag": "LastUsed", "field_id": "LastUsed"
, "type": "*sum",=20
"value":=20
"~*req.Multiple-Services-Credit-Control.Used-Service-Unit.CC-Input-Octets[~=
Rating-Group(1)];~*req.Multiple-Services-Credit-Control.Used-Service-Unit.C=
C-Output-Octets[~Rating-Group(1)]"
},=20
{"tag": "Called-Station-Id", =20
"field_id": "Called-Station-Id", "type": "*composed", =20
"value": "~*req.Service-Information.PS-Information.Called-Station-Id"
, "mandatory": false},
{"tag": "3GPP-Charging-Id", =20
"field_id": "3GPP-Charging-Id", "type": "*composed", =20
"value": "~*req.Service-Information.PS-Information.3GPP-Charging-Id"
, "mandatory": false},
{"tag": "3GPP-GPRS-Negotiated-QoS-profile", =20
"field_id": "3GPP-GPRS-Negotiated-QoS-profile", "type": "*composed", =20
"value":=20
"~*req.Service-Information.PS-Information.3GPP-GPRS-Negotiated-QoS-profile"
, "mandatory": false},
{"tag": "3GPP-Charging-Characteristics", =20
"field_id": "3GPP-Charging-Characteristics", "type": "*composed", =20
"value":=20
"~*req.Service-Information.PS-Information.3GPP-Charging-Characteristics"
, "mandatory": false},
{"tag": "3GPP-PDP-Type", =20
"field_id": "3GPP-PDP-Type", "type": "*composed", =20
"value": "~*req.Service-Information.PS-Information.3GPP-PDP-Type"
, "mandatory": false},
{"tag": "GPP-SGSN-MCC-MNC", =20
"field_id": "3GPP-SGSN-MCC-MNC", "type": "*composed", =20
"value": "~*req.Service-Information.PS-Information.3GPP-SGSN-MCC-MNC"
, "mandatory": false},
{"tag": "3GPP-GGSN-MCC-MNC", =20
"field_id": "3GPP-GGSN-MCC-MNC", "type": "*composed", =20
"value": "~*req.Service-Information.PS-Information.3GPP-GGSN-MCC-MNC"
, "mandatory": false},
{"tag": "3GPP-NSAPI", =20
"field_id": "3GPP-NSAPI", "type": "*composed", =20
"value": "~*req.Service-Information.PS-Information.3GPP-NSAPI"
, "mandatory": false},
=20
//{"tag": "3GPP-Session-Stop-Indicator", "field_id": "3GPP-Session-=
Stop-Indicator", "type": "*composed", "value": "~*req.Service-Info=
rmation.PS-Information.3GPP-Session-Stop-Indicator", "mandatory": =
false},
{"tag": "3GPP-MS-TimeZone", =20
"field_id": "3GPP-MS-TimeZone", "type": "*composed", =20
"value": "~*req.Service-Information.PS-Information.3GPP-MS-TimeZone"
, "mandatory": false},
{"tag": "3GPP-Selection-Mode", =20
"field_id": "3GPP-Selection-Mode", "type": "*composed", =20
"value": "~*req.Service-Information.PS-Information.3GPP-Selection-Mode"
, "mandatory": false},
{"tag": "3GPP-RAT-Type", =20
"field_id": "3GPP-RAT-Type", "type": "*composed", =20
"value": "~*req.Service-Information.PS-Information.3GPP-RAT-Type"
, "mandatory": false},
{"tag": "3GPP-User-Location-Info", =20
"field_id": "3GPP-User-Location-Info", "type": "*composed", =20
"value": "~*req.Service-Information.PS-Information.3GPP-User-Location-Info"
, "mandatory": false},
{"tag": "PDP-Address", =20
"field_id": "PDP-Address", "type": "*composed", =20
"value": "~*req.Service-Information.PS-Information.PDP-Address"
, "mandatory": false},
{"tag": "3GPP-IMSI-MCC-MNC", =20
"field_id": "3GPP-IMSI-MCC-MNC", "type": "*composed", =20
"value": "~*req.Service-Information.PS-Information.3GPP-IMSI-MCC-MNC"
, "mandatory": false},
{"tag": "GGSN-Address", =20
"field_id": "GGSN-Address", "type": "*composed", =20
"value": "~*req.Service-Information.PS-Information.GGSN-Address"
, "mandatory": false},
{"tag": "SGSN-Address", =20
"field_id": "SGSN-Address", "type": "*composed", =20
"value": "~*req.Service-Information.PS-Information.SGSN-Address"
, "mandatory": false},
=20
//{"tag": "Charging-Rule-Base-Name", "field_id": "Charging-Rule=
-Base-Name", "type": "*composed", "value": "~*req.Service-Info=
rmation.PS-Information.Charging-Rule-Base-Name", "mandatory": =
false},
=20
//{"tag": "PDP-Context-Type", "field_id": "PDP-Context-T=
ype", "type": "*composed", "value": "~*req.Service-Info=
rmation.PS-Information.PDP-Context-Type", "mandatory": =
false}
],
"reply_fields": [
{"tag": "CCATemplate", "type": "*template", "value=
"
: "*cca"},
{"tag": "ResultCode", "field_id": "Result-Code",=
=20
"type": "*constant", "value": "2001", "filters": ["*empty:~*cgrep.Error:"]}=
,
]
}
CDRE Config:
"cdre": {
"data_exports": {
"export_format":"*http_json_cdr", =20
"export_path":"http://example.com/processor/api/processCdr",
"filters" :["*string:~*req.RunID:*default","*string:~*req.ToR:*data"],
},
},
Is that correct ?
Michael