{

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

"general": {
    "log_level": 7,
	"node_id":"CGRFreeswitch",
},


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


"stor_db": {
	"db_password": "CGRateS.org",
},


"schedulers": {
	"enabled": true,
},


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


"cdrs": {
	"enabled": true,
	"stats_conns": ["*localhost"],
	"chargers_conns": ["*internal"],
	"rals_conns": ["*localhost"],
	"sessions_cost_retries": 5,
},


"chargers": {
	"enabled": true,
	"attributes_conns": ["*internal"],
},


"sessions": {
	"enabled": true,
	"rals_conns": ["*localhost"],
	"cdrs_conns": ["*localhost"],
	"resources_conns": ["*localhost"],
	"routes_conns": ["*localhost"],
	"attributes_conns": ["*localhost"],
	"stats_conns": ["*localhost"],
	"thresholds_conns": ["*localhost"],
	"chargers_conns": ["*internal"],
	"debit_interval": "5s",
	"channel_sync_interval":"7s",
},


"freeswitch_agent": {
	"enabled": true,
	"event_socket_conns":[
		{"address": "127.0.0.1:8021", "password": "ClueCon", "reconnects": -1,"alias":""}
	],
	"sessions_conns": ["*birpc_internal"],
	"create_cdr": true
},


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


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


"stats": {
	"enabled": true,
	"string_indexed_fields": ["*req.Account","*req.RunID","*req.Destination"],
},


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


"routes": {
	"enabled": true,
	"resources_conns": ["*internal"],
	"stats_conns": ["*internal"],
	"rals_conns": ["*internal"],	
	"string_indexed_fields": ["*req.Account"],
},

"ees": {
	"enabled": true,
	"attributes_conns":["*internal"],
	"exporters": [
		{
			"id": "tutorial_export",
			"type": "*file_csv",
			"export_path": "/tmp/",
			"timezone": "UTC",
			"synchronous": true,
			"attempts": 1,
			"field_separator": ",",
			"fields":[
				{"tag": "CGRID", "path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"},
				{"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{*timestring::2006-01-02T15:04:05Z}" },
				{"tag": "AnswerTime", "path": "*exp.AnswerTime", "type": "*variable", "value": "~*req.AnswerTime{*timestring::2006-01-02T15:04:05Z}"},
				{"tag": "Usage", "path": "*exp.Usage", "type": "*variable", "value": "~*req.Usage{*duration_seconds}"},
				{"tag": "Cost", "path": "*exp.Cost", "type": "*variable", "value": "~*req.Cost{*round:4}"},
			],
		},
	]
},

"apiers": {
	"enabled": true,
	"scheduler_conns": ["*internal"],
	"ees_conns": ["*localhost"],
},


}
