· 6 years ago · Apr 22, 2020, 01:40 PM
1{
2
3// Real-time Online/Offline Charging System (OCS) for Telecom & ISP environments
4// Copyright (C) ITsysCOM GmbH
5//
6// This file contains the default configuration hardcoded into CGRateS.
7// This is what you get when you load CGRateS with an empty configuration file.
8
9"general": {
10// "node_id": "", // identifier of this instance in the cluster, if empty it will be autogenerated
11//"logger":"*syslog", // controls the destination of logs <*syslog|*stdout>
12 "log_level": 6, // control the level of messages logged (0-emerg to 7-debug)
13// "http_skip_tls_verify": false, // if enabled HttpClient will accept any TLS certificate
14 "rounding_decimals": 5, // system level precision for floats
15// "dbdata_encoding": "*msgpack", // encoding used to store object data in strings: <*msgpack|*json>
16// "tpexport_dir": "/var/spool/cgrates/tpe", // path towards export folder for offline TariffPlans
17// "poster_attempts": 3, // number of attempts before considering post request failed (eg: *http_post, CDR exports)
18// "failed_posts_dir": "/var/spool/cgrates/failed_posts", // directory path where we store failed requests
19 "failed_posts_ttl": "5s", // time to wait before writing the failed posts in a single file
20 "default_request_type": "*postpaid", // default request type to consider when missing from requests: <""|*prepaid|*postpaid|*pseudoprepaid|*rated>
21// "default_category": "call", // default category to consider when missing from requests
22 "default_tenant": "softnet-mobil", // default tenant to consider when missing from requests
23// "default_timezone": "Local", // default timezone for timestamps where not specified <""|UTC|Local|$IANA_TZ_DB>
24// "default_caching":"*reload", // default actions to do when caching items
25// "connect_attempts": 5, // initial server connect attempts
26// "reconnects": -1, // number of retries in case of connection lost
27// "connect_timeout": "1s", // consider connection unsuccessful on timeout, 0 to disable the feature
28// "reply_timeout": "2s", // consider connection down for replies taking longer than this value
29// "locking_timeout": "0", // timeout internal locks to avoid deadlocks
30// "digest_separator": ",", // separator to use in replies containing data digests
31// "digest_equal": ":", // equal symbol used in case of digests
32// "rsr_separator": ";", // separator used within RSR fields
33// "max_parralel_conns": 100, // the maximum number of connection used by the *parallel strategy
34},
35
36
37// "rpc_conns": {
38// "*localhost": {
39// "conns": [{"address": "127.0.0.1:2012", "transport":"*json"}],
40// },
41// }, // rpc connections definitions
42
43
44"data_db": { // database used to store runtime data (eg: accounts)
45 "db_type": "*redis", // data_db type: <*redis|*mongo>
46 "db_host": "127.0.0.1", // data_db host address
47 "db_port": 6379, // data_db port to reach the database
48 "db_name": "10", // data_db database name to connect to
49// "db_user": "cgrates", // username to use when connecting to data_db
50// "db_password": "", // password to use when connecting to data_db
51// "redis_sentinel":"", // the name of sentinel when used
52// "query_timeout":"10s",
53// "remote_conns":[],
54// "replication_conns":[],
55// "items":{
56// "*accounts":{"remote":false, "replicate":false, "limit": -1, "ttl": "", "static_ttl": false},
57// "*reverse_destinations": {"remote":false, "replicate":false, "limit": -1, "ttl": "", "static_ttl": false},
58// "*destinations": {"remote":false, "replicate":false, "limit": -1, "ttl": "", "static_ttl": false},
59// "*rating_plans": {"remote":false, "replicate":false, "limit": -1, "ttl": "", "static_ttl": false},
60// "*rating_profiles":{"remote":false, "replicate":false, "limit": -1, "ttl": "", "static_ttl": false},
61// "*actions":{"remote":false, "replicate":false, "limit": -1, "ttl": "", "static_ttl": false},
62// "*action_plans": {"remote":false, "replicate":false, "limit": -1, "ttl": "", "static_ttl": false},
63// "*account_action_plans":{"remote":false, "replicate":false, "limit": -1, "ttl": "", "static_ttl": false},
64// "*action_triggers":{"remote":false, "replicate":false, "limit": -1, "ttl": "", "static_ttl": false},
65// "*shared_groups":{"remote":false, "replicate":false, "limit": -1, "ttl": "", "static_ttl": false},
66// "*timings": {"remote":false, "replicate":false, "limit": -1, "ttl": "", "static_ttl": false},
67// "*resource_profiles":{"remote":false, "replicate":false, "limit": -1, "ttl": "", "static_ttl": false},
68// "*resources":{"remote":false, "replicate":false, "limit": -1, "ttl": "", "static_ttl": false},
69// "*statqueue_profiles": {"remote":false, "replicate":false, "limit": -1, "ttl": "", "static_ttl": false},
70// "*statqueues": {"remote":false, "replicate":false, "limit": -1, "ttl": "", "static_ttl": false},
71// "*threshold_profiles": {"remote":false, "replicate":false, "limit": -1, "ttl": "", "static_ttl": false},
72// "*thresholds": {"remote":false, "replicate":false, "limit": -1, "ttl": "", "static_ttl": false},
73// "*filters": {"remote":false, "replicate":false, "limit": -1, "ttl": "", "static_ttl": false},
74// "*supplier_profiles":{"remote":false, "replicate":false, "limit": -1, "ttl": "", "static_ttl": false},
75// "*attribute_profiles":{"remote":false, "replicate":false, "limit": -1, "ttl": "", "static_ttl": false},
76// "*charger_profiles": {"remote":false, "replicate":false, "limit": -1, "ttl": "", "static_ttl": false},
77// "*dispatcher_profiles":{"remote":false, "replicate":false, "limit": -1, "ttl": "", "static_ttl": false},
78// "*dispatcher_hosts":{"remote":false, "replicate":false, "limit": -1, "ttl": "", "static_ttl": false},
79// "*filter_indexes" :{"remote":false, "replicate":false, "limit": -1, "ttl": "", "static_ttl": false},
80// "*load_ids":{"remote":false, "replicate":false, "limit": -1, "ttl": "", "static_ttl": false},
81// },
82},
83
84
85"stor_db": { // database used to store offline tariff plans and CDRs
86 "db_type": "*mysql", // stor database type to use: <*mongo|*mysql|*postgres|*internal>
87 "db_host": "127.0.0.1", // the host to connect to
88 "db_port": 3306, // the port to reach the stor_db
89 "db_name": "cgrates", // stor database name
90 "db_user": "cgrates", // username to use when connecting to stor_db
91 "db_password": "CGRateS.org", // password to use when connecting to stor_db
92 // "max_open_conns": 100, // maximum database connections opened, not applying for mongo
93 // "max_idle_conns": 10, // maximum database connections idle, not applying for mongo
94 // "conn_max_lifetime": 0, // maximum amount of time in seconds a connection may be reused (0 for unlimited), not applying for mongo
95 // "string_indexed_fields": [], // indexes on cdrs table to speed up queries, used in case of *mongo and *internal
96 // "prefix_indexed_fields":[], // prefix indexes on cdrs table to speed up queries, used in case of *internal
97 // "query_timeout":"10s",
98 // "sslmode":"disable", // sslmode in case of *postgres
99 // "items":{
100 // "session_costs": {"limit": -1, "ttl": "", "static_ttl": false},
101 // "cdrs": {"limit": -1, "ttl": "", "static_ttl": false},
102 // "tp_timings":{"limit": -1, "ttl": "", "static_ttl": false},
103 // "tp_destinations": {"limit": -1, "ttl": "", "static_ttl": false},
104 // "tp_rates": {"limit": -1, "ttl": "", "static_ttl": false},
105 // "tp_destination_rates": {"limit": -1, "ttl": "", "static_ttl": false},
106 // "tp_rating_plans":{"limit": -1, "ttl": "", "static_ttl": false},
107 // "tp_rating_profiles":{"limit": -1, "ttl": "", "static_ttl": false},
108 // "tp_shared_groups": {"limit": -1, "ttl": "", "static_ttl": false},
109 // "tp_actions":{"limit": -1, "ttl": "", "static_ttl": false},
110 // "tp_action_plans":{"limit": -1, "ttl": "", "static_ttl": false},
111 // "tp_action_triggers":{"limit": -1, "ttl": "", "static_ttl": false},
112 // "tp_account_actions": {"limit": -1, "ttl": "", "static_ttl": false},
113 // "tp_resources":{"limit": -1, "ttl": "", "static_ttl": false},
114 // "tp_stats":{"limit": -1, "ttl": "", "static_ttl": false},
115 // "tp_thresholds": {"limit": -1, "ttl": "", "static_ttl": false},
116 // "tp_filters": {"limit": -1, "ttl": "", "static_ttl": false},
117 // "tp_suppliers": {"limit": -1, "ttl": "", "static_ttl": false},
118 // "tp_attributes":{"limit": -1, "ttl": "", "static_ttl": false},
119 // "tp_chargers":{"limit": -1, "ttl": "", "static_ttl": false},
120 // "versions": {"limit": -1, "ttl": "", "static_ttl": false},
121 // "tp_dispatcher_profiles":{"limit": -1, "ttl": "", "static_ttl": false},
122 // "tp_dispatcher_hosts":{"limit": -1, "ttl": "", "static_ttl": false},
123 // },
124},
125
126
127"listen": {
128 "rpc_json": "127.0.0.1:2012", // RPC JSON listening address
129 "rpc_gob": "127.0.0.1:2013", // RPC GOB listening address
130 "http": "127.0.0.1:2080", // HTTP listening address
131// "rpc_json_tls" : "127.0.0.1:2022", // RPC JSON TLS listening address
132// "rpc_gob_tls": "127.0.0.1:2023", // RPC GOB TLS listening address
133// "http_tls": "127.0.0.1:2280", // HTTP TLS listening address
134},
135
136
137// "tls": {
138// "server_certificate" : "", // path to server certificate
139// "server_key":"", // path to server key
140// "client_certificate" : "", // path to client certificate
141// "client_key":"", // path to client key
142// "ca_certificate":"", // path to CA certificate (populate for self-signed certificate otherwise let it empty)
143// "server_policy":4, // server_policy determines the TLS Client Authentication (0-NoClientCert, 1-RequestClientCert, 2-RequireAnyClientCert, 3-VerifyClientCertIfGiven, 4-RequireAndVerifyClientCert)
144// "server_name":"",
145// },
146
147
148// "http": { // HTTP server configuration
149// "json_rpc_url": "/jsonrpc", // JSON RPC relative URL ("" to disable)
150// "ws_url": "/ws", // WebSockets relative URL ("" to disable)
151// "freeswitch_cdrs_url": "/freeswitch_json", // Freeswitch CDRS relative URL ("" to disable)
152// "http_cdrs": "/cdr_http", // CDRS relative URL ("" to disable)
153// "use_basic_auth": false, // use basic authentication
154// "auth_users": {}, // basic authentication usernames and base64-encoded passwords (eg: { "username1": "cGFzc3dvcmQ=", "username2": "cGFzc3dvcmQy "})
155// },
156
157
158"schedulers": {
159 "enabled": true, // start Scheduler service: <true|false>
160 "cdrs_conns": ["*internal"], // connections to CDRs for *cdrlog actions <""|*internal|$rpc_conns_id>
161 // "filters": [], // only execute actions matching these filters
162},
163
164
165// "caches":{
166// "partitions": {
167// "*destinations": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false}, // destination caching
168// "*reverse_destinations": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false}, // reverse destinations index caching
169// "*rating_plans": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false}, // rating plans caching
170// "*rating_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false}, // rating profiles caching
171// "*actions": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false}, // actions caching
172// "*action_plans": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false}, // action plans caching
173// "*account_action_plans": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false}, // account action plans index caching
174// "*action_triggers": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false}, // action triggers caching
175// "*shared_groups": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false}, // shared groups caching
176// "*timings": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false}, // timings caching
177// "*resource_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false}, // control resource profiles caching
178// "*resources": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false}, // control resources caching
179// "*event_resources": {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, // matching resources to events
180// "*statqueue_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false}, // statqueue profiles
181// "*statqueues": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false}, // statqueues with metrics
182// "*threshold_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false}, // control threshold profiles caching
183// "*thresholds": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false}, // control thresholds caching
184// "*filters": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false}, // control filters caching
185// "*supplier_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false}, // control supplier profile caching
186// "*attribute_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false}, // control attribute profile caching
187// "*charger_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false}, // control charger profile caching
188// "*dispatcher_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false}, // control dispatcher profile caching
189// "*dispatcher_hosts": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false}, // control dispatcher hosts caching
190// "*resource_filter_indexes" : {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, // control resource filter indexes caching
191// "*stat_filter_indexes" : {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, // control stat filter indexes caching
192// "*threshold_filter_indexes" : {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, // control threshold filter indexes caching
193// "*supplier_filter_indexes" : {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, // control supplier filter indexes caching
194// "*attribute_filter_indexes" : {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, // control attribute filter indexes caching
195// "*charger_filter_indexes" : {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, // control charger filter indexes caching
196// "*dispatcher_filter_indexes" : {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, // control dispatcher filter indexes caching
197// "*dispatcher_routes": {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, // control dispatcher routes caching
198// "*dispatcher_loads": {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, // control dispatcher load ( in case of *load strategy )
199// "*dispatchers": {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, // control dispatcher interface
200// "*diameter_messages": {"limit": -1, "ttl": "3h", "static_ttl": false, "replicate": false}, // diameter messages caching
201// "*rpc_responses": {"limit": 0, "ttl": "2s", "static_ttl": false, "replicate": false}, // RPC responses caching
202// "*closed_sessions": {"limit": -1, "ttl": "10s", "static_ttl": false, "replicate": false}, // closed sessions cached for CDRs
203// "*cdr_ids": {"limit": -1, "ttl": "10m", "static_ttl": false, "replicate": false}, // protects CDRs against double-charging
204// "*load_ids": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false}, // control the load_ids for items
205// "*rpc_connections": {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, // RPC connections caching
206// "*uch": {"limit": -1, "ttl": "3h", "static_ttl": false, "replicate": false}, // User cache
207// },
208// "replication_conns": [],
209// },
210
211
212// "filters": { // Filters configuration (*new)
213// "stats_conns": [], // connections to StatS for <*stats> filters, empty to disable stats functionality: <""|*internal|$rpc_conns_id>
214// "resources_conns": [], // connections to ResourceS for <*resources> filters, empty to disable stats functionality: <""|*internal|$rpc_conns_id>
215// "apiers_conns": [], // connections to RALs for <*accounts> filters, empty to disable stats functionality: <""|*internal|$rpc_conns_id>
216// },
217
218
219"rals": {
220 "enabled": true, // enable Rating/Accounting service: <true|false>
221 // "thresholds_conns": [], // connections to ThresholdS for account/balance updates, empty to disable thresholds functionality: <""|*internal|$rpc_conns_id>
222 // "stats_conns": [], // connections to StatS for account/balance updates, empty to disable stats functionality: <""|*internal|$rpc_conns_id>
223 // "caches_conns":["*internal"], // connections to CacheS for account/balance updates
224 // "rp_subject_prefix_matching": false, // enables prefix matching for the rating profile subject
225 // "remove_expired":true, // enables automatic removal of expired balances
226 // "max_computed_usage": { // do not compute usage higher than this, prevents memory overload
227 // "*any": "189h",
228 // "*voice": "72h",
229 // "*data": "107374182400",
230 // "*sms": "10000",
231 // "*mms": "10000"
232 // },
233 // "max_increments": 1000000,
234 // "balance_rating_subject":{ // default rating subject in case that balance rating subject is empty
235 // "*any": "*zero1ns",
236 // "*voice": "*zero1s"
237 // },
238},
239
240
241"cdrs": { // CDRs config
242 "enabled": true, // start the CDR Server: <true|false>
243// "extra_fields": [], // extra fields to store in CDRs for non-generic CDRs (ie: FreeSWITCH JSON)
244 "store_cdrs": true, // store cdrs in StorDB
245// "session_cost_retries": 5, // number of queries to session_costs before recalculating CDR
246 "chargers_conns": ["*internal"], // connection to ChargerS for CDR forking, empty to disable billing for CDRs: <""|*internal|$rpc_conns_id>
247 "rals_conns": ["*internal"], // connections to RALs for cost calculation: <""|*internal|$rpc_conns_id>
248 "attributes_conns": ["*internal"], // connection to AttributeS for altering *raw CDRs, empty to disable attributes functionality: <""|*internal|$rpc_conns_id>
249// "thresholds_conns": [], // connection to ThresholdS for CDR reporting, empty to disable thresholds functionality: <""|*internal|$rpc_conns_id>
250 "stats_conns": ["*internal"], // connections to StatS for CDR reporting, empty to disable stats functionality: <""|*internal|$rpc_conns_id>
251// "online_cdr_exports":[], // list of CDRE profiles to use for real-time CDR exports
252 },
253
254
255// "cdre": { // CDRe config
256// "*default": {
257// "export_format": "*file_csv", // exported CDRs format <*file_csv|*file_fwv|*http_post|*http_json_cdr|*http_json_map|*amqp_json_cdr|*amqp_json_map|*sqs_json_map>
258// "export_path": "/var/spool/cgrates/cdre", // path where the exported CDRs will be placed
259// "filters" :[], // filters for this export
260// "tenant": "", // tenant used in filterS.Pass
261// "synchronous": false, // block processing until export has a result
262// "attempts": 1, // export attempts
263// "field_separator": ",", // used field separator in some export formats, eg: *file_csv
264// "attributes_context": "", // attributes context - empty disables attributes processing
265// "fields": [ // template of the exported content fields
266// {"path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"},
267// {"path": "*exp.RunID", "type": "*variable", "value": "~*req.RunID"},
268// {"path": "*exp.ToR", "type": "*variable", "value": "~*req.ToR"},
269// {"path": "*exp.OriginID", "type": "*variable", "value": "~*req.OriginID"},
270// {"path": "*exp.RequestType", "type": "*variable", "value": "~*req.RequestType"},
271// {"path": "*exp.Tenant", "type": "*variable", "value": "~*req.Tenant"},
272// {"path": "*exp.Category", "type": "*variable", "value": "~*req.Category"},
273// {"path": "*exp.Account", "type": "*variable", "value": "~*req.Account"},
274// {"path": "*exp.Subject", "type": "*variable", "value": "~*req.Subject"},
275// {"path": "*exp.Destination", "type": "*variable", "value": "~*req.Destination"},
276// {"path": "*exp.SetupTime", "type": "*variable", "value": "~*req.SetupTime", "layout": "2006-01-02T15:04:05Z07:00"},
277// {"path": "*exp.AnswerTime", "type": "*variable", "value": "~*req.AnswerTime", "layout": "2006-01-02T15:04:05Z07:00"},
278// {"path": "*exp.Usage", "type": "*variable", "value": "~*req.Usage"},
279// {"path": "*exp.Cost", "type": "*variable", "value": "~*req.Cost", "rounding_decimals": 4},
280// ],
281// },
282
283
284
285"ers": { // EventReaderService
286 "enabled": true, // starts the EventReader service: <true|false>
287 "sessions_conns":["*internal"], // RPC Connections IDs
288 "readers": [
289 {
290 "id": "Roaming", // identifier of the EventReader profile
291 "type": "*file_csv", // reader type <*file_csv>
292 //"row_length" : 0, // Number of fields from csv file
293 "field_separator": ";", // separator used in case of csv files
294 "run_delay": "-1", // sleep interval in seconds between consecutive runs, -1 to use automation via inotify or 0 to disable running all together
295 "concurrent_requests": 1024, // maximum simultaneous requests/files to process, 0 for unlimited
296 "source_path": "/var/spool/cgrates/cdrc/in", // read data from this path
297 "processed_path": "/var/spool/cgrates/cdrc/out", // move processed data here
298 // "xml_root_path": "", // path towards one event in case of XML CDRs
299 "tenant": "softnet-mobil", // tenant used by import
300 // "timezone": "", // timezone for timestamps where not specified <""|UTC|Local|$IANA_TZ_DB>
301 "filters": ["*string:~*req.5:20","*string:~*req.19:0","*string:~*req.20:10"], // limit parsing based on the filters
302 "flags": ["*cdrs","*initiate","*attributes","*log"], // flags to influence the event processing
303 "fields":[
304 {"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
305 {"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable", "value": "~*req.3", "mandatory": true},
306 {"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*constant", "value": "*postpaid", "mandatory": true},
307 {"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*constant", "value": "softnet-mobil", "mandatory": true},
308 {"tag": "Category", "path": "*cgreq.Category", "type": "*variable", "value": "~*req.4:s/(\\d+)/voice-${1}/", "mandatory": true},
309 {"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.7", "mandatory": true},
310 {"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable", "value": "~*req.7", "mandatory": true},
311 {"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.9", "mandatory": true},
312 {"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.14", "mandatory": true},
313 {"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable", "value": "~*req.16:s/(\\d+)/${1}s/", "mandatory": true},
314// import fields template, tag will match internally CDR field, in case of .csv value will be represented by index of the field value
315 // {"tag": "ToR", "path": "*cgreq.ToR", "type": "*variable", "value": "~*req.2", "mandatory": true},
316 // {"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable", "value": "~*req.3", "mandatory": true},
317 // {"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*variable", "value": "~*req.4", "mandatory": true},
318 // {"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*variable", "value": "~*req.6", "mandatory": true},
319 // {"tag": "Category", "path": "*cgreq.Category", "type": "*variable", "value": "~*req.7", "mandatory": true},
320 // {"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.8", "mandatory": true},
321 // {"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable", "value": "~*req.9", "mandatory": true},
322 // {"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.10", "mandatory": true},
323 // {"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable", "value": "~*req.11", "mandatory": true},
324 // {"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.12", "mandatory": true},
325 // {"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable", "value": "~*req.13", "mandatory": true},
326 ],
327 "cache_dump_fields": [],
328 },
329 ],
330},
331
332
333"sessions": {
334 "enabled": true, // starts the session service: <true|false>
335// "listen_bijson": "127.0.0.1:2014", // address where to listen for bidirectional JSON-RPC requests
336 "chargers_conns": ["*localhost"], // connections to ChargerS for session forking <""|*internal|$rpc_conns_id>
337 "rals_conns": ["*localhost"], // connections to RALs for rating/accounting <""|*internal|$rpc_conns_id>
338 "cdrs_conns": ["*localhost"], // connections to CDRs for CDR posting <""|*internal|$rpc_conns_id>
339 "resources_conns": ["*localhost"], // connections to ResourceS for resources monitoring <""|*internal|$rpc_conns_id>
340 // "thresholds_conns": [], // connections to ThresholdS for reporting session events <""|*internal|$rpc_conns_id>
341 // "stats_conns": [], // connections to StatS for reporting session events <""|*internal|$rpc_conns_id>
342 // "suppliers_conns": [], // connections to SupplierS for querying suppliers for event <""|*internal|$rpc_conns_id>
343 "attributes_conns": ["*localhost"], // connections to AttributeS for altering event fields <""|*internal|$rpc_conns_id>
344 // "replication_conns": [], // replicate sessions towards these session services
345 // "debit_interval": "0s", // interval to perform debits on.
346 // "store_session_costs": false, // enable storing of the session costs within CDRs
347 // "min_call_duration": "0s", // only authorize calls with allowed duration higher than this
348 // "max_call_duration": "3h", // maximum call duration a prepaid call can last
349 // "session_ttl": "0s", // time after a session with no updates is terminated, not defined by default
350 // //"session_ttl_max_delay": "", // activates session_ttl randomization and limits the maximum possible delay
351 // //"session_ttl_last_used": "", // tweak LastUsed for sessions timing-out, not defined by default
352 // //"session_ttl_usage": "", // tweak Usage for sessions timing-out, not defined by default
353 // "session_indexes": [], // index sessions based on these fields for GetActiveSessions API
354 // "client_protocol": 1.0, // version of protocol to use when acting as JSON-PRC client <"0","1.0">
355 // "channel_sync_interval": "0", // sync channels to detect stale sessions (0 to disable)
356 // "terminate_attempts": 5, // attempts to get the session before terminating it
357 // "alterable_fields": [], // the session fields that can be updated
358 // //"min_dur_low_balance": "5s", // threshold which will trigger low balance warnings for prepaid calls (needs to be lower than debit_interval)
359},
360
361
362// "asterisk_agent": {
363// "enabled": false, // starts the Asterisk agent: <true|false>
364// "sessions_conns": ["*internal"],
365// "create_cdr": false, // create CDR out of events and sends it to CDRS component
366// "asterisk_conns":[ // instantiate connections to multiple Asterisk servers
367// {"address": "127.0.0.1:8088", "user": "cgrates", "password": "CGRateS.org", "connect_attempts": 3,"reconnects": 5}
368// ],
369// },
370
371
372// "freeswitch_agent": {
373// "enabled": false, // starts the FreeSWITCH agent: <true|false>
374// "sessions_conns": ["*internal"],
375// "subscribe_park": true, // subscribe via fsock to receive park events
376// "create_cdr": false, // creates CDR out of events and sends them to CDRS component
377// "extra_fields": [], // extra fields to store in auth/CDRs when creating them
378// "low_balance_ann_file": "", // file to be played when low balance is reached for prepaid calls
379// "empty_balance_context": "", // if defined, prepaid calls will be transferred to this context on empty balance
380// "empty_balance_ann_file": "", // file to be played before disconnecting prepaid calls on empty balance (applies only if no context defined)
381// "max_wait_connection": "2s", // maximum duration to wait for a connection to be retrieved from the pool
382// "event_socket_conns":[ // instantiate connections to multiple FreeSWITCH servers
383// {"address": "127.0.0.1:8021", "password": "ClueCon", "reconnects": 5,"alias":""}
384// ],
385// },
386
387
388// "kamailio_agent": {
389// "enabled": false, // starts Kamailio agent: <true|false>
390// "sessions_conns": ["*internal"],
391// "create_cdr": false, // create CDR out of events and sends them to CDRS component
392// "timezone": "", // timezone of the Kamailio server
393// "evapi_conns":[ // instantiate connections to multiple Kamailio servers
394// {"address": "127.0.0.1:8448", "reconnects": 5}
395// ],
396// },
397
398
399// "diameter_agent": {
400// "enabled": false, // enables the diameter agent: <true|false>
401// "listen": "127.0.0.1:3868", // address where to listen for diameter requests <x.y.z.y/x1.y1.z1.y1:1234>
402// "listen_net": "tcp", // transport type for diameter <tcp|sctp>
403// "dictionaries_path": "/usr/share/cgrates/diameter/dict/", // path towards directory holding additional dictionaries to load
404// "sessions_conns": ["*internal"],
405// "origin_host": "CGR-DA", // diameter Origin-Host AVP used in replies
406// "origin_realm": "cgrates.org", // diameter Origin-Realm AVP used in replies
407// "vendor_id": 0, // diameter Vendor-Id AVP used in replies
408// "product_name": "CGRateS", // diameter Product-Name AVP used in replies
409// "concurrent_requests": -1, // limit the number of active requests processed by the server <-1|0-n>
410// "synced_conn_requests": false, // process one request at the time per connection
411// "asr_template": "", // enable AbortSession message being sent to client on DisconnectSession
412// "rar_template": "", // template used to build the Re-Auth-Request
413// "forced_disconnect": "*none", // the request to send to diameter on DisconnectSession <*none|*asr|*rar>
414// "templates":{ // default message templates
415// "*err": [
416// {"tag": "SessionId", "path": "*rep.Session-Id", "type": "*variable",
417// "value": "~*req.Session-Id", "mandatory": true},
418// {"tag": "OriginHost", "path": "*rep.Origin-Host", "type": "*variable",
419// "value": "~*vars.OriginHost", "mandatory": true},
420// {"tag": "OriginRealm", "path": "*rep.Origin-Realm", "type": "*variable",
421// "value": "~*vars.OriginRealm", "mandatory": true},
422// ],
423// "*cca": [
424// {"tag": "SessionId", "path": "*rep.Session-Id", "type": "*variable",
425// "value": "~*req.Session-Id", "mandatory": true},
426// {"tag": "ResultCode", "path": "*rep.Result-Code", "type": "*constant",
427// "value": "2001"},
428// {"tag": "OriginHost", "path": "*rep.Origin-Host", "type": "*variable",
429// "value": "~*vars.OriginHost", "mandatory": true},
430// {"tag": "OriginRealm", "path": "*rep.Origin-Realm", "type": "*variable",
431// "value": "~*vars.OriginRealm", "mandatory": true},
432// {"tag": "AuthApplicationId", "path": "*rep.Auth-Application-Id", "type": "*variable",
433// "value": "~*vars.*appid", "mandatory": true},
434// {"tag": "CCRequestType", "path": "*rep.CC-Request-Type", "type": "*variable",
435// "value": "~*req.CC-Request-Type", "mandatory": true},
436// {"tag": "CCRequestNumber", "path": "*rep.CC-Request-Number", "type": "*variable",
437// "value": "~*req.CC-Request-Number", "mandatory": true},
438// ],
439// "*asr": [
440// {"tag": "SessionId", "path": "*diamreq.Session-Id", "type": "*variable",
441// "value": "~*req.Session-Id", "mandatory": true},
442// {"tag": "OriginHost", "path": "*diamreq.Origin-Host", "type": "*variable",
443// "value": "~*req.Destination-Host", "mandatory": true},
444// {"tag": "OriginRealm", "path": "*diamreq.Origin-Realm", "type": "*variable",
445// "value": "~*req.Destination-Realm", "mandatory": true},
446// {"tag": "DestinationRealm", "path": "*diamreq.Destination-Realm", "type": "*variable",
447// "value": "~*req.Origin-Realm", "mandatory": true},
448// {"tag": "DestinationHost", "path": "*diamreq.Destination-Host", "type": "*variable",
449// "value": "~*req.Origin-Host", "mandatory": true},
450// {"tag": "AuthApplicationId", "path": "*diamreq.Auth-Application-Id", "type": "*variable",
451// "value": "~*vars.*appid", "mandatory": true},
452// ],
453// "*rar": [
454// {"tag": "SessionId", "path": "*diamreq.Session-Id", "type": "*variable",
455// "value": "~*req.Session-Id", "mandatory": true},
456// {"tag": "OriginHost", "path": "*diamreq.Origin-Host", "type": "*variable",
457// "value": "~*req.Destination-Host", "mandatory": true},
458// {"tag": "OriginRealm", "path": "*diamreq.Origin-Realm", "type": "*variable",
459// "value": "~*req.Destination-Realm", "mandatory": true},
460// {"tag": "DestinationRealm", "path": "*diamreq.Destination-Realm", "type": "*variable",
461// "value": "~*req.Origin-Realm", "mandatory": true},
462// {"tag": "DestinationHost", "path": "*diamreq.Destination-Host", "type": "*variable",
463// "value": "~*req.Origin-Host", "mandatory": true},
464// {"tag": "AuthApplicationId", "path": "*diamreq.Auth-Application-Id", "type": "*variable",
465// "value": "~*vars.*appid", "mandatory": true},
466// {"tag": "ReAuthRequestType", "path": "*diamreq.Re-Auth-Request-Type", "type": "*constant",
467// "value": "0"},
468// ]
469// },
470// "request_processors": [ // list of processors to be applied to diameter messages
471// ],
472// },
473
474
475// "radius_agent": {
476// "enabled": false, // enables the radius agent: <true|false>
477// "listen_net": "udp", // network to listen on <udp|tcp>
478// "listen_auth": "127.0.0.1:1812", // address where to listen for radius authentication requests <x.y.z.y:1234>
479// "listen_acct": "127.0.0.1:1813", // address where to listen for radius accounting requests <x.y.z.y:1234>
480// "client_secrets": { // hash containing secrets for clients connecting here <*default|$client_ip>
481// "*default": "CGRateS.org"
482// },
483// "client_dictionaries": { // per client path towards directory holding additional dictionaries to load (extra to RFC)
484// "*default": "/usr/share/cgrates/radius/dict/", // key represents the client IP or catch-all <*default|$client_ip>
485// },
486// "sessions_conns": ["*internal"],
487// "request_processors": [ // request processors to be applied to Radius messages
488// ],
489// },
490
491
492// "http_agent": [ // HTTP Agents, ie towards cnc.to MVNE platform
493// ],
494
495
496// "dns_agent": {
497// "enabled": false, // enables the DNS agent: <true|false>
498// "listen": "127.0.0.1:2053", // address where to listen for DNS requests <x.y.z.y:1234>
499// "listen_net": "udp", // network to listen on <udp|tcp|tcp-tls>
500// "sessions_conns": ["*internal"],
501// "timezone": "", // timezone of the events if not specified <UTC|Local|$IANA_TZ_DB>
502// "request_processors": [ // request processors to be applied to DNS messages
503// ],
504// },
505
506
507"attributes": { // AttributeS config
508 "enabled": true, // starts attribute service: <true|false>.
509// "indexed_selects":true, // enable profile matching exclusively on indexes
510 //"string_indexed_fields": [], // query indexes based on these fields for faster processing
511 // "prefix_indexed_fields": [], // query indexes based on these fields for faster processing
512 // "nested_fields": false, // determines which field is checked when matching indexed filters(true: all; false: only the one on the first level)
513 // "process_runs": 1, // number of run loops when processing event
514},
515
516
517"chargers": { // ChargerS config
518 "enabled": true, // starts charger service: <true|false>.
519 "attributes_conns": ["*internal"], // connections to AttributeS for event fields altering <""|127.0.0.1:2013>
520// "indexed_selects":true, // enable profile matching exclusively on indexes
521 //"string_indexed_fields": [], // query indexes based on these fields for faster processing
522 // "prefix_indexed_fields": [], // query indexes based on these fields for faster processing
523 // "nested_fields": false, // determines which field is checked when matching indexed filters(true: all; false: only the one on the first level)
524},
525
526
527"resources": { // ResourceS config
528 "enabled": true, // starts ResourceLimiter service: <true|false>.
529 // "store_interval": "", // dump cache regularly to dataDB, 0 - dump at start/shutdown: <""|$dur>
530 // "thresholds_conns": [], // connections to ThresholdS for resource reporting, empty to disable thresholds functionality: <""|*internal|$rpc_conns_id>
531 // "indexed_selects":true, // enable profile matching exclusively on indexes
532 // "string_indexed_fields": [], // query indexes based on these fields for faster processing
533 // "prefix_indexed_fields": [], // query indexes based on these fields for faster processing
534 // "nested_fields": false, // determines which field is checked when matching indexed filters(true: all; false: only the one on the first level)
535},
536
537
538 "stats": { // StatS config
539 "enabled": true, // starts Stat service: <true|false>.
540 "store_interval": "0", // dump cache regularly to dataDB, 0 - dump at start/shutdown: <""|$dur>
541// "store_uncompressed_limit": 0, // used to compress data
542// "thresholds_conns": [], // connections to ThresholdS for StatUpdates, empty to disable thresholds functionality: <""|*internal|$rpc_conns_id>
543// "indexed_selects":true, // enable profile matching exclusively on indexes
544// "string_indexed_fields": [], // query indexes based on these fields for faster processing
545// "prefix_indexed_fields": [], // query indexes based on these fields for faster processing
546// "nested_fields": false, // determines which field is checked when matching indexed filters(true: all; false: only the one on the first level)
547 },
548
549
550// "thresholds": { // ThresholdS
551// "enabled": false, // starts ThresholdS service: <true|false>.
552// "store_interval": "", // dump cache regularly to dataDB, 0 - dump at start/shutdown: <""|$dur>
553// "indexed_selects":true, // enable profile matching exclusively on indexes
554// "string_indexed_fields": [], // query indexes based on these fields for faster processing
555// "prefix_indexed_fields": [], // query indexes based on these fields for faster processing
556// "nested_fields": false, // determines which field is checked when matching indexed filters(true: all; false: only the one on the first level)
557// },
558
559
560// "suppliers": { // SupplierS config
561// "enabled": false, // starts SupplierS service: <true|false>.
562// "indexed_selects":true, // enable profile matching exclusively on indexes
563// "string_indexed_fields": [], // query indexes based on these fields for faster processing
564// "prefix_indexed_fields": [], // query indexes based on these fields for faster processing
565// "nested_fields": false, // determines which field is checked when matching indexed filters(true: all; false: only the one on the first level)
566// "attributes_conns": [], // connections to AttributeS for altering events before supplier queries: <""|*internal|$rpc_conns_id>
567// "resources_conns": [], // connections to ResourceS for *res sorting, empty to disable functionality: <""|*internal|$rpc_conns_id>
568// "stats_conns": [], // connections to StatS for *stats sorting, empty to disable stats functionality: <""|*internal|$rpc_conns_id>
569// "rals_conns": [], // connections to Rater for calculating cost, empty to disable stats functionality: <""|*internal|$rpc_conns_id>
570// "default_ratio":1 // default ratio used in case of *load strategy
571// },
572
573
574// "loaders": [ // LoaderS config
575// {
576// "id": "*default", // identifier of the Loader
577// "enabled": false, // starts as service: <true|false>.
578// "tenant": "", // tenant used in filterS.Pass
579// "dry_run": false, // do not send the CDRs to CDRS, just parse them
580// "run_delay": 0, // sleep interval in seconds between consecutive runs, 0 to use automation via inotify
581// "lock_filename": ".cgr.lck", // Filename containing concurrency lock in case of delayed processing
582// "caches_conns": ["*internal"],
583// "field_separator": ",", // separator used in case of csv files
584// "tp_in_dir": "/var/spool/cgrates/loader/in", // absolute path towards the directory where the TPs are stored
585// "tp_out_dir": "/var/spool/cgrates/loader/out", // absolute path towards the directory where processed TPs will be moved
586// "data":[ // data profiles to load
587// {
588// "type": "*attributes", // data source type
589// "file_name": "Attributes.csv", // file name in the tp_in_dir
590// "fields": [
591// {"tag": "TenantID", "path": "Tenant", "type": "*variable", "value": "~0", "mandatory": true},
592// {"tag": "ProfileID", "path": "ID", "type": "*variable", "value": "~1", "mandatory": true},
593// {"tag": "Contexts", "path": "Contexts", "type": "*variable", "value": "~2"},
594// {"tag": "FilterIDs", "path": "FilterIDs", "type": "*variable", "value": "~3"},
595// {"tag": "ActivationInterval", "path": "ActivationInterval", "type": "*variable", "value": "~4"},
596// {"tag": "AttributeFilterIDs", "path": "AttributeFilterIDs", "type": "*variable", "value": "~5"},
597// {"tag": "Path", "path": "Path", "type": "*variable", "value": "~6"},
598// {"tag": "Type", "path": "Type", "type": "*variable", "value": "~7"},
599// {"tag": "Value", "path": "Value", "type": "*variable", "value": "~8"},
600// {"tag": "Blocker", "path": "Blocker", "type": "*variable", "value": "~9"},
601// {"tag": "Weight", "path": "Weight", "type": "*variable", "value": "~10"},
602// ],
603// },
604// {
605// "type": "*filters", // data source type
606// "file_name": "Filters.csv", // file name in the tp_in_dir
607// "fields": [
608// {"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~0", "mandatory": true},
609// {"tag": "ID", "path": "ID", "type": "*variable", "value": "~1", "mandatory": true},
610// {"tag": "Type", "path": "Type", "type": "*variable", "value": "~2"},
611// {"tag": "Element", "path": "Element", "type": "*variable", "value": "~3"},
612// {"tag": "Values", "path": "Values", "type": "*variable", "value": "~4"},
613// {"tag": "ActivationInterval", "path": "ActivationInterval", "type": "*variable", "value": "~5"},
614// ],
615// },
616// {
617// "type": "*resources", // data source type
618// "file_name": "Resources.csv", // file name in the tp_in_dir
619// "fields": [
620// {"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~0", "mandatory": true},
621// {"tag": "ID", "path": "ID", "type": "*variable", "value": "~1", "mandatory": true},
622// {"tag": "FilterIDs", "path": "FilterIDs", "type": "*variable", "value": "~2"},
623// {"tag": "ActivationInterval", "path": "ActivationInterval", "type": "*variable", "value": "~3"},
624// {"tag": "TTL", "path": "UsageTTL", "type": "*variable", "value": "~4"},
625// {"tag": "Limit", "path": "Limit", "type": "*variable", "value": "~5"},
626// {"tag": "AllocationMessage", "path": "AllocationMessage", "type": "*variable", "value": "~6"},
627// {"tag": "Blocker", "path": "Blocker", "type": "*variable", "value": "~7"},
628// {"tag": "Stored", "path": "Stored", "type": "*variable", "value": "~8"},
629// {"tag": "Weight", "path": "Weight", "type": "*variable", "value": "~9"},
630// {"tag": "ThresholdIDs", "path": "ThresholdIDs", "type": "*variable", "value": "~10"},
631// ],
632// },
633// {
634// "type": "*stats", // data source type
635// "file_name": "Stats.csv", // file name in the tp_in_dir
636// "fields": [
637// {"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~0", "mandatory": true},
638// {"tag": "ID", "path": "ID", "type": "*variable", "value": "~1", "mandatory": true},
639// {"tag": "FilterIDs", "path": "FilterIDs", "type": "*variable", "value": "~2"},
640// {"tag": "ActivationInterval", "path": "ActivationInterval", "type": "*variable", "value": "~3"},
641// {"tag": "QueueLength", "path": "QueueLength", "type": "*variable", "value": "~4"},
642// {"tag": "TTL", "path": "TTL", "type": "*variable", "value": "~5"},
643// {"tag": "MinItems", "path": "MinItems", "type": "*variable", "value": "~6"},
644// {"tag": "MetricIDs", "path": "MetricIDs", "type": "*variable", "value": "~7"},
645// {"tag": "MetricFilterIDs", "path": "MetricFilterIDs", "type": "*variable", "value": "~8"},
646// {"tag": "Blocker", "path": "Blocker", "type": "*variable", "value": "~9"},
647// {"tag": "Stored", "path": "Stored", "type": "*variable", "value": "~10"},
648// {"tag": "Weight", "path": "Weight", "type": "*variable", "value": "~11"},
649// {"tag": "ThresholdIDs", "path": "ThresholdIDs", "type": "*variable", "value": "~12"},
650// ],
651// },
652// {
653// "type": "*thresholds", // data source type
654// "file_name": "Thresholds.csv", // file name in the tp_in_dir
655// "fields": [
656// {"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~0", "mandatory": true},
657// {"tag": "ID", "path": "ID", "type": "*variable", "value": "~1", "mandatory": true},
658// {"tag": "FilterIDs", "path": "FilterIDs", "type": "*variable", "value": "~2"},
659// {"tag": "ActivationInterval", "path": "ActivationInterval", "type": "*variable", "value": "~3"},
660// {"tag": "MaxHits", "path": "MaxHits", "type": "*variable", "value": "~4"},
661// {"tag": "MinHits", "path": "MinHits", "type": "*variable", "value": "~5"},
662// {"tag": "MinSleep", "path": "MinSleep", "type": "*variable", "value": "~6"},
663// {"tag": "Blocker", "path": "Blocker", "type": "*variable", "value": "~7"},
664// {"tag": "Weight", "path": "Weight", "type": "*variable", "value": "~8"},
665// {"tag": "ActionIDs", "path": "ActionIDs", "type": "*variable", "value": "~9"},
666// {"tag": "Async", "path": "Async", "type": "*variable", "value": "~10"},
667// ],
668// },
669// {
670// "type": "*suppliers", // data source type
671// "file_name": "Suppliers.csv", // file name in the tp_in_dir
672// "fields": [
673// {"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~0", "mandatory": true},
674// {"tag": "ID", "path": "ID", "type": "*variable", "value": "~1", "mandatory": true},
675// {"tag": "FilterIDs", "path": "FilterIDs", "type": "*variable", "value": "~2"},
676// {"tag": "ActivationInterval", "path": "ActivationInterval", "type": "*variable", "value": "~3"},
677// {"tag": "Sorting", "path": "Sorting", "type": "*variable", "value": "~4"},
678// {"tag": "SortingParamameters", "path": "SortingParamameters", "type": "*variable", "value": "~5"},
679// {"tag": "SupplierID", "path": "SupplierID", "type": "*variable", "value": "~6"},
680// {"tag": "SupplierFilterIDs", "path": "SupplierFilterIDs", "type": "*variable", "value": "~7"},
681// {"tag": "SupplierAccountIDs", "path": "SupplierAccountIDs", "type": "*variable", "value": "~8"},
682// {"tag": "SupplierRatingPlanIDs", "path": "SupplierRatingPlanIDs", "type": "*variable", "value": "~9"},
683// {"tag": "SupplierResourceIDs", "path": "SupplierResourceIDs", "type": "*variable", "value": "~10"},
684// {"tag": "SupplierStatIDs", "path": "SupplierStatIDs", "type": "*variable", "value": "~11"},
685// {"tag": "SupplierWeight", "path": "SupplierWeight", "type": "*variable", "value": "~12"},
686// {"tag": "SupplierBlocker", "path": "SupplierBlocker", "type": "*variable", "value": "~13"},
687// {"tag": "SupplierParameters", "path": "SupplierParameters", "type": "*variable", "value": "~14"},
688// {"tag": "Weight", "path": "Weight", "type": "*variable", "value": "~15"},
689// ],
690// },
691// {
692// "type": "*chargers", // data source type
693// "file_name": "Chargers.csv", // file name in the tp_in_dir
694// "fields": [
695// {"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~0", "mandatory": true},
696// {"tag": "ID", "path": "ID", "type": "*variable", "value": "~1", "mandatory": true},
697// {"tag": "FilterIDs", "path": "FilterIDs", "type": "*variable", "value": "~2"},
698// {"tag": "ActivationInterval", "path": "ActivationInterval", "type": "*variable", "value": "~3"},
699// {"tag": "RunID", "path": "RunID", "type": "*variable", "value": "~4"},
700// {"tag": "AttributeIDs", "path": "AttributeIDs", "type": "*variable", "value": "~5"},
701// {"tag": "Weight", "path": "Weight", "type": "*variable", "value": "~6"},
702// ],
703// },
704// {
705// "type": "*dispatchers", // data source type
706// "file_name": "DispatcherProfiles.csv", // file name in the tp_in_dir
707// "fields": [
708// {"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~0", "mandatory": true},
709// {"tag": "ID", "path": "ID", "type": "*variable", "value": "~1", "mandatory": true},
710// {"tag": "Contexts", "path": "Contexts", "type": "*variable", "value": "~2"},
711// {"tag": "FilterIDs", "path": "FilterIDs", "type": "*variable", "value": "~3"},
712// {"tag": "ActivationInterval", "path": "ActivationInterval", "type": "*variable", "value": "~4"},
713// {"tag": "Strategy", "path": "Strategy", "type": "*variable", "value": "~5"},
714// {"tag": "StrategyParameters", "path": "StrategyParameters", "type": "*variable", "value": "~6"},
715// {"tag": "ConnID", "path": "ConnID", "type": "*variable", "value": "~7"},
716// {"tag": "ConnFilterIDs", "path": "ConnFilterIDs", "type": "*variable", "value": "~8"},
717// {"tag": "ConnWeight", "path": "ConnWeight", "type": "*variable", "value": "~9"},
718// {"tag": "ConnBlocker", "path": "ConnBlocker", "type": "*variable", "value": "~10"},
719// {"tag": "ConnParameters", "path": "ConnParameters", "type": "*variable", "value": "~11"},
720// {"tag": "Weight", "path": "Weight", "type": "*variable", "value": "~12"},
721// ],
722// },
723// {
724// "type": "*dispatcher_hosts", // data source type
725// "file_name": "DispatcherHosts.csv", // file name in the tp_in_dir
726// "fields": [
727// {"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~0", "mandatory": true},
728// {"tag": "ID", "path": "ID", "type": "*variable", "value": "~1", "mandatory": true},
729// {"tag": "Address", "path": "Address", "type": "*variable", "value": "~2"},
730// {"tag": "Transport", "path": "Transport", "type": "*variable", "value": "~3"},
731// {"tag": "TLS", "path": "TLS", "type": "*variable", "value": "~4"},
732// ],
733// },
734// ],
735// },
736// ],
737
738
739// "mailer": {
740// "server": "localhost", // the server to use when sending emails out
741// "auth_user": "cgrates", // authenticate to email server using this user
742// "auth_password": "CGRateS.org", // authenticate to email server with this password
743// "from_address": "cgr-mailer@localhost.localdomain" // from address used when sending emails out
744// },
745
746
747// "suretax": {
748// "url": "", // API url
749// "client_number": "", // client number, provided by SureTax
750// "validation_key": "", // validation key provided by SureTax
751// "business_unit": "", // client’s Business Unit
752// "timezone": "Local", // convert the time of the events to this timezone before sending request out <UTC|Local|$IANA_TZ_DB>
753// "include_local_cost": false, // sum local calculated cost with tax one in final cost
754// "return_file_code": "0", // default or Quote purposes <0|Q>
755// "response_group": "03", // determines how taxes are grouped for the response <03|13>
756// "response_type": "D4", // determines the granularity of taxes and (optionally) the decimal precision for the tax calculations and amounts in the response
757// "regulatory_code": "03", // provider type
758// "client_tracking": "~*req.CGRID", // template extracting client information out of StoredCdr; <RSRParsers>
759// "customer_number": "~*req.Subject", // template extracting customer number out of StoredCdr; <RSRParsers>
760// "orig_number": "~*req.Subject", // template extracting origination number out of StoredCdr; <RSRParsers>
761// "term_number": "~*req.Destination", // template extracting termination number out of StoredCdr; <RSRParsers>
762// "bill_to_number": "", // template extracting billed to number out of StoredCdr; <RSRParsers>
763// "zipcode": "", // template extracting billing zip code out of StoredCdr; <RSRParsers>
764// "plus4": "", // template extracting billing zip code extension out of StoredCdr; <RSRParsers>
765// "p2pzipcode": "", // template extracting secondary zip code out of StoredCdr; <RSRParsers>
766// "p2pplus4": "", // template extracting secondary zip code extension out of StoredCdr; <RSRParsers>
767// "units": "1", // template extracting number of “lines” or unique charges contained within the revenue out of StoredCdr; <RSRParsers>
768// "unit_type": "00", // template extracting number of unique access lines out of StoredCdr; <RSRParsers>
769// "tax_included": "0", // template extracting tax included in revenue out of StoredCdr; <RSRParsers>
770// "tax_situs_rule": "04", // template extracting tax situs rule out of StoredCdr; <RSRParsers>
771// "trans_type_code": "010101", // template extracting transaction type indicator out of StoredCdr; <RSRParsers>
772// "sales_type_code": "R", // template extracting sales type code out of StoredCdr; <RSRParsers>
773// "tax_exemption_code_list": "", // template extracting tax exemption code list out of StoredCdr; <RSRParsers>
774// },
775
776
777// "loader": { // loader for tariff plans out of .csv files
778// "tpid": "", // tariff plan identificator
779// "data_path": "./", // path towards tariff plan files
780// "disable_reverse": false, // disable reverse computing
781// "field_separator": ",", // separator used in case of csv files
782// "caches_conns":["*localhost"],
783// "scheduler_conns": ["*localhost"],
784// "gapi_credentials": ".gapi/credentials.json", // the path to the credentials for google API or the credentials.json file content
785// "gapi_token": ".gapi/token.json" // the path to the token for google API or the token.json file content
786// },
787
788
789// "migrator": {
790// "out_datadb_type": "redis",
791// "out_datadb_host": "127.0.0.1",
792// "out_datadb_port": "6379",
793// "out_datadb_name": "10",
794// "out_datadb_user": "cgrates",
795// "out_datadb_password": "",
796// "out_datadb_encoding" : "msgpack",
797// "out_stordb_type": "mysql",
798// "out_stordb_host": "127.0.0.1",
799// "out_stordb_port": "3306",
800// "out_stordb_name": "cgrates",
801// "out_stordb_user": "cgrates",
802// "out_stordb_password": "",
803// "users_filters":[],
804// },
805
806
807// "dispatchers":{ // DispatcherS config
808// "enabled": false, // starts DispatcherS service: <true|false>.
809// "indexed_selects":true, // enable profile matching exclusively on indexes
810// "string_indexed_fields": [], // query indexes based on these fields for faster processing
811// "prefix_indexed_fields": [], // query indexes based on these fields for faster processing
812// "nested_fields": false, // determines which field is checked when matching indexed filters(true: all; false: only the one on the first level)
813// "attributes_conns": [], // connections to AttributeS for API authorization, empty to disable auth functionality: <""|*internal|$rpc_conns_id>
814// },
815
816
817"analyzers":{ // AnalyzerS config
818 "enabled":true // starts AnalyzerS service: <true|false>.
819},
820
821
822"apiers": {
823 "enabled": true,
824// "caches_conns":["*internal"],
825 "scheduler_conns": ["*internal"], // connections to SchedulerS for reloads
826 "attributes_conns": ["*internal"], // connections to AttributeS for CDRExporter
827},
828
829}