Configuration
Has a JSON format with commented lines starting with //.
Organized into configuration sections which offers the advantage of being easily splitable.
Hint
You can split the configuration into any number of .json files/directories since the :ref:cgr-engine loads recursively the complete configuration folder, alphabetically ordered
All configuration options come with defaults and we have tried our best to choose the best ones for a minimum of efforts necessary when running.
Can be loaded from local folders or remotely using HTTP transport.
The configuration can be loaded at start and reloaded at run time using APIs designed for that. This can be done either as config pull (reload from path) or as config push (the JSON BLOB is sent via API to the engine).
Hint
You can reload from remote HTTP server as well.
Below is the default configuration file which comes hardcoded into cgr-engine:
1{
2
3// Real-time Online/Offline Charging System (OCS) for Telecom & ISP environments
4// Copyright (C) ITsysCOM GmbH
5//
6// This file contains the default configuration hardcoded into CGRateS.
7// This is what you get when you load CGRateS with an empty configuration file.
8
9// "general": {
10// "node_id": "", // identifier of this instance in the cluster, if empty it will be autogenerated
11// "logger":"*syslog", // controls the destination of logs <*syslog|*stdout>
12// "log_level": 6, // control the level of messages logged (0-emerg to 7-debug)
13// "rounding_decimals": 5, // system level precision for floats
14// "dbdata_encoding": "*msgpack", // encoding used to store object data in strings: <*msgpack|*json>
15// "tpexport_dir": "/var/spool/cgrates/tpe", // path towards export folder for offline TariffPlans
16// "poster_attempts": 3, // number of attempts before considering post request failed (eg: *http_post, CDR exports)
17// "failed_posts_dir": "/var/spool/cgrates/failed_posts", // directory path where we store failed requests
18// "failed_posts_ttl": "5s", // time to wait before writing the failed posts in a single file
19// "default_request_type": "*rated", // default request type to consider when missing from requests: <""|*prepaid|*postpaid|*pseudoprepaid|*rated>
20// "default_category": "call", // default category to consider when missing from requests
21// "default_tenant": "cgrates.org", // default tenant to consider when missing from requests
22// "default_timezone": "Local", // default timezone for timestamps where not specified <""|UTC|Local|$IANA_TZ_DB>
23// "default_caching": "*reload", // default actions to do when caching items
24// "caching_delay": "0s", // add delay before cache reload
25// "min_call_duration": "0s", // only authorize calls with allowed duration higher than this
26// "max_call_duration": "3h", // maximum call duration a prepaid call can last
27// "connect_attempts": 5, // initial server connect attempts
28// "reconnects": -1, // number of retries in case of connection lost
29// "max_reconnect_interval": "", // time to wait in between reconnect attempts
30// "connect_timeout": "1s", // consider connection unsuccessful on timeout, 0 to disable the feature
31// "reply_timeout": "2s", // consider connection down for replies taking longer than this value
32// "locking_timeout": "0", // timeout internal locks to avoid deadlocks
33// "digest_separator": ",", // separator to use in replies containing data digests
34// "digest_equal": ":", // equal symbol used in case of digests
35// "rsr_separator": ";", // separator used within RSR fields
36// "max_parallel_conns": 100 // the maximum number of connection used by the *parallel strategy
37// },
38
39
40// "cores": {
41// "caps": 0, // maximum concurrent request allowed ( 0 to disabled )
42// "caps_strategy": "*busy", // strategy in case of concurrent requests reached
43// "caps_stats_interval": "0", // the interval duration we sample for caps stats ( 0 to disabled )
44// "shutdown_timeout": "1s" // the duration to wait until all services are stopped
45// },
46
47
48// "rpc_conns": {
49// //"*localhost": {
50// //"conns": [ // rpc connections definitions
51// //{
52// //"address": "127.0.0.1:2012",
53// //"transport":"*json",
54// //"connect_attempts": 5,
55// //"reconnects": -1,
56// //"max_reconnect_interval": "",
57// //"connect_timeout":"1s",
58// //"reply_timeout":"2s",
59// //"tls":false,
60// //"client_key":"",
61// //"client_certificate":"",
62// //"ca_certificate":""
63// //}
64// //]
65// //}
66// },
67
68
69// "data_db": { // database used to store runtime data (eg: accounts)
70// "db_type": "*redis", // data_db type: <*redis|*mongo>
71// "db_host": "127.0.0.1", // data_db host address
72// "db_port": 6379, // data_db port to reach the database
73// "db_name": "10", // data_db database name to connect to
74// "db_user": "cgrates", // username to use when connecting to data_db
75// "db_password": "", // password to use when connecting to data_db
76// "remote_conns":[], // the conns that are queried when the items are not found in local DB
77// "remote_conn_id": "", // the ID to be sent to remote_conns to identify the connection
78// "replication_conns":[], // the conns the items are replicated
79// "replication_filtered": false, // if this is enabled the replication will be made only to the conns that received a get
80// "replication_cache": "", // the caching action that is executed on the replication_conns when the items are replicated
81// "items":{
82// "*accounts": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
83// "*reverse_destinations": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
84// "*destinations": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
85// "*rating_plans": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
86// "*rating_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
87// "*actions": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
88// "*action_plans": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
89// "*account_action_plans": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
90// "*action_triggers": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
91// "*shared_groups": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
92// "*timings": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
93// "*resource_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
94// "*resources": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
95// "*ranking_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
96// "*rankings": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
97// "*trend_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
98// "*trends": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
99// "*statqueue_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
100// "*statqueues": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
101// "*threshold_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
102// "*thresholds": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
103// "*filters": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
104// "*route_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
105// "*attribute_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
106// "*charger_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
107// "*dispatcher_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
108// "*dispatcher_hosts": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
109// "*load_ids": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
110// "*versions": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
111// "*resource_filter_indexes" : {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
112// "*stat_filter_indexes" : {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
113// "*threshold_filter_indexes" : {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
114// "*route_filter_indexes" : {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
115// "*attribute_filter_indexes" : {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
116// "*charger_filter_indexes" : {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
117// "*dispatcher_filter_indexes" : {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
118// "*reverse_filter_indexes" : {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
119// "*sessions_backup": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
120// },
121// "opts":{
122// "internalDBDumpPath": "/var/lib/cgrates/internal_db/datadb", // the path where datadb will be dumped
123// "internalDBBackupPath": "/var/lib/cgrates/internal_db/backup/datadb", // default path taken by APIerSv1.BackupDataDBDump when "BackupFolderPath" is not provided
124// "internalDBStartTimeout": "5m", // the amount of wait time until timeout for DB startup
125// "internalDBDumpInterval": "0s", // dump datadb regularly to a file: "0" - disables it; "-1" - dump on each set/remove; <""|$dur>
126// "internalDBRewriteInterval": "0s", // rewrite dump files regularly: "0" - disables it; "-1" - rewrite on engine start; "-2" - rewrite on engine shutdown; <""|$dur>
127// "internalDBFileSizeLimit": "1GB", // maximum size that can be written in a singular dump file
128// "redisBatchSize": 1000, // COUNT size used in redis SCAN queries
129// "redisMaxConns": 10, // the connection pool size
130// "redisConnectAttempts": 20, // the maximum amount of dial attempts
131// "redisSentinel": "", // the name of sentinel when used
132// "redisCluster": false, // if enabled the datadb will try to connect to the redis cluster
133// "redisClusterSync": "5s", // the sync interval for the redis cluster
134// "redisClusterOndownDelay": "0", // the delay before executing the commands if the redis cluster is in the CLUSTERDOWN state
135// "redisConnectTimeout": "0", // the read/write timeout for each connection.
136// "redisPoolPipelineWindow": "150µs", // duration after which internal pipelines are flushed (0 disables implicit pipelining)
137// "redisPoolPipelineLimit": 0, // maximum number of commands that can be pipelined before flushing (0 means no limit)
138// "redisTLS": false, // if true it will use a tls connection and use the redisClientCertificate, redisClientKey and redisCACertificate for tls connection
139// "redisClientCertificate":"", // path to client certificate
140// "redisClientKey":"", // path to client key
141// "redisCACertificate":"", // path to CA certificate (populate for self-signed certificate otherwise let it empty)
142// "mongoQueryTimeout":"10s", // timeout for query when mongo is used
143// "mongoConnScheme": "mongodb" // scheme for MongoDB connection <mongodb|mongodb+srv>
144// }
145// },
146
147
148// "stor_db": { // database used to store offline tariff plans and CDRs
149// "db_type": "*mysql", // stor database type to use: <*mongo|*mysql|*postgres|*internal>
150// "db_host": "127.0.0.1", // the host to connect to
151// "db_port": 3306, // the port to reach the stor_db
152// "db_name": "cgrates", // stor database name
153// "db_user": "cgrates", // username to use when connecting to stor_db
154// "db_password": "CGRateS.org", // password to use when connecting to stor_db
155// "string_indexed_fields": [], // indexes on cdrs table to speed up queries, used in case of *mongo and *internal
156// "prefix_indexed_fields":[], // prefix indexes on cdrs table to speed up queries, used in case of *internal
157// "opts": {
158// "sqlMaxOpenConns": 100, // maximum database connections opened, not applying for mongo
159// "sqlMaxIdleConns": 10, // maximum database connections idle, not applying for mongo
160// "sqlLogLevel": 3, // sql logger verbosity: 1=Silent, 2=Error, 3=Warn, 4=Info
161// "sqlConnMaxLifetime": "0", // maximum amount of time a connection may be reused (0 for unlimited), not applying for mongo
162// "mysqlDSNParams": {}, // DSN extra paramss
163// "mongoQueryTimeout": "10s", // timeout for query when mongo is used
164// "mongoConnScheme": "mongodb", // scheme for MongoDB connection <mongodb|mongodb+srv>
165// "mysqlLocation": "Local", // the location the time from mysql is retrieved
166// "pgSSLMode": "disable", // determines whether or with what priority a secure SSL TCP/IP connection will be negotiated with the server
167// //"pgSSLCert": "", // file name of the client SSL certificate, replacing the default ~/.postgresql/postgresql.crt
168// //"pgSSLKey": "", // location for the secret key used for the client certificate
169// //"pgSSLPassword": "", // specifies the password for the secret key specified in pgSSLKey
170// //"pgSSLCertMode": "allow", // determines whether a client certificate may be sent to the server, and whether the server is required to request one
171// //"pgSSLRootCert": "", // name of a file containing SSL certificate authority (CA) certificate(s)
172// "pgSchema": "" // postgres schema to use
173// },
174// "items":{
175// "*session_costs": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
176// "*cdrs": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
177// "*tp_timings": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
178// "*tp_destinations": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
179// "*tp_rates": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
180// "*tp_destination_rates": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
181// "*tp_rating_plans": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
182// "*tp_rating_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
183// "*tp_shared_groups": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
184// "*tp_actions": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
185// "*tp_action_plans": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
186// "*tp_action_triggers": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
187// "*tp_account_actions": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
188// "*tp_resources": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
189// "*tp_stats": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
190// "*tp_rankings": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
191// "*tp_trends": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
192// "*tp_thresholds": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
193// "*tp_filters": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
194// "*tp_routes": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
195// "*tp_attributes": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
196// "*tp_chargers": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
197// "*versions": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
198// "*tp_dispatcher_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false},
199// "*tp_dispatcher_hosts": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false}
200// }
201// },
202
203
204// "listen": {
205// "rpc_json": "127.0.0.1:2012", // RPC JSON listening address
206// "rpc_gob": "127.0.0.1:2013", // RPC GOB listening address
207// "http": "127.0.0.1:2080", // HTTP listening address
208// "rpc_json_tls" : "127.0.0.1:2022", // RPC JSON TLS listening address
209// "rpc_gob_tls": "127.0.0.1:2023", // RPC GOB TLS listening address
210// "http_tls": "127.0.0.1:2280" // HTTP TLS listening address
211// "birpc_json": "127.0.0.1:2014", // address where to listen for bidirectional JSON-RPC requests(for agents<->sessions and sessions<->thresholds)
212// "birpc_gob": "", // address where to listen for bidirectional GOB-RPC requests (for agents<->sessions and sessions<->thresholds)
213// },
214
215
216// "tls": {
217// "server_certificate" : "", // path to server certificate
218// "server_key":"", // path to server key
219// "client_certificate" : "", // path to client certificate
220// "client_key":"", // path to client key
221// "ca_certificate":"", // path to CA certificate (populate for self-signed certificate otherwise let it empty)
222// "server_policy":4, // server_policy determines the TLS Client Authentication (0-NoClientCert, 1-RequestClientCert, 2-RequireAnyClientCert, 3-VerifyClientCertIfGiven, 4-RequireAndVerifyClientCert)
223// "server_name":""
224// },
225
226
227// "http": { // HTTP server configuration
228// "json_rpc_url": "/jsonrpc", // JSON RPC relative URL ("" to disable)
229// "registrars_url": "/registrar", // registrar service relative URL
230// "ws_url": "/ws", // WebSockets relative URL ("" to disable)
231// "freeswitch_cdrs_url": "/freeswitch_json", // Freeswitch CDRS relative URL ("" to disable)
232// "http_cdrs": "/cdr_http", // CDRS relative URL ("" to disable)
233// "pprof_path": "/debug/pprof/", // endpoint for serving runtime profiling data for pprof visualization
234// "use_basic_auth": false, // use basic authentication
235// "auth_users": {}, // basic authentication usernames and base64-encoded passwords (eg: { "username1": "cGFzc3dvcmQ=", "username2": "cGFzc3dvcmQy "})
236// "client_opts":{
237// "skipTlsVerify": false, // if enabled Http Client will accept any TLS certificate
238
239// // configuration options for http.Transport
240// "tlsHandshakeTimeout": "10s",
241// "disableKeepAlives": false,
242// "disableCompression": false,
243// "maxIdleConns": 100,
244// "maxIdleConnsPerHost": 2,
245// "maxConnsPerHost": 0,
246// "idleConnTimeout": "90s",
247// "responseHeaderTimeout": "0",
248// "expectContinueTimeout": "0",
249// "forceAttemptHttp2": true,
250
251// // configuration options for net.Dialer
252// "dialTimeout": "30s",
253// "dialFallbackDelay": "300ms",
254// "dialKeepAlive": "30s"
255// }
256// },
257
258
259// "schedulers": {
260// "enabled": false, // start Scheduler service: <true|false>
261// "cdrs_conns": [], // connections to CDRs for *cdrlog actions <""|*internal|$rpc_conns_id>
262// "thresholds_conns": [], // connections to ThresholdS for *reset_threshold action <""|*internal|$rpc_conns_id>
263// "stats_conns": [], // connections to StatS for *reset_stat_queue action: <""|*internal|$rpc_conns_id>
264// "filters": [], // only execute actions matching these filters
265// "dynaprepaid_actionplans": [] // actionPlans to be executed in case of *dynaprepaid request type
266// },
267
268
269// "caches":{
270// "partitions": {
271// "*destinations": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "remote":false, "replicate": false}, // destination caching
272// "*reverse_destinations": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "remote":false, "replicate": false}, // reverse destinations index caching
273// "*rating_plans": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "remote":false, "replicate": false}, // rating plans caching
274// "*rating_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "remote":false, "replicate": false}, // rating profiles caching
275// "*actions": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "remote":false, "replicate": false}, // actions caching
276// "*action_plans": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "remote":false, "replicate": false}, // action plans caching
277// "*account_action_plans": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "remote":false, "replicate": false}, // account action plans index caching
278// "*action_triggers": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "remote":false, "replicate": false}, // action triggers caching
279// "*shared_groups": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "remote":false, "replicate": false}, // shared groups caching
280// "*timings": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "remote":false, "replicate": false}, // timings caching
281// "*resource_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "remote":false, "replicate": false}, // control resource profiles caching
282// "*resources": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "remote":false, "replicate": false}, // control resources caching
283// "*event_resources": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate": false}, // matching resources to events
284// "*trend_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "remote":false, "replicate": false}, // control trend profiles caching
285// "*trends": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "remote":false, "replicate": false}, // control trends caching
286// "*ranking_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "remote":false, "replicate": false}, // ranking profiles
287// "*rankings": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "remote":false, "replicate": false}, // control rankings caching
288// "*statqueue_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "remote":false, "replicate": false}, // statqueue profiles
289// "*statqueues": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "remote":false, "replicate": false}, // statqueues with metrics
290// "*threshold_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "remote":false, "replicate": false}, // control threshold profiles caching
291// "*thresholds": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "remote":false, "replicate": false}, // control thresholds caching
292// "*filters": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "remote":false, "replicate": false}, // control filters caching
293// "*route_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "remote":false, "replicate": false}, // control route profile caching
294// "*attribute_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "remote":false, "replicate": false}, // control attribute profile caching
295// "*charger_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "remote":false, "replicate": false}, // control charger profile caching
296// "*dispatcher_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "remote":false, "replicate": false}, // control dispatcher profile caching
297// "*dispatcher_hosts": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "remote":false, "replicate": false}, // control dispatcher hosts caching
298// "*resource_filter_indexes" : {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate": false}, // control resource filter indexes caching
299// "*stat_filter_indexes" : {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate": false}, // control stat filter indexes caching
300// "*threshold_filter_indexes" : {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate": false}, // control threshold filter indexes caching
301// "*route_filter_indexes" : {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate": false}, // control route filter indexes caching
302// "*attribute_filter_indexes" : {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate": false}, // control attribute filter indexes caching
303// "*charger_filter_indexes" : {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate": false}, // control charger filter indexes caching
304// "*dispatcher_filter_indexes" : {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate": false}, // control dispatcher filter indexes caching
305// "*reverse_filter_indexes" : {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate": false}, // control reverse filter indexes caching used only for set and remove filters
306// "*dispatcher_routes": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate": false}, // control dispatcher routes caching
307// "*dispatcher_loads": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate": false}, // control dispatcher load( in case of *ratio ConnParams is present)
308// "*dispatchers": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate": false}, // control dispatcher interface
309// "*diameter_messages": {"limit": -1, "ttl": "3h", "static_ttl": false, "remote":false, "replicate": false}, // diameter messages caching
310// "*radius_packets": {"limit": -1, "ttl": "3h", "static_ttl": false, "remote":false, "replicate": false}, // radius packets caching
311// "*rpc_responses": {"limit": 0, "ttl": "2s", "static_ttl": false, "remote":false, "replicate": false}, // RPC responses caching
312// "*closed_sessions": {"limit": -1, "ttl": "10s", "static_ttl": false, "remote":false, "replicate": false}, // closed sessions cached for CDRs
313// "*event_charges": {"limit": 0, "ttl": "10s", "static_ttl": false, "remote":false, "replicate": false}, // events proccessed by ChargerS
314// "*cdr_ids": {"limit": -1, "ttl": "10m", "static_ttl": false, "remote":false, "replicate": false}, // protects CDRs against double-charging
315// "*load_ids": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "remote":false, "replicate": false}, // control the load_ids for items
316// "*rpc_connections": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate": false}, // RPC connections caching
317// "*uch": {"limit": -1, "ttl": "3h", "static_ttl": false, "remote":false, "replicate": false}, // User cache
318// "*stir": {"limit": -1, "ttl": "3h", "static_ttl": false, "remote":false, "replicate": false}, // stirShaken cache keys
319// "*apiban":{"limit": -1, "ttl": "2m", "static_ttl": false, "remote":false, "replicate": false},
320// "*sentrypeer":{"limit": -1, "ttl": "86400s", "static_ttl": true, "remote":false, "replicate": false},
321// "*caps_events": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate": false}, // caps cached samples
322// "*replication_hosts": {"limit": 0, "ttl": "", "static_ttl": false, "remote":false, "replicate": false}, // the replication hosts cache(used when replication_filtered is enbled)
323// },
324// "replication_conns": [],
325// "remote_conns": [] // the conns that are queried when the items are not found in cache
326// },
327
328
329// "filters": { // Filters configuration (*new)
330// "stats_conns": [], // connections to StatS for <*stats> filters, empty to disable stats functionality: <""|*internal|$rpc_conns_id>
331// "resources_conns": [], // connections to ResourceS for <*resources> filters, empty to disable stats functionality: <""|*internal|$rpc_conns_id>
332// "apiers_conns": [], // connections to RALs for <*accounts> filters, empty to disable stats functionality: <""|*internal|$rpc_conns_id>
333// "trends_conns": [], // connections to TrendS for <*trends> filters, empty to disable trends functionality: <""|*internal|$rpc_conns_id>
334// "rankings_conns": [], // connections to RankingS for <*rankings> filters, empty to disable rankings functionality: <""|*internal|$rpc_conns_id>
335// },
336
337
338// "rals": {
339// "enabled": false, // enable Rating/Accounting service: <true|false>
340// "thresholds_conns": [], // connections to ThresholdS for account/balance updates, empty to disable thresholds functionality: <""|*internal|$rpc_conns_id>
341// "stats_conns": [], // connections to StatS for account/balance updates, empty to disable stats functionality: <""|*internal|$rpc_conns_id>
342// "sessions_conns": [], // connections to SessionS for actions requiring them: <""|*internal|$rpc_conns_id>
343// "rp_subject_prefix_matching": false, // enables prefix matching for the rating profile subject
344// "remove_expired":true, // enables automatic removal of expired balances
345// "max_computed_usage": { // do not compute usage higher than this, prevents memory overload
346// "*any": "189h",
347// "*voice": "72h",
348// "*data": "107374182400",
349// "*sms": "10000",
350// "*mms": "10000"
351// },
352// "max_increments": 1000000,
353// "fallback_depth": 3,
354// "balance_rating_subject":{ // default rating subject in case that balance rating subject is empty
355// "*any": "*zero1ns",
356// "*voice": "*zero1s"
357// }
358
359// },
360
361
362// "cdrs": { // CDRs config
363// "enabled": false, // start the CDR Server: <true|false>
364// "extra_fields": [], // extra fields to store in CDRs for non-generic CDRs (ie: FreeSWITCH JSON)
365// "store_cdrs": true, // store cdrs in StorDB
366// "compress_stored_cost": false, // compress CostDetails before storing
367// "session_cost_retries": 5, // number of queries to session_costs before recalculating CDR
368// "chargers_conns": [], // connection to ChargerS for CDR forking, empty to disable billing for CDRs: <""|*internal|$rpc_conns_id>
369// "rals_conns": [], // connections to RALs for cost calculation: <""|*internal|$rpc_conns_id>
370// "attributes_conns": [], // connection to AttributeS for altering *raw CDRs, empty to disable attributes functionality: <""|*internal|$rpc_conns_id>
371// "thresholds_conns": [], // connection to ThresholdS for CDR reporting, empty to disable thresholds functionality: <""|*internal|$rpc_conns_id>
372// "stats_conns": [], // connections to StatS for CDR reporting, empty to disable stats functionality: <""|*internal|$rpc_conns_id>
373// "online_cdr_exports":[], // list of CDRE profiles to use for real-time CDR exports
374// "scheduler_conns": [], // connections to SchedulerS in case of *dynaprepaid request
375// "ees_conns": [] // connections to EventExporter
376// },
377
378
379// "ers": { // EventReaderService
380// "enabled": false, // starts the EventReader service: <true|false>
381// "sessions_conns": ["*internal"], // RPC Connections IDs
382// "ees_conns": [], // connection for routing processed and invalid messages through EEs
383// "concurrent_events": 1, // number of events to generate concurrently on CGRateS side
384// "partial_cache_ttl": "1s", // the duration to cache partial records when not pairing
385// "readers": [
386// {
387// "id": "*default", // identifier of the EventReader profile
388// "type": "*none", // reader type <*file_csv>
389// "run_delay": "0", // sleep interval between consecutive runs; "-1" to use automation via inotify; "0" to disable running all together; <""|$dur>
390// "start_delay": "0", // time to wait before an reader starts to run
391// "concurrent_requests": 1024, // maximum simultaneous requests/files to process, 0 for unlimited
392// "source_path": "/var/spool/cgrates/ers/in", // read data from this path
393// "processed_path": "/var/spool/cgrates/ers/out", // move processed data here
394// "tenant": "", // tenant used by import
395// "timezone": "", // timezone for timestamps where not specified <""|UTC|Local|$IANA_TZ_DB>
396// "filters": [], // limit parsing based on the filters
397// "flags": [], // flags to influence the event processing
398// "reconnects": -1, // number of retries in case of connection lost
399// "ees_success_ids": [], // ids of exporters used for moving the raw event to EEs
400// "ees_failed_ids": [], // ids of exporters used for moving the failed raw event to EEs
401// "max_reconnect_interval": "5m", // time to wait in between reconnect attempts
402// "opts": {
403// // Partial
404// // "partialPath": "/", // the path were the partial events will be sent
405// "partialCacheAction": "*none", // the action that will be executed for the partial CSVs that are not matched<*none|*post_cdr|*dump_to_file>
406// "partialOrderField": "~*req.AnswerTime", // the field after what the events are order when merged
407// // "partialcsvFieldSeparator": "," // separator used when dumping the fields
408
409// // FileCSV
410// "csvRowLength": 0, // Number of fields from csv file, -1 to disable checking, 0 to inherit the lenght of first record
411// "csvFieldSeparator": ",", // separator used when reading the fields
412// "csvHeaderDefineChar": ":", // the starting character for header definition used in case of CSV files
413// // "csvLazyQuotes": false, // if a quote may appear in an unquoted field and a non-doubled quote may appear in a quoted field
414
415// // FileXML
416// // "xmlRootPath": "", // path towards one event in case of XML CDRs
417
418// // AMQP and AMQPv1
419// // "amqpQueueID": "cgrates_cdrs", // identifier for the primary queue where messages are consumed (0.9.1/1.0)
420
421// // "amqpUsername": "", // username for SASL PLAIN auth, exclusive to AMQP 1.0, often representing the policy name
422// // "amqpPassword": "", // password for authentication, exclusive to AMQP 1.0
423
424// // "amqpConsumerTag": "cgrates", // unique tag for the consumer, useful for message tracking and consumer management (0.9.1)
425// // "amqpExchange": "", // name of the primary exchange where messages will be published (0.9.1)
426// // "amqpExchangeType": "", // type of the primary exchange (direct, topic, fanout, headers) (0.9.1)
427// // "amqpRoutingKey": "", // key used for routing messages to the primary queue (0.9.1)
428
429// // Kafka
430// // "kafkaTopic": "cgrates", // the topic from were the events are read
431// // "kafkaGroupID": "cgrates", // the group that reads the events
432// // "kafkaMaxWait": "1ms", // the maximum amount of time to wait for new data to come
433// // "kafkaTLS": false, // if true it will try to authenticate the client
434// // "kafkaCAPath": "", // path to certificate authority pem
435// // "kafkaSkipTLSVerify": false, // if true it will skip certificate verification
436
437// // SQL
438// // "sqlDBName": "cgrates", // the name of the database from were the events are read
439// // "sqlTableName": "cdrs", // the name of the table from were the events are read
440// // "sqlBatchSize: 0, // number of SQL rows that can be selected at a time. 0 or lower for unlimited
441// // "sqlDeleteIndexedFields": [], // list of fields to DELETE from the table
442// // "pgSSLMode": "disable", // the ssl mode for postgres db
443
444// // SQS and S3
445// // "awsRegion": "",
446// // "awsKey": "",
447// // "awsSecret": "",
448// // "awsToken": "",
449
450// // SQS
451// // "sqsQueueID": "cgrates_cdrs", // the queue id for SQS readers from were the events are read
452
453// // S3
454// // "s3BucketID": "cgrates_cdrs", // the bucket id for S3 readers from were the events are read
455
456// // nats
457// // "natsJetStream": false, // controls if the nats reader uses the JetStream
458// // "natsConsumerName": "cgrates", // in case of JetStream the name of the consumer
459// // "natsStreamName": "cdrs", // the name of the NATS JetStream stream from which the consumer will read messages
460// "natsSubject": "cgrates_cdrs", // the subject from were the events are read
461// // "natsQueueID": "", // the queue id the consumer listen to
462// // "natsJWTFile": "", // the path to the JWT file( can be the chained file or the user file)
463// // "natsSeedFile": "", // the path to the seed files( if the JWT file is mention this is used as seedFile for the JWT user mentioned above)
464// // "natsCertificateAuthority": "", // the path to a custom certificate authority file( used by tls)
465// // "natsClientCertificate": "", // the path to a client certificate( used by tls)
466// // "natsClientKey": "", // the path to a client key( used by tls)
467// // "natsJetStreamMaxWait": "5s", // the maximum amount of time to wait for a response
468// },
469// "fields":[ // import fields template, tag will match internally CDR field, in case of .csv value will be represented by index of the field value
470// {"tag": "ToR", "path": "*cgreq.ToR", "type": "*variable", "value": "~*req.2", "mandatory": true},
471// {"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable", "value": "~*req.3", "mandatory": true},
472// {"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*variable", "value": "~*req.4", "mandatory": true},
473// {"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*variable", "value": "~*req.6", "mandatory": true},
474// {"tag": "Category", "path": "*cgreq.Category", "type": "*variable", "value": "~*req.7", "mandatory": true},
475// {"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.8", "mandatory": true},
476// {"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable", "value": "~*req.9", "mandatory": true},
477// {"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.10", "mandatory": true},
478// {"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable", "value": "~*req.11", "mandatory": true},
479// {"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.12", "mandatory": true},
480// {"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable", "value": "~*req.13", "mandatory": true},
481// ],
482// "partial_commit_fields": [],
483// "cache_dump_fields": []
484// }
485// ]
486// },
487
488// "ees": { // EventExporterService
489// "enabled": false, // starts the EventReader service: <true|false>
490// "attributes_conns":[], // RPC Connections IDs
491// "cache": {
492// "*file_csv": {"limit": -1, "ttl": "5s", "static_ttl": false},
493// "*nats_json_map": {"limit": -1, "ttl": "", "static_ttl": false},
494// "*amqp_json_map": {"limit": -1, "ttl": "", "static_ttl": false},
495// "*amqpv1_json_map": {"limit": -1, "ttl": "", "static_ttl": false},
496// "*kafka_json_map": {"limit": -1, "ttl": "", "static_ttl": false},
497// "*s3_json_map": {"limit": -1, "ttl": "", "static_ttl": false},
498// "*sqs_json_map": {"limit": -1, "ttl": "", "static_ttl": false},
499// "*sql": {"limit": -1, "ttl": "", "static_ttl": false},
500// "*els": {"limit": -1, "ttl": "", "static_ttl": false},
501// },
502// "exporters": [
503// {
504// "id": "*default", // identifier of the EventReader profile
505// "type": "*none", // exporter type
506// "export_path": "/var/spool/cgrates/ees", // path where the exported events will be placed
507// "failed_posts_dir": "/var/spool/cgrates/failed_posts", // directory path where we store failed requests
508// "concurrent_requests": 0, // maximum simultaneous requests to process, 0 for unlimited
509// "timezone": "", // timezone for timestamps where not specified <""|UTC|Local|$IANA_TZ_DB>
510// "filters": [], // limit parsing based on the filters
511// "flags": [], // flags to influence the event processing
512// "attribute_ids": [], // select Attribute profiles instead of discovering them
513// "attribute_context": "", // context used to discover matching Attribute profiles
514// "synchronous": false, // block processing until export has a result
515// "attempts": 1, // export attempts
516// "metrics_reset_schedule": "", // cron schedule for resetting exporter metrics (empty disables automatic reset)
517// "opts": {
518
519// // CSV
520// // "csvFieldSeparator": ",", // separator used when reading the fields
521
522
523// // Elasticsearch options
524// // "elsApiKey": "", // base64-encoded token for auth; overrides username/password and service token
525// // "elsUsername": "", // username for HTTP Basic Authentication
526// // "elsPassword": "", // password for HTTP Basic Authentication
527// // "elsServiceToken": "", // service token for auth; if set, overrides username/password
528// // "elsCertificateFingerPrint": "", // SHA256 hex fingerprint given by Elasticsearch on first launch
529// // "elsCAPath": "", // path to CA certificate
530// // "elsDiscoverNodesOnStart": false, // discover nodes when initializing the client
531// // "elsDiscoverNodesInterval": "10s", // discover nodes periodically
532// // "elsEnableDebugLogger": "false", // enable the debug logging
533// // "elsLogger": "", // logger type <elsJson|elsColor|elsText>
534// // "elsCompressRequestBody": false, // enable compression on requests
535// // "elsCompressRequestBodyLevel": 0, // compression level <0(gzip)|9(best compression)|-2(HuffmanOnly)|1(best speed)>
536// // "elsRetryOnStatus": [502,503,504], // status codes for retry
537// // "elsMaxRetries": 3, // maximum number of retries
538// // "elsDisableRetry": false, // disable retry mechanism
539
540// // "elsIndex": "", // target elasticsearch index
541// // "elsRefresh": "false", // controls when changes become searchable <true|false|wait_for>
542// // "elsOpType": "index", // operation type <index|create>
543// // "elsPipeline": "", // name of the ingest pipeline to use
544// // "elsRouting": "", // custom routing value for document storage
545// // "elsTimeout": "1m", // maximum time to wait for operation
546// // "elsWaitForActiveShards": "1", // number of shard copies required before indexing (default: 1)
547
548
549// // SQL
550// // "sqlMaxIdleConns": 0, // SQLMaxIdleConns
551// // "sqlMaxOpenConns": 0, // SQLMaxOpenConns
552// // "sqlConnMaxLifetime": "0", // SQLConnMaxLifetime
553// // "sqlUpdateIndexedFields": [], // list of field names used for indexing UPDATE queries from the table
554// // "mysqlDSNParams": {}, // DSN params
555
556
557// // "sqlTableName":"cdrs", // the name of the table from where the events are exported
558// // "sqlDBName": "cgrates", // the name of the database from where the events are exported
559// // "pgSSLMode": "disable", // the SSLMode for postgres
560
561
562// // Kafka
563// // "kafkaTopic": "cgrates_cdrs", // the topic from where the events are exported
564// // "kafkaLinger": "10ms", // how long to wait for more records before sending a batch
565// // "kafkaTLS": false, // if true, it will try to authenticate the server
566// // "kafkaCAPath": "", // path to certificate authority pem
567// // "kafkaSkipTLSVerify: false, // if true it will skip certificate verification
568
569
570// // AMQP
571// // "amqpQueueID": "cgrates_cdrs", // the queue id for AMQP exporters from were the events are exported
572// // "amqpRoutingKey": "", // RoutingKey, amqp 0.9.1 exclusive
573// // "amqpExchange": "", // Exchange, amqp 0.9.1 exclusive
574// // "amqpExchangeType": "", // ExchangeType, amqp 0.9.1 exclusive
575// // "amqpUsername": "", // amqp 1.0 exclusive, used for SASL PLAIN auth, usually represents the policy name
576// // "amqpPassword": "", // amqp 1.0 exclusive, used for SASL PLAIN auth, populated with one of its policy's keys
577
578
579// // SQS and S3
580// // "awsRegion": "", // AWSRegion
581// // "awsKey": "", // AWSKey
582// // "awsSecret": "", // AWSSecret
583// // "awsToken": "", // AWSToken
584
585// //SQS
586// // "sqsQueueID": "cgrates_cdrs", // the queue id for SQS exporters from were the events are exported
587
588// // S3
589// // "s3BucketID": "cgrates_cdrs", // the bucket id for S3 readers from where the events that are exported
590// // "s3FolderPath": "", // S3FolderPath
591
592// // Nats
593// // "natsJetStream": false, // controls if the nats poster uses the JetStream
594// // "natsSubject": "cgrates_cdrs", // the subject were the events are exported
595// // "natsJWTFile": "", // the path to the JWT file( can be the chained file or the user file)
596// // "natsSeedFile": "", // the path to the seed files( if the JWT file is mention this is used as seedFile for the JWT user mentioned above)
597// // "natsCertificateAuthority": "", // the path to a custom certificate authority file( used by tls)
598// // "natsClientCertificate": "", // the path to a client certificate( used by tls)
599// // "natsClientKey": "", // the path to a client key( used by tls)
600// // "natsJetStreamMaxWait": "5s", // the maximum amount of time to wait for a response
601
602// //RPC
603// // "rpcCodec": "", // for compression, encoding and decoding <internalRPC | BIRPC | JSON/HTTP/GOB>
604// // "serviceMethod": "", // the method that should be called trough RPC
605// // "keyPath": "" , // path to server key
606// // "certPath": "", // path to client certificate
607// // "caPath": "", // path to CA certificate
608// // "tls": false,
609// // "connIDs": [], // connections for connManager to this exporter
610// // "rpcConnTimeout" : "1s", // connection unsuccessful on timeout
611// // "rpcReplyTimeout":"2s", // connection down at replies if taking longer that this value
612// // "rpcAPIOpts": {},
613// }, // extra options for exporter
614// "fields":[] // import fields template, tag will match internally CDR field, in case of .csv value will be represented by index of the field value
615// }
616// ]
617// },
618
619
620// "sessions": {
621// "enabled": false, // starts the session service: <true|false>
622// "chargers_conns": [], // connections to ChargerS for session forking <""|*internal|$rpc_conns_id>
623// "rals_conns": [], // connections to RALs for rating/accounting <""|*internal|$rpc_conns_id>
624// "cdrs_conns": [], // connections to CDRs for CDR posting <""|*internal|$rpc_conns_id>
625// "resources_conns": [], // connections to ResourceS for resources monitoring <""|*internal|$rpc_conns_id>
626// "thresholds_conns": [], // connections to ThresholdS for reporting session events <""|*internal|$rpc_conns_id>
627// "stats_conns": [], // connections to StatS for reporting session events <""|*internal|$rpc_conns_id>
628// "routes_conns": [], // connections to RouteS for querying routes for event <""|*internal|$rpc_conns_id>
629// "attributes_conns": [], // connections to AttributeS for altering event fields <""|*internal|$rpc_conns_id>
630// "replication_conns": [], // replicate sessions towards these session services
631// "debit_interval": "0s", // interval to perform debits on.
632// "store_session_costs": false, // enable storing of the session costs within CDRs
633// "default_usage":{ // the usage if the event is missing the usage field
634// "*any": "3h",
635// "*voice": "3h",
636// "*data": "1048576",
637// "*sms": "1",
638// },
639// "session_ttl": "0s", // time after a session with no updates is terminated, not defined by default
640// //"session_ttl_max_delay": "", // activates session_ttl randomization and limits the maximum possible delay
641// //"session_ttl_last_used": "", // tweak LastUsed for sessions timing-out, not defined by default
642// //"session_ttl_usage": "", // tweak Usage for sessions timing-out, not defined by default
643// //"session_last_usage": "", // tweak LastUsage for session timing-out, not defined by default
644// "session_indexes": [], // index sessions based on these fields for GetActiveSessions API
645// "client_protocol": 2.0, // version of protocol to use when acting as JSON-PRC client <"0","1.0","2.0">
646// "channel_sync_interval": "0", // sync channels to detect stale sessions (0 to disable)
647// "channel_sync_timeout": "60s", // max time to wait for a client's active sessions during sync (0 for unlimited)
648// "stale_chan_max_extra_usage": "0", // add random usage below max for stale channels
649// "terminate_attempts": 5, // attempts to get the session before terminating it
650// "alterable_fields": [], // the session fields that can be updated
651// //"min_dur_low_balance": "5s", // threshold which will trigger low balance warnings for prepaid calls (needs to be lower than debit_interval)
652// "stir": {
653// "allowed_attest": ["*any"], // the default attest for stir/shaken authentication <*any|A|B|C>
654// "payload_maxduration": "-1", // the duration that stir header is valid after it was created
655// "default_attest": "A", // the default attest level if not mentioned in API
656// "publickey_path": "", // the path to the public key
657// "privatekey_path": "", // the path to the private key
658// },
659// "scheduler_conns": [], // connections to SchedulerS in case of *dynaprepaid request
660// "backup_interval": "0s", // backup active sessions regularly to dataDB: "0" - disables it; "-1" - dump at shutdown; <""|$dur>
661// },
662
663
664// "asterisk_agent": {
665// "enabled": false, // starts the Asterisk agent: <true|false>
666// "sessions_conns": ["*birpc_internal"],
667// "create_cdr": false, // create CDR out of events and sends it to CDRS component
668// "asterisk_conns":[ // instantiate connections to multiple Asterisk servers
669// {
670// "address": "127.0.0.1:8088",
671// "user": "cgrates",
672// "password": "CGRateS.org",
673// "connect_attempts": 3,
674// "reconnects": 5,
675// "max_reconnect_interval": ""
676// }
677// ]
678// },
679
680
681// "freeswitch_agent": {
682// "enabled": false, // starts the FreeSWITCH agent: <true|false>
683// "sessions_conns": ["*birpc_internal"],
684// "subscribe_park": true, // subscribe via fsock to receive park events
685// "create_cdr": false, // creates CDR out of events and sends them to CDRS component
686// "extra_fields": [], // extra fields to store in auth/CDRs when creating them
687// "low_balance_ann_file": "", // file to be played when low balance is reached for prepaid calls
688// "empty_balance_context": "", // if defined, prepaid calls will be transferred to this context on empty balance
689// "empty_balance_ann_file": "", // file to be played before disconnecting prepaid calls on empty balance (applies only if no context defined)
690// "max_wait_connection": "2s", // maximum duration to wait for a connection to be retrieved from the pool
691// "active_session_delimiter": ",", // delimiter for 'show channels' responses and requests
692// "event_socket_conns":[ // instantiate connections to multiple FreeSWITCH servers
693// {
694// "address": "127.0.0.1:8021", // FreeSWITCH server address and port
695// "password": "ClueCon", // authentication password for FreeSWITCH
696// "reconnects": 5, // max reconnect attempts before giving up ("-1" for no limit)
697// "max_reconnect_interval": "", // max time between reconnects ("0" for no limit)
698// "reply_timeout": "1m", // max wait time for FreeSWITCH replies
699// "alias":""
700// }
701// ]
702// },
703
704
705// "kamailio_agent": {
706// "enabled": false, // starts Kamailio agent: <true|false>
707// "sessions_conns": ["*birpc_internal"],
708// "create_cdr": false, // create CDR out of events and sends them to CDRS component
709// "timezone": "", // timezone of the Kamailio server
710// "evapi_conns":[ // instantiate connections to multiple Kamailio servers
711// {
712// "address": "127.0.0.1:8448",
713// "reconnects": 5,
714// "max_reconnect_interval": ""
715// }
716// ]
717// },
718
719
720// "diameter_agent": {
721// "enabled": false, // enables the diameter agent: <true|false>
722// "listen": "127.0.0.1:3868", // address where to listen for diameter requests <x.y.z.y/x1.y1.z1.y1:1234>
723// "listen_net": "tcp", // transport type for diameter <tcp|sctp>
724// "dictionaries_path": "/usr/share/cgrates/diameter/dict/", // path towards directory holding additional dictionaries to load
725// "dictionaries_append_defaults": true, // if true, dictionaries from the provided path will be appended to the default dictionaries from the go-diameter library
726// // "ce_applications": [], // list of applications in dictionaries wanted to be included in Capability-Exchange. Needed either "app name", "app ID", or "vendor name.app name/ID"
727// "sessions_conns": ["*birpc_internal"],
728// "origin_host": "CGR-DA", // diameter Origin-Host AVP used in replies
729// "origin_realm": "cgrates.org", // diameter Origin-Realm AVP used in replies
730// "vendor_id": 0, // diameter Vendor-Id AVP used in replies
731// "product_name": "CGRateS", // diameter Product-Name AVP used in replies
732// "synced_conn_requests": false, // process one request at the time per connection
733// "asr_template": "", // enable AbortSession message being sent to client on DisconnectSession
734// "rar_template": "", // template used to build the Re-Auth-Request
735// "forced_disconnect": "*none", // the request to send to diameter on DisconnectSession <*none|*asr|*rar>
736// "request_processors": [] // list of processors to be applied to diameter messages
737// },
738
739
740// "radius_agent": {
741// "enabled": false, // enables the radius agent: <true|false>
742// "listeners":[
743// {
744// "network": "udp", // network to listen on <udp|tcp>
745// "auth_address": "127.0.0.1:1812", // address where to listen for radius authentication requests <x.y.z.y:1234>
746// "acct_address": "127.0.0.1:1813" // address where to listen for radius accounting requests <x.y.z.y:1234>
747// }
748// ],
749// "client_secrets": { // hash containing secrets for clients connecting here <*default|$client_ip>
750// "*default": "CGRateS.org"
751// },
752// "client_dictionaries": { // per client path towards directory holding additional dictionaries to load (extra to RFC)
753// "*default": [ // key represents the client IP or catch-all <*default|$client_ip>
754// "/usr/share/cgrates/radius/dict/",
755// ]
756// },
757// "client_da_addresses": { // configuration for clients capable of handling Dynamic Authorization (CoA/DM) requests.
758// // "nasIdentifier": { // identifier for the NAS, typically the host from the initial RADIUS packet.
759// // "transport": "udp", // transport protocol for Dynamic Authorization requests, defaults to UDP.
760// // "host": "", // optionally specify an alternative host for DA requests. Defaults to the NAS identifier if empty.
761// // "port": 3799, // port for Dynamic Authorization requests, default is 3799.
762// // "flags": [] // additional options, currently supports *log for logging DA requests before sending.
763// // }
764// },
765// "requests_cache_key": "", // used to choose the cache key of a RADIUS packet <RSRParsers>
766// "sessions_conns": ["*internal"],
767// "dmr_template": "*dmr", // template used to build the Disconnect-Request packet
768// "coa_template": "*coa", // template used to build the CoA-Request packet
769// "request_processors": [] // request processors to be applied to Radius messages
770// },
771
772
773// "http_agent": [ // HTTP Agents, ie towards cnc.to MVNE platform
774// ],
775
776
777// "dns_agent": {
778// "enabled": false, // enables the DNS agent: <true|false>
779// "listeners":[
780// {
781// "address": "127.0.0.1:53", // address where to listen for DNS requests <x.y.z.y:1234>
782// "network": "udp" // network to listen on <udp|tcp|tcp-tls>
783// }
784// ],
785// "sessions_conns": ["*internal"],
786// "timezone": "", // timezone of the events if not specified <UTC|Local|$IANA_TZ_DB>
787// "request_processors": [] // request processors to be applied to DNS messages
788// },
789
790
791// "prometheus_agent": {
792// "enabled": false, // enables the prometheus agent: <true|false>
793// "path": "/prometheus", // endpoint for prometheus metrics
794// "collect_go_metrics": false, // include Go runtime metrics (memory, GC, goroutines)
795// "collect_process_metrics": false, // include process metrics (CPU, file descriptors)
796// // "cores_conns": [], // connections to CoreS, empty to disable: <""|*internal|$rpc_conns_id>
797// // "stats_conns": [], // connections to StatS, empty to disable: <""|*internal|$rpc_conns_id>
798// // "stat_queue_ids": [] // StatQueue IDs to collect metrics from <[tenant]:ID>
799// },
800
801
802// "attributes": { // AttributeS config
803// "enabled": false, // starts attribute service: <true|false>
804// "stats_conns": [], // connections to StatS, empty to disable: <""|*internal|$rpc_conns_id>
805// "resources_conns": [], // connections to ResourceS, empty to disable: <""|*internal|$rpc_conns_id>
806// "apiers_conns": [], // connections to ApierS, empty to disable: <""|*internal|$rpc_conns_id>
807// "indexed_selects": true, // enable profile matching exclusively on indexes
808// //"string_indexed_fields": [], // query indexes based on these fields for faster processing
809// "prefix_indexed_fields": [], // query indexes based on these fields for faster processing
810// "suffix_indexed_fields": [], // query indexes based on these fields for faster processing
811// "nested_fields": false, // determines which field is checked when matching indexed filters(true: all; false: only the one on the first level)
812// "any_context": true, // if we match the *any context
813// "opts": {
814// "*profileIDs": [],
815// "*profileRuns": 0, // number of runs a profile will process the event
816// "*processRuns": 1, // number of run loops when processing event
817// "*profileIgnoreFilters": false
818// }
819// },
820
821
822// "chargers": { // ChargerS config
823// "enabled": false, // starts charger service: <true|false>.
824// "attributes_conns": [], // connections to AttributeS for event fields altering <""|127.0.0.1:2013>
825// "indexed_selects": true, // enable profile matching exclusively on indexes
826// //"string_indexed_fields": [], // query indexes based on these fields for faster processing
827// "prefix_indexed_fields": [], // query indexes based on these fields for faster processing
828// "suffix_indexed_fields": [], // query indexes based on these fields for faster processing
829// "nested_fields": false, // determines which field is checked when matching indexed filters(true: all; false: only the one on the first level)
830// },
831
832
833// "resources": { // ResourceS config
834// "enabled": false, // starts ResourceLimiter service: <true|false>.
835// "store_interval": "", // dump cache regularly to dataDB, 0 - dump at start/shutdown: <""|$dur>
836// "thresholds_conns": [], // connections to ThresholdS for resource reporting, empty to disable thresholds functionality: <""|*internal|$rpc_conns_id>
837// "indexed_selects": true, // enable profile matching exclusively on indexes
838// //"string_indexed_fields": [], // query indexes based on these fields for faster processing
839// "prefix_indexed_fields": [], // query indexes based on these fields for faster processing
840// "suffix_indexed_fields": [], // query indexes based on these fields for faster processing
841// "nested_fields": false, // determines which field is checked when matching indexed filters(true: all; false: only the one on the first level)
842// "opts": {
843// "*usageID": "",
844// // "*usageTTL": "72h",
845// "*units": 1,
846// },
847// },
848
849
850// "stats": { // StatS config
851// "enabled": false, // starts Stat service: <true|false>.
852// "store_interval": "", // dump cache regularly to dataDB, 0 - dump at start/shutdown: <""|$dur>
853// "store_uncompressed_limit": 0, // used to compress data
854// "thresholds_conns": [], // connections to ThresholdS for StatUpdates, empty to disable thresholds functionality: <""|*internal|$rpc_conns_id>
855// "ees_conns": [], // connections to EEs for StatUpdates, empty to disable export functionality: <""|*internal|$rpc_conns_id>
856// "ees_exporter_ids": [], // list of EventExporter profiles to use for real-time StatUpdate exports
857// "indexed_selects": true, // enable profile matching exclusively on indexes
858// //"string_indexed_fields": [], // query indexes based on these fields for faster processing
859// "prefix_indexed_fields": [], // query indexes based on these fields for faster processing
860// "suffix_indexed_fields": [], // query indexes based on these fields for faster processing
861// "nested_fields": false, // determines which field is checked when matching indexed filters(true: all; false: only the one on the first level)
862// "opts": {
863// "*profileIDs": [],
864// "*profileIgnoreFilters": false,
865// }
866// },
867
868
869// "trends":{ // TrendS config
870// "enabled": false, // starts TrendS service: <true|false>.
871// "store_interval": "", // dump cache regularly to dataDB, 0 - dump at start/shutdown: <""|$dur>
872// "store_uncompressed_limit": 0, // used to compress metrics
873// "stats_conns": [], // connections to StatS, empty to disable stats functionality: <""|*internal|$rpc_conns_id>
874// "scheduled_ids": {}, // autoload these trend ids on start
875// "thresholds_conns": [], // connections to ThresholdS for trendSummary reporting, empty to disable thresholds functionality: <""|*internal|$rpc_conns_id>
876// "ees_conns": [], // connections to EEs for trendSummary, empty to disable export functionality: <""|*internal|$rpc_conns_id>
877// "ees_exporter_ids": [] // list of EventExporter profiles to use for real-time trendSummary exports
878// },
879
880
881// "rankings":{ // RankingS config
882// "enabled": false, // starts RankingS service: <true|false>.
883// "store_interval": "", // dump cache regularly to dataDB, 0 - dump at start/shutdown: <""|$dur>
884// "stats_conns": [], // connections to StatS, empty to disable stats functionality: <""|*internal|$rpc_conns_id>
885// "scheduled_ids": {}, // autoload these ranking ids on start
886// "thresholds_conns": [], // connections to ThresholdS for rankingSummary reporting, empty to disable thresholds functionality: <""|*internal|$rpc_conns_id>
887// "ees_conns": [], // connections to EEs for rankingSummary events, empty to disable export functionality: <""|*internal|$rpc_conns_id>
888// "ees_exporter_ids": [] // list of EventExporter profiles to use for real-time rankingSummary exports
889// },
890
891
892// "thresholds": { // ThresholdS
893// "enabled": false, // starts ThresholdS service: <true|false>.
894// "store_interval": "", // dump cache regularly to dataDB, 0 - dump at start/shutdown: <""|$dur>
895// "indexed_selects": true, // enable profile matching exclusively on indexes
896// "sessions_conns":[], // connections to SessionS <*internal|$rpc_conns_id>
897// //"string_indexed_fields": [], // query indexes based on these fields for faster processing
898// "prefix_indexed_fields": [], // query indexes based on these fields for faster processing
899// "suffix_indexed_fields": [], // query indexes based on these fields for faster processing
900// "nested_fields": false, // determines which field is checked when matching indexed filters(true: all; false: only the one on the first level)
901// "opts": {
902// "*profileIDs": [],
903// "*profileIgnoreFilters": false,
904// },
905// },
906
907
908// "routes": { // RouteS config
909// "enabled": false, // starts RouteS service: <true|false>.
910// "indexed_selects": true, // enable profile matching exclusively on indexes
911// //"string_indexed_fields": [], // query indexes based on these fields for faster processing
912// "prefix_indexed_fields": [], // query indexes based on these fields for faster processing
913// "suffix_indexed_fields": [], // query indexes based on these fields for faster processing
914// "nested_fields": false, // determines which field is checked when matching indexed filters(true: all; false: only the one on the first level)
915// "attributes_conns": [], // connections to AttributeS for altering events before route queries: <""|*internal|$rpc_conns_id>
916// "resources_conns": [], // connections to ResourceS for *res sorting, empty to disable functionality: <""|*internal|$rpc_conns_id>
917// "stats_conns": [], // connections to StatS for *stats sorting, empty to disable stats functionality: <""|*internal|$rpc_conns_id>
918// "rals_conns": [], // connections to Rater for calculating cost, empty to disable stats functionality: <""|*internal|$rpc_conns_id>
919// "default_ratio":1, // default ratio used in case of *load strategy
920// "opts": {
921// "*context": "*routes",
922// // "*profileCount": 1,
923// "*ignoreErrors": false,
924// "*maxCost": "",
925// // "*limit": 1,
926// // "*offset": 1,
927// },
928// },
929
930
931// "loaders": [ // LoaderS config
932// {
933// "id": "*default", // identifier of the Loader
934// "enabled": false, // starts as service: <true|false>.
935// "tenant": "", // tenant used in filterS.Pass
936// "dry_run": false, // do not send the CDRs to CDRS, just parse them
937// "run_delay": "0", // sleep interval in seconds between consecutive runs, -1 to use automation via inotify or 0 to disable running all together
938// "lockfile_path": ".cgr.lck", // Filename containing concurrency lock in case of delayed processing
939// "caches_conns": ["*internal"],
940// "field_separator": ",", // separator used in case of csv files
941// "tp_in_dir": "/var/spool/cgrates/loader/in", // absolute path towards the directory where the TPs are stored
942// "tp_out_dir": "/var/spool/cgrates/loader/out", // absolute path towards the directory where processed TPs will be moved
943// "data":[ // data profiles to load
944// {
945// "type": "*attributes", // data source type
946// "file_name": "Attributes.csv", // file name in the tp_in_dir
947// "fields": [
948// {"tag": "TenantID", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
949// {"tag": "ProfileID", "path": "ID", "type": "*variable", "value": "~*req.1", "mandatory": true},
950// {"tag": "Contexts", "path": "Contexts", "type": "*variable", "value": "~*req.2"},
951// {"tag": "FilterIDs", "path": "FilterIDs", "type": "*variable", "value": "~*req.3"},
952// {"tag": "ActivationInterval", "path": "ActivationInterval", "type": "*variable", "value": "~*req.4"},
953// {"tag": "AttributeFilterIDs", "path": "AttributeFilterIDs", "type": "*variable", "value": "~*req.5"},
954// {"tag": "Path", "path": "Path", "type": "*variable", "value": "~*req.6"},
955// {"tag": "Type", "path": "Type", "type": "*variable", "value": "~*req.7"},
956// {"tag": "Value", "path": "Value", "type": "*variable", "value": "~*req.8"},
957// {"tag": "Blocker", "path": "Blocker", "type": "*variable", "value": "~*req.9"},
958// {"tag": "Weight", "path": "Weight", "type": "*variable", "value": "~*req.10"},
959// ],
960// },
961// {
962// "type": "*filters", // data source type
963// "file_name": "Filters.csv", // file name in the tp_in_dir
964// "fields": [
965// {"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
966// {"tag": "ID", "path": "ID", "type": "*variable", "value": "~*req.1", "mandatory": true},
967// {"tag": "Type", "path": "Type", "type": "*variable", "value": "~*req.2"},
968// {"tag": "Element", "path": "Element", "type": "*variable", "value": "~*req.3"},
969// {"tag": "Values", "path": "Values", "type": "*variable", "value": "~*req.4"},
970// {"tag": "ActivationInterval", "path": "ActivationInterval", "type": "*variable", "value": "~*req.5"},
971// ],
972// },
973// {
974// "type": "*resources", // data source type
975// "file_name": "Resources.csv", // file name in the tp_in_dir
976// "fields": [
977// {"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
978// {"tag": "ID", "path": "ID", "type": "*variable", "value": "~*req.1", "mandatory": true},
979// {"tag": "FilterIDs", "path": "FilterIDs", "type": "*variable", "value": "~*req.2"},
980// {"tag": "ActivationInterval", "path": "ActivationInterval", "type": "*variable", "value": "~*req.3"},
981// {"tag": "TTL", "path": "UsageTTL", "type": "*variable", "value": "~*req.4"},
982// {"tag": "Limit", "path": "Limit", "type": "*variable", "value": "~*req.5"},
983// {"tag": "AllocationMessage", "path": "AllocationMessage", "type": "*variable", "value": "~*req.6"},
984// {"tag": "Blocker", "path": "Blocker", "type": "*variable", "value": "~*req.7"},
985// {"tag": "Stored", "path": "Stored", "type": "*variable", "value": "~*req.8"},
986// {"tag": "Weight", "path": "Weight", "type": "*variable", "value": "~*req.9"},
987// {"tag": "ThresholdIDs", "path": "ThresholdIDs", "type": "*variable", "value": "~*req.10"},
988// ],
989// },
990// {
991// "type": "*stats", // data source type
992// "file_name": "Stats.csv", // file name in the tp_in_dir
993// "fields": [
994// {"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
995// {"tag": "ID", "path": "ID", "type": "*variable", "value": "~*req.1", "mandatory": true},
996// {"tag": "FilterIDs", "path": "FilterIDs", "type": "*variable", "value": "~*req.2"},
997// {"tag": "ActivationInterval", "path": "ActivationInterval", "type": "*variable", "value": "~*req.3"},
998// {"tag": "QueueLength", "path": "QueueLength", "type": "*variable", "value": "~*req.4"},
999// {"tag": "TTL", "path": "TTL", "type": "*variable", "value": "~*req.5"},
1000// {"tag": "MinItems", "path": "MinItems", "type": "*variable", "value": "~*req.6"},
1001// {"tag": "MetricIDs", "path": "MetricIDs", "type": "*variable", "value": "~*req.7"},
1002// {"tag": "MetricFilterIDs", "path": "MetricFilterIDs", "type": "*variable", "value": "~*req.8"},
1003// {"tag": "Blocker", "path": "Blocker", "type": "*variable", "value": "~*req.9"},
1004// {"tag": "Stored", "path": "Stored", "type": "*variable", "value": "~*req.10"},
1005// {"tag": "Weight", "path": "Weight", "type": "*variable", "value": "~*req.11"},
1006// {"tag": "ThresholdIDs", "path": "ThresholdIDs", "type": "*variable", "value": "~*req.12"},
1007// ],
1008// },
1009// {
1010// "type": "*thresholds", // data source type
1011// "file_name": "Thresholds.csv", // file name in the tp_in_dir
1012// "fields": [
1013// {"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
1014// {"tag": "ID", "path": "ID", "type": "*variable", "value": "~*req.1", "mandatory": true},
1015// {"tag": "FilterIDs", "path": "FilterIDs", "type": "*variable", "value": "~*req.2"},
1016// {"tag": "ActivationInterval", "path": "ActivationInterval", "type": "*variable", "value": "~*req.3"},
1017// {"tag": "MaxHits", "path": "MaxHits", "type": "*variable", "value": "~*req.4"},
1018// {"tag": "MinHits", "path": "MinHits", "type": "*variable", "value": "~*req.5"},
1019// {"tag": "MinSleep", "path": "MinSleep", "type": "*variable", "value": "~*req.6"},
1020// {"tag": "Blocker", "path": "Blocker", "type": "*variable", "value": "~*req.7"},
1021// {"tag": "Weight", "path": "Weight", "type": "*variable", "value": "~*req.8"},
1022// {"tag": "ActionIDs", "path": "ActionIDs", "type": "*variable", "value": "~*req.9"},
1023// {"tag": "Async", "path": "Async", "type": "*variable", "value": "~*req.10"},
1024// ],
1025// },
1026// {
1027// "type": "*routes", // data source type
1028// "file_name": "Routes.csv", // file name in the tp_in_dir
1029// "fields": [
1030// {"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
1031// {"tag": "ID", "path": "ID", "type": "*variable", "value": "~*req.1", "mandatory": true},
1032// {"tag": "FilterIDs", "path": "FilterIDs", "type": "*variable", "value": "~*req.2"},
1033// {"tag": "ActivationInterval", "path": "ActivationInterval", "type": "*variable", "value": "~*req.3"},
1034// {"tag": "Sorting", "path": "Sorting", "type": "*variable", "value": "~*req.4"},
1035// {"tag": "SortingParameters", "path": "SortingParameters", "type": "*variable", "value": "~*req.5"},
1036// {"tag": "RouteID", "path": "RouteID", "type": "*variable", "value": "~*req.6"},
1037// {"tag": "RouteFilterIDs", "path": "RouteFilterIDs", "type": "*variable", "value": "~*req.7"},
1038// {"tag": "RouteAccountIDs", "path": "RouteAccountIDs", "type": "*variable", "value": "~*req.8"},
1039// {"tag": "RouteRatingPlanIDs", "path": "RouteRatingPlanIDs", "type": "*variable", "value": "~*req.9"},
1040// {"tag": "RouteResourceIDs", "path": "RouteResourceIDs", "type": "*variable", "value": "~*req.10"},
1041// {"tag": "RouteStatIDs", "path": "RouteStatIDs", "type": "*variable", "value": "~*req.11"},
1042// {"tag": "RouteWeight", "path": "RouteWeight", "type": "*variable", "value": "~*req.12"},
1043// {"tag": "RouteBlocker", "path": "RouteBlocker", "type": "*variable", "value": "~*req.13"},
1044// {"tag": "RouteParameters", "path": "RouteParameters", "type": "*variable", "value": "~*req.14"},
1045// {"tag": "Weight", "path": "Weight", "type": "*variable", "value": "~*req.15"},
1046// ],
1047// },
1048// {
1049// "type": "*chargers", // data source type
1050// "file_name": "Chargers.csv", // file name in the tp_in_dir
1051// "fields": [
1052// {"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
1053// {"tag": "ID", "path": "ID", "type": "*variable", "value": "~*req.1", "mandatory": true},
1054// {"tag": "FilterIDs", "path": "FilterIDs", "type": "*variable", "value": "~*req.2"},
1055// {"tag": "ActivationInterval", "path": "ActivationInterval", "type": "*variable", "value": "~*req.3"},
1056// {"tag": "RunID", "path": "RunID", "type": "*variable", "value": "~*req.4"},
1057// {"tag": "AttributeIDs", "path": "AttributeIDs", "type": "*variable", "value": "~*req.5"},
1058// {"tag": "Weight", "path": "Weight", "type": "*variable", "value": "~*req.6"},
1059// ],
1060// },
1061// {
1062// "type": "*dispatchers", // data source type
1063// "file_name": "DispatcherProfiles.csv", // file name in the tp_in_dir
1064// "fields": [
1065// {"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
1066// {"tag": "ID", "path": "ID", "type": "*variable", "value": "~*req.1", "mandatory": true},
1067// {"tag": "Contexts", "path": "Contexts", "type": "*variable", "value": "~*req.2"},
1068// {"tag": "FilterIDs", "path": "FilterIDs", "type": "*variable", "value": "~*req.3"},
1069// {"tag": "ActivationInterval", "path": "ActivationInterval", "type": "*variable", "value": "~*req.4"},
1070// {"tag": "Strategy", "path": "Strategy", "type": "*variable", "value": "~*req.5"},
1071// {"tag": "StrategyParameters", "path": "StrategyParameters", "type": "*variable", "value": "~*req.6"},
1072// {"tag": "ConnID", "path": "ConnID", "type": "*variable", "value": "~*req.7"},
1073// {"tag": "ConnFilterIDs", "path": "ConnFilterIDs", "type": "*variable", "value": "~*req.8"},
1074// {"tag": "ConnWeight", "path": "ConnWeight", "type": "*variable", "value": "~*req.9"},
1075// {"tag": "ConnBlocker", "path": "ConnBlocker", "type": "*variable", "value": "~*req.10"},
1076// {"tag": "ConnParameters", "path": "ConnParameters", "type": "*variable", "value": "~*req.11"},
1077// {"tag": "Weight", "path": "Weight", "type": "*variable", "value": "~*req.12"},
1078// ],
1079// },
1080// {
1081// "type": "*dispatcher_hosts", // data source type
1082// "file_name": "DispatcherHosts.csv", // file name in the tp_in_dir
1083// "fields": [
1084// {"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
1085// {"tag": "ID", "path": "ID", "type": "*variable", "value": "~*req.1", "mandatory": true},
1086// {"tag": "Address", "path": "Address", "type": "*variable", "value": "~*req.2"},
1087// {"tag": "Transport", "path": "Transport", "type": "*variable", "value": "~*req.3"},
1088// {"tag": "ConnectAttempts", "path": "ConnectAttempts", "type": "*variable", "value":"~*req.4"},
1089// {"tag": "Reconnects", "path": "Reconnects", "type": "*variable", "value":"~*req.5"},
1090// {"tag": "MaxReconnectInterval", "path": "MaxReconnectInterval", "type": "*variable", "value":"~*req.6"},
1091// {"tag": "ConnectTimeout", "path": "ConnectTimeout", "type": "*variable", "value":"~*req.7"},
1092// {"tag": "ReplyTimeout", "path": "ReplyTimeout", "type": "*variable", "value":"~*req.8"},
1093// {"tag": "TLS", "path": "TLS", "type": "*variable", "value": "~*req.9"},
1094// {"tag": "ClientKey", "path": "ClientKey", "type": "*variable", "value":"~*req.10"},
1095// {"tag": "ClientCertificate", "path": "ClientCertificate", "type": "*variable", "value":"~*req.11"},
1096// {"tag": "CaCertificate", "path": "CaCertificate", "type": "*variable", "value":"~*req.12"},
1097// ],
1098// },
1099// ],
1100// },
1101// ],
1102
1103
1104// "mailer": {
1105// "server": "localhost", // the server to use when sending emails out
1106// "auth_user": "cgrates", // authenticate to email server using this user
1107// "auth_password": "CGRateS.org", // authenticate to email server with this password
1108// "from_address": "cgr-mailer@localhost.localdomain" // from address used when sending emails out
1109// },
1110
1111
1112// "suretax": {
1113// "url": "", // API url
1114// "client_number": "", // client number, provided by SureTax
1115// "validation_key": "", // validation key provided by SureTax
1116// "business_unit": "", // client’s Business Unit
1117// "timezone": "Local", // convert the time of the events to this timezone before sending request out <UTC|Local|$IANA_TZ_DB>
1118// "include_local_cost": false, // sum local calculated cost with tax one in final cost
1119// "return_file_code": "0", // default or Quote purposes <0|Q>
1120// "response_group": "03", // determines how taxes are grouped for the response <03|13>
1121// "response_type": "D4", // determines the granularity of taxes and (optionally) the decimal precision for the tax calculations and amounts in the response
1122// "regulatory_code": "03", // provider type
1123// "client_tracking": "~*req.CGRID", // template extracting client information out of StoredCdr; <RSRParsers>
1124// "customer_number": "~*req.Subject", // template extracting customer number out of StoredCdr; <RSRParsers>
1125// "orig_number": "~*req.Subject", // template extracting origination number out of StoredCdr; <RSRParsers>
1126// "term_number": "~*req.Destination", // template extracting termination number out of StoredCdr; <RSRParsers>
1127// "bill_to_number": "", // template extracting billed to number out of StoredCdr; <RSRParsers>
1128// "zipcode": "", // template extracting billing zip code out of StoredCdr; <RSRParsers>
1129// "plus4": "", // template extracting billing zip code extension out of StoredCdr; <RSRParsers>
1130// "p2pzipcode": "", // template extracting secondary zip code out of StoredCdr; <RSRParsers>
1131// "p2pplus4": "", // template extracting secondary zip code extension out of StoredCdr; <RSRParsers>
1132// "units": "1", // template extracting number of “lines” or unique charges contained within the revenue out of StoredCdr; <RSRParsers>
1133// "unit_type": "00", // template extracting number of unique access lines out of StoredCdr; <RSRParsers>
1134// "tax_included": "0", // template extracting tax included in revenue out of StoredCdr; <RSRParsers>
1135// "tax_situs_rule": "04", // template extracting tax situs rule out of StoredCdr; <RSRParsers>
1136// "trans_type_code": "010101", // template extracting transaction type indicator out of StoredCdr; <RSRParsers>
1137// "sales_type_code": "R", // template extracting sales type code out of StoredCdr; <RSRParsers>
1138// "tax_exemption_code_list": "", // template extracting tax exemption code list out of StoredCdr; <RSRParsers>
1139// },
1140
1141
1142// "loader": { // loader for tariff plans out of .csv files
1143// "tpid": "", // tariff plan identificator
1144// "data_path": "./", // path towards tariff plan files
1145// "disable_reverse": false, // disable reverse computing
1146// "field_separator": ",", // separator used in case of csv files
1147// "caches_conns":["*localhost"],
1148// "scheduler_conns": ["*localhost"],
1149// "gapi_credentials": ".gapi/credentials.json", // the path to the credentials for google API or the credentials.json file content
1150// "gapi_token": ".gapi/token.json" // the path to the token for google API or the token.json file content
1151// },
1152
1153
1154// "migrator": {
1155// "out_datadb_type": "redis",
1156// "out_datadb_host": "127.0.0.1",
1157// "out_datadb_port": "6379",
1158// "out_datadb_name": "10",
1159// "out_datadb_user": "cgrates",
1160// "out_datadb_password": "",
1161// "out_datadb_encoding" : "msgpack",
1162// "out_stordb_type": "mysql",
1163// "out_stordb_host": "127.0.0.1",
1164// "out_stordb_port": "3306",
1165// "out_stordb_name": "cgrates",
1166// "out_stordb_user": "cgrates",
1167// "out_stordb_password": "",
1168// "users_filters":[],
1169// "out_datadb_opts":{
1170// "redisMaxConns": 10, // the connection pool size
1171// "redisConnectAttempts": 20, // the maximum amount of dial attempts
1172// "redisSentinel": "",
1173// "redisCluster": false,
1174// "redisClusterSync": "5s",
1175// "redisClusterOndownDelay": "0",
1176// "redisConnectTimeout": "0", // the read/write timeout for each connection.
1177// "redisPoolPipelineWindow": "150µs", // duration after which internal pipelines are flushed (0 disables implicit pipelining)
1178// "redisPoolPipelineLimit": 0, // maximum number of commands that can be pipelined before flushing (0 means no limit)
1179// "redisTLS": false, // enable TLS when connecting to Redis and use the redisClientCertificate, redisClientKey and redisCACertificate for TLS connection
1180// "redisClientCertificate":"", // path to client certificate
1181// "redisClientKey":"", // path to client key
1182// "redisCACertificate":"", // path to CA certificate (populate for self-signed certificate otherwise let it empty)
1183// "mongoConnScheme": "mongodb" // scheme for MongoDB connection <mongodb|mongodb+srv>
1184// },
1185// "out_stordb_opts":{
1186// "mongoConnScheme": "mongodb" // scheme for MongoDB connection <mongodb|mongodb+srv>
1187// },
1188// },
1189
1190
1191// "dispatchers":{ // DispatcherS config
1192// "enabled": false, // starts DispatcherS service: <true|false>.
1193// "indexed_selects": true, // enable profile matching exclusively on indexes
1194// //"string_indexed_fields": [], // query indexes based on these fields for faster processing
1195// "prefix_indexed_fields": [], // query indexes based on these fields for faster processing
1196// "suffix_indexed_fields": [], // query indexes based on these fields for faster processing
1197// "nested_fields": false, // determines which field is checked when matching indexed filters(true: all; false: only the one on the first level)
1198// "attributes_conns": [], // connections to AttributeS for API authorization, empty to disable auth functionality: <""|*internal|$rpc_conns_id>
1199// "any_subsystem": true, // if we match the *any subsystem
1200// "prevent_loops": false,
1201// },
1202
1203
1204// "registrarc":{
1205// "rpc":{
1206// "enabled": false,
1207// "registrars_conns": [],
1208// "hosts": [],
1209// "refresh_interval": "5m",
1210// },
1211// "dispatchers":{
1212// "enabled": false,
1213// "registrars_conns": [],
1214// "hosts": [],
1215// "refresh_interval": "5m",
1216// },
1217// },
1218
1219
1220// "analyzers":{ // AnalyzerS config
1221// "enabled": false, // starts AnalyzerS service: <true|false>.
1222// "db_path": "/var/spool/cgrates/analyzers", // path to the folder where to store the information
1223// "index_type": "*scorch", // the type of index for the storage: <*scorch|*boltdb|*leveldb|*mossdb>
1224// "ttl": "24h", // time to wait before removing the API capture
1225// "cleanup_interval": "1h", // the interval we clean the db
1226// },
1227
1228
1229// "apiers": {
1230// "enabled": false,
1231// "caches_conns":["*internal"],
1232// "scheduler_conns": [], // connections to SchedulerS for reloads
1233// "attributes_conns": [], // connections to AttributeS for CDRExporter
1234// "ees_conns": [], // connections to EEs
1235// },
1236
1237
1238// "sip_agent": { // SIP Agents, only used for redirections
1239// "enabled": false, // enables the SIP agent: <true|false>
1240// "listen": "127.0.0.1:5060", // address where to listen for SIP requests <x.y.z.y:1234>
1241// "listen_net": "udp", // network to listen on <udp|tcp|tcp-tls>
1242// "sessions_conns": ["*internal"],
1243// "timezone": "", // timezone of the events if not specified <UTC|Local|$IANA_TZ_DB>
1244// "retransmission_timer": "1s", // the duration to wait to receive an ACK before resending the reply
1245// "request_processors": [] // request processors to be applied to SIP messages
1246// },
1247
1248
1249// "janus_agent": {
1250// "enabled": false, // enables the Janus agent: <true|false>
1251// "url": "/janus",
1252// "sessions_conns": ["*internal"],
1253// "janus_conns": [{ // instantiate connections to multiple Janus Servers
1254// "address": "127.0.0.1:8088", // janus API address
1255// "type": "*ws", // type of the transport to interact via janus API
1256// "admin_address": "localhost:7188", // janus admin address used to retrive more information for sessions and handles
1257// "admin_password": "", // secret to pass restriction to communicate to the endpoint
1258// }],
1259// "request_processors": [], // request processors to be applied to Janus messages
1260// },
1261
1262
1263// "templates": {
1264// "*err": [
1265// {"tag": "SessionId", "path": "*rep.Session-Id", "type": "*variable",
1266// "value": "~*req.Session-Id", "mandatory": true},
1267// {"tag": "OriginHost", "path": "*rep.Origin-Host", "type": "*variable",
1268// "value": "~*vars.OriginHost", "mandatory": true},
1269// {"tag": "OriginRealm", "path": "*rep.Origin-Realm", "type": "*variable",
1270// "value": "~*vars.OriginRealm", "mandatory": true},
1271// ],
1272// "*cca": [
1273// {"tag": "SessionId", "path": "*rep.Session-Id", "type": "*variable",
1274// "value": "~*req.Session-Id", "mandatory": true},
1275// {"tag": "ResultCode", "path": "*rep.Result-Code", "type": "*constant",
1276// "value": "2001"},
1277// {"tag": "OriginHost", "path": "*rep.Origin-Host", "type": "*variable",
1278// "value": "~*vars.OriginHost", "mandatory": true},
1279// {"tag": "OriginRealm", "path": "*rep.Origin-Realm", "type": "*variable",
1280// "value": "~*vars.OriginRealm", "mandatory": true},
1281// {"tag": "AuthApplicationId", "path": "*rep.Auth-Application-Id", "type": "*variable",
1282// "value": "~*vars.*appid", "mandatory": true},
1283// {"tag": "CCRequestType", "path": "*rep.CC-Request-Type", "type": "*variable",
1284// "value": "~*req.CC-Request-Type", "mandatory": true},
1285// {"tag": "CCRequestNumber", "path": "*rep.CC-Request-Number", "type": "*variable",
1286// "value": "~*req.CC-Request-Number", "mandatory": true},
1287// ],
1288// "*asr": [
1289// {"tag": "SessionId", "path": "*diamreq.Session-Id", "type": "*variable",
1290// "value": "~*req.Session-Id", "mandatory": true},
1291// {"tag": "OriginHost", "path": "*diamreq.Origin-Host", "type": "*variable",
1292// "value": "~*req.Destination-Host", "mandatory": true},
1293// {"tag": "OriginRealm", "path": "*diamreq.Origin-Realm", "type": "*variable",
1294// "value": "~*req.Destination-Realm", "mandatory": true},
1295// {"tag": "DestinationRealm", "path": "*diamreq.Destination-Realm", "type": "*variable",
1296// "value": "~*req.Origin-Realm", "mandatory": true},
1297// {"tag": "DestinationHost", "path": "*diamreq.Destination-Host", "type": "*variable",
1298// "value": "~*req.Origin-Host", "mandatory": true},
1299// {"tag": "AuthApplicationId", "path": "*diamreq.Auth-Application-Id", "type": "*variable",
1300// "value": "~*vars.*appid", "mandatory": true},
1301// ],
1302// "*rar": [
1303// {"tag": "SessionId", "path": "*diamreq.Session-Id", "type": "*variable",
1304// "value": "~*req.Session-Id", "mandatory": true},
1305// {"tag": "OriginHost", "path": "*diamreq.Origin-Host", "type": "*variable",
1306// "value": "~*req.Destination-Host", "mandatory": true},
1307// {"tag": "OriginRealm", "path": "*diamreq.Origin-Realm", "type": "*variable",
1308// "value": "~*req.Destination-Realm", "mandatory": true},
1309// {"tag": "DestinationRealm", "path": "*diamreq.Destination-Realm", "type": "*variable",
1310// "value": "~*req.Origin-Realm", "mandatory": true},
1311// {"tag": "DestinationHost", "path": "*diamreq.Destination-Host", "type": "*variable",
1312// "value": "~*req.Origin-Host", "mandatory": true},
1313// {"tag": "AuthApplicationId", "path": "*diamreq.Auth-Application-Id", "type": "*variable",
1314// "value": "~*vars.*appid", "mandatory": true},
1315// {"tag": "ReAuthRequestType", "path": "*diamreq.Re-Auth-Request-Type", "type": "*constant",
1316// "value": "0"},
1317// ],
1318// "*dmr": [ // used by RadiusAgent when sending Disconnect message towards the client
1319// {"tag": "User-Name", "path": "*radDAReq.User-Name", "type": "*variable",
1320// "value": "~*oreq.User-Name"},
1321// {"tag": "NAS-IP-Address", "path": "*radDAReq.NAS-IP-Address", "type": "*variable",
1322// "value": "~*oreq.NAS-IP-Address"},
1323// {"tag": "Acct-Session-Id", "path": "*radDAReq.Acct-Session-Id", "type": "*variable",
1324// "value": "~*oreq.Acct-Session-Id"},
1325// {"tag": "Reply-Message", "path": "*radDAReq.Reply-Message", "type": "*variable",
1326// "value": "~*req.DisconnectCause"}
1327// ],
1328// "*coa": [ // used by RadiusAgent when sending ChangeOfAuthorization message towards the client
1329// {"tag": "User-Name", "path": "*radDAReq.User-Name", "type": "*variable",
1330// "value": "~*oreq.User-Name"},
1331// {"tag": "NAS-IP-Address", "path": "*radDAReq.NAS-IP-Address", "type": "*variable",
1332// "value": "~*oreq.NAS-IP-Address"},
1333// {"tag": "Acct-Session-Id", "path": "*radDAReq.Acct-Session-Id", "type": "*variable",
1334// "value": "~*oreq.Acct-Session-Id"},
1335// {"tag": "Filter-Id", "path": "*radDAReq.Filter-Id", "type": "*variable",
1336// "value": "~*req.CustomFilter"}
1337// ],
1338// "*errSip": [
1339// {"tag": "Request", "path": "*rep.Request", "type": "*constant",
1340// "value": "SIP/2.0 500 Internal Server Error", "mandatory": true},
1341// ],
1342// "*cdrLog": [ // cdrLog template is used in ActionS to build the event that is sent to CDRs in case of *cdrLog actionType
1343// {"tag": "ToR", "path": "*cdr.ToR", "type": "*variable",
1344// "value": "~*req.BalanceType", "mandatory": true},
1345// {"tag": "OriginHost", "path": "*cdr.OriginHost", "type": "*constant",
1346// "value": "127.0.0.1", "mandatory": true},
1347// {"tag": "RequestType", "path": "*cdr.RequestType", "type": "*constant",
1348// "value": "*none", "mandatory": true},
1349// {"tag": "Tenant", "path": "*cdr.Tenant", "type": "*variable",
1350// "value": "~*req.Tenant", "mandatory": true},
1351// {"tag": "Account", "path": "*cdr.Account", "type": "*variable",
1352// "value": "~*req.Account", "mandatory": true},
1353// {"tag": "Subject", "path": "*cdr.Subject", "type": "*variable",
1354// "value": "~*req.Account", "mandatory": true},
1355// {"tag": "Cost", "path": "*cdr.Cost", "type": "*variable",
1356// "value": "~*req.Cost", "mandatory": true},
1357// {"tag": "Source", "path": "*cdr.Source", "type": "*constant",
1358// "value": "*cdrLog", "mandatory": true},
1359// {"tag": "Usage", "path": "*cdr.Usage", "type": "*constant",
1360// "value": "1", "mandatory": true},
1361// {"tag": "RunID", "path": "*cdr.RunID", "type": "*variable",
1362// "value": "~*req.ActionType", "mandatory": true},
1363// {"tag": "SetupTime", "path": "*cdr.SetupTime", "type": "*constant",
1364// "value": "*now", "mandatory": true},
1365// {"tag": "AnswerTime", "path": "*cdr.AnswerTime", "type": "*constant",
1366// "value": "*now", "mandatory": true},
1367// {"tag": "PreRated", "path": "*cdr.PreRated", "type": "*constant",
1368// "value": "true", "mandatory": true}
1369// ]
1370// },
1371
1372
1373// "configs": {
1374// "enabled": false,
1375// "url": "/configs/", // configs url
1376// "root_dir": "/var/spool/cgrates/configs", // root directory in case of calling /configs request
1377// },
1378
1379
1380// "apiban": {
1381// "keys": []
1382// },
1383
1384// "sentrypeer":{
1385// "client_id":"",
1386// "client_secret":"",
1387// "token_url":"https://authz.sentrypeer.com/oauth/token",
1388// "ips_url":"https://sentrypeer.com/api/ip-addresses",
1389// "numbers_url":"https://sentrypeer.com/api/phone-numbers",
1390// "audience":"https://sentrypeer.com/api",
1391// "grant_type":"client_credentials"
1392// }
1393
1394}