{ // CGRateS Configuration file // "general": { "log_level": 7, }, "listen": { "rpc_json": ":2012", "rpc_gob": ":2013", "http": ":2080", }, "data_db": { // database used to store runtime data (eg: accounts, cdr stats) "db_type": "redis", // data_db type: "db_port": 6379, // data_db port to reach the database "db_name": "10", // data_db database name to connect to }, "stor_db": { "db_password": "CGRateS.org", }, "cache":{ "destinations": {"limit": 10000, "ttl":"0s", "precache": true}, "reverse_destinations": {"limit": 10000, "ttl":"0s", "precache": true}, "rating_plans": {"limit": 10000, "ttl":"0s","precache": true}, "rating_profiles": {"limit": 10000, "ttl":"0s", "precache": true}, "lcr_rules": {"limit": 10000, "ttl":"0s", "precache": true}, "cdr_stats": {"limit": 10000, "ttl":"0s", "precache": true}, "actions": {"limit": 10000, "ttl":"0s", "precache": true}, "action_plans": {"limit": 10000, "ttl":"0s", "precache": true}, "account_action_plans": {"limit": 10000, "ttl":"0s", "precache": true}, "action_triggers": {"limit": 10000, "ttl":"0s", "precache": true}, "shared_groups": {"limit": 10000, "ttl":"0s", "precache": true}, "aliases": {"limit": 10000, "ttl":"0s", "precache": true}, "reverse_aliases": {"limit": 10000, "ttl":"0s", "precache": true}, "derived_chargers": {"limit": 10000, "ttl":"0s", "precache": true}, "resource_profiles": {"limit": 10000, "ttl":"0s", "precache": true}, "resources": {"limit": 10000, "ttl":"0s", "precache": true}, "statqueues": {"limit": 10000, "ttl":"0s", "precache": true}, "statqueue_profiles": {"limit": 10000, "ttl":"0s", "precache": true}, "thresholds": {"limit": 10000, "ttl":"0s", "precache": true}, "threshold_profiles": {"limit": 10000, "ttl":"0s", "precache": true}, "filters": {"limit": 10000, "ttl":"0s", "precache": true}, "supplier_profiles": {"limit": 10000, "ttl":"0s", "precache": true}, "attribute_profiles": {"limit": 10000, "ttl":"0s", "precache": true}, "resource_filter_indexes" :{"limit": 10000, "ttl":"0s"}, "resource_filter_revindexes" : {"limit": 10000, "ttl":"0s"}, "stat_filter_indexes" : {"limit": 10000, "ttl":"0s"}, "stat_filter_revindexes" : {"limit": 10000, "ttl":"0s"}, "threshold_filter_indexes" : {"limit": 10000, "ttl":"0s"}, "threshold_filter_revindexes" : {"limit": 10000, "ttl":"0s"}, "supplier_filter_indexes" : {"limit": 10000, "ttl":"0s"}, "supplier_filter_revindexes" :{"limit": 10000, "ttl":"0s"}, "attribute_filter_indexes" : {"limit": 10000, "ttl":"0s"}, "attribute_filter_revindexes" : {"limit": 10000, "ttl":"0s"}, }, "rals": { "enabled": true, "thresholds_conns": [ {"address": "*internal"} ], "cdrstats_conns": [ {"address": "*internal"} ], "pubsubs_conns": [ {"address": "*internal"} ], "users_conns": [ {"address": "*internal"} ], "aliases_conns": [ {"address": "*internal"} ], }, "scheduler": { "enabled": true, }, "cdrs": { "enabled": true, "cdrstats_conns": [ {"address": "*internal"} ], }, "cdre": { "TestTutITExportCDR": { "content_fields": [ {"tag": "CGRID", "type": "*composed", "value": "CGRID"}, {"tag": "RunID", "type": "*composed", "value": "RunID"}, {"tag":"OriginID", "type": "*composed", "value": "OriginID"}, {"tag":"RequestType", "type": "*composed", "value": "RequestType"}, {"tag":"Tenant", "type": "*composed", "value": "Tenant"}, {"tag":"Category", "type": "*composed", "value": "Category"}, {"tag":"Account", "type": "*composed", "value": "Account"}, {"tag":"Destination", "type": "*composed", "value": "Destination"}, {"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": 4}, {"tag":"MatchedDestinationID", "type": "*composed", "value": "~CostDetails:s/\"MatchedDestId\":.*_(\\w{4})/${1}/:s/\"MatchedDestId\":\"INTERNAL\"/ON010/"}, ], }, }, "loaders": [ { "id": "TeoLoader", // identifier of the Loader "enabled": false, // starts as service: . "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": [ {"address": "*internal"}, // address where to reach the CacheS for data reload, empty for no reloads <""|*internal|x.y.z.y:1234> ], "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": "*resources", // data source type "file_name": "Resources.csv", // file name in the tp_in_dir "fields": [ {"tag": "Tenant", "field_id": "Tenant", "type": "*composed", "value": "0", "mandatory": true}, {"tag": "ID", "field_id": "ID", "type": "*composed", "value": "1", "mandatory": true}, {"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*composed", "value": "2"}, {"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*composed", "value": "3"}, {"tag": "TTL", "field_id": "UsageTTL", "type": "*composed", "value": "4"}, {"tag": "Limit", "field_id": "Limit", "type": "*composed", "value": "5"}, {"tag": "AllocationMessage", "field_id": "AllocationMessage", "type": "*composed", "value": "6"}, {"tag": "Blocker", "field_id": "Blocker", "type": "*composed", "value": "7"}, {"tag": "Stored", "field_id": "Stored", "type": "*composed", "value": "8"}, {"tag": "Weight", "field_id": "Weight", "type": "*composed", "value": "9"}, {"tag": "ThresholdIDs", "field_id": "ThresholdIDs", "type": "*composed", "value": "10"}, ], }, { "type": "*stats", // data source type "file_name": "Stats.csv", // file name in the tp_in_dir "fields": [ {"tag": "Tenant", "field_id": "Tenant", "type": "*composed", "value": "0", "mandatory": true}, {"tag": "ID", "field_id": "ID", "type": "*composed", "value": "1", "mandatory": true}, {"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*composed", "value": "2"}, {"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*composed", "value": "3"}, {"tag": "QueueLength", "field_id": "QueueLength", "type": "*composed", "value": "4"}, {"tag": "TTL", "field_id": "TTL", "type": "*composed", "value": "5"}, {"tag": "Metrics", "field_id": "Metrics", "type": "*composed", "value": "6"}, {"tag": "MetricParams", "field_id": "Parameters", "type": "*composed", "value": "7"}, {"tag": "Blocker", "field_id": "Blocker", "type": "*composed", "value": "8"}, {"tag": "Stored", "field_id": "Stored", "type": "*composed", "value": "9"}, {"tag": "Weight", "field_id": "Weight", "type": "*composed", "value": "10"}, {"tag": "MinItems", "field_id": "MinItems", "type": "*composed", "value": "11"}, {"tag": "ThresholdIDs", "field_id": "ThresholdIDs", "type": "*composed", "value": "12"}, ], }, { "type": "*thresholds", // data source type "file_name": "Thresholds.csv", // file name in the tp_in_dir "fields": [ {"tag": "Tenant", "field_id": "Tenant", "type": "*composed", "value": "0", "mandatory": true}, {"tag": "ID", "field_id": "ID", "type": "*composed", "value": "1", "mandatory": true}, {"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*composed", "value": "2"}, {"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*composed", "value": "3"}, {"tag": "MaxHits", "field_id": "MaxHits", "type": "*composed", "value": "4"}, {"tag": "MinHits", "field_id": "MinHits", "type": "*composed", "value": "5"}, {"tag": "MinSleep", "field_id": "MinSleep", "type": "*composed", "value": "6"}, {"tag": "Blocker", "field_id": "Blocker", "type": "*composed", "value": "7"}, {"tag": "Weight", "field_id": "Weight", "type": "*composed", "value": "8"}, {"tag": "ActionIDs", "field_id": "ActionIDs", "type": "*composed", "value": "9"}, {"tag": "Async", "field_id": "Async", "type": "*composed", "value": "10"}, ], }, { "type": "*suppliers", // data source type "file_name": "Suppliers.csv", // file name in the tp_in_dir "fields": [ {"tag": "Tenant", "field_id": "Tenant", "type": "*composed", "value": "0", "mandatory": true}, {"tag": "ID", "field_id": "ID", "type": "*composed", "value": "1", "mandatory": true}, {"tag": "FilterIDs", "field_id": "FilterIDs", "type": "*composed", "value": "2"}, {"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*composed", "value": "3"}, {"tag": "Sorting", "field_id": "Sorting", "type": "*composed", "value": "4"}, {"tag": "SortingParamameters", "field_id": "SortingParamameters", "type": "*composed", "value": "5"}, {"tag": "SupplierID", "field_id": "SupplierID", "type": "*composed", "value": "6"}, {"tag": "SupplierFilterIDs", "field_id": "SupplierFilterIDs", "type": "*composed", "value": "7"}, {"tag": "SupplierAccountIDs", "field_id": "SupplierAccountIDs", "type": "*composed", "value": "8"}, {"tag": "SupplierRatingPlanIDs", "field_id": "SupplierRatingPlanIDs", "type": "*composed", "value": "9"}, {"tag": "SupplierResourceIDs", "field_id": "SupplierResourceIDs", "type": "*composed", "value": "10"}, {"tag": "SupplierStatIDs", "field_id": "SupplierStatIDs", "type": "*composed", "value": "11"}, {"tag": "SupplierWeight", "field_id": "SupplierWeight", "type": "*composed", "value": "12"}, {"tag": "SupplierBlocker", "field_id": "SupplierBlocker", "type": "*composed", "value": "13"}, {"tag": "SupplierParameters", "field_id": "SupplierParameters", "type": "*composed", "value": "14"}, {"tag": "Weight", "field_id": "Weight", "type": "*composed", "value": "15"}, ], }, ], }, { "id": "FilterLoader", // identifier of the Loader "enabled": false, // starts as service: . "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": [ {"address": "*internal"}, // address where to reach the CacheS for data reload, empty for no reloads <""|*internal|x.y.z.y:1234> ], "field_separator": ",", // separator used in case of csv files "tp_in_dir": "/tmp/FilterIn", // absolute path towards the directory where the CDRs are stored "tp_out_dir": "/tmp/FilterOut", // absolute path towards the directory where processed CDRs will be moved "data":[ { "type": "*filters", // data source type "file_name": "Filters.csv", // file name in the tp_in_dir "fields": [ {"tag": "Tenant", "field_id": "Tenant", "type": "*composed", "value": "0", "mandatory": true}, {"tag": "ID", "field_id": "ID", "type": "*composed", "value": "1", "mandatory": true}, {"tag": "FilterType", "field_id": "FilterType", "type": "*composed", "value": "2"}, {"tag": "FilterFieldName", "field_id": "FilterFieldName", "type": "*composed", "value": "3"}, {"tag": "FilterFieldValues", "field_id": "FilterFieldValues", "type": "*composed", "value": "4"}, {"tag": "ActivationInterval", "field_id": "ActivationInterval", "type": "*composed", "value": "5"}, ], }, ], }, ], "cdrstats": { "enabled": true, }, "pubsubs": { "enabled": true, }, "users": { "enabled": true, "indexes": ["Uuid"], }, "attributes": { // Attribute service "enabled": true, // starts Alias service: . }, "resources": { "enabled": true, "store_interval": "1s", "thresholds_conns": [ {"address": "*internal"} ], }, "stats": { "enabled": true, "store_interval": "1s", "thresholds_conns": [ {"address": "*internal"} ], }, "thresholds": { "enabled": true, "store_interval": "1s", }, "suppliers": { "enabled": true, }, "aliases": { "enabled": true, }, "sessions": { "enabled": true, "suppliers_conns": [ {"address": "*internal"} ], "resources_conns": [ {"address": "*internal"} ], "attributes_conns": [ {"address": "*internal"} ], "rals_conns": [ {"address": "*internal"} ], }, "migrator":{ "out_stordb_password": "CGRateS.org", }, }