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// "nodeID": "", // identifier of this instance in the cluster, if empty it will be autogenerated
11// "roundingDecimals": 5, // system level precision for floats
12// "dbDataEncoding": "*msgpack", // encoding used to store object data in strings: <*msgpack|*json>
13// "tpExportDir": "/var/spool/cgrates/tpe", // path towards export folder for offline TariffPlans
14// "defaultRequestType": "*rated", // default request type to consider when missing from requests: <""|*prepaid|*postpaid|*pseudoprepaid|*rated>
15// "defaultCategory": "call", // default category to consider when missing from requests
16// "defaultTenant": "cgrates.org", // default tenant to consider when missing from requests
17// "defaultTimezone": "Local", // default timezone for timestamps where not specified <""|UTC|Local|$IANA_TZ_DB>
18// "defaultCaching": "*reload", // default actions to do when caching items
19// "cachingDelay": "0s", // add delay before cache reload
20// "minCallDuration": "0s", // only authorize calls with allowed duration higher than this
21// "maxCallDuration": "3h", // maximum call duration a prepaid call can last
22// "connectAttempts": 5, // initial server connect attempts
23// "reconnects": -1, // number of retries in case of connection lost
24// "maxReconnectInterval": "", // time to wait in between reconnect attempts
25// "connectTimeout": "1s", // consider connection unsuccessful on timeout, 0 to disable the feature
26// "replyTimeout": "2s", // consider connection down for replies taking longer than this value
27// "lockingTimeout": "0", // timeout internal locks to avoid deadlocks
28// "digestSeparator": ",", // separator to use in replies containing data digests
29// "digestEqual": ":", // equal symbol used in case of digests
30// "maxParallelConns": 100, // the maximum number of connection used by the *parallel strategy
31// "decimalMaxScale": 0, // the maximum scale for decimal numbers
32// "decimalMinScale": 0, // the minimum scale for decimal numbers
33// "decimalPrecision": 0, // the precision of the decimal operations
34// "decimalRoundingMode": "*toNearestEven", // the rounding mode <*toNearestEven|*toNearestAway|*toZero|*awayFromZero|*toNegativeInf|*toPositiveInf|*toNearestTowardZero>
35// "opts":{
36// // "*exporterIDs": [
37// // {
38// // "tenant": "*any",
39// // "filterIDs": [],
40// // "connIDs": []
41// // }
42// // ]
43// }
44// },
45
46// "logger": {
47// "type": "*syslog", // controls the destination of logs <*syslog|*stdout|*kafkaLog>
48// "level": 6, // system level precision for floats
49// "efsConns": ["*internal"], // connID to efs service
50// "opts": {
51// "kafkaConn": "", // the connection trough kafka
52// "kafkaTopic": "", // the topic from where the events are exported
53// "kafkaAttempts": 1, // number of attempts of connecting
54// "failedPostsDir": "/var/spool/cgrates/failed_posts" // path where fail logs are exported
55// }
56// },
57
58// "cores": {
59// "caps": 0, // maximum concurrent request allowed ( 0 to disabled )
60// "capsStrategy": "*busy", // strategy in case of concurrent requests reached
61// "capsStatsInterval": "0", // the interval duration we sample for caps stats ( 0 to disabled )
62// "eesConns": [], // connections to EventExporter
63// "shutdownTimeout": "1s" // the duration to wait until all services are stopped
64// },
65
66// "rpcConns": { // rpc connections definitions
67// // "*localhost": {
68// // "strategy": "*first",
69// // "poolSize": 0,
70// // "replyTimeout": "2s",
71// // "conns": [{
72// // "address": "127.0.0.1:2012",
73// // "transport": "*json",
74// // "connectAttempts": 5,
75// // "reconnects": -1,
76// // "maxReconnectInterval": "",
77// // "connectTimeout": "1s",
78// // "replyTimeout": "2s",
79// // "tls": false,
80// // "clientKey": "",
81// // "clientCertificate": "",
82// // "caCertificate": ""
83// // }]
84// // }
85// },
86
87// "db": { // database used to store data (eg: accounts)
88// "dbConns": {
89// "*default": { // The id of the DB connection
90// "dbType": "*internal", // db type: <*internal|*redis|*mysql|*mongo|*postgres>
91// "dbHost": "", // db host address
92// "dbPort": 0, // db port to reach the database
93// "dbName": "", // db database name to connect to
94// "dbUser": "", // username to use when connecting to db
95// "dbPassword": "", // password to use when connecting to db
96// "stringIndexedFields": [], // indexes on cdrs table to speed up queries, used in case of *mongo and *internal
97// "prefixIndexedFields": [], // prefix indexes on cdrs table to speed up queries, used in case of *internal
98// "remoteConns": [], // the conns that are queried when the items are not found in local DB
99// "remoteConnID": "", // the ID to be sent to remote_conns to identify the connection
100// "replicationConns": [], // the conns the items are replicated
101// "replicationFiltered": false, // if this is enabled the replication will be made only to the conns that received a get
102// "replicationCache": "", // the caching action that is executed on the replicationConns when the items are replicated
103// },
104// },
105// "items":{
106// "*accounts": {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate":false, "dbConn": "*default"},
107// "*actions": {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate":false, "dbConn": "*default"},
108// "*resourceProfiles": {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate":false, "dbConn": "*default"},
109// "*resources": {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate":false, "dbConn": "*default"},
110// "*ipProfiles": {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate":false, "dbConn": "*default"},
111// "*ipAllocations": {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate":false, "dbConn": "*default"},
112// "*statQueueProfiles": {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate":false, "dbConn": "*default"},
113// "*statQueues": {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate":false, "dbConn": "*default"},
114// "*thresholdProfiles": {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate":false, "dbConn": "*default"},
115// "*thresholds": {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate":false, "dbConn": "*default"},
116// "*filters": {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate":false, "dbConn": "*default"},
117// "*routeProfiles": {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate":false, "dbConn": "*default"},
118// "*attributeProfiles": {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate":false, "dbConn": "*default"},
119// "*chargerProfiles": {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate":false, "dbConn": "*default"},
120// "*rateProfiles": {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate":false, "dbConn": "*default"},
121// "*actionProfiles": {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate":false, "dbConn": "*default"},
122// "*loadIDs": {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate":false, "dbConn": "*default"},
123// "*versions": {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate":false, "dbConn": "*default"},
124// "*resourceFilterIndexes" : {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate": false, "dbConn": "*default"},
125// "*ipFilterIndexes" : {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate": false, "dbConn": "*default"},
126// "*statFilterIndexes" : {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate": false, "dbConn": "*default"},
127// "*thresholdFilterIndexes" : {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate": false, "dbConn": "*default"},
128// "*rankingProfiles": {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate":false, "dbConn": "*default"},
129// "*rankings": {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate":false, "dbConn": "*default"},
130// "*trendProfiles": {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate":false, "dbConn": "*default"},
131// "*trends": {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate":false, "dbConn": "*default"},
132// "*routeFilterIndexes" : {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate": false, "dbConn": "*default"},
133// "*attributeFilterIndexes" : {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate": false, "dbConn": "*default"},
134// "*chargerFilterIndexes" : {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate": false, "dbConn": "*default"},
135// "*rateProfileFilterIndexes" : {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate": false, "dbConn": "*default"},
136// "*rateFilterIndexes" : {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate": false, "dbConn": "*default"},
137// "*actionProfileFilterIndexes" : {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate": false, "dbConn": "*default"},
138// "*accountFilterIndexes" : {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate": false, "dbConn": "*default"},
139// "*reverseFilterIndexes" : {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate": false, "dbConn": "*default"},
140// "*cdrs": {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate":false, "dbConn": "*default"} // Compatible only for Internal, MySQL, Mongo and PostgresSQL databases
141// },
142// "opts":{
143// "internalDBDumpPath": "/var/lib/cgrates/internal_db/db", // the path where db will be dumped
144// "internalDBBackupPath": "/var/lib/cgrates/internal_db/backup/db", // default path taken by AdminSv1.Backupdb when "BackupFolderPath" is not provided
145// "internalDBStartTimeout": "5m", // the amount of wait time until timeout for DB startup
146// "internalDBDumpInterval": "1m", // dump db regularly to a file: "0" - disables it; "-1" - dump on each set/remove; <""|$dur>
147// "internalDBRewriteInterval": "1h", // rewrite dump files regularly: "0" - disables it; "-1" - rewrite on engine start; "-2" - rewrite on engine shutdown; <""|$dur>
148// "internalDBFileSizeLimit": "1GB", // maximum size that can be written in a singular dump file
149// "redisBatchSize": 1000, // COUNT size used in redis SCAN queries
150// "redisMaxConns": 10, // the connection pool size
151// "redisConnectAttempts": 20, // the maximum amount of dial attempts
152// "redisSentinel": "", // the name of sentinel when used
153// "redisCluster": false, // if enabled the db will try to connect to the redis cluster
154// "redisClusterSync": "5s", // the sync interval for the redis cluster
155// "redisClusterOndownDelay": "0", // the delay before executing the commands if the redis cluster is in the CLUSTERDOWN state
156// "redisConnectTimeout": "0", // the amount of wait time until timeout for a connection attempt
157// "redisReadTimeout": "0", // the amount of wait time until timeout for reading operations
158// "redisWriteTimeout": "0", // the amount of wait time until timeout for writing operations
159// "redisPoolPipelineWindow": "150µs", // duration after which internal pipelines are flushed (0 disables implicit pipelining)
160// "redisPoolPipelineLimit": 0, // maximum number of commands that can be pipelined before flushing (0 means no limit)
161// "redisTLS": false, // if true it will use a tls connection and use the redisClientCertificate, redisClientKey and redisCACertificate for tls connection
162// "redisClientCertificate": "", // path to client certificate
163// "redisClientKey": "", // path to client key
164// "redisCACertificate": "", // path to CA certificate (populate for self-signed certificate otherwise let it empty)
165// "mongoQueryTimeout": "10s", // timeout for query when mongo is used
166// "mongoConnScheme": "mongodb" // scheme for MongoDB connection <mongodb|mongodb+srv>
167// }
168// },
169
170// "listen": {
171// "rpcJSON": "127.0.0.1:2012", // RPC JSON listening address
172// "rpcGOB": "127.0.0.1:2013", // RPC GOB listening address
173// "http": "127.0.0.1:2080", // HTTP listening address
174// "rpcJSONtls" : "127.0.0.1:2022", // RPC JSON TLS listening address
175// "rpcGOBtls": "127.0.0.1:2023", // RPC GOB TLS listening address
176// "httpTLS": "127.0.0.1:2280" // HTTP TLS listening address
177// },
178
179// "tls": {
180// "serverCertificate" : "", // path to server certificate
181// "serverKey":"", // path to server key
182// "clientCertificate" : "", // path to client certificate
183// "clientKey":"", // path to client key
184// "caCertificate":"", // path to CA certificate (populate for self-signed certificate otherwise let it empty)
185// "serverPolicy":4, // serverPolicy determines the TLS Client Authentication (0-NoClientCert, 1-RequestClientCert, 2-RequireAnyClientCert, 3-VerifyClientCertIfGiven, 4-RequireAndVerifyClientCert)
186// "serverName":""
187// },
188
189
190// "http": { // HTTP server configuration
191// "jsonRPCurl": "/jsonrpc", // JSON RPC relative URL ("" to disable)
192// "registrarsURL": "/registrar", // registrar service relative URL
193// "wsURL": "/ws", // WebSockets relative URL ("" to disable)
194// "freeswitchCDRsURL": "/freeswitch_json", // Freeswitch CDRS relative URL ("" to disable)
195// "httpCDRs": "/cdr_http", // CDRS relative URL ("" to disable)
196// "pprofPath": "/debug/pprof/", // endpoint for serving runtime profiling data for pprof visualization
197// "useBasicAuth": false, // use basic authentication
198// "authUsers": {}, // basic authentication usernames and base64-encoded passwords (eg: { "username1": "cGFzc3dvcmQ=", "username2": "cGFzc3dvcmQy "})
199// "clientOpts":{
200// "skipTLSVerification": false, // if enabled Http Client will accept any TLS certificate
201// // the options to configure the http.Transport
202// "tlsHandshakeTimeout": "10s",
203// "disableKeepAlives": false,
204// "disableCompression": false,
205// "maxIdleConns": 100,
206// "maxIdleConnsPerHost": 2,
207// "maxConnsPerHost": 0,
208// "idleConnTimeout": "90s",
209// "responseHeaderTimeout": "0",
210// "expectContinueTimeout": "0",
211// "forceAttemptHttp2": true,
212// // the optins to configure the net.Dialer
213// "dialTimeout": "30s",
214// "dialFallbackDelay": "300ms",
215// "dialKeepAlive": "30s"
216// }
217// },
218
219// "caches":{
220// "partitions": {
221// "*resourceProfiles": {"limit": -1, "ttl": "", "staticTTL": false, "precache": false, "remote":false, "replicate": false}, // control resource profiles caching
222// "*resources": {"limit": -1, "ttl": "", "staticTTL": false, "precache": false, "remote":false, "replicate": false}, // control resources caching
223// "*eventResources": {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate": false}, // matching resources to events
224// "*statQueueProfiles": {"limit": -1, "ttl": "", "staticTTL": false, "precache": false, "remote":false, "replicate": false}, // statqueue profiles
225// "*statQueues": {"limit": -1, "ttl": "", "staticTTL": false, "precache": false, "remote":false, "replicate": false}, // statQueues with metrics
226// "*thresholdProfiles": {"limit": -1, "ttl": "", "staticTTL": false, "precache": false, "remote":false, "replicate": false}, // control threshold profiles caching
227// "*thresholds": {"limit": -1, "ttl": "", "staticTTL": false, "precache": false, "remote":false, "replicate": false}, // control thresholds caching
228// "*trendProfiles": {"limit": -1, "ttl": "", "staticTTL": false, "precache": false, "remote":false, "replicate": false}, // control threshold profiles caching
229// "*trends": {"limit": -1, "ttl": "", "staticTTL": false, "precache": false, "remote":false, "replicate": false}, // control thresholds caching
230// "*filters": {"limit": -1, "ttl": "", "staticTTL": false, "precache": false, "remote":false, "replicate": false}, // control filters caching
231// "*routeProfiles": {"limit": -1, "ttl": "", "staticTTL": false, "precache": false, "remote":false, "replicate": false}, // control route profile caching
232// "*attributeProfiles": {"limit": -1, "ttl": "", "staticTTL": false, "precache": false, "remote":false, "replicate": false}, // control attribute profile caching
233// "*chargerProfiles": {"limit": -1, "ttl": "", "staticTTL": false, "precache": false, "remote":false, "replicate": false}, // control charger profile caching
234// "*rateProfiles": {"limit": -1, "ttl": "", "staticTTL": false, "precache": false, "remote":false, "replicate": false}, // control rate profile caching
235// "*actionProfiles": {"limit": -1, "ttl": "", "staticTTL": false, "precache": false, "remote":false, "replicate": false}, // control action profile caching
236// "*accounts": {"limit": -1, "ttl": "", "staticTTL": false, "precache": false, "remote":false, "replicate": false}, // control account profile caching
237// "*resourceFilterIndexes" : {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate": false}, // control resource filter indexes caching
238// "*statFilterIndexes" : {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate": false}, // control stat filter indexes caching
239// "*thresholdFilterIndexes" : {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate": false}, // control threshold filter indexes caching
240// "*routeFilterIndexes" : {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate": false}, // control route filter indexes caching
241// "*attributeFilterIndexes" : {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate": false}, // control attribute filter indexes caching
242// "*rankingProfiles": {"limit": -1, "ttl": "", "staticTTL": false, "precache": false, "remote":false, "replicate": false}, // control ranking profile caching
243// "*rankings": {"limit": -1, "ttl": "", "staticTTL": false, "precache": false, "remote":false, "replicate": false}, // control rankings caching
244// "*chargerFilterIndexes" : {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate": false}, // control charger filter indexes caching
245// "*rateProfileFilterIndexes" : {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate": false}, // control rate profile filter indexes caching
246// "*rateFilterIndexes" : {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate": false}, // control rate filter indexes caching
247// "*actionProfileFilterIndexes" : {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate": false}, // control action profile filter indexes caching
248// "*accountFilterIndexes" : {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate": false}, // control coount profile filter indexes caching
249// "*reverseFilterIndexes" : {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate": false}, // control reverse filter indexes caching used only for set and remove filters
250// "*diameterMessages": {"limit": -1, "ttl": "3h", "staticTTL": false, "remote":false, "replicate": false}, // diameter messages caching
251// "*rpcResponses": {"limit": 0, "ttl": "2s", "staticTTL": false, "remote":false, "replicate": false}, // RPC responses caching
252// "*closedSessions": {"limit": -1, "ttl": "10s", "staticTTL": false, "remote":false, "replicate": false}, // closed sessions cached for CDRs
253// "*eventCharges": {"limit": 0, "ttl": "10s", "staticTTL": false, "remote":false, "replicate": false}, // events proccessed by ChargerS
254// "*cdrIDs": {"limit": -1, "ttl": "10m", "staticTTL": false, "remote":false, "replicate": false}, // protects CDRs against double-charging
255// "*loadIDs": {"limit": -1, "ttl": "", "staticTTL": false, "precache": false, "remote":false, "replicate": false}, // control the load_ids for items
256// "*rpcConnections": {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate": false}, // RPC connections caching
257// "*uch": {"limit": -1, "ttl": "3h", "staticTTL": false, "remote":false, "replicate": false}, // User cache
258// "*stir": {"limit": -1, "ttl": "3h", "staticTTL": false, "remote":false, "replicate": false}, // stirShaken cache keys
259// "*apiban":{"limit": -1, "ttl": "2m", "staticTTL": false, "remote":false, "replicate": false},
260// "*sentrypeer":{"limit": -1, "ttl": "24h", "staticTTL": true, "remote":false, "replicate": false},
261// "*capsEvents": {"limit": -1, "ttl": "", "staticTTL": false, "remote":false, "replicate": false}, // caps cached samples
262// "*replicationHosts": {"limit": 0, "ttl": "", "staticTTL": false, "remote":false, "replicate": false}, // the replication hosts cache(used when replicationFiltered is enbled)
263// },
264// "replicationConns": [],
265// "remoteConns": [] // the conns that are queried when the items are not found in cache
266// },
267
268
269// "filters": {
270// "stats_conns": [], // connections to StatS for <*stats> filters, empty to disable stats functionality: <""|*internal|$rpc_conns_id>
271// "resources_conns": [], // connections to ResourceS for <*resources> filters, empty to disable stats functionality: <""|*internal|$rpc_conns_id>
272// "accounts_conns": [], // connections to AccountS for <*accounts> filters, empty to disable stats functionality: <""|*internal|$rpc_conns_id>
273// "trends_conns": [], // connections to TrendS for <*trends> filters, empty to disable trends functionality: <""|*internal|$rpc_conns_id>
274// "rankings_conns": [] // connections to RankingS for <*rankings> filters, empty to disable rankings functionality: <""|*internal|$rpc_conns_id>
275// },
276
277
278
279// "cdrs": {
280// "enabled": false, // start the CDR Server: <true|false>
281// "extraFields": [], // extra fields to store in CDRs for non-generic CDRs (ie: FreeSWITCH JSON)
282// "sessionCostRetries": 5, // number of queries to session_costs before recalculating CDR
283// "chargers_conns": [], // connection to ChargerS for CDR forking, empty to disable billing for CDRs: <""|*internal|$rpc_conns_id>
284// "attributes_conns": [], // connection to AttributeS for altering *raw CDRs, empty to disable attributes functionality: <""|*internal|$rpc_conns_id>
285// "thresholds_conns": [], // connection to ThresholdS for CDR reporting, empty to disable thresholds functionality: <""|*internal|$rpc_conns_id>
286// "stats_conns": [], // connections to StatS for CDR reporting, empty to disable stats functionality: <""|*internal|$rpc_conns_id>
287// "onlineCDRExports":[], // list of CDRE profiles to use for real-time CDR exports
288// "actionsConns": [], // connections to SchedulerS in case of *dynaprepaid request
289// "eesConns": [], // connections to EventExporter
290// "rates_conns": [], // connections to RateS
291// "accounts_conns": [], // connections to AccountS
292// "opts": {
293// // "*accounts": [
294// // {
295// // "tenant": "*any",
296// // "filterIDs": [],
297// // "value": "false"
298// // }
299// // ],
300// // "*attributes": [
301// // {
302// // "tenant": "*any",
303// // "filterIDs": [],
304// // "value": false
305// // }
306// // ],
307// // "*chargers": [
308// // {
309// // "tenant": "*any",
310// // "filterIDs": [],
311// // "value": "false"
312// // }
313// // ],
314// // "*ees": [
315// // {
316// // "tenant": "*any",
317// // "filterIDs": [],
318// // "value": "false"
319// // }
320// // ],
321// // "*rates": [
322// // {
323// // "tenant": "*any",
324// // "filterIDs": [],
325// // "value": "false"
326// // }
327// // ],
328// // "*stats": [
329// // {
330// // "tenant": "*any",
331// // "filterIDs": [],
332// // "value": "false"
333// // }
334// // ],
335// // "*thresholds": [
336// // {
337// // "tenant": "*any",
338// // "filterIDs": [],
339// // "value": "false"
340// // }
341// // ],
342// // "*refund": [
343// // {
344// // "tenant": "*any",
345// // "filterIDs": [],
346// // "value": "false"
347// // }
348// // ],
349// // "*rerate": [
350// // {
351// // "tenant": "*any",
352// // "filterIDs": [],
353// // "value": "false"
354// // }
355// // ],
356// // "*store": [
357// // {
358// // "tenant": "*any",
359// // "filterIDs": [],
360// // "value": "true"
361// // }
362// // ]
363// }
364// },
365
366
367// "ers": { // EventReaderService
368// "enabled": false, // starts the EventReader service: <true|false>
369// "sessions_conns":["*internal"], // RPC Connections IDs
370// // "eesConns": [], // connection for routing processed and invalid messages through EEs
371// "partialCacheTTL": "1s", // the duration to cache partial records when not pairing
372// "readers": [
373// {
374// "id": "*default", // identifier of the EventReader profile
375// "type": "*none", // reader type <*fileCSV>
376// "runDelay": "0", // sleep interval in seconds between consecutive runs, -1 to use automation via inotify or 0 to disable running all together
377// "concurrentRequests": 1024, // maximum simultaneous requests/files to process, 0 for unlimited
378// "sourcePath": "/var/spool/cgrates/ers/in", // read data from this path
379// "processedPath": "/var/spool/cgrates/ers/out", // move processed data here
380// "tenant": "", // tenant used by import
381// "timezone": "", // timezone for timestamps where not specified <""|UTC|Local|$IANA_TZ_DB>
382// // "eesSuccessIDs": [], // ids of exporters used for moving the successfully processed event
383// // "eesFailedIDs": [], // ids of exporters used for moving the unprocessed event
384// "filters": [], // limit parsing based on the filters
385// "flags": [], // flags to influence the event processing
386// "reconnects": -1, // number of retries in case of connection lost
387// "maxReconnectInterval": "5m", // time to wait in between reconnect attempts
388// "opts": {
389// // Partial
390// // "partialPath": "/", // the path were the partial events will be sent
391// "partialCacheAction": "*none", // the action that will be executed for the partial CSVs that are not matched<*none|*postCDR|*dumpToFile>
392// "partialOrderField": "~*req.AnswerTime",// the field after what the events are order when merged
393// // "partialcsvFieldSeparator": "," // separator used when dumping the fields
394
395// // FileCSV
396// "csvRowLength": 0, // Number of fields from csv file
397// "csvFieldSeparator": ",", // separator used when reading the fields
398// "csvHeaderDefineChar": ":", // the starting character for header definition used in case of CSV files
399// // "csvLazyQuotes": false, // if a quote may appear in an unquoted field and a non-doubled quote may appear in a quoted field
400
401// // FileXML
402// // "xmlRootPath": "", // path towards one event in case of XML CDRs
403
404// // AMQP and AMQPv1
405// // "amqpQueueID": "cgrates_cdrs", // identifier for the primary queue where messages are consumed (0.9.1/1.0)
406// // "amqpUsername": "", // username for SASL PLAIN auth, exclusive to AMQP 1.0, often representing the policy name
407// // "amqpPassword": "", // password for authentication, exclusive to AMQP 1.0
408// // "amqpConsumerTag": "cgrates", // unique tag for the consumer, useful for message tracking and consumer management (0.9.1)
409// // "amqpExchange": "", // name of the primary exchange where messages will be published (0.9.1)
410// // "amqpExchangeType": "", // type of the primary exchange (direct, topic, fanout, headers) (0.9.1)
411// // "amqpRoutingKey": "", // key used for routing messages to the primary queue (0.9.1)
412
413// // Kafka
414// // "kafkaTopic": "cgrates", // the topic from were the events are read
415// // "kafkaLinger": "10ms", // how long to wait for more records before sending a batch
416// // "kafkaGroupID": "cgrates", // the group that reads the events
417// // "kafkaMaxWait": "1ms", // the maximum amount of time to wait for new data to come
418// // "kafkaTLS": false, // if set to true it will try to authenticate the server
419// // "kafkaCAPath": "",
420// // "kafkaSkipTLSVerify": false,
421
422// // SQL
423// // "sqlDBName": "cgrates", // the name of the database from were the events are read
424// // "sqlTableName": "cdrs", // the name of the table from were the events are read
425// // "pgSSLMode": "disable", // the ssl mode for postgres db
426
427// // SQS and S3
428// // "awsRegion": "",
429// // "awsKey": "",
430// // "awsSecret": "",
431// // "awsToken": "",
432
433// // SQS
434// // "sqsQueueID": "cgrates_cdrs", // the queue id for SQS readers from were the events are read
435
436// // S3
437// // "s3BucketID": "cgrates_cdrs", // the bucket id for S3 readers from were the events are read
438
439// // nats
440// // "natsJetStream": false, // controls if the nats reader uses the JetStream
441// // "natsConsumerName": "cgrates", // in case of JetStream the name of the consumer
442// // "natsStreamName": "cdrs", // the name of the NATS JetStream stream from which the consumer will read messages
443// "natsSubject": "cgrates_cdrs", // the subject from were the events are read
444// // "natsQueueID": "", // the queue id the consumer listen to
445// // "natsJWTFile": "", // the path to the JWT file( can be the chained file or the user file)
446// // "natsSeedFile": "", // the path to the seed files( if the JWT file is mention this is used as seedFile for the JWT user mentioned above)
447// // "natsCertificateAuthority": "", // the path to a custom certificate authority file( used by tls)
448// // "natsClientCertificate": "", // the path to a client certificate( used by tls)
449// // "natsClientKey": "", // the path to a client key( used by tls)
450// // "natsJetStreamMaxWait": "5s" // the maximum amount of time to wait for a response
451// },
452// "fields":[ // import fields template, tag will match internally CDR field, in case of .csv value will be represented by index of the field value
453// {"tag": "ToR", "path": "*cgreq.ToR", "type": "*variable", "value": "~*req.2", "mandatory": true},
454// {"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable", "value": "~*req.3", "mandatory": true},
455// {"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*variable", "value": "~*req.4", "mandatory": true},
456// {"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*variable", "value": "~*req.6", "mandatory": true},
457// {"tag": "Category", "path": "*cgreq.Category", "type": "*variable", "value": "~*req.7", "mandatory": true},
458// {"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.8", "mandatory": true},
459// {"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable", "value": "~*req.9", "mandatory": true},
460// {"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.10", "mandatory": true},
461// {"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable", "value": "~*req.11", "mandatory": true},
462// {"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.12", "mandatory": true},
463// {"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable", "value": "~*req.13", "mandatory": true}
464// ],
465// "partialCommitFields": [],
466// "cacheDumpFields": []
467// }
468// ]
469// },
470
471// "efs": {
472// "enabled": false, // starts the EventReader service: <true|false>
473// "posterAttempts": 3, // number of attempts before considering post request failed (eg: *httpPost, CDR exports)
474// "failedPostsDir": "/var/spool/cgrates/failed_posts", // directory path where we store failed requests
475// "failedPostsTTL": "5s" // time to wait before writing the failed posts in a single file
476// },
477
478// "ees": {
479// "enabled": false, // starts the EventReader service: <true|false>
480// "attributes_conns":[], // RPC Connections IDs
481// "cache": {
482// "*fileCSV": {"limit": -1, "ttl": "5s", "staticTTL": false}
483// },
484// "exporters": [
485// {
486// "id": "*default", // identifier of the EventReader profile
487// "type": "*none", // exporter type
488// "exportPath": "/var/spool/cgrates/ees", // path where the exported events will be placed
489// "failedPostsDir": "/var/spool/cgrates/failed_posts", // directory path where we store failed requests
490// "concurrentRequests": 0, // maximum simultaneous requests to process, 0 for unlimited
491// "timezone": "", // timezone for timestamps where not specified <""|UTC|Local|$IANA_TZ_DB>
492// "efsConns": ["*internal"], // connID to efs service
493// "filters": [], // limit parsing based on the filters
494// "flags": [], // flags to influence the event processing
495// "attributeIDs": [], // select Attribute profiles instead of discovering them
496// "attributeContext": "", // context used to discover matching Attribute profiles
497// "synchronous": false, // block processing until export has a result
498// "blocker": false, // stops the processing of the following exporters
499// "attempts": 1, // export attempts
500// "opts": { // extra options for exporter
501
502// // CSV
503// // "csvFieldSeparator": ",", // separator used when reading the fields
504
505
506// // Elasticsearch options
507// // "elsApiKey": "", // Base64-encoded token for authorization; if set, overrides username/password and service token.
508// // "elsUsername":"", // Username for HTTP Basic Authentication.
509// // "elsPassword":"", // Password for HTTP Basic Authentication.
510// // "elsServiceToken":"" // Service token for authorization; if set, overrides username/password.
511// // "elsCertificateFingerPrint":"" // SHA256 hex fingerprint given by Elasticsearch on first launch.
512// // "elsDiscoverNodesOnStart":false, // Discover nodes when initializing the client. Default: false.
513// // "elsDiscoverNodesInterval":"10s", // Discover nodes periodically. Default: disabled.
514// // "elsEnableDebugLogger":"false", // Enable the debug logging.
515// // "elsLogger":"", // The logger type can either be elsJson,elsColor and elsText
516// // "elsCompressRequestBody":false, // Enable compression on requests
517// // "elsCompressRequestBodyLevel":0, // Default: gzip.DefaultCompression, 9:BestCompression,-2:HuffmanOnly,1:BestSpeed
518// // "elsRetryOnStatus":[], // List of status codes for retry. Default: 502, 503, 504.
519// // "elsMaxRetries": 0, // Default: 3.
520// // "elsDisableRetry": false, // Default: false.
521// // "elsIndex": "", // target elasticsearch index
522// // "elsRefresh": "false", // controls when changes become searchable <true|false|wait_for>
523// // "elsOpType": "index", // operation type <index|create>
524// // "elsPipeline": "", // name of the ingest pipeline to use
525// // "elsRouting": "", // custom routing value for document storage
526// // "elsTimeout": "1m", // maximum time to wait for operation
527// // "elsWaitForActiveShards": "1", // number of shard copies required before indexing (default: 1)
528
529
530
531// // SQL
532// // "sqlMaxIdleConns": 0, // SQLMaxIdleConns
533// // "sqlMaxOpenConns": 0, // SQLMaxOpenConns
534// // "sqlConnMaxLifetime": "0", // SQLConnMaxLifetime
535// // "mysqlDSNParams": {}, // DSN params
536
537
538// // "sqlTableName":"cdrs", // the name of the table from where the events are exported
539// // "sqlDBName": "cgrates", // the name of the database from where the events are exported
540// // "pgSSLMode": "disable", // the postgresSSLMode for postgres
541
542
543// // Kafka
544// // "kafkaTopic": "cgrates", // the topic from where the events are exported
545// // "kafkaTLS": false, // if set to true it will try to authenticate the server
546// // "kafkaCAPath": "", // path to certificate authority pem file
547// // "kafkaSkipTLSVerify": false, // if set to true it will skip certificate verification
548
549
550// // AMQP
551// // "amqpQueueID": "cgrates_cdrs", // the queue id for AMQP exporters from were the events are exported
552// // "amqpRoutingKey": "", // RoutingKey, amqp 0.9.1 exclusive
553// // "amqpExchange": "", // Exchange, amqp 0.9.1 exclusive
554// // "amqpExchangeType": "", // ExchangeType, amqp 0.9.1 exclusive
555// // "amqpUsername": "", // amqp 1.0 exclusive, used for SASL PLAIN auth, usually represents the policy name
556// // "amqpPassword": "", // amqp 1.0 exclusive, used for SASL PLAIN auth, populated with one of its policy's keys
557
558
559// // SQS and S3
560// // "awsRegion": "", // AWSRegion
561// // "awsKey": "", // AWSKey
562// // "awsSecret": "", // AWSSecret
563// // "awsToken": "", // AWSToken
564
565// //SQS
566// // "sqsQueueID": "cgrates_cdrs", // the queue id for SQS exporters from were the events are exported
567
568// // S3
569// // "s3BucketID": "cgrates_cdrs", // the bucket id for S3 readers from where the events that are exported
570// // "s3FolderPath": "", // S3FolderPath
571
572// // Nats
573// // "natsJetStream": false, // controls if the nats poster uses the JetStream
574// // "natsSubject": "cgrates_cdrs", // the subject were the events are exported
575// // "natsJWTFile": "", // the path to the JWT file( can be the chained file or the user file)
576// // "natsSeedFile": "", // the path to the seed files( if the JWT file is mention this is used as seedFile for the JWT user mentioned above)
577// // "natsCertificateAuthority": "", // the path to a custom certificate authority file( used by tls)
578// // "natsClientCertificate": "", // the path to a client certificate( used by tls)
579// // "natsClientKey": "", // the path to a client key( used by tls)
580// // "natsJetStreamMaxWait": "5s", // the maximum amount of time to wait for a response
581
582// //RPC
583// // "rpcCodec": "", // for compression, encoding and decoding <internalRPC | BIRPC | JSON/HTTP/GOB>
584// // "serviceMethod": "", // the method that should be called trough RPC
585// // "keyPath": "" , // path to server key
586// // "certPath": "", // path to client certificate
587// // "caPath": "", // path to CA certificate
588// // "tls": false,
589// // "connIDs": [], // connections for connManager to this exporter
590// // "rpcConnTimeout" : "1s", // connection unsuccesfull on timeout
591// // "rpcReplyTimeout":"2s", // connection down at replies if taking longer that this value
592// // "rpcAPIOpts": {} // opts that will be passed within APIOpts
593// },
594// "fields":[] // import fields template, tag will match internally CDR field, in case of .csv value will be represented by index of the field value
595// }
596// ]
597// },
598
599
600// "sessions": {
601// "enabled": false, // starts the session service: <true|false>
602// "listenBiJSON": "127.0.0.1:2014", // address where to listen for bidirectional JSON-RPC requests
603// "listenBiGob": "", // address where to listen for bidirectional GOB-RPC requests
604// "chargers_conns": [], // connections to ChargerS for session forking <""|*internal|$rpc_conns_id>
605// "cdrs_conns": [], // connections to CDRs for CDR posting <""|*internal|$rpc_conns_id>
606// "resources_conns": [], // connections to ResourceS for resources monitoring <""|*internal|$rpc_conns_id>
607// "thresholds_conns": [], // connections to ThresholdS for reporting session events <""|*internal|$rpc_conns_id>
608// "stats_conns": [], // connections to StatS for reporting session events <""|*internal|$rpc_conns_id>
609// "routes_conns": [], // connections to RouteS for querying routes for event <""|*internal|$rpc_conns_id>
610// "attributes_conns": [], // connections to AttributeS for altering event fields <""|*internal|$rpc_conns_id>
611// "replicationConns": [], // replicate sessions towards these session services
612// "debitInterval": "0s", // interval to perform debits on.
613// "storeSessionCosts": false, // enable storing of the session costs within CDRs
614// "defaultUsage":{ // the usage if the event is missing the usage field
615// "*any": "3h",
616// "*voice": "3h",
617// "*data": "1048576",
618// "*sms": "1"
619// },
620// "sessionTTL": "0s", // time after a session with no updates is terminated, not defined by default
621// //"sessionTTLMaxDelay": "", // activates sessionTTL randomization and limits the maximum possible delay
622// //"sessionTTLLastUsed": "", // tweak LastUsed for sessions timing-out, not defined by default
623// //"sessionTTLUsage": "", // tweak Usage for sessions timing-out, not defined by default
624// //"sessionLastUsage": "", // tweak LastUsage for session timing-out, not defined by default
625// "sessionIndexes": [], // index sessions based on these fields for GetActiveSessions API
626// "clientProtocol": 1.0, // version of protocol to use when acting as JSON-PRC client <"0","1.0">
627// "channelSyncInterval": "0", // sync channels to detect stale sessions (0 to disable)
628// "terminateAttempts": 5, // attempts to get the session before terminating it
629// "alterableFields": [], // the session fields that can be updated
630// //"minDurLowBalance": "5s", // threshold which will trigger low balance warnings for prepaid calls (needs to be lower than debitInterval)
631// "stir": {
632// "allowedAttest": ["*any"], // the default attest for stir/shaken authentication <*any|A|B|C>
633// "payloadMaxduration": "-1", // the duration that stir header is valid after it was created
634// "defaultAttest": "A", // the default attest level if not mentioned in API
635// "publicKeyPath": "", // the path to the public key
636// "privateKeyPath": "", // the path to the private key
637// },
638// "actionsConns": [], // connections to SchedulerS in case of *dynaprepaid request
639// "rates_conns": [], // connections to RateS
640// "accounts_conns": [], // connections to AccountS
641// "opts": {
642// // "*accounts": [
643// // {
644// // "tenant": "*any",
645// // "filterIDs": [],
646// // "value": false
647// // }
648// // ],
649// // "*attributes": [
650// // {
651// // "tenant": "*any",
652// // "filterIDs": [],
653// // "value": false
654// // }
655// // ],
656// // "*cdrs": [
657// // {
658// // "tenant": "*any",
659// // "filterIDs": [],
660// // "value": false
661// // }
662// // ],
663// // "*chargers": [
664// // {
665// // "tenant": "*any",
666// // "filterIDs": [],
667// // "value": false
668// // }
669// // ],
670// // "*resources": [
671// // {
672// // "tenant": "*any",
673// // "filterIDs": [],
674// // "value": false
675// // }
676// // ],
677// // "*routes": [
678// // {
679// // "tenant": "*any",
680// // "filterIDs": [],
681// // "value": false
682// // }
683// // ],
684// // "*stats": [
685// // {
686// // "tenant": "*any",
687// // "filterIDs": [],
688// // "value": false
689// // }
690// // ],
691// // "*thresholds": [
692// // {
693// // "tenant": "*any",
694// // "filterIDs": [],
695// // "value": false
696// // }
697// // ],
698// // "*initiate": [
699// // {
700// // "tenant": "*any",
701// // "filterIDs": [],
702// // "value": false
703// // }
704// // ],
705// // "*update": [
706// // {
707// // "tenant": "*any",
708// // "filterIDs": [],
709// // "value": false
710// // }
711// // ],
712// // "*terminate": [
713// // {
714// // "tenant": "*any",
715// // "filterIDs": [],
716// // "value": false
717// // }
718// // ],
719// // "*message": [
720// // {
721// // "tenant": "*any",
722// // "filterIDs": [],
723// // "value": false
724// // }
725// // ],
726// // "*attributesDerivedReply": [
727// // {
728// // "tenant": "*any",
729// // "filterIDs": [],
730// // "value": false
731// // }
732// // ],
733// // "*blockerError": [
734// // {
735// // "tenant": "*any",
736// // "filterIDs": [],
737// // "value": false
738// // }
739// // ],
740// // "*cdrsDerivedReply": [
741// // {
742// // "tenant": "*any",
743// // "filterIDs": [],
744// // "value": false
745// // }
746// // ],
747// // "*resourcesAuthorize": [
748// // {
749// // "tenant": "*any",
750// // "filterIDs": [],
751// // "value": false
752// // }
753// // ],
754// // "*resourcesAllocate": [
755// // {
756// // "tenant": "*any",
757// // "filterIDs": [],
758// // "value": false
759// // }
760// // ],
761// // "*resourcesRelease": [
762// // {
763// // "tenant": "*any",
764// // "filterIDs": [],
765// // "value": false
766// // }
767// // ],
768// // "*resourcesDerivedReply": [
769// // {
770// // "tenant": "*any",
771// // "filterIDs": [],
772// // "value": false
773// // }
774// // ],
775// // "*routesDerivedReply": [
776// // {
777// // "tenant": "*any",
778// // "filterIDs": [],
779// // "value": false
780// // }
781// // ],
782// // "*statsDerivedReply": [
783// // {
784// // "tenant": "*any",
785// // "filterIDs": [],
786// // "value": false
787// // }
788// // ],
789// // "*thresholdsDerivedReply": [
790// // {
791// // "tenant": "*any",
792// // "filterIDs": [],
793// // "value": false
794// // }
795// // ],
796// // "*maxUsage": [
797// // {
798// // "tenant": "*any",
799// // "filterIDs": [],
800// // "value": false
801// // }
802// // ],
803// // "*forceDuration": [
804// // {
805// // "tenant": "*any",
806// // "filterIDs": [],
807// // "value": false
808// // }
809// // ],
810// // "*ttl": [
811// // {
812// // "tenant": "*any",
813// // "filterIDs": [],
814// // "value": ""
815// // }
816// // ],
817// // "*chargeable": [
818// // {
819// // "tenant": "*any",
820// // "filterIDs": [],
821// // "value": false
822// // }
823// // ],
824// // "*ttlLastUsage": [
825// // {
826// // "tenant": "*any",
827// // "filterIDs": [],
828// // "value": ""
829// // }
830// // ],
831// // "*ttlLastUsed": [
832// // {
833// // "tenant": "*any",
834// // "filterIDs": [],
835// // "value": ""
836// // }
837// // ],
838// // "*debitInterval": [
839// // {
840// // "tenant": "*any",
841// // "filterIDs": [],
842// // "value": ""
843// // }
844// // ],
845// // "*ttlMaxDelay": [
846// // {
847// // "tenant": "*any",
848// // "filterIDs": [],
849// // "value": ""
850// // }
851// // ],
852// // "*ttlUsage": [
853// // {
854// // "tenant": "*any",
855// // "filterIDs": [],
856// // "value": ""
857// // }
858// // ]
859// }
860// },
861
862
863// "asteriskAgent": {
864// "enabled": false, // starts the Asterisk agent: <true|false>
865// "sessions_conns": ["*birpc_internal"],
866// "createCDR": false, // create CDR out of events and sends it to CDRS component
867// "asteriskConns":[ // instantiate connections to multiple Asterisk servers
868// {
869// "address": "127.0.0.1:8088",
870// "user": "cgrates",
871// "password": "CGRateS.org",
872// "connectAttempts": 3,
873// "reconnects": 5,
874// "maxReconnectInterval": ""
875// }
876// ]
877// },
878
879
880// "freeswitchAgent": {
881// "enabled": false, // starts the FreeSWITCH agent: <true|false>
882// "sessions_conns": ["*birpc_internal"],
883// "subscribePark": true, // subscribe via fsock to receive park events
884// "createCDR": false, // creates CDR out of events and sends them to CDRS component
885// "extraFields": [], // extra fields to store in auth/CDRs when creating them
886// "lowBalanceAnnFile": "", // file to be played when low balance is reached for prepaid calls
887// "emptyBalanceContext": "", // if defined, prepaid calls will be transferred to this context on empty balance
888// "emptyBalanceAnnFile": "", // file to be played before disconnecting prepaid calls on empty balance (applies only if no context defined)
889// "maxWaitConnection": "2s", // maximum duration to wait for a connection to be retrieved from the pool
890// "activeSessionDelimiter": ",", // delimiter for 'show channels' responses and requests
891// "eventSocketConns":[ // instantiate connections to multiple FreeSWITCH servers
892// {
893// "address": "127.0.0.1:8021", // FreeSWITCH server address and port
894// "password": "ClueCon", // authentication password for FreeSWITCH
895// "reconnects": 5, // max reconnect attempts before giving up ("-1" for no limit)
896// "maxReconnectInterval": "", // max time between reconnects ("0" for no limit)
897// "replyTimeout": "1m", // max wait time for FreeSWITCH replies
898// "alias": ""
899// }
900// ]
901// },
902
903
904// "kamailioAgent": {
905// "enabled": false, // starts Kamailio agent: <true|false>
906// "sessions_conns": ["*birpc_internal"],
907// "createCDR": false, // create CDR out of events and sends them to CDRS component
908// "timezone": "", // timezone of the Kamailio server
909// "evapiConns":[ // instantiate connections to multiple Kamailio servers
910// {
911// "address": "127.0.0.1:8448",
912// "reconnects": 5,
913// "maxReconnectInterval": ""
914// }
915// ]
916// },
917
918
919// "diameterAgent": {
920// "enabled": false, // enables the diameter agent: <true|false>
921// "listeners": [
922// {
923// "address": "127.0.0.1:3868", // address where to listen for diameter requests <x.y.z.y:1234>
924// "network": "tcp" // transport type for diameter <tcp|sctp>
925// }
926// ],
927// "dictionariesPath": "/usr/share/cgrates/diameter/dict/", // path towards directory holding additional dictionaries to load
928// "dictionariesAppendDefaults": true, // if true, dictionaries from the provided path will be appended to the default dictionaries from the go-diameter library
929// "sessions_conns": ["*birpc_internal"],
930// "originHost": "CGR-DA", // diameter Origin-Host AVP used in replies
931// "originRealm": "cgrates.org", // diameter Origin-Realm AVP used in replies
932// "vendorID": 0, // diameter Vendor-Id AVP used in replies
933// "productName": "CGRateS", // diameter Product-Name AVP used in replies
934// "syncedConnRequests": false, // process one request at the time per connection
935// "asrTemplate": "", // enable AbortSession message being sent to client on DisconnectSession
936// "rarTemplate": "", // template used to build the Re-Auth-Request
937// "forcedDisconnect": "*none", // the request to send to diameter on DisconnectSession <*none|*asr|*rar>
938// "requestProcessors": [] // list of processors to be applied to diameter messages
939// },
940
941
942// "radiusAgent": {
943// "enabled": false, // enables the radius agent: <true|false>
944// "listenNet": "udp", // network to listen on <udp|tcp>
945// "listen_auth": "127.0.0.1:1812", // address where to listen for radius authentication requests <x.y.z.y:1234>
946// "listen_acct": "127.0.0.1:1813", // address where to listen for radius accounting requests <x.y.z.y:1234>
947// "clientSecrets": { // hash containing secrets for clients connecting here <*default|$client_ip>
948// "*default": "CGRateS.org"
949// },
950// "clientDictionaries": { // per client path towards directory holding additional dictionaries to load (extra to RFC)
951// "*default": "/usr/share/cgrates/radius/dict/", // key represents the client IP or catch-all <*default|$client_ip>
952// },
953// "sessions_conns": ["*internal"],
954// "requestProcessors": [] // request processors to be applied to Radius messages
955// },
956
957
958// "httpAgent": [], // HTTP Agents, ie towards cnc.to MVNE platform
959
960
961// "dnsAgent": {
962// "enabled": false, // enables the DNS agent: <true|false>
963// "listeners":[
964// {
965// "address": "127.0.0.1:53", // address where to listen for DNS requests <x.y.z.y:1234>
966// "network": "udp" // network to listen on <udp|tcp|tcp-tls>
967// }
968// ],
969// "sessions_conns": ["*internal"],
970// "timezone": "", // timezone of the events if not specified <UTC|Local|$IANA_TZ_DB>
971// "requestProcessors": [] // request processors to be applied to DNS messages
972// },
973
974
975// "attributes": {
976// "enabled": false, // starts attribute service: <true|false>
977// "stats_conns": [], // connections to StatS, empty to disable: <""|*internal|$rpc_conns_id>
978// "resources_conns": [], // connections to ResourceS, empty to disable: <""|*internal|$rpc_conns_id>
979// "accounts_conns": [], // connections to AccountS, empty to disable: <""|*internal|$rpc_conns_id>
980// "indexedSelects": true, // enable profile matching exclusively on indexes
981// //"stringIndexedFields": [], // query indexes based on these fields for faster processing
982// "prefixIndexedFields": [], // query indexes based on these fields for faster processing
983// "suffixIndexedFields": [], // query indexes based on these fields for faster processing
984// "existsIndexedFields": [], // query indexes based on these fields for faster processing
985// "notExistsIndexedFields": [], // query indexes based on these fields for faster processing
986// "nestedFields": false, // determines which field is checked when matching indexed filters(true: all; false: only the one on the first level)
987// "opts":{
988// // "*profileIDs": [
989// // {
990// // "tenant": "*any",
991// // "filterIDs": [],
992// // "connIDs": []
993// // }
994// // ],
995// // "*processRuns": [ // number of run loops when processing event
996// // {
997// // "tenant": "*any",
998// // "filterIDs": [],
999// // "value": "1"
1000// // }
1001// // ],
1002// // "*profileRuns": [ // number of runs a profile will process during the event
1003// // {
1004// // "tenant": "*any",
1005// // "filterIDs": [],
1006// // "value": 0
1007// // }
1008// // ],
1009// // "*profileIgnoreFilters": [ // ignore the filters for attributeIDs
1010// // {
1011// // "tenant": "*any",
1012// // "filterIDs": [],
1013// // "value": false
1014// // }
1015// // ]
1016// }
1017// },
1018
1019
1020// "chargers": {
1021// "enabled": false, // starts charger service: <true|false>
1022// "attributes_conns": [], // connections to AttributeS for event fields altering <""|127.0.0.1:2013>
1023// "indexedSelects": true, // enable profile matching exclusively on indexes
1024// //"stringIndexedFields": [], // query indexes based on these fields for faster processing
1025// "prefixIndexedFields": [], // query indexes based on these fields for faster processing
1026// "suffixIndexedFields": [], // query indexes based on these fields for faster processing
1027// "existsIndexedFields": [], // query indexes based on these fields for faster processing
1028// "notExistsIndexedFields": [], // query indexes based on these fields for faster processing
1029// "nestedFields": false // determines which field is checked when matching indexed filters(true: all; false: only the one on the first level)
1030// },
1031
1032
1033// "resources": {
1034// "enabled": false, // starts ResourceLimiter service: <true|false>
1035// "storeInterval": "", // dump cache regularly to DB, 0 - dump at start/shutdown: <""|$dur>
1036// "thresholds_conns": [], // connections to ThresholdS for resource reporting, empty to disable thresholds functionality: <""|*internal|$rpc_conns_id>
1037// "indexedSelects": true, // enable profile matching exclusively on indexes
1038// //"stringIndexedFields": [], // query indexes based on these fields for faster processing
1039// "prefixIndexedFields": [], // query indexes based on these fields for faster processing
1040// "suffixIndexedFields": [], // query indexes based on these fields for faster processing
1041// "existsIndexedFields": [], // query indexes based on these fields for faster processing
1042// "notExistsIndexedFields": [], // query indexes based on these fields for faster processing
1043// "nestedFields": false, // determines which field is checked when matching indexed filters(true: all; false: only the one on the first level)
1044// "opts":{
1045// // "*usageID": [
1046// // {
1047// // "tenant": "*any",
1048// // "filterIDs": [],
1049// // "value": ""
1050// // }
1051// // ],
1052// // "*usageTTL": [
1053// // {
1054// // "tenant": "*any",
1055// // "filterIDs": [],
1056// // "value": "72h"
1057// // }
1058// // ],
1059// // "*units": [
1060// // {
1061// // "tenant": "*any",
1062// // "filterIDs": [],
1063// // "value": 1
1064// // }
1065// // ]
1066// }
1067// },
1068
1069
1070// "stats": {
1071// "enabled": false, // starts Stat service: <true|false>
1072// "storeInterval": "", // dump cache regularly to DB, 0 - dump at start/shutdown: <""|$dur>
1073// "storeUncompressedLimit": 0, // used to compress data
1074// "thresholds_conns": [], // connections to ThresholdS for StatUpdates, empty to disable thresholds functionality: <""|*internal|$rpc_conns_id>
1075// "eesConns": [], // connections to EEs for StatUpdates, empty to disable export functionality: <""|*internal|$rpc_conns_id>
1076// "eesExporterIDs": [], // list of EventExporter profiles to use for real-time StatUpdate exports
1077// "indexedSelects": true, // enable profile matching exclusively on indexes
1078// //"stringIndexedFields": [], // query indexes based on these fields for faster processing
1079// "prefixIndexedFields": [], // query indexes based on these fields for faster processing
1080// "suffixIndexedFields": [], // query indexes based on these fields for faster processing
1081// "existsIndexedFields": [], // query indexes based on these fields for faster processing
1082// "notExistsIndexedFields": [], // query indexes based on these fields for faster processing
1083// "nestedFields": false, // determines which field is checked when matching indexed filters(true: all; false: only the one on the first level)
1084// "opts": {
1085// // "*profileIDs": [
1086// // {
1087// // "tenant": "*any",
1088// // "filterIDs": [],
1089// // "connIDs": []
1090// // }
1091// // ],
1092// // "*profileIgnoreFilters": [ // ignore the filters for statIDs
1093// // {
1094// // "tenant": "*any",
1095// // "filterIDs": [],
1096// // "value": false
1097// // }
1098// // ],
1099// // "*roundingDecimals": [ // ignore the filters for statIDs
1100// // {
1101// // "tenant": "*any",
1102// // "filterIDs": [],
1103// // "value": 5
1104// // }
1105// // ]
1106// }
1107// },
1108
1109
1110// "thresholds": {
1111// "enabled": false, // starts ThresholdS service: <true|false>
1112// "storeInterval": "", // dump cache regularly to DB, 0 - dump at start/shutdown: <""|$dur>
1113// "indexedSelects": true, // enable profile matching exclusively on indexes
1114// //"stringIndexedFields": [], // query indexes based on these fields for faster processing
1115// "prefixIndexedFields": [], // query indexes based on these fields for faster processing
1116// "suffixIndexedFields": [], // query indexes based on these fields for faster processing
1117// "existsIndexedFields": [], // query indexes based on these fields for faster processing
1118// "notExistsIndexedFields": [], // query indexes based on these fields for faster processing
1119// "nestedFields": false, // determines which field is checked when matching indexed filters(true: all; false: only the one on the first level)
1120// "actionsConns": [], // connections to ActionS to execute the actions
1121// "opts":{
1122// // "*thresholdsIDs": [
1123// // {
1124// // "tenant": "*any",
1125// // "filterIDs": [],
1126// // "connIDs": []
1127// // }
1128// // ],
1129// // "*profileIgnoreFilters": [ // ignore the filters for thresholdIDs
1130// // {
1131// // "tenant": "*any",
1132// // "filterIDs": [],
1133// // "value": false
1134// // }
1135// // ]
1136// }
1137// },
1138
1139
1140// "trends":{
1141// "enabled": false, // starts TrendS service: <true|false>.
1142// "storeInterval": "", // dump cache regularly to DB, 0 - dump at start/shutdown: <""|$dur>
1143// "storeUncompressedLimit": 0, // used to compress metrics
1144// "stats_conns": [], // connections to StatS ,empty to disable stats functionality: <""|*internal|$rpc_conns_id>
1145// "scheduledIDs": {}, // autoload these trend ids on start
1146// "thresholds_conns": [], // connections to ThresholdS ,empty to disable stats functionality: <""|*internal|$rpc_conns_id>
1147// "eesConns": [], // connections to EEs for trendSummary, empty to disable export functionality: <""|*internal|$rpc_conns_id>
1148// "eesExporterIDs": [] // list of EventExporter profiles to use for real-time trendSummary exports
1149// },
1150
1151
1152// "rankings":{
1153// "enabled": false, // starts RankingS service: <true|false>.
1154// "storeInterval": "", // dump cache regularly to DB, 0 - dump at start/shutdown: <""|$dur>
1155// "stats_conns": [], // connections to StatS ,empty to disable stats functionality: <""|*internal|$rpc_conns_id>
1156// "scheduledIDs": {}, // autoload these ranking ids on start
1157// "thresholds_conns": [], // connections to ThresholdS for rankingSummary reporting, empty to disable thresholds functionality: <""|*internal|$rpc_conns_id>
1158// "eesConns": [], // connections to EEs for rankingSummary events, empty to disable export functionality: <""|*internal|$rpc_conns_id>
1159// "eesExporterIDs": [] // list of EventExporter profiles to use for real-time rankingSummary exports
1160// },
1161
1162
1163// "routes": {
1164// "enabled": false, // starts RouteS service: <true|false>.
1165// "indexedSelects": true, // enable profile matching exclusively on indexes
1166// //"stringIndexedFields": [], // query indexes based on these fields for faster processing
1167// "prefixIndexedFields": [], // query indexes based on these fields for faster processing
1168// "suffixIndexedFields": [], // query indexes based on these fields for faster processing
1169// "existsIndexedFields": [], // query indexes based on these fields for faster processing
1170// "notExistsIndexedFields": [], // query indexes based on these fields for faster processing
1171// "nestedFields": false, // determines which field is checked when matching indexed filters(true: all; false: only the one on the first level)
1172// "attributes_conns": [], // connections to AttributeS for altering events before route queries: <""|*internal|$rpc_conns_id>
1173// "resources_conns": [], // connections to ResourceS for *res sorting, empty to disable functionality: <""|*internal|$rpc_conns_id>
1174// "stats_conns": [], // connections to StatS for *stats sorting, empty to disable stats functionality: <""|*internal|$rpc_conns_id>
1175// "rates_conns": [], // connections to RateS
1176// "accounts_conns": [], // connections to AccountS
1177// "defaultRatio":1, // default ratio used in case of *load strategy
1178// "opts":{
1179// // "*context": [
1180// // {
1181// // "tenant": "*any",
1182// // "filterIDs": [],
1183// // "value": "*routes"
1184// // }
1185// // ],
1186// // "*profileCount": [
1187// // {
1188// // "tenant": "*any",
1189// // "filterIDs": [],
1190// // "value": "1"
1191// // }
1192// // ],
1193// // "*ignoreErrors": [
1194// // {
1195// // "tenant": "*any",
1196// // "filterIDs": [],
1197// // "value": "false"
1198// // }
1199// // ],
1200// // "*maxCost": [
1201// // {
1202// // "tenant": "*any",
1203// // "filterIDs": [],
1204// // "value": ""
1205// // }
1206// // ],
1207// // "*limit": [
1208// // {
1209// // "tenant": "*any",
1210// // "filterIDs": [],
1211// // "value": 1
1212// // }
1213// // ],
1214// // "*offset": [
1215// // {
1216// // "tenant": "*any",
1217// // "filterIDs": [],
1218// // "value": 1
1219// // }
1220// // ],
1221// // "*maxItems": [
1222// // {
1223// // "tenant": "*any",
1224// // "filterIDs": [],
1225// // "value": 1
1226// // }
1227// // ],
1228// // "*usage": [
1229// // {
1230// // "tenant": "*any",
1231// // "filterIDs": [],
1232// // "value": "1m"
1233// // }
1234// // ]
1235// }
1236// },
1237
1238
1239// "loaders": [
1240// {
1241// "id": "*default", // identifier of the Loader
1242// "enabled": false, // starts as service: <true|false>.
1243// "tenant": "", // tenant used in filterS.Pass
1244// "runDelay": "0", // sleep interval in seconds between consecutive runs, -1 to use automation via inotify or 0 to disable running all together
1245// "lockfilePath": ".cgr.lck", // Filename containing concurrency lock in case of delayed processing
1246// "cachesConns": ["*internal"],
1247// "fieldSeparator": ",", // separator used in case of csv files
1248// "tpInPath": "/var/spool/cgrates/loader/in", // absolute path towards the directory where the TPs are stored
1249// "tpOutPath": "/var/spool/cgrates/loader/out", // absolute path towards the directory where processed TPs will be moved
1250// "action": "*store", // what should the loader do<*store|*parse|*remove|*dryRun>
1251// "opts": {
1252// // "*cache": "*reload",
1253// "*withIndex": true,
1254// // "*forceLock": false,
1255// // "*stopOnError": false
1256// },
1257// "cache":{
1258// "*filters":{"limit": -1, "ttl": "5s", "staticTTL": false},
1259// "*attributes":{"limit": -1, "ttl": "5s", "staticTTL": false},
1260// "*resources":{"limit": -1, "ttl": "5s", "staticTTL": false},
1261// "*stats":{"limit": -1, "ttl": "5s", "staticTTL": false},
1262// "*thresholds":{"limit": -1, "ttl": "5s", "staticTTL": false},
1263// "*routes":{"limit": -1, "ttl": "5s", "staticTTL": false},
1264// "*chargers":{"limit": -1, "ttl": "5s", "staticTTL": false},
1265// "*rateProfiles":{"limit": -1, "ttl": "5s", "staticTTL": false},
1266// "*actionProfiles":{"limit": -1, "ttl": "5s", "staticTTL": false},
1267// "*accounts":{"limit": -1, "ttl": "5s", "staticTTL": false},
1268// "*trends":{"limit": -1, "ttl": "5s", "staticTTL": false},
1269// "*rankings":{"limit": -1, "ttl": "5s", "staticTTL": false}
1270// },
1271// "data":[ // data profiles to load
1272// {
1273// "type": "*filters", // data source type
1274// "fileName": "Filters.csv", // file name in the tpInPath
1275// "fields": [
1276// {"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
1277// {"tag": "ID", "path": "ID", "type": "*variable", "value": "~*req.1", "mandatory": true},
1278// {"tag": "Type", "path": "Rules.Type", "type": "*variable", "value": "~*req.2", "newBranch":true},
1279// {"tag": "Element", "path": "Rules.Element", "type": "*variable", "value": "~*req.3"},
1280// {"tag": "Values", "path": "Rules.Values", "type": "*variable", "value": "~*req.4"}
1281// ]
1282// },
1283// {
1284// "type": "*attributes", // data source type
1285// "fileName": "Attributes.csv", // file name in the tpInPath
1286// "fields": [
1287// {"tag": "TenantID", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
1288// {"tag": "ProfileID", "path": "ID", "type": "*variable", "value": "~*req.1", "mandatory": true},
1289// {"tag": "FilterIDs", "path": "FilterIDs", "type": "*variable", "value": "~*req.2"},
1290// {"tag": "Weights", "path": "Weights", "type": "*variable", "value": "~*req.3"},
1291// {"tag": "Blockers", "path": "Blockers", "type": "*variable", "value": "~*req.4"},
1292// {"tag": "AttributeFilterIDs", "path": "Attributes.FilterIDs", "type": "*variable", "value": "~*req.5","newBranch":true},
1293// {"tag": "AttributeBlockers", "path": "Attributes.Blockers", "type": "*variable", "value": "~*req.6"},
1294// {"tag": "Path", "path": "Attributes.Path", "type": "*variable", "value": "~*req.7"},
1295// {"tag": "Type", "path": "Attributes.Type", "type": "*variable", "value": "~*req.8"},
1296// {"tag": "Value", "path": "Attributes.Value", "type": "*variable", "value": "~*req.9"}
1297// ]
1298// },
1299// {
1300// "type": "*resources", // data source type
1301// "fileName": "Resources.csv", // file name in the tpInPath
1302// "fields": [
1303// {"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
1304// {"tag": "ID", "path": "ID", "type": "*variable", "value": "~*req.1", "mandatory": true},
1305// {"tag": "FilterIDs", "path": "FilterIDs", "type": "*variable", "value": "~*req.2"},
1306// {"tag": "Weights", "path": "Weights", "type": "*variable", "value": "~*req.3"},
1307// {"tag": "TTL", "path": "UsageTTL", "type": "*variable", "value": "~*req.4"},
1308// {"tag": "Limit", "path": "Limit", "type": "*variable", "value": "~*req.5"},
1309// {"tag": "AllocationMessage", "path": "AllocationMessage", "type": "*variable", "value": "~*req.6"},
1310// {"tag": "Blocker", "path": "Blocker", "type": "*variable", "value": "~*req.7"},
1311// {"tag": "Stored", "path": "Stored", "type": "*variable", "value": "~*req.8"},
1312// {"tag": "ThresholdIDs", "path": "ThresholdIDs", "type": "*variable", "value": "~*req.9"}
1313// ]
1314// },
1315// {
1316// "type": "*stats", // data source type
1317// "fileName": "Stats.csv", // file name in the tpInPath
1318// "fields": [
1319// {"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
1320// {"tag": "ID", "path": "ID", "type": "*variable", "value": "~*req.1", "mandatory": true},
1321// {"tag": "FilterIDs", "path": "FilterIDs", "type": "*variable", "value": "~*req.2"},
1322// {"tag": "Weights", "path": "Weights", "type": "*variable", "value": "~*req.3"},
1323// {"tag": "Blockers", "path": "Blockers", "type": "*variable", "value": "~*req.4"},
1324// {"tag": "QueueLength", "path": "QueueLength", "type": "*variable", "value": "~*req.5"},
1325// {"tag": "TTL", "path": "TTL", "type": "*variable", "value": "~*req.6"},
1326// {"tag": "MinItems", "path": "MinItems", "type": "*variable", "value": "~*req.7"},
1327// {"tag": "Stored", "path": "Stored", "type": "*variable", "value": "~*req.8"},
1328// {"tag": "ThresholdIDs", "path": "ThresholdIDs", "type": "*variable", "value": "~*req.9"},
1329// {"tag": "MetricIDs", "path": "Metrics.MetricID", "type": "*variable", "value": "~*req.10","newBranch":true},
1330// {"tag": "MetricFilterIDs", "path": "Metrics.FilterIDs", "type": "*variable", "value": "~*req.11"},
1331// {"tag": "MetricBlockers", "path": "Metrics.Blockers", "type": "*variable", "value": "~*req.12"}
1332// ]
1333// },
1334// {
1335// "type": "*thresholds", // data source type
1336// "fileName": "Thresholds.csv", // file name in the tpInPath
1337// "fields": [
1338// {"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
1339// {"tag": "ID", "path": "ID", "type": "*variable", "value": "~*req.1", "mandatory": true},
1340// {"tag": "FilterIDs", "path": "FilterIDs", "type": "*variable", "value": "~*req.2"},
1341// {"tag": "Weights", "path": "Weights", "type": "*variable", "value": "~*req.3"},
1342// {"tag": "MaxHits", "path": "MaxHits", "type": "*variable", "value": "~*req.4"},
1343// {"tag": "MinHits", "path": "MinHits", "type": "*variable", "value": "~*req.5"},
1344// {"tag": "MinSleep", "path": "MinSleep", "type": "*variable", "value": "~*req.6"},
1345// {"tag": "Blocker", "path": "Blocker", "type": "*variable", "value": "~*req.7"},
1346// {"tag": "ActionProfileIDs", "path": "ActionProfileIDs", "type": "*variable", "value": "~*req.8"},
1347// {"tag": "Async", "path": "Async", "type": "*variable", "value": "~*req.9"}
1348// ]
1349// },
1350// {
1351// "type": "*trends", // data source type
1352// "fileName": "Trends.csv", // file name in the tpInPath
1353// "fields": [
1354// {"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
1355// {"tag": "ID", "path": "ID", "type": "*variable", "value": "~*req.1", "mandatory": true},
1356// {"tag": "Schedule", "path": "Schedule", "type": "*variable", "value": "~*req.2"},
1357// {"tag": "StatID", "path": "StatID", "type": "*variable", "value": "~*req.3"},
1358// {"tag": "Metrics", "path": "Metrics", "type": "*variable", "value": "~*req.4"},
1359// {"tag": "TTL", "path": "TTL", "type": "*variable", "value": "~*req.5"},
1360// {"tag": "QueueLength", "path": "QueueLength", "type": "*variable", "value": "~*req.6"},
1361// {"tag": "MinItems", "path": "MinItems", "type": "*variable", "value": "~*req.7"},
1362// {"tag": "CorrelationType", "path": "CorrelationType", "type": "*variable", "value": "~*req.8"},
1363// {"tag": "Tolerance", "path": "Tolerance", "type": "*variable", "value": "~*req.9"},
1364// {"tag": "Stored", "path": "Stored", "type": "*variable", "value": "~*req.10"},
1365// {"tag": "ThresholdIDs", "path": "ThresholdIDs", "type": "*variable", "value": "~*req.11"}
1366// ]
1367// },
1368// {
1369// "type": "*rankings", // data source type
1370// "fileName": "Rankings.csv", // file name in the tpInPath
1371// "fields": [
1372// {"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
1373// {"tag": "ID", "path": "ID", "type": "*variable", "value": "~*req.1", "mandatory": true},
1374// {"tag": "Schedule", "path": "Schedule", "type": "*variable", "value": "~*req.2"},
1375// {"tag": "StatIDs", "path": "StatIDs", "type": "*variable", "value": "~*req.3"},
1376// {"tag": "MetricIDs", "path": "MetricIDs", "type": "*variable", "value": "~*req.4"},
1377// {"tag": "Sorting", "path": "Sorting", "type": "*variable", "value": "~*req.5"},
1378// {"tag": "SortingParameters", "path": "SortingParameters", "type": "*variable", "value": "~*req.6"},
1379// {"tag": "Stored", "path": "Stored", "type": "*variable", "value": "~*req.7"},
1380// {"tag": "ThresholdIDs", "path": "ThresholdIDs", "type": "*variable", "value": "~*req.8"}
1381// ]
1382// },
1383// {
1384// "type": "*routes", // data source type
1385// "fileName": "Routes.csv", // file name in the tpInPath
1386// "fields": [
1387// {"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
1388// {"tag": "ID", "path": "ID", "type": "*variable", "value": "~*req.1", "mandatory": true},
1389// {"tag": "FilterIDs", "path": "FilterIDs", "type": "*variable", "value": "~*req.2"},
1390// {"tag": "Weights", "path": "Weights", "type": "*variable", "value": "~*req.3"},
1391// {"tag": "Blockers", "path": "Blockers", "type": "*variable", "value": "~*req.4"},
1392// {"tag": "Sorting", "path": "Sorting", "type": "*variable", "value": "~*req.5"},
1393// {"tag": "SortingParameters", "path": "SortingParameters", "type": "*variable", "value": "~*req.6"},
1394// {"tag": "RouteID", "path": "Routes.ID", "type": "*variable", "value": "~*req.7","newBranch":true},
1395// {"tag": "RouteFilterIDs", "path": "Routes.FilterIDs", "type": "*variable", "value": "~*req.8"},
1396// {"tag": "RouteAccountIDs", "path": "Routes.AccountIDs", "type": "*variable", "value": "~*req.9"},
1397// {"tag": "RouteRateProfileIDs", "path": "Routes.RateProfileIDs", "type": "*variable", "value": "~*req.10"},
1398// {"tag": "RouteResourceIDs", "path": "Routes.ResourceIDs", "type": "*variable", "value": "~*req.11"},
1399// {"tag": "RouteStatIDs", "path": "Routes.StatIDs", "type": "*variable", "value": "~*req.12"},
1400// {"tag": "RouteWeights", "path": "Routes.Weights", "type": "*variable", "value": "~*req.13"},
1401// {"tag": "RouteBlockers", "path": "Routes.Blockers", "type": "*variable", "value": "~*req.14"},
1402// {"tag": "RouteParameters", "path": "Routes.RouteParameters", "type": "*variable", "value": "~*req.15"}
1403// ]
1404// },
1405// {
1406// "type": "*chargers", // data source type
1407// "fileName": "Chargers.csv", // file name in the tpInPath
1408// "fields": [
1409// {"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
1410// {"tag": "ID", "path": "ID", "type": "*variable", "value": "~*req.1", "mandatory": true},
1411// {"tag": "FilterIDs", "path": "FilterIDs", "type": "*variable", "value": "~*req.2"},
1412// {"tag": "Weights", "path": "Weights", "type": "*variable", "value": "~*req.3"},
1413// {"tag": "Blockers", "path": "Blockers", "type": "*variable", "value": "~*req.4"},
1414// {"tag": "RunID", "path": "RunID", "type": "*variable", "value": "~*req.5"},
1415// {"tag": "AttributeIDs", "path": "AttributeIDs", "type": "*variable", "value": "~*req.6"}
1416// ]
1417// },
1418// {
1419// "type": "*rateProfiles", // data source type
1420// "fileName": "Rates.csv", // file name in the tpInPath
1421// "fields": [
1422// {"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
1423// {"tag": "ID", "path": "ID", "type": "*variable", "value": "~*req.1", "mandatory": true},
1424// {"tag": "FilterIDs", "path": "FilterIDs", "type": "*variable", "value": "~*req.2"},
1425// {"tag": "Weights", "path": "Weights", "type": "*variable", "value": "~*req.3"},
1426// {"tag": "MinCost", "path": "MinCost", "type": "*variable", "value": "~*req.4"},
1427// {"tag": "MaxCost", "path": "MaxCost", "type": "*variable", "value": "~*req.5"},
1428// {"tag": "MaxCostStrategy", "path": "MaxCostStrategy", "type": "*variable", "value": "~*req.6"},
1429// // {"tag": "RateID", "path": "RateID", "type": "*variable", "value": "~*req.7"},
1430// {"tag": "RateFilterIDs", "path": "Rates[<~*req.7>].FilterIDs", "type": "*variable", "value": "~*req.8", "filters": ["*notempty:~*req.7:"]},
1431// {"tag": "RateActivationTimes", "path": "Rates[<~*req.7>].ActivationTimes", "type": "*variable", "value": "~*req.9", "filters": ["*notempty:~*req.7:"]},
1432// {"tag": "RateWeights", "path": "Rates[<~*req.7>].Weights", "type": "*variable", "value": "~*req.10", "filters": ["*notempty:~*req.7:"]},
1433// {"tag": "RateBlocker", "path": "Rates[<~*req.7>].Blocker", "type": "*variable", "value": "~*req.11", "filters": ["*notempty:~*req.7:"]},
1434// {"tag": "RateIntervalStart", "path": "Rates[<~*req.7>].IntervalRates.IntervalStart", "type": "*variable", "value": "~*req.12","newBranch":true, "filters": ["*notempty:~*req.7:"]},
1435// {"tag": "RateFixedFee", "path": "Rates[<~*req.7>].IntervalRates.FixedFee", "type": "*variable", "value": "~*req.13", "filters": ["*notempty:~*req.7:"]},
1436// {"tag": "RateRecurrentFee", "path": "Rates[<~*req.7>].IntervalRates.RecurrentFee", "type": "*variable", "value": "~*req.14", "filters": ["*notempty:~*req.7:"]},
1437// {"tag": "RateUnit", "path": "Rates[<~*req.7>].IntervalRates.Unit", "type": "*variable", "value": "~*req.15", "filters": ["*notempty:~*req.7:"]},
1438// {"tag": "RateIncrement", "path": "Rates[<~*req.7>].IntervalRates.Increment", "type": "*variable", "value": "~*req.16", "filters": ["*notempty:~*req.7:"]}
1439// ]
1440// },
1441// {
1442// "type": "*actionProfiles", // data source type
1443// "fileName": "Actions.csv", // file name in the tpInPath
1444// "fields": [
1445// {"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
1446// {"tag": "ID", "path": "ID", "type": "*variable", "value": "~*req.1", "mandatory": true},
1447// {"tag": "FilterIDs", "path": "FilterIDs", "type": "*variable", "value": "~*req.2"},
1448// {"tag": "Weights", "path": "Weights", "type": "*variable", "value": "~*req.3"},
1449// {"tag": "Blockers", "path": "Blockers", "type": "*variable", "value": "~*req.4"},
1450// {"tag": "Schedule", "path": "Schedule", "type": "*variable", "value": "~*req.5"},
1451// // {"tag": "TargetType", "path": "TargetType", "type": "*variable", "value": "~*req.6"},
1452// {"tag": "TargetIDs", "path": "Targets[<~*req.6>]", "type": "*variable", "value": "~*req.7"},
1453// // {"tag": "ActionID", "path": "Actions.ID", "type": "*variable", "value": "~*req.8","newBranch":true},
1454// {"tag": "ActionFilterIDs", "path": "Actions[<~*req.8>].FilterIDs", "type": "*variable", "value": "~*req.9", "filters": ["*notempty:~*req.8:"]},
1455// {"tag": "ActionTTL", "path": "Actions[<~*req.8>].TTL", "type": "*variable", "value": "~*req.10", "filters": ["*notempty:~*req.8:"]},
1456// {"tag": "ActionType", "path": "Actions[<~*req.8>].Type", "type": "*variable", "value": "~*req.11", "filters": ["*notempty:~*req.8:"]},
1457// {"tag": "ActionOpts", "path": "Actions[<~*req.8>].Opts", "type": "*variable", "value": "~*req.12", "filters": ["*notempty:~*req.8:"]},
1458// {"tag": "ActionWeights", "path": "Actions[<~*req.8>].Weights", "type": "*variable", "value": "~*req.13", "filters": ["*notempty:~*req.8:"]},
1459// {"tag": "ActionBlockers", "path": "Actions[<~*req.8>].Blockers", "type": "*variable", "value": "~*req.14", "filters": ["*notempty:~*req.8:"]},
1460// {"tag": "ActionDiktatsID", "path": "Actions[<~*req.8>].Diktats.ID", "type": "*variable", "value": "~*req.15","newBranch":true, "filters": ["*notempty:~*req.8:"]},
1461// {"tag": "ActionDiktatsFilterIDs", "path": "Actions[<~*req.8>].Diktats.FilterIDs", "type": "*variable", "value": "~*req.16", "filters": ["*notempty:~*req.8:"]},
1462// {"tag": "ActionDiktatsOpts", "path": "Actions[<~*req.8>].Diktats.Opts", "type": "*variable", "value": "~*req.17", "filters": ["*notempty:~*req.8:"]},
1463// {"tag": "ActionDiktatsWeights", "path": "Actions[<~*req.8>].Diktats.Weights", "type": "*variable", "value": "~*req.18", "filters": ["*notempty:~*req.8:"]},
1464// {"tag": "ActionDiktatsBlockers", "path": "Actions[<~*req.8>].Diktats.Blockers", "type": "*variable", "value": "~*req.19", "filters": ["*notempty:~*req.8:"]},
1465// ]
1466// },
1467// {
1468// "type": "*accounts", // data source type
1469// "fileName": "Accounts.csv", // file name in the tpInPath
1470// "fields": [
1471// {"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
1472// {"tag": "ID", "path": "ID", "type": "*variable", "value": "~*req.1", "mandatory": true},
1473// {"tag": "FilterIDs", "path": "FilterIDs", "type": "*variable", "value": "~*req.2"},
1474// {"tag": "Weights", "path": "Weights", "type": "*variable", "value": "~*req.3"},
1475// {"tag": "Blockers", "path": "Blockers", "type": "*variable", "value": "~*req.4"},
1476// {"tag": "Opts", "path": "Opts", "type": "*variable", "value": "~*req.5"},
1477// // {"tag": "BalanceID", "path": "Balances.ID", "type": "*variable", "value": "~*req.6"},
1478// {"tag": "BalanceFilterIDs", "path": "Balances[<~*req.6>].FilterIDs", "type": "*variable", "value": "~*req.7","filters": ["*notempty:~*req.6:"]},
1479// {"tag": "BalanceWeights", "path": "Balances[<~*req.6>].Weights", "type": "*variable", "value": "~*req.8","filters": ["*notempty:~*req.6:"]},
1480// {"tag": "BalanceBlockers", "path": "Balances[<~*req.6>].Blockers", "type": "*variable", "value": "~*req.9","filters": ["*notempty:~*req.6:"]},
1481// {"tag": "BalanceType", "path": "Balances[<~*req.6>].Type", "type": "*variable", "value": "~*req.10","filters": ["*notempty:~*req.6:"]},
1482// {"tag": "BalanceUnits", "path": "Balances[<~*req.6>].Units", "type": "*variable", "value": "~*req.11","filters": ["*notempty:~*req.6:"]},
1483// {"tag": "BalanceUnitFactors", "path": "Balances[<~*req.6>].UnitFactors", "type": "*variable", "value": "~*req.12","filters": ["*notempty:~*req.6:"]},
1484// {"tag": "BalanceOpts", "path": "Balances[<~*req.6>].Opts", "type": "*variable", "value": "~*req.13","filters": ["*notempty:~*req.6:"]},
1485// {"tag": "BalanceCostIncrements", "path": "Balances[<~*req.6>].CostIncrements", "type": "*variable", "value": "~*req.14","filters": ["*notempty:~*req.6:"]},
1486// {"tag": "BalanceAttributeIDs", "path": "Balances[<~*req.6>].AttributeIDs", "type": "*variable", "value": "~*req.15","filters": ["*notempty:~*req.6:"]},
1487// {"tag": "BalanceRateProfileIDs", "path": "Balances[<~*req.6>].RateProfileIDs", "type": "*variable", "value": "~*req.16","filters": ["*notempty:~*req.6:"]},
1488// {"tag": "ThresholdIDs", "path": "ThresholdIDs", "type": "*variable", "value": "~*req.17"}
1489// ]
1490// }
1491// ]
1492// }
1493// ],
1494
1495
1496// "suretax": {
1497// "url": "", // API url
1498// "clientNumber": "", // client number, provided by SureTax
1499// "validationKey": "", // validation key provided by SureTax
1500// "businessUnit": "", // client’s Business Unit
1501// "timezone": "Local", // convert the time of the events to this timezone before sending request out <UTC|Local|$IANA_TZ_DB>
1502// "includeLocalCost": false, // sum local calculated cost with tax one in final cost
1503// "returnFileCode": "0", // default or Quote purposes <0|Q>
1504// "responseGroup": "03", // determines how taxes are grouped for the response <03|13>
1505// "responseType": "D4", // determines the granularity of taxes and (optionally) the decimal precision for the tax calculations and amounts in the response
1506// "regulatoryCode": "03", // provider type
1507// "clientTracking": "~*opts.*originID", // template extracting client information out of StoredCdr; <RSRParsers>
1508// "customerNumber": "~*req.Subject", // template extracting customer number out of StoredCdr; <RSRParsers>
1509// "origNumber": "~*req.Subject", // template extracting origination number out of StoredCdr; <RSRParsers>
1510// "termNumber": "~*req.Destination", // template extracting termination number out of StoredCdr; <RSRParsers>
1511// "billToNumber": "", // template extracting billed to number out of StoredCdr; <RSRParsers>
1512// "zipcode": "", // template extracting billing zip code out of StoredCdr; <RSRParsers>
1513// "plus4": "", // template extracting billing zip code extension out of StoredCdr; <RSRParsers>
1514// "p2pzipcode": "", // template extracting secondary zip code out of StoredCdr; <RSRParsers>
1515// "p2pplus4": "", // template extracting secondary zip code extension out of StoredCdr; <RSRParsers>
1516// "units": "1", // template extracting number of “lines” or unique charges contained within the revenue out of StoredCdr; <RSRParsers>
1517// "unitType": "00", // template extracting number of unique access lines out of StoredCdr; <RSRParsers>
1518// "taxIncluded": "0", // template extracting tax included in revenue out of StoredCdr; <RSRParsers>
1519// "taxSitusRule": "04", // template extracting tax situs rule out of StoredCdr; <RSRParsers>
1520// "transTypeCode": "010101", // template extracting transaction type indicator out of StoredCdr; <RSRParsers>
1521// "salesTypeCode": "R", // template extracting sales type code out of StoredCdr; <RSRParsers>
1522// "taxExemptionCodeList": "", // template extracting tax exemption code list out of StoredCdr; <RSRParsers>
1523// },
1524
1525
1526// "loader": { // loader for tariff plans out of .csv files
1527// "tpid": "", // tariff plan identificator
1528// "dataPath": "./", // path towards tariff plan files
1529// "disableReverse": false, // disable reverse computing
1530// "fieldSeparator": ",", // separator used in case of csv files
1531// "cachesConns":["*localhost"],
1532// "actionsConns": ["*localhost"],
1533// "gapiCredentials": ".gapi/credentials.json", // the path to the credentials for google API or the credentials.json file content
1534// "gapiToken": ".gapi/token.json" // the path to the token for google API or the token.json file content
1535// },
1536
1537
1538// "migrator": {
1539// "usersFilters":[],
1540// "fromItems":{
1541// "*accounts": {"dbConn": "*default"},
1542// "*statQueueProfiles": {"dbConn": "*default"},
1543// "*filters": {"dbConn": "*default"},
1544// "*chargerProfiles": {"dbConn": "*default"},
1545// "*loadIDs": {"dbConn": "*default"},
1546// "*versions": {"dbConn": "*default"}
1547// },
1548// "outDBOpts":{
1549// "redisMaxConns": 10, // the connection pool size
1550// "redisConnectAttempts": 20, // the maximum amount of dial attempts
1551// "redisSentinel": "",
1552// "redisCluster": false,
1553// "redisClusterSync": "5s",
1554// "redisClusterOndownDelay": "0",
1555// "redisConnectTimeout": "0", // the amount of wait time until timeout for a connection attempt
1556// "redisReadTimeout": "0", // the amount of wait time until timeout for reading operations
1557// "redisWriteTimeout": "0", // the amount of wait time until timeout for writing operations
1558// "redisPoolPipelineWindow": "150µs", // duration after which internal pipelines are flushed (0 disables implicit pipelining)
1559// "redisPoolPipelineLimit": 0, // maximum number of commands that can be pipelined before flushing (0 means no limit)
1560// "redisTLS": false, // enable TLS when connecting to Redis and use the redisClientCertificate, redisClientKey and redisCACertificate for TLS connection
1561// "redisClientCertificate":"", // path to client certificate
1562// "redisClientKey":"", // path to client key
1563// "redisCACertificate":"", // path to CA certificate (populate for self-signed certificate otherwise let it empty)
1564// "mongoQueryTimeout":"10s", // timeout for query when mongo is used
1565// "mongoConnScheme": "mongodb" // scheme for MongoDB connection <mongodb|mongodb+srv>
1566// },
1567// },
1568
1569
1570// "registrarc":{
1571// "rpc":{
1572// "enabled": false,
1573// "registrarsConns": [],
1574// "hosts": [],
1575// "refreshInterval": "5m"
1576// }
1577// },
1578
1579
1580// "analyzers":{
1581// "enabled": false, // starts AnalyzerS service: <true|false>.
1582// "dbPath": "/var/spool/cgrates/analyzers", // path to the folder where to store the information
1583// "indexType": "*scorch", // the type of index for the storage: <*internal|*scorch|*boltdb|*leveldb|*mossdb>
1584// "ttl": "24h", // time to wait before removing the API capture
1585// "eesConns": [], // connections to EEs
1586// "cleanupInterval": "1h", // the interval we clean the db
1587// "opts":{
1588// // "*exporterIDs": [
1589// // {
1590// // "tenant": "*any",
1591// // "filterIDs": [],
1592// // "connIDs": []
1593// // }
1594// // ]
1595// }
1596// },
1597
1598
1599// "admins": {
1600// "enabled": false,
1601// "cachesConns":["*internal"],
1602// "actionsConns": [], // connections to ActionS for reloads
1603// "attributes_conns": [], // connections to AttributeS for CDRExporter
1604// "eesConns": [] // connections to EEs
1605// },
1606
1607
1608// "rates": {
1609// "enabled": false,
1610// "indexedSelects": true, // enable profile matching exclusively on indexes
1611// //"stringIndexedFields": [], // query indexes based on these fields for faster processing
1612// "prefixIndexedFields": [], // query indexes based on these fields for faster processing
1613// "suffixIndexedFields": [], // query indexes based on these fields for faster processing
1614// "existsIndexedFields": [], // query indexes based on these fields for faster processing
1615// "notExistsIndexedFields": [], // query indexes based on these fields for faster processing
1616// "nestedFields": false, // determines which field is checked when matching indexed filters(true: all; false: only the one on the first level)
1617// "rateIndexedSelects": true, // enable profile matching exclusively on indexes
1618// //"rateStringIndexedFields": [], // query indexes based on these fields for faster processing
1619// "ratePrefixIndexedFields": [], // query indexes based on these fields for faster processing
1620// "rateSuffixIndexedFields": [], // query indexes based on these fields for faster processing
1621// "rateExistsIndexedFields": [], // query indexes based on these fields for faster processing
1622// "rateNotExistsIndexedFields": [], // query indexes based on these fields for faster processing
1623// "rateNestedFields": false, // determines which field is checked when matching indexed filters(true: all; false: only the one on the first level)
1624// "verbosity": 1000, // number of increment iterations allowed
1625// "opts":{
1626// // "*profileIDs": [ // select the rate profiles used for cost calculation
1627// // {
1628// // "tenant": "*any",
1629// // "filterIDs": [],
1630// // "connIDs": []
1631// // }
1632// // ],
1633// // "*startTime": [ // start time used for cost calculation
1634// // {
1635// // "tenant": "*any",
1636// // "filterIDs": [],
1637// // "value": "*now"
1638// // }
1639// // ],
1640// // "*usage": [ // usage used for cost calculation
1641// // {
1642// // "tenant": "*any",
1643// // "filterIDs": [],
1644// // "value": "1m"
1645// // }
1646// // ],
1647// // "*intervalStart": [ // event interval start
1648// // {
1649// // "tenant": "*any",
1650// // "filterIDs": [],
1651// // "value": "0"
1652// // }
1653// // ],
1654// // "*profileIgnoreFilters": [ // ignore the filters for rateProfileIDs
1655// // {
1656// // "tenant": "*any",
1657// // "filterIDs": [],
1658// // "value": false
1659// // }
1660// // ]
1661// }
1662// },
1663
1664
1665// "sipAgent": { // SIP Agents, only used for redirections
1666// "enabled": false, // enables the SIP agent: <true|false>
1667// "listen": "127.0.0.1:5060", // address where to listen for SIP requests <x.y.z.y:1234>
1668// "listenNet": "udp", // network to listen on <udp|tcp|tcp-tls>
1669// "sessions_conns": ["*internal"],
1670// "timezone": "", // timezone of the events if not specified <UTC|Local|$IANA_TZ_DB>
1671// "retransmissionTimer": "1s", // the duration to wait to receive an ACK before resending the reply
1672// "requestProcessors": [] // request processors to be applied to SIP messages
1673// },
1674
1675// "janusAgent": {
1676// "enabled": false, // enables the Janus agent: <true|false>
1677// "url": "/janus",
1678// "sessions_conns": ["*internal"],
1679// "janusConns": [{ // instantiate connections to multiple Janus Servers
1680// "address": "127.0.0.1:8088", // janus API address
1681// "type": "*ws", // type of the transport to interact via janus API
1682// "adminAddress": "localhost:7188", // janus admin address used to retrive more information for sessions and handles
1683// "adminPassword": "" // secret to pass restriction to communicate to the endpoint
1684// }],
1685// "requestProcessors": [] // request processors to be applied to Janus messages
1686// },
1687
1688// "templates": {
1689// "*err": [
1690// {"tag": "SessionId", "path": "*rep.Session-Id", "type": "*variable",
1691// "value": "~*req.Session-Id", "mandatory": true},
1692// {"tag": "OriginHost", "path": "*rep.Origin-Host", "type": "*variable",
1693// "value": "~*vars.OriginHost", "mandatory": true},
1694// {"tag": "OriginRealm", "path": "*rep.Origin-Realm", "type": "*variable",
1695// "value": "~*vars.OriginRealm", "mandatory": true}
1696// ],
1697// "*cca": [
1698// {"tag": "SessionId", "path": "*rep.Session-Id", "type": "*variable",
1699// "value": "~*req.Session-Id", "mandatory": true},
1700// {"tag": "ResultCode", "path": "*rep.Result-Code", "type": "*constant",
1701// "value": "2001"},
1702// {"tag": "OriginHost", "path": "*rep.Origin-Host", "type": "*variable",
1703// "value": "~*vars.OriginHost", "mandatory": true},
1704// {"tag": "OriginRealm", "path": "*rep.Origin-Realm", "type": "*variable",
1705// "value": "~*vars.OriginRealm", "mandatory": true},
1706// {"tag": "AuthApplicationId", "path": "*rep.Auth-Application-Id", "type": "*variable",
1707// "value": "~*vars.*appid", "mandatory": true},
1708// {"tag": "CCRequestType", "path": "*rep.CC-Request-Type", "type": "*variable",
1709// "value": "~*req.CC-Request-Type", "mandatory": true},
1710// {"tag": "CCRequestNumber", "path": "*rep.CC-Request-Number", "type": "*variable",
1711// "value": "~*req.CC-Request-Number", "mandatory": true}
1712// ],
1713// "*asr": [
1714// {"tag": "SessionId", "path": "*diamreq.Session-Id", "type": "*variable",
1715// "value": "~*req.Session-Id", "mandatory": true},
1716// {"tag": "OriginHost", "path": "*diamreq.Origin-Host", "type": "*variable",
1717// "value": "~*req.Destination-Host", "mandatory": true},
1718// {"tag": "OriginRealm", "path": "*diamreq.Origin-Realm", "type": "*variable",
1719// "value": "~*req.Destination-Realm", "mandatory": true},
1720// {"tag": "DestinationRealm", "path": "*diamreq.Destination-Realm", "type": "*variable",
1721// "value": "~*req.Origin-Realm", "mandatory": true},
1722// {"tag": "DestinationHost", "path": "*diamreq.Destination-Host", "type": "*variable",
1723// "value": "~*req.Origin-Host", "mandatory": true},
1724// {"tag": "AuthApplicationId", "path": "*diamreq.Auth-Application-Id", "type": "*variable",
1725// "value": "~*vars.*appid", "mandatory": true}
1726// ],
1727// "*rar": [
1728// {"tag": "SessionId", "path": "*diamreq.Session-Id", "type": "*variable",
1729// "value": "~*req.Session-Id", "mandatory": true},
1730// {"tag": "OriginHost", "path": "*diamreq.Origin-Host", "type": "*variable",
1731// "value": "~*req.Destination-Host", "mandatory": true},
1732// {"tag": "OriginRealm", "path": "*diamreq.Origin-Realm", "type": "*variable",
1733// "value": "~*req.Destination-Realm", "mandatory": true},
1734// {"tag": "DestinationRealm", "path": "*diamreq.Destination-Realm", "type": "*variable",
1735// "value": "~*req.Origin-Realm", "mandatory": true},
1736// {"tag": "DestinationHost", "path": "*diamreq.Destination-Host", "type": "*variable",
1737// "value": "~*req.Origin-Host", "mandatory": true},
1738// {"tag": "AuthApplicationId", "path": "*diamreq.Auth-Application-Id", "type": "*variable",
1739// "value": "~*vars.*appid", "mandatory": true},
1740// {"tag": "ReAuthRequestType", "path": "*diamreq.Re-Auth-Request-Type", "type": "*constant",
1741// "value": "0"}
1742// ],
1743// "*errSip": [
1744// {"tag": "Request", "path": "*rep.Request", "type": "*constant",
1745// "value": "SIP/2.0 500 Internal Server Error", "mandatory": true}
1746// ],
1747// "*cdrLog": [ // cdrLog template is used in ActionS to build the event that is send to CDRs in case of *cdrLog actionType
1748// {"tag": "ToR", "path": "*cdr.ToR", "type": "*variable",
1749// "value": "~*req.BalanceType", "mandatory": true},
1750// {"tag": "OriginHost", "path": "*cdr.OriginHost", "type": "*constant",
1751// "value": "127.0.0.1", "mandatory": true},
1752// {"tag": "RequestType", "path": "*cdr.RequestType", "type": "*constant",
1753// "value": "*none", "mandatory": true},
1754// {"tag": "Tenant", "path": "*cdr.Tenant", "type": "*variable",
1755// "value": "~*req.Tenant", "mandatory": true},
1756// {"tag": "Account", "path": "*cdr.Account", "type": "*variable",
1757// "value": "~*req.Account", "mandatory": true},
1758// {"tag": "Subject", "path": "*cdr.Subject", "type": "*variable",
1759// "value": "~*req.Account", "mandatory": true},
1760// {"tag": "Cost", "path": "*cdr.Cost", "type": "*variable",
1761// "value": "~*req.Cost", "mandatory": true},
1762// {"tag": "Source", "path": "*cdr.Source", "type": "*constant",
1763// "value": "*cdrLog", "mandatory": true},
1764// {"tag": "Usage", "path": "*cdr.Usage", "type": "*constant",
1765// "value": "1", "mandatory": true},
1766// {"tag": "RunID", "path": "*cdr.RunID", "type": "*variable",
1767// "value": "~*req.ActionType", "mandatory": true},
1768// {"tag": "SetupTime", "path": "*cdr.SetupTime", "type": "*constant",
1769// "value": "*now", "mandatory": true},
1770// {"tag": "AnswerTime", "path": "*cdr.AnswerTime", "type": "*constant",
1771// "value": "*now", "mandatory": true},
1772// {"tag": "PreRated", "path": "*cdr.PreRated", "type": "*constant",
1773// "value": "true", "mandatory": true}
1774// ]
1775// },
1776
1777
1778// "configs": {
1779// "enabled": false,
1780// "url": "/configs/", // configs url
1781// "rootDir": "/var/spool/cgrates/configs" // root directory in case of calling /configs request
1782// },
1783
1784
1785// "apiban": {
1786// "enabled": false,
1787// "keys": []
1788// },
1789
1790// "sentrypeer": {
1791// "clientID":"",
1792// "clientSecret":"",
1793// "tokenUrl":"https://authz.sentrypeer.com/oauth/token",
1794// "ipsUrl":"https://sentrypeer.com/api/ip-addresses",
1795// "numbersUrl":"https://sentrypeer.com/api/phone-numbers",
1796// "audience":"https://sentrypeer.com/api",
1797// "grantType":"clientCredentials"
1798// },
1799
1800
1801// "actions": {
1802// "enabled": false, // starts attribute service: <true|false>
1803// "cdrs_conns": [], // connections to CDRs for CDR posting <""|*internal|$rpc_conns_id>
1804// "eesConns": [], // connections to Ees for exporting event <""|*internal|$rpc_conns_id>
1805// "thresholds_conns": [], // connections to ThresholdS for *resetThreshold action <""|*internal|$rpc_conns_id>
1806// "stats_conns": [], // connections to StatS for *reset_stat_queue action: <""|*internal|$rpc_conns_id>
1807// "accounts_conns": [], // connections to AccountS for *topup/*topUpReset action: <""|*internal|$rpc_conns_id>
1808// "tenants":[], // List of tenants to operate on
1809// "indexedSelects": true, // enable profile matching exclusively on indexes
1810// //"stringIndexedFields": [], // query indexes based on these fields for faster processing
1811// "prefixIndexedFields": [], // query indexes based on these fields for faster processing
1812// "suffixIndexedFields": [], // query indexes based on these fields for faster processing
1813// "existsIndexedFields": [], // query indexes based on these fields for faster processing
1814// "notExistsIndexedFields": [], // query indexes based on these fields for faster processing
1815// "nestedFields": false, // determines which field is checked when matching indexed filters(true: all; false: only the one on the first level)
1816// "dynaprepaidActionProfile": [],
1817// "opts":{
1818// // "*profileIDs": [
1819// // {
1820// // "tenant": "*any",
1821// // "filterIDs": [],
1822// // "connIDs": [],
1823// // }
1824// // ],
1825// // "*profileIgnoreFilters": [ // ignore the filters for actionProfileIDs
1826// // {
1827// // "tenant": "*any",
1828// // "filterIDs": [],
1829// // "value": false
1830// // }
1831// // ],
1832// // "*posterAttempts": [ // poster attempts for HTTPPost action type
1833// // {
1834// // "tenant": "*any",
1835// // "filterIDs": [],
1836// // "value": 1
1837// // }
1838// // ]
1839// }
1840// },
1841
1842
1843// "accounts": {
1844// "enabled": false, // starts service: <true|false>
1845// "indexedSelects": true, // enable profile matching exclusively on indexes
1846// "attributes_conns": [], // connections to AttributeS for account/balance updates, empty to disable attributes functionality: <""|*internal|$rpc_conns_id>
1847// "rates_conns": [], // connections to RatesS for account/balance updates, empty to disable rates functionality: <""|*internal|$rpc_conns_id>
1848// "thresholds_conns": [], // connections to ThresholdS for account/balance updates, empty to disable thresholds functionality: <""|*internal|$rpc_conns_id>
1849// //"stringIndexedFields": [], // query indexes based on these fields for faster processing
1850// "prefixIndexedFields": [], // query indexes based on these fields for faster processing
1851// "suffixIndexedFields": [], // query indexes based on these fields for faster processing
1852// "existsIndexedFields": [], // query indexes based on these fields for faster processing
1853// "notExistsIndexedFields": [], // query indexes based on these fields for faster processing
1854// "nestedFields": false, // determines which field is checked when matching indexed filters(true: all; false: only the one on the first level)
1855// "maxIterations": 1000, // maximum number of iterations
1856// "maxUsage": "72h", // maximum time of usage
1857// "opts":{
1858// // "*profileIDs": [
1859// // {
1860// // "tenant": "*any",
1861// // "filterIDs": [],
1862// // "connIDs": []
1863// // }
1864// // ],
1865// // "*usage": [
1866// // {
1867// // "tenant": "*any",
1868// // "filterIDs": [],
1869// // "value": "72h"
1870// // }
1871// // ],
1872// // "*profileIgnoreFilters": [ // ignore the filters for accountIDs
1873// // {
1874// // "tenant": "*any",
1875// // "filterIDs": [],
1876// // "value": "false"
1877// // }
1878// // ]
1879// }
1880// },
1881
1882
1883// "configDB": { // database used to store runtime data (eg: accounts)
1884// "dbType": "*internal", // db type: <*internal|*redis|*mongo>
1885// "dbHost": "", // db host address
1886// "dbPort": 0, // db port to reach the database
1887// "dbName": "", // db database name to connect to
1888// "dbUser": "", // username to use when connecting to db
1889// "dbPassword": "", // password to use when connecting to db
1890// "opts":{
1891// "internalDBDumpPath": "/var/lib/cgrates/internal_db/configdb", // the path where configdb will be dumped
1892// "internalDBBackupPath": "/var/lib/cgrates/internal_db/backup/configdb", // default path taken by ConfigSv1.BackupConfigDB when "BackupFolderPath" is not provided
1893// "internalDBStartTimeout": "5m", // the amount of wait time until timeout for DB startup
1894// "internalDBDumpInterval": "0s", // dump configdb regularly to a file: "0" - disables it; "-1" - dump on each set/remove; <""|$dur>
1895// "internalDBRewriteInterval": "0s", // rewrite dump files regularly: "0" - disables it; "-1" - rewrite on engine start; "-2" - rewrite on engine shutdown; <""|$dur>
1896// "internalDBFileSizeLimit": "1GB", // maximum size that can be written in a singular dump file
1897// "redisBatchSize": 1000, // COUNT size used in redis SCAN queries
1898// "redisMaxConns": 10, // the connection pool size
1899// "redisConnectAttempts": 20, // the maximum amount of dial attempts
1900// "redisSentinel": "", // the name of sentinel when used
1901// "redisCluster": false, // if enabled the configdb will try to connect to the redis cluster
1902// "redisClusterSync": "5s", // the sync interval for the redis cluster
1903// "redisClusterOndownDelay": "0", // the delay before executing the commands if the redis cluster is in the CLUSTERDOWN state
1904// "redisConnectTimeout": "0", // the amount of wait time until timeout for a connection attempt
1905// "redisReadTimeout": "0", // the amount of wait time until timeout for reading operations
1906// "redisWriteTimeout": "0", // the amount of wait time until timeout for writing operations
1907// "redisPoolPipelineWindow": "150µs", // duration after which internal pipelines are flushed (0 disables implicit pipelining)
1908// "redisPoolPipelineLimit": 0, // maximum number of commands that can be pipelined before flushing (0 means no limit)
1909// "redisTLS": false, // if true it will use a tls connection and use the redisClientCertificate, redisClientKey and redisCACertificate for tls connection
1910// "redisClientCertificate":"", // path to client certificate
1911// "redisClientKey":"", // path to client key
1912// "redisCACertificate":"", // path to CA certificate (populate for self-signed certificate otherwise let it empty)
1913// "mongoQueryTimeout":"10s", // timeout for query when mongo is used
1914// "mongoConnScheme": "mongodb" // scheme for MongoDB connection <mongodb|mongodb+srv>
1915// }
1916// },
1917
1918// "tpes": {
1919// "enabled": false
1920// }
1921
1922}