mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
207 lines
6.7 KiB
JSON
207 lines
6.7 KiB
JSON
{
|
|
// CGRateS Configuration file
|
|
//
|
|
// Used in apier_local_tests
|
|
// Starts rater, cdrs and mediator connecting over internal channel
|
|
|
|
"general": {
|
|
"log_level": 7,
|
|
"poster_attempts": 1,
|
|
"failed_posts_ttl": "1",
|
|
},
|
|
|
|
"data_db": {
|
|
"db_type": "redis",
|
|
"db_port": 6379,
|
|
"db_name": "10",
|
|
},
|
|
|
|
"stor_db": { // database used to store offline tariff plans and CDRs
|
|
"db_password": "CGRateS.org", // password to use when connecting to stordb
|
|
},
|
|
|
|
|
|
"rals": {
|
|
"enabled": true, // enable Rater service: <true|false>
|
|
},
|
|
|
|
"cdrs": {
|
|
"enabled": true, // start the CDR Server service: <true|false>
|
|
"store_cdrs": false, // store cdrs in storDb
|
|
"chargers_conns":["*internal"],
|
|
"rals_conns": ["*internal"],
|
|
"online_cdr_exports": ["http_localhost", "amqp_localhost", "http_test_file", "amqp_test_file","aws_test_file","sqs_test_file","kafka_localhost","s3_test_file", "eventcost_filter"],
|
|
"ees_conns": ["*localhost"]
|
|
},
|
|
|
|
"chargers": {
|
|
"enabled": true,
|
|
},
|
|
|
|
"attributes": {
|
|
"enabled": true,
|
|
},
|
|
|
|
|
|
"ees": {
|
|
"enabled": true,
|
|
"exporters": [
|
|
{
|
|
"id": "http_localhost",
|
|
"type": "*http_post",
|
|
"export_path": "http://127.0.0.1:12080/cdr_http",
|
|
"tenant": "cgrates.org",
|
|
"attempts": 1,
|
|
"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"},
|
|
{"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}"},
|
|
],
|
|
},
|
|
{
|
|
"id": "amqp_localhost",
|
|
"type": "*amqp_json_map",
|
|
"export_path": "amqp://guest:guest@localhost:5672/",
|
|
"opts": {
|
|
"queue_id": "cgrates_cdrs",
|
|
"exchange": "exchangename",
|
|
"exchange_type": "fanout",
|
|
"routing_key": "cgr_cdrs",
|
|
},
|
|
"tenant": "cgrates.org",
|
|
"attempts": 3,
|
|
"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"},
|
|
{"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}"},
|
|
],
|
|
},
|
|
{
|
|
"id": "http_test_file",
|
|
"type": "*http_post",
|
|
"export_path": "http://127.0.0.1:12080/invalid",
|
|
"tenant": "cgrates.org",
|
|
"attempts": 1,
|
|
"fields":[
|
|
{"tag": "OriginID", "path": "*exp.OriginID", "type": "*variable", "value": "~*req.OriginID"},
|
|
],
|
|
},
|
|
{
|
|
"id": "aws_test_file",
|
|
"type": "*amqpv1_json_map",
|
|
"export_path": "amqps://guest:guest@localhost:25672/",
|
|
"opts": {
|
|
"queue_id": "cgrates_cdrs",
|
|
},
|
|
"tenant": "cgrates.org",
|
|
"attempts": 1,
|
|
"fields":[
|
|
{"tag": "CGRID", "path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"}
|
|
],
|
|
},
|
|
{
|
|
"id": "sqs_test_file",
|
|
"type": "*sqs_json_map",
|
|
// export_path for sqs: "endpoint"
|
|
"export_path": "http://sqs.eu-west-2.amazonaws.com/",
|
|
"opts": {
|
|
"aws_region": "eu-west-2",
|
|
"aws_key": "testkey",
|
|
"aws_secret": "testsecret",
|
|
"queue_id": "cgrates-cdrs",
|
|
},
|
|
"tenant": "cgrates.org",
|
|
"attempts": 1,
|
|
"fields":[
|
|
{"tag": "CGRID", "path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"}
|
|
],
|
|
},
|
|
{
|
|
"id": "amqp_test_file",
|
|
"type": "*amqp_json_map",
|
|
"export_path": "amqp://guest:guest@localhost:25672/",
|
|
"opts": {
|
|
"queue_id": "cgrates_cdrs",
|
|
},
|
|
"tenant": "cgrates.org",
|
|
"attempts": 1,
|
|
"fields":[
|
|
{"tag": "CGRID", "path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"}
|
|
],
|
|
},
|
|
{
|
|
"id": "kafka_localhost",
|
|
"type": "*kafka_json_map",
|
|
"export_path": "localhost:9092",
|
|
"opts": {
|
|
"topic": "cgrates_cdrs",
|
|
},
|
|
"tenant": "cgrates.org",
|
|
"attempts": 1,
|
|
"fields":[
|
|
{"tag": "CGRID", "path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"}
|
|
],
|
|
},
|
|
{
|
|
"id": "s3_test_file",
|
|
"type": "*s3_json_map",
|
|
// export_path for s3: "endpoint"
|
|
"export_path": "http://s3.us-east-2.amazonaws.com/",
|
|
"opts": {
|
|
"aws_region": "eu-west-2",
|
|
"aws_key": "testkey",
|
|
"aws_secret": "testsecret",
|
|
"queue_id": "cgrates-cdrs",
|
|
},
|
|
"tenant": "cgrates.org",
|
|
"attempts": 1,
|
|
"fields":[
|
|
{"tag": "CGRID", "path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"}
|
|
],
|
|
},
|
|
{
|
|
"id": "eventcost_filter",
|
|
"type": "*amqp_json_map",
|
|
"export_path": "amqp://guest:guest@wrongurl:25672/",
|
|
"opts": {
|
|
"queue_id": "cgrates_cdrs",
|
|
},
|
|
"tenant": "cgrates.org",
|
|
"filters":["*string:~*ec.Cost:100"],
|
|
"attempts": 1,
|
|
"fields":[
|
|
{"tag": "CGRID", "path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"}
|
|
],
|
|
}
|
|
],
|
|
},
|
|
|
|
|
|
"apiers": {
|
|
"enabled": true,
|
|
},
|
|
|
|
|
|
} |