/*
Real-time Online/Offline Charging System (OCS) for Telecom & ISP environments
Copyright (C) ITsysCOM GmbH

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>
*/

package config

const CGRATES_CFG_JSON = `
{

// Real-time Online/Offline Charging System (OCS) for Telecom & ISP environments
// Copyright (C) ITsysCOM GmbH
//
// This file contains the default configuration hardcoded into CGRateS.
// This is what you get when you load CGRateS with an empty configuration file.

"general": {
	"node_id": "",											// identifier of this instance in the cluster, if empty it will be autogenerated
	"logger":"*syslog",										// controls the destination of logs <*syslog|*stdout>
	"log_level": 6,											// control the level of messages logged (0-emerg to 7-debug)
	"rounding_decimals": 5,									// system level precision for floats
	"dbdata_encoding": "*msgpack",							// encoding used to store object data in strings: <*msgpack|*json>
	"tpexport_dir": "/var/spool/cgrates/tpe",				// path towards export folder for offline TariffPlans
	"poster_attempts": 3,									// number of attempts before considering post request failed (eg: *http_post, CDR exports)
	"failed_posts_dir": "/var/spool/cgrates/failed_posts",	// directory path where we store failed requests
	"failed_posts_ttl": "5s",								// time to wait before writing the failed posts in a single file
	"default_request_type": "*rated",						// default request type to consider when missing from requests: <""|*prepaid|*postpaid|*pseudoprepaid|*rated>
	"default_category": "call",								// default category to consider when missing from requests
	"default_tenant": "cgrates.org",						// default tenant to consider when missing from requests
	"default_timezone": "Local",							// default timezone for timestamps where not specified <""|UTC|Local|$IANA_TZ_DB>
	"default_caching": "*reload",							// default actions to do when caching items
	"min_call_duration": "0s",				                // only authorize calls with allowed duration higher than this
	"max_call_duration": "3h",				                // maximum call duration a prepaid call can last
	"connect_attempts": 5,									// initial server connect attempts
	"reconnects": -1,										// number of retries in case of connection lost
	"connect_timeout": "1s",								// consider connection unsuccessful on timeout, 0 to disable the feature
	"reply_timeout": "2s",									// consider connection down for replies taking longer than this value
	"locking_timeout": "0",									// timeout internal locks to avoid deadlocks
	"digest_separator": ",",								// separator to use in replies containing data digests
	"digest_equal": ":",									// equal symbol used in case of digests
	"rsr_separator": ";",									// separator used within RSR fields
	"max_parallel_conns": 100,								// the maximum number of connection used by the *parallel strategy
},


"cores": {
	"caps": 0,							// maximum concurrent request allowed ( 0 to disabled )
	"caps_strategy": "*busy",			// strategy in case in case of concurrent requests reached	
	"caps_stats_interval": "0",			// the interval we sample for caps stats ( 0 to disabled )
	"shutdown_timeout": "1s"			// the duration to wait until all services are stoped
},


"rpc_conns": {
	//"*localhost": {
		//"conns": [{"address": "127.0.0.1:2012", "transport":"*json"}],
	//},
},							// rpc connections definitions


"data_db": {								// database used to store runtime data (eg: accounts)
	"db_type": "*redis",					// data_db type: <*redis|*mongo>
	"db_host": "127.0.0.1",					// data_db host address
	"db_port": 6379, 						// data_db port to reach the database
	"db_name": "10", 						// data_db database name to connect to
	"db_user": "cgrates", 					// username to use when connecting to data_db
	"db_password": "", 						// password to use when connecting to data_db
	"remote_conns":[],						// the conns that are queried when the items are not found in local DB 
	"remote_conn_id": "",					// the ID to be sent to remote_conns to identify the connection
	"replication_conns":[],					// the conns the items are replicated
	"replication_filtered": false, 			// if this is enabled the replication will be made only to the conns that received a get
	"replication_cache": "", 				// the caching action that is executed on the replication_conns when the items are replicated 
	"items":{
		"*accounts":{"remote":false, "replicate":false}, 					
		"*reverse_destinations": {"remote":false, "replicate":false},
		"*destinations": {"remote":false, "replicate":false}, 
		"*actions":{"remote":false, "replicate":false},
		"*timings": {"remote":false, "replicate":false}, 
		"*resource_profiles":{"remote":false, "replicate":false}, 
		"*resources":{"remote":false, "replicate":false}, 
		"*statqueue_profiles": {"remote":false, "replicate":false}, 
		"*statqueues": {"remote":false, "replicate":false}, 
		"*threshold_profiles": {"remote":false, "replicate":false}, 
		"*thresholds": {"remote":false, "replicate":false}, 
		"*filters": {"remote":false, "replicate":false}, 
		"*route_profiles":{"remote":false, "replicate":false}, 
		"*attribute_profiles":{"remote":false, "replicate":false}, 
		"*charger_profiles": {"remote":false, "replicate":false}, 
		"*dispatcher_profiles":{"remote":false, "replicate":false}, 
		"*dispatcher_hosts":{"remote":false, "replicate":false}, 
		"*rate_profiles":{"remote":false, "replicate":false},
		"*action_profiles":{"remote":false, "replicate":false},
		"*load_ids":{"remote":false, "replicate":false}, 
		"*indexes":{"remote":false, "replicate":false}, 
	},
	"opts":{
		"redis_sentinel": "",					// the name of sentinel when used
		"redis_cluster": false,					// if enabled the datadb will try to connect to the redis cluster
		"redis_cluster_sync": "5s",				// the sync interval for the redis cluster
		"redis_cluster_ondown_delay": "0",		// the delay before executing the commands if the redis cluster is in the CLUSTERDOWN state
		"query_timeout":"10s",
		"redis_tls": false,						// if true it will use a tls connection and use the redis_client_certificate certificate, redis_client_key and redis_ca_certificate for tls connection
		"redis_client_certificate":"",			// path to client certificate
		"redis_client_key":"",					// path to client key
		"redis_ca_certificate":"",				// path to CA certificate (populate for self-signed certificate otherwise let it empty)
	}
},


"stor_db": {								// database used to store offline tariff plans and CDRs
	"db_type": "*mysql",					// stor database type to use: <*mongo|*mysql|*postgres|*internal>
	"db_host": "127.0.0.1",					// the host to connect to
	"db_port": 3306,						// the port to reach the stor_db
	"db_name": "cgrates",					// stor database name
	"db_user": "cgrates",					// username to use when connecting to stor_db
	"db_password": "",						// password to use when connecting to stor_db
	"string_indexed_fields": [],			// indexes on cdrs table to speed up queries, used in case of *mongo and *internal
	"prefix_indexed_fields":[],				// prefix indexes on cdrs table to speed up queries, used in case of *internal
	"opts": {
		"max_open_conns": 100,				// maximum database connections opened, not applying for mongo
		"max_idle_conns": 10,				// maximum database connections idle, not applying for mongo
		"conn_max_lifetime": 0, 			// maximum amount of time in seconds a connection may be reused (0 for unlimited), not applying for mongo
		"query_timeout":"10s",
		"sslmode":"disable",				// sslmode in case of *postgres
		"mysql_location": "Local",			// the location the time from mysql is retrived
	},
	"items":{
		"*session_costs": {"remote":false, "replicate":false}, 
		"*cdrs": {"remote":false, "replicate":false}, 		
		"*tp_timings":{"remote":false, "replicate":false}, 					
		"*tp_destinations": {"remote":false, "replicate":false},
		"*tp_resources":{"remote":false, "replicate":false}, 
		"*tp_stats":{"remote":false, "replicate":false}, 
		"*tp_thresholds": {"remote":false, "replicate":false}, 
		"*tp_filters": {"remote":false, "replicate":false},
		"*tp_routes": {"remote":false, "replicate":false}, 
		"*tp_attributes":{"remote":false, "replicate":false}, 
		"*tp_chargers":{"remote":false, "replicate":false}, 
		"*versions": {"remote":false, "replicate":false}, 
		"*tp_dispatcher_profiles":{"remote":false, "replicate":false}, 
		"*tp_dispatcher_hosts":{"remote":false, "replicate":false}, 
		"*tp_rate_profiles":{"remote":false, "replicate":false}, 
		"*tp_action_profiles":{"remote":false, "replicate":false},
		"*tp_accounts":{"remote":false, "replicate":false},
	},
},


"listen": {
	"rpc_json": "127.0.0.1:2012",			// RPC JSON listening address
	"rpc_gob": "127.0.0.1:2013",			// RPC GOB listening address
	"http": "127.0.0.1:2080",				// HTTP listening address
	"rpc_json_tls" : "127.0.0.1:2022",		// RPC JSON TLS listening address
	"rpc_gob_tls": "127.0.0.1:2023",		// RPC GOB TLS listening address
	"http_tls": "127.0.0.1:2280",			// HTTP TLS listening address
},


"tls": {
	"server_certificate" : "",			// path to server certificate
	"server_key":"",					// path to server key
	"client_certificate" : "",			// path to client certificate
	"client_key":"",					// path to client key
	"ca_certificate":"",				// path to CA certificate (populate for self-signed certificate otherwise let it empty)
	"server_policy":4,					// server_policy determines the TLS Client Authentication (0-NoClientCert, 1-RequestClientCert, 2-RequireAnyClientCert, 3-VerifyClientCertIfGiven, 4-RequireAndVerifyClientCert)
	"server_name":"",
},


"http": {													// HTTP server configuration
	"json_rpc_url": "/jsonrpc",								// JSON RPC relative URL ("" to disable)
	"registrars_url": "/registrar",							// registrar service relative URL
	"ws_url": "/ws",										// WebSockets relative URL ("" to disable)
	"freeswitch_cdrs_url": "/freeswitch_json",				// Freeswitch CDRS relative URL ("" to disable)
	"http_cdrs": "/cdr_http",								// CDRS relative URL ("" to disable)
	"use_basic_auth": false,								// use basic authentication
	"auth_users": {},										// basic authentication usernames and base64-encoded passwords (eg: { "username1": "cGFzc3dvcmQ=", "username2": "cGFzc3dvcmQy "})
	"client_opts":{
		"skipTlsVerify": false, 							// if enabled Http Client will accept any TLS certificate
		// the options to configure the http.Transport
		"tlsHandshakeTimeout": "10s",
		"disableKeepAlives": false,
		"disableCompression": false,
		"maxIdleConns": 100,
		"maxIdleConnsPerHost": 2,
		"maxConnsPerHost": 0,
		"idleConnTimeout": "90s",
		"responseHeaderTimeout": "0",
		"expectContinueTimeout": "0",
		"forceAttemptHttp2": true,
		// the optins to configure the net.Dialer
		"dialTimeout": "30s",
		"dialFallbackDelay": "300ms",
		"dialKeepAlive": "30s",
	},
},

"caches":{
	"partitions": {
		"*destinations": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false},			// destination caching
		"*reverse_destinations": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false},	// reverse destinations index caching
		"*timings": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false},				// timings caching
		"*resource_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false},		// control resource profiles caching
		"*resources": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false},				// control resources caching
		"*event_resources": {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false},							// matching resources to events
		"*statqueue_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false},	// statqueue profiles
		"*statqueues": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false},			// statqueues with metrics
		"*threshold_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false},	// control threshold profiles caching
		"*thresholds": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false},			// control thresholds caching
		"*filters": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false},				// control filters caching
		"*route_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false},		// control route profile caching
		"*attribute_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false},	// control attribute profile caching
		"*charger_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false},		// control charger profile caching
		"*dispatcher_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false},	// control dispatcher profile caching
		"*dispatcher_hosts": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false},		// control dispatcher hosts caching
		"*rate_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false},			// control rate profile caching
		"*action_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false},		// control action profile caching
		"*accounts": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false},		// control account profile caching
		"*resource_filter_indexes" : {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, 				// control resource filter indexes caching
		"*stat_filter_indexes" : {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, 					// control stat filter indexes caching
		"*threshold_filter_indexes" : {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, 				// control threshold filter indexes caching
		"*route_filter_indexes" : {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, 					// control route filter indexes caching
		"*attribute_filter_indexes" : {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, 				// control attribute filter indexes caching
		"*charger_filter_indexes" : {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, 					// control charger filter indexes caching
		"*dispatcher_filter_indexes" : {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, 				// control dispatcher filter indexes caching
		"*rate_profile_filter_indexes" : {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, 			// control rate profile filter indexes caching
		"*rate_filter_indexes" : {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, 					// control rate filter indexes caching
		"*action_profile_filter_indexes" : {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, 			// control action profile filter indexes caching
		"*account_filter_indexes" : {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, 			// control coount profile filter indexes caching
		"*reverse_filter_indexes" : {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, 					// control reverse filter indexes caching used only for set and remove filters 
		"*dispatcher_routes": {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, 						// control dispatcher routes caching
		"*dispatcher_loads": {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false},							// control dispatcher load( in case of *ratio ConnParams is present)
		"*dispatchers": {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, 								// control dispatcher interface
		"*diameter_messages": {"limit": -1, "ttl": "3h", "static_ttl": false, "replicate": false},						// diameter messages caching
		"*rpc_responses": {"limit": 0, "ttl": "2s", "static_ttl": false, "replicate": false},							// RPC responses caching
		"*closed_sessions": {"limit": -1, "ttl": "10s", "static_ttl": false, "replicate": false},						// closed sessions cached for CDRs
		"*event_charges": {"limit": -1, "ttl": "10s", "static_ttl": false, "replicate": false},							// events proccessed by ChargerS
		"*cdr_ids": {"limit": -1, "ttl": "10m", "static_ttl": false, "replicate": false},								// protects CDRs against double-charging
		"*load_ids": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false},				// control the load_ids for items
		"*rpc_connections": {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false},							// RPC connections caching
		"*uch": {"limit": -1, "ttl": "3h", "static_ttl": false, "replicate": false},									// User cache
		"*stir": {"limit": -1, "ttl": "3h", "static_ttl": false, "replicate": false},									// stirShaken cache keys
		"*apiban":{"limit": -1, "ttl": "2m", "static_ttl": false, "replicate": false}, 
		"*caps_events": {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false},								// caps cached samples
		"*replication_hosts": {"limit": 0, "ttl": "", "static_ttl": false, "replicate": false},							// the replication hosts cache(used when replication_filtered is enbled)
		
		// only for *internal database
		"*versions": {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false},									// for version storing
		// internal storDB tabels
		"*session_costs": {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, 
		"*cdrs": {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, 		
		"*tp_timings":{"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, 					
		"*tp_destinations": {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false},

		"*tp_resources":{"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, 
		"*tp_stats":{"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, 
		"*tp_thresholds": {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, 
		"*tp_filters": {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false},
		"*tp_routes": {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, 
		"*tp_attributes":{"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, 
		"*tp_chargers":{"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, 
		"*tp_dispatcher_profiles":{"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, 
		"*tp_dispatcher_hosts":{"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, 
		"*tp_rate_profiles":{"limit": -1, "ttl": "", "static_ttl": false, "replicate": false},
		"*tp_action_profiles":{"limit": -1, "ttl": "", "static_ttl": false, "replicate": false},
		"*tp_accounts":{"limit": -1, "ttl": "", "static_ttl": false, "replicate": false},
	},
	"replication_conns": [],
},


"filters": {								// Filters configuration (*new)
	"stats_conns": [],						// connections to StatS for <*stats> filters, empty to disable stats functionality: <""|*internal|$rpc_conns_id>
	"resources_conns": [],					// connections to ResourceS for <*resources> filters, empty to disable stats functionality: <""|*internal|$rpc_conns_id>
	"admins_conns": [],						// connections to adminS for <*accounts> filters, empty to disable stats functionality: <""|*internal|$rpc_conns_id>
},



"cdrs": {									// CDRs config
	"enabled": false,						// start the CDR Server:  <true|false>
	"extra_fields": [],						// extra fields to store in CDRs for non-generic CDRs (ie: FreeSWITCH JSON)
	"store_cdrs": true,						// store cdrs in StorDB
	"session_cost_retries": 5,				// number of queries to session_costs before recalculating CDR
	"chargers_conns": [],					// connection to ChargerS for CDR forking, empty to disable billing for CDRs: <""|*internal|$rpc_conns_id>
	"attributes_conns": [],					// connection to AttributeS for altering *raw CDRs, empty to disable attributes functionality: <""|*internal|$rpc_conns_id>
	"thresholds_conns": [],					// connection to ThresholdS for CDR reporting, empty to disable thresholds functionality: <""|*internal|$rpc_conns_id>
	"stats_conns": [],						// connections to StatS for CDR reporting, empty to disable stats functionality: <""|*internal|$rpc_conns_id>
	"online_cdr_exports":[],				// list of CDRE profiles to use for real-time CDR exports
	"actions_conns": [],					// connections to SchedulerS in case of *dynaprepaid request
	"ees_conns": [],						// connections to EventExporter
},


"ers": {									// EventReaderService
	"enabled": false,						// starts the EventReader service: <true|false>
	"sessions_conns":["*internal"],			// RPC Connections IDs
	"readers": [
		{
			"id": "*default",									// identifier of the EventReader profile
			"type": "*none",									// reader type <*file_csv>
			"row_length" : 0, 									// Number of fields from csv file
			"field_separator": ",",								// separator used in case of csv files
			"header_define_character": ":",						// the starting character for header definition used in case of CSV files
			"run_delay": "0",									// sleep interval in seconds between consecutive runs, -1 to use automation via inotify or 0 to disable running all together
			"concurrent_requests": 1024,						// maximum simultaneous requests/files to process, 0 for unlimited
			"source_path": "/var/spool/cgrates/ers/in",			// read data from this path
			"processed_path": "/var/spool/cgrates/ers/out",		// move processed data here
			"opts": {
				// "queueID": "cgrates_cdrs", 					// the queue id for AMQP, AMQPv1, SQS and S3 readers from were the events are read
				// "queueIDProcessed": "", 						// the queue id for AMQP, AMQPv1, SQS and S3 readers were the events are sent after they are processed

				// FileCSV, FlatStore and PartialCSV
				// "lazyQuotes": false,							//  if a quote may appear in an unquoted field and a non-doubled quote may appear in a quoted field

				// AMQP
				// "consumerTag": "cgrates",					// the ID of the consumer
				// "exchange": "",									
				// "exchangeType": "",
				// "routingKey": "",

				// "exchangeProcessed": "",									
				// "exchangeTypeProcessed": "",
				// "routingKeyProcessed": "",

				// Kafka
				// "topic": "cgrates",							// the topic from were the events are read
				// "groupID": "cgrates",						// the group that reads the events
				// "maxWait": "1ms",							// the maximum amount of time to wait for new data to come

				// "topicProcessed": "",						// the topic were the events are sent after they are processed


				// SQL
				// "dbName": "cgrates", 						// the name of the database from were the events are read
				// "tableName": "cdrs",							// the name of the table from were the events are read
				// "sslmode": "disable",						// the ssl mode for postgres db

				// "dbNameProcessed": "", 						// the name of the database were the events are sent after they are processed
				// "tableNameProcessed": "",					// the name of the table were the events are sent after they are processed
				// "sslmodeProcessed": "",						// the ssl mode for postgres db

				// SQS and S3
				// "awsRegion": "",
				// "awsKey": "",
				// "awsSecret": "",
				// "awsToken": "",

				// "awsRegionProcessed": "",
				// "awsKeyProcessed": "",
				// "awsSecretProcessed": "",
				// "awsTokenProcessed": "",
				// "folderPathProcessed": "", 					// only for S3 event posting 
				
			},
			"xml_root_path": "",								// path towards one event in case of XML CDRs
			"tenant": "",										// tenant used by import
			"timezone": "",										// timezone for timestamps where not specified <""|UTC|Local|$IANA_TZ_DB>
			"filters": [],										// limit parsing based on the filters
			"flags": [],										// flags to influence the event processing
			"fields":[											// import fields template, tag will match internally CDR field, in case of .csv value will be represented by index of the field value
				{"tag": "ToR", "path": "*cgreq.ToR", "type": "*variable", "value": "~*req.2", "mandatory": true},
				{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable", "value": "~*req.3", "mandatory": true},
				{"tag": "RequestType", "path": "*cgreq.RequestType", "type": "*variable", "value": "~*req.4", "mandatory": true},
				{"tag": "Tenant", "path": "*cgreq.Tenant", "type": "*variable", "value": "~*req.6", "mandatory": true},
				{"tag": "Category", "path": "*cgreq.Category", "type": "*variable", "value": "~*req.7", "mandatory": true},
				{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.8", "mandatory": true},
				{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable", "value": "~*req.9", "mandatory": true},
				{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.10", "mandatory": true},
				{"tag": "SetupTime", "path": "*cgreq.SetupTime", "type": "*variable", "value": "~*req.11", "mandatory": true},
				{"tag": "AnswerTime", "path": "*cgreq.AnswerTime", "type": "*variable", "value": "~*req.12", "mandatory": true},
				{"tag": "Usage", "path": "*cgreq.Usage", "type": "*variable", "value": "~*req.13", "mandatory": true},
			],
			"cache_dump_fields": [],
		},
	],
},


"ees": {									// EventExporterService
	"enabled": false,						// starts the EventReader service: <true|false>
	"attributes_conns":[],					// RPC Connections IDs
	"cache": {
		"*file_csv": {"limit": -1, "ttl": "5s", "static_ttl": false},
	},
	"exporters": [
		{
			"id": "*default",									// identifier of the EventReader profile
			"type": "*none",									// exporter type 
			"export_path": "/var/spool/cgrates/ees",			// path where the exported events will be placed
			"opts": {},											// extra options for exporter
			"tenant": "",										// tenant used in filterS.Pass
			"timezone": "",										// timezone for timestamps where not specified <""|UTC|Local|$IANA_TZ_DB>
			"filters": [],										// limit parsing based on the filters
			"flags": [],										// flags to influence the event processing
			"attribute_ids": [],								// select Attribute profiles instead of discovering them
			"attribute_context": "",							// context used to discover matching Attribute profiles
			"synchronous": false,								// block processing until export has a result
			"attempts": 1,										// export attempts
			"field_separator": ",",								// separator used in case of csv files
			"fields":[],										// import fields template, tag will match internally CDR field, in case of .csv value will be represented by index of the field value
		},
	],
},


"sessions": {
	"enabled": false,						// starts the session service: <true|false>
	"listen_bijson": "127.0.0.1:2014",		// address where to listen for bidirectional JSON-RPC requests
	"listen_bigob": "",						// address where to listen for bidirectional GOB-RPC requests
	"chargers_conns": [],					// connections to ChargerS for session forking <""|*internal|$rpc_conns_id>
	"cdrs_conns": [],						// connections to CDRs for CDR posting <""|*internal|$rpc_conns_id>
	"resources_conns": [],					// connections to ResourceS for resources monitoring <""|*internal|$rpc_conns_id>
	"thresholds_conns": [],					// connections to ThresholdS for reporting session events <""|*internal|$rpc_conns_id>
	"stats_conns": [],						// connections to StatS for reporting session events <""|*internal|$rpc_conns_id>
	"routes_conns": [],						// connections to RouteS for querying routes for event <""|*internal|$rpc_conns_id>
	"attributes_conns": [],					// connections to AttributeS for altering event fields <""|*internal|$rpc_conns_id>
	"replication_conns": [],				// replicate sessions towards these session services
	"debit_interval": "0s",					// interval to perform debits on.
	"store_session_costs": false,			// enable storing of the session costs within CDRs
	"default_usage":{						// the usage if the event is missing the usage field
			"*any": "3h",
			"*voice": "3h",
			"*data": "1048576",
			"*sms": "1",
	},
	"session_ttl": "0s",					// time after a session with no updates is terminated, not defined by default
	//"session_ttl_max_delay": "",			// activates session_ttl randomization and limits the maximum possible delay
	//"session_ttl_last_used": "",			// tweak LastUsed for sessions timing-out, not defined by default
	//"session_ttl_usage": "",				// tweak Usage for sessions timing-out, not defined by default
	//"session_last_usage": "",				// tweak LastUsage for session timing-out, not defined by default
	"session_indexes": [],					// index sessions based on these fields for GetActiveSessions API
	"client_protocol": 1.0,					// version of protocol to use when acting as JSON-PRC client <"0","1.0">
	"channel_sync_interval": "0",			// sync channels to detect stale sessions (0 to disable)
	"terminate_attempts": 5,				// attempts to get the session before terminating it
	"alterable_fields": [],					// the session fields that can be updated
	//"min_dur_low_balance": "5s",			// threshold which will trigger low balance warnings for prepaid calls (needs to be lower than debit_interval)
	"stir": {
		"allowed_attest": ["*any"],			// the default attest for stir/shaken authentication <*any|A|B|C>
		"payload_maxduration": "-1", 		// the duration that stir header is valid after it was created
		"default_attest": "A",				// the default attest level if not mentioned in API
		"publickey_path": "",				// the path to the public key 
		"privatekey_path": "",				// the path to the private key
	},
	"actions_conns": [],					// connections to SchedulerS in case of *dynaprepaid request
},


"asterisk_agent": {
	"enabled": false,						// starts the Asterisk agent: <true|false>
	"sessions_conns": ["*birpc_internal"],
	"create_cdr": false,					// create CDR out of events and sends it to CDRS component
	"asterisk_conns":[						// instantiate connections to multiple Asterisk servers
		{"address": "127.0.0.1:8088", "user": "cgrates", "password": "CGRateS.org", "connect_attempts": 3,"reconnects": 5}
	],
},


"freeswitch_agent": {
	"enabled": false,						// starts the FreeSWITCH agent: <true|false>
	"sessions_conns": ["*birpc_internal"],
	"subscribe_park": true,					// subscribe via fsock to receive park events
	"create_cdr": false,					// creates CDR out of events and sends them to CDRS component
	"extra_fields": [],						// extra fields to store in auth/CDRs when creating them
	"low_balance_ann_file": "",				// file to be played when low balance is reached for prepaid calls
	"empty_balance_context": "",			// if defined, prepaid calls will be transferred to this context on empty balance
	"empty_balance_ann_file": "",			// file to be played before disconnecting prepaid calls on empty balance (applies only if no context defined)
	"max_wait_connection": "2s",			// maximum duration to wait for a connection to be retrieved from the pool
	"event_socket_conns":[					// instantiate connections to multiple FreeSWITCH servers
		{"address": "127.0.0.1:8021", "password": "ClueCon", "reconnects": 5,"alias":""}
	],
},


"kamailio_agent": {
	"enabled": false,						// starts Kamailio agent: <true|false>
	"sessions_conns": ["*birpc_internal"],
	"create_cdr": false,					// create CDR out of events and sends them to CDRS component
	"timezone": "",							// timezone of the Kamailio server
	"evapi_conns":[							// instantiate connections to multiple Kamailio servers
		{"address": "127.0.0.1:8448", "reconnects": 5}
	],
},


"diameter_agent": {
	"enabled": false,											// enables the diameter agent: <true|false>
	"listen": "127.0.0.1:3868",									// address where to listen for diameter requests <x.y.z.y/x1.y1.z1.y1:1234>
	"listen_net": "tcp",										// transport type for diameter <tcp|sctp>
	"dictionaries_path": "/usr/share/cgrates/diameter/dict/",	// path towards directory holding additional dictionaries to load
	"sessions_conns": ["*birpc_internal"],
	"origin_host": "CGR-DA",									// diameter Origin-Host AVP used in replies
	"origin_realm": "cgrates.org",								// diameter Origin-Realm AVP used in replies
	"vendor_id": 0,												// diameter Vendor-Id AVP used in replies
	"product_name": "CGRateS",									// diameter Product-Name AVP used in replies
	"concurrent_requests": -1,									// limit the number of active requests processed by the server <-1|0-n>
	"synced_conn_requests": false,								// process one request at the time per connection
	"asr_template": "",											// enable AbortSession message being sent to client on DisconnectSession
	"rar_template": "",											// template used to build the Re-Auth-Request
	"forced_disconnect": "*none",								// the request to send to diameter on DisconnectSession <*none|*asr|*rar>
	"request_processors": [				// list of processors to be applied to diameter messages
	],
},


"radius_agent": {
	"enabled": false,											// enables the radius agent: <true|false>
	"listen_net": "udp",										// network to listen on <udp|tcp>
	"listen_auth": "127.0.0.1:1812",							// address where to listen for radius authentication requests <x.y.z.y:1234>
	"listen_acct": "127.0.0.1:1813",							// address where to listen for radius accounting requests <x.y.z.y:1234>
	"client_secrets": {											// hash containing secrets for clients connecting here <*default|$client_ip>
		"*default": "CGRateS.org"
	},
	"client_dictionaries": {									// per client path towards directory holding additional dictionaries to load (extra to RFC)
		"*default": "/usr/share/cgrates/radius/dict/",			// key represents the client IP or catch-all <*default|$client_ip>
	},
	"sessions_conns": ["*internal"],
	"request_processors": [										// request processors to be applied to Radius messages
	],
},


"http_agent": [						// HTTP Agents, ie towards cnc.to MVNE platform
],


"dns_agent": {
	"enabled": false,											// enables the DNS agent: <true|false>
	"listen": "127.0.0.1:2053",									// address where to listen for DNS requests <x.y.z.y:1234>
	"listen_net": "udp",										// network to listen on <udp|tcp|tcp-tls>
	"sessions_conns": ["*internal"],
	"timezone": "",												// timezone of the events if not specified  <UTC|Local|$IANA_TZ_DB>
	"request_processors": [										// request processors to be applied to DNS messages
	],
},


"attributes": {								// AttributeS config
	"enabled": false,						// starts attribute service: <true|false>
	"stats_conns": [],						// connections to StatS, empty to disable: <""|*internal|$rpc_conns_id>
	"resources_conns": [],					// connections to ResourceS, empty to disable: <""|*internal|$rpc_conns_id>
	"admins_conns": [],						// connections to ApierS, empty to disable: <""|*internal|$rpc_conns_id>
	"indexed_selects": true,				// enable profile matching exclusively on indexes
	//"string_indexed_fields": [],			// query indexes based on these fields for faster processing
	"prefix_indexed_fields": [],			// query indexes based on these fields for faster processing
	"suffix_indexed_fields": [],			// query indexes based on these fields for faster processing
	"nested_fields": false,					// determines which field is checked when matching indexed filters(true: all; false: only the one on the first level)
	"process_runs": 1,						// number of run loops when processing event
},


"chargers": {								// ChargerS config
	"enabled": false,						// starts charger service: <true|false>.
	"attributes_conns": [],					// connections to AttributeS for event fields altering <""|127.0.0.1:2013>
	"indexed_selects": true,				// enable profile matching exclusively on indexes
	//"string_indexed_fields": [],			// query indexes based on these fields for faster processing
	"prefix_indexed_fields": [],			// query indexes based on these fields for faster processing
	"suffix_indexed_fields": [],			// query indexes based on these fields for faster processing
	"nested_fields": false,					// determines which field is checked when matching indexed filters(true: all; false: only the one on the first level)
},


"resources": {								// ResourceS config
	"enabled": false,						// starts ResourceLimiter service: <true|false>.
	"store_interval": "",					// dump cache regularly to dataDB, 0 - dump at start/shutdown: <""|$dur>
	"thresholds_conns": [],					// connections to ThresholdS for resource reporting, empty to disable thresholds functionality: <""|*internal|$rpc_conns_id>
	"indexed_selects": true,				// enable profile matching exclusively on indexes
	//"string_indexed_fields": [],			// query indexes based on these fields for faster processing
	"prefix_indexed_fields": [],			// query indexes based on these fields for faster processing
	"suffix_indexed_fields": [],			// query indexes based on these fields for faster processing
	"nested_fields": false,					// determines which field is checked when matching indexed filters(true: all; false: only the one on the first level)
},


"stats": {									// StatS config
	"enabled": false,						// starts Stat service: <true|false>.
	"store_interval": "",					// dump cache regularly to dataDB, 0 - dump at start/shutdown: <""|$dur>
	"store_uncompressed_limit": 0,			// used to compress data
	"thresholds_conns": [],					// connections to ThresholdS for StatUpdates, empty to disable thresholds functionality: <""|*internal|$rpc_conns_id>
	"indexed_selects": true,				// enable profile matching exclusively on indexes
	//"string_indexed_fields": [],			// query indexes based on these fields for faster processing
	"prefix_indexed_fields": [],			// query indexes based on these fields for faster processing
	"suffix_indexed_fields": [],			// query indexes based on these fields for faster processing
	"nested_fields": false,					// determines which field is checked when matching indexed filters(true: all; false: only the one on the first level)
},


"thresholds": {								// ThresholdS
	"enabled": false,						// starts ThresholdS service: <true|false>.
	"store_interval": "",					// dump cache regularly to dataDB, 0 - dump at start/shutdown: <""|$dur>
	"indexed_selects": true,				// enable profile matching exclusively on indexes
	//"string_indexed_fields": [],			// query indexes based on these fields for faster processing
	"prefix_indexed_fields": [],			// query indexes based on these fields for faster processing
	"suffix_indexed_fields": [],			// query indexes based on these fields for faster processing
	"nested_fields": false,					// determines which field is checked when matching indexed filters(true: all; false: only the one on the first level)
},


"routes": {									// RouteS config
	"enabled": false,						// starts RouteS service: <true|false>.
	"indexed_selects": true,				// enable profile matching exclusively on indexes
	//"string_indexed_fields": [],			// query indexes based on these fields for faster processing
	"prefix_indexed_fields": [],			// query indexes based on these fields for faster processing
	"suffix_indexed_fields": [],			// query indexes based on these fields for faster processing
	"nested_fields": false,					// determines which field is checked when matching indexed filters(true: all; false: only the one on the first level)
	"attributes_conns": [],					// connections to AttributeS for altering events before route queries: <""|*internal|$rpc_conns_id>
	"resources_conns": [],					// connections to ResourceS for *res sorting, empty to disable functionality: <""|*internal|$rpc_conns_id>
	"stats_conns": [],						// connections to StatS for *stats sorting, empty to disable stats functionality: <""|*internal|$rpc_conns_id>
	"default_ratio":1						// default ratio used in case of *load strategy
},


"loaders": [												// LoaderS config
	{
		"id": "*default",									// identifier of the Loader
		"enabled": false,									// starts as service: <true|false>.
		"tenant": "",										// tenant used in filterS.Pass
		"dry_run": false,									// do not send the CDRs to CDRS, just parse them
		"run_delay": "0",									// sleep interval in seconds between consecutive runs, -1 to use automation via inotify or 0 to disable running all together
		"lock_filename": ".cgr.lck",						// Filename containing concurrency lock in case of delayed processing
		"caches_conns": ["*internal"],
		"field_separator": ",",								// separator used in case of csv files
		"tp_in_dir": "/var/spool/cgrates/loader/in",		// absolute path towards the directory where the TPs are stored
		"tp_out_dir": "/var/spool/cgrates/loader/out",		// absolute path towards the directory where processed TPs will be moved
		"data":[											// data profiles to load
			{
				"type": "*attributes",						// data source type
				"file_name": "Attributes.csv",				// file name in the tp_in_dir
				"fields": [
					{"tag": "TenantID", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
					{"tag": "ProfileID", "path": "ID", "type": "*variable", "value": "~*req.1", "mandatory": true},
					{"tag": "Contexts", "path": "Contexts", "type": "*variable", "value": "~*req.2"},
					{"tag": "FilterIDs", "path": "FilterIDs", "type": "*variable", "value": "~*req.3"},
					{"tag": "ActivationInterval", "path": "ActivationInterval", "type": "*variable", "value": "~*req.4"},
					{"tag": "AttributeFilterIDs", "path": "AttributeFilterIDs", "type": "*variable", "value": "~*req.5"},
					{"tag": "Path", "path": "Path", "type": "*variable", "value": "~*req.6"},
					{"tag": "Type", "path": "Type", "type": "*variable", "value": "~*req.7"},
					{"tag": "Value", "path": "Value", "type": "*variable", "value": "~*req.8"},
					{"tag": "Blocker", "path": "Blocker", "type": "*variable", "value": "~*req.9"},
					{"tag": "Weight", "path": "Weight", "type": "*variable", "value": "~*req.10"},
				],
			},
			{
				"type": "*filters",						// data source type
				"file_name": "Filters.csv",				// file name in the tp_in_dir
				"fields": [
					{"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
					{"tag": "ID", "path": "ID", "type": "*variable", "value": "~*req.1", "mandatory": true},
					{"tag": "Type", "path": "Type", "type": "*variable", "value": "~*req.2"},
					{"tag": "Element", "path": "Element", "type": "*variable", "value": "~*req.3"},
					{"tag": "Values", "path": "Values", "type": "*variable", "value": "~*req.4"},
					{"tag": "ActivationInterval", "path": "ActivationInterval", "type": "*variable", "value": "~*req.5"},
				],
			},
			{
				"type": "*resources",						// data source type
				"file_name": "Resources.csv",				// file name in the tp_in_dir
				"fields": [
					{"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
					{"tag": "ID", "path": "ID", "type": "*variable", "value": "~*req.1", "mandatory": true},
					{"tag": "FilterIDs", "path": "FilterIDs", "type": "*variable", "value": "~*req.2"},
					{"tag": "ActivationInterval", "path": "ActivationInterval", "type": "*variable", "value": "~*req.3"},
					{"tag": "TTL", "path": "UsageTTL", "type": "*variable", "value": "~*req.4"},
					{"tag": "Limit", "path": "Limit", "type": "*variable", "value": "~*req.5"},
					{"tag": "AllocationMessage", "path": "AllocationMessage", "type": "*variable", "value": "~*req.6"},
					{"tag": "Blocker", "path": "Blocker", "type": "*variable", "value": "~*req.7"},
					{"tag": "Stored", "path": "Stored", "type": "*variable", "value": "~*req.8"},
					{"tag": "Weight", "path": "Weight", "type": "*variable", "value": "~*req.9"},
					{"tag": "ThresholdIDs", "path": "ThresholdIDs", "type": "*variable", "value": "~*req.10"},
				],
			},
			{
				"type": "*stats",						// data source type
				"file_name": "Stats.csv",				// file name in the tp_in_dir
				"fields": [
					{"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
					{"tag": "ID", "path": "ID", "type": "*variable", "value": "~*req.1", "mandatory": true},
					{"tag": "FilterIDs", "path": "FilterIDs", "type": "*variable", "value": "~*req.2"},
					{"tag": "ActivationInterval", "path": "ActivationInterval", "type": "*variable", "value": "~*req.3"},
					{"tag": "QueueLength", "path": "QueueLength", "type": "*variable", "value": "~*req.4"},
					{"tag": "TTL", "path": "TTL", "type": "*variable", "value": "~*req.5"},
					{"tag": "MinItems", "path": "MinItems", "type": "*variable", "value": "~*req.6"},
					{"tag": "MetricIDs", "path": "MetricIDs", "type": "*variable", "value": "~*req.7"},
					{"tag": "MetricFilterIDs", "path": "MetricFilterIDs", "type": "*variable", "value": "~*req.8"},
					{"tag": "Blocker", "path": "Blocker", "type": "*variable", "value": "~*req.9"},
					{"tag": "Stored", "path": "Stored", "type": "*variable", "value": "~*req.10"},
					{"tag": "Weight", "path": "Weight", "type": "*variable", "value": "~*req.11"},
					{"tag": "ThresholdIDs", "path": "ThresholdIDs", "type": "*variable", "value": "~*req.12"},
				],
			},
			{
				"type": "*thresholds",						// data source type
				"file_name": "Thresholds.csv",				// file name in the tp_in_dir
				"fields": [
					{"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
					{"tag": "ID", "path": "ID", "type": "*variable", "value": "~*req.1", "mandatory": true},
					{"tag": "FilterIDs", "path": "FilterIDs", "type": "*variable", "value": "~*req.2"},
					{"tag": "ActivationInterval", "path": "ActivationInterval", "type": "*variable", "value": "~*req.3"},
					{"tag": "MaxHits", "path": "MaxHits", "type": "*variable", "value": "~*req.4"},
					{"tag": "MinHits", "path": "MinHits", "type": "*variable", "value": "~*req.5"},
					{"tag": "MinSleep", "path": "MinSleep", "type": "*variable", "value": "~*req.6"},
					{"tag": "Blocker", "path": "Blocker", "type": "*variable", "value": "~*req.7"},
					{"tag": "Weight", "path": "Weight", "type": "*variable", "value": "~*req.8"},
					{"tag": "ActionIDs", "path": "ActionIDs", "type": "*variable", "value": "~*req.9"},
					{"tag": "Async", "path": "Async", "type": "*variable", "value": "~*req.10"},
				],
			},
			{
				"type": "*routes",						// data source type
				"file_name": "Routes.csv",				// file name in the tp_in_dir
				"fields": [
					{"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
					{"tag": "ID", "path": "ID", "type": "*variable", "value": "~*req.1", "mandatory": true},
					{"tag": "FilterIDs", "path": "FilterIDs", "type": "*variable", "value": "~*req.2"},
					{"tag": "ActivationInterval", "path": "ActivationInterval", "type": "*variable", "value": "~*req.3"},
					{"tag": "Sorting", "path": "Sorting", "type": "*variable", "value": "~*req.4"},
					{"tag": "SortingParameters", "path": "SortingParameters", "type": "*variable", "value": "~*req.5"},
					{"tag": "RouteID", "path": "RouteID", "type": "*variable", "value": "~*req.6"},
					{"tag": "RouteFilterIDs", "path": "RouteFilterIDs", "type": "*variable", "value": "~*req.7"},
					{"tag": "RouteAccountIDs", "path": "RouteAccountIDs", "type": "*variable", "value": "~*req.8"},
					{"tag": "RouteRatingPlanIDs", "path": "RouteRatingPlanIDs", "type": "*variable", "value": "~*req.9"},
					{"tag": "RouteResourceIDs", "path": "RouteResourceIDs", "type": "*variable", "value": "~*req.10"},
					{"tag": "RouteStatIDs", "path": "RouteStatIDs", "type": "*variable", "value": "~*req.11"},
					{"tag": "RouteWeight", "path": "RouteWeight", "type": "*variable", "value": "~*req.12"},
					{"tag": "RouteBlocker", "path": "RouteBlocker", "type": "*variable", "value": "~*req.13"},
					{"tag": "RouteParameters", "path": "RouteParameters", "type": "*variable", "value": "~*req.14"},
					{"tag": "Weight", "path": "Weight", "type": "*variable", "value": "~*req.15"},
				],
			},
			{
				"type": "*chargers",						// data source type
				"file_name": "Chargers.csv",				// file name in the tp_in_dir
				"fields": [
					{"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
					{"tag": "ID", "path": "ID", "type": "*variable", "value": "~*req.1", "mandatory": true},
					{"tag": "FilterIDs", "path": "FilterIDs", "type": "*variable", "value": "~*req.2"},
					{"tag": "ActivationInterval", "path": "ActivationInterval", "type": "*variable", "value": "~*req.3"},
					{"tag": "RunID", "path": "RunID", "type": "*variable", "value": "~*req.4"},
					{"tag": "AttributeIDs", "path": "AttributeIDs", "type": "*variable", "value": "~*req.5"},
					{"tag": "Weight", "path": "Weight", "type": "*variable", "value": "~*req.6"},
				],
			},
			{
				"type": "*dispatchers",						// data source type
				"file_name": "DispatcherProfiles.csv",		// file name in the tp_in_dir
				"fields": [
					{"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
					{"tag": "ID", "path": "ID", "type": "*variable", "value": "~*req.1", "mandatory": true},
					{"tag": "Contexts", "path": "Contexts", "type": "*variable", "value": "~*req.2"},
					{"tag": "FilterIDs", "path": "FilterIDs", "type": "*variable", "value": "~*req.3"},
					{"tag": "ActivationInterval", "path": "ActivationInterval", "type": "*variable", "value": "~*req.4"},
					{"tag": "Strategy", "path": "Strategy", "type": "*variable", "value": "~*req.5"},
					{"tag": "StrategyParameters", "path": "StrategyParameters", "type": "*variable", "value": "~*req.6"},
					{"tag": "ConnID", "path": "ConnID", "type": "*variable", "value": "~*req.7"},
					{"tag": "ConnFilterIDs", "path": "ConnFilterIDs", "type": "*variable", "value": "~*req.8"},
					{"tag": "ConnWeight", "path": "ConnWeight", "type": "*variable", "value": "~*req.9"},
					{"tag": "ConnBlocker", "path": "ConnBlocker", "type": "*variable", "value": "~*req.10"},
					{"tag": "ConnParameters", "path": "ConnParameters", "type": "*variable", "value": "~*req.11"},
					{"tag": "Weight", "path": "Weight", "type": "*variable", "value": "~*req.12"},
				],
			},
			{
				"type": "*dispatcher_hosts",						// data source type
				"file_name": "DispatcherHosts.csv",					// file name in the tp_in_dir
				"fields": [
					{"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
					{"tag": "ID", "path": "ID", "type": "*variable", "value": "~*req.1", "mandatory": true},
					{"tag": "Address", "path": "Address", "type": "*variable", "value": "~*req.2"},
					{"tag": "Transport", "path": "Transport", "type": "*variable", "value": "~*req.3"},
					{"tag": "TLS", "path": "TLS", "type": "*variable", "value": "~*req.4"},
				],
			},
			{
				"type": "*rate_profiles",						// data source type
				"file_name": "RateProfiles.csv",				// file name in the tp_in_dir
				"fields": [
					{"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
					{"tag": "ID", "path": "ID", "type": "*variable", "value": "~*req.1", "mandatory": true},
					{"tag": "FilterIDs", "path": "FilterIDs", "type": "*variable", "value": "~*req.2"},
					{"tag": "ActivationInterval", "path": "ActivationInterval", "type": "*variable", "value": "~*req.3"},
					{"tag": "Weight", "path": "Weight", "type": "*variable", "value": "~*req.4"},
					{"tag": "MinCost", "path": "MinCost", "type": "*variable", "value": "~*req.5"},
					{"tag": "MaxCost", "path": "MaxCost", "type": "*variable", "value": "~*req.6"},
					{"tag": "MaxCostStrategy", "path": "MaxCostStrategy", "type": "*variable", "value": "~*req.7"},
					{"tag": "RateID", "path": "RateID", "type": "*variable", "value": "~*req.8"},
					{"tag": "RateFilterIDs", "path": "RateFilterIDs", "type": "*variable", "value": "~*req.9"},
					{"tag": "RateActivationTimes", "path": "RateActivationTimes", "type": "*variable", "value": "~*req.10"},
					{"tag": "RateWeight", "path": "RateWeight", "type": "*variable", "value": "~*req.11"},
					{"tag": "RateBlocker", "path": "RateBlocker", "type": "*variable", "value": "~*req.12"},
					{"tag": "RateIntervalStart", "path": "RateIntervalStart", "type": "*variable", "value": "~*req.13"},
					{"tag": "RateFixedFee", "path": "RateFixedFee", "type": "*variable", "value": "~*req.14"},
                    {"tag": "RateRecurrentFee", "path": "RateRecurrentFee", "type": "*variable", "value": "~*req.15"},
					{"tag": "RateUnit", "path": "RateUnit", "type": "*variable", "value": "~*req.16"},
					{"tag": "RateIncrement", "path": "RateIncrement", "type": "*variable", "value": "~*req.17"},
				],
			},
			{
				"type": "*action_profiles",						// data source type
				"file_name": "ActionProfiles.csv",				// file name in the tp_in_dir
				"fields": [
					{"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
					{"tag": "ID", "path": "ID", "type": "*variable", "value": "~*req.1", "mandatory": true},
					{"tag": "FilterIDs", "path": "FilterIDs", "type": "*variable", "value": "~*req.2"},
					{"tag": "ActivationInterval", "path": "ActivationInterval", "type": "*variable", "value": "~*req.3"},
					{"tag": "Weight", "path": "Weight", "type": "*variable", "value": "~*req.4"},
					{"tag": "Schedule", "path": "Schedule", "type": "*variable", "value": "~*req.5"},
					{"tag": "TargetType", "path": "TargetType", "type": "*variable", "value": "~*req.6"},
					{"tag": "TargetIDs", "path": "TargetIDs", "type": "*variable", "value": "~*req.7"},
					{"tag": "ActionID", "path": "ActionID", "type": "*variable", "value": "~*req.8"},
					{"tag": "ActionFilterIDs", "path": "ActionFilterIDs", "type": "*variable", "value": "~*req.9"},
					{"tag": "ActionBlocker", "path": "ActionBlocker", "type": "*variable", "value": "~*req.10"},
					{"tag": "ActionTTL", "path": "ActionTTL", "type": "*variable", "value": "~*req.11"},
					{"tag": "ActionType", "path": "ActionType", "type": "*variable", "value": "~*req.12"},
					{"tag": "ActionOpts", "path": "ActionOpts", "type": "*variable", "value": "~*req.13"},
					{"tag": "ActionPath", "path": "ActionPath", "type": "*variable", "value": "~*req.14"},
					{"tag": "ActionValue", "path": "ActionValue", "type": "*variable", "value": "~*req.15"},
				],
			},
			{
				"type": "*accounts",						// data source type
				"file_name": "Accounts.csv",				// file name in the tp_in_dir
				"fields": [
					{"tag": "Tenant", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
					{"tag": "ID", "path": "ID", "type": "*variable", "value": "~*req.1", "mandatory": true},
					{"tag": "FilterIDs", "path": "FilterIDs", "type": "*variable", "value": "~*req.2"},
					{"tag": "ActivationInterval", "path": "ActivationInterval", "type": "*variable", "value": "~*req.3"},
					{"tag": "Weight", "path": "Weight", "type": "*variable", "value": "~*req.4"},
					{"tag": "BalanceID", "path": "BalanceID", "type": "*variable", "value": "~*req.5"},
					{"tag": "BalanceFilterIDs", "path": "BalanceFilterIDs", "type": "*variable", "value": "~*req.6"},
					{"tag": "BalanceWeight", "path": "BalanceWeight", "type": "*variable", "value": "~*req.7"},
					{"tag": "BalanceBlocker", "path": "BalanceBlocker", "type": "*variable", "value": "~*req.8"},
					{"tag": "BalanceType", "path": "BalanceType", "type": "*variable", "value": "~*req.9"},
					{"tag": "BalanceOpts", "path": "BalanceOpts", "type": "*variable", "value": "~*req.10"},
					{"tag": "BalanceCostIncrements", "path": "BalanceCostIncrements", "type": "*variable", "value": "~*req.11"},
					{"tag": "BalanceAttributeIDs", "path": "BalanceAttributeIDs", "type": "*variable", "value": "~*req.12"},
					{"tag": "BalanceRateProfileIDs", "path": "BalanceRateProfileIDs", "type": "*variable", "value": "~*req.13"},
					{"tag": "BalanceUnitFactors", "path": "BalanceUnitFactors", "type": "*variable", "value": "~*req.14"},
					{"tag": "BalanceUnits", "path": "BalanceUnits", "type": "*variable", "value": "~*req.15"},
					{"tag": "ThresholdIDs", "path": "ThresholdIDs", "type": "*variable", "value": "~*req.16"},
				],
			},
		],
	},
],


"suretax": {
	"url": "",								// API url
	"client_number": "",					// client number, provided by SureTax
	"validation_key": "",					// validation key provided by SureTax
	"business_unit": "",					// client’s Business Unit
	"timezone": "Local",					// convert the time of the events to this timezone before sending request out <UTC|Local|$IANA_TZ_DB>
	"include_local_cost": false,			// sum local calculated cost with tax one in final cost
	"return_file_code": "0",				// default or Quote purposes <0|Q>
	"response_group": "03",					// determines how taxes are grouped for the response <03|13>
	"response_type": "D4",					// determines the granularity of taxes and (optionally) the decimal precision for the tax calculations and amounts in the response
	"regulatory_code": "03",				// provider type
	"client_tracking": "~*req.CGRID",		// template extracting client information out of StoredCdr; <RSRParsers>
	"customer_number": "~*req.Subject",		// template extracting customer number out of StoredCdr; <RSRParsers>
	"orig_number":  "~*req.Subject", 		// template extracting origination number out of StoredCdr; <RSRParsers>
	"term_number": "~*req.Destination",		// template extracting termination number out of StoredCdr; <RSRParsers>
	"bill_to_number": "",					// template extracting billed to number out of StoredCdr; <RSRParsers>
	"zipcode": "",							// template extracting billing zip code out of StoredCdr; <RSRParsers>
	"plus4": "",							// template extracting billing zip code extension out of StoredCdr; <RSRParsers>
	"p2pzipcode": "",						// template extracting secondary zip code out of StoredCdr; <RSRParsers>
	"p2pplus4": "",							// template extracting secondary zip code extension out of StoredCdr; <RSRParsers>
	"units": "1",							// template extracting number of “lines” or unique charges contained within the revenue out of StoredCdr; <RSRParsers>
	"unit_type": "00",						// template extracting number of unique access lines out of StoredCdr; <RSRParsers>
	"tax_included": "0",					// template extracting tax included in revenue out of StoredCdr; <RSRParsers>
	"tax_situs_rule": "04",					// template extracting tax situs rule out of StoredCdr; <RSRParsers>
	"trans_type_code": "010101",			// template extracting transaction type indicator out of StoredCdr; <RSRParsers>
	"sales_type_code": "R",					// template extracting sales type code out of StoredCdr; <RSRParsers>
	"tax_exemption_code_list": "",			// template extracting tax exemption code list out of StoredCdr; <RSRParsers>
},


"loader": {											// loader for tariff plans out of .csv files
	"tpid": "",										// tariff plan identificator
	"data_path": "./",								// path towards tariff plan files
	"disable_reverse": false,						// disable reverse computing
	"field_separator": ",",							// separator used in case of csv files
	"caches_conns":["*localhost"],
	"actions_conns": ["*localhost"],
	"gapi_credentials": ".gapi/credentials.json", 	// the path to the credentials for google API or the credentials.json file content
	"gapi_token": ".gapi/token.json" 				// the path to the token for google API or the token.json file content
},


"migrator": {
	"out_datadb_type": "redis",
	"out_datadb_host": "127.0.0.1",
	"out_datadb_port": "6379",
	"out_datadb_name": "10",
	"out_datadb_user": "cgrates",
	"out_datadb_password": "",
	"out_datadb_encoding" : "msgpack",		
	"out_stordb_type": "mysql",
	"out_stordb_host": "127.0.0.1",
	"out_stordb_port": "3306",
	"out_stordb_name": "cgrates",
	"out_stordb_user": "cgrates",
	"out_stordb_password": "",
	"users_filters":[],
	"out_datadb_opts":{
		"redis_sentinel": "",					
		"redis_cluster": false,					
		"redis_cluster_sync": "5s",					
		"redis_cluster_ondown_delay": "0",
		"redis_tls": false,					// enable TLS when connecting to Redis and use the redis_client_certificate, redis_client_key and redis_ca_certificate for TLS connection
		"redis_client_certificate":"",		// path to client certificate
		"redis_client_key":"",				// path to client key
		"redis_ca_certificate":"",			// path to CA certificate (populate for self-signed certificate otherwise let it empty)
	},
	"out_stordb_opts":{},
},


"dispatchers":{								// DispatcherS config
	"enabled": false,						// starts DispatcherS service: <true|false>.
	"indexed_selects": true,				// enable profile matching exclusively on indexes
	//"string_indexed_fields": [],			// query indexes based on these fields for faster processing
	"prefix_indexed_fields": [],			// query indexes based on these fields for faster processing
	"suffix_indexed_fields": [],			// query indexes based on these fields for faster processing
	"nested_fields": false,					// determines which field is checked when matching indexed filters(true: all; false: only the one on the first level)
	"attributes_conns": [],					// connections to AttributeS for API authorization, empty to disable auth functionality: <""|*internal|$rpc_conns_id>
},


"registrarc":{
    "rpc":{
        "enabled": false,
        "registrars_conns": [],
        "hosts": {},  
        "refresh_interval": "5m",
    },
    "dispatcher":{
        "enabled": false,
        "registrars_conns": [],
        "hosts": {},  
        "refresh_interval": "5m",
    },
},


"analyzers":{									// AnalyzerS config
	"enabled": false,							// starts AnalyzerS service: <true|false>.
 	"db_path": "/var/spool/cgrates/analyzers",	// path to the folder where to store the information
	"index_type": "*scorch",					// the type of index for the storage: <*scorch|*boltdb|*leveldb|*mossdb>
	"ttl": "24h",								// time to wait before removing the API capture
	"cleanup_interval": "1h",					// the interval we clean the db
},


"admins": {
	"enabled": false,
	"caches_conns":["*internal"],
	"actions_conns": [],					// connections to ActionS for reloads
	"attributes_conns": [],					// connections to AttributeS for CDRExporter
	"ees_conns": [],						// connections to EEs
},


"rates": {
	"enabled": false,
	"indexed_selects": true,				// enable profile matching exclusively on indexes
	//"string_indexed_fields": [],			// query indexes based on these fields for faster processing
	"prefix_indexed_fields": [],			// query indexes based on these fields for faster processing
	"suffix_indexed_fields": [],			// query indexes based on these fields for faster processing
	"nested_fields": false,					// determines which field is checked when matching indexed filters(true: all; false: only the one on the first level)
	"rate_indexed_selects": true,			// enable profile matching exclusively on indexes
	//"rate_string_indexed_fields": [],		// query indexes based on these fields for faster processing
	"rate_prefix_indexed_fields": [],		// query indexes based on these fields for faster processing
	"rate_suffix_indexed_fields": [],		// query indexes based on these fields for faster processing
	"rate_nested_fields": false,			// determines which field is checked when matching indexed filters(true: all; false: only the one on the first level)
    "verbosity": 1000,                      // number of increment iterations allowed
},


"sip_agent": {							// SIP Agents, only used for redirections
	"enabled": false,					// enables the SIP agent: <true|false>
	"listen": "127.0.0.1:5060",			// address where to listen for SIP requests <x.y.z.y:1234>
	"listen_net": "udp",				// network to listen on <udp|tcp|tcp-tls>
	"sessions_conns": ["*internal"],
	"timezone": "",						// timezone of the events if not specified  <UTC|Local|$IANA_TZ_DB>
	"retransmission_timer": "1s",		// the duration to wait to receive an ACK before resending the reply
	"request_processors": [				// request processors to be applied to SIP messages
	],
},


"templates": {
	"*err": [
			{"tag": "SessionId", "path": "*rep.Session-Id", "type": "*variable",
				"value": "~*req.Session-Id", "mandatory": true},
			{"tag": "OriginHost", "path": "*rep.Origin-Host", "type": "*variable",
				"value": "~*vars.OriginHost", "mandatory": true},
			{"tag": "OriginRealm", "path": "*rep.Origin-Realm", "type": "*variable",
				"value": "~*vars.OriginRealm", "mandatory": true},
	],
	"*cca": [
			{"tag": "SessionId", "path": "*rep.Session-Id", "type": "*variable",
				"value": "~*req.Session-Id", "mandatory": true},
			{"tag": "ResultCode", "path": "*rep.Result-Code", "type": "*constant",
				"value": "2001"},
			{"tag": "OriginHost", "path": "*rep.Origin-Host", "type": "*variable",
				"value": "~*vars.OriginHost", "mandatory": true},
			{"tag": "OriginRealm", "path": "*rep.Origin-Realm", "type": "*variable",
				"value": "~*vars.OriginRealm", "mandatory": true},
			{"tag": "AuthApplicationId", "path": "*rep.Auth-Application-Id", "type": "*variable",
				 "value": "~*vars.*appid", "mandatory": true},
			{"tag": "CCRequestType", "path": "*rep.CC-Request-Type", "type": "*variable",
				"value": "~*req.CC-Request-Type", "mandatory": true},
			{"tag": "CCRequestNumber", "path": "*rep.CC-Request-Number", "type": "*variable",
				"value": "~*req.CC-Request-Number", "mandatory": true},
	],
	"*asr": [
			{"tag": "SessionId", "path": "*diamreq.Session-Id", "type": "*variable",
				"value": "~*req.Session-Id", "mandatory": true},
			{"tag": "OriginHost", "path": "*diamreq.Origin-Host", "type": "*variable",
				"value": "~*req.Destination-Host", "mandatory": true},
			{"tag": "OriginRealm", "path": "*diamreq.Origin-Realm", "type": "*variable",
				"value": "~*req.Destination-Realm", "mandatory": true},
			{"tag": "DestinationRealm", "path": "*diamreq.Destination-Realm", "type": "*variable",
				"value": "~*req.Origin-Realm", "mandatory": true},
			{"tag": "DestinationHost", "path": "*diamreq.Destination-Host", "type": "*variable",
				"value": "~*req.Origin-Host", "mandatory": true},
			{"tag": "AuthApplicationId", "path": "*diamreq.Auth-Application-Id", "type": "*variable",
				 "value": "~*vars.*appid", "mandatory": true},
	],
	"*rar": [
		{"tag": "SessionId", "path": "*diamreq.Session-Id", "type": "*variable",
			"value": "~*req.Session-Id", "mandatory": true},
		{"tag": "OriginHost", "path": "*diamreq.Origin-Host", "type": "*variable",
			"value": "~*req.Destination-Host", "mandatory": true},
		{"tag": "OriginRealm", "path": "*diamreq.Origin-Realm", "type": "*variable",
			"value": "~*req.Destination-Realm", "mandatory": true},
		{"tag": "DestinationRealm", "path": "*diamreq.Destination-Realm", "type": "*variable",
			"value": "~*req.Origin-Realm", "mandatory": true},
		{"tag": "DestinationHost", "path": "*diamreq.Destination-Host", "type": "*variable",
			"value": "~*req.Origin-Host", "mandatory": true},
		{"tag": "AuthApplicationId", "path": "*diamreq.Auth-Application-Id", "type": "*variable",
			 "value": "~*vars.*appid", "mandatory": true},
		{"tag": "ReAuthRequestType", "path": "*diamreq.Re-Auth-Request-Type", "type": "*constant",
			"value": "0"},
	],
	"*errSip": [
			{"tag": "Request", "path": "*rep.Request", "type": "*constant",
				"value": "SIP/2.0 500 Internal Server Error", "mandatory": true},
	],
	"*cdrLog": [ // cdrLog template is used in ActionS to build the event that is send to CDRs in case of *cdrLog actionType
		{"tag": "ToR", "path": "*cdr.ToR", "type": "*variable",
			"value": "~*req.BalanceType", "mandatory": true},
		{"tag": "OriginHost", "path": "*cdr.OriginHost", "type": "*constant",
			"value": "127.0.0.1", "mandatory": true},
		{"tag": "RequestType", "path": "*cdr.RequestType", "type": "*constant",
			"value": "*none", "mandatory": true},
		{"tag": "Tenant", "path": "*cdr.Tenant", "type": "*variable",
			"value": "~*req.Tenant", "mandatory": true},
		{"tag": "Account", "path": "*cdr.Account", "type": "*variable",
			"value": "~*req.Account", "mandatory": true},
		{"tag": "Subject", "path": "*cdr.Subject", "type": "*variable",
			"value": "~*req.Account", "mandatory": true},
		{"tag": "Cost", "path": "*cdr.Cost", "type": "*variable",
			"value": "~*req.Cost", "mandatory": true},
		{"tag": "Source", "path": "*cdr.Source", "type": "*constant",
			"value": "*cdrLog", "mandatory": true},
		{"tag": "Usage", "path": "*cdr.Usage", "type": "*constant",
			"value": "1", "mandatory": true},
		{"tag": "RunID", "path": "*cdr.RunID", "type": "*variable",
			"value": "~*req.ActionType", "mandatory": true},
		{"tag": "SetupTime", "path": "*cdr.SetupTime", "type": "*constant",
			"value": "*now", "mandatory": true},
		{"tag": "AnswerTime", "path": "*cdr.AnswerTime", "type": "*constant",
			"value": "*now", "mandatory": true},
		{"tag": "PreRated", "path": "*cdr.PreRated", "type": "*constant",
			"value": "true", "mandatory": true},
	],
},


"configs": {
	"enabled": false,
	"url": "/configs/",										// configs url 
	"root_dir": "/var/spool/cgrates/configs",				// root directory in case of calling /configs request
},


"apiban": {
	"enabled": false,
	"keys": [],
},


"actions": {								// ActionS config
	"enabled": false,						// starts attribute service: <true|false>
	"cdrs_conns": [],						// connections to CDRs for CDR posting <""|*internal|$rpc_conns_id>
	"ees_conns": [],						// connections to Ees for exporting event <""|*internal|$rpc_conns_id>
	"thresholds_conns": [],					// connections to ThresholdS for *reset_threshold action <""|*internal|$rpc_conns_id>
	"stats_conns": [],						// connections to StatS for *reset_stat_queue action: <""|*internal|$rpc_conns_id>
	"accounts_conns": [],					// connections to AccountS for *topup/*topup_reset action: <""|*internal|$rpc_conns_id>
	"tenants":[],							// List of tenants to operate on
	"indexed_selects": true,				// enable profile matching exclusively on indexes
	//"string_indexed_fields": [],			// query indexes based on these fields for faster processing
	"prefix_indexed_fields": [],			// query indexes based on these fields for faster processing
	"suffix_indexed_fields": [],			// query indexes based on these fields for faster processing
	"nested_fields": false,					// determines which field is checked when matching indexed filters(true: all; false: only the one on the first level)
},


"accounts": {								// AccountS config
	"enabled": false,						// starts service: <true|false>
	"indexed_selects": true,				// enable profile matching exclusively on indexes
	"attributes_conns": [],					// connections to AttributeS for account/balance updates, empty to disable attributes functionality: <""|*internal|$rpc_conns_id>
	"rates_conns": [],						// connections to RatesS for account/balance updates, empty to disable rates functionality: <""|*internal|$rpc_conns_id>
	"thresholds_conns": [],					// connections to ThresholdS for account/balance updates, empty to disable thresholds functionality: <""|*internal|$rpc_conns_id>
	//"string_indexed_fields": [],			// query indexes based on these fields for faster processing
	"prefix_indexed_fields": [],			// query indexes based on these fields for faster processing
	"suffix_indexed_fields": [],			// query indexes based on these fields for faster processing
	"nested_fields": false,					// determines which field is checked when matching indexed filters(true: all; false: only the one on the first level)
    "max_iterations": 1000,                 // maximum number of iterations
    "max_usage": "72h",                     // maximum time of usage
},


"config_db": {								// database used to store runtime data (eg: accounts)
	"db_type": "*internal",					// data_db type: <*redis|*mongo>
	"db_host": "",							// data_db host address
	"db_port": 0,	 						// data_db port to reach the database
	"db_name": "",	 						// data_db database name to connect to
	"db_user": "",		 					// username to use when connecting to data_db
	"db_password": "", 						// password to use when connecting to data_db
	"opts":{
		"redis_sentinel": "",					// the name of sentinel when used
		"redis_cluster": false,					// if enabled the datadb will try to connect to the redis cluster
		"redis_cluster_sync": "5s",				// the sync interval for the redis cluster
		"redis_cluster_ondown_delay": "0",		// the delay before executing the commands if the redis cluster is in the CLUSTERDOWN state
		"query_timeout":"10s",
		"redis_tls": false,						// if true it will use a tls connection and use the redis_client_certificate certificate, redis_client_key and redis_ca_certificate for tls connection
		"redis_client_certificate":"",			// path to client certificate
		"redis_client_key":"",					// path to client key
		"redis_ca_certificate":"",				// path to CA certificate (populate for self-signed certificate otherwise let it empty)
	}
},


}`
