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