From 8f6995d1858d8eee132d08577895cd8a0dbc0cc2 Mon Sep 17 00:00:00 2001 From: arberkatellari Date: Tue, 20 Jan 2026 12:55:20 +0200 Subject: [PATCH] Modify tests and samples for BiRPC SessionS<->ThresholdS --- analyzers/analyzers_it_test.go | 2 +- apier/v1/caps_it_test.go | 2 +- apier/v1/config_it_test.go | 7 - apier/v1/sessions_thresholds_it_test.go | 4 +- apier/v1/sessionsv1_it_test.go | 4 +- config/config_it_test.go | 6 +- config/config_json_test.go | 4 +- config/config_test.go | 12 +- config/listencfg_test.go | 8 + config/sessionscfg_test.go | 9 - cores/server_it_test.go | 10 +- data/conf/cgrates/cgrates.json | 4 +- .../dispatcher_engine2/cgrates.json | 78 +++--- .../cache_replicate/engine1/cgrates.json | 89 ++++--- .../fltr_update_e1_mongo/cgrates.json | 43 ++-- .../fltr_update_e1_mysql/cgrates.json | 50 ++-- .../dispatcher_engine2/cgrates.json | 93 ++++--- .../engine1/cgrates.json | 89 ++++--- data/conf/samples/caps_busy/cgrates.json | 4 +- data/conf/samples/caps_peak/cgrates.json | 4 +- data/conf/samples/caps_queue/cgrates.json | 2 +- data/conf/samples/configs_active/cgrates.json | 51 ++-- data/conf/samples/diam_tutmysql/cgrates.json | 129 +++++----- .../diamagent_internal_gobbirpc/cgrates.json | 2 +- .../diamagent_mongo_gobbirpc/cgrates.json | 2 +- .../diamagent_mysql_gobbirpc/cgrates.json | 2 +- .../conf/samples/dispatchers/all/cgrates.json | 4 +- .../samples/dispatchers/all2/cgrates.json | 4 +- .../dispatchers/all2_mongo/cgrates.json | 4 +- .../dispatchers/all2_mysql/cgrates.json | 4 +- .../dispatchers/all_mongo/cgrates.json | 4 +- .../dispatchers/all_mysql/cgrates.json | 4 +- .../dispatchers_internal/cgrates.json | 2 +- .../dispatchers_internal_gob/cgrates.json | 6 +- .../dispatchers_mongo/cgrates.json | 2 +- .../dispatchers_mongo_gob/cgrates.json | 2 +- .../dispatchers_mysql/cgrates.json | 4 +- .../dispatchers_mysql_gob/cgrates.json | 6 +- .../dispatchers_no_attributes/cgrates.json | 2 +- .../dispatchers/trd_rnk2_mongo/cgrates.json | 76 +++--- .../dispatchers/trd_rnk2_mysql/cgrates.json | 69 +++-- .../dispatchers/trd_rnk_mongo/cgrates.json | 75 +++--- .../dispatchers/trd_rnk_mysql/cgrates.json | 70 +++--- data/conf/samples/docker/cgrates.json | 2 +- data/conf/samples/fraud_internal/cgrates.json | 4 +- data/conf/samples/fraud_mongo/cgrates.json | 4 +- data/conf/samples/fraud_mysql/cgrates.json | 4 +- .../samples/full_remote/remote/cgrates.json | 62 +++-- data/conf/samples/gocs/au_site/cgrates.json | 83 +++--- data/conf/samples/gocs/us_site/cgrates.json | 2 +- .../cgrates.json | 2 +- .../loaders_indexes_internal_db/cgrates.json | 122 ++++----- .../samples/multiral2_internal/cgrates.json | 63 +++-- .../conf/samples/multiral2_mongo/cgrates.json | 72 +++--- .../conf/samples/multiral2_mysql/cgrates.json | 67 ++--- .../registrarc_rpc_mongo/cgrates.json | 238 +++++++++--------- .../registrarc_rpc_mysql/cgrates.json | 230 ++++++++--------- .../registrars_node_id/cgrates.json | 2 +- .../engine1_mongo/cgrates.json | 68 +++-- .../engine1_redis/cgrates.json | 61 +++-- .../engine2_mongo/cgrates.json | 1 + .../engine2_redis/cgrates.json | 81 +++--- .../replication/engine1_mongo/cgrates.json | 73 +++--- .../replication/engine1_redis/cgrates.json | 67 +++-- .../replication/engine2_mongo/cgrates.json | 74 +++--- .../replication/engine2_redis/cgrates.json | 65 +++-- .../samples/replication/internal/cgrates.json | 182 +++++++------- .../replication_cache/engine2/cgrates.json | 69 +++-- .../rerate_exp_engine2_internal/cgrates.json | 4 +- .../rerate_exp_engine2_mongo/cgrates.json | 4 +- .../rerate_exp_engine2_mysql/cgrates.json | 4 +- .../sbkupreplcengine2_mongo/cgrates.json | 2 +- .../sbkupreplcengine2_mongo_gob/cgrates.json | 2 +- .../sbkupreplcengine2_mysql/cgrates.json | 2 +- .../sbkupreplcengine2_mysql_gob/cgrates.json | 2 +- .../cgrates.json | 4 +- .../cgrates.json | 2 +- .../cgrates.json | 2 +- .../cgrates.json | 2 +- .../smgreplcslave_mongo/cgrates.json | 2 +- .../smgreplcslave_mysql/cgrates.json | 2 +- .../samples/smgreplcslave_mongo/cgrates.json | 2 +- .../smgreplcslave_mongo_gob/cgrates.json | 2 +- .../samples/smgreplcslave_mysql/cgrates.json | 2 +- .../smgreplcslave_mysql_gob/cgrates.json | 2 +- .../samples/twoengines/engine2/cgrates.json | 54 ++-- .../osips/cgrates/etc/cgrates/cgrates.json | 2 +- .../osips/cgrates/etc/cgrates/cgrates.json | 2 +- .../osips_diam/etc/cgrates/cgrates.json | 4 +- dispatchers/config_it_test.go | 2 + docs/sessions.rst | 3 - general_tests/all_cfg_sect_rld_it_test.go | 8 +- general_tests/dsp_multi_chain_it_test.go | 40 +-- general_tests/dsp_routes_it_test.go | 8 +- integration_test.sh | 2 +- registrarc/registrarc_it_test.go | 3 +- services/asteriskagent_it_test.go | 8 +- services/asteriskagent_test.go | 4 +- services/datadb_it_test.go | 4 +- services/diameteragent_it_test.go | 6 +- services/dnsagent_it_test.go | 10 +- services/dnsagent_test.go | 2 +- services/ers_it_test.go | 4 +- services/freeswitchagent_it_test.go | 8 +- services/freeswitchagent_test.go | 2 +- services/httpagent_it_test.go | 4 +- services/kamailioagent_it_test.go | 8 +- services/kamailioagent_test.go | 2 +- services/radiusagent_it_test.go | 10 +- services/radiusagent_test.go | 2 +- services/sessions_it_test.go | 18 +- services/sessions_test.go | 3 +- services/sipagent_it_test.go | 8 +- services/sipagent_test.go | 2 +- services/thresholds_it_test.go | 4 +- sessions/sessions_birpc_it_test.go | 4 +- 116 files changed, 1438 insertions(+), 1591 deletions(-) diff --git a/analyzers/analyzers_it_test.go b/analyzers/analyzers_it_test.go index 5c4bc57b4..2a6fbe843 100644 --- a/analyzers/analyzers_it_test.go +++ b/analyzers/analyzers_it_test.go @@ -132,7 +132,7 @@ func testAnalyzerSRPCConn(t *testing.T) { if err != nil { t.Fatal(err) } - anzBiRPC, err = utils.NewBiJSONrpcClient(anzCfg.SessionSCfg().ListenBiJSON, srv) + anzBiRPC, err = utils.NewBiJSONrpcClient(anzCfg.ListenCfg().BiJSONListen, srv) if err != nil { t.Fatal(err) } diff --git a/apier/v1/caps_it_test.go b/apier/v1/caps_it_test.go index 413f6fc0f..ba946ff9b 100644 --- a/apier/v1/caps_it_test.go +++ b/apier/v1/caps_it_test.go @@ -102,7 +102,7 @@ func testCapsRPCConn(t *testing.T) { if err != nil { t.Fatal(err) } - if capsBiRPC, err = utils.NewBiJSONrpcClient(capsCfg.SessionSCfg().ListenBiJSON, + if capsBiRPC, err = utils.NewBiJSONrpcClient(capsCfg.ListenCfg().BiJSONListen, nil); err != nil { t.Fatal(err) } diff --git a/apier/v1/config_it_test.go b/apier/v1/config_it_test.go index 25ef6443c..285d67c55 100644 --- a/apier/v1/config_it_test.go +++ b/apier/v1/config_it_test.go @@ -150,8 +150,6 @@ func testConfigSSetConfigSessionS(t *testing.T) { "alterable_fields": []any{}, "client_protocol": 2., "debit_interval": "0", - "listen_bijson": "127.0.0.1:2014", - "listen_bigob": "", "stale_chan_max_extra_usage": "0", "session_ttl": "0", "session_indexes": []any{utils.OriginID}, @@ -188,8 +186,6 @@ func testConfigSSetConfigSessionS(t *testing.T) { var empty []string exp = map[string]any{ "enabled": true, - "listen_bijson": "127.0.0.1:2014", - "listen_bigob": "", "chargers_conns": []string{utils.MetaInternal}, "rals_conns": []string{utils.MetaInternal}, "resources_conns": []string{utils.MetaLocalHost}, @@ -242,8 +238,6 @@ func testConfigSSetConfigSessionS(t *testing.T) { func testConfigSv1GetJSONSectionWithoutTenant(t *testing.T) { exp := map[string]any{ "enabled": true, - "listen_bijson": "127.0.0.1:2014", - "listen_bigob": "", "chargers_conns": []any{utils.MetaInternal}, "rals_conns": []any{utils.MetaInternal}, "resources_conns": []any{utils.MetaLocalHost}, @@ -284,7 +278,6 @@ func testConfigSv1GetJSONSectionWithoutTenant(t *testing.T) { var empty []string exp = map[string]any{ "enabled": true, - "listen_bijson": "127.0.0.1:2014", "chargers_conns": []string{utils.MetaInternal}, "rals_conns": []string{utils.MetaInternal}, "resources_conns": []string{utils.MetaLocalHost}, diff --git a/apier/v1/sessions_thresholds_it_test.go b/apier/v1/sessions_thresholds_it_test.go index 02d54bc5a..b8c5e658b 100644 --- a/apier/v1/sessions_thresholds_it_test.go +++ b/apier/v1/sessions_thresholds_it_test.go @@ -121,7 +121,7 @@ func testSessionSv1ItStartEngine(t *testing.T) { } func testSessionSv1ItRpcConn(t *testing.T) { - dummyClnt, err := utils.NewBiJSONrpcClient(sSv1Cfg2.SessionSCfg().ListenBiJSON, + dummyClnt, err := utils.NewBiJSONrpcClient(sSv1Cfg2.ListenCfg().BiJSONListen, nil) if err != nil { t.Fatal(err) @@ -130,7 +130,7 @@ func testSessionSv1ItRpcConn(t *testing.T) { if err != nil { t.Fatal(err) } - if sSv1BiRpc2, err = utils.NewBiJSONrpcClient(sSv1Cfg2.SessionSCfg().ListenBiJSON, + if sSv1BiRpc2, err = utils.NewBiJSONrpcClient(sSv1Cfg2.ListenCfg().BiJSONListen, srv); err != nil { t.Fatal(err) } diff --git a/apier/v1/sessionsv1_it_test.go b/apier/v1/sessionsv1_it_test.go index 4458cb479..d9320ccfc 100644 --- a/apier/v1/sessionsv1_it_test.go +++ b/apier/v1/sessionsv1_it_test.go @@ -162,7 +162,7 @@ func testSSv1ItStartEngine(t *testing.T) { } func testSSv1ItRpcConn(t *testing.T) { - dummyClnt, err := utils.NewBiJSONrpcClient(sSv1Cfg.SessionSCfg().ListenBiJSON, + dummyClnt, err := utils.NewBiJSONrpcClient(sSv1Cfg.ListenCfg().BiJSONListen, nil) if err != nil { t.Fatal(err) @@ -171,7 +171,7 @@ func testSSv1ItRpcConn(t *testing.T) { if err != nil { t.Fatal(err) } - if sSv1BiRpc, err = utils.NewBiJSONrpcClient(sSv1Cfg.SessionSCfg().ListenBiJSON, + if sSv1BiRpc, err = utils.NewBiJSONrpcClient(sSv1Cfg.ListenCfg().BiJSONListen, srv); err != nil { t.Fatal(err) } diff --git a/config/config_it_test.go b/config/config_it_test.go index 6455b062f..c5934a0f6 100644 --- a/config/config_it_test.go +++ b/config/config_it_test.go @@ -524,7 +524,6 @@ func testCGRConfigReloadSessionS(t *testing.T) { } expAttr := &SessionSCfg{ Enabled: true, - ListenBiJSON: "127.0.0.1:2014", ChargerSConns: []string{utils.ConcatenatedKey(utils.MetaInternal, utils.MetaChargers)}, RALsConns: []string{utils.ConcatenatedKey(utils.MetaInternal, utils.MetaResponder)}, IPsConns: []string{}, @@ -980,7 +979,6 @@ func testCGRConfigReloadConfigFromJSONSessionS(t *testing.T) { } expAttr := &SessionSCfg{ Enabled: true, - ListenBiJSON: "127.0.0.1:2014", ChargerSConns: []string{utils.ConcatenatedKey(utils.MetaInternal, utils.MetaChargers)}, RALsConns: []string{utils.ConcatenatedKey(utils.MetaInternal, utils.MetaResponder)}, IPsConns: []string{utils.MetaLocalHost}, @@ -1043,7 +1041,6 @@ func testCGRConfigReloadConfigFromStringSessionS(t *testing.T) { } expAttr := &SessionSCfg{ Enabled: true, - ListenBiJSON: "127.0.0.1:2014", ChargerSConns: []string{utils.MetaLocalHost}, RALsConns: []string{utils.ConcatenatedKey(utils.MetaInternal, utils.MetaResponder)}, IPsConns: []string{utils.MetaLocalHost}, @@ -1077,7 +1074,7 @@ func testCGRConfigReloadConfigFromStringSessionS(t *testing.T) { } var rcv string - expected := `{"sessions":{"alterable_fields":[],"attributes_conns":["*localhost"],"backup_interval":"0","cdrs_conns":["*internal"],"channel_sync_interval":"0","chargers_conns":["*localhost"],"client_protocol":2,"debit_interval":"0","default_usage":{"*any":"3h0m0s","*data":"1048576","*sms":"1","*voice":"3h0m0s"},"enabled":true,"ips_conns":["*localhost"],"listen_bigob":"","listen_bijson":"127.0.0.1:2014","min_dur_low_balance":"0","rals_conns":["*internal"],"replication_conns":[],"resources_conns":["*localhost"],"routes_conns":["*localhost"],"scheduler_conns":[],"session_indexes":[],"session_ttl":"0","stale_chan_max_extra_usage":"0","stats_conns":[],"stir":{"allowed_attest":["*any"],"default_attest":"A","payload_maxduration":"-1","privatekey_path":"","publickey_path":""},"store_session_costs":false,"terminate_attempts":5,"thresholds_conns":[]}}` + expected := `{"sessions":{"alterable_fields":[],"attributes_conns":["*localhost"],"backup_interval":"0","cdrs_conns":["*internal"],"channel_sync_interval":"0","chargers_conns":["*localhost"],"client_protocol":2,"debit_interval":"0","default_usage":{"*any":"3h0m0s","*data":"1048576","*sms":"1","*voice":"3h0m0s"},"enabled":true,"ips_conns":["*localhost"],"min_dur_low_balance":"0","rals_conns":["*internal"],"replication_conns":[],"resources_conns":["*localhost"],"routes_conns":["*localhost"],"scheduler_conns":[],"session_indexes":[],"session_ttl":"0","stale_chan_max_extra_usage":"0","stats_conns":[],"stir":{"allowed_attest":["*any"],"default_attest":"A","payload_maxduration":"-1","privatekey_path":"","publickey_path":""},"store_session_costs":false,"terminate_attempts":5,"thresholds_conns":[]}}` if err := cfg.V1GetConfigAsJSON(context.Background(), &SectionWithAPIOpts{Section: SessionSJson}, &rcv); err != nil { t.Error(err) @@ -1106,7 +1103,6 @@ func testCGRConfigReloadAll(t *testing.T) { } expAttr := &SessionSCfg{ Enabled: true, - ListenBiJSON: "127.0.0.1:2014", ChargerSConns: []string{utils.ConcatenatedKey(utils.MetaInternal, utils.MetaChargers)}, RALsConns: []string{utils.ConcatenatedKey(utils.MetaInternal, utils.MetaResponder)}, IPsConns: []string{}, diff --git a/config/config_json_test.go b/config/config_json_test.go index 704efb729..4984264dd 100644 --- a/config/config_json_test.go +++ b/config/config_json_test.go @@ -278,6 +278,8 @@ func TestDfListenJsonCfg(t *testing.T) { Rpc_json_tls: utils.StringPointer("127.0.0.1:2022"), Rpc_gob_tls: utils.StringPointer("127.0.0.1:2023"), Http_tls: utils.StringPointer("127.0.0.1:2280"), + Birpc_json: utils.StringPointer("127.0.0.1:2014"), + Birpc_gob: utils.StringPointer(""), } dfCgrJSONCfg, err := NewCgrJsonCfgFromBytes([]byte(CGRATES_CFG_JSON)) if err != nil { @@ -939,8 +941,6 @@ func TestDfCdrsJsonCfg(t *testing.T) { func TestSmgJsonCfg(t *testing.T) { eCfg := &SessionSJsonCfg{ Enabled: utils.BoolPointer(false), - ListenBiJSON: utils.StringPointer("127.0.0.1:2014"), - ListenBiGob: utils.StringPointer(""), ChargerSConns: &[]string{}, RALsConns: &[]string{}, CDRsConns: &[]string{}, diff --git a/config/config_test.go b/config/config_test.go index 938aae605..4957701f9 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -480,7 +480,6 @@ func TestCgrCfgJSONLoadCDRS(t *testing.T) { func TestCgrCfgJSONDefaultsSMGenericCfg(t *testing.T) { eSessionSCfg := &SessionSCfg{ Enabled: false, - ListenBiJSON: "127.0.0.1:2014", ChargerSConns: []string{}, RALsConns: []string{}, CDRsConns: []string{}, @@ -1974,7 +1973,6 @@ func TestRouteSConfig(t *testing.T) { func TestSessionSConfig(t *testing.T) { expected := &SessionSCfg{ Enabled: false, - ListenBiJSON: "127.0.0.1:2014", ChargerSConns: []string{}, RALsConns: []string{}, IPsConns: []string{}, @@ -2727,6 +2725,8 @@ func TestCgrCfgV1GetConfigListen(t *testing.T) { "rpc_gob_tls": "127.0.0.1:2023", "rpc_json": ":2012", "rpc_json_tls": "127.0.0.1:2022", + "birpc_json": "127.0.0.1:2014", + "birpc_gob": "", }, } var rcv map[string]any @@ -3059,8 +3059,6 @@ func TestV1GetConfigSessionS(t *testing.T) { expected := map[string]any{ SessionSJson: map[string]any{ utils.EnabledCfg: false, - utils.ListenBijsonCfg: "127.0.0.1:2014", - utils.ListenBigobCfg: "", utils.ChargerSConnsCfg: []string{}, utils.RALsConnsCfg: []string{}, utils.CDRsConnsCfg: []string{}, @@ -4171,7 +4169,7 @@ func TestV1GetConfigAsJSONTCache(t *testing.T) { func TestV1GetConfigAsJSONTListen(t *testing.T) { var reply string - expected := `{"listen":{"http":"127.0.0.1:2080","http_tls":"127.0.0.1:2280","rpc_gob":"127.0.0.1:2013","rpc_gob_tls":"127.0.0.1:2023","rpc_json":"127.0.0.1:2012","rpc_json_tls":"127.0.0.1:2022"}}` + expected := `{"listen":{"birpc_gob":"","birpc_json":"127.0.0.1:2014","http":"127.0.0.1:2080","http_tls":"127.0.0.1:2280","rpc_gob":"127.0.0.1:2013","rpc_gob_tls":"127.0.0.1:2023","rpc_json":"127.0.0.1:2012","rpc_json_tls":"127.0.0.1:2022"}}` cfgCgr := NewDefaultCGRConfig() if err := cfgCgr.V1GetConfigAsJSON(context.Background(), &SectionWithAPIOpts{Section: LISTEN_JSN}, &reply); err != nil { t.Error(err) @@ -4237,7 +4235,7 @@ func TestV1GetConfigAsJSONCdrs(t *testing.T) { func TestV1GetConfigAsJSONSessionS(t *testing.T) { var reply string - expected := `{"sessions":{"alterable_fields":[],"attributes_conns":[],"backup_interval":"0","cdrs_conns":[],"channel_sync_interval":"0","chargers_conns":[],"client_protocol":2,"debit_interval":"0","default_usage":{"*any":"3h0m0s","*data":"1048576","*sms":"1","*voice":"3h0m0s"},"enabled":false,"ips_conns":[],"listen_bigob":"","listen_bijson":"127.0.0.1:2014","min_dur_low_balance":"0","rals_conns":[],"replication_conns":[],"resources_conns":[],"routes_conns":[],"scheduler_conns":[],"session_indexes":[],"session_ttl":"0","stale_chan_max_extra_usage":"0","stats_conns":[],"stir":{"allowed_attest":["*any"],"default_attest":"A","payload_maxduration":"-1","privatekey_path":"","publickey_path":""},"store_session_costs":false,"terminate_attempts":5,"thresholds_conns":[]}}` + expected := `{"sessions":{"alterable_fields":[],"attributes_conns":[],"backup_interval":"0","cdrs_conns":[],"channel_sync_interval":"0","chargers_conns":[],"client_protocol":2,"debit_interval":"0","default_usage":{"*any":"3h0m0s","*data":"1048576","*sms":"1","*voice":"3h0m0s"},"enabled":false,"ips_conns":[],"min_dur_low_balance":"0","rals_conns":[],"replication_conns":[],"resources_conns":[],"routes_conns":[],"scheduler_conns":[],"session_indexes":[],"session_ttl":"0","stale_chan_max_extra_usage":"0","stats_conns":[],"stir":{"allowed_attest":["*any"],"default_attest":"A","payload_maxduration":"-1","privatekey_path":"","publickey_path":""},"store_session_costs":false,"terminate_attempts":5,"thresholds_conns":[]}}` cfgCgr := NewDefaultCGRConfig() if err := cfgCgr.V1GetConfigAsJSON(context.Background(), &SectionWithAPIOpts{Section: SessionSJson}, &reply); err != nil { t.Error(err) @@ -4639,7 +4637,7 @@ func TestV1GetConfigAsJSONAllConfig(t *testing.T) { }` var reply string cgrCfg, err := NewCGRConfigFromJSONStringWithDefaults(cfgJSON) - expected := `{"analyzers":{"cleanup_interval":"1h0m0s","db_path":"/var/spool/cgrates/analyzers","enabled":false,"index_type":"*scorch","ttl":"24h0m0s"},"apiban":{"keys":[]},"apiers":{"attributes_conns":[],"caches_conns":["*internal"],"ees_conns":[],"enabled":false,"scheduler_conns":[]},"asterisk_agent":{"asterisk_conns":[{"address":"127.0.0.1:8088","alias":"","ari_websocket":false,"connect_attempts":3,"max_reconnect_interval":"0s","password":"CGRateS.org","reconnects":5,"user":"cgrates"}],"create_cdr":false,"enabled":false,"route_profile":false,"sessions_conns":["*birpc_internal"]},"attributes":{"any_context":true,"apiers_conns":[],"enabled":false,"exists_indexed_fields":[],"indexed_selects":true,"nested_fields":false,"opts":{"*processRuns":1,"*profileIDs":[],"*profileIgnoreFilters":false,"*profileRuns":0},"prefix_indexed_fields":[],"resources_conns":[],"stats_conns":[],"suffix_indexed_fields":[]},"caches":{"partitions":{"*account_action_plans":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*action_plans":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*action_triggers":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*actions":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*apiban":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false,"ttl":"2m0s"},"*attribute_filter_indexes":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*attribute_profiles":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*caps_events":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*cdr_ids":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false,"ttl":"10m0s"},"*charger_filter_indexes":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*charger_profiles":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*closed_sessions":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false,"ttl":"10s"},"*destinations":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*diameter_messages":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false,"ttl":"3h0m0s"},"*dispatcher_filter_indexes":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*dispatcher_hosts":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*dispatcher_loads":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*dispatcher_profiles":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*dispatcher_routes":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*dispatchers":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*event_charges":{"limit":0,"precache":false,"remote":false,"replicate":false,"static_ttl":false,"ttl":"10s"},"*event_ips":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*event_resources":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*filters":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*ip_allocations":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*ip_filter_indexes":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*ip_profiles":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*load_ids":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*radius_packets":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false,"ttl":"3h0m0s"},"*ranking_profiles":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*rankings":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*rating_plans":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*rating_profiles":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*replication_hosts":{"limit":0,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*resource_filter_indexes":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*resource_profiles":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*resources":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*reverse_destinations":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*reverse_filter_indexes":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*route_filter_indexes":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*route_profiles":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*rpc_connections":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*rpc_responses":{"limit":0,"precache":false,"remote":false,"replicate":false,"static_ttl":false,"ttl":"2s"},"*sentrypeer":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":true,"ttl":"24h0m0s"},"*shared_groups":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*stat_filter_indexes":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*statqueue_profiles":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*statqueues":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*stir":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false,"ttl":"3h0m0s"},"*threshold_filter_indexes":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*threshold_profiles":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*thresholds":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*timings":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*trend_profiles":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*trends":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*uch":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false,"ttl":"3h0m0s"}},"remote_conns":[],"replication_conns":[]},"cdrs":{"attributes_conns":[],"chargers_conns":[],"compress_stored_cost":false,"ees_conns":[],"enabled":false,"extra_fields":[],"online_cdr_exports":[],"rals_conns":[],"scheduler_conns":[],"session_cost_retries":5,"stats_conns":[],"store_cdrs":true,"thresholds_conns":[]},"chargers":{"attributes_conns":[],"enabled":false,"exists_indexed_fields":[],"indexed_selects":true,"nested_fields":false,"prefix_indexed_fields":[],"suffix_indexed_fields":[]},"configs":{"enabled":false,"root_dir":"/var/spool/cgrates/configs","url":"/configs/"},"cores":{"caps":0,"caps_stats_interval":"0","caps_strategy":"*busy","shutdown_timeout":"1s"},"data_db":{"db_host":"127.0.0.1","db_name":"10","db_password":"","db_port":6379,"db_type":"*redis","db_user":"cgrates","items":{"*account_action_plans":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*accounts":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*action_plans":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*action_triggers":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*actions":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*attribute_filter_indexes":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*attribute_profiles":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*charger_filter_indexes":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*charger_profiles":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*destinations":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*dispatcher_filter_indexes":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*dispatcher_hosts":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*dispatcher_profiles":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*filters":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*ip_allocations":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*ip_filter_indexes":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*ip_profiles":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*load_ids":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*ranking_profiles":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*rankings":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*rating_plans":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*rating_profiles":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*resource_filter_indexes":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*resource_profiles":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*resources":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*reverse_destinations":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*reverse_filter_indexes":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*route_filter_indexes":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*route_profiles":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*sessions_backup":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*shared_groups":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*stat_filter_indexes":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*statqueue_profiles":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*statqueues":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*threshold_filter_indexes":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*threshold_profiles":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*thresholds":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*timings":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*trend_profiles":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*trends":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*versions":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false}},"opts":{"internalDBBackupPath":"/var/lib/cgrates/internal_db/backup/datadb","internalDBDumpInterval":"0s","internalDBDumpPath":"/var/lib/cgrates/internal_db/datadb","internalDBFileSizeLimit":1073741824,"internalDBRewriteInterval":"0s","internalDBStartTimeout":"5m0s","mongoConnScheme":"mongodb","mongoQueryTimeout":"10s","redisCACertificate":"","redisClientCertificate":"","redisClientKey":"","redisCluster":false,"redisClusterOndownDelay":"0s","redisClusterSync":"5s","redisConnectAttempts":20,"redisConnectTimeout":"0s","redisMaxConns":10,"redisPoolPipelineLimit":0,"redisPoolPipelineWindow":"150µs","redisReadTimeout":"0s","redisSentinel":"","redisTLS":false,"redisWriteTimeout":"0s"},"remote_conn_id":"","remote_conns":[],"replication_cache":"","replication_conns":[],"replication_failed_dir":"","replication_filtered":false,"replication_interval":"0s"},"diameter_agent":{"asr_template":"","conn_health_check_interval":"0s","conn_status_stat_queue_ids":[],"conn_status_threshold_ids":[],"dictionaries_path":"/usr/share/cgrates/diameter/dict/","enabled":false,"forced_disconnect":"*none","listeners":[{"address":"127.0.0.1:3868","network":"tcp"}],"origin_host":"CGR-DA","origin_realm":"cgrates.org","product_name":"CGRateS","rar_template":"","request_processors":[],"sessions_conns":["*birpc_internal"],"stats_conns":[],"synced_conn_requests":false,"thresholds_conns":[],"vendor_id":0},"dispatchers":{"any_subsystem":true,"attributes_conns":[],"enabled":false,"exists_indexed_fields":[],"indexed_selects":true,"nested_fields":false,"prefix_indexed_fields":[],"prevent_loop":false,"suffix_indexed_fields":[]},"dns_agent":{"enabled":false,"listeners":[{"address":"127.0.0.1:53","network":"udp"}],"request_processors":[],"sessions_conns":["*internal"],"stats_conns":[],"thresholds_conns":[],"timezone":""},"ees":{"attributes_conns":[],"cache":{"*amqp_json_map":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*amqpv1_json_map":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*els":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*file_csv":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false,"ttl":"5s"},"*kafka_json_map":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*nats_json_map":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*s3_json_map":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*sql":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*sqs_json_map":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false}},"enabled":false,"exporters":[{"attempts":1,"attribute_context":"","attribute_ids":[],"concurrent_requests":0,"export_path":"/var/spool/cgrates/ees","failed_posts_dir":"/var/spool/cgrates/failed_posts","fields":[],"filters":[],"flags":[],"id":"*default","metrics_reset_schedule":"","opts":{},"synchronous":false,"timezone":"","type":"*none"}],"failed_posts":{"dir":"/var/spool/cgrates/failed_posts","static_ttl":true,"ttl":"5s"}},"ers":{"concurrent_events":1,"ees_conns":[],"enabled":false,"partial_cache_ttl":"1s","readers":[{"cache_dump_fields":[],"concurrent_requests":1024,"fields":[{"mandatory":true,"path":"*cgreq.ToR","tag":"ToR","type":"*variable","value":"~*req.2"},{"mandatory":true,"path":"*cgreq.OriginID","tag":"OriginID","type":"*variable","value":"~*req.3"},{"mandatory":true,"path":"*cgreq.RequestType","tag":"RequestType","type":"*variable","value":"~*req.4"},{"mandatory":true,"path":"*cgreq.Tenant","tag":"Tenant","type":"*variable","value":"~*req.6"},{"mandatory":true,"path":"*cgreq.Category","tag":"Category","type":"*variable","value":"~*req.7"},{"mandatory":true,"path":"*cgreq.Account","tag":"Account","type":"*variable","value":"~*req.8"},{"mandatory":true,"path":"*cgreq.Subject","tag":"Subject","type":"*variable","value":"~*req.9"},{"mandatory":true,"path":"*cgreq.Destination","tag":"Destination","type":"*variable","value":"~*req.10"},{"mandatory":true,"path":"*cgreq.SetupTime","tag":"SetupTime","type":"*variable","value":"~*req.11"},{"mandatory":true,"path":"*cgreq.AnswerTime","tag":"AnswerTime","type":"*variable","value":"~*req.12"},{"mandatory":true,"path":"*cgreq.Usage","tag":"Usage","type":"*variable","value":"~*req.13"}],"filters":[],"flags":[],"id":"*default","max_reconnect_interval":"5m0s","opts":{"csvFieldSeparator":",","csvHeaderDefineChar":":","csvRowLength":0,"natsSubject":"cgrates_cdrs","partialCacheAction":"*none","partialOrderField":"~*req.AnswerTime"},"partial_commit_fields":[],"processed_path":"/var/spool/cgrates/ers/out","reconnects":-1,"run_delay":"0","source_path":"/var/spool/cgrates/ers/in","start_delay":"0","tenant":"","timezone":"","type":"*none"}],"sessions_conns":["*internal"],"stats_conns":[],"thresholds_conns":[]},"filters":{"apiers_conns":[],"rankings_conns":[],"resources_conns":[],"stats_conns":[],"trends_conns":[]},"freeswitch_agent":{"active_session_delimiter":",","create_cdr":false,"empty_balance_ann_file":"","empty_balance_context":"","enabled":false,"event_socket_conns":[{"address":"127.0.0.1:8021","alias":"127.0.0.1:8021","max_reconnect_interval":"0s","password":"ClueCon","reconnects":5,"reply_timeout":"1m0s"}],"extra_fields":"","low_balance_ann_file":"","max_wait_connection":"2s","route_profile":false,"sched_transfer_extension":"CGRateS","sessions_conns":["*birpc_internal"],"subscribe_park":true},"general":{"caching_delay":"0","connect_attempts":5,"connect_timeout":"1s","dbdata_encoding":"*msgpack","default_caching":"*reload","default_category":"call","default_request_type":"*rated","default_tenant":"cgrates.org","default_timezone":"Local","digest_equal":":","digest_separator":",","locking_timeout":"0","log_level":6,"logger":"*syslog","max_parallel_conns":100,"max_reconnect_interval":"0","node_id":"ENGINE1","poster_attempts":3,"reconnects":-1,"reply_timeout":"2s","rounding_decimals":5,"rsr_separator":";","tpexport_dir":"/var/spool/cgrates/tpe"},"http":{"auth_users":{},"client_opts":{"dialFallbackDelay":"300ms","dialKeepAlive":"30s","dialTimeout":"30s","disableCompression":false,"disableKeepAlives":false,"expectContinueTimeout":"0s","forceAttemptHttp2":true,"idleConnTimeout":"1m30s","maxConnsPerHost":0,"maxIdleConns":100,"maxIdleConnsPerHost":2,"responseHeaderTimeout":"0s","skipTlsVerify":false,"tlsHandshakeTimeout":"10s"},"freeswitch_cdrs_url":"/freeswitch_json","http_cdrs":"/cdr_http","json_rpc_url":"/jsonrpc","pprof_path":"/debug/pprof/","registrars_url":"/registrar","use_basic_auth":false,"ws_url":"/ws"},"http_agent":[],"ips":{"enabled":false,"exists_indexed_fields":[],"indexed_selects":true,"nested_fields":false,"opts":{"*allocationID":"","*ttl":259200000000000},"prefix_indexed_fields":[],"store_interval":"0s","string_indexed_fields":null,"suffix_indexed_fields":[]},"kamailio_agent":{"create_cdr":false,"enabled":false,"evapi_conns":[{"address":"127.0.0.1:8448","alias":"","max_reconnect_interval":"0s","reconnects":5}],"route_profile":false,"sessions_conns":["*birpc_internal"],"timezone":""},"listen":{"http":"127.0.0.1:2080","http_tls":"127.0.0.1:2280","rpc_gob":"127.0.0.1:2013","rpc_gob_tls":"127.0.0.1:2023","rpc_json":"127.0.0.1:2012","rpc_json_tls":"127.0.0.1:2022"},"loader":{"caches_conns":["*localhost"],"data_path":"./","disable_reverse":false,"field_separator":",","gapi_credentials":".gapi/credentials.json","gapi_token":".gapi/token.json","scheduler_conns":["*localhost"],"tpid":""},"mailer":{"auth_password":"CGRateS.org","auth_user":"cgrates","from_address":"cgr-mailer@localhost.localdomain","server":"localhost"},"migrator":{"out_datadb_encoding":"msgpack","out_datadb_host":"127.0.0.1","out_datadb_name":"10","out_datadb_opts":{"mongoConnScheme":"mongodb","mongoQueryTimeout":"0s","redisCACertificate":"","redisClientCertificate":"","redisClientKey":"","redisCluster":false,"redisClusterOndownDelay":"0s","redisClusterSync":"5s","redisConnectAttempts":20,"redisConnectTimeout":"0s","redisMaxConns":10,"redisPoolPipelineLimit":0,"redisPoolPipelineWindow":"150µs","redisReadTimeout":"0s","redisSentinel":"","redisTLS":false,"redisWriteTimeout":"0s"},"out_datadb_password":"","out_datadb_port":"6379","out_datadb_type":"*redis","out_datadb_user":"cgrates","out_stordb_host":"127.0.0.1","out_stordb_name":"cgrates","out_stordb_opts":{"mongoConnScheme":"mongodb","mongoQueryTimeout":"0s","mysqlDSNParams":null,"mysqlLocation":"","pgSSLMode":"","sqlConnMaxLifetime":"0s","sqlMaxIdleConns":0,"sqlMaxOpenConns":0},"out_stordb_password":"","out_stordb_port":"3306","out_stordb_type":"*mysql","out_stordb_user":"cgrates","users_filters":null},"prometheus_agent":{"apiers_conns":[],"cache_ids":[],"caches_conns":[],"collect_go_metrics":false,"collect_process_metrics":false,"cores_conns":[],"enabled":false,"path":"/prometheus","stat_queue_ids":[],"stats_conns":[]},"radius_agent":{"client_dictionaries":{"*default":["/usr/share/cgrates/radius/dict/"]},"client_secrets":{"*default":"CGRateS.org"},"coa_template":"*coa","dmr_template":"*dmr","enabled":false,"listeners":[{"acct_address":"127.0.0.1:1813","auth_address":"127.0.0.1:1812","network":"udp"}],"request_processors":[],"requests_cache_key":"","sessions_conns":["*internal"],"stats_conns":[],"thresholds_conns":[]},"rals":{"balance_rating_subject":{"*any":"*zero1ns","*voice":"*zero1s"},"enabled":false,"fallback_depth":3,"max_computed_usage":{"*any":"189h0m0s","*data":"107374182400","*mms":"10000","*sms":"10000","*voice":"72h0m0s"},"max_increments":1000000,"remove_expired":true,"rp_subject_prefix_matching":false,"sessions_conns":[],"stats_conns":[],"thresholds_conns":[]},"rankings":{"ees_conns":[],"ees_exporter_ids":[],"enabled":false,"scheduled_ids":{},"stats_conns":[],"store_interval":"","thresholds_conns":[]},"registrarc":{"dispatchers":{"hosts":[],"refresh_interval":"5m0s","registrars_conns":[]},"rpc":{"hosts":[],"refresh_interval":"5m0s","registrars_conns":[]}},"resources":{"enabled":false,"exists_indexed_fields":[],"indexed_selects":true,"nested_fields":false,"opts":{"*units":1,"*usageID":""},"prefix_indexed_fields":[],"store_interval":"","suffix_indexed_fields":[],"thresholds_conns":[]},"routes":{"attributes_conns":[],"default_ratio":1,"enabled":false,"exists_indexed_fields":[],"indexed_selects":true,"nested_fields":false,"opts":{"*context":"*routes","*ignoreErrors":false,"*maxCost":""},"prefix_indexed_fields":[],"rals_conns":[],"resources_conns":[],"stats_conns":[],"suffix_indexed_fields":[]},"rpc_conns":{"*bijson_localhost":{"conns":[{"address":"127.0.0.1:2014","transport":"*birpc_json"}],"poolSize":0,"strategy":"*first"},"*birpc_internal":{"conns":[{"address":"*birpc_internal","transport":""}],"poolSize":0,"strategy":"*first"},"*internal":{"conns":[{"address":"*internal","transport":""}],"poolSize":0,"strategy":"*first"},"*localhost":{"conns":[{"address":"127.0.0.1:2012","transport":"*json"}],"poolSize":0,"strategy":"*first"}},"schedulers":{"cdrs_conns":[],"dynaprepaid_actionplans":[],"enabled":false,"filters":[],"stats_conns":[],"thresholds_conns":[]},"sentrypeer":{"Audience":"https://sentrypeer.com/api","ClientID":"","ClientSecret":"","GrantType":"client_credentials","IpUrl":"https://sentrypeer.com/api/ip-addresses","NumberUrl":"https://sentrypeer.com/api/phone-numbers","TokenURL":"https://authz.sentrypeer.com/oauth/token"},"sessions":{"alterable_fields":[],"attributes_conns":[],"backup_interval":"0","cdrs_conns":[],"channel_sync_interval":"0","chargers_conns":[],"client_protocol":2,"debit_interval":"0","default_usage":{"*any":"3h0m0s","*data":"1048576","*sms":"1","*voice":"3h0m0s"},"enabled":false,"ips_conns":[],"listen_bigob":"","listen_bijson":"127.0.0.1:2014","min_dur_low_balance":"0","rals_conns":[],"replication_conns":[],"resources_conns":[],"routes_conns":[],"scheduler_conns":[],"session_indexes":[],"session_ttl":"0","stale_chan_max_extra_usage":"0","stats_conns":[],"stir":{"allowed_attest":["*any"],"default_attest":"A","payload_maxduration":"-1","privatekey_path":"","publickey_path":""},"store_session_costs":false,"terminate_attempts":5,"thresholds_conns":[]},"sip_agent":{"enabled":false,"listen":"127.0.0.1:5060","listen_net":"udp","request_processors":[],"retransmission_timer":1000000000,"sessions_conns":["*internal"],"stats_conns":[],"thresholds_conns":[],"timezone":""},"stats":{"ees_conns":[],"ees_exporter_ids":[],"enabled":false,"exists_indexed_fields":[],"indexed_selects":true,"nested_fields":false,"opts":{"*profileIDs":[],"*profileIgnoreFilters":false},"prefix_indexed_fields":[],"store_interval":"","store_uncompressed_limit":0,"suffix_indexed_fields":[],"thresholds_conns":[]},"stor_db":{"db_host":"127.0.0.1","db_name":"cgrates","db_password":"CGRateS.org","db_port":3306,"db_type":"*mysql","db_user":"cgrates","items":{"*cdrs":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*session_costs":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_account_actions":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_action_plans":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_action_triggers":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_actions":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_attributes":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_chargers":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_destination_rates":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_destinations":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_dispatcher_hosts":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_dispatcher_profiles":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_filters":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_ips":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_rankings":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_rates":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_rating_plans":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_rating_profiles":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_resources":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_routes":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_shared_groups":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_stats":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_thresholds":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_timings":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_trends":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*versions":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false}},"opts":{"internalDBBackupPath":"/var/lib/cgrates/internal_db/backup/stordb","internalDBDumpInterval":"0s","internalDBDumpPath":"/var/lib/cgrates/internal_db/stordb","internalDBFileSizeLimit":1073741824,"internalDBRewriteInterval":"0s","internalDBStartTimeout":"5m0s","mongoConnScheme":"mongodb","mongoQueryTimeout":"10s","mysqlDSNParams":{},"mysqlLocation":"Local","pgSSLMode":"disable","pgSchema":"","sqlConnMaxLifetime":"0s","sqlLogLevel":3,"sqlMaxIdleConns":10,"sqlMaxOpenConns":100},"prefix_indexed_fields":[],"remote_conns":null,"replication_conns":null,"string_indexed_fields":[]},"suretax":{"bill_to_number":"","business_unit":"","client_number":"","client_tracking":"~*req.CGRID","customer_number":"~*req.Subject","include_local_cost":false,"orig_number":"~*req.Subject","p2pplus4":"","p2pzipcode":"","plus4":"","regulatory_code":"03","response_group":"03","response_type":"D4","return_file_code":"0","sales_type_code":"R","tax_exemption_code_list":"","tax_included":"0","tax_situs_rule":"04","term_number":"~*req.Destination","timezone":"UTC","trans_type_code":"010101","unit_type":"00","units":"1","url":"","validation_key":"","zipcode":""},"templates":{"*asr":[{"mandatory":true,"path":"*diamreq.Session-Id","tag":"SessionId","type":"*variable","value":"~*req.Session-Id"},{"mandatory":true,"path":"*diamreq.Origin-Host","tag":"OriginHost","type":"*variable","value":"~*req.Destination-Host"},{"mandatory":true,"path":"*diamreq.Origin-Realm","tag":"OriginRealm","type":"*variable","value":"~*req.Destination-Realm"},{"mandatory":true,"path":"*diamreq.Destination-Realm","tag":"DestinationRealm","type":"*variable","value":"~*req.Origin-Realm"},{"mandatory":true,"path":"*diamreq.Destination-Host","tag":"DestinationHost","type":"*variable","value":"~*req.Origin-Host"},{"mandatory":true,"path":"*diamreq.Auth-Application-Id","tag":"AuthApplicationId","type":"*variable","value":"~*vars.*appid"}],"*cca":[{"mandatory":true,"path":"*rep.Session-Id","tag":"SessionId","type":"*variable","value":"~*req.Session-Id"},{"path":"*rep.Result-Code","tag":"ResultCode","type":"*constant","value":"2001"},{"mandatory":true,"path":"*rep.Origin-Host","tag":"OriginHost","type":"*variable","value":"~*vars.OriginHost"},{"mandatory":true,"path":"*rep.Origin-Realm","tag":"OriginRealm","type":"*variable","value":"~*vars.OriginRealm"},{"mandatory":true,"path":"*rep.Auth-Application-Id","tag":"AuthApplicationId","type":"*variable","value":"~*vars.*appid"},{"mandatory":true,"path":"*rep.CC-Request-Type","tag":"CCRequestType","type":"*variable","value":"~*req.CC-Request-Type"},{"mandatory":true,"path":"*rep.CC-Request-Number","tag":"CCRequestNumber","type":"*variable","value":"~*req.CC-Request-Number"}],"*cdrLog":[{"mandatory":true,"path":"*cdr.ToR","tag":"ToR","type":"*variable","value":"~*req.BalanceType"},{"mandatory":true,"path":"*cdr.OriginHost","tag":"OriginHost","type":"*constant","value":"127.0.0.1"},{"mandatory":true,"path":"*cdr.RequestType","tag":"RequestType","type":"*constant","value":"*none"},{"mandatory":true,"path":"*cdr.Tenant","tag":"Tenant","type":"*variable","value":"~*req.Tenant"},{"mandatory":true,"path":"*cdr.Account","tag":"Account","type":"*variable","value":"~*req.Account"},{"mandatory":true,"path":"*cdr.Subject","tag":"Subject","type":"*variable","value":"~*req.Account"},{"mandatory":true,"path":"*cdr.Cost","tag":"Cost","type":"*variable","value":"~*req.Cost"},{"mandatory":true,"path":"*cdr.Source","tag":"Source","type":"*constant","value":"*cdrLog"},{"mandatory":true,"path":"*cdr.Usage","tag":"Usage","type":"*constant","value":"1"},{"mandatory":true,"path":"*cdr.RunID","tag":"RunID","type":"*variable","value":"~*req.ActionType"},{"mandatory":true,"path":"*cdr.SetupTime","tag":"SetupTime","type":"*constant","value":"*now"},{"mandatory":true,"path":"*cdr.AnswerTime","tag":"AnswerTime","type":"*constant","value":"*now"},{"mandatory":true,"path":"*cdr.PreRated","tag":"PreRated","type":"*constant","value":"true"}],"*coa":[{"path":"*radDAReq.User-Name","tag":"User-Name","type":"*variable","value":"~*oreq.User-Name"},{"path":"*radDAReq.NAS-IP-Address","tag":"NAS-IP-Address","type":"*variable","value":"~*oreq.NAS-IP-Address"},{"path":"*radDAReq.Acct-Session-Id","tag":"Acct-Session-Id","type":"*variable","value":"~*oreq.Acct-Session-Id"},{"path":"*radDAReq.Filter-Id","tag":"Filter-Id","type":"*variable","value":"~*req.CustomFilter"}],"*dmr":[{"path":"*radDAReq.User-Name","tag":"User-Name","type":"*variable","value":"~*oreq.User-Name"},{"path":"*radDAReq.NAS-IP-Address","tag":"NAS-IP-Address","type":"*variable","value":"~*oreq.NAS-IP-Address"},{"path":"*radDAReq.Acct-Session-Id","tag":"Acct-Session-Id","type":"*variable","value":"~*oreq.Acct-Session-Id"},{"path":"*radDAReq.Reply-Message","tag":"Reply-Message","type":"*variable","value":"~*req.DisconnectCause"}],"*err":[{"mandatory":true,"path":"*rep.Session-Id","tag":"SessionId","type":"*variable","value":"~*req.Session-Id"},{"mandatory":true,"path":"*rep.Origin-Host","tag":"OriginHost","type":"*variable","value":"~*vars.OriginHost"},{"mandatory":true,"path":"*rep.Origin-Realm","tag":"OriginRealm","type":"*variable","value":"~*vars.OriginRealm"}],"*errSip":[{"mandatory":true,"path":"*rep.Request","tag":"Request","type":"*constant","value":"SIP/2.0 500 Internal Server Error"}],"*rar":[{"mandatory":true,"path":"*diamreq.Session-Id","tag":"SessionId","type":"*variable","value":"~*req.Session-Id"},{"mandatory":true,"path":"*diamreq.Origin-Host","tag":"OriginHost","type":"*variable","value":"~*req.Destination-Host"},{"mandatory":true,"path":"*diamreq.Origin-Realm","tag":"OriginRealm","type":"*variable","value":"~*req.Destination-Realm"},{"mandatory":true,"path":"*diamreq.Destination-Realm","tag":"DestinationRealm","type":"*variable","value":"~*req.Origin-Realm"},{"mandatory":true,"path":"*diamreq.Destination-Host","tag":"DestinationHost","type":"*variable","value":"~*req.Origin-Host"},{"mandatory":true,"path":"*diamreq.Auth-Application-Id","tag":"AuthApplicationId","type":"*variable","value":"~*vars.*appid"},{"path":"*diamreq.Re-Auth-Request-Type","tag":"ReAuthRequestType","type":"*constant","value":"0"}]},"thresholds":{"ees_conns":[],"ees_exporter_ids":[],"enabled":false,"exists_indexed_fields":[],"indexed_selects":true,"nested_fields":false,"opts":{"*profileIDs":[],"*profileIgnoreFilters":false},"prefix_indexed_fields":[],"store_interval":"","suffix_indexed_fields":[]},"tls":{"ca_certificate":"","client_certificate":"","client_key":"","server_certificate":"","server_key":"","server_name":"","server_policy":4},"trends":{"ees_conns":[],"ees_exporter_ids":[],"enabled":false,"scheduled_ids":{},"stats_conns":[],"store_interval":"","store_uncompressed_limit":0,"thresholds_conns":[]}}` + expected := `{"analyzers":{"cleanup_interval":"1h0m0s","db_path":"/var/spool/cgrates/analyzers","enabled":false,"index_type":"*scorch","ttl":"24h0m0s"},"apiban":{"keys":[]},"apiers":{"attributes_conns":[],"caches_conns":["*internal"],"ees_conns":[],"enabled":false,"scheduler_conns":[]},"asterisk_agent":{"asterisk_conns":[{"address":"127.0.0.1:8088","alias":"","ari_websocket":false,"connect_attempts":3,"max_reconnect_interval":"0s","password":"CGRateS.org","reconnects":5,"user":"cgrates"}],"create_cdr":false,"enabled":false,"route_profile":false,"sessions_conns":["*birpc_internal"]},"attributes":{"any_context":true,"apiers_conns":[],"enabled":false,"exists_indexed_fields":[],"indexed_selects":true,"nested_fields":false,"opts":{"*processRuns":1,"*profileIDs":[],"*profileIgnoreFilters":false,"*profileRuns":0},"prefix_indexed_fields":[],"resources_conns":[],"stats_conns":[],"suffix_indexed_fields":[]},"caches":{"partitions":{"*account_action_plans":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*action_plans":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*action_triggers":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*actions":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*apiban":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false,"ttl":"2m0s"},"*attribute_filter_indexes":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*attribute_profiles":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*caps_events":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*cdr_ids":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false,"ttl":"10m0s"},"*charger_filter_indexes":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*charger_profiles":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*closed_sessions":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false,"ttl":"10s"},"*destinations":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*diameter_messages":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false,"ttl":"3h0m0s"},"*dispatcher_filter_indexes":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*dispatcher_hosts":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*dispatcher_loads":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*dispatcher_profiles":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*dispatcher_routes":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*dispatchers":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*event_charges":{"limit":0,"precache":false,"remote":false,"replicate":false,"static_ttl":false,"ttl":"10s"},"*event_ips":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*event_resources":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*filters":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*ip_allocations":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*ip_filter_indexes":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*ip_profiles":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*load_ids":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*radius_packets":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false,"ttl":"3h0m0s"},"*ranking_profiles":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*rankings":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*rating_plans":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*rating_profiles":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*replication_hosts":{"limit":0,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*resource_filter_indexes":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*resource_profiles":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*resources":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*reverse_destinations":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*reverse_filter_indexes":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*route_filter_indexes":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*route_profiles":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*rpc_connections":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*rpc_responses":{"limit":0,"precache":false,"remote":false,"replicate":false,"static_ttl":false,"ttl":"2s"},"*sentrypeer":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":true,"ttl":"24h0m0s"},"*shared_groups":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*stat_filter_indexes":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*statqueue_profiles":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*statqueues":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*stir":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false,"ttl":"3h0m0s"},"*threshold_filter_indexes":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*threshold_profiles":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*thresholds":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*timings":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*trend_profiles":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*trends":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*uch":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false,"ttl":"3h0m0s"}},"remote_conns":[],"replication_conns":[]},"cdrs":{"attributes_conns":[],"chargers_conns":[],"compress_stored_cost":false,"ees_conns":[],"enabled":false,"extra_fields":[],"online_cdr_exports":[],"rals_conns":[],"scheduler_conns":[],"session_cost_retries":5,"stats_conns":[],"store_cdrs":true,"thresholds_conns":[]},"chargers":{"attributes_conns":[],"enabled":false,"exists_indexed_fields":[],"indexed_selects":true,"nested_fields":false,"prefix_indexed_fields":[],"suffix_indexed_fields":[]},"configs":{"enabled":false,"root_dir":"/var/spool/cgrates/configs","url":"/configs/"},"cores":{"caps":0,"caps_stats_interval":"0","caps_strategy":"*busy","shutdown_timeout":"1s"},"data_db":{"db_host":"127.0.0.1","db_name":"10","db_password":"","db_port":6379,"db_type":"*redis","db_user":"cgrates","items":{"*account_action_plans":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*accounts":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*action_plans":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*action_triggers":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*actions":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*attribute_filter_indexes":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*attribute_profiles":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*charger_filter_indexes":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*charger_profiles":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*destinations":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*dispatcher_filter_indexes":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*dispatcher_hosts":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*dispatcher_profiles":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*filters":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*ip_allocations":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*ip_filter_indexes":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*ip_profiles":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*load_ids":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*ranking_profiles":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*rankings":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*rating_plans":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*rating_profiles":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*resource_filter_indexes":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*resource_profiles":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*resources":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*reverse_destinations":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*reverse_filter_indexes":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*route_filter_indexes":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*route_profiles":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*sessions_backup":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*shared_groups":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*stat_filter_indexes":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*statqueue_profiles":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*statqueues":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*threshold_filter_indexes":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*threshold_profiles":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*thresholds":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*timings":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*trend_profiles":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*trends":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*versions":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false}},"opts":{"internalDBBackupPath":"/var/lib/cgrates/internal_db/backup/datadb","internalDBDumpInterval":"0s","internalDBDumpPath":"/var/lib/cgrates/internal_db/datadb","internalDBFileSizeLimit":1073741824,"internalDBRewriteInterval":"0s","internalDBStartTimeout":"5m0s","mongoConnScheme":"mongodb","mongoQueryTimeout":"10s","redisCACertificate":"","redisClientCertificate":"","redisClientKey":"","redisCluster":false,"redisClusterOndownDelay":"0s","redisClusterSync":"5s","redisConnectAttempts":20,"redisConnectTimeout":"0s","redisMaxConns":10,"redisPoolPipelineLimit":0,"redisPoolPipelineWindow":"150µs","redisReadTimeout":"0s","redisSentinel":"","redisTLS":false,"redisWriteTimeout":"0s"},"remote_conn_id":"","remote_conns":[],"replication_cache":"","replication_conns":[],"replication_failed_dir":"","replication_filtered":false,"replication_interval":"0s"},"diameter_agent":{"asr_template":"","conn_health_check_interval":"0s","conn_status_stat_queue_ids":[],"conn_status_threshold_ids":[],"dictionaries_path":"/usr/share/cgrates/diameter/dict/","enabled":false,"forced_disconnect":"*none","listeners":[{"address":"127.0.0.1:3868","network":"tcp"}],"origin_host":"CGR-DA","origin_realm":"cgrates.org","product_name":"CGRateS","rar_template":"","request_processors":[],"sessions_conns":["*birpc_internal"],"stats_conns":[],"synced_conn_requests":false,"thresholds_conns":[],"vendor_id":0},"dispatchers":{"any_subsystem":true,"attributes_conns":[],"enabled":false,"exists_indexed_fields":[],"indexed_selects":true,"nested_fields":false,"prefix_indexed_fields":[],"prevent_loop":false,"suffix_indexed_fields":[]},"dns_agent":{"enabled":false,"listeners":[{"address":"127.0.0.1:53","network":"udp"}],"request_processors":[],"sessions_conns":["*internal"],"stats_conns":[],"thresholds_conns":[],"timezone":""},"ees":{"attributes_conns":[],"cache":{"*amqp_json_map":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*amqpv1_json_map":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*els":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*file_csv":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false,"ttl":"5s"},"*kafka_json_map":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*nats_json_map":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*s3_json_map":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*sql":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false},"*sqs_json_map":{"limit":-1,"precache":false,"remote":false,"replicate":false,"static_ttl":false}},"enabled":false,"exporters":[{"attempts":1,"attribute_context":"","attribute_ids":[],"concurrent_requests":0,"export_path":"/var/spool/cgrates/ees","failed_posts_dir":"/var/spool/cgrates/failed_posts","fields":[],"filters":[],"flags":[],"id":"*default","metrics_reset_schedule":"","opts":{},"synchronous":false,"timezone":"","type":"*none"}],"failed_posts":{"dir":"/var/spool/cgrates/failed_posts","static_ttl":true,"ttl":"5s"}},"ers":{"concurrent_events":1,"ees_conns":[],"enabled":false,"partial_cache_ttl":"1s","readers":[{"cache_dump_fields":[],"concurrent_requests":1024,"fields":[{"mandatory":true,"path":"*cgreq.ToR","tag":"ToR","type":"*variable","value":"~*req.2"},{"mandatory":true,"path":"*cgreq.OriginID","tag":"OriginID","type":"*variable","value":"~*req.3"},{"mandatory":true,"path":"*cgreq.RequestType","tag":"RequestType","type":"*variable","value":"~*req.4"},{"mandatory":true,"path":"*cgreq.Tenant","tag":"Tenant","type":"*variable","value":"~*req.6"},{"mandatory":true,"path":"*cgreq.Category","tag":"Category","type":"*variable","value":"~*req.7"},{"mandatory":true,"path":"*cgreq.Account","tag":"Account","type":"*variable","value":"~*req.8"},{"mandatory":true,"path":"*cgreq.Subject","tag":"Subject","type":"*variable","value":"~*req.9"},{"mandatory":true,"path":"*cgreq.Destination","tag":"Destination","type":"*variable","value":"~*req.10"},{"mandatory":true,"path":"*cgreq.SetupTime","tag":"SetupTime","type":"*variable","value":"~*req.11"},{"mandatory":true,"path":"*cgreq.AnswerTime","tag":"AnswerTime","type":"*variable","value":"~*req.12"},{"mandatory":true,"path":"*cgreq.Usage","tag":"Usage","type":"*variable","value":"~*req.13"}],"filters":[],"flags":[],"id":"*default","max_reconnect_interval":"5m0s","opts":{"csvFieldSeparator":",","csvHeaderDefineChar":":","csvRowLength":0,"natsSubject":"cgrates_cdrs","partialCacheAction":"*none","partialOrderField":"~*req.AnswerTime"},"partial_commit_fields":[],"processed_path":"/var/spool/cgrates/ers/out","reconnects":-1,"run_delay":"0","source_path":"/var/spool/cgrates/ers/in","start_delay":"0","tenant":"","timezone":"","type":"*none"}],"sessions_conns":["*internal"],"stats_conns":[],"thresholds_conns":[]},"filters":{"apiers_conns":[],"rankings_conns":[],"resources_conns":[],"stats_conns":[],"trends_conns":[]},"freeswitch_agent":{"active_session_delimiter":",","create_cdr":false,"empty_balance_ann_file":"","empty_balance_context":"","enabled":false,"event_socket_conns":[{"address":"127.0.0.1:8021","alias":"127.0.0.1:8021","max_reconnect_interval":"0s","password":"ClueCon","reconnects":5,"reply_timeout":"1m0s"}],"extra_fields":"","low_balance_ann_file":"","max_wait_connection":"2s","route_profile":false,"sched_transfer_extension":"CGRateS","sessions_conns":["*birpc_internal"],"subscribe_park":true},"general":{"caching_delay":"0","connect_attempts":5,"connect_timeout":"1s","dbdata_encoding":"*msgpack","default_caching":"*reload","default_category":"call","default_request_type":"*rated","default_tenant":"cgrates.org","default_timezone":"Local","digest_equal":":","digest_separator":",","locking_timeout":"0","log_level":6,"logger":"*syslog","max_parallel_conns":100,"max_reconnect_interval":"0","node_id":"ENGINE1","poster_attempts":3,"reconnects":-1,"reply_timeout":"2s","rounding_decimals":5,"rsr_separator":";","tpexport_dir":"/var/spool/cgrates/tpe"},"http":{"auth_users":{},"client_opts":{"dialFallbackDelay":"300ms","dialKeepAlive":"30s","dialTimeout":"30s","disableCompression":false,"disableKeepAlives":false,"expectContinueTimeout":"0s","forceAttemptHttp2":true,"idleConnTimeout":"1m30s","maxConnsPerHost":0,"maxIdleConns":100,"maxIdleConnsPerHost":2,"responseHeaderTimeout":"0s","skipTlsVerify":false,"tlsHandshakeTimeout":"10s"},"freeswitch_cdrs_url":"/freeswitch_json","http_cdrs":"/cdr_http","json_rpc_url":"/jsonrpc","pprof_path":"/debug/pprof/","registrars_url":"/registrar","use_basic_auth":false,"ws_url":"/ws"},"http_agent":[],"ips":{"enabled":false,"exists_indexed_fields":[],"indexed_selects":true,"nested_fields":false,"opts":{"*allocationID":"","*ttl":259200000000000},"prefix_indexed_fields":[],"store_interval":"0s","string_indexed_fields":null,"suffix_indexed_fields":[]},"kamailio_agent":{"create_cdr":false,"enabled":false,"evapi_conns":[{"address":"127.0.0.1:8448","alias":"","max_reconnect_interval":"0s","reconnects":5}],"route_profile":false,"sessions_conns":["*birpc_internal"],"timezone":""},"listen":{"birpc_gob":"","birpc_json":"127.0.0.1:2014","http":"127.0.0.1:2080","http_tls":"127.0.0.1:2280","rpc_gob":"127.0.0.1:2013","rpc_gob_tls":"127.0.0.1:2023","rpc_json":"127.0.0.1:2012","rpc_json_tls":"127.0.0.1:2022"},"loader":{"caches_conns":["*localhost"],"data_path":"./","disable_reverse":false,"field_separator":",","gapi_credentials":".gapi/credentials.json","gapi_token":".gapi/token.json","scheduler_conns":["*localhost"],"tpid":""},"mailer":{"auth_password":"CGRateS.org","auth_user":"cgrates","from_address":"cgr-mailer@localhost.localdomain","server":"localhost"},"migrator":{"out_datadb_encoding":"msgpack","out_datadb_host":"127.0.0.1","out_datadb_name":"10","out_datadb_opts":{"mongoConnScheme":"mongodb","mongoQueryTimeout":"0s","redisCACertificate":"","redisClientCertificate":"","redisClientKey":"","redisCluster":false,"redisClusterOndownDelay":"0s","redisClusterSync":"5s","redisConnectAttempts":20,"redisConnectTimeout":"0s","redisMaxConns":10,"redisPoolPipelineLimit":0,"redisPoolPipelineWindow":"150µs","redisReadTimeout":"0s","redisSentinel":"","redisTLS":false,"redisWriteTimeout":"0s"},"out_datadb_password":"","out_datadb_port":"6379","out_datadb_type":"*redis","out_datadb_user":"cgrates","out_stordb_host":"127.0.0.1","out_stordb_name":"cgrates","out_stordb_opts":{"mongoConnScheme":"mongodb","mongoQueryTimeout":"0s","mysqlDSNParams":null,"mysqlLocation":"","pgSSLMode":"","sqlConnMaxLifetime":"0s","sqlMaxIdleConns":0,"sqlMaxOpenConns":0},"out_stordb_password":"","out_stordb_port":"3306","out_stordb_type":"*mysql","out_stordb_user":"cgrates","users_filters":null},"prometheus_agent":{"apiers_conns":[],"cache_ids":[],"caches_conns":[],"collect_go_metrics":false,"collect_process_metrics":false,"cores_conns":[],"enabled":false,"path":"/prometheus","stat_queue_ids":[],"stats_conns":[]},"radius_agent":{"client_dictionaries":{"*default":["/usr/share/cgrates/radius/dict/"]},"client_secrets":{"*default":"CGRateS.org"},"coa_template":"*coa","dmr_template":"*dmr","enabled":false,"listeners":[{"acct_address":"127.0.0.1:1813","auth_address":"127.0.0.1:1812","network":"udp"}],"request_processors":[],"requests_cache_key":"","sessions_conns":["*internal"],"stats_conns":[],"thresholds_conns":[]},"rals":{"balance_rating_subject":{"*any":"*zero1ns","*voice":"*zero1s"},"enabled":false,"fallback_depth":3,"max_computed_usage":{"*any":"189h0m0s","*data":"107374182400","*mms":"10000","*sms":"10000","*voice":"72h0m0s"},"max_increments":1000000,"remove_expired":true,"rp_subject_prefix_matching":false,"sessions_conns":[],"stats_conns":[],"thresholds_conns":[]},"rankings":{"ees_conns":[],"ees_exporter_ids":[],"enabled":false,"scheduled_ids":{},"stats_conns":[],"store_interval":"","thresholds_conns":[]},"registrarc":{"dispatchers":{"hosts":[],"refresh_interval":"5m0s","registrars_conns":[]},"rpc":{"hosts":[],"refresh_interval":"5m0s","registrars_conns":[]}},"resources":{"enabled":false,"exists_indexed_fields":[],"indexed_selects":true,"nested_fields":false,"opts":{"*units":1,"*usageID":""},"prefix_indexed_fields":[],"store_interval":"","suffix_indexed_fields":[],"thresholds_conns":[]},"routes":{"attributes_conns":[],"default_ratio":1,"enabled":false,"exists_indexed_fields":[],"indexed_selects":true,"nested_fields":false,"opts":{"*context":"*routes","*ignoreErrors":false,"*maxCost":""},"prefix_indexed_fields":[],"rals_conns":[],"resources_conns":[],"stats_conns":[],"suffix_indexed_fields":[]},"rpc_conns":{"*bijson_localhost":{"conns":[{"address":"127.0.0.1:2014","transport":"*birpc_json"}],"poolSize":0,"strategy":"*first"},"*birpc_internal":{"conns":[{"address":"*birpc_internal","transport":""}],"poolSize":0,"strategy":"*first"},"*internal":{"conns":[{"address":"*internal","transport":""}],"poolSize":0,"strategy":"*first"},"*localhost":{"conns":[{"address":"127.0.0.1:2012","transport":"*json"}],"poolSize":0,"strategy":"*first"}},"schedulers":{"cdrs_conns":[],"dynaprepaid_actionplans":[],"enabled":false,"filters":[],"stats_conns":[],"thresholds_conns":[]},"sentrypeer":{"Audience":"https://sentrypeer.com/api","ClientID":"","ClientSecret":"","GrantType":"client_credentials","IpUrl":"https://sentrypeer.com/api/ip-addresses","NumberUrl":"https://sentrypeer.com/api/phone-numbers","TokenURL":"https://authz.sentrypeer.com/oauth/token"},"sessions":{"alterable_fields":[],"attributes_conns":[],"backup_interval":"0","cdrs_conns":[],"channel_sync_interval":"0","chargers_conns":[],"client_protocol":2,"debit_interval":"0","default_usage":{"*any":"3h0m0s","*data":"1048576","*sms":"1","*voice":"3h0m0s"},"enabled":false,"ips_conns":[],"min_dur_low_balance":"0","rals_conns":[],"replication_conns":[],"resources_conns":[],"routes_conns":[],"scheduler_conns":[],"session_indexes":[],"session_ttl":"0","stale_chan_max_extra_usage":"0","stats_conns":[],"stir":{"allowed_attest":["*any"],"default_attest":"A","payload_maxduration":"-1","privatekey_path":"","publickey_path":""},"store_session_costs":false,"terminate_attempts":5,"thresholds_conns":[]},"sip_agent":{"enabled":false,"listen":"127.0.0.1:5060","listen_net":"udp","request_processors":[],"retransmission_timer":1000000000,"sessions_conns":["*internal"],"stats_conns":[],"thresholds_conns":[],"timezone":""},"stats":{"ees_conns":[],"ees_exporter_ids":[],"enabled":false,"exists_indexed_fields":[],"indexed_selects":true,"nested_fields":false,"opts":{"*profileIDs":[],"*profileIgnoreFilters":false},"prefix_indexed_fields":[],"store_interval":"","store_uncompressed_limit":0,"suffix_indexed_fields":[],"thresholds_conns":[]},"stor_db":{"db_host":"127.0.0.1","db_name":"cgrates","db_password":"CGRateS.org","db_port":3306,"db_type":"*mysql","db_user":"cgrates","items":{"*cdrs":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*session_costs":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_account_actions":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_action_plans":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_action_triggers":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_actions":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_attributes":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_chargers":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_destination_rates":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_destinations":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_dispatcher_hosts":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_dispatcher_profiles":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_filters":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_ips":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_rankings":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_rates":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_rating_plans":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_rating_profiles":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_resources":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_routes":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_shared_groups":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_stats":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_thresholds":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_timings":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*tp_trends":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false},"*versions":{"limit":-1,"remote":false,"replicate":false,"static_ttl":false}},"opts":{"internalDBBackupPath":"/var/lib/cgrates/internal_db/backup/stordb","internalDBDumpInterval":"0s","internalDBDumpPath":"/var/lib/cgrates/internal_db/stordb","internalDBFileSizeLimit":1073741824,"internalDBRewriteInterval":"0s","internalDBStartTimeout":"5m0s","mongoConnScheme":"mongodb","mongoQueryTimeout":"10s","mysqlDSNParams":{},"mysqlLocation":"Local","pgSSLMode":"disable","pgSchema":"","sqlConnMaxLifetime":"0s","sqlLogLevel":3,"sqlMaxIdleConns":10,"sqlMaxOpenConns":100},"prefix_indexed_fields":[],"remote_conns":null,"replication_conns":null,"string_indexed_fields":[]},"suretax":{"bill_to_number":"","business_unit":"","client_number":"","client_tracking":"~*req.CGRID","customer_number":"~*req.Subject","include_local_cost":false,"orig_number":"~*req.Subject","p2pplus4":"","p2pzipcode":"","plus4":"","regulatory_code":"03","response_group":"03","response_type":"D4","return_file_code":"0","sales_type_code":"R","tax_exemption_code_list":"","tax_included":"0","tax_situs_rule":"04","term_number":"~*req.Destination","timezone":"UTC","trans_type_code":"010101","unit_type":"00","units":"1","url":"","validation_key":"","zipcode":""},"templates":{"*asr":[{"mandatory":true,"path":"*diamreq.Session-Id","tag":"SessionId","type":"*variable","value":"~*req.Session-Id"},{"mandatory":true,"path":"*diamreq.Origin-Host","tag":"OriginHost","type":"*variable","value":"~*req.Destination-Host"},{"mandatory":true,"path":"*diamreq.Origin-Realm","tag":"OriginRealm","type":"*variable","value":"~*req.Destination-Realm"},{"mandatory":true,"path":"*diamreq.Destination-Realm","tag":"DestinationRealm","type":"*variable","value":"~*req.Origin-Realm"},{"mandatory":true,"path":"*diamreq.Destination-Host","tag":"DestinationHost","type":"*variable","value":"~*req.Origin-Host"},{"mandatory":true,"path":"*diamreq.Auth-Application-Id","tag":"AuthApplicationId","type":"*variable","value":"~*vars.*appid"}],"*cca":[{"mandatory":true,"path":"*rep.Session-Id","tag":"SessionId","type":"*variable","value":"~*req.Session-Id"},{"path":"*rep.Result-Code","tag":"ResultCode","type":"*constant","value":"2001"},{"mandatory":true,"path":"*rep.Origin-Host","tag":"OriginHost","type":"*variable","value":"~*vars.OriginHost"},{"mandatory":true,"path":"*rep.Origin-Realm","tag":"OriginRealm","type":"*variable","value":"~*vars.OriginRealm"},{"mandatory":true,"path":"*rep.Auth-Application-Id","tag":"AuthApplicationId","type":"*variable","value":"~*vars.*appid"},{"mandatory":true,"path":"*rep.CC-Request-Type","tag":"CCRequestType","type":"*variable","value":"~*req.CC-Request-Type"},{"mandatory":true,"path":"*rep.CC-Request-Number","tag":"CCRequestNumber","type":"*variable","value":"~*req.CC-Request-Number"}],"*cdrLog":[{"mandatory":true,"path":"*cdr.ToR","tag":"ToR","type":"*variable","value":"~*req.BalanceType"},{"mandatory":true,"path":"*cdr.OriginHost","tag":"OriginHost","type":"*constant","value":"127.0.0.1"},{"mandatory":true,"path":"*cdr.RequestType","tag":"RequestType","type":"*constant","value":"*none"},{"mandatory":true,"path":"*cdr.Tenant","tag":"Tenant","type":"*variable","value":"~*req.Tenant"},{"mandatory":true,"path":"*cdr.Account","tag":"Account","type":"*variable","value":"~*req.Account"},{"mandatory":true,"path":"*cdr.Subject","tag":"Subject","type":"*variable","value":"~*req.Account"},{"mandatory":true,"path":"*cdr.Cost","tag":"Cost","type":"*variable","value":"~*req.Cost"},{"mandatory":true,"path":"*cdr.Source","tag":"Source","type":"*constant","value":"*cdrLog"},{"mandatory":true,"path":"*cdr.Usage","tag":"Usage","type":"*constant","value":"1"},{"mandatory":true,"path":"*cdr.RunID","tag":"RunID","type":"*variable","value":"~*req.ActionType"},{"mandatory":true,"path":"*cdr.SetupTime","tag":"SetupTime","type":"*constant","value":"*now"},{"mandatory":true,"path":"*cdr.AnswerTime","tag":"AnswerTime","type":"*constant","value":"*now"},{"mandatory":true,"path":"*cdr.PreRated","tag":"PreRated","type":"*constant","value":"true"}],"*coa":[{"path":"*radDAReq.User-Name","tag":"User-Name","type":"*variable","value":"~*oreq.User-Name"},{"path":"*radDAReq.NAS-IP-Address","tag":"NAS-IP-Address","type":"*variable","value":"~*oreq.NAS-IP-Address"},{"path":"*radDAReq.Acct-Session-Id","tag":"Acct-Session-Id","type":"*variable","value":"~*oreq.Acct-Session-Id"},{"path":"*radDAReq.Filter-Id","tag":"Filter-Id","type":"*variable","value":"~*req.CustomFilter"}],"*dmr":[{"path":"*radDAReq.User-Name","tag":"User-Name","type":"*variable","value":"~*oreq.User-Name"},{"path":"*radDAReq.NAS-IP-Address","tag":"NAS-IP-Address","type":"*variable","value":"~*oreq.NAS-IP-Address"},{"path":"*radDAReq.Acct-Session-Id","tag":"Acct-Session-Id","type":"*variable","value":"~*oreq.Acct-Session-Id"},{"path":"*radDAReq.Reply-Message","tag":"Reply-Message","type":"*variable","value":"~*req.DisconnectCause"}],"*err":[{"mandatory":true,"path":"*rep.Session-Id","tag":"SessionId","type":"*variable","value":"~*req.Session-Id"},{"mandatory":true,"path":"*rep.Origin-Host","tag":"OriginHost","type":"*variable","value":"~*vars.OriginHost"},{"mandatory":true,"path":"*rep.Origin-Realm","tag":"OriginRealm","type":"*variable","value":"~*vars.OriginRealm"}],"*errSip":[{"mandatory":true,"path":"*rep.Request","tag":"Request","type":"*constant","value":"SIP/2.0 500 Internal Server Error"}],"*rar":[{"mandatory":true,"path":"*diamreq.Session-Id","tag":"SessionId","type":"*variable","value":"~*req.Session-Id"},{"mandatory":true,"path":"*diamreq.Origin-Host","tag":"OriginHost","type":"*variable","value":"~*req.Destination-Host"},{"mandatory":true,"path":"*diamreq.Origin-Realm","tag":"OriginRealm","type":"*variable","value":"~*req.Destination-Realm"},{"mandatory":true,"path":"*diamreq.Destination-Realm","tag":"DestinationRealm","type":"*variable","value":"~*req.Origin-Realm"},{"mandatory":true,"path":"*diamreq.Destination-Host","tag":"DestinationHost","type":"*variable","value":"~*req.Origin-Host"},{"mandatory":true,"path":"*diamreq.Auth-Application-Id","tag":"AuthApplicationId","type":"*variable","value":"~*vars.*appid"},{"path":"*diamreq.Re-Auth-Request-Type","tag":"ReAuthRequestType","type":"*constant","value":"0"}]},"thresholds":{"ees_conns":[],"ees_exporter_ids":[],"enabled":false,"exists_indexed_fields":[],"indexed_selects":true,"nested_fields":false,"opts":{"*profileIDs":[],"*profileIgnoreFilters":false},"prefix_indexed_fields":[],"store_interval":"","suffix_indexed_fields":[]},"tls":{"ca_certificate":"","client_certificate":"","client_key":"","server_certificate":"","server_key":"","server_name":"","server_policy":4},"trends":{"ees_conns":[],"ees_exporter_ids":[],"enabled":false,"scheduled_ids":{},"stats_conns":[],"store_interval":"","store_uncompressed_limit":0,"thresholds_conns":[]}}` if err != nil { t.Fatal(err) } diff --git a/config/listencfg_test.go b/config/listencfg_test.go index 9d123853d..5df130123 100644 --- a/config/listencfg_test.go +++ b/config/listencfg_test.go @@ -32,6 +32,7 @@ func TestListenCfgloadFromJsonCfg(t *testing.T) { Rpc_json_tls: utils.StringPointer("127.0.0.1:2022"), Rpc_gob_tls: utils.StringPointer("127.0.0.1:2023"), Http_tls: utils.StringPointer("127.0.0.1:2280"), + Birpc_json: utils.StringPointer("127.0.0.1:2018"), } expected := &ListenCfg{ RPCJSONListen: "127.0.0.1:2012", @@ -40,6 +41,7 @@ func TestListenCfgloadFromJsonCfg(t *testing.T) { RPCJSONTLSListen: "127.0.0.1:2022", RPCGOBTLSListen: "127.0.0.1:2023", HTTPTLSListen: "127.0.0.1:2280", + BiJSONListen: "127.0.0.1:2018", } jsnCfg := NewDefaultCGRConfig() if err := jsnCfg.listenCfg.loadFromJSONCfg(jsonCfg); err != nil { @@ -60,6 +62,8 @@ func TestListenCfgAsMapInterface(t *testing.T) { utils.RPCJSONTLSListenCfg: "127.0.0.1:2022", utils.RPCGOBTLSListenCfg: "127.0.0.1:2023", utils.HTTPTLSListenCfg: "127.0.0.1:2280", + utils.BijsonListenCfg: "127.0.0.1:2014", + utils.BigobListenCfg: "", } if cgrCfg, err := NewCGRConfigFromJSONStringWithDefaults(cfgJSONStr); err != nil { t.Error(err) @@ -76,6 +80,7 @@ func TestListenCfgAsMapInterface1(t *testing.T) { "rpc_json_tls" : "127.0.0.1:2025", "rpc_gob_tls": "127.0.0.1:2001", "http_tls": "127.0.0.1:2288", + "birpc_json": "127.0.0.1:2014", } }` eMap := map[string]any{ @@ -85,6 +90,8 @@ func TestListenCfgAsMapInterface1(t *testing.T) { utils.RPCJSONTLSListenCfg: "127.0.0.1:2025", utils.RPCGOBTLSListenCfg: "127.0.0.1:2001", utils.HTTPTLSListenCfg: "127.0.0.1:2288", + utils.BijsonListenCfg: "127.0.0.1:2014", + utils.BigobListenCfg: "", } if cgrCfg, err := NewCGRConfigFromJSONStringWithDefaults(cfgJSONStr); err != nil { t.Error(err) @@ -101,6 +108,7 @@ func TestListenCfgClone(t *testing.T) { RPCJSONTLSListen: "127.0.0.1:2022", RPCGOBTLSListen: "127.0.0.1:2023", HTTPTLSListen: "127.0.0.1:2280", + BiJSONListen: "127.0.0.1:2018", } rcv := ban.Clone() if !reflect.DeepEqual(ban, rcv) { diff --git a/config/sessionscfg_test.go b/config/sessionscfg_test.go index af4412d72..587c7dd5e 100644 --- a/config/sessionscfg_test.go +++ b/config/sessionscfg_test.go @@ -68,7 +68,6 @@ func TestFsAgentCfgloadFromJsonCfg1(t *testing.T) { func TestSessionSCfgloadFromJsonCfgCase1(t *testing.T) { cfgJSON := &SessionSJsonCfg{ Enabled: utils.BoolPointer(true), - ListenBiJSON: utils.StringPointer("127.0.0.1:2018"), ChargerSConns: &[]string{utils.MetaInternal, "*conn1"}, RALsConns: &[]string{utils.MetaInternal, "*conn1"}, IPsConns: &[]string{utils.MetaInternal, "*conn1"}, @@ -99,7 +98,6 @@ func TestSessionSCfgloadFromJsonCfgCase1(t *testing.T) { } expected := &SessionSCfg{ Enabled: true, - ListenBiJSON: "127.0.0.1:2018", ChargerSConns: []string{utils.ConcatenatedKey(utils.MetaInternal, utils.MetaChargers), "*conn1"}, RALsConns: []string{utils.ConcatenatedKey(utils.MetaInternal, utils.MetaResponder), "*conn1"}, IPsConns: []string{utils.ConcatenatedKey(utils.MetaInternal, utils.MetaIPs), "*conn1"}, @@ -238,7 +236,6 @@ func TestSessionSCfgloadFromJsonCfgCase10(t *testing.T) { } expected := &SessionSCfg{ Enabled: false, - ListenBiJSON: "127.0.0.1:2014", ChargerSConns: []string{}, RALsConns: []string{}, IPsConns: []string{}, @@ -349,8 +346,6 @@ func TestSessionSCfgAsMapInterfaceCase1(t *testing.T) { }` eMap := map[string]any{ utils.EnabledCfg: false, - utils.ListenBijsonCfg: "127.0.0.1:2014", - utils.ListenBigobCfg: "", utils.ChargerSConnsCfg: []string{}, utils.RALsConnsCfg: []string{}, utils.CDRsConnsCfg: []string{}, @@ -402,7 +397,6 @@ func TestSessionSCfgAsMapInterfaceCase2(t *testing.T) { cfgJSONStr := `{ "sessions": { "enabled": true, - "listen_bijson": "127.0.0.1:2018", "chargers_conns": ["*internal:*chargers", "*conn1"], "rals_conns": ["*internal:*responder", "*conn1"], "cdrs_conns": ["*internal:*cdrs", "*conn1"], @@ -431,8 +425,6 @@ func TestSessionSCfgAsMapInterfaceCase2(t *testing.T) { }` eMap := map[string]any{ utils.EnabledCfg: true, - utils.ListenBijsonCfg: "127.0.0.1:2018", - utils.ListenBigobCfg: "", utils.ChargerSConnsCfg: []string{utils.MetaInternal, "*conn1"}, utils.RALsConnsCfg: []string{utils.MetaInternal, "*conn1"}, utils.CDRsConnsCfg: []string{utils.MetaInternal, "*conn1"}, @@ -950,7 +942,6 @@ func TestFsAgentCfgClone(t *testing.T) { func TestSessionSCfgClone(t *testing.T) { ban := &SessionSCfg{ Enabled: true, - ListenBiJSON: "127.0.0.1:2018", ChargerSConns: []string{utils.ConcatenatedKey(utils.MetaInternal, utils.MetaChargers), "*conn1"}, RALsConns: []string{utils.ConcatenatedKey(utils.MetaInternal, utils.MetaResponder), "*conn1"}, IPsConns: []string{utils.ConcatenatedKey(utils.MetaInternal, utils.MetaIPs), "*conn1"}, diff --git a/cores/server_it_test.go b/cores/server_it_test.go index 229d1619b..e52046bae 100644 --- a/cores/server_it_test.go +++ b/cores/server_it_test.go @@ -326,7 +326,7 @@ func testServeBiJSON(t *testing.T) { ss := sessions.NewSessionS(cfg, dm, nil) go func() { - if err := server.ServeBiRPC(":3434", "", ss.OnBiJSONConnect, ss.OnBiJSONDisconnect); err != nil { + if err := server.ServeBiRPC(":3434", "", []func(birpc.ClientConnector){ss.OnBiJSONConnect}, []func(birpc.ClientConnector){ss.OnBiJSONDisconnect}); err != nil { t.Error(err) } }() @@ -349,8 +349,7 @@ func testServeBiJSONInvalidPort(t *testing.T) { ss := sessions.NewSessionS(cfg, dm, nil) expectedErr := "listen tcp: address invalid_port_format: missing port in address" - if err := server.ServeBiRPC("invalid_port_format", "", ss.OnBiJSONConnect, - ss.OnBiJSONDisconnect); err == nil || err.Error() != expectedErr { + if err := server.ServeBiRPC("invalid_port_format", "", []func(birpc.ClientConnector){ss.OnBiJSONConnect}, []func(birpc.ClientConnector){ss.OnBiJSONDisconnect}); err == nil || err.Error() != expectedErr { t.Errorf("Expected %+v, received %+v", expectedErr, err) } @@ -373,7 +372,7 @@ func testServeBiGoB(t *testing.T) { ss := sessions.NewSessionS(cfg, dm, nil) go func() { - if err := server.ServeBiRPC("", ":9343", ss.OnBiJSONConnect, ss.OnBiJSONDisconnect); err != nil { + if err := server.ServeBiRPC("", ":9343", []func(birpc.ClientConnector){ss.OnBiJSONConnect}, []func(birpc.ClientConnector){ss.OnBiJSONDisconnect}); err != nil { t.Log(err) } }() @@ -396,8 +395,7 @@ func testServeBiGoBInvalidPort(t *testing.T) { ss := sessions.NewSessionS(cfg, dm, nil) expectedErr := "listen tcp: address invalid_port_format: missing port in address" - if err := server.ServeBiRPC("", "invalid_port_format", ss.OnBiJSONConnect, - ss.OnBiJSONDisconnect); err == nil || err.Error() != expectedErr { + if err := server.ServeBiRPC("", "invalid_port_format", []func(birpc.ClientConnector){ss.OnBiJSONConnect}, []func(birpc.ClientConnector){ss.OnBiJSONDisconnect}); err == nil || err.Error() != expectedErr { t.Errorf("Expected %+v, received %+v", expectedErr, err) } diff --git a/data/conf/cgrates/cgrates.json b/data/conf/cgrates/cgrates.json index f70b0b2fd..9440d008b 100755 --- a/data/conf/cgrates/cgrates.json +++ b/data/conf/cgrates/cgrates.json @@ -203,6 +203,8 @@ // "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 +// "birpc_json": "127.0.0.1:2014", // address where to listen for bidirectional JSON-RPC requests(for agents<->sessions and sessions<->thresholds) +// "birpc_gob": "", // address where to listen for bidirectional GOB-RPC requests (for agents<->sessions and sessions<->thresholds) // }, @@ -614,8 +616,6 @@ // "sessions": { // "enabled": false, // starts the session service: -// "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> // "rals_conns": [], // connections to RALs for rating/accounting <""|*internal|$rpc_conns_id> // "cdrs_conns": [], // connections to CDRs for CDR posting <""|*internal|$rpc_conns_id> diff --git a/data/conf/samples/cache_replicate/dispatcher_engine2/cgrates.json b/data/conf/samples/cache_replicate/dispatcher_engine2/cgrates.json index 53564b5be..1754c9f93 100644 --- a/data/conf/samples/cache_replicate/dispatcher_engine2/cgrates.json +++ b/data/conf/samples/cache_replicate/dispatcher_engine2/cgrates.json @@ -1,51 +1,43 @@ { + "general": { + "node_id": "DispatcherEngine2", + "log_level": 7, + "reconnects": 1 + }, -"general": { - "node_id": "DispatcherEngine2", - "log_level": 7, - "reconnects": 1, -}, + "listen": { + "rpc_json": ":3012", + "rpc_gob": ":3013", + "http": ":3080", + "birpc_json": ":3014" + }, + "data_db": { + "db_type": "redis", + "db_port": 6379, + "db_name": "11" + }, -"listen": { - "rpc_json": ":3012", - "rpc_gob": ":3013", - "http": ":3080", -}, + "stor_db": { + "db_type": "*internal" + }, + "caches": { + "partitions": { + "*dispatcher_routes": { "limit": -1, "ttl": "1h" } + } + }, -"data_db": { - "db_type": "redis", - "db_port": 6379, - "db_name": "11", -}, + "schedulers": { + "enabled": true + }, + "dispatchers": { + "enabled": true + }, -"stor_db": { - "db_type": "*internal", -}, - -"caches":{ - "partitions": { - "*dispatcher_routes": {"limit": -1, "ttl": "1h"} - }, -}, - - -"schedulers": { - "enabled": true, -}, - - -"dispatchers":{ - "enabled": true, -}, - - -"apiers": { - "enabled": true, - "scheduler_conns": ["*internal"], -}, - - -} \ No newline at end of file + "apiers": { + "enabled": true, + "scheduler_conns": ["*internal"] + } +} diff --git a/data/conf/samples/cache_replicate/engine1/cgrates.json b/data/conf/samples/cache_replicate/engine1/cgrates.json index f7ba37b85..144171352 100644 --- a/data/conf/samples/cache_replicate/engine1/cgrates.json +++ b/data/conf/samples/cache_replicate/engine1/cgrates.json @@ -1,59 +1,54 @@ { -// CGRateS Configuration file -// + // CGRateS Configuration file + // + "general": { + "node_id": "Engine1", + "log_level": 7 + }, -"general": { - "node_id": "Engine1", - "log_level": 7 -}, + "listen": { + "rpc_json": ":6012", + "rpc_gob": ":6013", + "http": ":6080", + "birpc_json": ":6014" + }, + "data_db": { + "db_type": "*internal" + }, -"listen": { - "rpc_json": ":6012", - "rpc_gob": ":6013", - "http": ":6080", -}, + "stor_db": { + "db_type": "*internal" + }, -"data_db": { - "db_type": "*internal", -}, + "rpc_conns": { + "conn1": { + "strategy": "*first", + "conns": [{ "address": "127.0.0.1:6012", "transport": "*json" }] + } + }, -"stor_db": { - "db_type": "*internal" -}, + "attributes": { + "enabled": true + }, + "rals": { + "enabled": true + }, -"rpc_conns": { - "conn1": { - "strategy": "*first", - "conns": [{"address": "127.0.0.1:6012", "transport":"*json"}], - }, -}, + "schedulers": { + "enabled": true + }, -"attributes": { - "enabled": true -}, - -"rals": { - "enabled": true, -}, - -"schedulers": { - "enabled": true, -}, - - -"chargers": { - "enabled": true, - "attributes_conns": ["*internal"], -}, - - -"apiers": { - "enabled": true, - "caches_conns":["conn1"], - "scheduler_conns": ["*internal"], -}, + "chargers": { + "enabled": true, + "attributes_conns": ["*internal"] + }, + "apiers": { + "enabled": true, + "caches_conns": ["conn1"], + "scheduler_conns": ["*internal"] + } } diff --git a/data/conf/samples/cache_replicate/fltr_update_e1_mongo/cgrates.json b/data/conf/samples/cache_replicate/fltr_update_e1_mongo/cgrates.json index 18a44b194..d10b41184 100644 --- a/data/conf/samples/cache_replicate/fltr_update_e1_mongo/cgrates.json +++ b/data/conf/samples/cache_replicate/fltr_update_e1_mongo/cgrates.json @@ -1,44 +1,45 @@ { - -"general": { + "general": { "node_id": "fltr_update_e1_mongo", "log_level": 7 -}, + }, -"listen": { + "listen": { "rpc_json": ":22012", "rpc_gob": ":22013", - "http": ":22080" -}, + "http": ":22080", + "birpc_json": ":22014" + }, -"data_db": { + "data_db": { "db_type": "mongo", "db_name": "10", "db_port": 27017 -}, + }, -"stor_db": { + "stor_db": { "db_type": "mongo", "db_name": "cgrates", "db_port": 27017, "db_password": "" -}, + }, -"rpc_conns": { + "rpc_conns": { "cache_conn": { - "strategy": "*broadcast_sync", - "conns": [{"address": "127.0.0.1:22012", "transport": "*json"}, {"address": "127.0.0.1:2012", "transport": "*json"}] + "strategy": "*broadcast_sync", + "conns": [ + { "address": "127.0.0.1:22012", "transport": "*json" }, + { "address": "127.0.0.1:2012", "transport": "*json" } + ] } -}, + }, -"attributes": { + "attributes": { "enabled": true -}, + }, -"apiers": { + "apiers": { "enabled": true, - "caches_conns":["cache_conn"] + "caches_conns": ["cache_conn"] + } } - -} - \ No newline at end of file diff --git a/data/conf/samples/cache_replicate/fltr_update_e1_mysql/cgrates.json b/data/conf/samples/cache_replicate/fltr_update_e1_mysql/cgrates.json index 4d4ac473a..cbce1faa1 100644 --- a/data/conf/samples/cache_replicate/fltr_update_e1_mysql/cgrates.json +++ b/data/conf/samples/cache_replicate/fltr_update_e1_mysql/cgrates.json @@ -1,42 +1,42 @@ { - -"general": { + "general": { "node_id": "fltr_update_e1_mysql", "log_level": 7 -}, + }, - -"listen": { + "listen": { "rpc_json": ":22012", "rpc_gob": ":22013", - "http": ":22080" -}, + "http": ":22080", + "birpc_json": ":22014" + }, -"data_db": { - "db_type": "redis", - "db_port": 6379, - "db_name": "10" -}, + "data_db": { + "db_type": "redis", + "db_port": 6379, + "db_name": "10" + }, -"stor_db": { + "stor_db": { "db_password": "CGRateS.org" -}, + }, -"rpc_conns": { + "rpc_conns": { "cache_conn": { - "strategy": "*broadcast_sync", - "conns": [{"address": "127.0.0.1:22012", "transport":"*json"},{"address": "127.0.0.1:2012", "transport": "*json"}] + "strategy": "*broadcast_sync", + "conns": [ + { "address": "127.0.0.1:22012", "transport": "*json" }, + { "address": "127.0.0.1:2012", "transport": "*json" } + ] } -}, + }, -"attributes": { + "attributes": { "enabled": true -}, + }, -"apiers": { + "apiers": { "enabled": true, - "caches_conns":["cache_conn"] + "caches_conns": ["cache_conn"] + } } - -} - \ No newline at end of file diff --git a/data/conf/samples/cache_rpl_active_active/dispatcher_engine2/cgrates.json b/data/conf/samples/cache_rpl_active_active/dispatcher_engine2/cgrates.json index d7b0a917f..d75f3a3df 100644 --- a/data/conf/samples/cache_rpl_active_active/dispatcher_engine2/cgrates.json +++ b/data/conf/samples/cache_rpl_active_active/dispatcher_engine2/cgrates.json @@ -1,60 +1,51 @@ { + "general": { + "node_id": "DispatcherEngine2", + "log_level": 7, + "reconnects": 1 + }, -"general": { - "node_id": "DispatcherEngine2", - "log_level": 7, - "reconnects": 1, -}, + "listen": { + "rpc_json": ":3012", + "rpc_gob": ":3013", + "http": ":3080", + "birpc_json": ":3014" + }, + "data_db": { + "db_type": "redis", + "db_port": 6379, + "db_name": "11" + }, -"listen": { - "rpc_json": ":3012", - "rpc_gob": ":3013", - "http": ":3080", -}, + "stor_db": { + "db_type": "*internal" + }, + "caches": { + "partitions": { + "*dispatcher_routes": { "limit": -1, "ttl": "1h", "replicate": true }, + "*dispatcher_loads": { "limit": -1, "replicate": true } + }, + "replication_conns": ["cacheReplication"] + }, -"data_db": { - "db_type": "redis", - "db_port": 6379, - "db_name": "11", -}, + "rpc_conns": { + "cacheReplication": { + "conns": [{ "address": "127.0.0.1:2013", "transport": "*gob" }] + } + }, + "schedulers": { + "enabled": true + }, -"stor_db": { - "db_type": "*internal", -}, + "dispatchers": { + "enabled": true + }, -"caches":{ - "partitions": { - "*dispatcher_routes": {"limit": -1, "ttl": "1h", "replicate": true}, - "*dispatcher_loads": {"limit": -1, "replicate": true} - }, - "replication_conns": ["cacheReplication"], -}, - - -"rpc_conns": { - "cacheReplication": { - "conns": [{"address": "127.0.0.1:2013", "transport":"*gob"}], - }, -}, - - -"schedulers": { - "enabled": true, -}, - - -"dispatchers":{ - "enabled": true, -}, - - -"apiers": { - "enabled": true, - "scheduler_conns": ["*internal"], -}, - - -} \ No newline at end of file + "apiers": { + "enabled": true, + "scheduler_conns": ["*internal"] + } +} diff --git a/data/conf/samples/cache_rpl_active_active/engine1/cgrates.json b/data/conf/samples/cache_rpl_active_active/engine1/cgrates.json index f7ba37b85..144171352 100644 --- a/data/conf/samples/cache_rpl_active_active/engine1/cgrates.json +++ b/data/conf/samples/cache_rpl_active_active/engine1/cgrates.json @@ -1,59 +1,54 @@ { -// CGRateS Configuration file -// + // CGRateS Configuration file + // + "general": { + "node_id": "Engine1", + "log_level": 7 + }, -"general": { - "node_id": "Engine1", - "log_level": 7 -}, + "listen": { + "rpc_json": ":6012", + "rpc_gob": ":6013", + "http": ":6080", + "birpc_json": ":6014" + }, + "data_db": { + "db_type": "*internal" + }, -"listen": { - "rpc_json": ":6012", - "rpc_gob": ":6013", - "http": ":6080", -}, + "stor_db": { + "db_type": "*internal" + }, -"data_db": { - "db_type": "*internal", -}, + "rpc_conns": { + "conn1": { + "strategy": "*first", + "conns": [{ "address": "127.0.0.1:6012", "transport": "*json" }] + } + }, -"stor_db": { - "db_type": "*internal" -}, + "attributes": { + "enabled": true + }, + "rals": { + "enabled": true + }, -"rpc_conns": { - "conn1": { - "strategy": "*first", - "conns": [{"address": "127.0.0.1:6012", "transport":"*json"}], - }, -}, + "schedulers": { + "enabled": true + }, -"attributes": { - "enabled": true -}, - -"rals": { - "enabled": true, -}, - -"schedulers": { - "enabled": true, -}, - - -"chargers": { - "enabled": true, - "attributes_conns": ["*internal"], -}, - - -"apiers": { - "enabled": true, - "caches_conns":["conn1"], - "scheduler_conns": ["*internal"], -}, + "chargers": { + "enabled": true, + "attributes_conns": ["*internal"] + }, + "apiers": { + "enabled": true, + "caches_conns": ["conn1"], + "scheduler_conns": ["*internal"] + } } diff --git a/data/conf/samples/caps_busy/cgrates.json b/data/conf/samples/caps_busy/cgrates.json index 5e5b890a6..5fb812ae5 100644 --- a/data/conf/samples/caps_busy/cgrates.json +++ b/data/conf/samples/caps_busy/cgrates.json @@ -16,7 +16,8 @@ "listen": { "rpc_json": ":2012", "rpc_gob": ":2013", - "http": ":2080" + "http": ":2080", + "birpc_json": "127.0.0.1:2014" }, @@ -39,7 +40,6 @@ "sessions": { "enabled": true, - "listen_bijson": "127.0.0.1:2014" }, diff --git a/data/conf/samples/caps_peak/cgrates.json b/data/conf/samples/caps_peak/cgrates.json index df3444efe..f0c99603d 100644 --- a/data/conf/samples/caps_peak/cgrates.json +++ b/data/conf/samples/caps_peak/cgrates.json @@ -17,7 +17,8 @@ "listen": { "rpc_json": ":2012", "rpc_gob": ":2013", - "http": ":2080" + "http": ":2080", + "birpc_json": "127.0.0.1:2014" }, @@ -40,7 +41,6 @@ "sessions": { "enabled": true, - "listen_bijson": "127.0.0.1:2014" }, diff --git a/data/conf/samples/caps_queue/cgrates.json b/data/conf/samples/caps_queue/cgrates.json index 3b3886f5b..e82fb2316 100644 --- a/data/conf/samples/caps_queue/cgrates.json +++ b/data/conf/samples/caps_queue/cgrates.json @@ -17,6 +17,7 @@ "rpc_json": ":2012", "rpc_gob": ":2013", "http": ":2080", + "birpc_json": "127.0.0.1:2014" }, @@ -38,7 +39,6 @@ "sessions": { "enabled": true, - "listen_bijson": "127.0.0.1:2014" }, diff --git a/data/conf/samples/configs_active/cgrates.json b/data/conf/samples/configs_active/cgrates.json index a8c031ab5..d7cb2318a 100644 --- a/data/conf/samples/configs_active/cgrates.json +++ b/data/conf/samples/configs_active/cgrates.json @@ -1,35 +1,28 @@ { + "general": { + "node_id": "EngineWithConfigSActive", + "log_level": 7, + "reply_timeout": "50s" + }, + "listen": { + "rpc_json": ":3012", + "rpc_gob": ":3013", + "http": ":3080", + "birpc_json": ":3014" + }, -"general": { - "node_id": "EngineWithConfigSActive", - "log_level": 7, - "reply_timeout": "50s", -}, - - -"listen": { - "rpc_json": ":3012", - "rpc_gob": ":3013", - "http": ":3080", -}, - - -"data_db": { - "db_type": "*internal", -}, - - -"stor_db": { - "db_type": "*internal" -}, - - -"configs": { - "enabled": true, - "url": "/configs/", - "root_dir": "/usr/share/cgrates/conf/samples", -}, + "data_db": { + "db_type": "*internal" + }, + "stor_db": { + "db_type": "*internal" + }, + "configs": { + "enabled": true, + "url": "/configs/", + "root_dir": "/usr/share/cgrates/conf/samples" + } } diff --git a/data/conf/samples/diam_tutmysql/cgrates.json b/data/conf/samples/diam_tutmysql/cgrates.json index 4d752ff12..d32b67721 100644 --- a/data/conf/samples/diam_tutmysql/cgrates.json +++ b/data/conf/samples/diam_tutmysql/cgrates.json @@ -1,86 +1,71 @@ { -// CGRateS Configuration file -// + // CGRateS Configuration file + // + "general": { + "log_level": 7 + }, -"general": { - "log_level": 7, -}, + "listen": { + "rpc_json": ":2012", + "rpc_gob": ":2013", + "http": ":2080" + }, + "stor_db": { + "db_password": "CGRateS.org" + }, -"listen": { - "rpc_json": ":2012", - "rpc_gob": ":2013", - "http": ":2080", -}, + "rals": { + "enabled": true + }, + "schedulers": { + "enabled": true + }, -"stor_db": { - "db_password": "CGRateS.org", -}, + "cdrs": { + "enabled": true, + "chargers_conns": ["*internal"], + "rals_conns": ["*internal"] + }, + "chargers": { + "enabled": true, + "attributes_conns": ["*internal"] + }, -"rals": { - "enabled": true, -}, + "attributes": { + "enabled": true + }, + "thresholds": { + "enabled": true + }, -"schedulers": { - "enabled": true, -}, + "stats": { + "enabled": true, + "thresholds_conns": ["*internal"] + }, + "sessions": { + "enabled": true, + "chargers_conns": ["*internal"], + "rals_conns": ["*internal"], + "cdrs_conns": ["*internal"], + "thresholds_conns": ["*birpc_internal"], + "stats_conns": ["*internal"], + "attributes_conns": ["*internal"] + }, -"cdrs": { - "enabled": true, - "chargers_conns":["*internal"], - "rals_conns": ["*internal"], -}, + "apiers": { + "enabled": true, + "scheduler_conns": ["*internal"] + }, - -"chargers": { - "enabled": true, - "attributes_conns": ["*internal"], -}, - - -"attributes": { - "enabled": true, -}, - - -"thresholds": { - "enabled": true, -}, - - -"stats": { - "enabled": true, - "thresholds_conns": ["*internal"], -}, - - -"sessions": { - "enabled": true, - "chargers_conns": ["*internal"], - "rals_conns": ["*internal"], - "cdrs_conns": ["*internal"], - "thresholds_conns": ["*internal"], - "stats_conns": ["*internal"], - "attributes_conns": ["*internal"], -}, - - -"apiers": { - "enabled": true, - "scheduler_conns": ["*internal"], -}, - - -"diameter_agent": { - "enabled": true, - "listen": ":3868", - "sessions_conns": ["*birpc_internal"], -}, - - -} \ No newline at end of file + "diameter_agent": { + "enabled": true, + "listen": ":3868", + "sessions_conns": ["*birpc_internal"] + } +} diff --git a/data/conf/samples/diamagent_internal_gobbirpc/cgrates.json b/data/conf/samples/diamagent_internal_gobbirpc/cgrates.json index 3cd89a507..741b0a3a8 100644 --- a/data/conf/samples/diamagent_internal_gobbirpc/cgrates.json +++ b/data/conf/samples/diamagent_internal_gobbirpc/cgrates.json @@ -13,6 +13,7 @@ "rpc_json": ":2012", // RPC JSON listening address "rpc_gob": ":2013", // RPC GOB listening address "http": ":2080", // HTTP listening address + "birpc_gob": "127.0.0.1:2015", }, "rpc_conns": { @@ -54,7 +55,6 @@ "sessions": { "enabled": true, - "listen_bigob": "127.0.0.1:2015", "attributes_conns": ["*localhost"], "chargers_conns": ["*localhost"], "rals_conns": ["*localhost"], diff --git a/data/conf/samples/diamagent_mongo_gobbirpc/cgrates.json b/data/conf/samples/diamagent_mongo_gobbirpc/cgrates.json index b7d639b7e..ee30eb60f 100644 --- a/data/conf/samples/diamagent_mongo_gobbirpc/cgrates.json +++ b/data/conf/samples/diamagent_mongo_gobbirpc/cgrates.json @@ -13,6 +13,7 @@ "rpc_json": ":2012", // RPC JSON listening address "rpc_gob": ":2013", // RPC GOB listening address "http": ":2080", // HTTP listening address + "birpc_gob": "127.0.0.1:2015", }, "data_db": { // database used to store runtime data (eg: accounts, cdr stats) @@ -59,7 +60,6 @@ "sessions": { "enabled": true, - "listen_bigob": "127.0.0.1:2015", "attributes_conns": ["*localhost"], "chargers_conns": ["*localhost"], "rals_conns": ["*localhost"], diff --git a/data/conf/samples/diamagent_mysql_gobbirpc/cgrates.json b/data/conf/samples/diamagent_mysql_gobbirpc/cgrates.json index e38008e3a..4ddf6336f 100644 --- a/data/conf/samples/diamagent_mysql_gobbirpc/cgrates.json +++ b/data/conf/samples/diamagent_mysql_gobbirpc/cgrates.json @@ -13,6 +13,7 @@ "rpc_json": ":2012", // RPC JSON listening address "rpc_gob": ":2013", // RPC GOB listening address "http": ":2080", // HTTP listening address + "birpc_gob": "127.0.0.1:2015", }, "data_db": { // database used to store runtime data (eg: accounts, cdr stats) @@ -55,7 +56,6 @@ "sessions": { "enabled": true, - "listen_bigob": "127.0.0.1:2015", "attributes_conns": ["*localhost"], "chargers_conns": ["*localhost"], "rals_conns": ["*localhost"], diff --git a/data/conf/samples/dispatchers/all/cgrates.json b/data/conf/samples/dispatchers/all/cgrates.json index ac00409f4..4dccd25bf 100644 --- a/data/conf/samples/dispatchers/all/cgrates.json +++ b/data/conf/samples/dispatchers/all/cgrates.json @@ -9,7 +9,8 @@ "listen": { "rpc_json": ":6012", "rpc_gob": ":6013", - "http": ":6080" + "http": ":6080", + "birpc_json": ":6014", }, "data_db": { @@ -80,7 +81,6 @@ "sessions": { "enabled": true, - "listen_bijson": ":6014", "routes_conns": ["*internal"], "resources_conns": ["*internal"], "attributes_conns": ["*internal"], diff --git a/data/conf/samples/dispatchers/all2/cgrates.json b/data/conf/samples/dispatchers/all2/cgrates.json index 1a3484ff5..0bde01350 100644 --- a/data/conf/samples/dispatchers/all2/cgrates.json +++ b/data/conf/samples/dispatchers/all2/cgrates.json @@ -8,7 +8,8 @@ "listen": { "rpc_json": ":7012", "rpc_gob": ":7013", - "http": ":7080" + "http": ":7080", + "birpc_json": ":7014", }, "data_db": { @@ -74,7 +75,6 @@ "sessions": { "enabled": true, - "listen_bijson": ":7014", "routes_conns": ["*internal"], "resources_conns": ["*internal"], "attributes_conns": ["*internal"], diff --git a/data/conf/samples/dispatchers/all2_mongo/cgrates.json b/data/conf/samples/dispatchers/all2_mongo/cgrates.json index 50275f8fd..282a1c9ce 100644 --- a/data/conf/samples/dispatchers/all2_mongo/cgrates.json +++ b/data/conf/samples/dispatchers/all2_mongo/cgrates.json @@ -8,7 +8,8 @@ "listen": { "rpc_json": ":7012", "rpc_gob": ":7013", - "http": ":7080" + "http": ":7080", + "birpc_json": ":7014", }, "data_db": { @@ -78,7 +79,6 @@ "sessions": { "enabled": true, - "listen_bijson": ":7014", "routes_conns": ["*internal"], "resources_conns": ["*internal"], "attributes_conns": ["*internal"], diff --git a/data/conf/samples/dispatchers/all2_mysql/cgrates.json b/data/conf/samples/dispatchers/all2_mysql/cgrates.json index ac30b0e9d..70338bdf1 100644 --- a/data/conf/samples/dispatchers/all2_mysql/cgrates.json +++ b/data/conf/samples/dispatchers/all2_mysql/cgrates.json @@ -9,7 +9,8 @@ "listen": { "rpc_json": ":7012", "rpc_gob": ":7013", - "http": ":7080" + "http": ":7080", + "birpc_json": ":7014", }, "data_db": { @@ -76,7 +77,6 @@ "sessions": { "enabled": true, - "listen_bijson": ":7014", "routes_conns": ["*internal"], "resources_conns": ["*internal"], "attributes_conns": ["*internal"], diff --git a/data/conf/samples/dispatchers/all_mongo/cgrates.json b/data/conf/samples/dispatchers/all_mongo/cgrates.json index c287dd7be..d1bc448e2 100644 --- a/data/conf/samples/dispatchers/all_mongo/cgrates.json +++ b/data/conf/samples/dispatchers/all_mongo/cgrates.json @@ -8,7 +8,8 @@ "listen": { "rpc_json": ":6012", "rpc_gob": ":6013", - "http": ":6080" + "http": ":6080", + "birpc_json": ":6014", }, "data_db": { @@ -98,7 +99,6 @@ "sessions": { "enabled": true, - "listen_bijson": ":6014", "routes_conns": ["*internal"], "resources_conns": ["*internal"], "attributes_conns": ["*internal"], diff --git a/data/conf/samples/dispatchers/all_mysql/cgrates.json b/data/conf/samples/dispatchers/all_mysql/cgrates.json index 09deee7d6..f7020df0b 100644 --- a/data/conf/samples/dispatchers/all_mysql/cgrates.json +++ b/data/conf/samples/dispatchers/all_mysql/cgrates.json @@ -9,7 +9,8 @@ "listen": { "rpc_json": ":6012", "rpc_gob": ":6013", - "http": ":6080" + "http": ":6080", + "birpc_json": ":6014", }, "data_db": { @@ -98,7 +99,6 @@ "sessions": { "enabled": true, - "listen_bijson": ":6014", "routes_conns": ["*internal"], "resources_conns": ["*internal"], "attributes_conns": ["*internal"], diff --git a/data/conf/samples/dispatchers/dispatchers_internal/cgrates.json b/data/conf/samples/dispatchers/dispatchers_internal/cgrates.json index 7baa8bb2e..feefd80f8 100644 --- a/data/conf/samples/dispatchers/dispatchers_internal/cgrates.json +++ b/data/conf/samples/dispatchers/dispatchers_internal/cgrates.json @@ -11,6 +11,7 @@ "rpc_json": ":2012", "rpc_gob": ":2013", "http": ":2080", + "birpc_json": ":3014", }, @@ -55,7 +56,6 @@ "rals_conns": ["*localhost"], "resources_conns": ["*localhost"], "chargers_conns": ["*localhost"], - "listen_bijson": ":3014", }, diff --git a/data/conf/samples/dispatchers/dispatchers_internal_gob/cgrates.json b/data/conf/samples/dispatchers/dispatchers_internal_gob/cgrates.json index ee4f7d1bf..da8a93937 100644 --- a/data/conf/samples/dispatchers/dispatchers_internal_gob/cgrates.json +++ b/data/conf/samples/dispatchers/dispatchers_internal_gob/cgrates.json @@ -14,9 +14,10 @@ "listen": { - "rpc_json": ":2012", - "rpc_gob": ":2013", + "rpc_json": ":2012", + "rpc_gob": ":2013", "http": ":2080", + "birpc_json": ":3014", }, @@ -65,7 +66,6 @@ "rals_conns": ["conn1"], "resources_conns": ["conn1"], "chargers_conns": ["conn1"], - "listen_bijson": ":3014", }, diff --git a/data/conf/samples/dispatchers/dispatchers_mongo/cgrates.json b/data/conf/samples/dispatchers/dispatchers_mongo/cgrates.json index 16653f3ee..278b59295 100644 --- a/data/conf/samples/dispatchers/dispatchers_mongo/cgrates.json +++ b/data/conf/samples/dispatchers/dispatchers_mongo/cgrates.json @@ -17,6 +17,7 @@ "rpc_json": ":2012", "rpc_gob": ":2013", "http": ":2080", + "birpc_json": ":3014", }, "data_db": { @@ -62,7 +63,6 @@ "rals_conns": ["*localhost"], "resources_conns": ["*localhost"], "chargers_conns": ["*localhost"], - "listen_bijson": ":3014", }, diff --git a/data/conf/samples/dispatchers/dispatchers_mongo_gob/cgrates.json b/data/conf/samples/dispatchers/dispatchers_mongo_gob/cgrates.json index 2ad2a0eda..475038a71 100644 --- a/data/conf/samples/dispatchers/dispatchers_mongo_gob/cgrates.json +++ b/data/conf/samples/dispatchers/dispatchers_mongo_gob/cgrates.json @@ -17,6 +17,7 @@ "rpc_json": ":2012", "rpc_gob": ":2013", "http": ":2080", + "birpc_json": ":3014", }, "data_db": { @@ -69,7 +70,6 @@ "rals_conns": ["conn1"], "resources_conns": ["conn1"], "chargers_conns": ["conn1"], - "listen_bijson": ":3014", }, diff --git a/data/conf/samples/dispatchers/dispatchers_mysql/cgrates.json b/data/conf/samples/dispatchers/dispatchers_mysql/cgrates.json index ae2dc2d53..36b4e51b4 100644 --- a/data/conf/samples/dispatchers/dispatchers_mysql/cgrates.json +++ b/data/conf/samples/dispatchers/dispatchers_mysql/cgrates.json @@ -9,7 +9,8 @@ "listen": { "rpc_json": ":2012", "rpc_gob": ":2013", - "http": ":2080" + "http": ":2080", + "birpc_json": ":3014" }, "stor_db": { @@ -44,7 +45,6 @@ "rals_conns": ["*localhost"], "resources_conns": ["*localhost"], "chargers_conns": ["*localhost"], - "listen_bijson": ":3014" }, "dispatchers":{ diff --git a/data/conf/samples/dispatchers/dispatchers_mysql_gob/cgrates.json b/data/conf/samples/dispatchers/dispatchers_mysql_gob/cgrates.json index 39d750bc0..8cfd29bc2 100644 --- a/data/conf/samples/dispatchers/dispatchers_mysql_gob/cgrates.json +++ b/data/conf/samples/dispatchers/dispatchers_mysql_gob/cgrates.json @@ -14,9 +14,10 @@ "listen": { - "rpc_json": ":2012", - "rpc_gob": ":2013", + "rpc_json": ":2012", + "rpc_gob": ":2013", "http": ":2080", + "birpc_json": ":3014", }, @@ -67,7 +68,6 @@ "rals_conns": ["conn1"], "resources_conns": ["conn1"], "chargers_conns": ["conn1"], - "listen_bijson": ":3014", }, diff --git a/data/conf/samples/dispatchers/dispatchers_no_attributes/cgrates.json b/data/conf/samples/dispatchers/dispatchers_no_attributes/cgrates.json index 77b625873..848668af4 100644 --- a/data/conf/samples/dispatchers/dispatchers_no_attributes/cgrates.json +++ b/data/conf/samples/dispatchers/dispatchers_no_attributes/cgrates.json @@ -17,6 +17,7 @@ "rpc_json": ":2012", "rpc_gob": ":2013", "http": ":2080", + "birpc_json": ":3014", }, "stor_db": { @@ -39,7 +40,6 @@ "sessions": { "enabled": true, - "listen_bijson": ":3014", }, "dispatchers":{ diff --git a/data/conf/samples/dispatchers/trd_rnk2_mongo/cgrates.json b/data/conf/samples/dispatchers/trd_rnk2_mongo/cgrates.json index 35f5f2607..f91144e25 100644 --- a/data/conf/samples/dispatchers/trd_rnk2_mongo/cgrates.json +++ b/data/conf/samples/dispatchers/trd_rnk2_mongo/cgrates.json @@ -1,48 +1,46 @@ { + "general": { + "node_id": "ALL2", + "log_level": 7 + }, -"general": { - "node_id": "ALL2", - "log_level": 7 -}, + "listen": { + "rpc_json": ":7012", + "rpc_gob": ":7013", + "http": ":7080", + "birpc_json": ":7014" + }, -"listen": { - "rpc_json": ":7012", - "rpc_gob": ":7013", - "http": ":7080" -}, + "data_db": { + "db_type": "mongo", + "db_name": "12", + "db_port": 27017 + }, -"data_db": { - "db_type": "mongo", - "db_name": "12", - "db_port": 27017 -}, + "stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017, + "db_password": "" + }, -"stor_db": { - "db_type": "mongo", - "db_name": "cgrates", - "db_port": 27017, - "db_password": "" -}, + "trends": { + "enabled": true, + "stats_conns": ["*internal"], + "store_interval": "-1" + }, + "rankings": { + "enabled": true, + "stats_conns": ["*internal"], + "store_interval": "-1" + }, -"trends": { - "enabled": true, - "stats_conns":["*internal"], - "store_interval": "-1" -}, - -"rankings": { - "enabled": true, - "stats_conns":["*internal"], - "store_interval": "-1" -}, - -"stats": { - "enabled": true -}, - -"apiers": { - "enabled": true -} + "stats": { + "enabled": true + }, + "apiers": { + "enabled": true + } } diff --git a/data/conf/samples/dispatchers/trd_rnk2_mysql/cgrates.json b/data/conf/samples/dispatchers/trd_rnk2_mysql/cgrates.json index 4ac6daeed..7a76e18f9 100644 --- a/data/conf/samples/dispatchers/trd_rnk2_mysql/cgrates.json +++ b/data/conf/samples/dispatchers/trd_rnk2_mysql/cgrates.json @@ -1,44 +1,43 @@ { + "general": { + "node_id": "ALL2", + "log_level": 7 + }, -"general": { - "node_id": "ALL2", - "log_level": 7 -}, + "listen": { + "rpc_json": ":7012", + "rpc_gob": ":7013", + "http": ":7080", + "birpc_json": ":7014" + }, + "data_db": { + "db_type": "redis", + "db_port": 6379, + "db_name": "12" + }, -"listen": { - "rpc_json": ":7012", - "rpc_gob": ":7013", - "http": ":7080" -}, + "stor_db": { + "db_type": "*internal" + }, -"data_db": { - "db_type": "redis", - "db_port": 6379, - "db_name": "12" -}, + "trends": { + "enabled": true, + "stats_conns": ["*internal"], + "store_interval": "-1" + }, -"stor_db": { - "db_type":"*internal" -}, + "rankings": { + "enabled": true, + "stats_conns": ["*internal"], + "store_interval": "-1" + }, -"trends": { - "enabled": true, - "stats_conns":["*internal"], - "store_interval": "-1" -}, + "stats": { + "enabled": true + }, -"rankings": { - "enabled": true, - "stats_conns":["*internal"], - "store_interval": "-1" -}, - -"stats": { - "enabled": true -}, - -"apiers": { - "enabled": true -} + "apiers": { + "enabled": true + } } diff --git a/data/conf/samples/dispatchers/trd_rnk_mongo/cgrates.json b/data/conf/samples/dispatchers/trd_rnk_mongo/cgrates.json index ae3d65818..b3f2d543c 100644 --- a/data/conf/samples/dispatchers/trd_rnk_mongo/cgrates.json +++ b/data/conf/samples/dispatchers/trd_rnk_mongo/cgrates.json @@ -1,47 +1,46 @@ { + "general": { + "node_id": "ALL", + "log_level": 7 + }, -"general": { - "node_id": "ALL", - "log_level": 7 -}, + "listen": { + "rpc_json": ":6012", + "rpc_gob": ":6013", + "http": ":6080", + "birpc_json": ":6014" + }, -"listen": { - "rpc_json": ":6012", - "rpc_gob": ":6013", - "http": ":6080" -}, + "data_db": { + "db_type": "mongo", + "db_name": "11", + "db_port": 27017 + }, -"data_db": { - "db_type": "mongo", - "db_name": "11", - "db_port": 27017 -}, + "stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017, + "db_password": "" + }, -"stor_db": { - "db_type": "mongo", - "db_name": "cgrates", - "db_port": 27017, - "db_password": "" -}, + "trends": { + "enabled": true, + "stats_conns": ["*internal"], + "store_interval": "-1" + }, -"trends": { - "enabled": true, - "stats_conns":["*internal"], - "store_interval": "-1" -}, + "rankings": { + "enabled": true, + "stats_conns": ["*internal"], + "store_interval": "-1" + }, -"rankings": { - "enabled": true, - "stats_conns":["*internal"], - "store_interval": "-1" -}, - -"stats": { - "enabled": true -}, - -"apiers": { - "enabled": true -} + "stats": { + "enabled": true + }, + "apiers": { + "enabled": true + } } diff --git a/data/conf/samples/dispatchers/trd_rnk_mysql/cgrates.json b/data/conf/samples/dispatchers/trd_rnk_mysql/cgrates.json index 482f5ef1f..50a3f5703 100644 --- a/data/conf/samples/dispatchers/trd_rnk_mysql/cgrates.json +++ b/data/conf/samples/dispatchers/trd_rnk_mysql/cgrates.json @@ -1,45 +1,43 @@ { + "general": { + "node_id": "ALL", + "log_level": 7 + }, -"general": { - "node_id": "ALL", - "log_level": 7 -}, + "listen": { + "rpc_json": ":6012", + "rpc_gob": ":6013", + "http": ":6080", + "birpc_json": ":6014" + }, + "data_db": { + "db_type": "redis", + "db_port": 6379, + "db_name": "11" + }, -"listen": { - "rpc_json": ":6012", - "rpc_gob": ":6013", - "http": ":6080" -}, + "stor_db": { + "db_password": "CGRateS.org" + }, -"data_db": { - "db_type": "redis", - "db_port": 6379, - "db_name": "11" -}, + "trends": { + "enabled": true, + "stats_conns": ["*internal"], + "store_interval": "-1" + }, -"stor_db": { - "db_password": "CGRateS.org" -}, + "rankings": { + "enabled": true, + "stats_conns": ["*internal"], + "store_interval": "-1" + }, -"trends": { - "enabled": true, - "stats_conns":["*internal"], - "store_interval": "-1" -}, - -"rankings": { - "enabled": true, - "stats_conns":["*internal"], - "store_interval": "-1" -}, - -"stats": { - "enabled": true -}, - -"apiers": { - "enabled": true -} + "stats": { + "enabled": true + }, + "apiers": { + "enabled": true + } } diff --git a/data/conf/samples/docker/cgrates.json b/data/conf/samples/docker/cgrates.json index 3faebe5ce..e9ee5f8ce 100644 --- a/data/conf/samples/docker/cgrates.json +++ b/data/conf/samples/docker/cgrates.json @@ -16,6 +16,7 @@ "rpc_json_tls" : "*env:DOCKER_IP:2022", // RPC JSON TLS listening address "rpc_gob_tls": "*env:DOCKER_IP:2023", // RPC GOB TLS listening address "http_tls": "*env:DOCKER_IP:2280", // HTTP TLS listening address + "birpc_json": "*env:DOCKER_IP:2014", }, "rpc_conns": { @@ -100,7 +101,6 @@ "sessions": { "enabled": true, - "listen_bijson": "*env:DOCKER_IP:2014", "routes_conns": ["*internal"], "resources_conns": ["*internal"], "attributes_conns": ["*internal"], diff --git a/data/conf/samples/fraud_internal/cgrates.json b/data/conf/samples/fraud_internal/cgrates.json index 6e85ff7b3..98b85d517 100644 --- a/data/conf/samples/fraud_internal/cgrates.json +++ b/data/conf/samples/fraud_internal/cgrates.json @@ -8,7 +8,8 @@ "listen": { "rpc_json": ":2012", "rpc_gob": ":2013", - "http": ":2080" + "http": ":2080", + "birpc_json": "127.0.0.1:2014", }, "data_db": { @@ -53,7 +54,6 @@ "sessions": { "enabled": true, - "listen_bijson": "127.0.0.1:2014", "cdrs_conns": ["*internal"], "stats_conns": ["*internal"], "chargers_conns": ["*internal"], diff --git a/data/conf/samples/fraud_mongo/cgrates.json b/data/conf/samples/fraud_mongo/cgrates.json index c25770ce9..a09994c2d 100644 --- a/data/conf/samples/fraud_mongo/cgrates.json +++ b/data/conf/samples/fraud_mongo/cgrates.json @@ -9,7 +9,8 @@ "listen": { "rpc_json": ":2012", "rpc_gob": ":2013", - "http": ":2080" + "http": ":2080", + "birpc_json": "127.0.0.1:2014", }, @@ -64,7 +65,6 @@ "sessions": { "enabled": true, - "listen_bijson": "127.0.0.1:2014", "cdrs_conns": ["*internal"], "stats_conns": ["*internal"], "chargers_conns": ["*internal"], diff --git a/data/conf/samples/fraud_mysql/cgrates.json b/data/conf/samples/fraud_mysql/cgrates.json index a555186bb..dcf9d5b3a 100644 --- a/data/conf/samples/fraud_mysql/cgrates.json +++ b/data/conf/samples/fraud_mysql/cgrates.json @@ -9,7 +9,8 @@ "listen": { "rpc_json": ":2012", "rpc_gob": ":2013", - "http": ":2080" + "http": ":2080", + "birpc_json": "127.0.0.1:2014", }, "data_db": { @@ -56,7 +57,6 @@ "sessions": { "enabled": true, - "listen_bijson": "127.0.0.1:2014", "cdrs_conns": ["*internal"], "stats_conns": ["*internal"], "chargers_conns": ["*internal"], diff --git a/data/conf/samples/full_remote/remote/cgrates.json b/data/conf/samples/full_remote/remote/cgrates.json index ef0d618e1..e2ce94588 100644 --- a/data/conf/samples/full_remote/remote/cgrates.json +++ b/data/conf/samples/full_remote/remote/cgrates.json @@ -1,42 +1,36 @@ { + "general": { + "log_level": 7, + "node_id": "EngineRedis" + }, -"general": { - "log_level": 7, - "node_id": "EngineRedis" -}, + "listen": { + "rpc_json": ":2022", + "rpc_gob": ":2023", + "http": ":2280", + "birpc_json": ":2024" + }, + "data_db": { + "db_type": "redis", + "db_port": 6379, + "db_name": "10" + }, -"listen": { - "rpc_json": ":2022", - "rpc_gob": ":2023", - "http": ":2280", -}, + "stor_db": { + "db_password": "CGRateS.org" + }, -"data_db": { - "db_type": "redis", - "db_port": 6379, - "db_name": "10", -}, - -"stor_db": { - "db_password": "CGRateS.org", -}, - - -"rals": { - "enabled": true, -}, - - -"schedulers": { - "enabled": true, -}, - - -"apiers": { - "enabled": true, - "scheduler_conns": ["*internal"], -}, + "rals": { + "enabled": true + }, + "schedulers": { + "enabled": true + }, + "apiers": { + "enabled": true, + "scheduler_conns": ["*internal"] + } } diff --git a/data/conf/samples/gocs/au_site/cgrates.json b/data/conf/samples/gocs/au_site/cgrates.json index 0439c1eb0..291827b23 100644 --- a/data/conf/samples/gocs/au_site/cgrates.json +++ b/data/conf/samples/gocs/au_site/cgrates.json @@ -1,95 +1,90 @@ { - "general": { "log_level": 7, - "node_id": "AU_SITE", + "node_id": "AU_SITE" }, "listen": { "rpc_json": ":3012", "rpc_gob": ":3013", "http": ":3080", + "birpc_json": ":3014" }, - "rpc_conns": { "conn1": { "strategy": "*first", - "conns": [{"address": "127.0.0.1:3012", "transport":"*json"}], + "conns": [{ "address": "127.0.0.1:3012", "transport": "*json" }] }, "rmtConn": { "strategy": "*first", - "conns": [{"address": "127.0.0.1:4013", "transport":"*gob"}], + "conns": [{ "address": "127.0.0.1:4013", "transport": "*gob" }] }, "*internal": { "strategy": "*first", - "conns": [{"address": "*internal"}], + "conns": [{ "address": "*internal" }] } }, - "data_db": { "db_type": "*internal", "remote_conns": ["rmtConn"], - "items":{ - "*accounts":{"remote":true}, - "*reverse_destinations": {"remote":true}, - "*destinations": {"remote":true}, - "*rating_plans": {"remote":true}, - "*rating_profiles":{"remote":true}, - "*actions":{"remote":true}, - "*action_plans": {"remote":true}, - "*account_action_plans":{"remote":true}, - "*action_triggers":{"remote":true}, - "*shared_groups":{"remote":true}, - "*timings": {"remote":true}, - "*filters": {"remote":true}, - "*route_profiles":{"remote":true}, - "*attribute_profiles":{"remote":true}, - "*charger_profiles": {"remote":true}, - "*dispatcher_profiles":{"remote":true}, - "*dispatcher_hosts":{"remote":true}, - "*load_ids":{"remote":true}, - "*resource_filter_indexes" : {"remote":true}, - "*stat_filter_indexes" : {"remote":true}, - "*threshold_filter_indexes" : {"remote":true}, - "*route_filter_indexes" : {"remote":true}, - "*attribute_filter_indexes" : {"remote":true}, - "*charger_filter_indexes" : {"remote":true}, - "*dispatcher_filter_indexes" : {"remote":true}, - "*reverse_filter_indexes" : {"remote":true}, + "items": { + "*accounts": { "remote": true }, + "*reverse_destinations": { "remote": true }, + "*destinations": { "remote": true }, + "*rating_plans": { "remote": true }, + "*rating_profiles": { "remote": true }, + "*actions": { "remote": true }, + "*action_plans": { "remote": true }, + "*account_action_plans": { "remote": true }, + "*action_triggers": { "remote": true }, + "*shared_groups": { "remote": true }, + "*timings": { "remote": true }, + "*filters": { "remote": true }, + "*route_profiles": { "remote": true }, + "*attribute_profiles": { "remote": true }, + "*charger_profiles": { "remote": true }, + "*dispatcher_profiles": { "remote": true }, + "*dispatcher_hosts": { "remote": true }, + "*load_ids": { "remote": true }, + "*resource_filter_indexes": { "remote": true }, + "*stat_filter_indexes": { "remote": true }, + "*threshold_filter_indexes": { "remote": true }, + "*route_filter_indexes": { "remote": true }, + "*attribute_filter_indexes": { "remote": true }, + "*charger_filter_indexes": { "remote": true }, + "*dispatcher_filter_indexes": { "remote": true }, + "*reverse_filter_indexes": { "remote": true } } }, "stor_db": { - "db_password": "CGRateS.org", + "db_password": "CGRateS.org" }, - "rals": { "enabled": true, - "max_increments":3000000, + "max_increments": 3000000 }, - "schedulers": { - "enabled": true, + "enabled": true }, - "chargers": { - "enabled": true, + "enabled": true }, "sessions": { "enabled": true, "rals_conns": ["*internal"], - "chargers_conns": ["*internal"], + "chargers_conns": ["*internal"] }, "apiers": { "enabled": true, - "caches_conns":["conn1"], - "scheduler_conns": ["conn1"], + "caches_conns": ["conn1"], + "scheduler_conns": ["conn1"] } } diff --git a/data/conf/samples/gocs/us_site/cgrates.json b/data/conf/samples/gocs/us_site/cgrates.json index b53d9dd09..66b980a8b 100644 --- a/data/conf/samples/gocs/us_site/cgrates.json +++ b/data/conf/samples/gocs/us_site/cgrates.json @@ -9,6 +9,7 @@ "rpc_json": ":4012", "rpc_gob": ":4013", "http": ":4080", + "birpc_json": ":4014", }, "rpc_conns": { @@ -98,7 +99,6 @@ "sessions": { "enabled": true, - "listen_bijson": ":4014", "rals_conns": ["*internal"], "cdrs_conns": ["*internal"], "chargers_conns": ["*internal"], diff --git a/data/conf/samples/internal_broadcast_replication/cgrates.json b/data/conf/samples/internal_broadcast_replication/cgrates.json index 69ffcde84..db0f50f5f 100644 --- a/data/conf/samples/internal_broadcast_replication/cgrates.json +++ b/data/conf/samples/internal_broadcast_replication/cgrates.json @@ -23,6 +23,7 @@ "rpc_json": ":3012", "rpc_gob": ":3013", "http": ":3080", + "birpc_json": "127.0.0.1:3014", // address where to listen for bidirectional JSON-RPC requests }, @@ -95,7 +96,6 @@ "sessions": { "enabled": true, - "listen_bijson": "127.0.0.1:3014", // address where to listen for bidirectional JSON-RPC requests "routes_conns": ["broadcast_conn"], "resources_conns": ["broadcast_conn"], "attributes_conns": ["broadcast_conn"], diff --git a/data/conf/samples/loaders_indexes_internal_db/cgrates.json b/data/conf/samples/loaders_indexes_internal_db/cgrates.json index 6c2aebc76..e95010d72 100644 --- a/data/conf/samples/loaders_indexes_internal_db/cgrates.json +++ b/data/conf/samples/loaders_indexes_internal_db/cgrates.json @@ -1,79 +1,81 @@ { -"general": { - "node_id" : "IntenalLoaders", + "general": { + "node_id": "IntenalLoaders", "log_level": 7 -}, + }, -"listen": { + "listen": { "rpc_json": ":2022", "rpc_gob": ":2023", - "http": ":2280" -}, + "http": ":2280", + "birpc_json": ":2024" + }, -"rpc_conns": { + "rpc_conns": { "engine": { - "strategy": "*first", - "conns": [{"address": "127.0.0.1:2013", "transport":"*gob"}] + "strategy": "*first", + "conns": [{ "address": "127.0.0.1:2013", "transport": "*gob" }] } -}, + }, -"data_db": { + "data_db": { "db_type": "*internal", "remote_conns": ["engine"], "replication_conns": ["engine"], - "items":{ - "*accounts": {"remote":true, "replicate":true}, - "*reverse_destinations": {"remote":true, "replicate":true}, - "*destinations": {"remote":true, "replicate":true}, - "*rating_plans": {"remote":true, "replicate":true}, - "*rating_profiles": {"remote":true, "replicate":true}, - "*actions": {"remote":true, "replicate":true}, - "*action_plans": {"remote":true, "replicate":true}, - "*account_action_plans": {"remote":true, "replicate":true}, - "*action_triggers": {"remote":true, "replicate":true}, - "*shared_groups": {"remote":true, "replicate":true}, - "*timings": {"remote":true, "replicate":true}, - "*resource_profiles": {"remote":true, "replicate":true}, - "*resources": {"remote":true, "replicate":true}, - "*statqueue_profiles": {"remote":true, "replicate":true}, - "*statqueues": {"remote":true, "replicate":true}, - "*threshold_profiles": {"remote":true, "replicate":true}, - "*thresholds": {"remote":true, "replicate":true}, - "*filters": {"remote":true, "replicate":true}, - "*route_profiles": {"remote":true, "replicate":true}, - "*attribute_profiles": {"remote":true, "replicate":true}, - "*charger_profiles": {"remote":true, "replicate":true}, - "*dispatcher_profiles": {"remote":true, "replicate":true}, - "*dispatcher_hosts": {"remote":true, "replicate":true}, - "*load_ids": {"remote":true, "replicate":true}, - "*versions": {"remote":true, "replicate":true}, - // no remote for indexes - "*resource_filter_indexes" : {"replicate":true}, - "*stat_filter_indexes" : {"replicate":true}, - "*threshold_filter_indexes" : {"replicate":true}, - "*route_filter_indexes" : {"replicate":true}, - "*attribute_filter_indexes" : {"replicate":true}, - "*charger_filter_indexes" : {"replicate":true}, - "*dispatcher_filter_indexes" : {"replicate":true}, - "*reverse_filter_indexes" : {"replicate":true} + "items": { + "*accounts": { "remote": true, "replicate": true }, + "*reverse_destinations": { "remote": true, "replicate": true }, + "*destinations": { "remote": true, "replicate": true }, + "*rating_plans": { "remote": true, "replicate": true }, + "*rating_profiles": { "remote": true, "replicate": true }, + "*actions": { "remote": true, "replicate": true }, + "*action_plans": { "remote": true, "replicate": true }, + "*account_action_plans": { "remote": true, "replicate": true }, + "*action_triggers": { "remote": true, "replicate": true }, + "*shared_groups": { "remote": true, "replicate": true }, + "*timings": { "remote": true, "replicate": true }, + "*resource_profiles": { "remote": true, "replicate": true }, + "*resources": { "remote": true, "replicate": true }, + "*statqueue_profiles": { "remote": true, "replicate": true }, + "*statqueues": { "remote": true, "replicate": true }, + "*threshold_profiles": { "remote": true, "replicate": true }, + "*thresholds": { "remote": true, "replicate": true }, + "*filters": { "remote": true, "replicate": true }, + "*route_profiles": { "remote": true, "replicate": true }, + "*attribute_profiles": { "remote": true, "replicate": true }, + "*charger_profiles": { "remote": true, "replicate": true }, + "*dispatcher_profiles": { "remote": true, "replicate": true }, + "*dispatcher_hosts": { "remote": true, "replicate": true }, + "*load_ids": { "remote": true, "replicate": true }, + "*versions": { "remote": true, "replicate": true }, + // no remote for indexes + "*resource_filter_indexes": { "replicate": true }, + "*stat_filter_indexes": { "replicate": true }, + "*threshold_filter_indexes": { "replicate": true }, + "*route_filter_indexes": { "replicate": true }, + "*attribute_filter_indexes": { "replicate": true }, + "*charger_filter_indexes": { "replicate": true }, + "*dispatcher_filter_indexes": { "replicate": true }, + "*reverse_filter_indexes": { "replicate": true } } -}, + }, -"stor_db": { + "stor_db": { "db_type": "*internal" -}, + }, -"loaders": [{ - "id": "*default", - "enabled": true, - "caches_conns": ["engine"], - "tp_in_dir": "/usr/share/cgrates/tariffplans/tutorial/", - "tp_out_dir": "" -}], + "loaders": [ + { + "id": "*default", + "enabled": true, + "caches_conns": ["engine"], + "tp_in_dir": "/usr/share/cgrates/tariffplans/tutorial/", + "tp_out_dir": "" + } + ], -"apiers": { + "apiers": { "enabled": true, - "caches_conns":["engine"] + "caches_conns": ["engine"] + } } - -} \ No newline at end of file diff --git a/data/conf/samples/multiral2_internal/cgrates.json b/data/conf/samples/multiral2_internal/cgrates.json index 185c0b563..96cf439ba 100644 --- a/data/conf/samples/multiral2_internal/cgrates.json +++ b/data/conf/samples/multiral2_internal/cgrates.json @@ -1,42 +1,41 @@ { -// CGRateS Configuration file -// -// Used for multiple RAL configuration tests -// Starts RAL + // CGRateS Configuration file + // + // Used for multiple RAL configuration tests + // Starts RAL -"general": { - "node_id":"node2", -}, + "general": { + "node_id": "node2" + }, -"listen": { - "rpc_json": ":12012", - "rpc_gob": ":12013", - "http": ":12080", -}, + "listen": { + "rpc_json": ":12012", + "rpc_gob": ":12013", + "http": ":12080", + "birpc_json": ":12014" + }, -"data_db": { - "db_type": "*internal", -}, + "data_db": { + "db_type": "*internal" + }, + "stor_db": { + "db_type": "*internal" + }, -"stor_db": { - "db_type": "*internal", -}, + "rals": { + "enabled": true + }, -"rals": { - "enabled": true, -}, + "cdrs": { + "enabled": true + }, -"cdrs": { - "enabled": true, -}, - -"chargers": { - "enabled": true, -}, - -"sessions": { - "enabled": true, -}, + "chargers": { + "enabled": true + }, + "sessions": { + "enabled": true + } } diff --git a/data/conf/samples/multiral2_mongo/cgrates.json b/data/conf/samples/multiral2_mongo/cgrates.json index 3a3f75a6e..2da6f2cac 100644 --- a/data/conf/samples/multiral2_mongo/cgrates.json +++ b/data/conf/samples/multiral2_mongo/cgrates.json @@ -1,46 +1,46 @@ { -// CGRateS Configuration file -// -// Used for multiple RAL configuration tests -// Starts RAL + // CGRateS Configuration file + // + // Used for multiple RAL configuration tests + // Starts RAL -"general": { - "node_id":"node2", -}, + "general": { + "node_id": "node2" + }, -"listen": { - "rpc_json": ":12012", - "rpc_gob": ":12013", - "http": ":12080", -}, + "listen": { + "rpc_json": ":12012", + "rpc_gob": ":12013", + "http": ":12080", + "birpc_json": ":12014" + }, -"data_db": { - "db_type": "mongo", - "db_name": "10", - "db_port": 27017, -}, + "data_db": { + "db_type": "mongo", + "db_name": "10", + "db_port": 27017 + }, -"stor_db": { - "db_type": "mongo", - "db_name": "cgrates", - "db_port": 27017, - "db_password": "", -}, + "stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017, + "db_password": "" + }, -"rals": { - "enabled": true, -}, + "rals": { + "enabled": true + }, -"cdrs": { - "enabled": true, -}, + "cdrs": { + "enabled": true + }, -"chargers": { - "enabled": true, -}, - -"sessions": { - "enabled": true, -}, + "chargers": { + "enabled": true + }, + "sessions": { + "enabled": true + } } diff --git a/data/conf/samples/multiral2_mysql/cgrates.json b/data/conf/samples/multiral2_mysql/cgrates.json index cf97f7f95..df9c89b87 100644 --- a/data/conf/samples/multiral2_mysql/cgrates.json +++ b/data/conf/samples/multiral2_mysql/cgrates.json @@ -1,43 +1,44 @@ { -// CGRateS Configuration file -// -// Used for multiple RAL configuration tests -// Starts RAL + // CGRateS Configuration file + // + // Used for multiple RAL configuration tests + // Starts RAL -"general": { - "node_id":"node2", -}, + "general": { + "node_id": "node2" + }, -"listen": { - "rpc_json": ":12012", - "rpc_gob": ":12013", - "http": ":12080", -}, + "listen": { + "rpc_json": ":12012", + "rpc_gob": ":12013", + "http": ":12080", + "birpc_json": ":12014" + }, -"data_db": { - "db_type": "redis", - "db_port": 6379, - "db_name": "10", -}, + "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 -}, + "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, -}, + "rals": { + "enabled": true + }, -"cdrs": { - "enabled": true, -}, + "cdrs": { + "enabled": true + }, -"chargers": { - "enabled": true, -}, - -"sessions": { - "enabled": true, -}, + "chargers": { + "enabled": true + }, + "sessions": { + "enabled": true + } } diff --git a/data/conf/samples/registrarc/registrarc_rpc_mongo/cgrates.json b/data/conf/samples/registrarc/registrarc_rpc_mongo/cgrates.json index 279896735..33bfe072c 100644 --- a/data/conf/samples/registrarc/registrarc_rpc_mongo/cgrates.json +++ b/data/conf/samples/registrarc/registrarc_rpc_mongo/cgrates.json @@ -1,146 +1,134 @@ { -// CGRateS Configuration file + // CGRateS Configuration file + "general": { + "log_level": 7, + "reply_timeout": "30s" + }, -"general": { - "log_level": 7, - "reply_timeout": "30s", -}, + "listen": { + "rpc_json": ":3012", + "rpc_gob": ":3013", + "http": ":3080", + "birpc_json": ":3014" + }, + "data_db": { + "db_type": "mongo", + "db_name": "10", + "db_port": 27017 + }, -"listen": { - "rpc_json": ":3012", - "rpc_gob": ":3013", - "http": ":3080", -}, + "stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017, + "db_password": "" + }, + "rpc_conns": { + "regConn": { + "strategy": "*first", + "conns": [ + { + "address": "http://127.0.0.1:2080/registrar", + "transport": "*http_jsonrpc" + } + ] + } + }, -"data_db": { - "db_type": "mongo", - "db_name": "10", - "db_port": 27017, -}, + "rals": { + "enabled": true, + "thresholds_conns": ["*internal"], + "max_increments": 3000000 + }, + "schedulers": { + "enabled": true, + "cdrs_conns": ["*localhost"], + "stats_conns": ["*localhost"] + }, -"stor_db": { - "db_type": "mongo", - "db_name": "cgrates", - "db_port": 27017, - "db_password": "", -}, + "cdrs": { + "enabled": true + }, -"rpc_conns": { - "regConn": { - "strategy": "*first", - "conns": [{"address": "http://127.0.0.1:2080/registrar", "transport":"*http_jsonrpc"}] - } -}, + "chargers": { + "enabled": true, + "attributes_conns": ["*internal"] + }, + "resources": { + "enabled": true, + "store_interval": "1s", + "thresholds_conns": ["*internal"] + }, -"rals": { - "enabled": true, - "thresholds_conns": ["*internal"], - "max_increments":3000000, -}, + "stats": { + "enabled": true, + "store_interval": "1s", + "thresholds_conns": ["*internal"] + }, + "thresholds": { + "enabled": true, + "store_interval": "1s" + }, -"schedulers": { - "enabled": true, - "cdrs_conns": ["*localhost"], - "stats_conns": ["*localhost"], -}, + "routes": { + "enabled": true, + "stats_conns": ["*localhost"], + "resources_conns": ["*localhost"], + "rals_conns": ["*internal"] + }, + "attributes": { + "enabled": true, + "stats_conns": ["*localhost"], + "resources_conns": ["*localhost"], + "apiers_conns": ["*localhost"] + }, -"cdrs": { - "enabled": true, -}, + "sessions": { + "enabled": true, + "rals_conns": ["*internal"], + "cdrs_conns": ["*internal"], + "chargers_conns": ["*internal"] + }, + "migrator": { + "out_datadb_type": "mongo", + "out_datadb_port": "27017", + "out_datadb_name": "10", + "out_stordb_type": "mongo", + "out_stordb_port": "27017", + "out_stordb_name": "cgrates", + "users_filters": ["Account"] + }, -"chargers": { - "enabled": true, - "attributes_conns": ["*internal"], -}, + "apiers": { + "enabled": true, + "scheduler_conns": ["*internal"] + }, + "filters": { + "apiers_conns": ["*internal"] + }, -"resources": { - "enabled": true, - "store_interval": "1s", - "thresholds_conns": ["*internal"] -}, - - -"stats": { - "enabled": true, - "store_interval": "1s", - "thresholds_conns": ["*internal"], -}, - - -"thresholds": { - "enabled": true, - "store_interval": "1s", -}, - - -"routes": { - "enabled": true, - "stats_conns": ["*localhost"], - "resources_conns": ["*localhost"], - "rals_conns": ["*internal"], -}, - - -"attributes": { - "enabled": true, - "stats_conns": ["*localhost"], - "resources_conns": ["*localhost"], - "apiers_conns": ["*localhost"] -}, - - -"sessions": { - "enabled": true, - "rals_conns": ["*internal"], - "cdrs_conns": ["*internal"], - "chargers_conns": ["*internal"], -}, - - -"migrator": { - "out_datadb_type": "mongo", - "out_datadb_port": "27017", - "out_datadb_name": "10", - "out_stordb_type": "mongo", - "out_stordb_port": "27017", - "out_stordb_name": "cgrates", - "users_filters":["Account"], -}, - - -"apiers": { - "enabled": true, - "scheduler_conns": ["*internal"], -}, - - -"filters": { - "apiers_conns": ["*internal"], -}, - -"registrarc":{ - "rpc":{ - "enabled": true, - "registrars_conns": ["regConn"], - "hosts": [ - { - "Tenant": "*default", - "ID":"attributes", - "transport": "*json", - "tls": false - }, - ], - "refresh_interval": "1s", - }, -}, - + "registrarc": { + "rpc": { + "enabled": true, + "registrars_conns": ["regConn"], + "hosts": [ + { + "Tenant": "*default", + "ID": "attributes", + "transport": "*json", + "tls": false + } + ], + "refresh_interval": "1s" + } + } } diff --git a/data/conf/samples/registrarc/registrarc_rpc_mysql/cgrates.json b/data/conf/samples/registrarc/registrarc_rpc_mysql/cgrates.json index 2032a7317..a657d77d4 100644 --- a/data/conf/samples/registrarc/registrarc_rpc_mysql/cgrates.json +++ b/data/conf/samples/registrarc/registrarc_rpc_mysql/cgrates.json @@ -1,141 +1,131 @@ { -// CGRateS Configuration file + // CGRateS Configuration file + "general": { + "log_level": 7, + "reply_timeout": "30s" + }, -"general": { - "log_level": 7, - "reply_timeout": "30s", -}, + "listen": { + "rpc_json": ":3012", + "rpc_gob": ":3013", + "http": ":3080", + "birpc_json": ":3014" + }, + "data_db": { + "db_type": "redis", + "db_port": 6379, + "db_name": "10" + }, -"listen": { - "rpc_json": ":3012", - "rpc_gob": ":3013", - "http": ":3080", -}, + "stor_db": { + "db_password": "CGRateS.org" + }, + "rpc_conns": { + "regConn": { + "strategy": "*first", + "conns": [ + { + "address": "http://127.0.0.1:2080/registrar", + "transport": "*http_jsonrpc" + } + ] + } + }, -"data_db": { - "db_type": "redis", - "db_port": 6379, - "db_name": "10", -}, + "rals": { + "enabled": true, + "thresholds_conns": ["*internal"], + "max_increments": 3000000 + }, -"stor_db": { - "db_password": "CGRateS.org", -}, + "schedulers": { + "enabled": true, + "cdrs_conns": ["*localhost"], + "stats_conns": ["*localhost"] + }, -"rpc_conns": { - "regConn": { - "strategy": "*first", - "conns": [{"address": "http://127.0.0.1:2080/registrar", "transport":"*http_jsonrpc"}] - } -}, + "cdrs": { + "enabled": true + }, + "chargers": { + "enabled": true, + "attributes_conns": ["*internal"] + }, -"rals": { - "enabled": true, - "thresholds_conns": ["*internal"], - "max_increments":3000000, -}, + "resources": { + "enabled": true, + "store_interval": "1s", + "thresholds_conns": ["*internal"] + }, + "stats": { + "enabled": true, + "store_interval": "1s", + "thresholds_conns": ["*internal"] + }, -"schedulers": { - "enabled": true, - "cdrs_conns": ["*localhost"], - "stats_conns": ["*localhost"], -}, + "thresholds": { + "enabled": true, + "store_interval": "1s" + }, + "routes": { + "enabled": true, + "stats_conns": ["*localhost"], + "resources_conns": ["*localhost"], + "rals_conns": ["*internal"] + }, -"cdrs": { - "enabled": true, -}, + "attributes": { + "enabled": true, + "stats_conns": ["*localhost"], + "resources_conns": ["*localhost"], + "apiers_conns": ["*localhost"] + }, + "sessions": { + "enabled": true, + "rals_conns": ["*internal"], + "cdrs_conns": ["*internal"], + "chargers_conns": ["*internal"] + }, -"chargers": { - "enabled": true, - "attributes_conns": ["*internal"], -}, + "migrator": { + "out_datadb_type": "mongo", + "out_datadb_port": "27017", + "out_datadb_name": "10", + "out_stordb_type": "mongo", + "out_stordb_port": "27017", + "out_stordb_name": "cgrates", + "users_filters": ["Account"] + }, + "apiers": { + "enabled": true, + "scheduler_conns": ["*internal"] + }, -"resources": { - "enabled": true, - "store_interval": "1s", - "thresholds_conns": ["*internal"] -}, - - -"stats": { - "enabled": true, - "store_interval": "1s", - "thresholds_conns": ["*internal"], -}, - - -"thresholds": { - "enabled": true, - "store_interval": "1s", -}, - - -"routes": { - "enabled": true, - "stats_conns": ["*localhost"], - "resources_conns": ["*localhost"], - "rals_conns": ["*internal"], -}, - - -"attributes": { - "enabled": true, - "stats_conns": ["*localhost"], - "resources_conns": ["*localhost"], - "apiers_conns": ["*localhost"] -}, - - -"sessions": { - "enabled": true, - "rals_conns": ["*internal"], - "cdrs_conns": ["*internal"], - "chargers_conns": ["*internal"], -}, - - -"migrator": { - "out_datadb_type": "mongo", - "out_datadb_port": "27017", - "out_datadb_name": "10", - "out_stordb_type": "mongo", - "out_stordb_port": "27017", - "out_stordb_name": "cgrates", - "users_filters":["Account"], -}, - - -"apiers": { - "enabled": true, - "scheduler_conns": ["*internal"], -}, - -"filters": { - "apiers_conns": ["*internal"], -}, - -"registrarc":{ - "rpc":{ - "enabled": true, - "registrars_conns": ["regConn"], - "hosts": [ - { - "Tenant": "*default", - "ID":"attributes", - "transport": "*json", - "tls": false - }, - ], - "refresh_interval": "1s", - }, -}, + "filters": { + "apiers_conns": ["*internal"] + }, + "registrarc": { + "rpc": { + "enabled": true, + "registrars_conns": ["regConn"], + "hosts": [ + { + "Tenant": "*default", + "ID": "attributes", + "transport": "*json", + "tls": false + } + ], + "refresh_interval": "1s" + } + } } diff --git a/data/conf/samples/registrarc/registrars_node_id/cgrates.json b/data/conf/samples/registrarc/registrars_node_id/cgrates.json index caa50e766..82032ac14 100644 --- a/data/conf/samples/registrarc/registrars_node_id/cgrates.json +++ b/data/conf/samples/registrarc/registrars_node_id/cgrates.json @@ -10,6 +10,7 @@ "rpc_json": ":2012", "rpc_gob": ":2013", "http": ":2080", + "birpc_json": ":3014", }, "stor_db": { @@ -40,7 +41,6 @@ "rals_conns": ["*localhost"], "resources_conns": ["*localhost"], "chargers_conns": ["*localhost"], - "listen_bijson": ":3014", }, "dispatchers":{ diff --git a/data/conf/samples/remote_replication/engine1_mongo/cgrates.json b/data/conf/samples/remote_replication/engine1_mongo/cgrates.json index c1c5b76bd..90eb0cb0e 100644 --- a/data/conf/samples/remote_replication/engine1_mongo/cgrates.json +++ b/data/conf/samples/remote_replication/engine1_mongo/cgrates.json @@ -1,45 +1,39 @@ { -"general": { - "log_level": 7, - "node_id" : "EngineMongo1", -}, + "general": { + "log_level": 7, + "node_id": "EngineMongo1" + }, + "listen": { + "rpc_json": ":2022", + "rpc_gob": ":2023", + "http": ":2280", + "birpc_json": ":2024" + }, -"listen": { - "rpc_json": ":2022", - "rpc_gob": ":2023", - "http": ":2280", -}, + "data_db": { + "db_type": "mongo", + "db_name": "10", + "db_port": 27017 + }, + "stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017, + "db_password": "" + }, -"data_db": { - "db_type": "mongo", - "db_name": "10", - "db_port": 27017, -}, - - -"stor_db": { - "db_type": "mongo", - "db_name": "cgrates", - "db_port": 27017, - "db_password": "", -}, - - -"rals": { - "enabled": true, -}, - - -"schedulers": { - "enabled": true, -}, - -"apiers": { - "enabled": true, - "scheduler_conns": ["*internal"], -}, + "rals": { + "enabled": true + }, + "schedulers": { + "enabled": true + }, + "apiers": { + "enabled": true, + "scheduler_conns": ["*internal"] + } } diff --git a/data/conf/samples/remote_replication/engine1_redis/cgrates.json b/data/conf/samples/remote_replication/engine1_redis/cgrates.json index e2d4c6bf5..76ae8116f 100644 --- a/data/conf/samples/remote_replication/engine1_redis/cgrates.json +++ b/data/conf/samples/remote_replication/engine1_redis/cgrates.json @@ -1,41 +1,36 @@ { -"general": { - "log_level": 7, - "node_id": "EngineRedis1" -}, + "general": { + "log_level": 7, + "node_id": "EngineRedis1" + }, + "listen": { + "rpc_json": ":2022", + "rpc_gob": ":2023", + "http": ":2280", + "birpc_json": ":2024" + }, -"listen": { - "rpc_json": ":2022", - "rpc_gob": ":2023", - "http": ":2280", -}, + "data_db": { + "db_type": "redis", + "db_port": 6379, + "db_name": "10" + }, -"data_db": { - "db_type": "redis", - "db_port": 6379, - "db_name": "10", -}, + "stor_db": { + "db_password": "CGRateS.org" + }, -"stor_db": { - "db_password": "CGRateS.org", -}, - - -"rals": { - "enabled": true, -}, - - -"schedulers": { - "enabled": true, -}, - - -"apiers": { - "enabled": true, - "scheduler_conns": ["*internal"], -}, + "rals": { + "enabled": true + }, + "schedulers": { + "enabled": true + }, + "apiers": { + "enabled": true, + "scheduler_conns": ["*internal"] + } } diff --git a/data/conf/samples/remote_replication/engine2_mongo/cgrates.json b/data/conf/samples/remote_replication/engine2_mongo/cgrates.json index 21d77891c..829b75917 100644 --- a/data/conf/samples/remote_replication/engine2_mongo/cgrates.json +++ b/data/conf/samples/remote_replication/engine2_mongo/cgrates.json @@ -9,6 +9,7 @@ "rpc_json": ":2032", "rpc_gob": ":2033", "http": ":2380", + "birpc_json": ":2034" }, "rpc_conns": { diff --git a/data/conf/samples/remote_replication/engine2_redis/cgrates.json b/data/conf/samples/remote_replication/engine2_redis/cgrates.json index 1d54116fe..6dfbb4781 100644 --- a/data/conf/samples/remote_replication/engine2_redis/cgrates.json +++ b/data/conf/samples/remote_replication/engine2_redis/cgrates.json @@ -1,52 +1,47 @@ { -"general": { - "log_level": 7, - "node_id": "EngineRedis2" -}, + "general": { + "log_level": 7, + "node_id": "EngineRedis2" + }, + "listen": { + "rpc_json": ":2032", + "rpc_gob": ":2033", + "http": ":2380", + "birpc_json": ":2034" + }, -"listen": { - "rpc_json": ":2032", - "rpc_gob": ":2033", - "http": ":2380", -}, + "data_db": { + "db_type": "redis", + "db_port": 6379, + "db_name": "11" + }, -"data_db": { - "db_type": "redis", - "db_port": 6379, - "db_name": "11", -}, + "stor_db": { + "db_password": "CGRateS.org" + }, -"stor_db": { - "db_password": "CGRateS.org", -}, + "rpc_conns": { + "replicateToCache": { + "strategy": "*broadcast_sync", + "conns": [ + { "address": "*internal" }, + { "address": "127.0.0.1:2012", "transport": "*json" } + ] + } + }, + "rals": { + "enabled": true + }, -"rpc_conns": { - "replicateToCache": { - "strategy": "*broadcast_sync", - "conns": [ - {"address": "*internal"}, - {"address": "127.0.0.1:2012", "transport":"*json"}, - ], - } -}, - - -"rals": { - "enabled": true, -}, - - -"schedulers": { - "enabled": true, -}, - - -"apiers": { - "enabled": true, - "scheduler_conns": ["*internal"], - "caches_conns": ["replicateToCache"], -}, + "schedulers": { + "enabled": true + }, + "apiers": { + "enabled": true, + "scheduler_conns": ["*internal"], + "caches_conns": ["replicateToCache"] + } } diff --git a/data/conf/samples/replication/engine1_mongo/cgrates.json b/data/conf/samples/replication/engine1_mongo/cgrates.json index be19f7d4f..56892657a 100644 --- a/data/conf/samples/replication/engine1_mongo/cgrates.json +++ b/data/conf/samples/replication/engine1_mongo/cgrates.json @@ -1,47 +1,42 @@ { -"general": { - "log_level": 7, - "node_id" : "EngineMongo1", -}, + "general": { + "log_level": 7, + "node_id": "EngineMongo1" + }, + "listen": { + "rpc_json": ":2022", + "rpc_gob": ":2023", + "http": ":2280", + "birpc_json": ":2024" + }, -"listen": { - "rpc_json": ":2022", - "rpc_gob": ":2023", - "http": ":2280", -}, + "data_db": { + "db_type": "mongo", + "db_name": "10", + "db_port": 27017 + }, + "stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017, + "db_password": "" + }, -"data_db": { - "db_type": "mongo", - "db_name": "10", - "db_port": 27017, -}, + "rals": { + "enabled": true + }, + "schedulers": { + "enabled": true + }, -"stor_db": { - "db_type": "mongo", - "db_name": "cgrates", - "db_port": 27017, - "db_password": "", -}, - - -"rals": { - "enabled": true, -}, - - -"schedulers": { - "enabled": true, -}, - -"apiers": { - "enabled": true, - "scheduler_conns": ["*internal"], -}, -"thresholds": { - "enabled": true, -}, - + "apiers": { + "enabled": true, + "scheduler_conns": ["*internal"] + }, + "thresholds": { + "enabled": true + } } diff --git a/data/conf/samples/replication/engine1_redis/cgrates.json b/data/conf/samples/replication/engine1_redis/cgrates.json index 4a7b4cdfc..e4cf10ec3 100644 --- a/data/conf/samples/replication/engine1_redis/cgrates.json +++ b/data/conf/samples/replication/engine1_redis/cgrates.json @@ -1,45 +1,40 @@ { -"general": { - "log_level": 7, - "node_id": "EngineRedis1" -}, + "general": { + "log_level": 7, + "node_id": "EngineRedis1" + }, + "listen": { + "rpc_json": ":2022", + "rpc_gob": ":2023", + "http": ":2280", + "birpc_json": ":2024" + }, -"listen": { - "rpc_json": ":2022", - "rpc_gob": ":2023", - "http": ":2280", -}, + "data_db": { + "db_type": "redis", + "db_port": 6379, + "db_name": "10" + }, -"data_db": { - "db_type": "redis", - "db_port": 6379, - "db_name": "10", -}, + "stor_db": { + "db_password": "CGRateS.org" + }, -"stor_db": { - "db_password": "CGRateS.org", -}, + "rals": { + "enabled": true + }, + "schedulers": { + "enabled": true + }, -"rals": { - "enabled": true, -}, - - -"schedulers": { - "enabled": true, -}, - - -"apiers": { - "enabled": true, - "scheduler_conns": ["*internal"], -}, - -"thresholds": { - "enabled": true, -}, - + "apiers": { + "enabled": true, + "scheduler_conns": ["*internal"] + }, + "thresholds": { + "enabled": true + } } diff --git a/data/conf/samples/replication/engine2_mongo/cgrates.json b/data/conf/samples/replication/engine2_mongo/cgrates.json index b956ea017..05396757a 100644 --- a/data/conf/samples/replication/engine2_mongo/cgrates.json +++ b/data/conf/samples/replication/engine2_mongo/cgrates.json @@ -1,49 +1,43 @@ { -"general": { - "log_level": 7, - "node_id" : "EngineMongo2", -}, + "general": { + "log_level": 7, + "node_id": "EngineMongo2" + }, + "listen": { + "rpc_json": ":2032", + "rpc_gob": ":2033", + "http": ":2380", + "birpc_json": ":2034" + }, -"listen": { - "rpc_json": ":2032", - "rpc_gob": ":2033", - "http": ":2380", -}, + "data_db": { + "db_type": "mongo", + "db_name": "11", + "db_port": 27017 + }, + "stor_db": { + "db_type": "mongo", + "db_name": "cgrates", + "db_port": 27017, + "db_password": "" + }, -"data_db": { - "db_type": "mongo", - "db_name": "11", - "db_port": 27017, -}, + "rals": { + "enabled": true + }, + "schedulers": { + "enabled": true + }, -"stor_db": { - "db_type": "mongo", - "db_name": "cgrates", - "db_port": 27017, - "db_password": "", -}, - - -"rals": { - "enabled": true, -}, - - -"schedulers": { - "enabled": true, -}, - - -"apiers": { - "enabled": true, - "scheduler_conns": ["*internal"], -}, - -"thresholds": { - "enabled": true, -}, + "apiers": { + "enabled": true, + "scheduler_conns": ["*internal"] + }, + "thresholds": { + "enabled": true + } } diff --git a/data/conf/samples/replication/engine2_redis/cgrates.json b/data/conf/samples/replication/engine2_redis/cgrates.json index 1fa5548b7..7a80f3d01 100644 --- a/data/conf/samples/replication/engine2_redis/cgrates.json +++ b/data/conf/samples/replication/engine2_redis/cgrates.json @@ -1,43 +1,40 @@ { -"general": { - "log_level": 7, - "node_id": "EngineRedis2" -}, + "general": { + "log_level": 7, + "node_id": "EngineRedis2" + }, + "listen": { + "rpc_json": ":2032", + "rpc_gob": ":2033", + "http": ":2380", + "birpc_json": ":2034" + }, -"listen": { - "rpc_json": ":2032", - "rpc_gob": ":2033", - "http": ":2380", -}, + "data_db": { + "db_type": "redis", + "db_port": 6379, + "db_name": "11" + }, -"data_db": { - "db_type": "redis", - "db_port": 6379, - "db_name": "11", -}, + "stor_db": { + "db_password": "CGRateS.org" + }, -"stor_db": { - "db_password": "CGRateS.org", -}, + "rals": { + "enabled": true + }, + "schedulers": { + "enabled": true + }, -"rals": { - "enabled": true, -}, + "apiers": { + "enabled": true, + "scheduler_conns": ["*internal"] + }, - -"schedulers": { - "enabled": true, -}, - - -"apiers": { - "enabled": true, - "scheduler_conns": ["*internal"], -}, - -"thresholds": { - "enabled": true, -}, + "thresholds": { + "enabled": true + } } diff --git a/data/conf/samples/replication/internal/cgrates.json b/data/conf/samples/replication/internal/cgrates.json index 1ade28bd2..a8ecc9646 100644 --- a/data/conf/samples/replication/internal/cgrates.json +++ b/data/conf/samples/replication/internal/cgrates.json @@ -1,107 +1,97 @@ { -"general": { - "log_level": 7, - "node_id": "InternalEngine", -}, + "general": { + "log_level": 7, + "node_id": "InternalEngine" + }, + "listen": { + "rpc_json": ":2012", + "rpc_gob": ":2013", + "http": ":2080" + }, -"listen": { - "rpc_json": ":2012", - "rpc_gob": ":2013", - "http": ":2080", -}, + "rpc_conns": { + "conn2": { + "strategy": "*broadcast_sync", + "conns": [ + { "address": "127.0.0.1:2023", "transport": "*gob" }, + { "address": "127.0.0.1:2033", "transport": "*gob" } + ] + }, + "connCache": { + "strategy": "*broadcast_sync", // be brodcast sync in test + "conns": [ + { "address": "127.0.0.1:2022", "transport": "*json" }, + { "address": "127.0.0.1:2032", "transport": "*json" } + ] + } + }, + "data_db": { + "db_type": "*internal", + "replication_conns": ["conn2"], + "items": { + "*accounts": { "remote": false, "replicate": true }, + "*reverse_destinations": { "remote": false, "replicate": true }, + "*destinations": { "remote": false, "replicate": true }, + "*rating_plans": { "remote": false, "replicate": true }, + "*rating_profiles": { "remote": false, "replicate": true }, + "*actions": { "remote": false, "replicate": true }, + "*action_plans": { "remote": false, "replicate": true }, + "*account_action_plans": { "remote": false, "replicate": true }, + "*action_triggers": { "remote": false, "replicate": true }, + "*shared_groups": { "remote": false, "replicate": true }, + "*timings": { "remote": false, "replicate": true }, + "*resource_profiles": { "remote": false, "replicate": true }, + "*resources": { "remote": false, "replicate": true }, + "*statqueue_profiles": { "remote": false, "replicate": true }, + "*statqueues": { "remote": false, "replicate": true }, + "*threshold_profiles": { "remote": false, "replicate": true }, + "*thresholds": { "remote": false, "replicate": true }, + "*filters": { "remote": false, "replicate": true }, + "*route_profiles": { "remote": false, "replicate": true }, + "*attribute_profiles": { "remote": false, "replicate": true }, + "*charger_profiles": { "remote": false, "replicate": true }, + "*dispatcher_profiles": { "remote": false, "replicate": true }, + "*dispatcher_hosts": { "remote": false, "replicate": true }, + "*load_ids": { "remote": false, "replicate": true }, + "*resource_filter_indexes": { "remote": false, "replicate": true }, + "*stat_filter_indexes": { "remote": false, "replicate": true }, + "*threshold_filter_indexes": { "remote": false, "replicate": true }, + "*route_filter_indexes": { "remote": false, "replicate": true }, + "*attribute_filter_indexes": { "remote": false, "replicate": true }, + "*charger_filter_indexes": { "remote": false, "replicate": true }, + "*dispatcher_filter_indexes": { "remote": false, "replicate": true }, + "*reverse_filter_indexes": { "remote": false, "replicate": true } + } + }, -"rpc_conns": { - "conn2": { - "strategy": "*broadcast_sync", - "conns": [ - {"address": "127.0.0.1:2023", "transport":"*gob"}, - {"address": "127.0.0.1:2033", "transport":"*gob"} - ], - }, - "connCache": { - "strategy": "*broadcast_sync",// be brodcast sync in test - "conns": [ - {"address": "127.0.0.1:2022", "transport":"*json"}, - {"address": "127.0.0.1:2032", "transport":"*json"} - ], - } -}, + "stor_db": { + "db_type": "*internal" + }, + "rals": { + "enabled": true + }, -"data_db": { - "db_type": "*internal", - "replication_conns": ["conn2"], - "items":{ - "*accounts":{"remote":false,"replicate":true}, - "*reverse_destinations": {"remote":false,"replicate":true}, - "*destinations": {"remote":false,"replicate":true}, - "*rating_plans": {"remote":false,"replicate":true}, - "*rating_profiles":{"remote":false,"replicate":true}, - "*actions":{"remote":false,"replicate":true}, - "*action_plans": {"remote":false,"replicate":true}, - "*account_action_plans":{"remote":false,"replicate":true}, - "*action_triggers":{"remote":false,"replicate":true}, - "*shared_groups":{"remote":false,"replicate":true}, - "*timings": {"remote":false,"replicate":true}, - "*resource_profiles":{"remote":false,"replicate":true}, - "*resources":{"remote":false,"replicate":true}, - "*statqueue_profiles": {"remote":false,"replicate":true}, - "*statqueues": {"remote":false,"replicate":true}, - "*threshold_profiles": {"remote":false,"replicate":true}, - "*thresholds": {"remote":false,"replicate":true}, - "*filters": {"remote":false,"replicate":true}, - "*route_profiles":{"remote":false,"replicate":true}, - "*attribute_profiles":{"remote":false,"replicate":true}, - "*charger_profiles": {"remote":false,"replicate":true}, - "*dispatcher_profiles":{"remote":false,"replicate":true}, - "*dispatcher_hosts":{"remote":false,"replicate":true}, - "*load_ids":{"remote":false,"replicate":true}, - "*resource_filter_indexes" : {"remote":false, "replicate":true}, - "*stat_filter_indexes" : {"remote":false, "replicate":true}, - "*threshold_filter_indexes" : {"remote":false, "replicate":true}, - "*route_filter_indexes" : {"remote":false, "replicate":true}, - "*attribute_filter_indexes" : {"remote":false, "replicate":true}, - "*charger_filter_indexes" : {"remote":false, "replicate":true}, - "*dispatcher_filter_indexes" : {"remote":false, "replicate":true}, - "*reverse_filter_indexes" : {"remote":false, "replicate":true}, - }, -}, + "thresholds": { + "enabled": true, + "store_interval": "-1" + }, + "resources": { + "enabled": true, + "store_interval": "-1", + "thresholds_conns": ["*internal"] + }, -"stor_db": { - "db_type": "*internal", -}, - - -"rals": { - "enabled": true, -}, - - -"thresholds": { - "enabled": true, - "store_interval": "-1", -}, - - -"resources": { - "enabled": true, - "store_interval": "-1", - "thresholds_conns": ["*internal"], -}, - - -"schedulers": { - "enabled": true, -}, - - -"apiers": { - "enabled": true, - "scheduler_conns": ["*internal"], - "caches_conns":["connCache"], -}, + "schedulers": { + "enabled": true + }, + "apiers": { + "enabled": true, + "scheduler_conns": ["*internal"], + "caches_conns": ["connCache"] + } } diff --git a/data/conf/samples/replication_cache/engine2/cgrates.json b/data/conf/samples/replication_cache/engine2/cgrates.json index 9121181d5..1d91ccde0 100644 --- a/data/conf/samples/replication_cache/engine2/cgrates.json +++ b/data/conf/samples/replication_cache/engine2/cgrates.json @@ -1,47 +1,40 @@ { -"general": { - "log_level": 7, - "node_id": "Engine2" -}, + "general": { + "log_level": 7, + "node_id": "Engine2" + }, + "listen": { + "rpc_json": ":2022", + "rpc_gob": ":2023", + "http": ":2280", + "birpc_json": ":2024" + }, -"listen": { - "rpc_json": ":2022", - "rpc_gob": ":2023", - "http": ":2280", -}, + "data_db": { + "db_type": "redis", + "db_port": 6379, + "db_name": "10" + }, -"data_db": { - "db_type": "redis", - "db_port": 6379, - "db_name": "10", -}, + "stor_db": { + "db_password": "CGRateS.org" + }, + "rals": { + "enabled": true + }, -"stor_db": { - "db_password": "CGRateS.org", -}, - - -"rals": { - "enabled": true, -}, - - -"attributes": { - "enabled": true, -}, - - -"schedulers": { - "enabled": true, -}, - - -"apiers": { - "enabled": true, - "scheduler_conns": ["*internal"], -}, + "attributes": { + "enabled": true + }, + "schedulers": { + "enabled": true + }, + "apiers": { + "enabled": true, + "scheduler_conns": ["*internal"] + } } diff --git a/data/conf/samples/rerate_exp_multiple_engines/rerate_exp_engine2_internal/cgrates.json b/data/conf/samples/rerate_exp_multiple_engines/rerate_exp_engine2_internal/cgrates.json index 766994111..779c6e299 100644 --- a/data/conf/samples/rerate_exp_multiple_engines/rerate_exp_engine2_internal/cgrates.json +++ b/data/conf/samples/rerate_exp_multiple_engines/rerate_exp_engine2_internal/cgrates.json @@ -8,7 +8,8 @@ "listen": { "rpc_json": ":22012", "rpc_gob": ":22013", - "http": ":22080" + "http": ":22080", + "birpc_json": "127.0.0.1:22014" }, "data_db": { @@ -29,7 +30,6 @@ "enabled": true, "rals_conns": ["*localhost"], "cdrs_conns": ["*localhost"], - "listen_bijson": "127.0.0.1:22014" }, "apiers": { diff --git a/data/conf/samples/rerate_exp_multiple_engines/rerate_exp_engine2_mongo/cgrates.json b/data/conf/samples/rerate_exp_multiple_engines/rerate_exp_engine2_mongo/cgrates.json index 1bf512af0..78584c5f3 100644 --- a/data/conf/samples/rerate_exp_multiple_engines/rerate_exp_engine2_mongo/cgrates.json +++ b/data/conf/samples/rerate_exp_multiple_engines/rerate_exp_engine2_mongo/cgrates.json @@ -8,7 +8,8 @@ "listen": { "rpc_json": ":22012", "rpc_gob": ":22013", - "http": ":22080" + "http": ":22080", + "birpc_json": "127.0.0.1:22014" }, "data_db": { @@ -34,7 +35,6 @@ "enabled": true, "rals_conns": ["*localhost"], "cdrs_conns": ["*localhost"], - "listen_bijson": "127.0.0.1:22014" }, "apiers": { diff --git a/data/conf/samples/rerate_exp_multiple_engines/rerate_exp_engine2_mysql/cgrates.json b/data/conf/samples/rerate_exp_multiple_engines/rerate_exp_engine2_mysql/cgrates.json index 199346430..efd6d48a5 100644 --- a/data/conf/samples/rerate_exp_multiple_engines/rerate_exp_engine2_mysql/cgrates.json +++ b/data/conf/samples/rerate_exp_multiple_engines/rerate_exp_engine2_mysql/cgrates.json @@ -8,7 +8,8 @@ "listen": { "rpc_json": ":22012", "rpc_gob": ":22013", - "http": ":22080" + "http": ":22080", + "birpc_json": "127.0.0.1:22014" }, "data_db": { @@ -31,7 +32,6 @@ "enabled": true, "rals_conns": ["*localhost"], "cdrs_conns": ["*localhost"], - "listen_bijson": "127.0.0.1:22014" }, "apiers": { diff --git a/data/conf/samples/sbkupreplcengine2_mongo/cgrates.json b/data/conf/samples/sbkupreplcengine2_mongo/cgrates.json index ea528a99b..fac211925 100644 --- a/data/conf/samples/sbkupreplcengine2_mongo/cgrates.json +++ b/data/conf/samples/sbkupreplcengine2_mongo/cgrates.json @@ -10,6 +10,7 @@ "rpc_json": "127.0.0.1:22012", // RPC JSON listening address "rpc_gob": "127.0.0.1:22013", // RPC GOB listening address "http": "127.0.0.1:22080", // HTTP listening address + "birpc_json": "127.0.0.1:22014", // address where to listen for bidirectional JSON-RPC requests }, "rpc_conns": { @@ -62,7 +63,6 @@ "sessions": { "enabled": true, // starts SessionManager service: - "listen_bijson": "127.0.0.1:22014", // address where to listen for bidirectional JSON-RPC requests "replication_conns": ["rplConn"], "rals_conns": ["conn1"], "cdrs_conns": ["*internal"], diff --git a/data/conf/samples/sbkupreplcengine2_mongo_gob/cgrates.json b/data/conf/samples/sbkupreplcengine2_mongo_gob/cgrates.json index f3f3c7991..f97aab0fa 100644 --- a/data/conf/samples/sbkupreplcengine2_mongo_gob/cgrates.json +++ b/data/conf/samples/sbkupreplcengine2_mongo_gob/cgrates.json @@ -10,6 +10,7 @@ "rpc_json": "127.0.0.1:22012", // RPC JSON listening address "rpc_gob": "127.0.0.1:22013", // RPC GOB listening address "http": "127.0.0.1:22080", // HTTP listening address + "birpc_json": "127.0.0.1:22014", // address where to listen for bidirectional JSON-RPC requests }, "data_db": { // database used to store runtime data (eg: accounts, cdr stats) @@ -61,7 +62,6 @@ "sessions": { "enabled": true, // starts SessionManager service: - "listen_bijson": "127.0.0.1:22014", // address where to listen for bidirectional JSON-RPC requests "replication_conns": ["rplConn"], "rals_conns": ["conn1"], "cdrs_conns": ["*internal"], diff --git a/data/conf/samples/sbkupreplcengine2_mysql/cgrates.json b/data/conf/samples/sbkupreplcengine2_mysql/cgrates.json index 65773d598..38eb2837c 100644 --- a/data/conf/samples/sbkupreplcengine2_mysql/cgrates.json +++ b/data/conf/samples/sbkupreplcengine2_mysql/cgrates.json @@ -10,6 +10,7 @@ "rpc_json": "127.0.0.1:22012", // RPC JSON listening address "rpc_gob": "127.0.0.1:22013", // RPC GOB listening address "http": "127.0.0.1:22080", // HTTP listening address + "birpc_json": "127.0.0.1:22014", // address where to listen for bidirectional JSON-RPC requests }, "rpc_conns": { @@ -52,7 +53,6 @@ "sessions": { "enabled": true, // starts SessionManager service: - "listen_bijson": "127.0.0.1:22014", // address where to listen for bidirectional JSON-RPC requests "replication_conns": ["rplConn"], "rals_conns": ["conn1"], "cdrs_conns": ["*internal"], diff --git a/data/conf/samples/sbkupreplcengine2_mysql_gob/cgrates.json b/data/conf/samples/sbkupreplcengine2_mysql_gob/cgrates.json index eda0d9086..5e65498dd 100644 --- a/data/conf/samples/sbkupreplcengine2_mysql_gob/cgrates.json +++ b/data/conf/samples/sbkupreplcengine2_mysql_gob/cgrates.json @@ -10,6 +10,7 @@ "rpc_json": "127.0.0.1:22012", // RPC JSON listening address "rpc_gob": "127.0.0.1:22013", // RPC GOB listening address "http": "127.0.0.1:22080", // HTTP listening address + "birpc_json": "127.0.0.1:22014", // address where to listen for bidirectional JSON-RPC requests }, "stor_db": { // database used to store offline tariff plans and CDRs @@ -51,7 +52,6 @@ "sessions": { "enabled": true, // starts SessionManager service: - "listen_bijson": "127.0.0.1:22014", // address where to listen for bidirectional JSON-RPC requests "replication_conns": ["rplConn"], "rals_conns": ["conn1"], "cdrs_conns": ["*internal"], diff --git a/data/conf/samples/sessions_replication/rplcTestGracefulShutdown1_internal/cgrates.json b/data/conf/samples/sessions_replication/rplcTestGracefulShutdown1_internal/cgrates.json index 34bb494e3..00e7f88fb 100644 --- a/data/conf/samples/sessions_replication/rplcTestGracefulShutdown1_internal/cgrates.json +++ b/data/conf/samples/sessions_replication/rplcTestGracefulShutdown1_internal/cgrates.json @@ -13,7 +13,8 @@ "listen": { "rpc_json": "127.0.0.1:22012", "rpc_gob": "127.0.0.1:22013", - "http": "127.0.0.1:22080" + "http": "127.0.0.1:22080", + "birpc_json": "127.0.0.1:22014", // address where to listen for bidirectional JSON-RPC requests }, "data_db": { @@ -35,7 +36,6 @@ "sessions": { "enabled": true, // starts SessionManager service: "debit_interval": "5ms", // interval to perform debits on. - "listen_bijson": "127.0.0.1:22014", // address where to listen for bidirectional JSON-RPC requests }, diff --git a/data/conf/samples/sessions_replication/rplcTestGracefulShutdown1_mongo/cgrates.json b/data/conf/samples/sessions_replication/rplcTestGracefulShutdown1_mongo/cgrates.json index c757b8444..e019753bd 100644 --- a/data/conf/samples/sessions_replication/rplcTestGracefulShutdown1_mongo/cgrates.json +++ b/data/conf/samples/sessions_replication/rplcTestGracefulShutdown1_mongo/cgrates.json @@ -10,6 +10,7 @@ "rpc_json": "127.0.0.1:22012", // RPC JSON listening address "rpc_gob": "127.0.0.1:22013", // RPC GOB listening address "http": "127.0.0.1:22080", // HTTP listening address + "birpc_json": "127.0.0.1:22014", // address where to listen for bidirectional JSON-RPC requests }, @@ -35,7 +36,6 @@ "sessions": { "enabled": true, // starts SessionManager service: "debit_interval": "5ms", // interval to perform debits on. - "listen_bijson": "127.0.0.1:22014", // address where to listen for bidirectional JSON-RPC requests }, "apiers": { diff --git a/data/conf/samples/sessions_replication/rplcTestGracefulShutdown1_mysql/cgrates.json b/data/conf/samples/sessions_replication/rplcTestGracefulShutdown1_mysql/cgrates.json index dc65932eb..2d1e8dfcf 100644 --- a/data/conf/samples/sessions_replication/rplcTestGracefulShutdown1_mysql/cgrates.json +++ b/data/conf/samples/sessions_replication/rplcTestGracefulShutdown1_mysql/cgrates.json @@ -10,6 +10,7 @@ "rpc_json": "127.0.0.1:22012", "rpc_gob": "127.0.0.1:22013", "http": "127.0.0.1:22080", + "birpc_json": "127.0.0.1:22014", }, @@ -24,7 +25,6 @@ "sessions": { "enabled": true, - "listen_bijson": "127.0.0.1:22014", "chargers_conns": ["*internal"], }, diff --git a/data/conf/samples/sessions_replication/rplcTestGracefulShutdown2_mysql/cgrates.json b/data/conf/samples/sessions_replication/rplcTestGracefulShutdown2_mysql/cgrates.json index 72d59740d..c5e3da896 100644 --- a/data/conf/samples/sessions_replication/rplcTestGracefulShutdown2_mysql/cgrates.json +++ b/data/conf/samples/sessions_replication/rplcTestGracefulShutdown2_mysql/cgrates.json @@ -10,6 +10,7 @@ "rpc_json": "127.0.0.1:2012", "rpc_gob": "127.0.0.1:2013", "http": "127.0.0.1:2080", + "birpc_json": "127.0.0.1:2014", }, @@ -34,7 +35,6 @@ "enabled": true, "replication_conns": ["rplConn"], "chargers_conns": ["*internal"], - "listen_bijson": "127.0.0.1:2014", }, "apiers": { diff --git a/data/conf/samples/sessions_replication/smgreplcslave_mongo/cgrates.json b/data/conf/samples/sessions_replication/smgreplcslave_mongo/cgrates.json index 7673ef4ac..728968753 100644 --- a/data/conf/samples/sessions_replication/smgreplcslave_mongo/cgrates.json +++ b/data/conf/samples/sessions_replication/smgreplcslave_mongo/cgrates.json @@ -10,6 +10,7 @@ "rpc_json": "127.0.0.1:22012", // RPC JSON listening address "rpc_gob": "127.0.0.1:22013", // RPC GOB listening address "http": "127.0.0.1:22080", // HTTP listening address + "birpc_json": "127.0.0.1:22014", // address where to listen for bidirectional JSON-RPC requests }, @@ -64,7 +65,6 @@ "sessions": { "enabled": true, // starts SessionManager service: "debit_interval": "5ms", // interval to perform debits on. - "listen_bijson": "127.0.0.1:22014", // address where to listen for bidirectional JSON-RPC requests "replication_conns": ["rplConn"], "rals_conns": ["conn1"], "cdrs_conns": ["*internal"], diff --git a/data/conf/samples/sessions_replication/smgreplcslave_mysql/cgrates.json b/data/conf/samples/sessions_replication/smgreplcslave_mysql/cgrates.json index 3bdabaa7b..b6d126237 100644 --- a/data/conf/samples/sessions_replication/smgreplcslave_mysql/cgrates.json +++ b/data/conf/samples/sessions_replication/smgreplcslave_mysql/cgrates.json @@ -10,6 +10,7 @@ "rpc_json": "127.0.0.1:22012", // RPC JSON listening address "rpc_gob": "127.0.0.1:22013", // RPC GOB listening address "http": "127.0.0.1:22080", // HTTP listening address + "birpc_json": "127.0.0.1:22014", // address where to listen for bidirectional JSON-RPC requests }, @@ -54,7 +55,6 @@ "sessions": { "enabled": true, // starts SessionManager service: "debit_interval": "5ms", // interval to perform debits on. - "listen_bijson": "127.0.0.1:22014", // address where to listen for bidirectional JSON-RPC requests "replication_conns": ["rplConn"], "rals_conns": ["conn1"], "cdrs_conns": ["*internal"], diff --git a/data/conf/samples/smgreplcslave_mongo/cgrates.json b/data/conf/samples/smgreplcslave_mongo/cgrates.json index fd313f34b..65bfe593a 100644 --- a/data/conf/samples/smgreplcslave_mongo/cgrates.json +++ b/data/conf/samples/smgreplcslave_mongo/cgrates.json @@ -10,6 +10,7 @@ "rpc_json": "127.0.0.1:22012", // RPC JSON listening address "rpc_gob": "127.0.0.1:22013", // RPC GOB listening address "http": "127.0.0.1:22080", // HTTP listening address + "birpc_json": "127.0.0.1:22014", // address where to listen for bidirectional JSON-RPC requests }, "rpc_conns": { @@ -62,7 +63,6 @@ "sessions": { "enabled": true, // starts SessionManager service: - "listen_bijson": "127.0.0.1:22014", // address where to listen for bidirectional JSON-RPC requests "replication_conns": ["rplConn"], "rals_conns": ["conn1"], "cdrs_conns": ["*internal"], diff --git a/data/conf/samples/smgreplcslave_mongo_gob/cgrates.json b/data/conf/samples/smgreplcslave_mongo_gob/cgrates.json index 0bbc5aa51..6d68b370a 100644 --- a/data/conf/samples/smgreplcslave_mongo_gob/cgrates.json +++ b/data/conf/samples/smgreplcslave_mongo_gob/cgrates.json @@ -10,6 +10,7 @@ "rpc_json": "127.0.0.1:22012", // RPC JSON listening address "rpc_gob": "127.0.0.1:22013", // RPC GOB listening address "http": "127.0.0.1:22080", // HTTP listening address + "birpc_json": "127.0.0.1:22014", // address where to listen for bidirectional JSON-RPC requests }, "data_db": { // database used to store runtime data (eg: accounts, cdr stats) @@ -61,7 +62,6 @@ "sessions": { "enabled": true, // starts SessionManager service: - "listen_bijson": "127.0.0.1:22014", // address where to listen for bidirectional JSON-RPC requests "replication_conns": ["rplConn"], "rals_conns": ["conn1"], "cdrs_conns": ["*internal"], diff --git a/data/conf/samples/smgreplcslave_mysql/cgrates.json b/data/conf/samples/smgreplcslave_mysql/cgrates.json index b9113ca2d..d388cb271 100644 --- a/data/conf/samples/smgreplcslave_mysql/cgrates.json +++ b/data/conf/samples/smgreplcslave_mysql/cgrates.json @@ -10,6 +10,7 @@ "rpc_json": "127.0.0.1:22012", // RPC JSON listening address "rpc_gob": "127.0.0.1:22013", // RPC GOB listening address "http": "127.0.0.1:22080", // HTTP listening address + "birpc_json": "127.0.0.1:22014", // address where to listen for bidirectional JSON-RPC requests }, "rpc_conns": { @@ -52,7 +53,6 @@ "sessions": { "enabled": true, // starts SessionManager service: - "listen_bijson": "127.0.0.1:22014", // address where to listen for bidirectional JSON-RPC requests "replication_conns": ["rplConn"], "rals_conns": ["conn1"], "cdrs_conns": ["*internal"], diff --git a/data/conf/samples/smgreplcslave_mysql_gob/cgrates.json b/data/conf/samples/smgreplcslave_mysql_gob/cgrates.json index 07baae109..179cf7d52 100644 --- a/data/conf/samples/smgreplcslave_mysql_gob/cgrates.json +++ b/data/conf/samples/smgreplcslave_mysql_gob/cgrates.json @@ -10,6 +10,7 @@ "rpc_json": "127.0.0.1:22012", // RPC JSON listening address "rpc_gob": "127.0.0.1:22013", // RPC GOB listening address "http": "127.0.0.1:22080", // HTTP listening address + "birpc_json": "127.0.0.1:22014", // address where to listen for bidirectional JSON-RPC requests }, "stor_db": { // database used to store offline tariff plans and CDRs @@ -51,7 +52,6 @@ "sessions": { "enabled": true, // starts SessionManager service: - "listen_bijson": "127.0.0.1:22014", // address where to listen for bidirectional JSON-RPC requests "replication_conns": ["rplConn"], "rals_conns": ["conn1"], "cdrs_conns": ["*internal"], diff --git a/data/conf/samples/twoengines/engine2/cgrates.json b/data/conf/samples/twoengines/engine2/cgrates.json index 485db6c9c..af4a6c689 100644 --- a/data/conf/samples/twoengines/engine2/cgrates.json +++ b/data/conf/samples/twoengines/engine2/cgrates.json @@ -1,37 +1,31 @@ { -"general": { - "log_level": 7, - "node_id": "Engine2", -}, + "general": { + "log_level": 7, + "node_id": "Engine2" + }, + "listen": { + "rpc_json": ":20212", + "rpc_gob": ":20213", + "http": ":20280", + "birpc_json": ":20214" + }, -"listen": { - "rpc_json": ":20212", - "rpc_gob": ":20213", - "http": ":20280", -}, + "data_db": { + "db_type": "redis", + "db_port": 6379, + "db_name": "10" + }, + "stor_db": { + "db_password": "CGRateS.org" + }, -"data_db": { - "db_type": "redis", - "db_port": 6379, - "db_name": "10", -}, - - -"stor_db": { - "db_password": "CGRateS.org", -}, - - -"rals": { - "enabled": true, -}, - - -"apiers": { - "enabled": true, -}, - + "rals": { + "enabled": true + }, + "apiers": { + "enabled": true + } } diff --git a/data/tutorial_tests/osips/cgrates/etc/cgrates/cgrates.json b/data/tutorial_tests/osips/cgrates/etc/cgrates/cgrates.json index 1ac02f02a..f50e2dcfc 100644 --- a/data/tutorial_tests/osips/cgrates/etc/cgrates/cgrates.json +++ b/data/tutorial_tests/osips/cgrates/etc/cgrates/cgrates.json @@ -9,6 +9,7 @@ "rpc_json": ":2012", "rpc_gob": ":2013", "http": ":2080", + "birpc_json": "127.0.0.1:2014", // address where to listen for bidirectional JSON-RPC requests }, @@ -47,7 +48,6 @@ "sessions": { "enabled": true, - "listen_bijson": "127.0.0.1:2014", // address where to listen for bidirectional JSON-RPC requests "chargers_conns": ["*internal"], "rals_conns": ["*internal"], "cdrs_conns": ["*internal"], diff --git a/data/tutorials/osips/cgrates/etc/cgrates/cgrates.json b/data/tutorials/osips/cgrates/etc/cgrates/cgrates.json index d06541a79..b3b5d67e6 100644 --- a/data/tutorials/osips/cgrates/etc/cgrates/cgrates.json +++ b/data/tutorials/osips/cgrates/etc/cgrates/cgrates.json @@ -9,6 +9,7 @@ "rpc_json": ":2012", "rpc_gob": ":2013", "http": ":2080", + "birpc_json": "127.0.0.1:2014", // address where to listen for bidirectional JSON-RPC requests }, @@ -46,7 +47,6 @@ "sessions": { "enabled": true, - "listen_bijson": "127.0.0.1:2014", // address where to listen for bidirectional JSON-RPC requests "chargers_conns": ["*localhost"], "rals_conns": ["*localhost"], "cdrs_conns": ["*localhost"], diff --git a/data/tutorials/osips_diam/etc/cgrates/cgrates.json b/data/tutorials/osips_diam/etc/cgrates/cgrates.json index 1933f49c9..3eb3acfef 100644 --- a/data/tutorials/osips_diam/etc/cgrates/cgrates.json +++ b/data/tutorials/osips_diam/etc/cgrates/cgrates.json @@ -7,7 +7,8 @@ "listen": { "rpc_json": ":2012", "rpc_gob": ":2013", - "http": ":2080" + "http": ":2080", + "birpc_json": "127.0.0.1:2014", }, @@ -37,7 +38,6 @@ "sessions": { "enabled": true, - "listen_bijson": "127.0.0.1:2014", "chargers_conns": ["*localhost"], "rals_conns": ["*localhost"], "cdrs_conns": ["*localhost"], diff --git a/dispatchers/config_it_test.go b/dispatchers/config_it_test.go index 21e398783..e9db09cb6 100644 --- a/dispatchers/config_it_test.go +++ b/dispatchers/config_it_test.go @@ -63,6 +63,8 @@ func TestDspConfigIT(t *testing.T) { func testDspConfigSv1GetJSONSection(t *testing.T) { expected := map[string]any{ + "birpc_gob": "", + "birpc_json": ":6014", "http": ":6080", "http_tls": "127.0.0.1:2280", "rpc_gob": ":6013", diff --git a/docs/sessions.rst b/docs/sessions.rst index b3ccb8709..5297e02ae 100644 --- a/docs/sessions.rst +++ b/docs/sessions.rst @@ -18,9 +18,6 @@ Configured within **sessions** section within :ref:`JSON configuration . -listen_bijson - Address where the *SessionS* listens for bidirectional JSON requests. - chargers_conns Connections towards :ref:`ChargerS` component to query charges for events. diff --git a/general_tests/all_cfg_sect_rld_it_test.go b/general_tests/all_cfg_sect_rld_it_test.go index 5b768d9c9..be13ffe07 100644 --- a/general_tests/all_cfg_sect_rld_it_test.go +++ b/general_tests/all_cfg_sect_rld_it_test.go @@ -260,13 +260,13 @@ func testSectConfigSReloadListen(t *testing.T) { var reply string if err := testSectRPC.Call(context.Background(), utils.ConfigSv1SetConfigFromJSON, &config.SetConfigFromJSONArgs{ Tenant: "cgrates.org", - Config: "{\"listen\":{\"http\":\":2080\",\"http_tls\":\"127.0.0.1:2280\",\"rpc_gob\":\":2013\",\"rpc_gob_tls\":\"127.0.0.1:2023\",\"rpc_json\":\":2012\",\"rpc_json_tls\":\"127.0.0.1:2022\"}}", + Config: "{\"listen\":{\"birpc_gob\":\"\",\"birpc_json\":\"127.0.0.1:2014\",\"http\":\":2080\",\"http_tls\":\"127.0.0.1:2280\",\"rpc_gob\":\":2013\",\"rpc_gob_tls\":\"127.0.0.1:2023\",\"rpc_json\":\":2012\",\"rpc_json_tls\":\"127.0.0.1:2022\"}}", }, &reply); err != nil { t.Error(err) } else if reply != utils.OK { t.Errorf("Expected OK received: %+v", reply) } - cfgStr := "{\"listen\":{\"http\":\":2080\",\"http_tls\":\"127.0.0.1:2280\",\"rpc_gob\":\":2013\",\"rpc_gob_tls\":\"127.0.0.1:2023\",\"rpc_json\":\":2012\",\"rpc_json_tls\":\"127.0.0.1:2022\"}}" + cfgStr := "{\"listen\":{\"birpc_gob\":\"\",\"birpc_json\":\"127.0.0.1:2014\",\"http\":\":2080\",\"http_tls\":\"127.0.0.1:2280\",\"rpc_gob\":\":2013\",\"rpc_gob_tls\":\"127.0.0.1:2023\",\"rpc_json\":\":2012\",\"rpc_json_tls\":\"127.0.0.1:2022\"}}" var rpl string if err := testSectRPC.Call(context.Background(), utils.ConfigSv1GetConfigAsJSON, &config.SectionWithAPIOpts{ Tenant: "cgrates.org", @@ -540,13 +540,13 @@ func testSectConfigSReloadSessions(t *testing.T) { var reply string if err := testSectRPC.Call(context.Background(), utils.ConfigSv1SetConfigFromJSON, &config.SetConfigFromJSONArgs{ Tenant: "cgrates.org", - Config: "{\"sessions\":{\"alterable_fields\":[],\"attributes_conns\":[\"*internal\"],\"cdrs_conns\":[\"*internal\"],\"channel_sync_interval\":\"0\",\"chargers_conns\":[\"*internal\"],\"client_protocol\":2,\"debit_interval\":\"0\",\"default_usage\":{\"*any\":\"3h0m0s\",\"*data\":\"1048576\",\"*sms\":\"1\",\"*voice\":\"3h0m0s\"},\"enabled\":true,\"listen_bigob\":\"\",\"listen_bijson\":\"127.0.0.1:2014\",\"min_dur_low_balance\":\"0\",\"rals_conns\":[\"*internal\"],\"replication_conns\":[],\"resources_conns\":[\"*internal\"],\"routes_conns\":[\"*internal\"],\"scheduler_conns\":[],\"session_indexes\":[\"OriginID\"],\"session_ttl\":\"0\",\"stats_conns\":[],\"stir\":{\"allowed_attest\":[\"*any\"],\"default_attest\":\"A\",\"payload_maxduration\":\"-1\",\"privatekey_path\":\"\",\"publickey_path\":\"\"},\"store_session_costs\":false,\"terminate_attempts\":5,\"thresholds_conns\":[]}}", + Config: "{\"sessions\":{\"alterable_fields\":[],\"attributes_conns\":[\"*internal\"],\"cdrs_conns\":[\"*internal\"],\"channel_sync_interval\":\"0\",\"chargers_conns\":[\"*internal\"],\"client_protocol\":2,\"debit_interval\":\"0\",\"default_usage\":{\"*any\":\"3h0m0s\",\"*data\":\"1048576\",\"*sms\":\"1\",\"*voice\":\"3h0m0s\"},\"enabled\":true,\"min_dur_low_balance\":\"0\",\"rals_conns\":[\"*internal\"],\"replication_conns\":[],\"resources_conns\":[\"*internal\"],\"routes_conns\":[\"*internal\"],\"scheduler_conns\":[],\"session_indexes\":[\"OriginID\"],\"session_ttl\":\"0\",\"stats_conns\":[],\"stir\":{\"allowed_attest\":[\"*any\"],\"default_attest\":\"A\",\"payload_maxduration\":\"-1\",\"privatekey_path\":\"\",\"publickey_path\":\"\"},\"store_session_costs\":false,\"terminate_attempts\":5,\"thresholds_conns\":[]}}", }, &reply); err != nil { t.Error(err) } else if reply != utils.OK { t.Errorf("Expected OK received: %+v", reply) } - cfgStr := "{\"sessions\":{\"alterable_fields\":[],\"attributes_conns\":[\"*internal\"],\"backup_interval\":\"0\",\"cdrs_conns\":[\"*internal\"],\"channel_sync_interval\":\"0\",\"chargers_conns\":[\"*internal\"],\"client_protocol\":2,\"debit_interval\":\"0\",\"default_usage\":{\"*any\":\"3h0m0s\",\"*data\":\"1048576\",\"*sms\":\"1\",\"*voice\":\"3h0m0s\"},\"enabled\":true,\"listen_bigob\":\"\",\"listen_bijson\":\"127.0.0.1:2014\",\"min_dur_low_balance\":\"0\",\"rals_conns\":[\"*internal\"],\"replication_conns\":[],\"resources_conns\":[\"*internal\"],\"routes_conns\":[\"*internal\"],\"scheduler_conns\":[],\"session_indexes\":[\"OriginID\"],\"session_ttl\":\"0\",\"stale_chan_max_extra_usage\":\"0\",\"stats_conns\":[],\"stir\":{\"allowed_attest\":[\"*any\"],\"default_attest\":\"A\",\"payload_maxduration\":\"-1\",\"privatekey_path\":\"\",\"publickey_path\":\"\"},\"store_session_costs\":false,\"terminate_attempts\":5,\"thresholds_conns\":[]}}" + cfgStr := "{\"sessions\":{\"alterable_fields\":[],\"attributes_conns\":[\"*internal\"],\"backup_interval\":\"0\",\"cdrs_conns\":[\"*internal\"],\"channel_sync_interval\":\"0\",\"chargers_conns\":[\"*internal\"],\"client_protocol\":2,\"debit_interval\":\"0\",\"default_usage\":{\"*any\":\"3h0m0s\",\"*data\":\"1048576\",\"*sms\":\"1\",\"*voice\":\"3h0m0s\"},\"enabled\":true,\"min_dur_low_balance\":\"0\",\"rals_conns\":[\"*internal\"],\"replication_conns\":[],\"resources_conns\":[\"*internal\"],\"routes_conns\":[\"*internal\"],\"scheduler_conns\":[],\"session_indexes\":[\"OriginID\"],\"session_ttl\":\"0\",\"stale_chan_max_extra_usage\":\"0\",\"stats_conns\":[],\"stir\":{\"allowed_attest\":[\"*any\"],\"default_attest\":\"A\",\"payload_maxduration\":\"-1\",\"privatekey_path\":\"\",\"publickey_path\":\"\"},\"store_session_costs\":false,\"terminate_attempts\":5,\"thresholds_conns\":[]}}" var rpl string if err := testSectRPC.Call(context.Background(), utils.ConfigSv1GetConfigAsJSON, &config.SectionWithAPIOpts{ Tenant: "cgrates.org", diff --git a/general_tests/dsp_multi_chain_it_test.go b/general_tests/dsp_multi_chain_it_test.go index f1e6665ac..39e0c7d95 100644 --- a/general_tests/dsp_multi_chain_it_test.go +++ b/general_tests/dsp_multi_chain_it_test.go @@ -55,7 +55,8 @@ func TestDispatcherMultiChain(t *testing.T) { "listen": { "rpc_json": "127.0.0.1:6012", "rpc_gob": "127.0.0.1:6013", - "http": "127.0.0.1:6080" + "http": "127.0.0.1:6080", + "birpc_json": "127.0.0.1:6014" }, "chargers": { "enabled": true @@ -78,7 +79,8 @@ func TestDispatcherMultiChain(t *testing.T) { "listen": { "rpc_json": "127.0.0.1:5012", "rpc_gob": "127.0.0.1:5013", - "http": "127.0.0.1:5080" + "http": "127.0.0.1:5080", + "birpc_json": "127.0.0.1:5014" }, "rals": { "enabled": true @@ -90,7 +92,8 @@ func TestDispatcherMultiChain(t *testing.T) { "listen": { "rpc_json": "127.0.0.1:5112", "rpc_gob": "127.0.0.1:5113", - "http": "127.0.0.1:5180" + "http": "127.0.0.1:5180", + "birpc_json": "127.0.0.1:5114" }, "rals": { "enabled": true @@ -102,7 +105,8 @@ func TestDispatcherMultiChain(t *testing.T) { "listen": { "rpc_json": "127.0.0.1:5212", "rpc_gob": "127.0.0.1:5213", - "http": "127.0.0.1:5280" + "http": "127.0.0.1:5280", + "birpc_json": "127.0.0.1:5214" }, "rals": { "enabled": true @@ -114,7 +118,8 @@ func TestDispatcherMultiChain(t *testing.T) { "listen": { "rpc_json": "127.0.0.1:5312", "rpc_gob": "127.0.0.1:5313", - "http": "127.0.0.1:5380" + "http": "127.0.0.1:5380", + "birpc_json": "127.0.0.1:5314" }, "rals": { "enabled": true @@ -126,7 +131,8 @@ func TestDispatcherMultiChain(t *testing.T) { "listen": { "rpc_json": "127.0.0.1:4012", "rpc_gob": "127.0.0.1:4013", - "http": "127.0.0.1:4080" + "http": "127.0.0.1:4080", + "birpc_json": "127.0.0.1:4014" }, "rpc_conns": { "conn_dsp1": { @@ -138,7 +144,6 @@ func TestDispatcherMultiChain(t *testing.T) { }, "sessions": { "enabled": true, - "listen_bijson": "127.0.0.1:2014", "chargers_conns": ["conn_shared"], "rals_conns": ["conn_dsp1"], "cdrs_conns": ["conn_shared"] @@ -150,7 +155,8 @@ func TestDispatcherMultiChain(t *testing.T) { "listen": { "rpc_json": "127.0.0.1:4112", "rpc_gob": "127.0.0.1:4113", - "http": "127.0.0.1:4180" + "http": "127.0.0.1:4180", + "birpc_json": "127.0.0.1:4114" }, "rpc_conns": { "conn_dsp1": { @@ -162,7 +168,6 @@ func TestDispatcherMultiChain(t *testing.T) { }, "sessions": { "enabled": true, - "listen_bijson": "127.0.0.1:2114", "chargers_conns": ["conn_shared"], "rals_conns": ["conn_dsp1"], "cdrs_conns": ["conn_shared"] @@ -174,7 +179,8 @@ func TestDispatcherMultiChain(t *testing.T) { "listen": { "rpc_json": "127.0.0.1:4212", "rpc_gob": "127.0.0.1:4213", - "http": "127.0.0.1:4280" + "http": "127.0.0.1:4280", + "birpc_json": "127.0.0.1:2214" }, "rpc_conns": { "conn_dsp2": { @@ -186,7 +192,6 @@ func TestDispatcherMultiChain(t *testing.T) { }, "sessions": { "enabled": true, - "listen_bijson": "127.0.0.1:2214", "chargers_conns": ["conn_shared"], "rals_conns": ["conn_dsp2"], "cdrs_conns": ["conn_shared"] @@ -198,7 +203,8 @@ func TestDispatcherMultiChain(t *testing.T) { "listen": { "rpc_json": "127.0.0.1:4312", "rpc_gob": "127.0.0.1:4313", - "http": "127.0.0.1:4380" + "http": "127.0.0.1:4380", + "birpc_json": "127.0.0.1:2314" }, "rpc_conns": { "conn_dsp2": { @@ -210,7 +216,6 @@ func TestDispatcherMultiChain(t *testing.T) { }, "sessions": { "enabled": true, - "listen_bijson": "127.0.0.1:2314", "chargers_conns": ["conn_shared"], "rals_conns": ["conn_dsp2"], "cdrs_conns": ["conn_shared"] @@ -222,7 +227,8 @@ func TestDispatcherMultiChain(t *testing.T) { "listen": { "rpc_json": "127.0.0.1:3012", "rpc_gob": "127.0.0.1:3013", - "http": "127.0.0.1:3080" + "http": "127.0.0.1:3080", + "birpc_json": "127.0.0.1:3014" }, "dispatchers": { "enabled": true, @@ -235,7 +241,8 @@ func TestDispatcherMultiChain(t *testing.T) { "listen": { "rpc_json": "127.0.0.1:3112", "rpc_gob": "127.0.0.1:3113", - "http": "127.0.0.1:3180" + "http": "127.0.0.1:3180", + "birpc_json": "127.0.0.1:3114" }, "dispatchers": { "enabled": true, @@ -359,7 +366,8 @@ func TestDispatcherMultiChain(t *testing.T) { "listen": { "rpc_json": "127.0.0.1:2112", "rpc_gob": "127.0.0.1:2113", - "http": "127.0.0.1:2180" + "http": "127.0.0.1:2180", + "birpc_json": "127.0.0.1:2114" }, "rpc_conns": { "conn_dsp2": { diff --git a/general_tests/dsp_routes_it_test.go b/general_tests/dsp_routes_it_test.go index 4c5b3dbd1..4fcfabb65 100644 --- a/general_tests/dsp_routes_it_test.go +++ b/general_tests/dsp_routes_it_test.go @@ -44,7 +44,8 @@ const ( "listen": { "rpc_json": ":%[2]d12", "rpc_gob": ":%[2]d13", - "http": ":%[2]d80" + "http": ":%[2]d80", + "birpc_json": ":%[2]d14" }, "dispatchers":{ "enabled": true, @@ -334,7 +335,8 @@ func TestDispatchersLoadBalanceWithAuth(t *testing.T) { "listen": { "rpc_json": ":%[2]d12", "rpc_gob": ":%[2]d13", - "http": ":%[2]d80" + "http": ":%[2]d80", + "birpc_json": ":%[2]d14" }, "apiers": { "enabled": true @@ -444,6 +446,7 @@ func TestDispatchersRoutingOnAcc(t *testing.T) { "rpc_json": ":%[2]d12", "rpc_gob": ":%[2]d13", "http": ":%[2]d80" + "birpc_json": "127.0.0.1:%[2]d14", }, "rals": { "enabled": true @@ -462,7 +465,6 @@ func TestDispatchersRoutingOnAcc(t *testing.T) { }, "sessions": { "enabled": true, - "listen_bijson": "127.0.0.1:%[2]d14", "cdrs_conns": ["*internal"], "chargers_conns": ["*internal"], "rals_conns": ["*internal"] diff --git a/integration_test.sh b/integration_test.sh index ab989c4df..623e7ebb8 100755 --- a/integration_test.sh +++ b/integration_test.sh @@ -34,7 +34,7 @@ else # Execute tests for all db types if no arguments have been passed for db in "${dbtypes[@]}"; do for pkg in "${packages[@]}"; do - execute_test "$pkg" "integration" "-dbtype=$db" + execute_test "$pkg" "integration" "-dbtype=$db" "-timeout=8m" [ "$pkg" == "apier/v1" ] && execute_test "$pkg" "offline" "-dbtype=$db" done done diff --git a/registrarc/registrarc_it_test.go b/registrarc/registrarc_it_test.go index 961f4e4b1..a29ec4396 100644 --- a/registrarc/registrarc_it_test.go +++ b/registrarc/registrarc_it_test.go @@ -71,7 +71,8 @@ func TestRegistrarC(t *testing.T) { "listen": { "rpc_json": ":%[2]d12", "rpc_gob": ":%[2]d13", - "http": ":%[2]d80" + "http": ":%[2]d80", + "birpc_json": ":%[2]d14" }, "rpc_conns": { "dispConn": { diff --git a/services/asteriskagent_it_test.go b/services/asteriskagent_it_test.go index c95b8d4ee..3c80bf135 100644 --- a/services/asteriskagent_it_test.go +++ b/services/asteriskagent_it_test.go @@ -39,7 +39,7 @@ import ( func TestAsteriskAgentReload(t *testing.T) { cfg := config.NewDefaultCGRConfig() cfg.SessionSCfg().Enabled = true - cfg.SessionSCfg().ListenBiJSON = "" + cfg.ListenCfg().BiJSONListen = "" utils.Logger, _ = utils.Newlogger(utils.MetaSysLog, cfg.GeneralCfg().NodeID) utils.Logger.SetLogLevel(7) filterSChan := make(chan *engine.FilterS, 1) @@ -69,7 +69,7 @@ func TestAsteriskAgentReload(t *testing.T) { db := NewDataDBService(cfg, cm, false, srvDep) anz := NewAnalyzerService(cfg, server, filterSChan, shdChan, make(chan birpc.ClientConnector, 1), srvDep) sS := NewSessionService(cfg, db, server, make(chan birpc.ClientConnector, 1), - shdChan, cm, anz, srvDep) + cm, anz, srvDep) astService := NewAsteriskAgent(cfg, shdChan, cm, srvDep) srvMngr.AddServices(astService, sS, db) if err := srvMngr.StartServices(); err != nil { @@ -112,7 +112,7 @@ func TestAsteriskAgentReload(t *testing.T) { func TestAsteriskAgentReload2(t *testing.T) { cfg := config.NewDefaultCGRConfig() cfg.SessionSCfg().Enabled = true - cfg.SessionSCfg().ListenBiJSON = "" + cfg.ListenCfg().BiJSONListen = "" utils.Logger, _ = utils.Newlogger(utils.MetaSysLog, cfg.GeneralCfg().NodeID) utils.Logger.SetLogLevel(7) filterSChan := make(chan *engine.FilterS, 1) @@ -141,7 +141,7 @@ func TestAsteriskAgentReload2(t *testing.T) { db := NewDataDBService(cfg, cm, false, srvDep) anz := NewAnalyzerService(cfg, server, filterSChan, shdChan, make(chan birpc.ClientConnector, 1), srvDep) sS := NewSessionService(cfg, db, server, make(chan birpc.ClientConnector, 1), - shdChan, cm, anz, srvDep) + cm, anz, srvDep) astSrv := NewAsteriskAgent(cfg, shdChan, cm, srvDep) srvMngr.AddServices(astSrv, sS, db) if err := srvMngr.StartServices(); err != nil { diff --git a/services/asteriskagent_test.go b/services/asteriskagent_test.go index 79178b70f..0d5ff5f35 100644 --- a/services/asteriskagent_test.go +++ b/services/asteriskagent_test.go @@ -33,7 +33,7 @@ import ( func TestAsteriskAgentCoverage(t *testing.T) { cfg := config.NewDefaultCGRConfig() cfg.SessionSCfg().Enabled = true - cfg.SessionSCfg().ListenBiJSON = "" + cfg.ListenCfg().BiJSONListen = "" filterSChan := make(chan *engine.FilterS, 1) filterSChan <- nil shdChan := utils.NewSyncedChan() @@ -88,7 +88,7 @@ func TestAsteriskAgentCoverage(t *testing.T) { func TestAsteriskReload(t *testing.T) { cfg := config.NewDefaultCGRConfig() cfg.SessionSCfg().Enabled = true - cfg.SessionSCfg().ListenBiJSON = "" + cfg.ListenCfg().BiJSONListen = "" filterSChan := make(chan *engine.FilterS, 1) filterSChan <- nil shdChan := utils.NewSyncedChan() diff --git a/services/datadb_it_test.go b/services/datadb_it_test.go index b69f1a6c4..5171569c6 100644 --- a/services/datadb_it_test.go +++ b/services/datadb_it_test.go @@ -680,7 +680,7 @@ func TestDataDBStartSessionSCfgErr(t *testing.T) { db := NewDataDBService(cfg, cM, false, srvDep) cfg.DataDbCfg().Type = "badtype" cfg.SessionSCfg().Enabled = true - cfg.SessionSCfg().ListenBiJSON = "" + cfg.ListenCfg().BiJSONListen = "" err := db.Start() if err != nil { t.Errorf("\nExpecting <%+v>,\n Received <%+v>", nil, err) @@ -694,7 +694,7 @@ func TestDataDBStartRalsSCfgErr(t *testing.T) { db := NewDataDBService(cfg, cM, false, srvDep) cfg.DataDbCfg().Type = "badtype" db.cfg.RalsCfg().Enabled = true - cfg.SessionSCfg().ListenBiJSON = "" + cfg.ListenCfg().BiJSONListen = "" err := db.Start() if err == nil || err.Error() != "unsupported db_type " { t.Errorf("\nExpecting <%+v>,\n Received <%+v>", "unsupported db_type ", err) diff --git a/services/diameteragent_it_test.go b/services/diameteragent_it_test.go index d3f1a80a1..b26c2fe97 100644 --- a/services/diameteragent_it_test.go +++ b/services/diameteragent_it_test.go @@ -38,7 +38,7 @@ import ( func TestDiameterAgentReload1(t *testing.T) { cfg := config.NewDefaultCGRConfig() cfg.SessionSCfg().Enabled = true - cfg.SessionSCfg().ListenBiJSON = "" + cfg.ListenCfg().BiJSONListen = "" utils.Logger, _ = utils.Newlogger(utils.MetaSysLog, cfg.GeneralCfg().NodeID) utils.Logger.SetLogLevel(7) filterSChan := make(chan *engine.FilterS, 1) @@ -58,7 +58,7 @@ func TestDiameterAgentReload1(t *testing.T) { db := NewDataDBService(cfg, nil, false, srvDep) anz := NewAnalyzerService(cfg, server, filterSChan, shdChan, make(chan birpc.ClientConnector, 1), srvDep) sS := NewSessionService(cfg, db, server, make(chan birpc.ClientConnector, 1), - shdChan, nil, anz, srvDep) + nil, anz, srvDep) diamSrv := NewDiameterAgent(cfg, filterSChan, shdChan, nil, nil, srvDep) engine.NewConnManager(cfg, nil) srvMngr.AddServices(diamSrv, sS, db) @@ -108,7 +108,7 @@ func TestDiameterAgentReload1(t *testing.T) { func TestDiameterAgentReload2(t *testing.T) { cfg := config.NewDefaultCGRConfig() cfg.SessionSCfg().Enabled = true - cfg.SessionSCfg().ListenBiJSON = "" + cfg.ListenCfg().BiJSONListen = "" utils.Logger, _ = utils.Newlogger(utils.MetaSysLog, cfg.GeneralCfg().NodeID) utils.Logger.SetLogLevel(7) filterSChan := make(chan *engine.FilterS, 1) diff --git a/services/dnsagent_it_test.go b/services/dnsagent_it_test.go index 4dc0dfbd3..0f0ba6816 100644 --- a/services/dnsagent_it_test.go +++ b/services/dnsagent_it_test.go @@ -40,7 +40,7 @@ import ( func TestDNSAgentStartReloadShut(t *testing.T) { cfg := config.NewDefaultCGRConfig() cfg.SessionSCfg().Enabled = true - cfg.SessionSCfg().ListenBiJSON = "" + cfg.ListenCfg().BiJSONListen = "" cfg.DNSAgentCfg().Enabled = true cfg.DNSAgentCfg().Listeners = []config.DnsListener{ { @@ -66,7 +66,7 @@ func TestDNSAgentStartReloadShut(t *testing.T) { server := cores.NewServer(nil) anz := NewAnalyzerService(cfg, server, filterSChan, shdChan, make(chan birpc.ClientConnector, 1), srvDep) sS := NewSessionService(cfg, db, server, make(chan birpc.ClientConnector, 1), - shdChan, nil, anz, srvDep) + nil, anz, srvDep) srvMngr.AddServices(srv, sS, db) runtime.Gosched() time.Sleep(10 * time.Millisecond) //need to switch to gorutine @@ -95,7 +95,7 @@ func TestDNSAgentReloadFirst(t *testing.T) { cfg := config.NewDefaultCGRConfig() cfg.SessionSCfg().Enabled = true - cfg.SessionSCfg().ListenBiJSON = "" + cfg.ListenCfg().BiJSONListen = "" utils.Logger, _ = utils.Newlogger(utils.MetaSysLog, cfg.GeneralCfg().NodeID) utils.Logger.SetLogLevel(7) filterSChan := make(chan *engine.FilterS, 1) @@ -120,7 +120,7 @@ func TestDNSAgentReloadFirst(t *testing.T) { db := NewDataDBService(cfg, nil, false, srvDep) anz := NewAnalyzerService(cfg, server, filterSChan, shdChan, make(chan birpc.ClientConnector, 1), srvDep) sS := NewSessionService(cfg, db, server, make(chan birpc.ClientConnector, 1), - shdChan, nil, anz, srvDep) + nil, anz, srvDep) srv := NewDNSAgent(cfg, filterSChan, shdChan, nil, nil, srvDep) engine.NewConnManager(cfg, nil) srvMngr.AddServices(srv, sS, db) @@ -181,7 +181,7 @@ func TestDNSAgentReloadFirst(t *testing.T) { func TestDNSAgentReload2(t *testing.T) { cfg := config.NewDefaultCGRConfig() cfg.SessionSCfg().Enabled = true - cfg.SessionSCfg().ListenBiJSON = "" + cfg.ListenCfg().BiJSONListen = "" cfg.DNSAgentCfg().Enabled = true cfg.DNSAgentCfg().Listeners[0].Network = "test" cfg.DNSAgentCfg().Listeners[0].Address = "test" diff --git a/services/dnsagent_test.go b/services/dnsagent_test.go index b1399ada9..cf9fcc5a8 100644 --- a/services/dnsagent_test.go +++ b/services/dnsagent_test.go @@ -32,7 +32,7 @@ import ( func TestDNSAgentCoverage(t *testing.T) { cfg := config.NewDefaultCGRConfig() cfg.SessionSCfg().Enabled = true - cfg.SessionSCfg().ListenBiJSON = "" + cfg.ListenCfg().BiJSONListen = "" filterSChan := make(chan *engine.FilterS, 1) filterSChan <- nil shdChan := utils.NewSyncedChan() diff --git a/services/ers_it_test.go b/services/ers_it_test.go index 26be1b2de..28cfcee83 100644 --- a/services/ers_it_test.go +++ b/services/ers_it_test.go @@ -52,7 +52,7 @@ func TestEventReaderSReload(t *testing.T) { utils.Logger, _ = utils.Newlogger(utils.MetaSysLog, cfg.GeneralCfg().NodeID) utils.Logger.SetLogLevel(7) cfg.SessionSCfg().Enabled = true - cfg.SessionSCfg().ListenBiJSON = "" + cfg.ListenCfg().BiJSONListen = "" filterSChan := make(chan *engine.FilterS, 1) filterSChan <- nil shdChan := utils.NewSyncedChan() @@ -66,7 +66,7 @@ func TestEventReaderSReload(t *testing.T) { srvDep := map[string]*sync.WaitGroup{utils.DataDB: new(sync.WaitGroup)} anz := NewAnalyzerService(cfg, server, filterSChan, shdChan, make(chan birpc.ClientConnector, 1), srvDep) db := NewDataDBService(cfg, nil, false, srvDep) - sS := NewSessionService(cfg, db, server, make(chan birpc.ClientConnector, 1), shdChan, nil, anz, srvDep) + sS := NewSessionService(cfg, db, server, make(chan birpc.ClientConnector, 1), nil, anz, srvDep) intERsConn := make(chan birpc.ClientConnector, 1) erS := NewEventReaderService(cfg, db, filterSChan, shdChan, nil, server, intERsConn, anz, srvDep) engine.NewConnManager(cfg, nil) diff --git a/services/freeswitchagent_it_test.go b/services/freeswitchagent_it_test.go index 02b7e60f6..277df72e0 100644 --- a/services/freeswitchagent_it_test.go +++ b/services/freeswitchagent_it_test.go @@ -41,7 +41,7 @@ func TestFreeSwitchAgentReload(t *testing.T) { cfg := config.NewDefaultCGRConfig() cfg.SessionSCfg().Enabled = true - cfg.SessionSCfg().ListenBiJSON = "" + cfg.ListenCfg().BiJSONListen = "" utils.Logger, _ = utils.Newlogger(utils.MetaSysLog, cfg.GeneralCfg().NodeID) utils.Logger.SetLogLevel(7) filterSChan := make(chan *engine.FilterS, 1) @@ -70,7 +70,7 @@ func TestFreeSwitchAgentReload(t *testing.T) { db := NewDataDBService(cfg, cm, false, srvDep) anz := NewAnalyzerService(cfg, server, filterSChan, shdChan, make(chan birpc.ClientConnector, 1), srvDep) sS := NewSessionService(cfg, db, server, make(chan birpc.ClientConnector, 1), - shdChan, cm, anz, srvDep) + cm, anz, srvDep) srv := NewFreeswitchAgent(cfg, shdChan, cm, srvDep) srvMngr.AddServices(srv, sS, db) if err := srvMngr.StartServices(); err != nil { @@ -99,7 +99,7 @@ func TestFreeSwitchAgentReload2(t *testing.T) { cfg := config.NewDefaultCGRConfig() cfg.SessionSCfg().Enabled = true - cfg.SessionSCfg().ListenBiJSON = "" + cfg.ListenCfg().BiJSONListen = "" utils.Logger, _ = utils.Newlogger(utils.MetaSysLog, cfg.GeneralCfg().NodeID) utils.Logger.SetLogLevel(7) filterSChan := make(chan *engine.FilterS, 1) @@ -139,7 +139,7 @@ func TestFreeSwitchAgentReload3(t *testing.T) { cfg := config.NewDefaultCGRConfig() cfg.SessionSCfg().Enabled = true - cfg.SessionSCfg().ListenBiJSON = "" + cfg.ListenCfg().BiJSONListen = "" utils.Logger, _ = utils.Newlogger(utils.MetaSysLog, cfg.GeneralCfg().NodeID) utils.Logger.SetLogLevel(7) filterSChan := make(chan *engine.FilterS, 1) diff --git a/services/freeswitchagent_test.go b/services/freeswitchagent_test.go index b04c5263f..565183659 100644 --- a/services/freeswitchagent_test.go +++ b/services/freeswitchagent_test.go @@ -33,7 +33,7 @@ import ( func TestFreeSwitchAgentCoverage(t *testing.T) { cfg := config.NewDefaultCGRConfig() cfg.SessionSCfg().Enabled = true - cfg.SessionSCfg().ListenBiJSON = "" + cfg.ListenCfg().BiJSONListen = "" filterSChan := make(chan *engine.FilterS, 1) filterSChan <- nil shdChan := utils.NewSyncedChan() diff --git a/services/httpagent_it_test.go b/services/httpagent_it_test.go index 521dabe8a..a4b5d63d9 100644 --- a/services/httpagent_it_test.go +++ b/services/httpagent_it_test.go @@ -39,7 +39,7 @@ import ( func TestHTTPAgentReload(t *testing.T) { cfg := config.NewDefaultCGRConfig() cfg.SessionSCfg().Enabled = true - cfg.SessionSCfg().ListenBiJSON = "" + cfg.ListenCfg().BiJSONListen = "" utils.Logger, _ = utils.Newlogger(utils.MetaSysLog, cfg.GeneralCfg().NodeID) utils.Logger.SetLogLevel(7) filterSChan := make(chan *engine.FilterS, 1) @@ -63,7 +63,7 @@ func TestHTTPAgentReload(t *testing.T) { db := NewDataDBService(cfg, nil, false, srvDep) anz := NewAnalyzerService(cfg, server, filterSChan, shdChan, make(chan birpc.ClientConnector, 1), srvDep) sS := NewSessionService(cfg, db, server, make(chan birpc.ClientConnector, 1), - shdChan, nil, anz, srvDep) + nil, anz, srvDep) srv := NewHTTPAgent(cfg, filterSChan, server, nil, srvDep) engine.NewConnManager(cfg, nil) srvMngr.AddServices(srv, sS, db) diff --git a/services/kamailioagent_it_test.go b/services/kamailioagent_it_test.go index e46752c12..4b1477944 100644 --- a/services/kamailioagent_it_test.go +++ b/services/kamailioagent_it_test.go @@ -43,7 +43,7 @@ func TestKamailioAgentReload(t *testing.T) { cfg := config.NewDefaultCGRConfig() cfg.SessionSCfg().Enabled = true - cfg.SessionSCfg().ListenBiJSON = "" + cfg.ListenCfg().BiJSONListen = "" utils.Logger, _ = utils.Newlogger(utils.MetaSysLog, cfg.GeneralCfg().NodeID) utils.Logger.SetLogLevel(7) filterSChan := make(chan *engine.FilterS, 1) @@ -74,7 +74,7 @@ func TestKamailioAgentReload(t *testing.T) { db := NewDataDBService(cfg, cm, false, srvDep) anz := NewAnalyzerService(cfg, server, filterSChan, shdChan, make(chan birpc.ClientConnector, 1), srvDep) sS := NewSessionService(cfg, db, server, make(chan birpc.ClientConnector, 1), - shdChan, cm, anz, srvDep) + cm, anz, srvDep) srv := NewKamailioAgent(cfg, shdChan, cm, srvDep) srvMngr.AddServices(srv, sS, db) if err := srvMngr.StartServices(); err != nil { @@ -121,7 +121,7 @@ func TestKamailioAgentReload(t *testing.T) { func TestKamailioAgentReload2(t *testing.T) { cfg := config.NewDefaultCGRConfig() cfg.SessionSCfg().Enabled = true - cfg.SessionSCfg().ListenBiJSON = "" + cfg.ListenCfg().BiJSONListen = "" utils.Logger, _ = utils.Newlogger(utils.MetaSysLog, cfg.GeneralCfg().NodeID) utils.Logger.SetLogLevel(7) filterSChan := make(chan *engine.FilterS, 1) @@ -146,7 +146,7 @@ func TestKamailioAgentReload2(t *testing.T) { func TestKamailioAgentReload3(t *testing.T) { cfg := config.NewDefaultCGRConfig() cfg.SessionSCfg().Enabled = true - cfg.SessionSCfg().ListenBiJSON = "" + cfg.ListenCfg().BiJSONListen = "" utils.Logger, _ = utils.Newlogger(utils.MetaSysLog, cfg.GeneralCfg().NodeID) utils.Logger.SetLogLevel(7) filterSChan := make(chan *engine.FilterS, 1) diff --git a/services/kamailioagent_test.go b/services/kamailioagent_test.go index 577e715a2..b54d76272 100644 --- a/services/kamailioagent_test.go +++ b/services/kamailioagent_test.go @@ -35,7 +35,7 @@ func TestKamailioAgentCoverage(t *testing.T) { cfg := config.NewDefaultCGRConfig() cfg.SessionSCfg().Enabled = true - cfg.SessionSCfg().ListenBiJSON = "" + cfg.ListenCfg().BiJSONListen = "" filterSChan := make(chan *engine.FilterS, 1) filterSChan <- nil shdChan := utils.NewSyncedChan() diff --git a/services/radiusagent_it_test.go b/services/radiusagent_it_test.go index de760928c..62a127b09 100644 --- a/services/radiusagent_it_test.go +++ b/services/radiusagent_it_test.go @@ -40,7 +40,7 @@ import ( func TestRadiusAgentReloadStartShut(t *testing.T) { cfg := config.NewDefaultCGRConfig() cfg.SessionSCfg().Enabled = true - cfg.SessionSCfg().ListenBiJSON = "" + cfg.ListenCfg().BiJSONListen = "" cfg.RadiusAgentCfg().Enabled = true cfg.RadiusAgentCfg().Listeners = []config.RadiusListener{ { @@ -68,7 +68,7 @@ func TestRadiusAgentReloadStartShut(t *testing.T) { server := cores.NewServer(nil) anz := NewAnalyzerService(cfg, server, filterSChan, shdChan, make(chan birpc.ClientConnector, 1), srvDep) sS := NewSessionService(cfg, db, server, make(chan birpc.ClientConnector, 1), - shdChan, nil, anz, srvDep) + nil, anz, srvDep) srvMngr.AddServices(srv, sS, db) runtime.Gosched() time.Sleep(10 * time.Millisecond) //need to switch to gorutine @@ -97,7 +97,7 @@ func TestRadiusAgentReload1(t *testing.T) { cfg := config.NewDefaultCGRConfig() cfg.SessionSCfg().Enabled = true - cfg.SessionSCfg().ListenBiJSON = "" + cfg.ListenCfg().BiJSONListen = "" utils.Logger, _ = utils.Newlogger(utils.MetaSysLog, cfg.GeneralCfg().NodeID) utils.Logger.SetLogLevel(7) filterSChan := make(chan *engine.FilterS, 1) @@ -122,7 +122,7 @@ func TestRadiusAgentReload1(t *testing.T) { db := NewDataDBService(cfg, nil, false, srvDep) anz := NewAnalyzerService(cfg, server, filterSChan, shdChan, make(chan birpc.ClientConnector, 1), srvDep) sS := NewSessionService(cfg, db, server, make(chan birpc.ClientConnector, 1), - shdChan, nil, anz, srvDep) + nil, anz, srvDep) srv := NewRadiusAgent(cfg, filterSChan, shdChan, nil, nil, srvDep) engine.NewConnManager(cfg, nil) srvMngr.AddServices(srv, sS, db) @@ -192,7 +192,7 @@ func TestRadiusAgentReload2(t *testing.T) { db := NewDataDBService(cfg, nil, false, srvDep) anz := NewAnalyzerService(cfg, server, filterSChan, shdChan, make(chan birpc.ClientConnector, 1), srvDep) sS := NewSessionService(cfg, db, server, make(chan birpc.ClientConnector, 1), - shdChan, nil, anz, srvDep) + nil, anz, srvDep) srv := NewRadiusAgent(cfg, filterSChan, shdChan, nil, nil, srvDep) engine.NewConnManager(cfg, nil) srvMngr.AddServices(srv, sS, db) diff --git a/services/radiusagent_test.go b/services/radiusagent_test.go index e6ec902a1..cc438da93 100644 --- a/services/radiusagent_test.go +++ b/services/radiusagent_test.go @@ -33,7 +33,7 @@ import ( func TestRadiusAgentCoverage(t *testing.T) { cfg := config.NewDefaultCGRConfig() cfg.SessionSCfg().Enabled = true - cfg.SessionSCfg().ListenBiJSON = "" + cfg.ListenCfg().BiJSONListen = "" filterSChan := make(chan *engine.FilterS, 1) filterSChan <- nil shdChan := utils.NewSyncedChan() diff --git a/services/sessions_it_test.go b/services/sessions_it_test.go index fdd1bd071..b974cf7f9 100644 --- a/services/sessions_it_test.go +++ b/services/sessions_it_test.go @@ -105,7 +105,7 @@ func TestSessionSReload1(t *testing.T) { if err := dmService.Start(); err != nil { t.Fatal(err) } - srv := NewSessionService(cfg, dmService, server, make(chan birpc.ClientConnector, 1), shdChan, conMng, anz, srvDep) + srv := NewSessionService(cfg, dmService, server, make(chan birpc.ClientConnector, 1), conMng, anz, srvDep) err := srv.Start() if err != nil { t.Fatal(err) @@ -135,7 +135,7 @@ func TestSessionSReload1(t *testing.T) { } rply := new(sessions.V1InitSessionReply) - srv.(*SessionService).sm.BiRPCv1InitiateSession(context.Background(), args, rply) + srv.sm.BiRPCv1InitiateSession(context.Background(), args, rply) if err = srv.Shutdown(); err != nil { t.Error(err) } @@ -180,9 +180,9 @@ func TestSessionSReload2(t *testing.T) { db := NewDataDBService(cfg, nil, false, srvDep) cfg.StorDbCfg().Type = utils.MetaInternal anz := NewAnalyzerService(cfg, server, filterSChan, shdChan, make(chan birpc.ClientConnector, 1), srvDep) - srv := NewSessionService(cfg, db, server, make(chan birpc.ClientConnector, 1), shdChan, nil, anz, srvDep) + srv := NewSessionService(cfg, db, server, make(chan birpc.ClientConnector, 1), nil, anz, srvDep) engine.NewConnManager(cfg, nil) - srv.(*SessionService).sm = &sessions.SessionS{} + srv.sm = &sessions.SessionS{} if !srv.IsRunning() { t.Fatalf("\nExpecting service to be running") } @@ -196,7 +196,7 @@ func TestSessionSReload2(t *testing.T) { t.Fatalf("\nExpecting ,\n Received <%+v>", err) } time.Sleep(10 * time.Millisecond) - srv.(*SessionService).sm = nil + srv.sm = nil if srv.IsRunning() { t.Fatalf("Expected service to be down") } @@ -244,10 +244,10 @@ func TestSessionSReload3(t *testing.T) { db := NewDataDBService(cfg, nil, false, srvDep) cfg.StorDbCfg().Type = utils.MetaInternal anz := NewAnalyzerService(cfg, server, filterSChan, shdChan, make(chan birpc.ClientConnector, 1), srvDep) - srv := NewSessionService(cfg, db, server, make(chan birpc.ClientConnector, 1), shdChan, nil, anz, srvDep) + srv := NewSessionService(cfg, db, server, make(chan birpc.ClientConnector, 1), nil, anz, srvDep) engine.NewConnManager(cfg, nil) - srv.(*SessionService).sm = &sessions.SessionS{} + srv.sm = &sessions.SessionS{} if !srv.IsRunning() { t.Fatalf("\nExpecting service to be running") } @@ -255,8 +255,4 @@ func TestSessionSReload3(t *testing.T) { time.Sleep(10 * time.Millisecond) server.StopBiRPC() }() - err2 := srv.(*SessionService).start() - if err2 != nil { - t.Fatalf("\nExpected <%+v>, \nReceived <%+v>", nil, err2) - } } diff --git a/services/sessions_test.go b/services/sessions_test.go index 2cb22370e..2ffc230e7 100644 --- a/services/sessions_test.go +++ b/services/sessions_test.go @@ -54,7 +54,7 @@ func TestSessionSCoverage(t *testing.T) { db := NewDataDBService(cfg, nil, false, srvDep) cfg.StorDbCfg().Type = utils.MetaInternal anz := NewAnalyzerService(cfg, server, filterSChan, shdChan, make(chan birpc.ClientConnector, 1), srvDep) - srv := NewSessionService(cfg, db, server, make(chan birpc.ClientConnector, 1), shdChan, nil, anz, srvDep) + srv := NewSessionService(cfg, db, server, make(chan birpc.ClientConnector, 1), nil, anz, srvDep) engine.NewConnManager(cfg, nil) if srv.IsRunning() { t.Errorf("Expected service to be down") @@ -63,7 +63,6 @@ func TestSessionSCoverage(t *testing.T) { cfg: cfg, dm: db, server: server, - shdChan: shdChan, connChan: make(chan birpc.ClientConnector, 1), connMgr: nil, anz: anz, diff --git a/services/sipagent_it_test.go b/services/sipagent_it_test.go index 86b505ef3..94c3fbe01 100644 --- a/services/sipagent_it_test.go +++ b/services/sipagent_it_test.go @@ -40,7 +40,7 @@ func TestSIPAgentReload(t *testing.T) { cfg := config.NewDefaultCGRConfig() cfg.SessionSCfg().Enabled = true - cfg.SessionSCfg().ListenBiJSON = "" + cfg.ListenCfg().BiJSONListen = "" utils.Logger, _ = utils.Newlogger(utils.MetaSysLog, cfg.GeneralCfg().NodeID) utils.Logger.SetLogLevel(7) filterSChan := make(chan *engine.FilterS, 1) @@ -61,7 +61,7 @@ func TestSIPAgentReload(t *testing.T) { db := NewDataDBService(cfg, nil, false, srvDep) anz := NewAnalyzerService(cfg, server, filterSChan, shdChan, make(chan birpc.ClientConnector, 1), srvDep) sS := NewSessionService(cfg, db, server, make(chan birpc.ClientConnector, 1), - shdChan, nil, anz, srvDep) + nil, anz, srvDep) srv := NewSIPAgent(cfg, filterSChan, shdChan, nil, srvDep) engine.NewConnManager(cfg, nil) srvMngr.AddServices(srv, sS, db) @@ -109,7 +109,7 @@ func TestSIPAgentReload(t *testing.T) { func TestSIPAgentReload2(t *testing.T) { cfg := config.NewDefaultCGRConfig() cfg.SessionSCfg().Enabled = true - cfg.SessionSCfg().ListenBiJSON = "" + cfg.ListenCfg().BiJSONListen = "" utils.Logger, _ = utils.Newlogger(utils.MetaSysLog, cfg.GeneralCfg().NodeID) utils.Logger.SetLogLevel(7) filterSChan := make(chan *engine.FilterS, 1) @@ -146,7 +146,7 @@ func TestSIPAgentReload2(t *testing.T) { func TestSIPAgentReload3(t *testing.T) { cfg := config.NewDefaultCGRConfig() cfg.SessionSCfg().Enabled = true - cfg.SessionSCfg().ListenBiJSON = "" + cfg.ListenCfg().BiJSONListen = "" utils.Logger, _ = utils.Newlogger(utils.MetaSysLog, cfg.GeneralCfg().NodeID) utils.Logger.SetLogLevel(7) filterSChan := make(chan *engine.FilterS, 1) diff --git a/services/sipagent_test.go b/services/sipagent_test.go index 78181edb7..d72561e72 100644 --- a/services/sipagent_test.go +++ b/services/sipagent_test.go @@ -33,7 +33,7 @@ import ( func TestSIPAgentCoverage(t *testing.T) { cfg := config.NewDefaultCGRConfig() cfg.SessionSCfg().Enabled = true - cfg.SessionSCfg().ListenBiJSON = "" + cfg.ListenCfg().BiJSONListen = "" filterSChan := make(chan *engine.FilterS, 1) filterSChan <- nil shdChan := utils.NewSyncedChan() diff --git a/services/thresholds_it_test.go b/services/thresholds_it_test.go index d47e72996..31c29567e 100644 --- a/services/thresholds_it_test.go +++ b/services/thresholds_it_test.go @@ -37,7 +37,6 @@ import ( ) func TestThresholdSReload(t *testing.T) { - // utils.Logger.SetLogLevel(7) cfg := config.NewDefaultCGRConfig() cfg.ApierCfg().Enabled = true utils.Logger, _ = utils.Newlogger(utils.MetaSysLog, cfg.GeneralCfg().NodeID) @@ -115,9 +114,9 @@ func TestThresholdSReload(t *testing.T) { } shdChan.CloseOnce() time.Sleep(10 * time.Millisecond) + tS.server.StopBiRPC() // needed when running tests in bulk } func TestThresholdSReload2(t *testing.T) { - // utils.Logger.SetLogLevel(7) cfg := config.NewDefaultCGRConfig() cfg.ApierCfg().Enabled = true utils.Logger, _ = utils.Newlogger(utils.MetaSysLog, cfg.GeneralCfg().NodeID) @@ -192,4 +191,5 @@ func TestThresholdSReload2(t *testing.T) { } shdChan.CloseOnce() time.Sleep(10 * time.Millisecond) + tS.server.StopBiRPC() // needed when running tests in bulk } diff --git a/sessions/sessions_birpc_it_test.go b/sessions/sessions_birpc_it_test.go index e890eb99c..844425d45 100644 --- a/sessions/sessions_birpc_it_test.go +++ b/sessions/sessions_birpc_it_test.go @@ -119,12 +119,12 @@ func testSessionsBiRPCApierRpcConn(t *testing.T) { if err != nil { t.Fatal(err) } - dummyClnt, err := utils.NewBiJSONrpcClient(sessionsBiRPCCfg.SessionSCfg().ListenBiJSON, + dummyClnt, err := utils.NewBiJSONrpcClient(sessionsBiRPCCfg.ListenCfg().BiJSONListen, srv) if err != nil { // First attempt is to make sure multiple clients are supported t.Fatal(err) } - if sessionsBiRPC, err = utils.NewBiJSONrpcClient(sessionsBiRPCCfg.SessionSCfg().ListenBiJSON, + if sessionsBiRPC, err = utils.NewBiJSONrpcClient(sessionsBiRPCCfg.ListenCfg().BiJSONListen, srv); err != nil { t.Fatal(err) }