mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
61 lines
2.6 KiB
JSON
61 lines
2.6 KiB
JSON
{
|
|
"general": {
|
|
"log_level": 7
|
|
},
|
|
|
|
"apiers": {
|
|
"enabled": true
|
|
},
|
|
"filters": {
|
|
"apiers_conns": ["*localhost"]
|
|
},
|
|
"stor_db": {
|
|
"opts": {
|
|
"sqlConnMaxLifetime": "5s", // needed while running all integration tests
|
|
},
|
|
},
|
|
"ers": {
|
|
"enabled": true,
|
|
"sessions_conns":["*localhost"],
|
|
"readers": [
|
|
{
|
|
"id": "mysql",
|
|
"type": "*sql",
|
|
"run_delay": "1m",
|
|
"source_path": "*mysql://cgrates:CGRateS.org@127.0.0.1:3306",
|
|
"opts": {
|
|
"sqlDBName":"cgrates2",
|
|
"sqlTableName":"cdrs",
|
|
"sqlBatchSize": 2,
|
|
"sqlDeleteIndexedFields": ["id"],
|
|
},
|
|
"start_delay": "500ms", // wait for db to be populated before starting reader
|
|
"processed_path": "*delete",
|
|
"tenant": "cgrates.org",
|
|
"filters": [
|
|
"*gt:~*req.answer_time:-168h", // dont process cdrs with answer_time older than 7 days ago
|
|
"FLTR_SQL_RatingID", // "*eq:~*req.cost_details.Charges[0].RatingID:RatingID2",
|
|
"*string:~*vars.*readerID:mysql",
|
|
"FLTR_VARS", // "*string:~*vars.*readerID:mysql",
|
|
],
|
|
"flags": ["*dryrun"],
|
|
"fields":[
|
|
{"tag": "CGRID", "path": "*cgreq.CGRID", "type": "*variable", "value": "~*req.cgrid", "mandatory": true},
|
|
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*variable", "value": "~*req.tor", "mandatory": true},
|
|
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable", "value": "~*req.origin_id", "mandatory": true},
|
|
{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*variable", "value": "~*req.request_type", "mandatory": true},
|
|
{"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*variable", "value": "~*req.tenant", "mandatory": true},
|
|
{"tag": "Category", "path": "*cgreq.Category", "type": "*variable", "value": "~*req.category", "mandatory": true},
|
|
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.account", "mandatory": true},
|
|
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable", "value": "~*req.subject", "mandatory": true},
|
|
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.destination", "mandatory": true},
|
|
{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable", "value": "~*req.setup_time", "mandatory": true},
|
|
{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.answer_time", "mandatory": true},
|
|
{"tag": "CostDetails", "path": "*cgreq.CostDetails", "type": "*variable", "value": "~*req.cost_details", "mandatory": true},
|
|
{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable", "value": "~*req.usage", "mandatory": true},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
|
|
} |