mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
165 lines
4.4 KiB
JSON
165 lines
4.4 KiB
JSON
{
|
|
// CGRateS Configuration file
|
|
|
|
|
|
"general": {
|
|
"log_level": 7,
|
|
"reply_timeout": "30s",
|
|
},
|
|
|
|
|
|
"listen": {
|
|
"rpc_json": ":2012",
|
|
"rpc_gob": ":2013",
|
|
"http": ":2080",
|
|
},
|
|
|
|
|
|
"data_db": {
|
|
"db_type": "mongo",
|
|
"db_name": "10",
|
|
"db_port": 27017,
|
|
},
|
|
|
|
|
|
"stor_db": {
|
|
"db_type": "mongo",
|
|
"db_name": "cgrates",
|
|
"db_port": 27017,
|
|
},
|
|
|
|
|
|
"rals": {
|
|
"enabled": true,
|
|
"thresholds_conns": ["*internal"],
|
|
},
|
|
|
|
|
|
"schedulers": {
|
|
"enabled": true,
|
|
"cdrs_conns": ["*localhost"],
|
|
},
|
|
|
|
|
|
"cdrs": {
|
|
"enabled": true,
|
|
},
|
|
|
|
|
|
"cdre": {
|
|
"TestTutITExportCDR": {
|
|
"fields": [
|
|
{"path": "*exp.CGRID", "type": "*composed", "value": "~*req.CGRID"},
|
|
{"path": "*exp.RunID", "type": "*composed", "value": "~*req.RunID"},
|
|
{"path": "*exp.OriginID", "type": "*composed", "value": "~*req.OriginID"},
|
|
{"path": "*exp.RequestType", "type": "*composed", "value": "~*req.RequestType"},
|
|
{"path": "*exp.Tenant", "type": "*composed", "value": "~*req.Tenant"},
|
|
{"path": "*exp.Category", "type": "*composed", "value": "~*req.Category"},
|
|
{"path": "*exp.Account", "type": "*composed", "value": "~*req.Account"},
|
|
{"path": "*exp.Destination", "type": "*composed", "value": "~*req.Destination"},
|
|
{"path": "*exp.AnswerTime", "type": "*composed", "value": "~*req.AnswerTime", "layout": "2006-01-02T15:04:05Z07:00"},
|
|
{"path": "*exp.Usage", "type": "*composed", "value": "~*req.Usage"},
|
|
{"path": "*exp.Cost", "type": "*composed", "value": "~*req.Cost", "rounding_decimals": 4},
|
|
{"path": "*exp.MatchedDestinationID", "type": "*composed", "value": "~*req.CostDetails:s/\"MatchedDestId\":.*_(\\w{4})/${1}/:s/\"MatchedDestId\":\"INTERNAL\"/ON010/"},
|
|
],
|
|
},
|
|
},
|
|
|
|
|
|
"chargers": {
|
|
"enabled": true,
|
|
"attributes_conns": ["*internal"],
|
|
},
|
|
|
|
|
|
"resources": {
|
|
"enabled": true,
|
|
"store_interval": "1s",
|
|
"thresholds_conns": ["*internal"]
|
|
},
|
|
|
|
|
|
"stats": {
|
|
"enabled": true,
|
|
"store_interval": "1s",
|
|
"thresholds_conns": ["*internal"],
|
|
},
|
|
|
|
|
|
"thresholds": {
|
|
"enabled": true,
|
|
"store_interval": "1s",
|
|
},
|
|
|
|
|
|
"suppliers": {
|
|
"enabled": true,
|
|
"stats_conns": ["*localhost"],
|
|
"resources_conns": ["*localhost"],
|
|
},
|
|
|
|
|
|
"attributes": { // Attribute service
|
|
"enabled": true, // starts Attribute service: <true|false>.
|
|
},
|
|
|
|
|
|
"loaders": [
|
|
{
|
|
"id": "CustomLoader", // identifier of the Loader
|
|
"enabled": true, // starts as service: <true|false>.
|
|
"dry_run": false, // do not send the CDRs to CDRS, just parse them
|
|
"run_delay": 0, // sleep interval in seconds between consecutive runs, 0 to use automation via inotify
|
|
"lock_filename": ".cgr.lock", // Filename containing concurrency lock in case of delayed processing
|
|
"caches_conns": ["*internal"],
|
|
"field_separator": ",", // separator used in case of csv files
|
|
"tp_in_dir": "/tmp/In", // absolute path towards the directory where the CDRs are stored
|
|
"tp_out_dir": "/tmp/Out", // absolute path towards the directory where processed CDRs will be moved
|
|
"data":[
|
|
{
|
|
"type": "*attributes", // data source type
|
|
"file_name": "Attributes.csv", // file name in the tp_in_dir
|
|
"fields": [
|
|
{"tag": "TenantID", "path": "Tenant", "type": "*variable", "value": "~0", "mandatory": true},
|
|
{"tag": "ProfileID", "path": "ID", "type": "*variable", "value": "~1", "mandatory": true},
|
|
{"tag": "Contexts", "path": "Contexts", "type": "*variable", "value": "~2"},
|
|
{"tag": "FilterIDs", "path": "FilterIDs", "type": "*variable", "value": "~3"},
|
|
{"tag": "ActivationInterval", "path": "ActivationInterval", "type": "*variable", "value": "~4"},
|
|
{"tag": "AttributeFilterIDs", "path": "AttributeFilterIDs", "type": "*variable", "value": "~5"},
|
|
{"tag": "Path", "path": "Path", "type": "*variable", "value": "~6"},
|
|
{"tag": "Type", "path": "Type", "type": "*variable", "value": "~7"},
|
|
{"tag": "Value", "path": "Value", "type": "*variable", "value": "~8"},
|
|
{"tag": "Blocker", "path": "Blocker", "type": "*variable", "value": "~9"},
|
|
{"tag": "Weight", "path": "Weight", "type": "*variable", "value": "~10"},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
],
|
|
|
|
|
|
"sessions": {
|
|
"enabled": true,
|
|
"rals_conns": ["*internal"],
|
|
"cdrs_conns": ["*internal"],
|
|
"chargers_conns": ["*internal"],
|
|
},
|
|
|
|
|
|
"migrator": {
|
|
"out_datadb_type": "mongo",
|
|
"out_datadb_port": "27017",
|
|
"out_datadb_name": "10",
|
|
"out_stordb_type": "mongo",
|
|
"out_stordb_port": "27017",
|
|
"out_stordb_name": "cgrates",
|
|
"users_filters":["Account"],
|
|
},
|
|
|
|
|
|
"apiers": {
|
|
"enabled": true,
|
|
"scheduler_conns": ["*internal"],
|
|
},
|
|
}
|