From 8c47c6f6d82d823d99af3b53107ca9db1142ce9b Mon Sep 17 00:00:00 2001 From: TeoV Date: Thu, 16 Jul 2020 16:13:01 +0300 Subject: [PATCH] Update rest of config with the new EventExporter --- apier/v1/apier_it_test.go | 2 +- config/multifiles_it_test.go | 28 --- .../cdrsreplicationmaster.json | 223 +++++++++-------- .../cdrsreplicationmaster.json | 224 ++++++++++-------- .../samples/cdrsv1processevent/cgrates.json | 30 ++- .../cdrsv1processeventmongo/cgrates.json | 27 ++- .../cdrsv1processeventmysql/cgrates.json | 28 ++- .../cdrsv_failover_internal/cgrates.json | 27 ++- .../samples/cdrsv_failover_mongo/cgrates.json | 29 ++- .../samples/cdrsv_failover_mysql/cgrates.json | 48 ++-- data/conf/samples/tutmongo2/cgrates.json | 58 +++-- data/conf/samples/tutmongo2_gob/cgrates.json | 58 +++-- 12 files changed, 442 insertions(+), 340 deletions(-) diff --git a/apier/v1/apier_it_test.go b/apier/v1/apier_it_test.go index b231877ca..873c1ce45 100644 --- a/apier/v1/apier_it_test.go +++ b/apier/v1/apier_it_test.go @@ -169,7 +169,7 @@ func testApierLoadConfig(t *testing.T) { } func testApierCreateDirs(t *testing.T) { - for _, pathDir := range []string{cfg.CdreProfiles[utils.MetaDefault].ExportPath, "/var/log/cgrates/ers/in", "/var/log/cgrates/ers/out"} { + for _, pathDir := range []string{"/var/log/cgrates/ers/in", "/var/log/cgrates/ers/out"} { if err := os.RemoveAll(pathDir); err != nil { t.Fatal("Error removing folder: ", pathDir, err) } diff --git a/config/multifiles_it_test.go b/config/multifiles_it_test.go index 646ffa068..1a84e2fbc 100644 --- a/config/multifiles_it_test.go +++ b/config/multifiles_it_test.go @@ -51,34 +51,6 @@ func TestMfGeneralItems(t *testing.T) { } } -func TestMfCdreDefaultInstance(t *testing.T) { - for _, prflName := range []string{utils.MetaDefault, "export1"} { - if _, hasIt := mfCgrCfg.CdreProfiles[prflName]; !hasIt { - t.Error("Cdre does not contain profile ", prflName) - } - } - prfl := utils.MetaDefault - if mfCgrCfg.CdreProfiles[prfl].ExportFormat != utils.MetaFileCSV { - t.Error("Default instance has cdrFormat: ", mfCgrCfg.CdreProfiles[prfl].ExportFormat) - } - if len(mfCgrCfg.CdreProfiles[prfl].Fields) != 11 { - t.Error("Default instance has number of content fields: ", len(mfCgrCfg.CdreProfiles[prfl].Fields)) - } -} - -func TestMfCdreExport1Instance(t *testing.T) { - prfl := "export1" - if mfCgrCfg.CdreProfiles[prfl].ExportFormat != utils.MetaFileCSV { - t.Error("Export1 instance has cdrFormat: ", mfCgrCfg.CdreProfiles[prfl].ExportFormat) - } - if len(mfCgrCfg.CdreProfiles[prfl].Fields) != 9 { - t.Error("Export1 instance has number of content fields: ", len(mfCgrCfg.CdreProfiles[prfl].Fields)) - } - if mfCgrCfg.CdreProfiles[prfl].Fields[2].Tag != "*exp.Account" { - t.Error("Unexpected headerField value: ", mfCgrCfg.CdreProfiles[prfl].Fields[2].Tag) - } -} - func TestMfEnvReaderITRead(t *testing.T) { expected := GeneralCfg{ NodeID: "d80fac5", diff --git a/data/conf/samples/cdrsonexpmaster_mongo/cdrsreplicationmaster.json b/data/conf/samples/cdrsonexpmaster_mongo/cdrsreplicationmaster.json index 7c8a91451..0f96b0aed 100644 --- a/data/conf/samples/cdrsonexpmaster_mongo/cdrsreplicationmaster.json +++ b/data/conf/samples/cdrsonexpmaster_mongo/cdrsreplicationmaster.json @@ -33,109 +33,140 @@ "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, +}, -"cdre": { - "http_localhost": { - "export_format": "*http_post", - "export_path": "http://127.0.0.1:12080/cdr_http", - "fields": [ // template of the exported content fields - {"path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"}, - {"path": "*exp.RunID", "type": "*variable", "value": "~*req.RunID"}, - {"path": "*exp.ToR", "type": "*variable", "value": "~*req.ToR"}, - {"path": "*exp.OriginID", "type": "*variable", "value": "~*req.OriginID"}, - {"path": "*exp.OriginHost", "type": "*variable", "value": "~*req.OriginHost"}, - {"path": "*exp.RequestType", "type": "*variable", "value": "~*req.RequestType"}, - {"path": "*exp.Tenant", "type": "*variable", "value": "~*req.Tenant"}, - {"path": "*exp.Category", "type": "*variable", "value": "~*req.Category"}, - {"path": "*exp.Account", "type": "*variable", "value": "~*req.Account"}, - {"path": "*exp.Subject", "type": "*variable", "value": "~*req.Subject"}, - {"path": "*exp.Destination", "type": "*variable", "value": "~*req.Destination"}, - {"path": "*exp.SetupTime", "type": "*variable", "value": "~*req.SetupTime", "layout": "2006-01-02T15:04:05Z07:00"}, - {"path": "*exp.AnswerTime", "type": "*variable", "value": "~*req.AnswerTime", "layout": "2006-01-02T15:04:05Z07:00"}, - {"path": "*exp.Usage", "type": "*variable", "value": "~*req.Usage"}, - {"path": "*exp.Cost", "type": "*variable", "value": "~*req.Cost"}, - ], - }, - "amqp_localhost": { - "export_format": "*amqp_json_map", - "export_path": "amqp://guest:guest@localhost:5672/?queue_id=cgrates_cdrs&exchange=exchangename&exchange_type=fanout&routing_key=cgr_cdrs", - "attempts": 3, - "fields": [ // template of the exported content fields - {"path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"}, - {"path": "*exp.RunID", "type": "*variable", "value": "~*req.RunID"}, - {"path": "*exp.ToR", "type": "*variable", "value": "~*req.ToR"}, - {"path": "*exp.OriginID", "type": "*variable", "value": "~*req.OriginID"}, - {"path": "*exp.OriginHost", "type": "*variable", "value": "~*req.OriginHost"}, - {"path": "*exp.RequestType", "type": "*variable", "value": "~*req.RequestType"}, - {"path": "*exp.Tenant", "type": "*variable", "value": "~*req.Tenant"}, - {"path": "*exp.Category", "type": "*variable", "value": "~*req.Category"}, - {"path": "*exp.Account", "type": "*variable", "value": "~*req.Account"}, - {"path": "*exp.Subject", "type": "*variable", "value": "~*req.Subject"}, - {"path": "*exp.Destination", "type": "*variable", "value": "~*req.Destination"}, - {"path": "*exp.SetupTime", "type": "*variable", "value": "~*req.SetupTime", "layout": "2006-01-02T15:04:05Z07:00"}, - {"path": "*exp.AnswerTime", "type": "*variable", "value": "~*req.AnswerTime", "layout": "2006-01-02T15:04:05Z07:00"}, - {"path": "*exp.Usage", "type": "*variable", "value": "~*req.Usage"}, - {"path": "*exp.Cost", "type": "*variable", "value": "~*req.Cost"}, - ], - }, - "http_test_file": { - "export_format": "*http_post", - "export_path": "http://127.0.0.1:12080/invalid", - "fields": [ - {"path": "*exp.OriginID", "type": "*variable", "value": "~*req.OriginID"}, - ], - }, - "aws_test_file": { - "export_format": "*amqpv1_json_map", - "export_path": "amqps://guest:guest@localhost:25672/?queue_id=cgrates_cdrs", - "fields": [ - {"path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"}, - ], - }, - "sqs_test_file": { - "export_format": "*sqs_json_map", - // export_path for sqs: "endpoint?aws_region=region&aws_key=IDkey&aws_secret=secret&aws_token=sessionToken&queue_id=cgrates-cdrs" - "export_path": "http://sqs.eu-west-2.amazonaws.com/?aws_region=eu-west-2&aws_key=testkey&aws_secret=testsecret&queue_id=cgrates-cdrs", - "fields": [ - {"path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"}, - ], - }, - "amqp_test_file": { - "export_format": "*amqp_json_map", - "export_path": "amqp://guest:guest@localhost:25672/?queue_id=cgrates_cdrs", - "fields": [ - {"path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"}, - ], - }, - "kafka_localhost": { - "export_format": "*kafka_json_map", - "export_path": "localhost:9092?topic=cgrates_cdrs", - "fields": [ - {"path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"}, - ], - }, - "s3_test_file": { - "export_format": "*s3_json_map", - // export_path for s3: "endpoint?aws_region=region&aws_key=IDkey&aws_secret=secret&aws_token=sessionToken&queue_id=cgrates-cdrs" - "export_path": "http://s3.us-east-2.amazonaws.com/?aws_region=eu-west-2&aws_key=testkey&aws_secret=testsecret&queue_id=cgrates-cdrs", - "fields": [ - {"path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"}, - ], - }, - "eventcost_filter": { - "export_format": "*amqp_json_map", - "export_path": "amqp://guest:guest@wrongurl:25672/?queue_id=cgrates_cdrs", - "filters":["*string:~*ec.Cost:100"], - "fields": [ - {"path": "*exp.CGRID", "type": "*composed", "value": "~*req.CGRID"}, - ], - }, +"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/?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/?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?aws_region=region&aws_key=IDkey&aws_secret=secret&aws_token=sessionToken&queue_id=cgrates-cdrs" + "export_path": "http://sqs.eu-west-2.amazonaws.com/?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/?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?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?aws_region=region&aws_key=IDkey&aws_secret=secret&aws_token=sessionToken&queue_id=cgrates-cdrs" + "export_path": "http://s3.us-east-2.amazonaws.com/?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/?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"} + ], + } + ], }, diff --git a/data/conf/samples/cdrsonexpmaster_mysql/cdrsreplicationmaster.json b/data/conf/samples/cdrsonexpmaster_mysql/cdrsreplicationmaster.json index 9200d6b83..3854801c3 100644 --- a/data/conf/samples/cdrsonexpmaster_mysql/cdrsreplicationmaster.json +++ b/data/conf/samples/cdrsonexpmaster_mysql/cdrsreplicationmaster.json @@ -31,109 +31,141 @@ "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, +}, -"cdre": { - "http_localhost": { - "export_format": "*http_post", - "export_path": "http://127.0.0.1:12080/cdr_http", - "fields": [ // template of the exported content fields - {"path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"}, - {"path": "*exp.RunID", "type": "*variable", "value": "~*req.RunID"}, - {"path": "*exp.ToR", "type": "*variable", "value": "~*req.ToR"}, - {"path": "*exp.OriginID", "type": "*variable", "value": "~*req.OriginID"}, - {"path": "*exp.OriginHost", "type": "*variable", "value": "~*req.OriginHost"}, - {"path": "*exp.RequestType", "type": "*variable", "value": "~*req.RequestType"}, - {"path": "*exp.Tenant", "type": "*variable", "value": "~*req.Tenant"}, - {"path": "*exp.Category", "type": "*variable", "value": "~*req.Category"}, - {"path": "*exp.Account", "type": "*variable", "value": "~*req.Account"}, - {"path": "*exp.Subject", "type": "*variable", "value": "~*req.Subject"}, - {"path": "*exp.Destination", "type": "*variable", "value": "~*req.Destination"}, - {"path": "*exp.SetupTime", "type": "*variable", "value": "~*req.SetupTime", "layout": "2006-01-02T15:04:05Z07:00"}, - {"path": "*exp.AnswerTime", "type": "*variable", "value": "~*req.AnswerTime", "layout": "2006-01-02T15:04:05Z07:00"}, - {"path": "*exp.Usage", "type": "*variable", "value": "~*req.Usage"}, - {"path": "*exp.Cost", "type": "*variable", "value": "~*req.Cost"}, - ], - }, - "amqp_localhost": { - "export_format": "*amqp_json_map", - "export_path": "amqp://guest:guest@localhost:5672/?queue_id=cgrates_cdrs&exchange=exchangename&exchange_type=fanout&routing_key=cgr_cdrs", - "attempts": 3, - "fields": [ // template of the exported content fields - {"path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"}, - {"path": "*exp.RunID", "type": "*variable", "value": "~*req.RunID"}, - {"path": "*exp.ToR", "type": "*variable", "value": "~*req.ToR"}, - {"path": "*exp.OriginID", "type": "*variable", "value": "~*req.OriginID"}, - {"path": "*exp.OriginHost", "type": "*variable", "value": "~*req.OriginHost"}, - {"path": "*exp.RequestType", "type": "*variable", "value": "~*req.RequestType"}, - {"path": "*exp.Tenant", "type": "*variable", "value": "~*req.Tenant"}, - {"path": "*exp.Category", "type": "*variable", "value": "~*req.Category"}, - {"path": "*exp.Account", "type": "*variable", "value": "~*req.Account"}, - {"path": "*exp.Subject", "type": "*variable", "value": "~*req.Subject"}, - {"path": "*exp.Destination", "type": "*variable", "value": "~*req.Destination"}, - {"path": "*exp.SetupTime", "type": "*variable", "value": "~*req.SetupTime", "layout": "2006-01-02T15:04:05Z07:00"}, - {"path": "*exp.AnswerTime", "type": "*variable", "value": "~*req.AnswerTime", "layout": "2006-01-02T15:04:05Z07:00"}, - {"path": "*exp.Usage", "type": "*variable", "value": "~*req.Usage"}, - {"path": "*exp.Cost", "type": "*variable", "value": "~*req.Cost"}, - ], - }, - "http_test_file": { - "export_format": "*http_post", - "export_path": "http://127.0.0.1:12080/invalid", - "fields": [ - {"path": "*exp.OriginID", "type": "*variable", "value": "~*req.OriginID"}, - ], - }, - "aws_test_file": { - "export_format": "*amqpv1_json_map", - "export_path": "amqps://guest:guest@localhost:25672/?queue_id=cgrates_cdrs", - "fields": [ - {"path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"}, - ], - }, - "sqs_test_file": { - "export_format": "*sqs_json_map", - // export_path for sqs: "endpoint?aws_region=region&aws_key=IDkey&aws_secret=secret&aws_token=sessionToken&queue_id=cgrates-cdrs" - "export_path": "http://sqs.eu-west-2.amazonaws.com/?aws_region=eu-west-2&aws_key=testkey&aws_secret=testsecret&queue_id=cgrates-cdrs", - "fields": [ - {"path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"}, - ], - }, - "amqp_test_file": { - "export_format": "*amqp_json_map", - "export_path": "amqp://guest:guest@localhost:25672/?queue_id=cgrates_cdrs", - "fields": [ - {"path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"}, - ], - }, - "kafka_localhost": { - "export_format": "*kafka_json_map", - "export_path": "localhost:9092?topic=cgrates_cdrs", - "fields": [ - {"path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"}, - ], - }, - "s3_test_file": { - "export_format": "*s3_json_map", - // export_path for s3: "endpoint?aws_region=region&aws_key=IDkey&aws_secret=secret&aws_token=sessionToken&queue_id=cgrates-cdrs" - "export_path": "http://s3.us-east-2.amazonaws.com/?aws_region=eu-west-2&aws_key=testkey&aws_secret=testsecret&queue_id=cgrates-cdrs", - "fields": [ - {"path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"}, - ], - }, - "eventcost_filter": { - "export_format": "*amqp_json_map", - "export_path": "amqp://guest:guest@wrongurl:25672/?queue_id=cgrates_cdrs", - "filters":["*string:~*ec.Cost:100"], - "fields": [ - {"path": "*exp.CGRID", "type": "*composed", "value": "~*req.CGRID"}, - ], - }, + +"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/?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/?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?aws_region=region&aws_key=IDkey&aws_secret=secret&aws_token=sessionToken&queue_id=cgrates-cdrs" + "export_path": "http://sqs.eu-west-2.amazonaws.com/?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/?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?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?aws_region=region&aws_key=IDkey&aws_secret=secret&aws_token=sessionToken&queue_id=cgrates-cdrs" + "export_path": "http://s3.us-east-2.amazonaws.com/?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/?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"} + ], + } + ], }, diff --git a/data/conf/samples/cdrsv1processevent/cgrates.json b/data/conf/samples/cdrsv1processevent/cgrates.json index 100984443..3dbbc9bbe 100644 --- a/data/conf/samples/cdrsv1processevent/cgrates.json +++ b/data/conf/samples/cdrsv1processevent/cgrates.json @@ -27,18 +27,27 @@ "attributes_conns": ["*internal"], }, -"cdre":{ - "aws_test_file": { - "export_format": "*amqp_json_map", - "export_path": "amqps://guest:guest@localhost:256733/", - "attempts": 1, // export attempts - "synchronous": true, // block processing until export has a result - "fields": [ - {"path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"}, - ], - }, + +"ees": { + "enabled": true, + "attributes_conns": ["*internal"], + "exporters": [ + { + "id": "aws_test_file", + "export_format": "*amqp_json_map", + "export_path": "amqps://guest:guest@localhost:256733/", + "tenant": "cgrates.org", + "attempts": 1, + "synchronous": true, + "fields":[ + {"tag": "CGRID", "path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"}, + ], + } + ] }, + + "stats": { "enabled": true, "store_interval": "-1", @@ -67,6 +76,7 @@ "stats_conns": ["*internal"], "thresholds_conns": ["*internal"], "online_cdr_exports": ["aws_test_file"], + "ees_conns": ["*localhost"] }, diff --git a/data/conf/samples/cdrsv1processeventmongo/cgrates.json b/data/conf/samples/cdrsv1processeventmongo/cgrates.json index 0c8556ebe..b12ccb579 100644 --- a/data/conf/samples/cdrsv1processeventmongo/cgrates.json +++ b/data/conf/samples/cdrsv1processeventmongo/cgrates.json @@ -31,16 +31,22 @@ "attributes_conns": ["*internal"], }, -"cdre":{ - "aws_test_file": { - "export_format": "*amqp_json_map", - "export_path": "amqps://guest:guest@localhost:256733/", - "attempts": 1, // export attempts - "synchronous": true, // block processing until export has a result - "fields": [ - {"path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"}, - ], - }, +"ees": { + "enabled": true, + "attributes_conns": ["*internal"], + "exporters": [ + { + "id": "aws_test_file", + "export_format": "*amqp_json_map", + "export_path": "amqps://guest:guest@localhost:256733/", + "tenant": "cgrates.org", + "attempts": 1, + "synchronous": true, + "fields":[ + {"tag": "CGRID", "path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"}, + ], + } + ] }, "stats": { @@ -71,6 +77,7 @@ "stats_conns": ["*internal"], "thresholds_conns": ["*internal"], "online_cdr_exports": ["aws_test_file"], + "ees_conns": ["*localhost"] }, diff --git a/data/conf/samples/cdrsv1processeventmysql/cgrates.json b/data/conf/samples/cdrsv1processeventmysql/cgrates.json index 1e3f66112..05de8a8c7 100644 --- a/data/conf/samples/cdrsv1processeventmysql/cgrates.json +++ b/data/conf/samples/cdrsv1processeventmysql/cgrates.json @@ -28,18 +28,25 @@ "attributes_conns": ["*internal"], }, -"cdre":{ - "aws_test_file": { - "export_format": "*amqp_json_map", - "export_path": "amqps://guest:guest@localhost:256733/", - "attempts": 1, // export attempts - "synchronous": true, // block processing until export has a result - "fields": [ - {"path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"}, - ], - }, +"ees": { + "enabled": true, + "attributes_conns": ["*internal"], + "exporters": [ + { + "id": "aws_test_file", + "export_format": "*amqp_json_map", + "export_path": "amqps://guest:guest@localhost:256733/", + "tenant": "cgrates.org", + "attempts": 1, + "synchronous": true, + "fields":[ + {"tag": "CGRID", "path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"}, + ], + } + ] }, + "stats": { "enabled": true, "store_interval": "-1", @@ -68,6 +75,7 @@ "stats_conns": ["*internal"], "thresholds_conns": ["*internal"], "online_cdr_exports": ["aws_test_file"], + "ees_conns": ["*localhost"] }, diff --git a/data/conf/samples/cdrsv_failover_internal/cgrates.json b/data/conf/samples/cdrsv_failover_internal/cgrates.json index de7b14751..e11864281 100644 --- a/data/conf/samples/cdrsv_failover_internal/cgrates.json +++ b/data/conf/samples/cdrsv_failover_internal/cgrates.json @@ -32,6 +32,7 @@ "stats_conns": ["*localhost"], "thresholds_conns": ["*localhost"], "online_cdr_exports": ["s3_test_file"], + "ees_conns": ["*localhost"] }, "attributes": { @@ -59,16 +60,22 @@ "scheduler_conns": ["*internal"], }, -"cdre": { - "s3_test_file": { - "export_format": "*s3_json_map", - // export_path for s3: "endpoint?aws_region=region&aws_key=IDkey&aws_secret=secret&aws_token=sessionToken&queue_id=cgrates-cdrs" - "export_path": "http://s3.us-east-2.amazonaws.com/?aws_region=eu-west-2&aws_key=testkey&aws_secret=testsecret&queue_id=cgrates-cdrs", - "fields": [ - {"path": "*expCGRID", "type": "*variable", "value": "~*req.CGRID"}, - ], - }, +"ees": { + "enabled": true, + "attributes_conns": ["*internal"], + "exporters": [ + { + "id": "s3_test_file", + "export_format": "*s3_json_map", + // export_path for s3: "endpoint?aws_region=region&aws_key=IDkey&aws_secret=secret&aws_token=sessionToken&queue_id=cgrates-cdrs" + "export_path": "http://s3.us-east-2.amazonaws.com/?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"}, + ], + } + ] }, - } diff --git a/data/conf/samples/cdrsv_failover_mongo/cgrates.json b/data/conf/samples/cdrsv_failover_mongo/cgrates.json index 4b4cf9ac3..800c0ee80 100644 --- a/data/conf/samples/cdrsv_failover_mongo/cgrates.json +++ b/data/conf/samples/cdrsv_failover_mongo/cgrates.json @@ -41,6 +41,7 @@ "stats_conns": ["*localhost"], "thresholds_conns": ["*localhost"], "online_cdr_exports": ["s3_test_file"], + "ees_conns": ["*localhost"] }, "attributes": { @@ -68,16 +69,26 @@ "scheduler_conns": ["*internal"], }, -"cdre": { - "s3_test_file": { - "export_format": "*s3_json_map", - // export_path for s3: "endpoint?aws_region=region&aws_key=IDkey&aws_secret=secret&aws_token=sessionToken&queue_id=cgrates-cdrs" - "export_path": "http://s3.us-east-2.amazonaws.com/?aws_region=eu-west-2&aws_key=testkey&aws_secret=testsecret&queue_id=cgrates-cdrs", - "fields": [ - {"path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"}, - ], - }, + +"ees": { + "enabled": true, + "attributes_conns": ["*internal"], + "exporters": [ + { + "id": "s3_test_file", + "export_format": "*s3_json_map", + // export_path for s3: "endpoint?aws_region=region&aws_key=IDkey&aws_secret=secret&aws_token=sessionToken&queue_id=cgrates-cdrs" + "export_path": "http://s3.us-east-2.amazonaws.com/?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"}, + ], + } + ] }, + + } diff --git a/data/conf/samples/cdrsv_failover_mysql/cgrates.json b/data/conf/samples/cdrsv_failover_mysql/cgrates.json index 67f0db678..071d23de5 100644 --- a/data/conf/samples/cdrsv_failover_mysql/cgrates.json +++ b/data/conf/samples/cdrsv_failover_mysql/cgrates.json @@ -7,28 +7,28 @@ "general": { "log_level": 7, "poster_attempts": 1, // number of attempts before considering post request failed (eg: *http_post, CDR exports) - "failed_posts_ttl": "1s", // time to wait before writing the failed posts in a single file + "failed_posts_ttl": "1s" // time to wait before writing the failed posts in a single file }, "data_db": { // database used to store runtime data (eg: accounts, cdr stats) "db_type": "redis", // data_db type: "db_port": 6379, // data_db port to reach the database - "db_name": "10", // data_db database name to connect to + "db_name": "10" // data_db database name to connect to }, "stor_db": { - "db_password": "CGRateS.org", + "db_password": "CGRateS.org" }, "rals": { "enabled": true, // enable Rater service: - "thresholds_conns": ["*localhost"], + "thresholds_conns": ["*localhost"] }, "schedulers": { - "enabled": true, + "enabled": true }, "cdrs": { @@ -39,43 +39,51 @@ "stats_conns": ["*localhost"], "thresholds_conns": ["*localhost"], "online_cdr_exports": ["s3_test_file"], + "ees_conns": ["*localhost"] }, "attributes": { - "enabled": true, + "enabled": true }, "stats": { "enabled": true, "store_interval": "1s", - "thresholds_conns": ["*internal"], + "thresholds_conns": ["*internal"] }, "thresholds": { "enabled": true, - "store_interval": "1s", + "store_interval": "1s" }, "chargers": { "enabled": true, - "attributes_conns": ["*internal"], + "attributes_conns": ["*internal"] }, "apiers": { "enabled": true, - "scheduler_conns": ["*internal"], + "scheduler_conns": ["*internal"] }, -"cdre": { - "s3_test_file": { - "export_format": "*s3_json_map", - // export_path for s3: "endpoint?aws_region=region&aws_key=IDkey&aws_secret=secret&aws_token=sessionToken&queue_id=cgrates-cdrs" - "export_path": "http://s3.us-east-2.amazonaws.com/?aws_region=eu-west-2&aws_key=testkey&aws_secret=testsecret&queue_id=cgrates-cdrs", - "fields": [ - {"path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"}, - ], - }, +"ees": { + "enabled": true, + "attributes_conns": ["*internal"], + "exporters": [ + { + "id": "s3_test_file", + "export_format": "*s3_json_map", + // export_path for s3: "endpoint?aws_region=region&aws_key=IDkey&aws_secret=secret&aws_token=sessionToken&queue_id=cgrates-cdrs" + "export_path": "http://s3.us-east-2.amazonaws.com/?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"}, + ], + } + ] }, -} +}, diff --git a/data/conf/samples/tutmongo2/cgrates.json b/data/conf/samples/tutmongo2/cgrates.json index 4b637d38e..940df3f82 100644 --- a/data/conf/samples/tutmongo2/cgrates.json +++ b/data/conf/samples/tutmongo2/cgrates.json @@ -47,34 +47,42 @@ "extra_fields": ["PayPalAccount", "LCRProfile", "ResourceID"], "chargers_conns":["*localhost"], "store_cdrs": true, - "online_cdr_exports": [] + "online_cdr_exports": [], + "ees_conns": ["*localhost"] }, -"cdre": { - "amqp_localhost": { - "export_format": "*amqp_json_map", - "export_path": "amqp://guest:guest@localhost:5672/?queue_id=cgrates_cdrs", - "fields": [ - {"path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"}, - {"path": "*exp.RunID", "type": "*variable", "value": "~*req.RunID"}, - {"path": "*exp.ToR", "type": "*variable", "value": "~*req.ToR"}, - {"path": "*exp.OriginID", "type": "*variable", "value": "~*req.OriginID"}, - {"path": "*exp.OriginHost", "type": "*variable", "value": "~*req.OriginHost"}, - {"path": "*exp.RequestType", "type": "*variable", "value": "~*req.RequestType", }, - {"path": "*exp.Tenant", "type": "*variable", "value": "~*req.Tenant"}, - {"path": "*exp.Category", "type": "*variable", "value": "~*req.Category"}, - {"path": "*exp.Account", "type": "*variable", "value": "~*req.Account"}, - {"path": "*exp.Destination", "type": "*variable", "value": "~*req.Destination"}, - {"path": "*exp.SetupTime", "type": "*variable", "value": "~*req.SetupTime"}, - {"path": "*exp.AnswerTime", "type": "*variable", "value": "~*req.AnswerTime"}, - {"path": "*exp.Usage", "type": "*variable", "value": "~*req.Usage"}, - {"path": "*exp.Cost", "type": "*variable", "value": "~*req.Cost"}, - {"path": "*exp.PayPalAccount", "type": "*variable", "value": "~*req.PayPalAccount"}, - {"path": "*exp.LCRProfile", "type": "*variable", "value": "~*req.LCRProfile", }, - {"path": "*exp.ResourceID", "type": "*variable", "value": "~*req.ResourceID", }, - ], - }, +"ees": { + "enabled": true, + "attributes_conns":["*internal"], + "exporters": [ + { + "id": "amqp_localhost", + "type": "*amqp_json_map", + "export_path": "amqp://guest:guest@localhost:5672/?queue_id=cgrates_cdrs", + "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}"}, + {"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"} + ], + }, + ], }, diff --git a/data/conf/samples/tutmongo2_gob/cgrates.json b/data/conf/samples/tutmongo2_gob/cgrates.json index c6a48dfe4..40f7f1230 100644 --- a/data/conf/samples/tutmongo2_gob/cgrates.json +++ b/data/conf/samples/tutmongo2_gob/cgrates.json @@ -54,34 +54,42 @@ "extra_fields": ["PayPalAccount", "LCRProfile", "ResourceID"], "chargers_conns":["conn1"], "store_cdrs": true, - "online_cdr_exports": [] + "online_cdr_exports": [], + "ees_conns": ["*localhost"] }, -"cdre": { - "amqp_localhost": { - "export_format": "*amqp_json_map", - "export_path": "amqp://guest:guest@localhost:5672/?queue_id=cgrates_cdrs", - "fields": [ - {"path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"}, - {"path": "*exp.RunID", "type": "*variable", "value": "~*req.RunID"}, - {"path": "*exp.ToR", "type": "*variable", "value": "~*req.ToR"}, - {"path": "*exp.OriginID", "type": "*variable", "value": "~*req.OriginID"}, - {"path": "*exp.OriginHost", "type": "*variable", "value": "~*req.OriginHost"}, - {"path": "*exp.RequestType", "type": "*variable", "value": "~*req.RequestType", }, - {"path": "*exp.Tenant", "type": "*variable", "value": "~*req.Tenant"}, - {"path": "*exp.Category", "type": "*variable", "value": "~*req.Category"}, - {"path": "*exp.Account", "type": "*variable", "value": "~*req.Account"}, - {"path": "*exp.Destination", "type": "*variable", "value": "~*req.Destination"}, - {"path": "*exp.SetupTime", "type": "*variable", "value": "~*req.SetupTime"}, - {"path": "*exp.AnswerTime", "type": "*variable", "value": "~*req.AnswerTime"}, - {"path": "*exp.Usage", "type": "*variable", "value": "~*req.Usage"}, - {"path": "*exp.Cost", "type": "*variable", "value": "~*req.Cost"}, - {"path": "*exp.PayPalAccount", "type": "*variable", "value": "~*req.PayPalAccount"}, - {"path": "*exp.LCRProfile", "type": "*variable", "value": "~*req.LCRProfile", }, - {"path": "*exp.ResourceID", "type": "*variable", "value": "~*req.ResourceID", }, - ], - }, +"ees": { + "enabled": true, + "attributes_conns":["*internal"], + "exporters": [ + { + "id": "amqp_localhost", + "type": "*amqp_json_map", + "export_path": "amqp://guest:guest@localhost:5672/?queue_id=cgrates_cdrs", + "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}"}, + {"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"} + ], + }, + ], },