{
// CGRateS Configuration file
//


"general": {
	"node_id": "CGRateSTutorial",
},

"logger": {
	"level": 7
},

"rpc_conns": {
	"conn1": {
		"strategy": "*first",
		"conns": [{"address": "127.0.0.1:2013", "transport":"*gob"}],
	},
},


"listen": {
	"rpc_json": ":2012",
	"rpc_gob": ":2013",
	"http": ":2080",
},


"db": {
	"db_conns": {
		"*default": {
			"db_type": "mongo",
			"db_host": "127.0.0.1",	
			"db_port": 27017,
			"db_name": "10",
			"db_user": "cgrates"
		},
		"StorDB": {
			"db_type": "mongo",
			"db_host": "127.0.0.1",	
			"db_port": 27017,
			"db_name": "cgrates",
			"db_user": "cgrates"
		}
	},
	"items": {
		"*cdrs": {"limit": -1, "ttl": "", "static_ttl": false, "remote":false, "replicate":false, "dbConn": "StorDB"}
	}
},

"schedulers": {
	"enabled": true,
	"cdrs_conns": ["conn1"],
},


"rals": {
	"enabled": true,
	"thresholds_conns": ["conn1"],
	"stats_conns": ["conn1"],
},


"cdrs": {
	"enabled": true,
	"extra_fields": ["~*req.PayPalAccount", "~*req.LCRProfile", "~*req.ResourceID"],
	"chargers_conns":["conn1"],
	"online_cdr_exports": [],
	"ees_conns": ["*localhost"]
},


"ees": {
	"enabled": true,
	"attributes_conns":["*internal"],
	"exporters": [
		{
			"id": "amqp_localhost",
			"type": "*amqpJSONMap",
			"export_path": "amqp://guest:guest@localhost:5672/",
			"opts": {
				"amqpQueueID":"cgrates_cdrs",
			},
			"attempts": 1,
			"fields":[
				{"tag": "*originID", "path": "*exp.*originID", "type": "*variable", "value": "~*opts.*originID"},
				{"tag": "RunID", "path": "*exp.RunID", "type": "*variable", "value": "~*req.RunID"},
				{"tag": "ToR", "path": "*exp.ToR", "type": "*variable", "value": "~*req.ToR"},
				{"tag": "OriginID", "path": "*exp.OriginID", "type": "*variable", "value": "~*req.OriginID"},
				{"tag": "RequestType", "path": "*exp.RequestType", "type": "*variable", "value": "~*req.RequestType"},
				{"tag": "Tenant", "path": "*exp.Tenant", "type": "*variable", "value": "~*req.Tenant"},
				{"tag": "Category", "path": "*exp.Category", "type": "*variable", "value": "~*req.Category"},
				{"tag": "Account", "path": "*exp.Account", "type": "*variable", "value": "~*req.Account"},
				{"tag": "Subject", "path": "*exp.Subject", "type": "*variable", "value": "~*req.Subject"},
				{"tag": "Destination", "path": "*exp.Destination", "type": "*variable", "value": "~*req.Destination"},
				{"tag": "SetupTime", "path": "*exp.SetupTime", "type": "*variable", "value": "~*req.SetupTime"},
				{"tag": "AnswerTime", "path": "*exp.AnswerTime", "type": "*variable", "value": "~*req.AnswerTime"},
				{"tag": "Usage", "path": "*exp.Usage", "type": "*variable", "value": "~*req.Usage"},
				{"tag": "Cost", "path": "*exp.Cost", "type": "*variable", "value": "~*req.Cost{*round:4}"},
				{"tag": "PayPalAccount", "path": "*exp.PayPalAccount", "type": "*variable", "value": "~*req.PayPalAccount"},
				{"tag": "LCRProfile", "path": "*exp.LCRProfile", "type": "*variable", "value": "~*req.LCRProfile"},
				{"tag": "ResourceID", "path": "*exp.ResourceID", "type": "*variable", "value": "~*req.ResourceID"}
			],
		},
	],
},


"sessions": {
	"enabled": true,
	"resources_conns": ["conn1"],
	"routes_conns": ["conn1"],
	"attributes_conns": ["conn1"],
	"rals_conns": ["*internal"],
	"cdrs_conns": ["*internal"],
	"chargers_conns": ["*internal"],
},


"attributes": {
	"enabled": true,
	"string_indexed_fields": ["*req.Account"]
},


"chargers": {
	"enabled": true,
	"attributes_conns": ["conn1"],
	"string_indexed_fields": ["*req.Account"]
},


"resources": {
	"enabled": true,
	"thresholds_conns": ["conn1"],
	"string_indexed_fields": ["*req.Account"]
},


"stats": {
	"enabled": true,
	"thresholds_conns": ["conn1"],
	"string_indexed_fields": ["*req.Account"]
},


"thresholds": {
	"enabled": true,
	"string_indexed_fields": ["*req.Account"]
},


"routes": {
	"enabled": true,
	"string_indexed_fields": ["*req.LCRProfile"],
	"prefix_indexed_fields":["*req.Destination"],
},


"admins": {
	"enabled": true,
	"scheduler_conns": ["*internal"],
},


"filters": {								
	"accounts_conns": ["*internal"],
},

"accounts": {
    "enabled": true
},

}
