mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 10:06:24 +05:00
113 lines
5.5 KiB
JSON
113 lines
5.5 KiB
JSON
{
|
|
"general": {
|
|
"log_level": 7
|
|
},
|
|
"data_db": {
|
|
"db_type": "*internal"
|
|
},
|
|
"stor_db": {
|
|
"db_type": "*internal"
|
|
},
|
|
"apiers":{
|
|
"enabled":true,
|
|
"scheduler_conns": ["*localhost"]
|
|
},
|
|
"rals": {
|
|
"enabled": true
|
|
},
|
|
|
|
"chargers":{
|
|
"enabled": true
|
|
},
|
|
|
|
"sessions":{
|
|
"enabled": true,
|
|
"chargers_conns": ["*localhost"],
|
|
"rals_conns": ["*localhost"],
|
|
"cdrs_conns": ["*localhost"]
|
|
},
|
|
|
|
"cdrs": {
|
|
"enabled": true,
|
|
"rals_conns": ["*localhost"],
|
|
"ees_conns": ["*localhost"] // needed so CDRs generated by CGRateS are exported
|
|
},
|
|
"schedulers": {
|
|
"enabled": true
|
|
},
|
|
|
|
"ers": {
|
|
"enabled": true,
|
|
"ees_conns": ["*localhost"],
|
|
"sessions_conns": ["*localhost"],
|
|
"readers": [
|
|
{
|
|
"id": "file_csv_reader",
|
|
"run_delay": "0",
|
|
"type": "*file_csv",
|
|
"source_path": "/tmp/CDRstoRead",
|
|
"flags": ["*log", "*cdrs"],
|
|
"processed_path": "/tmp/CDRsProcessed",
|
|
"fields":[
|
|
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice"},
|
|
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
|
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*postpaid", "mandatory": true},
|
|
{"tag":"Category","path":"*cgreq.Category","type":"*constant","value":"call"},
|
|
{"tag":"Account","path":"*cgreq.Account","type":"*variable","value":"~*req.1"},
|
|
{"tag":"Subject","path":"*cgreq.Subject","type":"*constant","value":"accSubject"},
|
|
{"tag":"Destination","path":"*cgreq.Destination","type":"*variable","value":"~*req.2"},
|
|
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable", "value": "~*req.3"},
|
|
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.4"},
|
|
{"tag": "Usage", "path": "*cgreq.Usage", "filters": ["*notempty:~*req.5:"],"type": "*variable", "value": "~*req.5;m", "mandatory": true}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
|
|
"ees": {
|
|
"enabled": true,
|
|
"cache": {
|
|
"*file_csv": {"limit": -1, "ttl": "500ms", "static_ttl": false},
|
|
},
|
|
"exporters": [
|
|
{
|
|
"id": "CSVExporter",
|
|
"type": "*file_csv",
|
|
"export_path": "/tmp/exportedCDRs",
|
|
"attempts": 1,
|
|
"synchronous": true,
|
|
"flags": ["*log"],
|
|
"fields":[
|
|
{"tag": "RunID", "path": "*hdr.RunID", "type": "*constant", "value": "RunID"},
|
|
{"tag": "ToR", "path": "*hdr.ToR", "type": "*constant", "value": "ToR"},
|
|
{"tag": "OriginID", "path": "*hdr.OriginID", "type": "*constant", "value": "OriginID"},
|
|
{"tag": "RequestType", "path": "*hdr.RequestType", "type": "*constant", "value": "RequestType"},
|
|
{"tag": "Category", "path": "*hdr.Category", "type": "*constant", "value": "Category"},
|
|
{"tag": "Account", "path": "*hdr.Account", "type": "*constant", "value": "Account"},
|
|
{"tag": "Subject", "path": "*hdr.Subject", "type": "*constant", "value": "Subject"},
|
|
{"tag": "Destination", "path": "*hdr.Destination", "type": "*constant", "value": "Destination"},
|
|
{"tag": "SetupTime", "path": "*hdr.SetupTime", "type": "*constant", "value": "SetupTime", "layout": "2006-01-02T15:04:05Z07:00"},
|
|
{"tag": "AnswerTime", "path": "*hdr.AnswerTime", "type": "*constant", "value": "AnswerTime", "layout": "2006-01-02T15:04:05Z07:00"},
|
|
{"tag": "Usage", "path": "*hdr.Usage", "type": "*constant", "value": "Usage"},
|
|
{"tag": "Cost", "path": "*hdr.Cost", "type": "*constant", "value": "Cost"},
|
|
{"tag": "PAYGUsage", "path": "*hdr.PAYGUsage", "type": "*constant", "value": "PAYGUsage"},
|
|
|
|
{"tag": "RunID", "path": "*exp.RunID", "type": "*variable", "value": "~*req.RunID"},
|
|
{"tag": "ToR", "path": "*exp.ToR", "type": "*variable", "value": "~*req.ToR", "mandatory": true},
|
|
{"tag": "OriginID", "path": "*exp.OriginID", "type": "*variable", "value": "~*req.OriginID", "mandatory": true},
|
|
{"tag": "RequestType", "path": "*exp.RequestType", "type": "*variable", "value": "~*req.RequestType", "mandatory": true},
|
|
{"tag": "Category", "path": "*exp.Category", "type": "*variable", "value": "~*req.Category", "mandatory": true},
|
|
{"tag": "Account", "path": "*exp.Account", "type": "*variable", "value": "~*req.Account", "mandatory": true},
|
|
{"tag": "Subject", "path": "*exp.Subject", "type": "*variable", "value": "~*req.Subject", "mandatory": true},
|
|
{"tag": "Destination", "path": "*exp.Destination", "type": "*variable", "value": "~*req.Destination", "mandatory": true},
|
|
{"tag": "SetupTime", "path": "*exp.SetupTime", "type": "*variable", "value": "~*req.SetupTime{*timestring:UTC:2006-01-02T15:04:05Z}" , "mandatory": true},
|
|
{"tag": "AnswerTime", "path": "*exp.AnswerTime", "type": "*variable", "value": "~*req.AnswerTime{*timestring:UTC:2006-01-02T15:04:05Z}", "mandatory": true},
|
|
{"tag": "Cost", "path": "*exp.Cost", "type": "*variable", "value": "~*req.Cost{*round:4}"},
|
|
{"tag": "Usage", "path": "*exp.Usage", "type": "*variable", "value": "~*req.Usage{*duration_seconds}", "mandatory": true},
|
|
{"tag": "PAYGUsage", "path": "*exp.PAYGUsage", "type": "*difference", "value": "~*req.CostDetails.AccountSummary.BalanceSummaries.balance_PAYG.Initial;~*req.CostDetails.AccountSummary.BalanceSummaries.balance_PAYG.Value", "mandatory": true}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
|
|
} |