mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Update EventReader integration tests
This commit is contained in:
committed by
Dan Christian Bogos
parent
aa6d5a5450
commit
b85ebe8214
@@ -95,20 +95,20 @@
|
||||
"flags": ["*dryrun"],
|
||||
"processed_path": "/tmp/ers2/out",
|
||||
"fields":[
|
||||
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*variable", "value": "~*req.1", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.2", "mandatory": true},
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Subject", "path": "Subject", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable", "value": "~*req.4:s/0([1-9]\\d+)/+49${1}/", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra3", "path": "HDRExtra3", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra2", "path": "HDRExtra2", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra1", "path": "HDRExtra1", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*variable", "value": "~*req.1", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*variable", "value": "~*req.2", "mandatory": true},
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.4:s/0([1-9]\\d+)/+49${1}/", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra3", "path": "*cgreq.HDRExtra3", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra2", "path": "*cgreq.HDRExtra2", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra1", "path": "*cgreq.HDRExtra1", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -120,17 +120,17 @@
|
||||
"flags": ["*initiate","*accounts","*resources","*attributes","*log"],
|
||||
"processed_path": "/tmp/init_session/out",
|
||||
"fields":[ // import content_fields template, tag will match internally CDR field, in case of .csv value will be represented by index of the field value
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable", "value": "~*req.2", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "Subject", "path": "Subject", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable", "value": "~*req.7", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable", "value": "~*req.8", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable", "value": "~*req.9", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable", "value": "~*req.2", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable", "value": "~*req.7", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.8", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable", "value": "~*req.9", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -142,10 +142,10 @@
|
||||
"flags": ["*terminate","*accounts","*resources","*log"],
|
||||
"processed_path": "/tmp/terminate_session/out",
|
||||
"fields":[ // import content_fields template, tag will match internally CDR field, in case of .csv value will be represented by index of the field value
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable", "value": "~*req.2", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable", "value": "~*req.9", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable", "value": "~*req.2", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable", "value": "~*req.9", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -157,19 +157,19 @@
|
||||
"flags": ["*cdrs","*log"],
|
||||
"processed_path": "/tmp/cdrs/out",
|
||||
"fields":[ // import content_fields template, tag will match internally CDR field, in case of .csv value will be represented by index of the field value
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable", "value": "~*req.2", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "Subject", "path": "Subject", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable", "value": "~*req.7", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable", "value": "~*req.8", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable", "value": "~*req.9", "mandatory": true},
|
||||
{"tag": "ExtraInfo1", "path": "ExtraInfo1", "type": "*constant", "value": "ExtraInfo1", "mandatory": true},
|
||||
{"tag": "ExtraInfo2", "path": "ExtraInfo2", "type": "*constant", "value": "ExtraInfo2", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable", "value": "~*req.2", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable", "value": "~*req.7", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.8", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable", "value": "~*req.9", "mandatory": true},
|
||||
{"tag": "ExtraInfo1", "path": "*cgreq.ExtraInfo1", "type": "*constant", "value": "ExtraInfo1", "mandatory": true},
|
||||
{"tag": "ExtraInfo2", "path": "*cgreq.ExtraInfo2", "type": "*constant", "value": "ExtraInfo2", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -182,21 +182,21 @@
|
||||
"flags": ["*cdrs","*log"],
|
||||
"filters":["*string:~*req.3:1002"],
|
||||
"fields":[
|
||||
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*variable", "value": "~*req.1", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.2", "mandatory": true},
|
||||
{"tag": "Category", "path": "Category", "type": "*variable", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Source", "path": "Source", "type": "*constant", "value": "ers_csv", "mandatory": true},
|
||||
{"tag": "Subject", "path": "Subject", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable", "value": "~*req.4:s/0([1-9]\\d+)/+49${1}/", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra3", "path": "HDRExtra3", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra2", "path": "HDRExtra2", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra1", "path": "HDRExtra1", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*variable", "value": "~*req.1", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*variable", "value": "~*req.2", "mandatory": true},
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*variable", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Source", "path": "*cgreq.Source", "type": "*constant", "value": "ers_csv", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.4:s/0([1-9]\\d+)/+49${1}/", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra3", "path": "*cgreq.HDRExtra3", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra2", "path": "*cgreq.HDRExtra2", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra1", "path": "*cgreq.HDRExtra1", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -208,16 +208,16 @@
|
||||
"processed_path": "/tmp/xmlErs/out",
|
||||
"xml_root_path": "broadWorksCDR.cdrData",
|
||||
"fields":[
|
||||
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.localCallId", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*rated", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.userId:s/.*@(.*)/${1}/", "mandatory": true},
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.userNumber", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.calledNumber", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.startTime", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.answerTime", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*usage_difference", "value": "~*req.broadWorksCDR.cdrData.basicModule.releaseTime;~*req.broadWorksCDR.cdrData.basicModule.answerTime", "mandatory": true}
|
||||
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.localCallId", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*rated", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.userId:s/.*@(.*)/${1}/", "mandatory": true},
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.userNumber", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.calledNumber", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.startTime", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.answerTime", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*usage_difference", "value": "~*req.broadWorksCDR.cdrData.basicModule.releaseTime;~*req.broadWorksCDR.cdrData.basicModule.answerTime", "mandatory": true}
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -229,27 +229,27 @@
|
||||
"processed_path": "/tmp/fwvErs/out",
|
||||
"fields": [
|
||||
{"tag": "FileName", "path": "*cgreq.CdrFileName", "type": "*variable", "value": "~*hdr.95-135", "padding":"right"},
|
||||
{"tag": "FileSeqNr", "path": "FileSeqNr", "type": "*variable", "value": "~*hdr.135-141", "padding":"zeroleft"},
|
||||
{"tag": "AccId1", "path": "AccId1", "type": "*variable", "value": "~*hdr.135-141", "padding":"zeroleft"},
|
||||
{"tag": "Tor", "path": "ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "rated", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable", "value": "~*req.0-10", "padding":"right", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "OriginHost", "type": "*constant", "value": "0.0.0.0", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*constant", "value": "cgrates.org", "mandatory": true},
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable", "value": "~*req.30-49", "padding":"right", "mandatory": true},
|
||||
{"tag": "Subject", "path": "Subject", "type": "*variable", "value": "~*req.30-49", "padding":"right", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable", "value": "~*req.52-80", "padding":"right", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable", "value": "~*req.14-30:s/(\\d{4})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})/${1}-${2}-${3} ${4}:${5}:${6}/", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable", "value": "~*req.14-30:s/(\\d{4})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})/${1}-${2}-${3} ${4}:${5}:${6}/", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable", "value": "~*req.127-135:s/(\\d{2})(\\d{2})(\\d{2})(\\d{2})/${1}h${2}m${3}s/", "mandatory": true},
|
||||
{"tag": "DisconnectCause", "path": "DisconnectCause", "type": "*variable", "value": "~*req.138-139", "mandatory": true},
|
||||
{"tag": "RetailAmount", "path": "RetailAmount", "type": "*variable", "value": "~*req.103-111", "padding":"zeroleft"},
|
||||
{"tag": "WholesaleAmount", "path": "RetailAmount", "type": "*variable", "value": "~*req.115-123", "padding":"zeroleft"},
|
||||
{"tag": "AccId1", "path": "AccId1", "type": "*variable", "value": "~*req.3-6", "padding":"zeroleft", "mandatory": true},
|
||||
{"tag": "AccId2", "path": "AccId2", "type": "*variable", "value": "~*req.14-30", "padding":"right", "mandatory": true},
|
||||
{"tag": "NrOfCdrs", "type": "*variable", "path":"NrOfCdrs", "value": "~*trl.142-150"},
|
||||
{"tag": "TotalDuration", "type": "*variable", "path":"TotalDuration", "value": "~*trl.150-162"}
|
||||
{"tag": "FileSeqNr", "path": "*cgreq.FileSeqNr", "type": "*variable", "value": "~*hdr.135-141", "padding":"zeroleft"},
|
||||
{"tag": "AccId1", "path": "*cgreq.AccId1", "type": "*variable", "value": "~*hdr.135-141", "padding":"zeroleft"},
|
||||
{"tag": "Tor", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "rated", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable", "value": "~*req.0-10", "padding":"right", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*constant", "value": "0.0.0.0", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*constant", "value": "cgrates.org", "mandatory": true},
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.30-49", "padding":"right", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable", "value": "~*req.30-49", "padding":"right", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.52-80", "padding":"right", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable", "value": "~*req.14-30:s/(\\d{4})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})/${1}-${2}-${3} ${4}:${5}:${6}/", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.14-30:s/(\\d{4})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})/${1}-${2}-${3} ${4}:${5}:${6}/", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable", "value": "~*req.127-135:s/(\\d{2})(\\d{2})(\\d{2})(\\d{2})/${1}h${2}m${3}s/", "mandatory": true},
|
||||
{"tag": "DisconnectCause", "path": "*cgreq.DisconnectCause", "type": "*variable", "value": "~*req.138-139", "mandatory": true},
|
||||
{"tag": "RetailAmount", "path": "*cgreq.RetailAmount", "type": "*variable", "value": "~*req.103-111", "padding":"zeroleft"},
|
||||
{"tag": "WholesaleAmount", "path": "*cgreq.RetailAmount", "type": "*variable", "value": "~*req.115-123", "padding":"zeroleft"},
|
||||
{"tag": "AccId1", "path": "*cgreq.AccId1", "type": "*variable", "value": "~*req.3-6", "padding":"zeroleft", "mandatory": true},
|
||||
{"tag": "AccId2", "path": "*cgreq.AccId2", "type": "*variable", "value": "~*req.14-30", "padding":"right", "mandatory": true},
|
||||
{"tag": "NrOfCdrs", "type": "*variable", "path":"*cgreq.NrOfCdrs", "value": "~*trl.142-150"},
|
||||
{"tag": "TotalDuration", "type": "*variable", "path":"*cgreq.TotalDuration", "value": "~*trl.150-162"}
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -263,34 +263,34 @@
|
||||
"partial_record_cache": "2s",
|
||||
"partial_cache_expiry_action": "*dump_to_file",
|
||||
"fields":[
|
||||
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "AccId1", "path": "OriginID", "type": "*composed", "value": "~*req.0"},
|
||||
{"tag": "AccId2", "path": "OriginID", "type": "*composed", "value": "_"},
|
||||
{"tag": "AccId3", "path": "OriginID", "type": "*composed", "value": "~*req.1"},
|
||||
{"tag": "AccId4", "path": "OriginID", "type": "*composed", "value": "_"},
|
||||
{"tag": "AccId5", "path": "OriginID", "type": "*composed", "value": "~*req.4"},
|
||||
{"tag": "OrderID", "path": "OrderID", "type": "*unix_timestamp", "value": "~*req.3"},
|
||||
{"tag": "OriginHost", "path": "OriginHost", "type": "*constant", "value": "127.0.0.1", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*rated", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*constant", "value": "cgrates.org", "mandatory": true},
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable", "value": "~*req.0:s/^49([1-9]\\d+)$/0$1/", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable", "value": "~*req.1:s/^00(\\d+)$/+$1/", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable", "value": "~*req.6:s/^(\\d+)$/${1}s/", "mandatory": true},
|
||||
{"tag": "Partial", "path": "Partial", "type": "*constant", "value": "true", "filters":["*string:~*req.10:partial"]},
|
||||
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "AccId1", "path": "*cgreq.OriginID", "type": "*composed", "value": "~*req.0"},
|
||||
{"tag": "AccId2", "path": "*cgreq.OriginID", "type": "*composed", "value": "_"},
|
||||
{"tag": "AccId3", "path": "*cgreq.OriginID", "type": "*composed", "value": "~*req.1"},
|
||||
{"tag": "AccId4", "path": "*cgreq.OriginID", "type": "*composed", "value": "_"},
|
||||
{"tag": "AccId5", "path": "*cgreq.OriginID", "type": "*composed", "value": "~*req.4"},
|
||||
{"tag": "OrderID", "path": "*cgreq.OrderID", "type": "*unix_timestamp", "value": "~*req.3"},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*constant", "value": "127.0.0.1", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*rated", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*constant", "value": "cgrates.org", "mandatory": true},
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.0:s/^49([1-9]\\d+)$/0$1/", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.1:s/^00(\\d+)$/+$1/", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable", "value": "~*req.6:s/^(\\d+)$/${1}s/", "mandatory": true},
|
||||
{"tag": "Partial", "path": "*cgreq.Partial", "type": "*constant", "value": "true", "filters":["*string:~*req.10:partial"]},
|
||||
],
|
||||
"cache_dump_fields": [
|
||||
{"tag": "OriginID", "type": "*composed", "value": "~OriginID"},
|
||||
{"tag": "OrderID", "type": "*composed", "value": "~OrderID"},
|
||||
{"tag": "RequestType", "type": "*composed", "value": "~RequestType"},
|
||||
{"tag": "Account", "type": "*composed", "value": "~Account"},
|
||||
{"tag": "Destination", "type": "*composed", "value": "~Destination"},
|
||||
{"tag": "SetupTime", "type": "*composed", "value": "~SetupTime", "layout": "2006-01-02T15:04:05Z07:00"},
|
||||
{"tag": "AnswerTime", "type": "*composed", "value": "~AnswerTime", "layout": "2006-01-02T15:04:05Z07:00"},
|
||||
{"tag": "Usage", "type": "*composed", "value": "~Usage"},
|
||||
{"tag": "Cost", "type": "*composed", "value": "~Cost","rounding_decimals":5},
|
||||
{"tag": "OriginID", "path":"*exp", "type": "*composed", "value": "~*req.OriginID"},
|
||||
{"tag": "OrderID", "path":"*exp", "type": "*composed", "value": "~*req.OrderID"},
|
||||
{"tag": "RequestType", "path":"*exp", "type": "*composed", "value": "~*req.RequestType"},
|
||||
{"tag": "Account", "path":"*exp", "type": "*composed", "value": "~*req.Account"},
|
||||
{"tag": "Destination", "path":"*exp", "type": "*composed", "value": "~*req.Destination"},
|
||||
{"tag": "SetupTime", "path":"*exp", "type": "*composed", "value": "~*req.SetupTime", "layout": "2006-01-02T15:04:05Z07:00"},
|
||||
{"tag": "AnswerTime", "path":"*exp", "type": "*composed", "value": "~*req.AnswerTime", "layout": "2006-01-02T15:04:05Z07:00"},
|
||||
{"tag": "Usage", "path":"*exp", "type": "*composed", "value": "~*req.Usage"},
|
||||
{"tag": "Cost", "path":"*exp", "type": "*composed", "value": "~*req.Cost","rounding_decimals":5},
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -304,23 +304,23 @@
|
||||
"partial_record_cache": "1s",
|
||||
"partial_cache_expiry_action": "*post_cdr",
|
||||
"fields":[
|
||||
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "AccId1", "path": "OriginID", "type": "*composed", "value": "~*req.0"},
|
||||
{"tag": "AccId2", "path": "OriginID", "type": "*composed", "value": "_"},
|
||||
{"tag": "AccId3", "path": "OriginID", "type": "*composed", "value": "~*req.1"},
|
||||
{"tag": "AccId4", "path": "OriginID", "type": "*composed", "value": "_"},
|
||||
{"tag": "AccId5", "path": "OriginID", "type": "*composed", "value": "~*req.4"},
|
||||
{"tag": "OrderID", "path": "OrderID", "type": "*unix_timestamp", "value": "~*req.3"},
|
||||
{"tag": "OriginHost", "path": "OriginHost", "type": "*constant", "value": "127.0.0.1", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*rated", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*constant", "value": "cgrates.org", "mandatory": true},
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable", "value": "~*req.0:s/^49([1-9]\\d+)$/0$1/", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable", "value": "~*req.1:s/^00(\\d+)$/+$1/", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable", "value": "~*req.6:s/^(\\d+)$/${1}s/", "mandatory": true},
|
||||
{"tag": "Partial", "path": "Partial", "type": "*constant", "value": "true", "filters":["*string:~*req.10:partial"]}
|
||||
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "AccId1", "path": "*cgreq.OriginID", "type": "*composed", "value": "~*req.0"},
|
||||
{"tag": "AccId2", "path": "*cgreq.OriginID", "type": "*composed", "value": "_"},
|
||||
{"tag": "AccId3", "path": "*cgreq.OriginID", "type": "*composed", "value": "~*req.1"},
|
||||
{"tag": "AccId4", "path": "*cgreq.OriginID", "type": "*composed", "value": "_"},
|
||||
{"tag": "AccId5", "path": "*cgreq.OriginID", "type": "*composed", "value": "~*req.4"},
|
||||
{"tag": "OrderID", "path": "*cgreq.OrderID", "type": "*unix_timestamp", "value": "~*req.3"},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*constant", "value": "127.0.0.1", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*rated", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*constant", "value": "cgrates.org", "mandatory": true},
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.0:s/^49([1-9]\\d+)$/0$1/", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.1:s/^00(\\d+)$/+$1/", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable", "value": "~*req.6:s/^(\\d+)$/${1}s/", "mandatory": true},
|
||||
{"tag": "Partial", "path": "*cgreq.Partial", "type": "*constant", "value": "true", "filters":["*string:~*req.10:partial"]}
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -335,19 +335,19 @@
|
||||
"flags": ["*cdrs"],
|
||||
"partial_record_cache": "2s",
|
||||
"fields":[
|
||||
{"tag": "Tor", "path": "ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable","value":"~*req.3;~*req.1;~*req.2", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*variable", "value": "~*req.7", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*constant", "value": "cgrates.org", "mandatory": true},
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable", "value": "~*req.8", "mandatory": true},
|
||||
{"tag": "Subject", "path": "Subject", "type": "*variable", "value": "~*req.8", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable", "value": "~*req.9", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable", "mandatory": true}, // Value for Usage is composed based on record
|
||||
{"tag": "DisconnectCause", "path": "DisconnectCause", "type": "*variable", "value": "~*req.4; ;~*req.5", "mandatory": true},
|
||||
{"tag": "DialogId", "path": "DialogId", "type": "*variable", "value": "~*req.11"}
|
||||
{"tag": "Tor", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable","value":"~*req.3;~*req.1;~*req.2", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*variable", "value": "~*req.7", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*constant", "value": "cgrates.org", "mandatory": true},
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.8", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable", "value": "~*req.8", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.9", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable", "mandatory": true}, // Value for Usage is composed based on record
|
||||
{"tag": "DisconnectCause", "path": "*cgreq.DisconnectCause", "type": "*variable", "value": "~*req.4; ;~*req.5", "mandatory": true},
|
||||
{"tag": "DialogId", "path": "*cgreq.DialogId", "type": "*variable", "value": "~*req.11"}
|
||||
],
|
||||
}
|
||||
],
|
||||
|
||||
@@ -96,20 +96,20 @@
|
||||
"flags": ["*dryrun"],
|
||||
"processed_path": "/tmp/ers2/out",
|
||||
"fields":[
|
||||
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*variable", "value": "~*req.1", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.2", "mandatory": true},
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Subject", "path": "Subject", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable", "value": "~*req.4:s/0([1-9]\\d+)/+49${1}/", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra3", "path": "HDRExtra3", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra2", "path": "HDRExtra2", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra1", "path": "HDRExtra1", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*variable", "value": "~*req.1", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*variable", "value": "~*req.2", "mandatory": true},
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.4:s/0([1-9]\\d+)/+49${1}/", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra3", "path": "*cgreq.HDRExtra3", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra2", "path": "*cgreq.HDRExtra2", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra1", "path": "*cgreq.HDRExtra1", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -121,17 +121,17 @@
|
||||
"flags": ["*initiate","*accounts","*resources","*attributes","*log"],
|
||||
"processed_path": "/tmp/init_session/out",
|
||||
"fields":[ // import content_fields template, tag will match internally CDR field, in case of .csv value will be represented by index of the field value
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable", "value": "~*req.2", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "Subject", "path": "Subject", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable", "value": "~*req.7", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable", "value": "~*req.8", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable", "value": "~*req.9", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable", "value": "~*req.2", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable", "value": "~*req.7", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.8", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable", "value": "~*req.9", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -143,10 +143,10 @@
|
||||
"flags": ["*terminate","*accounts","*resources","*log"],
|
||||
"processed_path": "/tmp/terminate_session/out",
|
||||
"fields":[ // import content_fields template, tag will match internally CDR field, in case of .csv value will be represented by index of the field value
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable", "value": "~*req.2", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable", "value": "~*req.9", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable", "value": "~*req.2", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable", "value": "~*req.9", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -158,19 +158,19 @@
|
||||
"flags": ["*cdrs","*log"],
|
||||
"processed_path": "/tmp/cdrs/out",
|
||||
"fields":[ // import content_fields template, tag will match internally CDR field, in case of .csv value will be represented by index of the field value
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable", "value": "~*req.2", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "Subject", "path": "Subject", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable", "value": "~*req.7", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable", "value": "~*req.8", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable", "value": "~*req.9", "mandatory": true},
|
||||
{"tag": "ExtraInfo1", "path": "ExtraInfo1", "type": "*constant", "value": "ExtraInfo1", "mandatory": true},
|
||||
{"tag": "ExtraInfo2", "path": "ExtraInfo2", "type": "*constant", "value": "ExtraInfo2", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable", "value": "~*req.2", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable", "value": "~*req.7", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.8", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable", "value": "~*req.9", "mandatory": true},
|
||||
{"tag": "ExtraInfo1", "path": "*cgreq.ExtraInfo1", "type": "*constant", "value": "ExtraInfo1", "mandatory": true},
|
||||
{"tag": "ExtraInfo2", "path": "*cgreq.ExtraInfo2", "type": "*constant", "value": "ExtraInfo2", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -182,22 +182,22 @@
|
||||
"processed_path": "/tmp/ers_with_filters/out",
|
||||
"flags": ["*cdrs","*log"],
|
||||
"filters":["*string:~*req.3:1002"],
|
||||
"fields":[ // import content_fields template, tag will match internally CDR field, in case of .csv value will be represented by index of the field value
|
||||
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*variable", "value": "~*req.1", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.2", "mandatory": true},
|
||||
{"tag": "Category", "path": "Category", "type": "*variable", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Source", "path": "Source", "type": "*constant", "value": "ers_csv", "mandatory": true},
|
||||
{"tag": "Subject", "path": "Subject", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable", "value": "~*req.4:s/0([1-9]\\d+)/+49${1}/", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra3", "path": "HDRExtra3", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra2", "path": "HDRExtra2", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra1", "path": "HDRExtra1", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
"fields":[
|
||||
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*variable", "value": "~*req.1", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*variable", "value": "~*req.2", "mandatory": true},
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*variable", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Source", "path": "*cgreq.Source", "type": "*constant", "value": "ers_csv", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.4:s/0([1-9]\\d+)/+49${1}/", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra3", "path": "*cgreq.HDRExtra3", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra2", "path": "*cgreq.HDRExtra2", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra1", "path": "*cgreq.HDRExtra1", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -209,16 +209,16 @@
|
||||
"processed_path": "/tmp/xmlErs/out",
|
||||
"xml_root_path": "broadWorksCDR.cdrData",
|
||||
"fields":[
|
||||
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.localCallId", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*rated", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.userId:s/.*@(.*)/${1}/", "mandatory": true},
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.userNumber", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.calledNumber", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.startTime", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.answerTime", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*usage_difference", "value": "~*req.broadWorksCDR.cdrData.basicModule.releaseTime;~*req.broadWorksCDR.cdrData.basicModule.answerTime", "mandatory": true}
|
||||
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.localCallId", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*rated", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.userId:s/.*@(.*)/${1}/", "mandatory": true},
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.userNumber", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.calledNumber", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.startTime", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.answerTime", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*usage_difference", "value": "~*req.broadWorksCDR.cdrData.basicModule.releaseTime;~*req.broadWorksCDR.cdrData.basicModule.answerTime", "mandatory": true}
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -230,27 +230,27 @@
|
||||
"processed_path": "/tmp/fwvErs/out",
|
||||
"fields": [
|
||||
{"tag": "FileName", "path": "*cgreq.CdrFileName", "type": "*variable", "value": "~*hdr.95-135", "padding":"right"},
|
||||
{"tag": "FileSeqNr", "path": "FileSeqNr", "type": "*variable", "value": "~*hdr.135-141", "padding":"zeroleft"},
|
||||
{"tag": "AccId1", "path": "AccId1", "type": "*variable", "value": "~*hdr.135-141", "padding":"zeroleft"},
|
||||
{"tag": "Tor", "path": "ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "rated", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable", "value": "~*req.0-10", "padding":"right", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "OriginHost", "type": "*constant", "value": "0.0.0.0", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*constant", "value": "cgrates.org", "mandatory": true},
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable", "value": "~*req.30-49", "padding":"right", "mandatory": true},
|
||||
{"tag": "Subject", "path": "Subject", "type": "*variable", "value": "~*req.30-49", "padding":"right", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable", "value": "~*req.52-80", "padding":"right", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable", "value": "~*req.14-30:s/(\\d{4})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})/${1}-${2}-${3} ${4}:${5}:${6}/", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable", "value": "~*req.14-30:s/(\\d{4})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})/${1}-${2}-${3} ${4}:${5}:${6}/", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable", "value": "~*req.127-135:s/(\\d{2})(\\d{2})(\\d{2})(\\d{2})/${1}h${2}m${3}s/", "mandatory": true},
|
||||
{"tag": "DisconnectCause", "path": "DisconnectCause", "type": "*variable", "value": "~*req.138-139", "mandatory": true},
|
||||
{"tag": "RetailAmount", "path": "RetailAmount", "type": "*variable", "value": "~*req.103-111", "padding":"zeroleft"},
|
||||
{"tag": "WholesaleAmount", "path": "RetailAmount", "type": "*variable", "value": "~*req.115-123", "padding":"zeroleft"},
|
||||
{"tag": "AccId1", "path": "AccId1", "type": "*variable", "value": "~*req.3-6", "padding":"zeroleft", "mandatory": true},
|
||||
{"tag": "AccId2", "path": "AccId2", "type": "*variable", "value": "~*req.14-30", "padding":"right", "mandatory": true},
|
||||
{"tag": "NrOfCdrs", "type": "*variable", "path":"NrOfCdrs", "value": "~*trl.142-150"},
|
||||
{"tag": "TotalDuration", "type": "*variable", "path":"TotalDuration", "value": "~*trl.150-162"}
|
||||
{"tag": "FileSeqNr", "path": "*cgreq.FileSeqNr", "type": "*variable", "value": "~*hdr.135-141", "padding":"zeroleft"},
|
||||
{"tag": "AccId1", "path": "*cgreq.AccId1", "type": "*variable", "value": "~*hdr.135-141", "padding":"zeroleft"},
|
||||
{"tag": "Tor", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "rated", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable", "value": "~*req.0-10", "padding":"right", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*constant", "value": "0.0.0.0", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*constant", "value": "cgrates.org", "mandatory": true},
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.30-49", "padding":"right", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable", "value": "~*req.30-49", "padding":"right", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.52-80", "padding":"right", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable", "value": "~*req.14-30:s/(\\d{4})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})/${1}-${2}-${3} ${4}:${5}:${6}/", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.14-30:s/(\\d{4})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})/${1}-${2}-${3} ${4}:${5}:${6}/", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable", "value": "~*req.127-135:s/(\\d{2})(\\d{2})(\\d{2})(\\d{2})/${1}h${2}m${3}s/", "mandatory": true},
|
||||
{"tag": "DisconnectCause", "path": "*cgreq.DisconnectCause", "type": "*variable", "value": "~*req.138-139", "mandatory": true},
|
||||
{"tag": "RetailAmount", "path": "*cgreq.RetailAmount", "type": "*variable", "value": "~*req.103-111", "padding":"zeroleft"},
|
||||
{"tag": "WholesaleAmount", "path": "*cgreq.RetailAmount", "type": "*variable", "value": "~*req.115-123", "padding":"zeroleft"},
|
||||
{"tag": "AccId1", "path": "*cgreq.AccId1", "type": "*variable", "value": "~*req.3-6", "padding":"zeroleft", "mandatory": true},
|
||||
{"tag": "AccId2", "path": "*cgreq.AccId2", "type": "*variable", "value": "~*req.14-30", "padding":"right", "mandatory": true},
|
||||
{"tag": "NrOfCdrs", "type": "*variable", "path":"*cgreq.NrOfCdrs", "value": "~*trl.142-150"},
|
||||
{"tag": "TotalDuration", "type": "*variable", "path":"*cgreq.TotalDuration", "value": "~*trl.150-162"}
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -264,34 +264,34 @@
|
||||
"partial_record_cache": "2s",
|
||||
"partial_cache_expiry_action": "*dump_to_file",
|
||||
"fields":[
|
||||
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "AccId1", "path": "OriginID", "type": "*composed", "value": "~*req.0"},
|
||||
{"tag": "AccId2", "path": "OriginID", "type": "*composed", "value": "_"},
|
||||
{"tag": "AccId3", "path": "OriginID", "type": "*composed", "value": "~*req.1"},
|
||||
{"tag": "AccId4", "path": "OriginID", "type": "*composed", "value": "_"},
|
||||
{"tag": "AccId5", "path": "OriginID", "type": "*composed", "value": "~*req.4"},
|
||||
{"tag": "OrderID", "path": "OrderID", "type": "*unix_timestamp", "value": "~*req.3"},
|
||||
{"tag": "OriginHost", "path": "OriginHost", "type": "*constant", "value": "127.0.0.1", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*rated", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*constant", "value": "cgrates.org", "mandatory": true},
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable", "value": "~*req.0:s/^49([1-9]\\d+)$/0$1/", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable", "value": "~*req.1:s/^00(\\d+)$/+$1/", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable", "value": "~*req.6:s/^(\\d+)$/${1}s/", "mandatory": true},
|
||||
{"tag": "Partial", "path": "Partial", "type": "*constant", "value": "true", "filters":["*string:~*req.10:partial"]},
|
||||
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "AccId1", "path": "*cgreq.OriginID", "type": "*composed", "value": "~*req.0"},
|
||||
{"tag": "AccId2", "path": "*cgreq.OriginID", "type": "*composed", "value": "_"},
|
||||
{"tag": "AccId3", "path": "*cgreq.OriginID", "type": "*composed", "value": "~*req.1"},
|
||||
{"tag": "AccId4", "path": "*cgreq.OriginID", "type": "*composed", "value": "_"},
|
||||
{"tag": "AccId5", "path": "*cgreq.OriginID", "type": "*composed", "value": "~*req.4"},
|
||||
{"tag": "OrderID", "path": "*cgreq.OrderID", "type": "*unix_timestamp", "value": "~*req.3"},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*constant", "value": "127.0.0.1", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*rated", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*constant", "value": "cgrates.org", "mandatory": true},
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.0:s/^49([1-9]\\d+)$/0$1/", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.1:s/^00(\\d+)$/+$1/", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable", "value": "~*req.6:s/^(\\d+)$/${1}s/", "mandatory": true},
|
||||
{"tag": "Partial", "path": "*cgreq.Partial", "type": "*constant", "value": "true", "filters":["*string:~*req.10:partial"]},
|
||||
],
|
||||
"cache_dump_fields": [
|
||||
{"tag": "OriginID", "type": "*composed", "value": "~OriginID"},
|
||||
{"tag": "OrderID", "type": "*composed", "value": "~OrderID"},
|
||||
{"tag": "RequestType", "type": "*composed", "value": "~RequestType"},
|
||||
{"tag": "Account", "type": "*composed", "value": "~Account"},
|
||||
{"tag": "Destination", "type": "*composed", "value": "~Destination"},
|
||||
{"tag": "SetupTime", "type": "*composed", "value": "~SetupTime", "layout": "2006-01-02T15:04:05Z07:00"},
|
||||
{"tag": "AnswerTime", "type": "*composed", "value": "~AnswerTime", "layout": "2006-01-02T15:04:05Z07:00"},
|
||||
{"tag": "Usage", "type": "*composed", "value": "~Usage"},
|
||||
{"tag": "Cost", "type": "*composed", "value": "~Cost","rounding_decimals":5},
|
||||
{"tag": "OriginID", "path":"*exp", "type": "*composed", "value": "~*req.OriginID"},
|
||||
{"tag": "OrderID", "path":"*exp", "type": "*composed", "value": "~*req.OrderID"},
|
||||
{"tag": "RequestType", "path":"*exp", "type": "*composed", "value": "~*req.RequestType"},
|
||||
{"tag": "Account", "path":"*exp", "type": "*composed", "value": "~*req.Account"},
|
||||
{"tag": "Destination", "path":"*exp", "type": "*composed", "value": "~*req.Destination"},
|
||||
{"tag": "SetupTime", "path":"*exp", "type": "*composed", "value": "~*req.SetupTime", "layout": "2006-01-02T15:04:05Z07:00"},
|
||||
{"tag": "AnswerTime", "path":"*exp", "type": "*composed", "value": "~*req.AnswerTime", "layout": "2006-01-02T15:04:05Z07:00"},
|
||||
{"tag": "Usage", "path":"*exp", "type": "*composed", "value": "~*req.Usage"},
|
||||
{"tag": "Cost", "path":"*exp", "type": "*composed", "value": "~*req.Cost","rounding_decimals":5},
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -305,23 +305,23 @@
|
||||
"partial_record_cache": "1s",
|
||||
"partial_cache_expiry_action": "*post_cdr",
|
||||
"fields":[
|
||||
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "AccId1", "path": "OriginID", "type": "*composed", "value": "~*req.0"},
|
||||
{"tag": "AccId2", "path": "OriginID", "type": "*composed", "value": "_"},
|
||||
{"tag": "AccId3", "path": "OriginID", "type": "*composed", "value": "~*req.1"},
|
||||
{"tag": "AccId4", "path": "OriginID", "type": "*composed", "value": "_"},
|
||||
{"tag": "AccId5", "path": "OriginID", "type": "*composed", "value": "~*req.4"},
|
||||
{"tag": "OrderID", "path": "OrderID", "type": "*unix_timestamp", "value": "~*req.3"},
|
||||
{"tag": "OriginHost", "path": "OriginHost", "type": "*constant", "value": "127.0.0.1", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*rated", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*constant", "value": "cgrates.org", "mandatory": true},
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable", "value": "~*req.0:s/^49([1-9]\\d+)$/0$1/", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable", "value": "~*req.1:s/^00(\\d+)$/+$1/", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable", "value": "~*req.6:s/^(\\d+)$/${1}s/", "mandatory": true},
|
||||
{"tag": "Partial", "path": "Partial", "type": "*constant", "value": "true", "filters":["*string:~*req.10:partial"]}
|
||||
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "AccId1", "path": "*cgreq.OriginID", "type": "*composed", "value": "~*req.0"},
|
||||
{"tag": "AccId2", "path": "*cgreq.OriginID", "type": "*composed", "value": "_"},
|
||||
{"tag": "AccId3", "path": "*cgreq.OriginID", "type": "*composed", "value": "~*req.1"},
|
||||
{"tag": "AccId4", "path": "*cgreq.OriginID", "type": "*composed", "value": "_"},
|
||||
{"tag": "AccId5", "path": "*cgreq.OriginID", "type": "*composed", "value": "~*req.4"},
|
||||
{"tag": "OrderID", "path": "*cgreq.OrderID", "type": "*unix_timestamp", "value": "~*req.3"},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*constant", "value": "127.0.0.1", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*rated", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*constant", "value": "cgrates.org", "mandatory": true},
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.0:s/^49([1-9]\\d+)$/0$1/", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.1:s/^00(\\d+)$/+$1/", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable", "value": "~*req.6:s/^(\\d+)$/${1}s/", "mandatory": true},
|
||||
{"tag": "Partial", "path": "*cgreq.Partial", "type": "*constant", "value": "true", "filters":["*string:~*req.10:partial"]}
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -336,22 +336,22 @@
|
||||
"flags": ["*cdrs"],
|
||||
"partial_record_cache": "2s",
|
||||
"fields":[
|
||||
{"tag": "Tor", "path": "ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable","value":"~*req.3;~*req.1;~*req.2", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*variable", "value": "~*req.7", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*constant", "value": "cgrates.org", "mandatory": true},
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable", "value": "~*req.8", "mandatory": true},
|
||||
{"tag": "Subject", "path": "Subject", "type": "*variable", "value": "~*req.8", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable", "value": "~*req.9", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable", "mandatory": true}, // Value for Usage is composed based on record
|
||||
{"tag": "DisconnectCause", "path": "DisconnectCause", "type": "*variable", "value": "~*req.4; ;~*req.5", "mandatory": true},
|
||||
{"tag": "DialogId", "path": "DialogId", "type": "*variable", "value": "~*req.11"}
|
||||
{"tag": "Tor", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable","value":"~*req.3;~*req.1;~*req.2", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*variable", "value": "~*req.7", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*constant", "value": "cgrates.org", "mandatory": true},
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.8", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable", "value": "~*req.8", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.9", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable", "mandatory": true}, // Value for Usage is composed based on record
|
||||
{"tag": "DisconnectCause", "path": "*cgreq.DisconnectCause", "type": "*variable", "value": "~*req.4; ;~*req.5", "mandatory": true},
|
||||
{"tag": "DialogId", "path": "*cgreq.DialogId", "type": "*variable", "value": "~*req.11"}
|
||||
],
|
||||
}
|
||||
],
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
|
||||
@@ -92,21 +92,21 @@
|
||||
"source_path": "/tmp/ers2/in",
|
||||
"flags": ["*dryrun"],
|
||||
"processed_path": "/tmp/ers2/out",
|
||||
"fields":[ // import content_fields template, tag will match internally CDR field, in case of .csv value will be represented by index of the field value
|
||||
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*variable", "value": "~*req.1", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.2", "mandatory": true},
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Subject", "path": "Subject", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable", "value": "~*req.4:s/0([1-9]\\d+)/+49${1}/", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra3", "path": "HDRExtra3", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra2", "path": "HDRExtra2", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra1", "path": "HDRExtra1", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
"fields":[
|
||||
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*variable", "value": "~*req.1", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*variable", "value": "~*req.2", "mandatory": true},
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.4:s/0([1-9]\\d+)/+49${1}/", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra3", "path": "*cgreq.HDRExtra3", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra2", "path": "*cgreq.HDRExtra2", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra1", "path": "*cgreq.HDRExtra1", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -118,17 +118,17 @@
|
||||
"flags": ["*initiate","*accounts","*resources","*attributes","*log"],
|
||||
"processed_path": "/tmp/init_session/out",
|
||||
"fields":[ // import content_fields template, tag will match internally CDR field, in case of .csv value will be represented by index of the field value
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable", "value": "~*req.2", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "Subject", "path": "Subject", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable", "value": "~*req.7", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable", "value": "~*req.8", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable", "value": "~*req.9", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable", "value": "~*req.2", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable", "value": "~*req.7", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.8", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable", "value": "~*req.9", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -140,10 +140,10 @@
|
||||
"flags": ["*terminate","*accounts","*resources","*log"],
|
||||
"processed_path": "/tmp/terminate_session/out",
|
||||
"fields":[ // import content_fields template, tag will match internally CDR field, in case of .csv value will be represented by index of the field value
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable", "value": "~*req.2", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable", "value": "~*req.9", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable", "value": "~*req.2", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable", "value": "~*req.9", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -155,19 +155,19 @@
|
||||
"flags": ["*cdrs","*log"],
|
||||
"processed_path": "/tmp/cdrs/out",
|
||||
"fields":[ // import content_fields template, tag will match internally CDR field, in case of .csv value will be represented by index of the field value
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable", "value": "~*req.2", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "Subject", "path": "Subject", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable", "value": "~*req.7", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable", "value": "~*req.8", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable", "value": "~*req.9", "mandatory": true},
|
||||
{"tag": "ExtraInfo1", "path": "ExtraInfo1", "type": "*constant", "value": "ExtraInfo1", "mandatory": true},
|
||||
{"tag": "ExtraInfo2", "path": "ExtraInfo2", "type": "*constant", "value": "ExtraInfo2", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable", "value": "~*req.2", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable", "value": "~*req.7", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.8", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable", "value": "~*req.9", "mandatory": true},
|
||||
{"tag": "ExtraInfo1", "path": "*cgreq.ExtraInfo1", "type": "*constant", "value": "ExtraInfo1", "mandatory": true},
|
||||
{"tag": "ExtraInfo2", "path": "*cgreq.ExtraInfo2", "type": "*constant", "value": "ExtraInfo2", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -179,22 +179,22 @@
|
||||
"processed_path": "/tmp/ers_with_filters/out",
|
||||
"flags": ["*cdrs","*log"],
|
||||
"filters":["*string:~*req.3:1002"],
|
||||
"fields":[ // import content_fields template, tag will match internally CDR field, in case of .csv value will be represented by index of the field value
|
||||
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*variable", "value": "~*req.1", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.2", "mandatory": true},
|
||||
{"tag": "Category", "path": "Category", "type": "*variable", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Source", "path": "Source", "type": "*constant", "value": "ers_csv", "mandatory": true},
|
||||
{"tag": "Subject", "path": "Subject", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable", "value": "~*req.4:s/0([1-9]\\d+)/+49${1}/", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra3", "path": "HDRExtra3", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra2", "path": "HDRExtra2", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra1", "path": "HDRExtra1", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
"fields":[
|
||||
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*variable", "value": "~*req.1", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*variable", "value": "~*req.2", "mandatory": true},
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*variable", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Source", "path": "*cgreq.Source", "type": "*constant", "value": "ers_csv", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.4:s/0([1-9]\\d+)/+49${1}/", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra3", "path": "*cgreq.HDRExtra3", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra2", "path": "*cgreq.HDRExtra2", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra1", "path": "*cgreq.HDRExtra1", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -206,16 +206,16 @@
|
||||
"processed_path": "/tmp/xmlErs/out",
|
||||
"xml_root_path": "broadWorksCDR.cdrData",
|
||||
"fields":[
|
||||
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.localCallId", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*rated", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.userId:s/.*@(.*)/${1}/", "mandatory": true},
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.userNumber", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.calledNumber", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.startTime", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.answerTime", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*usage_difference", "value": "~*req.broadWorksCDR.cdrData.basicModule.releaseTime;~*req.broadWorksCDR.cdrData.basicModule.answerTime", "mandatory": true}
|
||||
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.localCallId", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*rated", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.userId:s/.*@(.*)/${1}/", "mandatory": true},
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.userNumber", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.calledNumber", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.startTime", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.answerTime", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*usage_difference", "value": "~*req.broadWorksCDR.cdrData.basicModule.releaseTime;~*req.broadWorksCDR.cdrData.basicModule.answerTime", "mandatory": true}
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -227,27 +227,27 @@
|
||||
"processed_path": "/tmp/fwvErs/out",
|
||||
"fields": [
|
||||
{"tag": "FileName", "path": "*cgreq.CdrFileName", "type": "*variable", "value": "~*hdr.95-135", "padding":"right"},
|
||||
{"tag": "FileSeqNr", "path": "FileSeqNr", "type": "*variable", "value": "~*hdr.135-141", "padding":"zeroleft"},
|
||||
{"tag": "AccId1", "path": "AccId1", "type": "*variable", "value": "~*hdr.135-141", "padding":"zeroleft"},
|
||||
{"tag": "Tor", "path": "ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "rated", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable", "value": "~*req.0-10", "padding":"right", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "OriginHost", "type": "*constant", "value": "0.0.0.0", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*constant", "value": "cgrates.org", "mandatory": true},
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable", "value": "~*req.30-49", "padding":"right", "mandatory": true},
|
||||
{"tag": "Subject", "path": "Subject", "type": "*variable", "value": "~*req.30-49", "padding":"right", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable", "value": "~*req.52-80", "padding":"right", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable", "value": "~*req.14-30:s/(\\d{4})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})/${1}-${2}-${3} ${4}:${5}:${6}/", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable", "value": "~*req.14-30:s/(\\d{4})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})/${1}-${2}-${3} ${4}:${5}:${6}/", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable", "value": "~*req.127-135:s/(\\d{2})(\\d{2})(\\d{2})(\\d{2})/${1}h${2}m${3}s/", "mandatory": true},
|
||||
{"tag": "DisconnectCause", "path": "DisconnectCause", "type": "*variable", "value": "~*req.138-139", "mandatory": true},
|
||||
{"tag": "RetailAmount", "path": "RetailAmount", "type": "*variable", "value": "~*req.103-111", "padding":"zeroleft"},
|
||||
{"tag": "WholesaleAmount", "path": "RetailAmount", "type": "*variable", "value": "~*req.115-123", "padding":"zeroleft"},
|
||||
{"tag": "AccId1", "path": "AccId1", "type": "*variable", "value": "~*req.3-6", "padding":"zeroleft", "mandatory": true},
|
||||
{"tag": "AccId2", "path": "AccId2", "type": "*variable", "value": "~*req.14-30", "padding":"right", "mandatory": true},
|
||||
{"tag": "NrOfCdrs", "type": "*variable", "path":"NrOfCdrs", "value": "~*trl.142-150"},
|
||||
{"tag": "TotalDuration", "type": "*variable", "path":"TotalDuration", "value": "~*trl.150-162"}
|
||||
{"tag": "FileSeqNr", "path": "*cgreq.FileSeqNr", "type": "*variable", "value": "~*hdr.135-141", "padding":"zeroleft"},
|
||||
{"tag": "AccId1", "path": "*cgreq.AccId1", "type": "*variable", "value": "~*hdr.135-141", "padding":"zeroleft"},
|
||||
{"tag": "Tor", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "rated", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable", "value": "~*req.0-10", "padding":"right", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*constant", "value": "0.0.0.0", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*constant", "value": "cgrates.org", "mandatory": true},
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.30-49", "padding":"right", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable", "value": "~*req.30-49", "padding":"right", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.52-80", "padding":"right", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable", "value": "~*req.14-30:s/(\\d{4})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})/${1}-${2}-${3} ${4}:${5}:${6}/", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.14-30:s/(\\d{4})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})/${1}-${2}-${3} ${4}:${5}:${6}/", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable", "value": "~*req.127-135:s/(\\d{2})(\\d{2})(\\d{2})(\\d{2})/${1}h${2}m${3}s/", "mandatory": true},
|
||||
{"tag": "DisconnectCause", "path": "*cgreq.DisconnectCause", "type": "*variable", "value": "~*req.138-139", "mandatory": true},
|
||||
{"tag": "RetailAmount", "path": "*cgreq.RetailAmount", "type": "*variable", "value": "~*req.103-111", "padding":"zeroleft"},
|
||||
{"tag": "WholesaleAmount", "path": "*cgreq.RetailAmount", "type": "*variable", "value": "~*req.115-123", "padding":"zeroleft"},
|
||||
{"tag": "AccId1", "path": "*cgreq.AccId1", "type": "*variable", "value": "~*req.3-6", "padding":"zeroleft", "mandatory": true},
|
||||
{"tag": "AccId2", "path": "*cgreq.AccId2", "type": "*variable", "value": "~*req.14-30", "padding":"right", "mandatory": true},
|
||||
{"tag": "NrOfCdrs", "type": "*variable", "path":"*cgreq.NrOfCdrs", "value": "~*trl.142-150"},
|
||||
{"tag": "TotalDuration", "type": "*variable", "path":"*cgreq.TotalDuration", "value": "~*trl.150-162"}
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -261,34 +261,34 @@
|
||||
"partial_record_cache": "2s",
|
||||
"partial_cache_expiry_action": "*dump_to_file",
|
||||
"fields":[
|
||||
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "AccId1", "path": "OriginID", "type": "*composed", "value": "~*req.0"},
|
||||
{"tag": "AccId2", "path": "OriginID", "type": "*composed", "value": "_"},
|
||||
{"tag": "AccId3", "path": "OriginID", "type": "*composed", "value": "~*req.1"},
|
||||
{"tag": "AccId4", "path": "OriginID", "type": "*composed", "value": "_"},
|
||||
{"tag": "AccId5", "path": "OriginID", "type": "*composed", "value": "~*req.4"},
|
||||
{"tag": "OrderID", "path": "OrderID", "type": "*unix_timestamp", "value": "~*req.3"},
|
||||
{"tag": "OriginHost", "path": "OriginHost", "type": "*constant", "value": "127.0.0.1", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*rated", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*constant", "value": "cgrates.org", "mandatory": true},
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable", "value": "~*req.0:s/^49([1-9]\\d+)$/0$1/", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable", "value": "~*req.1:s/^00(\\d+)$/+$1/", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable", "value": "~*req.6:s/^(\\d+)$/${1}s/", "mandatory": true},
|
||||
{"tag": "Partial", "path": "Partial", "type": "*constant", "value": "true", "filters":["*string:~*req.10:partial"]},
|
||||
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "AccId1", "path": "*cgreq.OriginID", "type": "*composed", "value": "~*req.0"},
|
||||
{"tag": "AccId2", "path": "*cgreq.OriginID", "type": "*composed", "value": "_"},
|
||||
{"tag": "AccId3", "path": "*cgreq.OriginID", "type": "*composed", "value": "~*req.1"},
|
||||
{"tag": "AccId4", "path": "*cgreq.OriginID", "type": "*composed", "value": "_"},
|
||||
{"tag": "AccId5", "path": "*cgreq.OriginID", "type": "*composed", "value": "~*req.4"},
|
||||
{"tag": "OrderID", "path": "*cgreq.OrderID", "type": "*unix_timestamp", "value": "~*req.3"},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*constant", "value": "127.0.0.1", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*rated", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*constant", "value": "cgrates.org", "mandatory": true},
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.0:s/^49([1-9]\\d+)$/0$1/", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.1:s/^00(\\d+)$/+$1/", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable", "value": "~*req.6:s/^(\\d+)$/${1}s/", "mandatory": true},
|
||||
{"tag": "Partial", "path": "*cgreq.Partial", "type": "*constant", "value": "true", "filters":["*string:~*req.10:partial"]},
|
||||
],
|
||||
"cache_dump_fields": [
|
||||
{"tag": "OriginID", "type": "*composed", "value": "~OriginID"},
|
||||
{"tag": "OrderID", "type": "*composed", "value": "~OrderID"},
|
||||
{"tag": "RequestType", "type": "*composed", "value": "~RequestType"},
|
||||
{"tag": "Account", "type": "*composed", "value": "~Account"},
|
||||
{"tag": "Destination", "type": "*composed", "value": "~Destination"},
|
||||
{"tag": "SetupTime", "type": "*composed", "value": "~SetupTime", "layout": "2006-01-02T15:04:05Z07:00"},
|
||||
{"tag": "AnswerTime", "type": "*composed", "value": "~AnswerTime", "layout": "2006-01-02T15:04:05Z07:00"},
|
||||
{"tag": "Usage", "type": "*composed", "value": "~Usage"},
|
||||
{"tag": "Cost", "type": "*composed", "value": "~Cost","rounding_decimals":5},
|
||||
{"tag": "OriginID", "path":"*exp", "type": "*composed", "value": "~*req.OriginID"},
|
||||
{"tag": "OrderID", "path":"*exp", "type": "*composed", "value": "~*req.OrderID"},
|
||||
{"tag": "RequestType", "path":"*exp", "type": "*composed", "value": "~*req.RequestType"},
|
||||
{"tag": "Account", "path":"*exp", "type": "*composed", "value": "~*req.Account"},
|
||||
{"tag": "Destination", "path":"*exp", "type": "*composed", "value": "~*req.Destination"},
|
||||
{"tag": "SetupTime", "path":"*exp", "type": "*composed", "value": "~*req.SetupTime", "layout": "2006-01-02T15:04:05Z07:00"},
|
||||
{"tag": "AnswerTime", "path":"*exp", "type": "*composed", "value": "~*req.AnswerTime", "layout": "2006-01-02T15:04:05Z07:00"},
|
||||
{"tag": "Usage", "path":"*exp", "type": "*composed", "value": "~*req.Usage"},
|
||||
{"tag": "Cost", "path":"*exp", "type": "*composed", "value": "~*req.Cost","rounding_decimals":5},
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -302,23 +302,23 @@
|
||||
"partial_record_cache": "1s",
|
||||
"partial_cache_expiry_action": "*post_cdr",
|
||||
"fields":[
|
||||
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "AccId1", "path": "OriginID", "type": "*composed", "value": "~*req.0"},
|
||||
{"tag": "AccId2", "path": "OriginID", "type": "*composed", "value": "_"},
|
||||
{"tag": "AccId3", "path": "OriginID", "type": "*composed", "value": "~*req.1"},
|
||||
{"tag": "AccId4", "path": "OriginID", "type": "*composed", "value": "_"},
|
||||
{"tag": "AccId5", "path": "OriginID", "type": "*composed", "value": "~*req.4"},
|
||||
{"tag": "OrderID", "path": "OrderID", "type": "*unix_timestamp", "value": "~*req.3"},
|
||||
{"tag": "OriginHost", "path": "OriginHost", "type": "*constant", "value": "127.0.0.1", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*rated", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*constant", "value": "cgrates.org", "mandatory": true},
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable", "value": "~*req.0:s/^49([1-9]\\d+)$/0$1/", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable", "value": "~*req.1:s/^00(\\d+)$/+$1/", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable", "value": "~*req.6:s/^(\\d+)$/${1}s/", "mandatory": true},
|
||||
{"tag": "Partial", "path": "Partial", "type": "*constant", "value": "true", "filters":["*string:~*req.10:partial"]}
|
||||
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "AccId1", "path": "*cgreq.OriginID", "type": "*composed", "value": "~*req.0"},
|
||||
{"tag": "AccId2", "path": "*cgreq.OriginID", "type": "*composed", "value": "_"},
|
||||
{"tag": "AccId3", "path": "*cgreq.OriginID", "type": "*composed", "value": "~*req.1"},
|
||||
{"tag": "AccId4", "path": "*cgreq.OriginID", "type": "*composed", "value": "_"},
|
||||
{"tag": "AccId5", "path": "*cgreq.OriginID", "type": "*composed", "value": "~*req.4"},
|
||||
{"tag": "OrderID", "path": "*cgreq.OrderID", "type": "*unix_timestamp", "value": "~*req.3"},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*constant", "value": "127.0.0.1", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*rated", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*constant", "value": "cgrates.org", "mandatory": true},
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.0:s/^49([1-9]\\d+)$/0$1/", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.1:s/^00(\\d+)$/+$1/", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable", "value": "~*req.6:s/^(\\d+)$/${1}s/", "mandatory": true},
|
||||
{"tag": "Partial", "path": "*cgreq.Partial", "type": "*constant", "value": "true", "filters":["*string:~*req.10:partial"]}
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -333,22 +333,22 @@
|
||||
"flags": ["*cdrs"],
|
||||
"partial_record_cache": "2s",
|
||||
"fields":[
|
||||
{"tag": "Tor", "path": "ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable","value":"~*req.3;~*req.1;~*req.2", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*variable", "value": "~*req.7", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*constant", "value": "cgrates.org", "mandatory": true},
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable", "value": "~*req.8", "mandatory": true},
|
||||
{"tag": "Subject", "path": "Subject", "type": "*variable", "value": "~*req.8", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable", "value": "~*req.9", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable", "mandatory": true}, // Value for Usage is composed based on record
|
||||
{"tag": "DisconnectCause", "path": "DisconnectCause", "type": "*variable", "value": "~*req.4; ;~*req.5", "mandatory": true},
|
||||
{"tag": "DialogId", "path": "DialogId", "type": "*variable", "value": "~*req.11"}
|
||||
{"tag": "Tor", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable","value":"~*req.3;~*req.1;~*req.2", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*variable", "value": "~*req.7", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*constant", "value": "cgrates.org", "mandatory": true},
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.8", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable", "value": "~*req.8", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.9", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable", "mandatory": true}, // Value for Usage is composed based on record
|
||||
{"tag": "DisconnectCause", "path": "*cgreq.DisconnectCause", "type": "*variable", "value": "~*req.4; ;~*req.5", "mandatory": true},
|
||||
{"tag": "DialogId", "path": "*cgreq.DialogId", "type": "*variable", "value": "~*req.11"}
|
||||
],
|
||||
}
|
||||
],
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
|
||||
@@ -89,21 +89,21 @@
|
||||
"source_path": "/tmp/ers2/in",
|
||||
"flags": ["*dryrun"],
|
||||
"processed_path": "/tmp/ers2/out",
|
||||
"fields":[ // import content_fields template, tag will match internally CDR field, in case of .csv value will be represented by index of the field value
|
||||
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*variable", "value": "~*req.1", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.2", "mandatory": true},
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Subject", "path": "Subject", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable", "value": "~*req.4:s/0([1-9]\\d+)/+49${1}/", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra3", "path": "HDRExtra3", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra2", "path": "HDRExtra2", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra1", "path": "HDRExtra1", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
"fields":[
|
||||
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*variable", "value": "~*req.1", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*variable", "value": "~*req.2", "mandatory": true},
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.4:s/0([1-9]\\d+)/+49${1}/", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra3", "path": "*cgreq.HDRExtra3", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra2", "path": "*cgreq.HDRExtra2", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra1", "path": "*cgreq.HDRExtra1", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -115,17 +115,17 @@
|
||||
"flags": ["*initiate","*accounts","*resources","*attributes","*log"],
|
||||
"processed_path": "/tmp/init_session/out",
|
||||
"fields":[ // import content_fields template, tag will match internally CDR field, in case of .csv value will be represented by index of the field value
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable", "value": "~*req.2", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "Subject", "path": "Subject", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable", "value": "~*req.7", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable", "value": "~*req.8", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable", "value": "~*req.9", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable", "value": "~*req.2", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable", "value": "~*req.7", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.8", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable", "value": "~*req.9", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -137,10 +137,10 @@
|
||||
"flags": ["*terminate","*accounts","*resources","*log"],
|
||||
"processed_path": "/tmp/terminate_session/out",
|
||||
"fields":[ // import content_fields template, tag will match internally CDR field, in case of .csv value will be represented by index of the field value
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable", "value": "~*req.2", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable", "value": "~*req.9", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable", "value": "~*req.2", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable", "value": "~*req.9", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -152,19 +152,19 @@
|
||||
"flags": ["*cdrs","*log"],
|
||||
"processed_path": "/tmp/cdrs/out",
|
||||
"fields":[ // import content_fields template, tag will match internally CDR field, in case of .csv value will be represented by index of the field value
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable", "value": "~*req.2", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "Subject", "path": "Subject", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable", "value": "~*req.7", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable", "value": "~*req.8", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable", "value": "~*req.9", "mandatory": true},
|
||||
{"tag": "ExtraInfo1", "path": "ExtraInfo1", "type": "*constant", "value": "ExtraInfo1", "mandatory": true},
|
||||
{"tag": "ExtraInfo2", "path": "ExtraInfo2", "type": "*constant", "value": "ExtraInfo2", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable", "value": "~*req.2", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable", "value": "~*req.7", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.8", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable", "value": "~*req.9", "mandatory": true},
|
||||
{"tag": "ExtraInfo1", "path": "*cgreq.ExtraInfo1", "type": "*constant", "value": "ExtraInfo1", "mandatory": true},
|
||||
{"tag": "ExtraInfo2", "path": "*cgreq.ExtraInfo2", "type": "*constant", "value": "ExtraInfo2", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -176,22 +176,22 @@
|
||||
"processed_path": "/tmp/ers_with_filters/out",
|
||||
"flags": ["*cdrs","*log"],
|
||||
"filters":["*string:~*req.3:1002"],
|
||||
"fields":[ // import content_fields template, tag will match internally CDR field, in case of .csv value will be represented by index of the field value
|
||||
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*variable", "value": "~*req.1", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.2", "mandatory": true},
|
||||
{"tag": "Category", "path": "Category", "type": "*variable", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Source", "path": "Source", "type": "*constant", "value": "ers_csv", "mandatory": true},
|
||||
{"tag": "Subject", "path": "Subject", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable", "value": "~*req.4:s/0([1-9]\\d+)/+49${1}/", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra3", "path": "HDRExtra3", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra2", "path": "HDRExtra2", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra1", "path": "HDRExtra1", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
"fields":[
|
||||
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*variable", "value": "~*req.1", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*variable", "value": "~*req.2", "mandatory": true},
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*variable", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Source", "path": "*cgreq.Source", "type": "*constant", "value": "ers_csv", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.4:s/0([1-9]\\d+)/+49${1}/", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.5", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra3", "path": "*cgreq.HDRExtra3", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra2", "path": "*cgreq.HDRExtra2", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "HDRExtra1", "path": "*cgreq.HDRExtra1", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -203,16 +203,16 @@
|
||||
"processed_path": "/tmp/xmlErs/out",
|
||||
"xml_root_path": "broadWorksCDR.cdrData",
|
||||
"fields":[
|
||||
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.localCallId", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*rated", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.userId:s/.*@(.*)/${1}/", "mandatory": true},
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.userNumber", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.calledNumber", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.startTime", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.answerTime", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*usage_difference", "value": "~*req.broadWorksCDR.cdrData.basicModule.releaseTime;~*req.broadWorksCDR.cdrData.basicModule.answerTime", "mandatory": true}
|
||||
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.localCallId", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*rated", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.userId:s/.*@(.*)/${1}/", "mandatory": true},
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.userNumber", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.calledNumber", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.startTime", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.answerTime", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*usage_difference", "value": "~*req.broadWorksCDR.cdrData.basicModule.releaseTime;~*req.broadWorksCDR.cdrData.basicModule.answerTime", "mandatory": true}
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -224,27 +224,27 @@
|
||||
"processed_path": "/tmp/fwvErs/out",
|
||||
"fields": [
|
||||
{"tag": "FileName", "path": "*cgreq.CdrFileName", "type": "*variable", "value": "~*hdr.95-135", "padding":"right"},
|
||||
{"tag": "FileSeqNr", "path": "FileSeqNr", "type": "*variable", "value": "~*hdr.135-141", "padding":"zeroleft"},
|
||||
{"tag": "AccId1", "path": "AccId1", "type": "*variable", "value": "~*hdr.135-141", "padding":"zeroleft"},
|
||||
{"tag": "Tor", "path": "ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "rated", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable", "value": "~*req.0-10", "padding":"right", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "OriginHost", "type": "*constant", "value": "0.0.0.0", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*constant", "value": "cgrates.org", "mandatory": true},
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable", "value": "~*req.30-49", "padding":"right", "mandatory": true},
|
||||
{"tag": "Subject", "path": "Subject", "type": "*variable", "value": "~*req.30-49", "padding":"right", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable", "value": "~*req.52-80", "padding":"right", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable", "value": "~*req.14-30:s/(\\d{4})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})/${1}-${2}-${3} ${4}:${5}:${6}/", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable", "value": "~*req.14-30:s/(\\d{4})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})/${1}-${2}-${3} ${4}:${5}:${6}/", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable", "value": "~*req.127-135:s/(\\d{2})(\\d{2})(\\d{2})(\\d{2})/${1}h${2}m${3}s/", "mandatory": true},
|
||||
{"tag": "DisconnectCause", "path": "DisconnectCause", "type": "*variable", "value": "~*req.138-139", "mandatory": true},
|
||||
{"tag": "RetailAmount", "path": "RetailAmount", "type": "*variable", "value": "~*req.103-111", "padding":"zeroleft"},
|
||||
{"tag": "WholesaleAmount", "path": "RetailAmount", "type": "*variable", "value": "~*req.115-123", "padding":"zeroleft"},
|
||||
{"tag": "AccId1", "path": "AccId1", "type": "*variable", "value": "~*req.3-6", "padding":"zeroleft", "mandatory": true},
|
||||
{"tag": "AccId2", "path": "AccId2", "type": "*variable", "value": "~*req.14-30", "padding":"right", "mandatory": true},
|
||||
{"tag": "NrOfCdrs", "type": "*variable", "path":"NrOfCdrs", "value": "~*trl.142-150"},
|
||||
{"tag": "TotalDuration", "type": "*variable", "path":"TotalDuration", "value": "~*trl.150-162"}
|
||||
{"tag": "FileSeqNr", "path": "*cgreq.FileSeqNr", "type": "*variable", "value": "~*hdr.135-141", "padding":"zeroleft"},
|
||||
{"tag": "AccId1", "path": "*cgreq.AccId1", "type": "*variable", "value": "~*hdr.135-141", "padding":"zeroleft"},
|
||||
{"tag": "Tor", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "rated", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable", "value": "~*req.0-10", "padding":"right", "mandatory": true},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*constant", "value": "0.0.0.0", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*constant", "value": "cgrates.org", "mandatory": true},
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.30-49", "padding":"right", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable", "value": "~*req.30-49", "padding":"right", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.52-80", "padding":"right", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable", "value": "~*req.14-30:s/(\\d{4})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})/${1}-${2}-${3} ${4}:${5}:${6}/", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.14-30:s/(\\d{4})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})/${1}-${2}-${3} ${4}:${5}:${6}/", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable", "value": "~*req.127-135:s/(\\d{2})(\\d{2})(\\d{2})(\\d{2})/${1}h${2}m${3}s/", "mandatory": true},
|
||||
{"tag": "DisconnectCause", "path": "*cgreq.DisconnectCause", "type": "*variable", "value": "~*req.138-139", "mandatory": true},
|
||||
{"tag": "RetailAmount", "path": "*cgreq.RetailAmount", "type": "*variable", "value": "~*req.103-111", "padding":"zeroleft"},
|
||||
{"tag": "WholesaleAmount", "path": "*cgreq.RetailAmount", "type": "*variable", "value": "~*req.115-123", "padding":"zeroleft"},
|
||||
{"tag": "AccId1", "path": "*cgreq.AccId1", "type": "*variable", "value": "~*req.3-6", "padding":"zeroleft", "mandatory": true},
|
||||
{"tag": "AccId2", "path": "*cgreq.AccId2", "type": "*variable", "value": "~*req.14-30", "padding":"right", "mandatory": true},
|
||||
{"tag": "NrOfCdrs", "type": "*variable", "path":"*cgreq.NrOfCdrs", "value": "~*trl.142-150"},
|
||||
{"tag": "TotalDuration", "type": "*variable", "path":"*cgreq.TotalDuration", "value": "~*trl.150-162"}
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -258,34 +258,34 @@
|
||||
"partial_record_cache": "2s",
|
||||
"partial_cache_expiry_action": "*dump_to_file",
|
||||
"fields":[
|
||||
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "AccId1", "path": "OriginID", "type": "*composed", "value": "~*req.0"},
|
||||
{"tag": "AccId2", "path": "OriginID", "type": "*composed", "value": "_"},
|
||||
{"tag": "AccId3", "path": "OriginID", "type": "*composed", "value": "~*req.1"},
|
||||
{"tag": "AccId4", "path": "OriginID", "type": "*composed", "value": "_"},
|
||||
{"tag": "AccId5", "path": "OriginID", "type": "*composed", "value": "~*req.4"},
|
||||
{"tag": "OrderID", "path": "OrderID", "type": "*unix_timestamp", "value": "~*req.3"},
|
||||
{"tag": "OriginHost", "path": "OriginHost", "type": "*constant", "value": "127.0.0.1", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*rated", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*constant", "value": "cgrates.org", "mandatory": true},
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable", "value": "~*req.0:s/^49([1-9]\\d+)$/0$1/", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable", "value": "~*req.1:s/^00(\\d+)$/+$1/", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable", "value": "~*req.6:s/^(\\d+)$/${1}s/", "mandatory": true},
|
||||
{"tag": "Partial", "path": "Partial", "type": "*constant", "value": "true", "filters":["*string:~*req.10:partial"]},
|
||||
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "AccId1", "path": "*cgreq.OriginID", "type": "*composed", "value": "~*req.0"},
|
||||
{"tag": "AccId2", "path": "*cgreq.OriginID", "type": "*composed", "value": "_"},
|
||||
{"tag": "AccId3", "path": "*cgreq.OriginID", "type": "*composed", "value": "~*req.1"},
|
||||
{"tag": "AccId4", "path": "*cgreq.OriginID", "type": "*composed", "value": "_"},
|
||||
{"tag": "AccId5", "path": "*cgreq.OriginID", "type": "*composed", "value": "~*req.4"},
|
||||
{"tag": "OrderID", "path": "*cgreq.OrderID", "type": "*unix_timestamp", "value": "~*req.3"},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*constant", "value": "127.0.0.1", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*rated", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*constant", "value": "cgrates.org", "mandatory": true},
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.0:s/^49([1-9]\\d+)$/0$1/", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.1:s/^00(\\d+)$/+$1/", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable", "value": "~*req.6:s/^(\\d+)$/${1}s/", "mandatory": true},
|
||||
{"tag": "Partial", "path": "*cgreq.Partial", "type": "*constant", "value": "true", "filters":["*string:~*req.10:partial"]},
|
||||
],
|
||||
"cache_dump_fields": [
|
||||
{"tag": "OriginID", "type": "*composed", "value": "~OriginID"},
|
||||
{"tag": "OrderID", "type": "*composed", "value": "~OrderID"},
|
||||
{"tag": "RequestType", "type": "*composed", "value": "~RequestType"},
|
||||
{"tag": "Account", "type": "*composed", "value": "~Account"},
|
||||
{"tag": "Destination", "type": "*composed", "value": "~Destination"},
|
||||
{"tag": "SetupTime", "type": "*composed", "value": "~SetupTime", "layout": "2006-01-02T15:04:05Z07:00"},
|
||||
{"tag": "AnswerTime", "type": "*composed", "value": "~AnswerTime", "layout": "2006-01-02T15:04:05Z07:00"},
|
||||
{"tag": "Usage", "type": "*composed", "value": "~Usage"},
|
||||
{"tag": "Cost", "type": "*composed", "value": "~Cost","rounding_decimals":5},
|
||||
{"tag": "OriginID", "path":"*exp", "type": "*composed", "value": "~*req.OriginID"},
|
||||
{"tag": "OrderID", "path":"*exp", "type": "*composed", "value": "~*req.OrderID"},
|
||||
{"tag": "RequestType", "path":"*exp", "type": "*composed", "value": "~*req.RequestType"},
|
||||
{"tag": "Account", "path":"*exp", "type": "*composed", "value": "~*req.Account"},
|
||||
{"tag": "Destination", "path":"*exp", "type": "*composed", "value": "~*req.Destination"},
|
||||
{"tag": "SetupTime", "path":"*exp", "type": "*composed", "value": "~*req.SetupTime", "layout": "2006-01-02T15:04:05Z07:00"},
|
||||
{"tag": "AnswerTime", "path":"*exp", "type": "*composed", "value": "~*req.AnswerTime", "layout": "2006-01-02T15:04:05Z07:00"},
|
||||
{"tag": "Usage", "path":"*exp", "type": "*composed", "value": "~*req.Usage"},
|
||||
{"tag": "Cost", "path":"*exp", "type": "*composed", "value": "~*req.Cost","rounding_decimals":5},
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -299,23 +299,23 @@
|
||||
"partial_record_cache": "1s",
|
||||
"partial_cache_expiry_action": "*post_cdr",
|
||||
"fields":[
|
||||
{"tag": "ToR", "path": "ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "AccId1", "path": "OriginID", "type": "*composed", "value": "~*req.0"},
|
||||
{"tag": "AccId2", "path": "OriginID", "type": "*composed", "value": "_"},
|
||||
{"tag": "AccId3", "path": "OriginID", "type": "*composed", "value": "~*req.1"},
|
||||
{"tag": "AccId4", "path": "OriginID", "type": "*composed", "value": "_"},
|
||||
{"tag": "AccId5", "path": "OriginID", "type": "*composed", "value": "~*req.4"},
|
||||
{"tag": "OrderID", "path": "OrderID", "type": "*unix_timestamp", "value": "~*req.3"},
|
||||
{"tag": "OriginHost", "path": "OriginHost", "type": "*constant", "value": "127.0.0.1", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*constant", "value": "*rated", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*constant", "value": "cgrates.org", "mandatory": true},
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable", "value": "~*req.0:s/^49([1-9]\\d+)$/0$1/", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable", "value": "~*req.1:s/^00(\\d+)$/+$1/", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable", "value": "~*req.6:s/^(\\d+)$/${1}s/", "mandatory": true},
|
||||
{"tag": "Partial", "path": "Partial", "type": "*constant", "value": "true", "filters":["*string:~*req.10:partial"]}
|
||||
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "AccId1", "path": "*cgreq.OriginID", "type": "*composed", "value": "~*req.0"},
|
||||
{"tag": "AccId2", "path": "*cgreq.OriginID", "type": "*composed", "value": "_"},
|
||||
{"tag": "AccId3", "path": "*cgreq.OriginID", "type": "*composed", "value": "~*req.1"},
|
||||
{"tag": "AccId4", "path": "*cgreq.OriginID", "type": "*composed", "value": "_"},
|
||||
{"tag": "AccId5", "path": "*cgreq.OriginID", "type": "*composed", "value": "~*req.4"},
|
||||
{"tag": "OrderID", "path": "*cgreq.OrderID", "type": "*unix_timestamp", "value": "~*req.3"},
|
||||
{"tag": "OriginHost", "path": "*cgreq.OriginHost", "type": "*constant", "value": "127.0.0.1", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*rated", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*constant", "value": "cgrates.org", "mandatory": true},
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.0:s/^49([1-9]\\d+)$/0$1/", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.1:s/^00(\\d+)$/+$1/", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable", "value": "~*req.6:s/^(\\d+)$/${1}s/", "mandatory": true},
|
||||
{"tag": "Partial", "path": "*cgreq.Partial", "type": "*constant", "value": "true", "filters":["*string:~*req.10:partial"]}
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -330,22 +330,22 @@
|
||||
"flags": ["*cdrs"],
|
||||
"partial_record_cache": "2s",
|
||||
"fields":[
|
||||
{"tag": "Tor", "path": "ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "OriginID", "type": "*variable","value":"~*req.3;~*req.1;~*req.2", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "RequestType", "type": "*variable", "value": "~*req.7", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "Tenant", "type": "*constant", "value": "cgrates.org", "mandatory": true},
|
||||
{"tag": "Category", "path": "Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "Account", "type": "*variable", "value": "~*req.8", "mandatory": true},
|
||||
{"tag": "Subject", "path": "Subject", "type": "*variable", "value": "~*req.8", "mandatory": true},
|
||||
{"tag": "Destination", "path": "Destination", "type": "*variable", "value": "~*req.9", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "SetupTime", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable", "mandatory": true}, // Value for Usage is composed based on record
|
||||
{"tag": "DisconnectCause", "path": "DisconnectCause", "type": "*variable", "value": "~*req.4; ;~*req.5", "mandatory": true},
|
||||
{"tag": "DialogId", "path": "DialogId", "type": "*variable", "value": "~*req.11"}
|
||||
{"tag": "Tor", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
|
||||
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable","value":"~*req.3;~*req.1;~*req.2", "mandatory": true},
|
||||
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*variable", "value": "~*req.7", "mandatory": true},
|
||||
{"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*constant", "value": "cgrates.org", "mandatory": true},
|
||||
{"tag": "Category", "path": "*cgreq.Category", "type": "*constant", "value": "call", "mandatory": true},
|
||||
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.8", "mandatory": true},
|
||||
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable", "value": "~*req.8", "mandatory": true},
|
||||
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.9", "mandatory": true},
|
||||
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.6", "mandatory": true},
|
||||
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable", "mandatory": true}, // Value for Usage is composed based on record
|
||||
{"tag": "DisconnectCause", "path": "*cgreq.DisconnectCause", "type": "*variable", "value": "~*req.4; ;~*req.5", "mandatory": true},
|
||||
{"tag": "DialogId", "path": "*cgreq.DialogId", "type": "*variable", "value": "~*req.11"}
|
||||
],
|
||||
}
|
||||
],
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
|
||||
@@ -153,14 +153,13 @@ func (rdr *CSVFileER) processFile(fPath, fName string) (err error) {
|
||||
agReq); err != nil || !pass {
|
||||
continue
|
||||
}
|
||||
navMp, err := agReq.AsNavigableMap(rdr.Config().Fields)
|
||||
if err != nil {
|
||||
if err := agReq.SetFields(rdr.Config().Fields); err != nil {
|
||||
utils.Logger.Warning(
|
||||
fmt.Sprintf("<%s> reading file: <%s> row <%d>, ignoring due to error: <%s>",
|
||||
utils.ERs, absPath, rowNr, err.Error()))
|
||||
continue
|
||||
}
|
||||
rdr.rdrEvents <- &erEvent{cgrEvent: navMp.AsCGREvent(
|
||||
rdr.rdrEvents <- &erEvent{cgrEvent: agReq.CGRRequest.AsCGREvent(
|
||||
agReq.Tenant, utils.NestingSep),
|
||||
rdrCfg: rdr.Config()}
|
||||
evsPosted++
|
||||
|
||||
@@ -196,8 +196,7 @@ func (rdr *FWVFileER) processFile(fPath, fName string) (err error) {
|
||||
agReq); err != nil || !pass {
|
||||
continue
|
||||
}
|
||||
navMp, err := agReq.AsNavigableMap(rdr.Config().Fields)
|
||||
if err != nil {
|
||||
if err := agReq.SetFields(rdr.Config().Fields); err != nil {
|
||||
utils.Logger.Warning(
|
||||
fmt.Sprintf("<%s> reading file: <%s> row <%d>, ignoring due to error: <%s>",
|
||||
utils.ERs, absPath, rowNr, err.Error()))
|
||||
@@ -205,7 +204,7 @@ func (rdr *FWVFileER) processFile(fPath, fName string) (err error) {
|
||||
continue
|
||||
}
|
||||
rdr.offset += rdr.lineLen // increase the offset
|
||||
rdr.rdrEvents <- &erEvent{cgrEvent: navMp.AsCGREvent(
|
||||
rdr.rdrEvents <- &erEvent{cgrEvent: agReq.CGRRequest.AsCGREvent(
|
||||
agReq.Tenant, utils.NestingSep),
|
||||
rdrCfg: rdr.Config()}
|
||||
evsPosted++
|
||||
@@ -286,14 +285,13 @@ func (rdr *FWVFileER) processTrailer(file *os.File, rowNr, evsPosted int, absPat
|
||||
agReq); err != nil || !pass {
|
||||
return nil
|
||||
}
|
||||
navMp, err := agReq.AsNavigableMap(trailerFields)
|
||||
if err != nil {
|
||||
if err := agReq.SetFields(trailerFields); err != nil {
|
||||
utils.Logger.Warning(
|
||||
fmt.Sprintf("<%s> reading file: <%s> row <%d>, ignoring due to error: <%s>",
|
||||
utils.ERs, absPath, rowNr, err.Error()))
|
||||
return err
|
||||
}
|
||||
rdr.rdrEvents <- &erEvent{cgrEvent: navMp.AsCGREvent(
|
||||
rdr.rdrEvents <- &erEvent{cgrEvent: agReq.CGRRequest.AsCGREvent(
|
||||
agReq.Tenant, utils.NestingSep),
|
||||
rdrCfg: rdr.Config()}
|
||||
evsPosted++
|
||||
@@ -326,8 +324,7 @@ func (rdr *FWVFileER) createHeaderMap(record string, rowNr, evsPosted int, absPa
|
||||
agReq); err != nil || !pass {
|
||||
return nil
|
||||
}
|
||||
navMp, err := agReq.AsNavigableMap(hdrFields)
|
||||
if err != nil {
|
||||
if err := agReq.SetFields(hdrFields); err != nil {
|
||||
utils.Logger.Warning(
|
||||
fmt.Sprintf("<%s> reading file: <%s> row <%d>, ignoring due to error: <%s>",
|
||||
utils.ERs, absPath, rowNr, err.Error()))
|
||||
@@ -335,7 +332,7 @@ func (rdr *FWVFileER) createHeaderMap(record string, rowNr, evsPosted int, absPa
|
||||
return err
|
||||
}
|
||||
rdr.offset += rdr.headerOffset // increase the offset
|
||||
rdr.rdrEvents <- &erEvent{cgrEvent: navMp.AsCGREvent(
|
||||
rdr.rdrEvents <- &erEvent{cgrEvent: agReq.CGRRequest.AsCGREvent(
|
||||
agReq.Tenant, utils.NestingSep),
|
||||
rdrCfg: rdr.Config()}
|
||||
evsPosted++
|
||||
|
||||
@@ -145,14 +145,13 @@ func (rdr *XMLFileER) processFile(fPath, fName string) (err error) {
|
||||
agReq); err != nil || !pass {
|
||||
continue
|
||||
}
|
||||
navMp, err := agReq.AsNavigableMap(rdr.Config().Fields)
|
||||
if err != nil {
|
||||
if err := agReq.SetFields(rdr.Config().Fields); err != nil {
|
||||
utils.Logger.Warning(
|
||||
fmt.Sprintf("<%s> reading file: <%s> row <%d>, ignoring due to error: <%s>",
|
||||
utils.ERs, absPath, rowNr, err.Error()))
|
||||
continue
|
||||
}
|
||||
rdr.rdrEvents <- &erEvent{cgrEvent: navMp.AsCGREvent(
|
||||
rdr.rdrEvents <- &erEvent{cgrEvent: agReq.CGRRequest.AsCGREvent(
|
||||
agReq.Tenant, utils.NestingSep),
|
||||
rdrCfg: rdr.Config()}
|
||||
evsPosted++
|
||||
|
||||
@@ -176,7 +176,7 @@ func (rdr *FlatstoreER) processFile(fPath, fName string) (err error) {
|
||||
|
||||
// build Usage from Fields based on record lenght
|
||||
for i, cntFld := range rdr.Config().Fields {
|
||||
if cntFld.Path == utils.Usage {
|
||||
if cntFld.Path == utils.MetaCgreq+utils.NestingSep+utils.Usage {
|
||||
rdr.Config().Fields[i].Value = config.NewRSRParsersMustCompile("~*req."+strconv.Itoa(len(record)-1), true, utils.INFIELD_SEP) // in case of flatstore, last element will be the duration computed by us
|
||||
}
|
||||
}
|
||||
@@ -192,15 +192,14 @@ func (rdr *FlatstoreER) processFile(fPath, fName string) (err error) {
|
||||
agReq); err != nil || !pass {
|
||||
continue
|
||||
}
|
||||
navMp, err := agReq.AsNavigableMap(rdr.Config().Fields)
|
||||
if err != nil {
|
||||
if err := agReq.SetFields(rdr.Config().Fields); err != nil {
|
||||
utils.Logger.Warning(
|
||||
fmt.Sprintf("<%s> reading file: <%s> row <%d>, ignoring due to error: <%s>",
|
||||
utils.ERs, absPath, rowNr, err.Error()))
|
||||
continue
|
||||
}
|
||||
|
||||
rdr.rdrEvents <- &erEvent{cgrEvent: navMp.AsCGREvent(
|
||||
rdr.rdrEvents <- &erEvent{cgrEvent: agReq.CGRRequest.AsCGREvent(
|
||||
agReq.Tenant, utils.NestingSep),
|
||||
rdrCfg: rdr.Config()}
|
||||
evsPosted++
|
||||
|
||||
@@ -171,11 +171,10 @@ func (rdr *KafkaER) processMessage(msg []byte) (err error) {
|
||||
agReq); err != nil || !pass {
|
||||
return
|
||||
}
|
||||
var navMp *config.NavigableMap
|
||||
if navMp, err = agReq.AsNavigableMap(rdr.Config().Fields); err != nil {
|
||||
if err = agReq.SetFields(rdr.Config().Fields); err != nil {
|
||||
return
|
||||
}
|
||||
rdr.rdrEvents <- &erEvent{cgrEvent: navMp.AsCGREvent(
|
||||
rdr.rdrEvents <- &erEvent{cgrEvent: agReq.CGRRequest.AsCGREvent(
|
||||
agReq.Tenant, utils.NestingSep),
|
||||
rdrCfg: rdr.Config()}
|
||||
return
|
||||
|
||||
@@ -56,7 +56,7 @@ func TestKafkaER(t *testing.T) {
|
||||
"filters": [], // limit parsing based on the filters
|
||||
"flags": [], // flags to influence the event processing
|
||||
"fields":[ // import fields template, tag will match internally CDR field, in case of .csv value will be represented by index of the field value
|
||||
{"tag": "CGRID", "type": "*composed", "value": "~*req.CGRID", "path": "CGRID"},
|
||||
{"tag": "CGRID", "type": "*composed", "value": "~*req.CGRID", "path": "*cgreq.CGRID"},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
@@ -168,8 +168,7 @@ func (rdr *PartialCSVFileER) processFile(fPath, fName string) (err error) {
|
||||
agReq); err != nil || !pass {
|
||||
continue
|
||||
}
|
||||
navMp, err := agReq.AsNavigableMap(rdr.Config().Fields)
|
||||
if err != nil {
|
||||
if err := agReq.SetFields(rdr.Config().Fields); err != nil {
|
||||
utils.Logger.Warning(
|
||||
fmt.Sprintf("<%s> reading file: <%s> row <%d>, ignoring due to error: <%s>",
|
||||
utils.ERs, absPath, rowNr, err.Error()))
|
||||
@@ -177,14 +176,14 @@ func (rdr *PartialCSVFileER) processFile(fPath, fName string) (err error) {
|
||||
}
|
||||
|
||||
// take OriginID and OriginHost to compose CGRID
|
||||
orgId, err := navMp.FieldAsString([]string{utils.OriginID})
|
||||
orgId, err := agReq.CGRRequest.FieldAsString([]string{utils.OriginID})
|
||||
if err == utils.ErrNotFound {
|
||||
utils.Logger.Warning(
|
||||
fmt.Sprintf("<%s> Missing <OriginID> field for row <%d> , <%s>",
|
||||
utils.ERs, rowNr, record))
|
||||
continue
|
||||
}
|
||||
orgHost, err := navMp.FieldAsString([]string{utils.OriginHost})
|
||||
orgHost, err := agReq.CGRRequest.FieldAsString([]string{utils.OriginHost})
|
||||
if err == utils.ErrNotFound {
|
||||
utils.Logger.Warning(
|
||||
fmt.Sprintf("<%s> Missing <OriginHost> field for row <%d> , <%s>",
|
||||
@@ -193,19 +192,19 @@ func (rdr *PartialCSVFileER) processFile(fPath, fName string) (err error) {
|
||||
}
|
||||
cgrID := utils.Sha1(orgId, orgHost)
|
||||
// take Partial field from NavigableMap
|
||||
partial, _ := navMp.FieldAsString([]string{utils.Partial})
|
||||
partial, _ := agReq.CGRRequest.FieldAsString([]string{utils.Partial})
|
||||
if val, has := rdr.cache.Get(cgrID); !has {
|
||||
if utils.IsSliceMember([]string{"false", utils.EmptyString}, partial) { // complete CDR
|
||||
rdr.rdrEvents <- &erEvent{cgrEvent: navMp.AsCGREvent(agReq.Tenant, utils.NestingSep),
|
||||
rdr.rdrEvents <- &erEvent{cgrEvent: agReq.CGRRequest.AsCGREvent(agReq.Tenant, utils.NestingSep),
|
||||
rdrCfg: rdr.Config()}
|
||||
evsPosted++
|
||||
} else {
|
||||
rdr.cache.Set(cgrID,
|
||||
[]*utils.CGREvent{navMp.AsCGREvent(agReq.Tenant, utils.NestingSep)}, nil)
|
||||
[]*utils.CGREvent{agReq.CGRRequest.AsCGREvent(agReq.Tenant, utils.NestingSep)}, nil)
|
||||
}
|
||||
} else {
|
||||
origCgrEvs := val.([]*utils.CGREvent)
|
||||
origCgrEvs = append(origCgrEvs, navMp.AsCGREvent(agReq.Tenant, utils.NestingSep))
|
||||
origCgrEvs = append(origCgrEvs, agReq.CGRRequest.AsCGREvent(agReq.Tenant, utils.NestingSep))
|
||||
if utils.IsSliceMember([]string{"false", utils.EmptyString}, partial) { // complete CDR
|
||||
//sort CGREvents based on AnswertTime and SetupTime
|
||||
sort.Slice(origCgrEvs, func(i, j int) bool {
|
||||
|
||||
@@ -198,12 +198,11 @@ func (rdr *SQLEventReader) processMessage(msg map[string]interface{}) (err error
|
||||
agReq); err != nil || !pass {
|
||||
return
|
||||
}
|
||||
var navMp *config.NavigableMap
|
||||
if navMp, err = agReq.AsNavigableMap(rdr.Config().Fields); err != nil {
|
||||
if err = agReq.SetFields(rdr.Config().Fields); err != nil {
|
||||
return
|
||||
}
|
||||
rdr.rdrEvents <- &erEvent{
|
||||
cgrEvent: navMp.AsCGREvent(agReq.Tenant, utils.NestingSep),
|
||||
cgrEvent: agReq.CGRRequest.AsCGREvent(agReq.Tenant, utils.NestingSep),
|
||||
rdrCfg: rdr.Config(),
|
||||
}
|
||||
return
|
||||
|
||||
@@ -85,7 +85,7 @@ func testSQLInitConfig(t *testing.T) {
|
||||
"filters": [], // limit parsing based on the filters
|
||||
"flags": [], // flags to influence the event processing
|
||||
"fields":[ // import fields template, tag will match internally CDR field, in case of .csv value will be represented by index of the field value
|
||||
{"tag": "CGRID", "type": "*composed", "value": "~*req.cgrid", "path": "CGRID"},
|
||||
{"tag": "CGRID", "type": "*composed", "value": "~*req.cgrid", "path": "*cgreq.CGRID"},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user