Update EventReader integration tests

This commit is contained in:
TeoV
2020-02-05 15:02:53 +02:00
committed by Dan Christian Bogos
parent aa6d5a5450
commit b85ebe8214
13 changed files with 610 additions and 619 deletions

View File

@@ -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"}
],
}
],

View File

@@ -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"}
],
}
],
]
},

View File

@@ -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"}
],
}
],
]
},

View File

@@ -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"}
],
}
],
]
},