diff --git a/config/config_defaults.go b/config/config_defaults.go index e0c2832ff..87417ae9f 100644 --- a/config/config_defaults.go +++ b/config/config_defaults.go @@ -86,7 +86,6 @@ const CGRATES_CFG_JSON = ` "items":{ "*accounts":{"remote":false, "replicate":false}, "*actions":{"remote":false, "replicate":false}, - "*timings": {"remote":false, "replicate":false}, "*resource_profiles":{"remote":false, "replicate":false}, "*resources":{"remote":false, "replicate":false}, "*statqueue_profiles": {"remote":false, "replicate":false}, @@ -137,8 +136,7 @@ const CGRATES_CFG_JSON = ` }, "items":{ "*session_costs": {"remote":false, "replicate":false}, - "*cdrs": {"remote":false, "replicate":false}, - "*tp_timings":{"remote":false, "replicate":false}, + "*cdrs": {"remote":false, "replicate":false}, "*tp_resources":{"remote":false, "replicate":false}, "*tp_stats":{"remote":false, "replicate":false}, "*tp_thresholds": {"remote":false, "replicate":false}, @@ -207,7 +205,6 @@ const CGRATES_CFG_JSON = ` "caches":{ "partitions": { - "*timings": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false}, // timings caching "*resource_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false}, // control resource profiles caching "*resources": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false}, // control resources caching "*event_resources": {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, // matching resources to events @@ -256,8 +253,7 @@ const CGRATES_CFG_JSON = ` "*versions": {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, // for version storing // internal storDB tabels "*session_costs": {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, - "*cdrs": {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, - "*tp_timings":{"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, + "*cdrs": {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, "*tp_resources":{"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, "*tp_stats":{"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, diff --git a/config/config_json_test.go b/config/config_json_test.go index 85b143aeb..e53344849 100644 --- a/config/config_json_test.go +++ b/config/config_json_test.go @@ -85,9 +85,6 @@ func TestDfCoreSJsonCfg(t *testing.T) { func TestCacheJsonCfg(t *testing.T) { eCfg := &CacheJsonCfg{ Partitions: map[string]*CacheParamJsonCfg{ - utils.CacheTimings: {Limit: utils.IntPointer(-1), - Ttl: utils.StringPointer(""), Static_ttl: utils.BoolPointer(false), - Precache: utils.BoolPointer(false), Replicate: utils.BoolPointer(false)}, utils.CacheResourceProfiles: {Limit: utils.IntPointer(-1), Ttl: utils.StringPointer(""), Static_ttl: utils.BoolPointer(false), Precache: utils.BoolPointer(false), Replicate: utils.BoolPointer(false)}, @@ -218,9 +215,6 @@ func TestCacheJsonCfg(t *testing.T) { utils.CacheTBLTPResources: {Limit: utils.IntPointer(-1), Ttl: utils.StringPointer(""), Static_ttl: utils.BoolPointer(false), Replicate: utils.BoolPointer(false)}, - utils.CacheTBLTPTimings: {Limit: utils.IntPointer(-1), - Ttl: utils.StringPointer(""), Static_ttl: utils.BoolPointer(false), - Replicate: utils.BoolPointer(false)}, utils.CacheTBLTPThresholds: {Limit: utils.IntPointer(-1), Ttl: utils.StringPointer(""), Static_ttl: utils.BoolPointer(false), Replicate: utils.BoolPointer(false)}, @@ -334,10 +328,6 @@ func TestDfDataDbJsonCfg(t *testing.T) { Replicate: utils.BoolPointer(false), Remote: utils.BoolPointer(false), }, - utils.CacheTimings: { - Replicate: utils.BoolPointer(false), - Remote: utils.BoolPointer(false), - }, utils.MetaResourceProfile: { Replicate: utils.BoolPointer(false), Remote: utils.BoolPointer(false), @@ -434,10 +424,6 @@ func TestDfStorDBJsonCfg(t *testing.T) { utils.MysqlLocation: "Local", }, Items: map[string]*ItemOptJson{ - utils.CacheTBLTPTimings: { - Replicate: utils.BoolPointer(false), - Remote: utils.BoolPointer(false), - }, utils.CacheTBLTPResources: { Replicate: utils.BoolPointer(false), Remote: utils.BoolPointer(false), diff --git a/config/config_test.go b/config/config_test.go index baf950d8c..1b521febb 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -473,8 +473,6 @@ func TestCgrCfgJSONDefaultsSMGenericCfg(t *testing.T) { func TestCgrCfgJSONDefaultsCacheCFG(t *testing.T) { eCacheCfg := &CacheCfg{ Partitions: map[string]*CacheParamCfg{ - utils.CacheTimings: {Limit: -1, - TTL: 0, StaticTTL: false, Precache: false}, utils.CacheResourceProfiles: {Limit: -1, TTL: 0, StaticTTL: false, Precache: false}, utils.CacheResources: {Limit: -1, @@ -559,8 +557,6 @@ func TestCgrCfgJSONDefaultsCacheCFG(t *testing.T) { utils.CacheVersions: {Limit: -1, TTL: 0, StaticTTL: false, Precache: false}, - utils.CacheTBLTPTimings: {Limit: -1, - TTL: 0, StaticTTL: false, Precache: false}, utils.CacheTBLTPResources: {Limit: -1, TTL: 0, StaticTTL: false, Precache: false}, utils.CacheTBLTPStats: {Limit: -1, @@ -4776,7 +4772,7 @@ func TestV1GetConfigAsJSONGeneral(t *testing.T) { func TestV1GetConfigAsJSONDataDB(t *testing.T) { var reply string - expected := `{"data_db":{"db_host":"127.0.0.1","db_name":"10","db_password":"","db_port":6379,"db_type":"*redis","db_user":"cgrates","items":{"*accounts":{"remote":false,"replicate":false},"*action_profiles":{"remote":false,"replicate":false},"*actions":{"remote":false,"replicate":false},"*attribute_profiles":{"remote":false,"replicate":false},"*charger_profiles":{"remote":false,"replicate":false},"*dispatcher_hosts":{"remote":false,"replicate":false},"*dispatcher_profiles":{"remote":false,"replicate":false},"*filters":{"remote":false,"replicate":false},"*indexes":{"remote":false,"replicate":false},"*load_ids":{"remote":false,"replicate":false},"*rate_profiles":{"remote":false,"replicate":false},"*resource_profiles":{"remote":false,"replicate":false},"*resources":{"remote":false,"replicate":false},"*route_profiles":{"remote":false,"replicate":false},"*statqueue_profiles":{"remote":false,"replicate":false},"*statqueues":{"remote":false,"replicate":false},"*threshold_profiles":{"remote":false,"replicate":false},"*thresholds":{"remote":false,"replicate":false},"*timings":{"remote":false,"replicate":false}},"opts":{"mongoQueryTimeout":"10s","redisCACertificate":"","redisClientCertificate":"","redisClientKey":"","redisCluster":false,"redisClusterOndownDelay":"0","redisClusterSync":"5s","redisSentinel":"","redisTLS":false},"remote_conn_id":"","remote_conns":[],"replication_cache":"","replication_conns":[],"replication_filtered":false}}` + expected := `{"data_db":{"db_host":"127.0.0.1","db_name":"10","db_password":"","db_port":6379,"db_type":"*redis","db_user":"cgrates","items":{"*accounts":{"remote":false,"replicate":false},"*action_profiles":{"remote":false,"replicate":false},"*actions":{"remote":false,"replicate":false},"*attribute_profiles":{"remote":false,"replicate":false},"*charger_profiles":{"remote":false,"replicate":false},"*dispatcher_hosts":{"remote":false,"replicate":false},"*dispatcher_profiles":{"remote":false,"replicate":false},"*filters":{"remote":false,"replicate":false},"*indexes":{"remote":false,"replicate":false},"*load_ids":{"remote":false,"replicate":false},"*rate_profiles":{"remote":false,"replicate":false},"*resource_profiles":{"remote":false,"replicate":false},"*resources":{"remote":false,"replicate":false},"*route_profiles":{"remote":false,"replicate":false},"*statqueue_profiles":{"remote":false,"replicate":false},"*statqueues":{"remote":false,"replicate":false},"*threshold_profiles":{"remote":false,"replicate":false},"*thresholds":{"remote":false,"replicate":false},"opts":{"mongoQueryTimeout":"10s","redisCACertificate":"","redisClientCertificate":"","redisClientKey":"","redisCluster":false,"redisClusterOndownDelay":"0","redisClusterSync":"5s","redisSentinel":"","redisTLS":false},"remote_conn_id":"","remote_conns":[],"replication_cache":"","replication_conns":[],"replication_filtered":false}}` cfgCgr := NewDefaultCGRConfig() if err := cfgCgr.V1GetConfigAsJSON(context.Background(), &SectionWithAPIOpts{Sections: []string{DataDBJSON}}, &reply); err != nil { t.Error(err) @@ -4787,7 +4783,7 @@ func TestV1GetConfigAsJSONDataDB(t *testing.T) { func TestV1GetConfigAsJSONStorDB(t *testing.T) { var reply string - expected := `{"stor_db":{"db_host":"127.0.0.1","db_name":"cgrates","db_password":"","db_port":3306,"db_type":"*mysql","db_user":"cgrates","items":{"*cdrs":{"remote":false,"replicate":false},"*session_costs":{"remote":false,"replicate":false},"*tp_accounts":{"remote":false,"replicate":false},"*tp_action_profiles":{"remote":false,"replicate":false},"*tp_attributes":{"remote":false,"replicate":false},"*tp_chargers":{"remote":false,"replicate":false},"*tp_dispatcher_hosts":{"remote":false,"replicate":false},"*tp_dispatcher_profiles":{"remote":false,"replicate":false},"*tp_filters":{"remote":false,"replicate":false},"*tp_rate_profiles":{"remote":false,"replicate":false},"*tp_resources":{"remote":false,"replicate":false},"*tp_routes":{"remote":false,"replicate":false},"*tp_stats":{"remote":false,"replicate":false},"*tp_thresholds":{"remote":false,"replicate":false},"*tp_timings":{"remote":false,"replicate":false},"*versions":{"remote":false,"replicate":false}},"opts":{"mongoQueryTimeout":"10s","mysqlLocation":"Local","sqlConnMaxLifetime":0,"sqlMaxIdleConns":10,"sqlMaxOpenConns":100,"sslMode":"disable"},"prefix_indexed_fields":[],"remote_conns":null,"replication_conns":null,"string_indexed_fields":[]}}` + expected := `{"stor_db":{"db_host":"127.0.0.1","db_name":"cgrates","db_password":"","db_port":3306,"db_type":"*mysql","db_user":"cgrates","items":{"*cdrs":{"remote":false,"replicate":false},"*session_costs":{"remote":false,"replicate":false},"*tp_accounts":{"remote":false,"replicate":false},"*tp_action_profiles":{"remote":false,"replicate":false},"*tp_attributes":{"remote":false,"replicate":false},"*tp_chargers":{"remote":false,"replicate":false},"*tp_dispatcher_hosts":{"remote":false,"replicate":false},"*tp_dispatcher_profiles":{"remote":false,"replicate":false},"*tp_filters":{"remote":false,"replicate":false},"*tp_rate_profiles":{"remote":false,"replicate":false},"*tp_resources":{"remote":false,"replicate":false},"*tp_routes":{"remote":false,"replicate":false},"*tp_stats":{"remote":false,"replicate":false},"*tp_thresholds":{"remote":false,"replicate":false},"*versions":{"remote":false,"replicate":false}},"opts":{"mongoQueryTimeout":"10s","mysqlLocation":"Local","sqlConnMaxLifetime":0,"sqlMaxIdleConns":10,"sqlMaxOpenConns":100,"sslMode":"disable"},"prefix_indexed_fields":[],"remote_conns":null,"replication_conns":null,"string_indexed_fields":[]}}` cfgCgr := NewDefaultCGRConfig() if err := cfgCgr.V1GetConfigAsJSON(context.Background(), &SectionWithAPIOpts{Sections: []string{StorDBJSON}}, &reply); err != nil { t.Error(err) @@ -4809,7 +4805,7 @@ func TestV1GetConfigAsJSONTls(t *testing.T) { func TestV1GetConfigAsJSONTCache(t *testing.T) { var reply string - expected := `{"caches":{"partitions":{"*account_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*accounts":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*action_profile_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*action_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*apiban":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":"2m0s"},"*attribute_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*attribute_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*caps_events":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*cdr_ids":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":"10m0s"},"*cdrs":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*charger_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*charger_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*closed_sessions":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":"10s"},"*diameter_messages":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":"3h0m0s"},"*dispatcher_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*dispatcher_hosts":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*dispatcher_loads":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*dispatcher_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*dispatcher_routes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*dispatchers":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*event_charges":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":"10s"},"*event_resources":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*filters":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*load_ids":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*rate_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*rate_profile_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*rate_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*replication_hosts":{"limit":0,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*resource_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*resource_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*resources":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*reverse_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*route_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*route_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*rpc_connections":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*rpc_responses":{"limit":0,"precache":false,"replicate":false,"static_ttl":false,"ttl":"2s"},"*session_costs":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*stat_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*statqueue_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*statqueues":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*stir":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":"3h0m0s"},"*threshold_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*threshold_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*thresholds":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*timings":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_accounts":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_action_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_attributes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_chargers":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_dispatcher_hosts":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_dispatcher_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_filters":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_rate_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_resources":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_routes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_stats":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_thresholds":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_timings":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*uch":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":"3h0m0s"},"*versions":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""}},"replication_conns":[]}}` + expected := `{"caches":{"partitions":{"*account_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*accounts":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*action_profile_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*action_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*apiban":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":"2m0s"},"*attribute_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*attribute_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*caps_events":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*cdr_ids":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":"10m0s"},"*cdrs":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*charger_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*charger_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*closed_sessions":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":"10s"},"*diameter_messages":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":"3h0m0s"},"*dispatcher_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*dispatcher_hosts":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*dispatcher_loads":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*dispatcher_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*dispatcher_routes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*dispatchers":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*event_charges":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":"10s"},"*event_resources":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*filters":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*load_ids":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*rate_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*rate_profile_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*rate_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*replication_hosts":{"limit":0,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*resource_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*resource_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*resources":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*reverse_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*route_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*route_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*rpc_connections":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*rpc_responses":{"limit":0,"precache":false,"replicate":false,"static_ttl":false,"ttl":"2s"},"*session_costs":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*stat_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*statqueue_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*statqueues":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*stir":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":"3h0m0s"},"*threshold_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*threshold_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*thresholds":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_accounts":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_action_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_attributes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_chargers":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_dispatcher_hosts":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_dispatcher_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_filters":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_rate_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_resources":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_routes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_stats":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_thresholds":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*uch":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":"3h0m0s"},"*versions":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""}},"replication_conns":[]}}` cfgCgr := NewDefaultCGRConfig() if err := cfgCgr.V1GetConfigAsJSON(context.Background(), &SectionWithAPIOpts{Sections: []string{CacheJSON}}, &reply); err != nil { t.Error(err) @@ -5276,7 +5272,7 @@ func TestV1GetConfigAsJSONAllConfig(t *testing.T) { } }` var reply string - expected := `{"accounts":{"attributes_conns":[],"enabled":false,"indexed_selects":true,"max_iterations":1000,"max_usage":"259200000000000","nested_fields":false,"prefix_indexed_fields":[],"rates_conns":[],"suffix_indexed_fields":[],"thresholds_conns":[]},"actions":{"accounts_conns":[],"cdrs_conns":[],"ees_conns":[],"enabled":false,"indexed_selects":true,"nested_fields":false,"prefix_indexed_fields":[],"stats_conns":[],"suffix_indexed_fields":[],"tenants":[],"thresholds_conns":[]},"admins":{"actions_conns":[],"attributes_conns":[],"caches_conns":["*internal"],"ees_conns":[],"enabled":false},"analyzers":{"cleanup_interval":"1h0m0s","db_path":"/var/spool/cgrates/analyzers","enabled":false,"index_type":"*scorch","ttl":"24h0m0s"},"apiban":{"enabled":false,"keys":[]},"asterisk_agent":{"asterisk_conns":[{"address":"127.0.0.1:8088","alias":"","connect_attempts":3,"password":"CGRateS.org","reconnects":5,"user":"cgrates"}],"create_cdr":false,"enabled":false,"sessions_conns":["*birpc_internal"]},"attributes":{"admins_conns":[],"enabled":false,"indexed_selects":true,"nested_fields":false,"prefix_indexed_fields":[],"process_runs":1,"resources_conns":[],"stats_conns":[],"suffix_indexed_fields":[]},"caches":{"partitions":{"*account_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*accounts":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*action_profile_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*action_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*apiban":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":"2m0s"},"*attribute_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*attribute_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*caps_events":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*cdr_ids":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":"10m0s"},"*cdrs":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*charger_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*charger_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*closed_sessions":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":"10s"},"*diameter_messages":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":"3h0m0s"},"*dispatcher_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*dispatcher_hosts":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*dispatcher_loads":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*dispatcher_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*dispatcher_routes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*dispatchers":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*event_charges":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":"10s"},"*event_resources":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*filters":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*load_ids":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*rate_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*rate_profile_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*rate_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*replication_hosts":{"limit":0,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*resource_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*resource_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*resources":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*reverse_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*route_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*route_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*rpc_connections":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*rpc_responses":{"limit":0,"precache":false,"replicate":false,"static_ttl":false,"ttl":"2s"},"*session_costs":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*stat_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*statqueue_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*statqueues":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*stir":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":"3h0m0s"},"*threshold_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*threshold_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*thresholds":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*timings":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_accounts":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_action_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_attributes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_chargers":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_dispatcher_hosts":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_dispatcher_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_filters":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_rate_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_resources":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_routes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_stats":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_thresholds":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_timings":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*uch":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":"3h0m0s"},"*versions":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""}},"replication_conns":[]},"cdrs":{"actions_conns":[],"attributes_conns":[],"chargers_conns":[],"ees_conns":[],"enabled":false,"extra_fields":[],"online_cdr_exports":[],"session_cost_retries":5,"stats_conns":[],"store_cdrs":true,"thresholds_conns":[]},"chargers":{"attributes_conns":[],"enabled":false,"indexed_selects":true,"nested_fields":false,"prefix_indexed_fields":[],"suffix_indexed_fields":[]},"config_db":{"db_host":"","db_name":"","db_password":"","db_port":0,"db_type":"*internal","db_user":"","items":{},"opts":{"query_timeout":"10s","redis_ca_certificate":"","redis_client_certificate":"","redis_client_key":"","redis_cluster":false,"redis_cluster_ondown_delay":"0","redis_cluster_sync":"5s","redis_sentinel":"","redis_tls":false},"remote_conn_id":"","remote_conns":null,"replication_cache":"","replication_conns":null,"replication_filtered":false},"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":{"*accounts":{"remote":false,"replicate":false},"*action_profiles":{"remote":false,"replicate":false},"*actions":{"remote":false,"replicate":false},"*attribute_profiles":{"remote":false,"replicate":false},"*charger_profiles":{"remote":false,"replicate":false},"*dispatcher_hosts":{"remote":false,"replicate":false},"*dispatcher_profiles":{"remote":false,"replicate":false},"*filters":{"remote":false,"replicate":false},"*indexes":{"remote":false,"replicate":false},"*load_ids":{"remote":false,"replicate":false},"*rate_profiles":{"remote":false,"replicate":false},"*resource_profiles":{"remote":false,"replicate":false},"*resources":{"remote":false,"replicate":false},"*route_profiles":{"remote":false,"replicate":false},"*statqueue_profiles":{"remote":false,"replicate":false},"*statqueues":{"remote":false,"replicate":false},"*threshold_profiles":{"remote":false,"replicate":false},"*thresholds":{"remote":false,"replicate":false},"*timings":{"remote":false,"replicate":false}},"opts":{"mongoQueryTimeout":"10s","redisCACertificate":"","redisClientCertificate":"","redisClientKey":"","redisCluster":false,"redisClusterOndownDelay":"0","redisClusterSync":"5s","redisSentinel":"","redisTLS":false},"remote_conn_id":"","remote_conns":[],"replication_cache":"","replication_conns":[],"replication_filtered":false},"diameter_agent":{"asr_template":"","concurrent_requests":-1,"dictionaries_path":"/usr/share/cgrates/diameter/dict/","enabled":false,"forced_disconnect":"*none","listen":"127.0.0.1:3868","listen_net":"tcp","origin_host":"CGR-DA","origin_realm":"cgrates.org","product_name":"CGRateS","rar_template":"","request_processors":[],"sessions_conns":["*birpc_internal"],"synced_conn_requests":false,"vendor_id":0},"dispatchers":{"attributes_conns":[],"enabled":false,"indexed_selects":true,"nested_fields":false,"prefix_indexed_fields":[],"suffix_indexed_fields":[]},"dns_agent":{"enabled":false,"listen":"127.0.0.1:2053","listen_net":"udp","request_processors":[],"sessions_conns":["*internal"],"timezone":""},"ees":{"attributes_conns":[],"cache":{"*file_csv":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":"5s"}},"enabled":false,"exporters":[{"attempts":1,"attribute_context":"","attribute_ids":[],"export_path":"/var/spool/cgrates/ees","field_separator":",","fields":[],"filters":[],"flags":[],"id":"*default","opts":{},"synchronous":false,"tenant":"","timezone":"","type":"*none"}]},"ers":{"enabled":false,"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","opts":{"csvCacheExpiryAction":"*post_cdr","csvFieldSeparator":",","csvHeaderDefineChar":":","csvRowLength":0,"fstFieldSeparator":",","fstMadatoryACK":false,"fstMethod":"~*req.0","fstOriginID":"~*req.3;~*req.1;~*req.2","fstRowLength":0,"xmlRootPath":""},"processed_path":"/var/spool/cgrates/ers/out","run_delay":"0","source_path":"/var/spool/cgrates/ers/in","tenant":"","timezone":"","type":"*none"}],"sessions_conns":["*internal"]},"filters":{"admins_conns":[],"resources_conns":[],"stats_conns":[]},"freeswitch_agent":{"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","password":"ClueCon","reconnects":5}],"extra_fields":[],"low_balance_ann_file":"","max_wait_connection":"2s","sessions_conns":["*birpc_internal"],"subscribe_park":true},"general":{"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":",","failed_posts_dir":"/var/spool/cgrates/failed_posts","failed_posts_ttl":"5s","locking_timeout":"0","log_level":6,"logger":"*syslog","max_parallel_conns":100,"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":"0","forceAttemptHttp2":true,"idleConnTimeout":"90s","maxConnsPerHost":0,"maxIdleConns":100,"maxIdleConnsPerHost":2,"responseHeaderTimeout":"0","skipTlsVerify":false,"tlsHandshakeTimeout":"10s"},"freeswitch_cdrs_url":"/freeswitch_json","http_cdrs":"/cdr_http","json_rpc_url":"/jsonrpc","registrars_url":"/registrar","use_basic_auth":false,"ws_url":"/ws"},"http_agent":[],"kamailio_agent":{"create_cdr":false,"enabled":false,"evapi_conns":[{"address":"127.0.0.1:8448","alias":"","reconnects":5}],"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":{"actions_conns":["*localhost"],"caches_conns":["*localhost"],"data_path":"./","disable_reverse":false,"field_separator":",","gapi_credentials":".gapi/credentials.json","gapi_token":".gapi/token.json","tpid":""},"loaders":[{"caches_conns":["*internal"],"data":[{"fields":[{"mandatory":true,"path":"Tenant","tag":"TenantID","type":"*variable","value":"~*req.0"},{"mandatory":true,"path":"ID","tag":"ProfileID","type":"*variable","value":"~*req.1"},{"path":"Contexts","tag":"Contexts","type":"*variable","value":"~*req.2"},{"path":"FilterIDs","tag":"FilterIDs","type":"*variable","value":"~*req.3"},{"path":"Weight","tag":"Weight","type":"*variable","value":"~*req.4"},{"path":"AttributeFilterIDs","tag":"AttributeFilterIDs","type":"*variable","value":"~*req.5"},{"path":"Path","tag":"Path","type":"*variable","value":"~*req.6"},{"path":"Type","tag":"Type","type":"*variable","value":"~*req.7"},{"path":"Value","tag":"Value","type":"*variable","value":"~*req.8"},{"path":"Blocker","tag":"Blocker","type":"*variable","value":"~*req.9"}],"file_name":"Attributes.csv","flags":null,"type":"*attributes"},{"fields":[{"mandatory":true,"path":"Tenant","tag":"Tenant","type":"*variable","value":"~*req.0"},{"mandatory":true,"path":"ID","tag":"ID","type":"*variable","value":"~*req.1"},{"path":"Type","tag":"Type","type":"*variable","value":"~*req.2"},{"path":"Element","tag":"Element","type":"*variable","value":"~*req.3"},{"path":"Values","tag":"Values","type":"*variable","value":"~*req.4"}],"file_name":"Filters.csv","flags":null,"type":"*filters"},{"fields":[{"mandatory":true,"path":"Tenant","tag":"Tenant","type":"*variable","value":"~*req.0"},{"mandatory":true,"path":"ID","tag":"ID","type":"*variable","value":"~*req.1"},{"path":"FilterIDs","tag":"FilterIDs","type":"*variable","value":"~*req.2"},{"path":"Weight","tag":"Weight","type":"*variable","value":"~*req.3"},{"path":"UsageTTL","tag":"TTL","type":"*variable","value":"~*req.4"},{"path":"Limit","tag":"Limit","type":"*variable","value":"~*req.5"},{"path":"AllocationMessage","tag":"AllocationMessage","type":"*variable","value":"~*req.6"},{"path":"Blocker","tag":"Blocker","type":"*variable","value":"~*req.7"},{"path":"Stored","tag":"Stored","type":"*variable","value":"~*req.8"},{"path":"ThresholdIDs","tag":"ThresholdIDs","type":"*variable","value":"~*req.9"}],"file_name":"Resources.csv","flags":null,"type":"*resources"},{"fields":[{"mandatory":true,"path":"Tenant","tag":"Tenant","type":"*variable","value":"~*req.0"},{"mandatory":true,"path":"ID","tag":"ID","type":"*variable","value":"~*req.1"},{"path":"FilterIDs","tag":"FilterIDs","type":"*variable","value":"~*req.2"},{"path":"Weight","tag":"Weight","type":"*variable","value":"~*req.3"},{"path":"QueueLength","tag":"QueueLength","type":"*variable","value":"~*req.4"},{"path":"TTL","tag":"TTL","type":"*variable","value":"~*req.5"},{"path":"MinItems","tag":"MinItems","type":"*variable","value":"~*req.6"},{"path":"MetricIDs","tag":"MetricIDs","type":"*variable","value":"~*req.7"},{"path":"MetricFilterIDs","tag":"MetricFilterIDs","type":"*variable","value":"~*req.8"},{"path":"Blocker","tag":"Blocker","type":"*variable","value":"~*req.9"},{"path":"Stored","tag":"Stored","type":"*variable","value":"~*req.10"},{"path":"ThresholdIDs","tag":"ThresholdIDs","type":"*variable","value":"~*req.11"}],"file_name":"Stats.csv","flags":null,"type":"*stats"},{"fields":[{"mandatory":true,"path":"Tenant","tag":"Tenant","type":"*variable","value":"~*req.0"},{"mandatory":true,"path":"ID","tag":"ID","type":"*variable","value":"~*req.1"},{"path":"FilterIDs","tag":"FilterIDs","type":"*variable","value":"~*req.2"},{"path":"Weight","tag":"Weight","type":"*variable","value":"~*req.3"},{"path":"MaxHits","tag":"MaxHits","type":"*variable","value":"~*req.4"},{"path":"MinHits","tag":"MinHits","type":"*variable","value":"~*req.5"},{"path":"MinSleep","tag":"MinSleep","type":"*variable","value":"~*req.6"},{"path":"Blocker","tag":"Blocker","type":"*variable","value":"~*req.7"},{"path":"ActionIDs","tag":"ActionIDs","type":"*variable","value":"~*req.8"},{"path":"Async","tag":"Async","type":"*variable","value":"~*req.9"}],"file_name":"Thresholds.csv","flags":null,"type":"*thresholds"},{"fields":[{"mandatory":true,"path":"Tenant","tag":"Tenant","type":"*variable","value":"~*req.0"},{"mandatory":true,"path":"ID","tag":"ID","type":"*variable","value":"~*req.1"},{"path":"FilterIDs","tag":"FilterIDs","type":"*variable","value":"~*req.2"},{"path":"Weight","tag":"Weight","type":"*variable","value":"~*req.3"},{"path":"Sorting","tag":"Sorting","type":"*variable","value":"~*req.4"},{"path":"SortingParameters","tag":"SortingParameters","type":"*variable","value":"~*req.5"},{"path":"RouteID","tag":"RouteID","type":"*variable","value":"~*req.6"},{"path":"RouteFilterIDs","tag":"RouteFilterIDs","type":"*variable","value":"~*req.7"},{"path":"RouteAccountIDs","tag":"RouteAccountIDs","type":"*variable","value":"~*req.8"},{"path":"RouteRatingPlanIDs","tag":"RouteRatingPlanIDs","type":"*variable","value":"~*req.9"},{"path":"RouteResourceIDs","tag":"RouteResourceIDs","type":"*variable","value":"~*req.10"},{"path":"RouteStatIDs","tag":"RouteStatIDs","type":"*variable","value":"~*req.11"},{"path":"RouteWeight","tag":"RouteWeight","type":"*variable","value":"~*req.12"},{"path":"RouteBlocker","tag":"RouteBlocker","type":"*variable","value":"~*req.13"},{"path":"RouteParameters","tag":"RouteParameters","type":"*variable","value":"~*req.14"}],"file_name":"Routes.csv","flags":null,"type":"*routes"},{"fields":[{"mandatory":true,"path":"Tenant","tag":"Tenant","type":"*variable","value":"~*req.0"},{"mandatory":true,"path":"ID","tag":"ID","type":"*variable","value":"~*req.1"},{"path":"FilterIDs","tag":"FilterIDs","type":"*variable","value":"~*req.2"},{"path":"Weight","tag":"Weight","type":"*variable","value":"~*req.3"},{"path":"RunID","tag":"RunID","type":"*variable","value":"~*req.4"},{"path":"AttributeIDs","tag":"AttributeIDs","type":"*variable","value":"~*req.5"}],"file_name":"Chargers.csv","flags":null,"type":"*chargers"},{"fields":[{"mandatory":true,"path":"Tenant","tag":"Tenant","type":"*variable","value":"~*req.0"},{"mandatory":true,"path":"ID","tag":"ID","type":"*variable","value":"~*req.1"},{"path":"Contexts","tag":"Contexts","type":"*variable","value":"~*req.2"},{"path":"FilterIDs","tag":"FilterIDs","type":"*variable","value":"~*req.3"},{"path":"Weight","tag":"Weight","type":"*variable","value":"~*req.4"},{"path":"Strategy","tag":"Strategy","type":"*variable","value":"~*req.5"},{"path":"StrategyParameters","tag":"StrategyParameters","type":"*variable","value":"~*req.6"},{"path":"ConnID","tag":"ConnID","type":"*variable","value":"~*req.7"},{"path":"ConnFilterIDs","tag":"ConnFilterIDs","type":"*variable","value":"~*req.8"},{"path":"ConnWeight","tag":"ConnWeight","type":"*variable","value":"~*req.9"},{"path":"ConnBlocker","tag":"ConnBlocker","type":"*variable","value":"~*req.10"},{"path":"ConnParameters","tag":"ConnParameters","type":"*variable","value":"~*req.11"}],"file_name":"DispatcherProfiles.csv","flags":null,"type":"*dispatchers"},{"fields":[{"mandatory":true,"path":"Tenant","tag":"Tenant","type":"*variable","value":"~*req.0"},{"mandatory":true,"path":"ID","tag":"ID","type":"*variable","value":"~*req.1"},{"path":"Address","tag":"Address","type":"*variable","value":"~*req.2"},{"path":"Transport","tag":"Transport","type":"*variable","value":"~*req.3"},{"path":"TLS","tag":"TLS","type":"*variable","value":"~*req.4"}],"file_name":"DispatcherHosts.csv","flags":null,"type":"*dispatcher_hosts"},{"fields":[{"mandatory":true,"path":"Tenant","tag":"Tenant","type":"*variable","value":"~*req.0"},{"mandatory":true,"path":"ID","tag":"ID","type":"*variable","value":"~*req.1"},{"path":"FilterIDs","tag":"FilterIDs","type":"*variable","value":"~*req.2"},{"path":"Weight","tag":"Weight","type":"*variable","value":"~*req.3"},{"path":"MinCost","tag":"MinCost","type":"*variable","value":"~*req.4"},{"path":"MaxCost","tag":"MaxCost","type":"*variable","value":"~*req.5"},{"path":"MaxCostStrategy","tag":"MaxCostStrategy","type":"*variable","value":"~*req.6"},{"path":"RateID","tag":"RateID","type":"*variable","value":"~*req.7"},{"path":"RateFilterIDs","tag":"RateFilterIDs","type":"*variable","value":"~*req.8"},{"path":"RateActivationTimes","tag":"RateActivationTimes","type":"*variable","value":"~*req.9"},{"path":"RateWeight","tag":"RateWeight","type":"*variable","value":"~*req.10"},{"path":"RateBlocker","tag":"RateBlocker","type":"*variable","value":"~*req.11"},{"path":"RateIntervalStart","tag":"RateIntervalStart","type":"*variable","value":"~*req.12"},{"path":"RateFixedFee","tag":"RateFixedFee","type":"*variable","value":"~*req.13"},{"path":"RateRecurrentFee","tag":"RateRecurrentFee","type":"*variable","value":"~*req.14"},{"path":"RateUnit","tag":"RateUnit","type":"*variable","value":"~*req.15"},{"path":"RateIncrement","tag":"RateIncrement","type":"*variable","value":"~*req.16"}],"file_name":"RateProfiles.csv","flags":null,"type":"*rate_profiles"},{"fields":[{"mandatory":true,"path":"Tenant","tag":"Tenant","type":"*variable","value":"~*req.0"},{"mandatory":true,"path":"ID","tag":"ID","type":"*variable","value":"~*req.1"},{"path":"FilterIDs","tag":"FilterIDs","type":"*variable","value":"~*req.2"},{"path":"Weight","tag":"Weight","type":"*variable","value":"~*req.3"},{"path":"Schedule","tag":"Schedule","type":"*variable","value":"~*req.4"},{"path":"TargetType","tag":"TargetType","type":"*variable","value":"~*req.5"},{"path":"TargetIDs","tag":"TargetIDs","type":"*variable","value":"~*req.6"},{"path":"ActionID","tag":"ActionID","type":"*variable","value":"~*req.7"},{"path":"ActionFilterIDs","tag":"ActionFilterIDs","type":"*variable","value":"~*req.8"},{"path":"ActionBlocker","tag":"ActionBlocker","type":"*variable","value":"~*req.9"},{"path":"ActionTTL","tag":"ActionTTL","type":"*variable","value":"~*req.10"},{"path":"ActionType","tag":"ActionType","type":"*variable","value":"~*req.11"},{"path":"ActionOpts","tag":"ActionOpts","type":"*variable","value":"~*req.12"},{"path":"ActionPath","tag":"ActionPath","type":"*variable","value":"~*req.13"},{"path":"ActionValue","tag":"ActionValue","type":"*variable","value":"~*req.14"}],"file_name":"ActionProfiles.csv","flags":null,"type":"*action_profiles"},{"fields":[{"mandatory":true,"path":"Tenant","tag":"Tenant","type":"*variable","value":"~*req.0"},{"mandatory":true,"path":"ID","tag":"ID","type":"*variable","value":"~*req.1"},{"path":"FilterIDs","tag":"FilterIDs","type":"*variable","value":"~*req.2"},{"path":"Weight","tag":"Weight","type":"*variable","value":"~*req.3"},{"path":"BalanceID","tag":"BalanceID","type":"*variable","value":"~*req.4"},{"path":"BalanceFilterIDs","tag":"BalanceFilterIDs","type":"*variable","value":"~*req.5"},{"path":"BalanceWeight","tag":"BalanceWeight","type":"*variable","value":"~*req.6"},{"path":"BalanceBlocker","tag":"BalanceBlocker","type":"*variable","value":"~*req.7"},{"path":"BalanceType","tag":"BalanceType","type":"*variable","value":"~*req.8"},{"path":"BalanceOpts","tag":"BalanceOpts","type":"*variable","value":"~*req.9"},{"path":"BalanceCostIncrements","tag":"BalanceCostIncrements","type":"*variable","value":"~*req.10"},{"path":"BalanceAttributeIDs","tag":"BalanceAttributeIDs","type":"*variable","value":"~*req.11"},{"path":"BalanceRateProfileIDs","tag":"BalanceRateProfileIDs","type":"*variable","value":"~*req.12"},{"path":"BalanceUnitFactors","tag":"BalanceUnitFactors","type":"*variable","value":"~*req.13"},{"path":"BalanceUnits","tag":"BalanceUnits","type":"*variable","value":"~*req.14"},{"path":"ThresholdIDs","tag":"ThresholdIDs","type":"*variable","value":"~*req.15"}],"file_name":"Accounts.csv","flags":null,"type":"*accounts"}],"dry_run":false,"enabled":false,"field_separator":",","id":"*default","lock_filename":".cgr.lck","run_delay":"0","tenant":"","tp_in_dir":"/var/spool/cgrates/loader/in","tp_out_dir":"/var/spool/cgrates/loader/out"}],"migrator":{"out_datadb_encoding":"msgpack","out_datadb_host":"127.0.0.1","out_datadb_name":"10","out_datadb_opts":{"redisCACertificate":"","redisClientCertificate":"","redisClientKey":"","redisCluster":false,"redisClusterOndownDelay":"0","redisClusterSync":"5s","redisSentinel":"","redisTLS":false},"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":{},"out_stordb_password":"","out_stordb_port":"3306","out_stordb_type":"mysql","out_stordb_user":"cgrates","users_filters":[]},"radius_agent":{"client_dictionaries":{"*default":"/usr/share/cgrates/radius/dict/"},"client_secrets":{"*default":"CGRateS.org"},"enabled":false,"listen_acct":"127.0.0.1:1813","listen_auth":"127.0.0.1:1812","listen_net":"udp","request_processors":[],"sessions_conns":["*internal"]},"rates":{"enabled":false,"indexed_selects":true,"nested_fields":false,"prefix_indexed_fields":[],"rate_indexed_selects":true,"rate_nested_fields":false,"rate_prefix_indexed_fields":[],"rate_suffix_indexed_fields":[],"suffix_indexed_fields":[],"verbosity":1000},"registrarc":{"dispatcher":{"enabled":false,"hosts":{},"refresh_interval":"5m0s","registrars_conns":[]},"rpc":{"enabled":false,"hosts":{},"refresh_interval":"5m0s","registrars_conns":[]}},"resources":{"enabled":false,"indexed_selects":true,"nested_fields":false,"prefix_indexed_fields":[],"store_interval":"","suffix_indexed_fields":[],"thresholds_conns":[]},"routes":{"attributes_conns":[],"default_ratio":1,"enabled":false,"indexed_selects":true,"nested_fields":false,"prefix_indexed_fields":[],"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"}},"sessions":{"actions_conns":[],"alterable_fields":[],"attributes_conns":[],"cdrs_conns":[],"channel_sync_interval":"0","chargers_conns":[],"client_protocol":1,"debit_interval":"0","default_usage":{"*any":"3h0m0s","*data":"1048576","*sms":"1","*voice":"3h0m0s"},"enabled":false,"listen_bigob":"","listen_bijson":"127.0.0.1:2014","min_dur_low_balance":"0","replication_conns":[],"resources_conns":[],"routes_conns":[],"session_indexes":[],"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":[]},"sip_agent":{"enabled":false,"listen":"127.0.0.1:5060","listen_net":"udp","request_processors":[],"retransmission_timer":"1s","sessions_conns":["*internal"],"timezone":""},"stats":{"enabled":false,"indexed_selects":true,"nested_fields":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":"","db_port":3306,"db_type":"*mysql","db_user":"cgrates","items":{"*cdrs":{"remote":false,"replicate":false},"*session_costs":{"remote":false,"replicate":false},"*tp_accounts":{"remote":false,"replicate":false},"*tp_action_profiles":{"remote":false,"replicate":false},"*tp_attributes":{"remote":false,"replicate":false},"*tp_chargers":{"remote":false,"replicate":false},"*tp_dispatcher_hosts":{"remote":false,"replicate":false},"*tp_dispatcher_profiles":{"remote":false,"replicate":false},"*tp_filters":{"remote":false,"replicate":false},"*tp_rate_profiles":{"remote":false,"replicate":false},"*tp_resources":{"remote":false,"replicate":false},"*tp_routes":{"remote":false,"replicate":false},"*tp_stats":{"remote":false,"replicate":false},"*tp_thresholds":{"remote":false,"replicate":false},"*tp_timings":{"remote":false,"replicate":false},"*versions":{"remote":false,"replicate":false}},"opts":{"mongoQueryTimeout":"10s","mysqlLocation":"Local","sqlConnMaxLifetime":0,"sqlMaxIdleConns":10,"sqlMaxOpenConns":100,"sslMode":"disable"},"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"}],"*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":{"enabled":false,"indexed_selects":true,"nested_fields":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}}` + expected := `{"accounts":{"attributes_conns":[],"enabled":false,"indexed_selects":true,"max_iterations":1000,"max_usage":"259200000000000","nested_fields":false,"prefix_indexed_fields":[],"rates_conns":[],"suffix_indexed_fields":[],"thresholds_conns":[]},"actions":{"accounts_conns":[],"cdrs_conns":[],"ees_conns":[],"enabled":false,"indexed_selects":true,"nested_fields":false,"prefix_indexed_fields":[],"stats_conns":[],"suffix_indexed_fields":[],"tenants":[],"thresholds_conns":[]},"admins":{"actions_conns":[],"attributes_conns":[],"caches_conns":["*internal"],"ees_conns":[],"enabled":false},"analyzers":{"cleanup_interval":"1h0m0s","db_path":"/var/spool/cgrates/analyzers","enabled":false,"index_type":"*scorch","ttl":"24h0m0s"},"apiban":{"enabled":false,"keys":[]},"asterisk_agent":{"asterisk_conns":[{"address":"127.0.0.1:8088","alias":"","connect_attempts":3,"password":"CGRateS.org","reconnects":5,"user":"cgrates"}],"create_cdr":false,"enabled":false,"sessions_conns":["*birpc_internal"]},"attributes":{"admins_conns":[],"enabled":false,"indexed_selects":true,"nested_fields":false,"prefix_indexed_fields":[],"process_runs":1,"resources_conns":[],"stats_conns":[],"suffix_indexed_fields":[]},"caches":{"partitions":{"*account_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*accounts":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*action_profile_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*action_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*apiban":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":"2m0s"},"*attribute_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*attribute_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*caps_events":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*cdr_ids":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":"10m0s"},"*cdrs":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*charger_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*charger_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*closed_sessions":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":"10s"},"*diameter_messages":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":"3h0m0s"},"*dispatcher_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*dispatcher_hosts":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*dispatcher_loads":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*dispatcher_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*dispatcher_routes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*dispatchers":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*event_charges":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":"10s"},"*event_resources":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*filters":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*load_ids":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*rate_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*rate_profile_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*rate_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*replication_hosts":{"limit":0,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*resource_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*resource_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*resources":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*reverse_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*route_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*route_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*rpc_connections":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*rpc_responses":{"limit":0,"precache":false,"replicate":false,"static_ttl":false,"ttl":"2s"},"*session_costs":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*stat_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*statqueue_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*statqueues":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*stir":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":"3h0m0s"},"*threshold_filter_indexes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*threshold_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*thresholds":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_accounts":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_action_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_attributes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_chargers":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_dispatcher_hosts":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_dispatcher_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_filters":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_rate_profiles":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_resources":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_routes":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_stats":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*tp_thresholds":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""},"*uch":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":"3h0m0s"},"*versions":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":""}},"replication_conns":[]},"cdrs":{"actions_conns":[],"attributes_conns":[],"chargers_conns":[],"ees_conns":[],"enabled":false,"extra_fields":[],"online_cdr_exports":[],"session_cost_retries":5,"stats_conns":[],"store_cdrs":true,"thresholds_conns":[]},"chargers":{"attributes_conns":[],"enabled":false,"indexed_selects":true,"nested_fields":false,"prefix_indexed_fields":[],"suffix_indexed_fields":[]},"config_db":{"db_host":"","db_name":"","db_password":"","db_port":0,"db_type":"*internal","db_user":"","items":{},"opts":{"query_timeout":"10s","redis_ca_certificate":"","redis_client_certificate":"","redis_client_key":"","redis_cluster":false,"redis_cluster_ondown_delay":"0","redis_cluster_sync":"5s","redis_sentinel":"","redis_tls":false},"remote_conn_id":"","remote_conns":null,"replication_cache":"","replication_conns":null,"replication_filtered":false},"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":{"*accounts":{"remote":false,"replicate":false},"*action_profiles":{"remote":false,"replicate":false},"*actions":{"remote":false,"replicate":false},"*attribute_profiles":{"remote":false,"replicate":false},"*charger_profiles":{"remote":false,"replicate":false},"*dispatcher_hosts":{"remote":false,"replicate":false},"*dispatcher_profiles":{"remote":false,"replicate":false},"*filters":{"remote":false,"replicate":false},"*indexes":{"remote":false,"replicate":false},"*load_ids":{"remote":false,"replicate":false},"*rate_profiles":{"remote":false,"replicate":false},"*resource_profiles":{"remote":false,"replicate":false},"*resources":{"remote":false,"replicate":false},"*route_profiles":{"remote":false,"replicate":false},"*statqueue_profiles":{"remote":false,"replicate":false},"*statqueues":{"remote":false,"replicate":false},"*threshold_profiles":{"remote":false,"replicate":false},"*thresholds":{"remote":false,"replicate":false},"opts":{"mongoQueryTimeout":"10s","redisCACertificate":"","redisClientCertificate":"","redisClientKey":"","redisCluster":false,"redisClusterOndownDelay":"0","redisClusterSync":"5s","redisSentinel":"","redisTLS":false},"remote_conn_id":"","remote_conns":[],"replication_cache":"","replication_conns":[],"replication_filtered":false},"diameter_agent":{"asr_template":"","concurrent_requests":-1,"dictionaries_path":"/usr/share/cgrates/diameter/dict/","enabled":false,"forced_disconnect":"*none","listen":"127.0.0.1:3868","listen_net":"tcp","origin_host":"CGR-DA","origin_realm":"cgrates.org","product_name":"CGRateS","rar_template":"","request_processors":[],"sessions_conns":["*birpc_internal"],"synced_conn_requests":false,"vendor_id":0},"dispatchers":{"attributes_conns":[],"enabled":false,"indexed_selects":true,"nested_fields":false,"prefix_indexed_fields":[],"suffix_indexed_fields":[]},"dns_agent":{"enabled":false,"listen":"127.0.0.1:2053","listen_net":"udp","request_processors":[],"sessions_conns":["*internal"],"timezone":""},"ees":{"attributes_conns":[],"cache":{"*file_csv":{"limit":-1,"precache":false,"replicate":false,"static_ttl":false,"ttl":"5s"}},"enabled":false,"exporters":[{"attempts":1,"attribute_context":"","attribute_ids":[],"export_path":"/var/spool/cgrates/ees","field_separator":",","fields":[],"filters":[],"flags":[],"id":"*default","opts":{},"synchronous":false,"tenant":"","timezone":"","type":"*none"}]},"ers":{"enabled":false,"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","opts":{"csvCacheExpiryAction":"*post_cdr","csvFieldSeparator":",","csvHeaderDefineChar":":","csvRowLength":0,"fstFieldSeparator":",","fstMadatoryACK":false,"fstMethod":"~*req.0","fstOriginID":"~*req.3;~*req.1;~*req.2","fstRowLength":0,"xmlRootPath":""},"processed_path":"/var/spool/cgrates/ers/out","run_delay":"0","source_path":"/var/spool/cgrates/ers/in","tenant":"","timezone":"","type":"*none"}],"sessions_conns":["*internal"]},"filters":{"admins_conns":[],"resources_conns":[],"stats_conns":[]},"freeswitch_agent":{"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","password":"ClueCon","reconnects":5}],"extra_fields":[],"low_balance_ann_file":"","max_wait_connection":"2s","sessions_conns":["*birpc_internal"],"subscribe_park":true},"general":{"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":",","failed_posts_dir":"/var/spool/cgrates/failed_posts","failed_posts_ttl":"5s","locking_timeout":"0","log_level":6,"logger":"*syslog","max_parallel_conns":100,"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":"0","forceAttemptHttp2":true,"idleConnTimeout":"90s","maxConnsPerHost":0,"maxIdleConns":100,"maxIdleConnsPerHost":2,"responseHeaderTimeout":"0","skipTlsVerify":false,"tlsHandshakeTimeout":"10s"},"freeswitch_cdrs_url":"/freeswitch_json","http_cdrs":"/cdr_http","json_rpc_url":"/jsonrpc","registrars_url":"/registrar","use_basic_auth":false,"ws_url":"/ws"},"http_agent":[],"kamailio_agent":{"create_cdr":false,"enabled":false,"evapi_conns":[{"address":"127.0.0.1:8448","alias":"","reconnects":5}],"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":{"actions_conns":["*localhost"],"caches_conns":["*localhost"],"data_path":"./","disable_reverse":false,"field_separator":",","gapi_credentials":".gapi/credentials.json","gapi_token":".gapi/token.json","tpid":""},"loaders":[{"caches_conns":["*internal"],"data":[{"fields":[{"mandatory":true,"path":"Tenant","tag":"TenantID","type":"*variable","value":"~*req.0"},{"mandatory":true,"path":"ID","tag":"ProfileID","type":"*variable","value":"~*req.1"},{"path":"Contexts","tag":"Contexts","type":"*variable","value":"~*req.2"},{"path":"FilterIDs","tag":"FilterIDs","type":"*variable","value":"~*req.3"},{"path":"ActivationInterval","tag":"ActivationInterval","type":"*variable","value":"~*req.4"},{"path":"AttributeFilterIDs","tag":"AttributeFilterIDs","type":"*variable","value":"~*req.5"},{"path":"Path","tag":"Path","type":"*variable","value":"~*req.6"},{"path":"Type","tag":"Type","type":"*variable","value":"~*req.7"},{"path":"Value","tag":"Value","type":"*variable","value":"~*req.8"},{"path":"Blocker","tag":"Blocker","type":"*variable","value":"~*req.9"},{"path":"Weight","tag":"Weight","type":"*variable","value":"~*req.10"}],"file_name":"Attributes.csv","flags":null,"type":"*attributes"},{"fields":[{"mandatory":true,"path":"Tenant","tag":"Tenant","type":"*variable","value":"~*req.0"},{"mandatory":true,"path":"ID","tag":"ID","type":"*variable","value":"~*req.1"},{"path":"Type","tag":"Type","type":"*variable","value":"~*req.2"},{"path":"Element","tag":"Element","type":"*variable","value":"~*req.3"},{"path":"Values","tag":"Values","type":"*variable","value":"~*req.4"},{"path":"ActivationInterval","tag":"ActivationInterval","type":"*variable","value":"~*req.5"}],"file_name":"Filters.csv","flags":null,"type":"*filters"},{"fields":[{"mandatory":true,"path":"Tenant","tag":"Tenant","type":"*variable","value":"~*req.0"},{"mandatory":true,"path":"ID","tag":"ID","type":"*variable","value":"~*req.1"},{"path":"FilterIDs","tag":"FilterIDs","type":"*variable","value":"~*req.2"},{"path":"ActivationInterval","tag":"ActivationInterval","type":"*variable","value":"~*req.3"},{"path":"UsageTTL","tag":"TTL","type":"*variable","value":"~*req.4"},{"path":"Limit","tag":"Limit","type":"*variable","value":"~*req.5"},{"path":"AllocationMessage","tag":"AllocationMessage","type":"*variable","value":"~*req.6"},{"path":"Blocker","tag":"Blocker","type":"*variable","value":"~*req.7"},{"path":"Stored","tag":"Stored","type":"*variable","value":"~*req.8"},{"path":"Weight","tag":"Weight","type":"*variable","value":"~*req.9"},{"path":"ThresholdIDs","tag":"ThresholdIDs","type":"*variable","value":"~*req.10"}],"file_name":"Resources.csv","flags":null,"type":"*resources"},{"fields":[{"mandatory":true,"path":"Tenant","tag":"Tenant","type":"*variable","value":"~*req.0"},{"mandatory":true,"path":"ID","tag":"ID","type":"*variable","value":"~*req.1"},{"path":"FilterIDs","tag":"FilterIDs","type":"*variable","value":"~*req.2"},{"path":"ActivationInterval","tag":"ActivationInterval","type":"*variable","value":"~*req.3"},{"path":"QueueLength","tag":"QueueLength","type":"*variable","value":"~*req.4"},{"path":"TTL","tag":"TTL","type":"*variable","value":"~*req.5"},{"path":"MinItems","tag":"MinItems","type":"*variable","value":"~*req.6"},{"path":"MetricIDs","tag":"MetricIDs","type":"*variable","value":"~*req.7"},{"path":"MetricFilterIDs","tag":"MetricFilterIDs","type":"*variable","value":"~*req.8"},{"path":"Blocker","tag":"Blocker","type":"*variable","value":"~*req.9"},{"path":"Stored","tag":"Stored","type":"*variable","value":"~*req.10"},{"path":"Weight","tag":"Weight","type":"*variable","value":"~*req.11"},{"path":"ThresholdIDs","tag":"ThresholdIDs","type":"*variable","value":"~*req.12"}],"file_name":"Stats.csv","flags":null,"type":"*stats"},{"fields":[{"mandatory":true,"path":"Tenant","tag":"Tenant","type":"*variable","value":"~*req.0"},{"mandatory":true,"path":"ID","tag":"ID","type":"*variable","value":"~*req.1"},{"path":"FilterIDs","tag":"FilterIDs","type":"*variable","value":"~*req.2"},{"path":"ActivationInterval","tag":"ActivationInterval","type":"*variable","value":"~*req.3"},{"path":"MaxHits","tag":"MaxHits","type":"*variable","value":"~*req.4"},{"path":"MinHits","tag":"MinHits","type":"*variable","value":"~*req.5"},{"path":"MinSleep","tag":"MinSleep","type":"*variable","value":"~*req.6"},{"path":"Blocker","tag":"Blocker","type":"*variable","value":"~*req.7"},{"path":"Weight","tag":"Weight","type":"*variable","value":"~*req.8"},{"path":"ActionIDs","tag":"ActionIDs","type":"*variable","value":"~*req.9"},{"path":"Async","tag":"Async","type":"*variable","value":"~*req.10"}],"file_name":"Thresholds.csv","flags":null,"type":"*thresholds"},{"fields":[{"mandatory":true,"path":"Tenant","tag":"Tenant","type":"*variable","value":"~*req.0"},{"mandatory":true,"path":"ID","tag":"ID","type":"*variable","value":"~*req.1"},{"path":"FilterIDs","tag":"FilterIDs","type":"*variable","value":"~*req.2"},{"path":"ActivationInterval","tag":"ActivationInterval","type":"*variable","value":"~*req.3"},{"path":"Sorting","tag":"Sorting","type":"*variable","value":"~*req.4"},{"path":"SortingParameters","tag":"SortingParameters","type":"*variable","value":"~*req.5"},{"path":"RouteID","tag":"RouteID","type":"*variable","value":"~*req.6"},{"path":"RouteFilterIDs","tag":"RouteFilterIDs","type":"*variable","value":"~*req.7"},{"path":"RouteAccountIDs","tag":"RouteAccountIDs","type":"*variable","value":"~*req.8"},{"path":"RouteRatingPlanIDs","tag":"RouteRatingPlanIDs","type":"*variable","value":"~*req.9"},{"path":"RouteResourceIDs","tag":"RouteResourceIDs","type":"*variable","value":"~*req.10"},{"path":"RouteStatIDs","tag":"RouteStatIDs","type":"*variable","value":"~*req.11"},{"path":"RouteWeight","tag":"RouteWeight","type":"*variable","value":"~*req.12"},{"path":"RouteBlocker","tag":"RouteBlocker","type":"*variable","value":"~*req.13"},{"path":"RouteParameters","tag":"RouteParameters","type":"*variable","value":"~*req.14"},{"path":"Weight","tag":"Weight","type":"*variable","value":"~*req.15"}],"file_name":"Routes.csv","flags":null,"type":"*routes"},{"fields":[{"mandatory":true,"path":"Tenant","tag":"Tenant","type":"*variable","value":"~*req.0"},{"mandatory":true,"path":"ID","tag":"ID","type":"*variable","value":"~*req.1"},{"path":"FilterIDs","tag":"FilterIDs","type":"*variable","value":"~*req.2"},{"path":"ActivationInterval","tag":"ActivationInterval","type":"*variable","value":"~*req.3"},{"path":"RunID","tag":"RunID","type":"*variable","value":"~*req.4"},{"path":"AttributeIDs","tag":"AttributeIDs","type":"*variable","value":"~*req.5"},{"path":"Weight","tag":"Weight","type":"*variable","value":"~*req.6"}],"file_name":"Chargers.csv","flags":null,"type":"*chargers"},{"fields":[{"mandatory":true,"path":"Tenant","tag":"Tenant","type":"*variable","value":"~*req.0"},{"mandatory":true,"path":"ID","tag":"ID","type":"*variable","value":"~*req.1"},{"path":"Contexts","tag":"Contexts","type":"*variable","value":"~*req.2"},{"path":"FilterIDs","tag":"FilterIDs","type":"*variable","value":"~*req.3"},{"path":"ActivationInterval","tag":"ActivationInterval","type":"*variable","value":"~*req.4"},{"path":"Strategy","tag":"Strategy","type":"*variable","value":"~*req.5"},{"path":"StrategyParameters","tag":"StrategyParameters","type":"*variable","value":"~*req.6"},{"path":"ConnID","tag":"ConnID","type":"*variable","value":"~*req.7"},{"path":"ConnFilterIDs","tag":"ConnFilterIDs","type":"*variable","value":"~*req.8"},{"path":"ConnWeight","tag":"ConnWeight","type":"*variable","value":"~*req.9"},{"path":"ConnBlocker","tag":"ConnBlocker","type":"*variable","value":"~*req.10"},{"path":"ConnParameters","tag":"ConnParameters","type":"*variable","value":"~*req.11"},{"path":"Weight","tag":"Weight","type":"*variable","value":"~*req.12"}],"file_name":"DispatcherProfiles.csv","flags":null,"type":"*dispatchers"},{"fields":[{"mandatory":true,"path":"Tenant","tag":"Tenant","type":"*variable","value":"~*req.0"},{"mandatory":true,"path":"ID","tag":"ID","type":"*variable","value":"~*req.1"},{"path":"Address","tag":"Address","type":"*variable","value":"~*req.2"},{"path":"Transport","tag":"Transport","type":"*variable","value":"~*req.3"},{"path":"TLS","tag":"TLS","type":"*variable","value":"~*req.4"}],"file_name":"DispatcherHosts.csv","flags":null,"type":"*dispatcher_hosts"},{"fields":[{"mandatory":true,"path":"Tenant","tag":"Tenant","type":"*variable","value":"~*req.0"},{"mandatory":true,"path":"ID","tag":"ID","type":"*variable","value":"~*req.1"},{"path":"FilterIDs","tag":"FilterIDs","type":"*variable","value":"~*req.2"},{"path":"ActivationInterval","tag":"ActivationInterval","type":"*variable","value":"~*req.3"},{"path":"Weight","tag":"Weight","type":"*variable","value":"~*req.4"},{"path":"MinCost","tag":"MinCost","type":"*variable","value":"~*req.5"},{"path":"MaxCost","tag":"MaxCost","type":"*variable","value":"~*req.6"},{"path":"MaxCostStrategy","tag":"MaxCostStrategy","type":"*variable","value":"~*req.7"},{"path":"RateID","tag":"RateID","type":"*variable","value":"~*req.8"},{"path":"RateFilterIDs","tag":"RateFilterIDs","type":"*variable","value":"~*req.9"},{"path":"RateActivationTimes","tag":"RateActivationTimes","type":"*variable","value":"~*req.10"},{"path":"RateWeight","tag":"RateWeight","type":"*variable","value":"~*req.11"},{"path":"RateBlocker","tag":"RateBlocker","type":"*variable","value":"~*req.12"},{"path":"RateIntervalStart","tag":"RateIntervalStart","type":"*variable","value":"~*req.13"},{"path":"RateFixedFee","tag":"RateFixedFee","type":"*variable","value":"~*req.14"},{"path":"RateRecurrentFee","tag":"RateRecurrentFee","type":"*variable","value":"~*req.15"},{"path":"RateUnit","tag":"RateUnit","type":"*variable","value":"~*req.16"},{"path":"RateIncrement","tag":"RateIncrement","type":"*variable","value":"~*req.17"}],"file_name":"RateProfiles.csv","flags":null,"type":"*rate_profiles"},{"fields":[{"mandatory":true,"path":"Tenant","tag":"Tenant","type":"*variable","value":"~*req.0"},{"mandatory":true,"path":"ID","tag":"ID","type":"*variable","value":"~*req.1"},{"path":"FilterIDs","tag":"FilterIDs","type":"*variable","value":"~*req.2"},{"path":"ActivationInterval","tag":"ActivationInterval","type":"*variable","value":"~*req.3"},{"path":"Weight","tag":"Weight","type":"*variable","value":"~*req.4"},{"path":"Schedule","tag":"Schedule","type":"*variable","value":"~*req.5"},{"path":"TargetType","tag":"TargetType","type":"*variable","value":"~*req.6"},{"path":"TargetIDs","tag":"TargetIDs","type":"*variable","value":"~*req.7"},{"path":"ActionID","tag":"ActionID","type":"*variable","value":"~*req.8"},{"path":"ActionFilterIDs","tag":"ActionFilterIDs","type":"*variable","value":"~*req.9"},{"path":"ActionBlocker","tag":"ActionBlocker","type":"*variable","value":"~*req.10"},{"path":"ActionTTL","tag":"ActionTTL","type":"*variable","value":"~*req.11"},{"path":"ActionType","tag":"ActionType","type":"*variable","value":"~*req.12"},{"path":"ActionOpts","tag":"ActionOpts","type":"*variable","value":"~*req.13"},{"path":"ActionPath","tag":"ActionPath","type":"*variable","value":"~*req.14"},{"path":"ActionValue","tag":"ActionValue","type":"*variable","value":"~*req.15"}],"file_name":"ActionProfiles.csv","flags":null,"type":"*action_profiles"},{"fields":[{"mandatory":true,"path":"Tenant","tag":"Tenant","type":"*variable","value":"~*req.0"},{"mandatory":true,"path":"ID","tag":"ID","type":"*variable","value":"~*req.1"},{"path":"FilterIDs","tag":"FilterIDs","type":"*variable","value":"~*req.2"},{"path":"ActivationInterval","tag":"ActivationInterval","type":"*variable","value":"~*req.3"},{"path":"Weight","tag":"Weight","type":"*variable","value":"~*req.4"},{"path":"BalanceID","tag":"BalanceID","type":"*variable","value":"~*req.5"},{"path":"BalanceFilterIDs","tag":"BalanceFilterIDs","type":"*variable","value":"~*req.6"},{"path":"BalanceWeight","tag":"BalanceWeight","type":"*variable","value":"~*req.7"},{"path":"BalanceBlocker","tag":"BalanceBlocker","type":"*variable","value":"~*req.8"},{"path":"BalanceType","tag":"BalanceType","type":"*variable","value":"~*req.9"},{"path":"BalanceOpts","tag":"BalanceOpts","type":"*variable","value":"~*req.10"},{"path":"BalanceCostIncrements","tag":"BalanceCostIncrements","type":"*variable","value":"~*req.11"},{"path":"BalanceAttributeIDs","tag":"BalanceAttributeIDs","type":"*variable","value":"~*req.12"},{"path":"BalanceRateProfileIDs","tag":"BalanceRateProfileIDs","type":"*variable","value":"~*req.13"},{"path":"BalanceUnitFactors","tag":"BalanceUnitFactors","type":"*variable","value":"~*req.14"},{"path":"BalanceUnits","tag":"BalanceUnits","type":"*variable","value":"~*req.15"},{"path":"ThresholdIDs","tag":"ThresholdIDs","type":"*variable","value":"~*req.16"}],"file_name":"Accounts.csv","flags":null,"type":"*accounts"}],"dry_run":false,"enabled":false,"field_separator":",","id":"*default","lock_filename":".cgr.lck","run_delay":"0","tenant":"","tp_in_dir":"/var/spool/cgrates/loader/in","tp_out_dir":"/var/spool/cgrates/loader/out"}],"migrator":{"out_datadb_encoding":"msgpack","out_datadb_host":"127.0.0.1","out_datadb_name":"10","out_datadb_opts":{"redisCACertificate":"","redisClientCertificate":"","redisClientKey":"","redisCluster":false,"redisClusterOndownDelay":"0","redisClusterSync":"5s","redisSentinel":"","redisTLS":false},"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":{},"out_stordb_password":"","out_stordb_port":"3306","out_stordb_type":"mysql","out_stordb_user":"cgrates","users_filters":[]},"radius_agent":{"client_dictionaries":{"*default":"/usr/share/cgrates/radius/dict/"},"client_secrets":{"*default":"CGRateS.org"},"enabled":false,"listen_acct":"127.0.0.1:1813","listen_auth":"127.0.0.1:1812","listen_net":"udp","request_processors":[],"sessions_conns":["*internal"]},"rates":{"enabled":false,"indexed_selects":true,"nested_fields":false,"prefix_indexed_fields":[],"rate_indexed_selects":true,"rate_nested_fields":false,"rate_prefix_indexed_fields":[],"rate_suffix_indexed_fields":[],"suffix_indexed_fields":[],"verbosity":1000},"registrarc":{"dispatcher":{"enabled":false,"hosts":{},"refresh_interval":"5m0s","registrars_conns":[]},"rpc":{"enabled":false,"hosts":{},"refresh_interval":"5m0s","registrars_conns":[]}},"resources":{"enabled":false,"indexed_selects":true,"nested_fields":false,"prefix_indexed_fields":[],"store_interval":"","suffix_indexed_fields":[],"thresholds_conns":[]},"routes":{"attributes_conns":[],"default_ratio":1,"enabled":false,"indexed_selects":true,"nested_fields":false,"prefix_indexed_fields":[],"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"}},"sessions":{"actions_conns":[],"alterable_fields":[],"attributes_conns":[],"cdrs_conns":[],"channel_sync_interval":"0","chargers_conns":[],"client_protocol":1,"debit_interval":"0","default_usage":{"*any":"3h0m0s","*data":"1048576","*sms":"1","*voice":"3h0m0s"},"enabled":false,"listen_bigob":"","listen_bijson":"127.0.0.1:2014","min_dur_low_balance":"0","replication_conns":[],"resources_conns":[],"routes_conns":[],"session_indexes":[],"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":[]},"sip_agent":{"enabled":false,"listen":"127.0.0.1:5060","listen_net":"udp","request_processors":[],"retransmission_timer":"1s","sessions_conns":["*internal"],"timezone":""},"stats":{"enabled":false,"indexed_selects":true,"nested_fields":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":"","db_port":3306,"db_type":"*mysql","db_user":"cgrates","items":{"*cdrs":{"remote":false,"replicate":false},"*session_costs":{"remote":false,"replicate":false},"*tp_accounts":{"remote":false,"replicate":false},"*tp_action_profiles":{"remote":false,"replicate":false},"*tp_attributes":{"remote":false,"replicate":false},"*tp_chargers":{"remote":false,"replicate":false},"*tp_dispatcher_hosts":{"remote":false,"replicate":false},"*tp_dispatcher_profiles":{"remote":false,"replicate":false},"*tp_filters":{"remote":false,"replicate":false},"*tp_rate_profiles":{"remote":false,"replicate":false},"*tp_resources":{"remote":false,"replicate":false},"*tp_routes":{"remote":false,"replicate":false},"*tp_stats":{"remote":false,"replicate":false},"*tp_thresholds":{"remote":false,"replicate":false},"*versions":{"remote":false,"replicate":false}},"opts":{"mongoQueryTimeout":"10s","mysqlLocation":"Local","sqlConnMaxLifetime":0,"sqlMaxIdleConns":10,"sqlMaxOpenConns":100,"sslMode":"disable"},"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"}],"*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":{"enabled":false,"indexed_selects":true,"nested_fields":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}}` cgrCfg, err := NewCGRConfigFromJSONStringWithDefaults(cfgJSON) if err != nil { t.Fatal(err) diff --git a/config/configsanity_test.go b/config/configsanity_test.go index d8436b875..9ee90d675 100644 --- a/config/configsanity_test.go +++ b/config/configsanity_test.go @@ -1005,11 +1005,7 @@ func TestConfigSanityDataDB(t *testing.T) { cfg.dataDbCfg.Type = utils.Internal cfg.cacheCfg = &CacheCfg{ - Partitions: map[string]*CacheParamCfg{ - utils.CacheTimings: { - Limit: 0, - }, - }, + Partitions: map[string]*CacheParamCfg{}, } if err := cfg.checkConfigSanity(); err != nil { t.Error(err) diff --git a/config/datadbcfg_test.go b/config/datadbcfg_test.go index 409c76942..6c73dd4d6 100644 --- a/config/datadbcfg_test.go +++ b/config/datadbcfg_test.go @@ -408,7 +408,6 @@ func TestDataDbCfgloadFromJsonCfgItems(t *testing.T) { }, "remote_conns":["Conn1"], "items":{ - "*timings": {"remote":false, "replicate":false}, "*resource_profiles":{"remote":false, "replicate":false}, "*resources":{"remote":false, "replicate":false}, "*statqueue_profiles": {"remote":false, "replicate":false}, @@ -428,7 +427,6 @@ func TestDataDbCfgloadFromJsonCfgItems(t *testing.T) { }, RmtConns: []string{"Conn1"}, Items: map[string]*ItemOpt{ - utils.CacheTimings: {}, utils.MetaResourceProfile: {}, utils.MetaResources: {}, utils.MetaStatQueueProfiles: {}, diff --git a/config/rsrparser_test.go b/config/rsrparser_test.go index 6acc314cb..e040a2d84 100644 --- a/config/rsrparser_test.go +++ b/config/rsrparser_test.go @@ -804,7 +804,7 @@ func TestParseCdrcDn1(t *testing.T) { } func TestRSRCostDetails(t *testing.T) { - fieldsStr1 := `{"Category":"default_route","Tenant":"demo.cgrates.org","Subject":"voxbeam_premium","Account":"6335820713","Destination":"15143606781","ToR":"*voice","Cost":0.0007,"Timespans":[{"TimeStart":"2015-08-30T21:46:54Z","TimeEnd":"2015-08-30T21:47:06Z","Cost":0.00072,"RateInterval":{"Timing":{"Years":[],"Months":[],"MonthDays":[],"WeekDays":[],"StartTime":"00:00:00","EndTime":""},"Rating":{"ConnectFee":0,"RoundingMethod":"*middle","RoundingDecimals":5,"MaxCost":0,"MaxCostStrategy":"0","Rates":[{"GroupIntervalStart":0,"Value":0.0036,"RateIncrement":6000000000,"RateUnit":60000000000}]},"Weight":10},"DurationIndex":12000000000,"Increments":[{"Duration":6000000000,"Cost":0.00036,"BalanceInfo":{"UnitBalanceUuid":"","MoneyBalanceUuid":"40adda88-25d3-4009-b928-f39d61590439","AccountId":"*out:demo.cgrates.org:6335820713"},"BalanceRateInterval":null,"UnitInfo":null,"CompressFactor":2}],"MatchedSubject":"*out:demo.cgrates.org:default_route:voxbeam_premium","MatchedPrefix":"1514","MatchedDestId":"Canada","RatingPlanId":"RP_VOXBEAM_PREMIUM"}]}` + fieldsStr1 := `{"Category":"default_route","Tenant":"demo.cgrates.org","Subject":"voxbeam_premium","Account":"6335820713","Destination":"15143606781","ToR":"*voice","Cost":0.0007,"Timespans":[{"TimeStart":"2015-08-30T21:46:54Z","TimeEnd":"2015-08-30T21:47:06Z","Cost":0.00072,"RateInterval":{"Rating":{"ConnectFee":0,"RoundingMethod":"*middle","RoundingDecimals":5,"MaxCost":0,"MaxCostStrategy":"0","Rates":[{"GroupIntervalStart":0,"Value":0.0036,"RateIncrement":6000000000,"RateUnit":60000000000}]},"Weight":10},"DurationIndex":12000000000,"Increments":[{"Duration":6000000000,"Cost":0.00036,"BalanceInfo":{"UnitBalanceUuid":"","MoneyBalanceUuid":"40adda88-25d3-4009-b928-f39d61590439","AccountId":"*out:demo.cgrates.org:6335820713"},"BalanceRateInterval":null,"UnitInfo":null,"CompressFactor":2}],"MatchedSubject":"*out:demo.cgrates.org:default_route:voxbeam_premium","MatchedPrefix":"1514","MatchedDestId":"Canada","RatingPlanId":"RP_VOXBEAM_PREMIUM"}]}` rsrField, err := NewRSRParser(`~cost_details:s/"MatchedDestId":"(\w+)"/${1}/`) if err != nil { t.Error(err) @@ -814,7 +814,7 @@ func TestRSRCostDetails(t *testing.T) { } else if parsedVal != "Canada" { t.Errorf("Expecting: Canada, received: %s", parsedVal) } - fieldsStr2 := `{"Category":"call","Tenant":"sip.test.cgrates.org","Subject":"dan","Account":"dan","Destination":"+4986517174963","ToR":"*voice","Cost":0,"Timespans":[{"TimeStart":"2015-05-13T15:03:34+02:00","TimeEnd":"2015-05-13T15:03:38+02:00","Cost":0,"RateInterval":{"Timing":{"Years":[],"Months":[],"MonthDays":[],"WeekDays":[],"StartTime":"00:00:00","EndTime":""},"Rating":{"ConnectFee":0,"RoundingMethod":"*middle","RoundingDecimals":4,"MaxCost":0,"MaxCostStrategy":"","Rates":[{"GroupIntervalStart":0,"Value":0,"RateIncrement":1000000000,"RateUnit":60000000000}]},"Weight":10},"DurationIndex":4000000000,"Increments":[{"Duration":1000000000,"Cost":0,"BalanceInfo":{"Unit":null,"Monetary":null,"AccountID":""},"CompressFactor":4}],"RoundIncrement":null,"MatchedSubject":"*out:sip.test.cgrates.org:call:*any","MatchedPrefix":"+31800","MatchedDestId":"CST_49800_DE080","RatingPlanId":"ISC_V","CompressFactor":1}],"RatedUsage":4}` + fieldsStr2 := `{"Category":"call","Tenant":"sip.test.cgrates.org","Subject":"dan","Account":"dan","Destination":"+4986517174963","ToR":"*voice","Cost":0,"Timespans":[{"TimeStart":"2015-05-13T15:03:34+02:00","TimeEnd":"2015-05-13T15:03:38+02:00","Cost":0,"RateInterval":{"Rating":{"ConnectFee":0,"RoundingMethod":"*middle","RoundingDecimals":4,"MaxCost":0,"MaxCostStrategy":"","Rates":[{"GroupIntervalStart":0,"Value":0,"RateIncrement":1000000000,"RateUnit":60000000000}]},"Weight":10},"DurationIndex":4000000000,"Increments":[{"Duration":1000000000,"Cost":0,"BalanceInfo":{"Unit":null,"Monetary":null,"AccountID":""},"CompressFactor":4}],"RoundIncrement":null,"MatchedSubject":"*out:sip.test.cgrates.org:call:*any","MatchedPrefix":"+31800","MatchedDestId":"CST_49800_DE080","RatingPlanId":"ISC_V","CompressFactor":1}],"RatedUsage":4}` rsrField, err = NewRSRParser(`~CostDetails:s/"MatchedDestId":.*_(\w{5})/${1}/:s/"MatchedDestId":"INTERNAL"/ON010/`) if err != nil { t.Error(err) diff --git a/data/conf/cgrates/cgrates.json b/data/conf/cgrates/cgrates.json index 8ca2dda31..2a985adaf 100755 --- a/data/conf/cgrates/cgrates.json +++ b/data/conf/cgrates/cgrates.json @@ -66,8 +66,7 @@ // "*accounts":{"remote":false, "replicate":false}, // "*actions":{"remote":false, "replicate":false}, // "*action_plans": {"remote":false, "replicate":false}, -// "*shared_groups":{"remote":false, "replicate":false}, -// "*timings": {"remote":false, "replicate":false}, +// "*shared_groups":{"remote":false, "replicate":false}, // "*resource_profiles":{"remote":false, "replicate":false}, // "*resources":{"remote":false, "replicate":false}, // "*statqueue_profiles": {"remote":false, "replicate":false}, @@ -119,8 +118,7 @@ // }, // "items":{ // "*session_costs": {"remote":false, "replicate":false}, -// "*cdrs": {"remote":false, "replicate":false}, -// "*tp_timings":{"remote":false, "replicate":false}, +// "*cdrs": {"remote":false, "replicate":false}, // "*tp_rates": {"remote":false, "replicate":false}, // "*tp_destination_rates": {"remote":false, "replicate":false}, // "*tp_rating_plans":{"remote":false, "replicate":false}, @@ -212,7 +210,6 @@ // "*action_plans": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false}, // action plans caching // "*action_triggers": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false}, // action triggers caching // "*shared_groups": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false}, // shared groups caching -// "*timings": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false}, // timings caching // "*resource_profiles": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false}, // control resource profiles caching // "*resources": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false, "replicate": false}, // control resources caching // "*event_resources": {"limit": -1, "ttl": "", "static_ttl": false, "replicate": false}, // matching resources to events diff --git a/data/conf/samples/filtered_replication/engine1_mongo/cgrates.json b/data/conf/samples/filtered_replication/engine1_mongo/cgrates.json index 98ab23e64..6fa95ded7 100644 --- a/data/conf/samples/filtered_replication/engine1_mongo/cgrates.json +++ b/data/conf/samples/filtered_replication/engine1_mongo/cgrates.json @@ -28,7 +28,6 @@ "remote_conn_id": "engine1", "items":{ "*accounts":{"remote":true,"replicate":false}, - "*timings": {"remote":true,"replicate":false}, "*resource_profiles":{"remote":true,"replicate":false}, "*resources":{"remote":true,"replicate":false}, "*statqueue_profiles": {"remote":true,"replicate":false}, diff --git a/data/conf/samples/filtered_replication/engine1_redis/cgrates.json b/data/conf/samples/filtered_replication/engine1_redis/cgrates.json index 77be0c69f..53ba30cc2 100644 --- a/data/conf/samples/filtered_replication/engine1_redis/cgrates.json +++ b/data/conf/samples/filtered_replication/engine1_redis/cgrates.json @@ -27,7 +27,6 @@ "remote_conn_id": "engine1", "items":{ "*accounts":{"remote":true,"replicate":false}, - "*timings": {"remote":true,"replicate":false}, "*resource_profiles":{"remote":true,"replicate":false}, "*resources":{"remote":true,"replicate":false}, "*statqueue_profiles": {"remote":true,"replicate":false}, diff --git a/data/conf/samples/filtered_replication/engine2_mongo/cgrates.json b/data/conf/samples/filtered_replication/engine2_mongo/cgrates.json index 248dbc14d..560f05b39 100644 --- a/data/conf/samples/filtered_replication/engine2_mongo/cgrates.json +++ b/data/conf/samples/filtered_replication/engine2_mongo/cgrates.json @@ -28,7 +28,6 @@ "remote_conn_id": "engine2", "items":{ "*accounts":{"remote":true,"replicate":false}, - "*timings": {"remote":true,"replicate":false}, "*resource_profiles":{"remote":true,"replicate":false}, "*resources":{"remote":true,"replicate":false}, "*statqueue_profiles": {"remote":true,"replicate":false}, diff --git a/data/conf/samples/filtered_replication/engine2_redis/cgrates.json b/data/conf/samples/filtered_replication/engine2_redis/cgrates.json index eba173f96..13dcf92d4 100644 --- a/data/conf/samples/filtered_replication/engine2_redis/cgrates.json +++ b/data/conf/samples/filtered_replication/engine2_redis/cgrates.json @@ -28,7 +28,6 @@ "remote_conn_id": "engine2", "items":{ "*accounts":{"remote":true,"replicate":false}, - "*timings": {"remote":true,"replicate":false}, "*resource_profiles":{"remote":true,"replicate":false}, "*resources":{"remote":true,"replicate":false}, "*statqueue_profiles": {"remote":true,"replicate":false}, diff --git a/data/conf/samples/filtered_replication/internal/cgrates.json b/data/conf/samples/filtered_replication/internal/cgrates.json index 7825d1329..2d2377971 100644 --- a/data/conf/samples/filtered_replication/internal/cgrates.json +++ b/data/conf/samples/filtered_replication/internal/cgrates.json @@ -29,7 +29,6 @@ "replication_filtered": true, "items":{ "*accounts":{"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}, diff --git a/data/conf/samples/full_remote/internal/cgrates.json b/data/conf/samples/full_remote/internal/cgrates.json index 1051f52ca..48e264229 100644 --- a/data/conf/samples/full_remote/internal/cgrates.json +++ b/data/conf/samples/full_remote/internal/cgrates.json @@ -21,7 +21,6 @@ "caches":{ "partitions": { - "*timings": {"limit":0 }, "*resource_profiles": {"limit":0 }, "*resources": {"limit":0 }, "*statqueue_profiles": {"limit":0 }, @@ -61,7 +60,6 @@ "remote_conns": ["conn1"], "items":{ "*accounts":{"remote":true,"replicate":false}, - "*timings": {"remote":true,"replicate":false}, "*resource_profiles":{"remote":true,"replicate":false}, "*resources":{"remote":true,"replicate":false}, "*statqueue_profiles": {"remote":true,"replicate":false}, diff --git a/data/conf/samples/gocs/au_site/cgrates.json b/data/conf/samples/gocs/au_site/cgrates.json index a4b9a4bb9..d29aab1f8 100644 --- a/data/conf/samples/gocs/au_site/cgrates.json +++ b/data/conf/samples/gocs/au_site/cgrates.json @@ -33,7 +33,6 @@ "remote_conns": ["rmtConn"], "items":{ "*accounts":{"remote":true}, - "*timings": {"remote":true}, "*filters": {"remote":true}, "*route_profiles":{"remote":true}, "*attribute_profiles":{"remote":true}, diff --git a/data/conf/samples/gocs/us_site/cgrates.json b/data/conf/samples/gocs/us_site/cgrates.json index eac0572e4..cb3827017 100644 --- a/data/conf/samples/gocs/us_site/cgrates.json +++ b/data/conf/samples/gocs/us_site/cgrates.json @@ -33,7 +33,6 @@ "replication_conns": ["rplConn"], "items":{ "*accounts":{"replicate":true}, - "*timings": {"replicate":false}, "*resource_profiles":{"replicate":false}, "*resources":{"replicate":false}, "*statqueue_profiles": {"replicate":false}, diff --git a/data/conf/samples/remote_replication/internal/cgrates.json b/data/conf/samples/remote_replication/internal/cgrates.json index 89f0df774..2eb659767 100644 --- a/data/conf/samples/remote_replication/internal/cgrates.json +++ b/data/conf/samples/remote_replication/internal/cgrates.json @@ -41,7 +41,6 @@ "replication_conns": ["conn2"], "items":{ "*accounts":{"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}, diff --git a/data/conf/samples/remote_replication/internal_gob/cgrates.json b/data/conf/samples/remote_replication/internal_gob/cgrates.json index 0e00b0f20..db6770b24 100644 --- a/data/conf/samples/remote_replication/internal_gob/cgrates.json +++ b/data/conf/samples/remote_replication/internal_gob/cgrates.json @@ -33,7 +33,6 @@ "replication_conns": ["conn2"], "items":{ "*accounts":{"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}, diff --git a/data/conf/samples/replication/internal/cgrates.json b/data/conf/samples/replication/internal/cgrates.json index 3eeb5b8c5..835b3f79a 100644 --- a/data/conf/samples/replication/internal/cgrates.json +++ b/data/conf/samples/replication/internal/cgrates.json @@ -35,7 +35,6 @@ "replication_conns": ["conn2"], "items":{ "*accounts":{"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}, diff --git a/data/conf/samples/replication/internal_gob/cgrates.json b/data/conf/samples/replication/internal_gob/cgrates.json index 955fbf225..b9a501569 100644 --- a/data/conf/samples/replication/internal_gob/cgrates.json +++ b/data/conf/samples/replication/internal_gob/cgrates.json @@ -35,7 +35,6 @@ "replication_conns": ["conn2"], "items":{ "*accounts":{"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}, diff --git a/data/postman/Voiceland/CGRates.postman_collection_v2.1.json b/data/postman/Voiceland/CGRates.postman_collection_v2.1.json index d2e2f9b61..7d5bef4e4 100644 --- a/data/postman/Voiceland/CGRates.postman_collection_v2.1.json +++ b/data/postman/Voiceland/CGRates.postman_collection_v2.1.json @@ -8,151 +8,6 @@ { "name": "Offline TP (Tariff Plan)", "item": [ - { - "name": "TP Timing", - "item": [ - { - "name": "APIerSv1.SetTPTiming", - "request": { - "auth": { - "type": "noauth" - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 3,\n \"method\": \"APIerSv1.SetTPTiming\",\n \"params\": [\n {\n \"TPid\": \"TP_TIMING_TEST\",\n \"ID\": \"TP_TIMINGID\",\n \"TimingId\": \"TP_TIMING_ID\",\n \"MonthDays\": \"*any\",\n \"Months\": \"*any\",\n \"Time\": \"00:00:00\",\n \"WeekDays\": \"*any\",\n \"Years\": \"*any\"\n }\n ]\n}" - }, - "url": { - "raw": "{{base_url}}/jsonrpc", - "host": [ - "{{base_url}}" - ], - "path": [ - "jsonrpc" - ] - } - }, - "response": [] - }, - { - "name": "APIerSv1.GetTPTiming", - "request": { - "auth": { - "type": "noauth" - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 5,\n \"method\": \"APIerSv1.GetTPTiming\",\n \"params\": [\n {\n \"TPid\": \"TP_TIMING_TEST\",\n \"ID\": \"TP_TIMINGID\",\n \"TimingId\": \"TP_TIMING_ID\"\n }\n ]\n}" - }, - "url": { - "raw": "{{base_url}}/jsonrpc", - "host": [ - "{{base_url}}" - ], - "path": [ - "jsonrpc" - ] - } - }, - "response": [] - }, - { - "name": "APIerSv1.GetTPTimingIds", - "request": { - "auth": { - "type": "noauth" - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1,\n \"method\": \"APIerSv1.GetTPTimingIds\",\n \"params\": [\n {\n \"TPid\": \"Tim_always\"\n }\n ]\n}" - }, - "url": { - "raw": "{{base_url}}/jsonrpc", - "host": [ - "{{base_url}}" - ], - "path": [ - "jsonrpc" - ] - } - }, - "response": [] - }, - { - "name": "Remove TP Timing", - "request": { - "auth": { - "type": "noauth" - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1,\n \"method\": \"APIerSv1.RemoveTPTiming\",\n \"params\": [\n {\n \"TPid\": \"TEST_SQL\"\n }\n ]\n}" - }, - "url": { - "raw": "{{base_url}}/jsonrpc", - "host": [ - "{{base_url}}" - ], - "path": [ - "jsonrpc" - ] - } - }, - "response": [] - } - ], - "event": [ - { - "listen": "prerequest", - "script": { - "id": "ca5a193b-eb51-4062-9136-f817a36bcfed", - "type": "text/javascript", - "exec": [ - "" - ] - } - }, - { - "listen": "test", - "script": { - "id": "0555884a-5b75-42cd-ab61-fda1154101ae", - "type": "text/javascript", - "exec": [ - "" - ] - } - } - ], - "protocolProfileBehavior": {}, - "_postman_isSubFolder": true - }, { "name": "APIerSv1.GetTPIds", "request": { @@ -952,7 +807,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"method\": \"APIerSv1.SetTPActionPlan\",\n \"params\": [\n {\n \"TPid\": \"CGR_API_TESTS\",\n \"ID\": \"always\",\n \"ActionPlan\": [\n {\n \"ActionsId\": \"fafsafa\",\n \"TimingId\": \"*any\",\n \"Weight\": 10\n }\n ]\n }\n ]\n}" + "raw": "{\n \"method\": \"APIerSv1.SetTPActionPlan\",\n \"params\": [\n {\n \"TPid\": \"CGR_API_TESTS\",\n \"ID\": \"always\",\n \"ActionPlan\": [\n {\n \"ActionsId\": \"fafsafa\",\n \"Weight\": 10\n }\n ]\n }\n ]\n}" }, "url": { "raw": "{{base_url}}/jsonrpc", @@ -1121,35 +976,6 @@ } }, "response": [] - }, - { - "name": "APIerSv1.RemoveActionTiming (Remove ActionPlan From Account)", - "request": { - "auth": { - "type": "noauth" - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"method\": \"APIerSv1.RemoveActionTiming\",\n \"params\": [\n {\n \"ActionPlanId\": \"AP_VOICE_PACKAGE_200\",\n \"ActionTimingId\": \"\",\n \"Tenant\": \"sip.TEST_SUPPLIER_NAME.gr\",\n \"Account\": \"+30xxxxxxxxx\",\n \"ReloadScheduler\": true\n }\n ]\n}" - }, - "url": { - "raw": "{{base_url}}/jsonrpc", - "host": [ - "{{base_url}}" - ], - "path": [ - "jsonrpc" - ] - } - }, - "response": [] } ], "protocolProfileBehavior": {} @@ -1533,7 +1359,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"method\": \"APIerSv1.AddBalance\",\r\n \"params\": [{\r\n \"Tenant\": \"cgrates.org\",\r\n \"Account\": \"test\",\r\n \"BalanceType\": \"*monetary\",\r\n \"BalanceUUID\": \"883a8cb2-659b-4353-a939-7d90565e3332\",\r\n \"BalanceID\": \"WALLET100\",\r\n \"Directions\": null,\r\n \"Value\": 100,\r\n \"ExpiryTime\": \"*unlimited\",\r\n \"RatingSubject\": null,\r\n \"Categories\": null,\r\n \"DestinationIds\": \"test;test1\",\r\n \"TimingIds\": \"*any\",\r\n \"Weight\": 10,\r\n \"SharedGroups\": null,\r\n \"Overwrite\": true,\r\n \"Blocker\": false,\r\n \"Disabled\": false,\r\n \"Cdrlog\" : true\r\n }\r\n \r\n ],\r\n \"id\": 6\r\n}" + "raw": "{\r\n \"method\": \"APIerSv1.AddBalance\",\r\n \"params\": [{\r\n \"Tenant\": \"cgrates.org\",\r\n \"Account\": \"test\",\r\n \"BalanceType\": \"*monetary\",\r\n \"BalanceUUID\": \"883a8cb2-659b-4353-a939-7d90565e3332\",\r\n \"BalanceID\": \"WALLET100\",\r\n \"Directions\": null,\r\n \"Value\": 100,\r\n \"ExpiryTime\": \"*unlimited\",\r\n \"RatingSubject\": null,\r\n \"Categories\": null,\r\n \"Weight\": 10,\r\n \"SharedGroups\": null,\r\n \"Overwrite\": true,\r\n \"Blocker\": false,\r\n \"Disabled\": false,\r\n \"Cdrlog\" : true\r\n }\r\n \r\n ],\r\n \"id\": 6\r\n}" }, "url": { "raw": "{{base_url}}/jsonrpc", @@ -1562,7 +1388,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"method\": \"APIerSv1.AddBalance\",\r\n \"params\": [{\r\n \"Tenant\": \"cgrates.org\",\r\n \"Account\": \"+30xxxxxxxxx\",\r\n \"BalanceType\": \"*voice1\",\r\n \"BalanceUUID\": \"883a8cb2-659b-4353-a939-7d90565e3331\",\r\n \"BalanceID\": \"BalanceID1\",\r\n \"Directions\": null,\r\n \"Value\": 100,\r\n \"ExpiryTime\": \"*unlimited\",\r\n \"RatingSubject\": null,\r\n \"Categories\": null,\r\n \"DestinationIds\": \"*any\",\r\n \"TimingIds\": \"*any\",\r\n \"Weight\": 10,\r\n \"SharedGroups\": null,\r\n \"Overwrite\": true,\r\n \"Blocker\": false,\r\n \"Disabled\": false,\r\n \"Cdrlog\" : true\r\n }\r\n \r\n ],\r\n \"id\": 6\r\n}" + "raw": "{\r\n \"method\": \"APIerSv1.AddBalance\",\r\n \"params\": [{\r\n \"Tenant\": \"cgrates.org\",\r\n \"Account\": \"+30xxxxxxxxx\",\r\n \"BalanceType\": \"*voice1\",\r\n \"BalanceUUID\": \"883a8cb2-659b-4353-a939-7d90565e3331\",\r\n \"BalanceID\": \"BalanceID1\",\r\n \"Directions\": null,\r\n \"Value\": 100,\r\n \"ExpiryTime\": \"*unlimited\",\r\n \"RatingSubject\": null,\r\n \"Categories\": null,\r\n \"Weight\": 10,\r\n \"SharedGroups\": null,\r\n \"Overwrite\": true,\r\n \"Blocker\": false,\r\n \"Disabled\": false,\r\n \"Cdrlog\" : true\r\n }\r\n \r\n ],\r\n \"id\": 6\r\n}" }, "url": { "raw": "{{base_url}}/jsonrpc", @@ -1591,7 +1417,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"method\": \"APIerSv1.AddBalance\",\r\n \"params\": [\r\n \t {\r\n \"Tenant\": \"cgrates.org\",\r\n \"Account\": \"+30xxxxxxxxx\",\r\n \"BalanceType\": \"*voice\",\r\n \"BalanceUUID\": \"e11ae605-9ca1-402d-930c-581893e54f33\",\r\n \"BalanceID\": null,\r\n \"Directions\": \"*out\",\r\n \"Value\": 30000000000000,\r\n \"ExpiryTime\": \"*unlimited\",\r\n \"RatingSubject\": null,\r\n \"Categories\": null,\r\n \"DestinationIds\": \"DST_+30xxxxxxxxxx\",\r\n \"TimingIds\": \"*any\",\r\n \"Weight\": 20,\r\n \"SharedGroups\": null,\r\n \"Overwrite\": true,\r\n \"Blocker\": false,\r\n \"Disabled\": false,\r\n \"Cdrlog\" : true\r\n }\r\n ],\r\n \"id\": 6\r\n}" + "raw": "{\r\n \"method\": \"APIerSv1.AddBalance\",\r\n \"params\": [\r\n \t {\r\n \"Tenant\": \"cgrates.org\",\r\n \"Account\": \"+30xxxxxxxxx\",\r\n \"BalanceType\": \"*voice\",\r\n \"BalanceUUID\": \"e11ae605-9ca1-402d-930c-581893e54f33\",\r\n \"BalanceID\": null,\r\n \"Directions\": \"*out\",\r\n \"Value\": 30000000000000,\r\n \"ExpiryTime\": \"*unlimited\",\r\n \"RatingSubject\": null,\r\n \"Categories\": null,\r\n \"Weight\": 20,\r\n \"SharedGroups\": null,\r\n \"Overwrite\": true,\r\n \"Blocker\": false,\r\n \"Disabled\": false,\r\n \"Cdrlog\" : true\r\n }\r\n ],\r\n \"id\": 6\r\n}" }, "url": { "raw": "{{base_url}}/jsonrpc", @@ -1620,7 +1446,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"method\": \"APIerSv1.SetBalance\",\r\n \"params\": [{\r\n \"Tenant\": \"cgrates.org\",\r\n \"Account\": \"+30xxxxxxxxx\",\r\n \"BalanceType\": \"*monetary\",\r\n \"BalanceUUID\": null,\r\n \"BalanceID\": \"balance1\",\r\n \"Directions\": null,\r\n \"Value\": 100,\r\n \"ExpiryTime\": null,\r\n \"RatingSubject\": null,\r\n \"Categories\": null,\r\n \"DestinationIds\": null,\r\n \"TimingIds\": null,\r\n \"Weight\": null,\r\n \"SharedGroups\": null,\r\n \"Blocker\": null,\r\n \"Disabled\": null\r\n }],\r\n \"id\": 6\r\n}" + "raw": "{\r\n \"method\": \"APIerSv1.SetBalance\",\r\n \"params\": [{\r\n \"Tenant\": \"cgrates.org\",\r\n \"Account\": \"+30xxxxxxxxx\",\r\n \"BalanceType\": \"*monetary\",\r\n \"BalanceUUID\": null,\r\n \"BalanceID\": \"balance1\",\r\n \"Directions\": null,\r\n \"Value\": 100,\r\n \"ExpiryTime\": null,\r\n \"RatingSubject\": null,\r\n \"Categories\": null,\r\n \"Weight\": null,\r\n \"SharedGroups\": null,\r\n \"Blocker\": null,\r\n \"Disabled\": null\r\n }],\r\n \"id\": 6\r\n}" }, "url": { "raw": "{{base_url}}/jsonrpc", @@ -1649,7 +1475,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"method\": \"APIerSv1.SetBalance\",\r\n \"params\": [{\r\n \"Tenant\": \"cgrates.org\",\r\n \"Account\": \"+30xxxxxxxxx\",\r\n \"BalanceType\": \"*voice\",\r\n \"BalanceUUID\": \"5a2fb811-1694-46bf-8066-6065a849ecf8\",\r\n \"BalanceID\": \"\",\r\n \"Directions\": \"*out\",\r\n \"Value\": 1000000,\r\n \"ExpiryTime\": null,\r\n \"RatingSubject\": null,\r\n \"Categories\": null,\r\n \"DestinationIds\": \"DST_+30xxxxxxxxxx\",\r\n \"TimingIds\": null,\r\n \"Weight\": 10,\r\n \"SharedGroups\": null,\r\n \"Blocker\": null,\r\n \"Disabled\": null\r\n }],\r\n \"id\": 6\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n " + "raw": "{\r\n \"method\": \"APIerSv1.SetBalance\",\r\n \"params\": [{\r\n \"Tenant\": \"cgrates.org\",\r\n \"Account\": \"+30xxxxxxxxx\",\r\n \"BalanceType\": \"*voice\",\r\n \"BalanceUUID\": \"5a2fb811-1694-46bf-8066-6065a849ecf8\",\r\n \"BalanceID\": \"\",\r\n \"Directions\": \"*out\",\r\n \"Value\": 1000000,\r\n \"ExpiryTime\": null,\r\n \"RatingSubject\": null,\r\n \"Categories\": null,\r\n \"Weight\": 10,\r\n \"SharedGroups\": null,\r\n \"Blocker\": null,\r\n \"Disabled\": null\r\n }],\r\n \"id\": 6\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n " }, "url": { "raw": "{{base_url}}/jsonrpc", @@ -1678,7 +1504,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"method\": \"APIerSv1.DebitBalance\",\n \"params\": [{\n \"Tenant\": \"cgrates.org\",\n \"Account\": \"+30xxxxxxxxx\",\n \"BalanceUuid\": \"e9c0a7f4-8904-481d-8b2d-a08d9a2b311c\",\n \"BalanceId\": \"23456\",\n \"BalanceType\": \"*monetary\",\n \"Directions\": null,\n \"Value\": 8,\n \"ExpiryTime\": null,\n \"RatingSubject\": null,\n \"Categories\": null,\n \"DestinationIds\": null,\n \"TimingIds\": null,\n \"Weight\": null,\n \"SharedGroups\": null,\n \"Overwrite\": false,\n \"Blocker\": null,\n \"Disabled\": null,\n \"Cdrlog\": null,\n \t\"ExtraData\": null\n \t\t\n }],\n \"id\": 5\n}" + "raw": "{\n \"method\": \"APIerSv1.DebitBalance\",\n \"params\": [{\n \"Tenant\": \"cgrates.org\",\n \"Account\": \"+30xxxxxxxxx\",\n \"BalanceUuid\": \"e9c0a7f4-8904-481d-8b2d-a08d9a2b311c\",\n \"BalanceId\": \"23456\",\n \"BalanceType\": \"*monetary\",\n \"Directions\": null,\n \"Value\": 8,\n \"ExpiryTime\": null,\n \"RatingSubject\": null,\n \"Categories\": null,\n \"Weight\": null,\n \"SharedGroups\": null,\n \"Overwrite\": false,\n \"Blocker\": null,\n \"Disabled\": null,\n \"Cdrlog\": null,\n \t\"ExtraData\": null\n \t\t\n }],\n \"id\": 5\n}" }, "url": { "raw": "{{base_url}}/jsonrpc", @@ -1707,7 +1533,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"method\": \"APIerSv1.SetBalance\",\n \"params\": [{\n \"Tenant\": \"cgrates.org\",\n \"Account\": \"+30xxxxxxxxxx\",\n \"BalanceType\": \"*voice\",\n \"BalanceUUID\": null,\n \"BalanceID\": \"9d867c57-31b4-407d-afc7-fb4dc359ae4\",\n \"Directions\": \"*out\",\n \"Value\": 600,\n \"ExpiryTime\": null,\n \"RatingSubject\": null,\n \"Categories\": null,\n \"DestinationIds\": null,\n \"TimingIds\": null,\n \"Weight\": null,\n \"SharedGroups\": null,\n \"Blocker\": null,\n \"Disabled\": null\n }],\n \"id\": 28\n}\n" + "raw": "{\n \"method\": \"APIerSv1.SetBalance\",\n \"params\": [{\n \"Tenant\": \"cgrates.org\",\n \"Account\": \"+30xxxxxxxxxx\",\n \"BalanceType\": \"*voice\",\n \"BalanceUUID\": null,\n \"BalanceID\": \"9d867c57-31b4-407d-afc7-fb4dc359ae4\",\n \"Directions\": \"*out\",\n \"Value\": 600,\n \"ExpiryTime\": null,\n \"RatingSubject\": null,\n \"Categories\": null,\n \"Weight\": null,\n \"SharedGroups\": null,\n \"Blocker\": null,\n \"Disabled\": null\n }],\n \"id\": 28\n}\n" }, "url": { "raw": "{{base_url}}/jsonrpc", @@ -1736,7 +1562,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"method\": \"APIerSv1.RemoveBalances\",\r\n \"params\": [{\r\n \"Tenant\": \"cgrates.org\",\r\n \"Account\": \"test\",\r\n \"BalanceType\": \"*monetary\",\r\n \"BalanceUUID\": \"914e1dc3-2e44-458d-9fb6-6365bdd9da3d\",\r\n \"BalanceID\": \"WALLET100\",\r\n \"Directions\": null,\r\n \"Value\": 100,\r\n \"ExpiryTime\": \"*unlimited\",\r\n \"RatingSubject\": null,\r\n \"Categories\": null,\r\n \"DestinationIds\": \"test;test1\",\r\n \"TimingIds\": \"*any\",\r\n \"Weight\": 10,\r\n \"SharedGroups\": null,\r\n \"Blocker\": false,\r\n \"Disabled\": false\r\n }],\r\n \"id\": 6\r\n}\r\n\r\n" + "raw": "{\r\n \"method\": \"APIerSv1.RemoveBalances\",\r\n \"params\": [{\r\n \"Tenant\": \"cgrates.org\",\r\n \"Account\": \"test\",\r\n \"BalanceType\": \"*monetary\",\r\n \"BalanceUUID\": \"914e1dc3-2e44-458d-9fb6-6365bdd9da3d\",\r\n \"BalanceID\": \"WALLET100\",\r\n \"Directions\": null,\r\n \"Value\": 100,\r\n \"ExpiryTime\": \"*unlimited\",\r\n \"RatingSubject\": null,\r\n \"Categories\": null,\r\n \"Weight\": 10,\r\n \"SharedGroups\": null,\r\n \"Blocker\": false,\r\n \"Disabled\": false\r\n }],\r\n \"id\": 6\r\n}\r\n\r\n" }, "url": { "raw": "{{base_url}}/jsonrpc", @@ -1765,7 +1591,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"method\": \"APIerSv1.RemoveBalances\",\r\n \"params\": [{\r\n \"Tenant\": \"cgrates.org\",\r\n \"Account\": \"+30xxxxxxxxx\",\r\n \"BalanceType\": \"*voice\",\r\n \"BalanceUUID\": null,\r\n \"BalanceID\": null,\r\n \"Directions\": null,\r\n \"Value\": null,\r\n \"ExpiryTime\": null,\r\n \"RatingSubject\": null,\r\n \"Categories\": null,\r\n \"DestinationIds\": null,\r\n \"TimingIds\": null,\r\n \"Weight\": null,\r\n \"SharedGroups\": null,\r\n \"Blocker\": null,\r\n \"Disabled\": null\r\n }],\r\n \"id\": 6\r\n}\r\n\r\n" + "raw": "{\r\n \"method\": \"APIerSv1.RemoveBalances\",\r\n \"params\": [{\r\n \"Tenant\": \"cgrates.org\",\r\n \"Account\": \"+30xxxxxxxxx\",\r\n \"BalanceType\": \"*voice\",\r\n \"BalanceUUID\": null,\r\n \"BalanceID\": null,\r\n \"Directions\": null,\r\n \"Value\": null,\r\n \"ExpiryTime\": null,\r\n \"RatingSubject\": null,\r\n \"Categories\": null,\r\n \"Weight\": null,\r\n \"SharedGroups\": null,\r\n \"Blocker\": null,\r\n \"Disabled\": null\r\n }],\r\n \"id\": 6\r\n}\r\n\r\n" }, "url": { "raw": "{{base_url}}/jsonrpc", @@ -2939,7 +2765,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"id\": 3,\n \"method\": \"APIerSv1.SetTPRatingPlan\",\n \"params\": [\n {\n \"TPid\": \"CGR_API_TESTS\",\n \"ID\": \"TP_RP_RETAIL_GR_LANDLINE_2019_01\",\n \"RatingPlanBindings\": [\n {\n \"DestinationRatesId\": \"TP_DST_RT_RETAIL_GR_LANDLINE_2019_01\",\n \"TimingId\": \"*any\",\n \"Weight\": 10\n }\n ]\n }\n ]\n}" + "raw": "{\n \"id\": 3,\n \"method\": \"APIerSv1.SetTPRatingPlan\",\n \"params\": [\n {\n \"TPid\": \"CGR_API_TESTS\",\n \"ID\": \"TP_RP_RETAIL_GR_LANDLINE_2019_01\",\n \"RatingPlanBindings\": [\n {\n \"Weight\": 10\n }\n ]\n }\n ]\n}" }, "url": { "raw": "{{base_url}}/jsonrpc", @@ -5229,7 +5055,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"method\": \"APIerSv1.SetActions\",\n \"params\": [\n {\n \"Actions\": [\n {\n \"Filter\": \"\",\n \"ExtraParameters\": \"\",\n \"BalanceWeight\": 10,\n \"BalanceType\": \"*monetary\",\n \"SharedGroups\": \"\",\n \"Categories\": \"\",\n \"Directions\": \"*out\",\n \"BalanceBlocker\": \"false\",\n \"BalanceId\": \"balance1\",\n \"ExpiryTime\": \"*unlimited\",\n \"RatingSubject\": \"\",\n \"Identifier\": \"*topup_reset\",\n \"DestinationIds\": \"*any\",\n \"Weight\": 10,\n \"BalanceDisabled\": \"false\",\n \"Units\": 100,\n \"TimingTags\": \"\",\n \"BalanceUuid\": \"e0669a66-86c2-42ea-bcb9-ae072e447d97\"\n }\n ],\n \"Overwrite\": true,\n \"ActionsId\": \"ACT_TOPUP_RST_10\"\n }\n ]\n}" + "raw": "{\n \"method\": \"APIerSv1.SetActions\",\n \"params\": [\n {\n \"Actions\": [\n {\n \"Filter\": \"\",\n \"ExtraParameters\": \"\",\n \"BalanceWeight\": 10,\n \"BalanceType\": \"*monetary\",\n \"SharedGroups\": \"\",\n \"Categories\": \"\",\n \"Directions\": \"*out\",\n \"BalanceBlocker\": \"false\",\n \"BalanceId\": \"balance1\",\n \"ExpiryTime\": \"*unlimited\",\n \"RatingSubject\": \"\",\n \"Identifier\": \"*topup_reset\",\n \"DestinationIds\": \"*any\",\n \"Weight\": 10,\n \"BalanceDisabled\": \"false\",\n \"Units\": 100,\n \"BalanceUuid\": \"e0669a66-86c2-42ea-bcb9-ae072e447d97\"\n }\n ],\n \"Overwrite\": true,\n \"ActionsId\": \"ACT_TOPUP_RST_10\"\n }\n ]\n}" }, "url": { "raw": "{{base_url}}/jsonrpc", @@ -5258,7 +5084,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"method\": \"APIerSv1.SetActions\",\n \"params\": [\n {\n \"Actions\": [\n {\n \"Filter\": null,\n \"ExtraParameters\": null,\n \"BalanceWeight\": null,\n \"BalanceType\": null,\n \"SharedGroups\": null,\n \"Categories\": null,\n \"Directions\": null,\n \"BalanceBlocker\": \"false\",\n \"BalanceId\": null,\n \"ExpiryTime\": null,\n \"RatingSubject\": null,\n \"Identifier\": \"*log\",\n \"DestinationIds\": null,\n \"Weight\": 10,\n \"BalanceDisabled\": \"false\",\n \"Units\": null,\n \"TimingTags\": \"\",\n \"BalanceUuid\": \"\"\n }\n ],\n \"Overwrite\": true,\n \"ActionsId\": \"test1\"\n }\n ]\n}" + "raw": "{\n \"method\": \"APIerSv1.SetActions\",\n \"params\": [\n {\n \"Actions\": [\n {\n \"Filter\": null,\n \"ExtraParameters\": null,\n \"BalanceWeight\": null,\n \"BalanceType\": null,\n \"SharedGroups\": null,\n \"Categories\": null,\n \"Directions\": null,\n \"BalanceBlocker\": \"false\",\n \"BalanceId\": null,\n \"ExpiryTime\": null,\n \"RatingSubject\": null,\n \"Identifier\": \"*log\",\n \"DestinationIds\": null,\n \"Weight\": 10,\n \"BalanceDisabled\": \"false\",\n \"Units\": null,\n \"BalanceUuid\": \"\"\n }\n ],\n \"Overwrite\": true,\n \"ActionsId\": \"test1\"\n }\n ]\n}" }, "url": { "raw": "{{base_url}}/jsonrpc", @@ -6222,7 +6048,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"method\": \"APIerSv1.SetActions\",\n \"params\": [\n {\n \"Actions\": [\n {\n \"Identifier\": \"*topup_reset\",\n \"BalanceId\": \"500MINUTES\",\n \"BalanceUuid\": \"71e73e45-a471-4059-b738-7f66adc72\",\n \"BalanceType\": \"*voice\",\n \"Directions\": null,\n \"Units\": 30000000000000,\n \"ExpiryTime\": \"*unlimited\",\n \"Filter\": null,\n \"TimingTags\": \"*any\",\n \"DestinationIds\": \"GR_LANDLINE\",\n \"RatingSubject\": null,\n \"Categories\": null,\n \"SharedGroups\": null,\n \"BalanceWeight\": 30,\n \"ExtraParameters\": null,\n \"BalanceBlocker\": \"false\",\n \"BalanceDisabled\": \"false\",\n \"Weight\": 10\n }\n ],\n \"Overwrite\": true,\n \"ActionsId\": \"TOPUP_PKG_500_GR\"\n }\n ]\n}", + "raw": "{\n \"method\": \"APIerSv1.SetActions\",\n \"params\": [\n {\n \"Actions\": [\n {\n \"Identifier\": \"*topup_reset\",\n \"BalanceId\": \"500MINUTES\",\n \"BalanceUuid\": \"71e73e45-a471-4059-b738-7f66adc72\",\n \"BalanceType\": \"*voice\",\n \"Directions\": null,\n \"Units\": 30000000000000,\n \"ExpiryTime\": \"*unlimited\",\n \"Filter\": null,\n \"RatingSubject\": null,\n \"Categories\": null,\n \"SharedGroups\": null,\n \"BalanceWeight\": 30,\n \"ExtraParameters\": null,\n \"BalanceBlocker\": \"false\",\n \"BalanceDisabled\": \"false\",\n \"Weight\": 10\n }\n ],\n \"Overwrite\": true,\n \"ActionsId\": \"TOPUP_PKG_500_GR\"\n }\n ]\n}", "options": { "raw": { "language": "json" @@ -6335,7 +6161,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"method\": \"APIerSv1.SetActions\",\n \"params\": [\n {\n \"Actions\": [\n {\n \"Identifier\": \"*topup_reset\",\n \"BalanceId\": \"500MINUTES\",\n \"BalanceUuid\": \"71e73e45-a471-4059-b738-7f66adc72\",\n \"BalanceType\": \"*voice\",\n \"Directions\": null,\n \"Units\": 30000000000000,\n \"ExpiryTime\": \"*unlimited\",\n \"Filter\": null,\n \"TimingTags\": \"*any\",\n \"DestinationIds\": \"GR_LANDLINE\",\n \"RatingSubject\": \"*zero1m\",\n \"Categories\": null,\n \"SharedGroups\": null,\n \"BalanceWeight\": 30,\n \"ExtraParameters\": null,\n \"BalanceBlocker\": \"false\",\n \"BalanceDisabled\": \"false\",\n \"Weight\": 10\n }\n ],\n \"Overwrite\": true,\n \"ActionsId\": \"TOPUP_PKG_500M_GR_LANDLINE_FREE_UNLIMITED\"\n }\n ]\n}" + "raw": "{\n \"method\": \"APIerSv1.SetActions\",\n \"params\": [\n {\n \"Actions\": [\n {\n \"Identifier\": \"*topup_reset\",\n \"BalanceId\": \"500MINUTES\",\n \"BalanceUuid\": \"71e73e45-a471-4059-b738-7f66adc72\",\n \"BalanceType\": \"*voice\",\n \"Directions\": null,\n \"Units\": 30000000000000,\n \"ExpiryTime\": \"*unlimited\",\n \"Filter\": null,\n \"RatingSubject\": \"*zero1m\",\n \"Categories\": null,\n \"SharedGroups\": null,\n \"BalanceWeight\": 30,\n \"ExtraParameters\": null,\n \"BalanceBlocker\": \"false\",\n \"BalanceDisabled\": \"false\",\n \"Weight\": 10\n }\n ],\n \"Overwrite\": true,\n \"ActionsId\": \"TOPUP_PKG_500M_GR_LANDLINE_FREE_UNLIMITED\"\n }\n ]\n}" }, "url": { "raw": "{{base_url}}/jsonrpc", @@ -6429,7 +6255,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"method\": \"APIerSv1.SetActions\",\n \"params\": [\n {\n \"Actions\": [\n {\n \"Identifier\": \"*topup_reset\",\n \"BalanceId\": \"PKG_500M_GR_LANDLINE_FREE_30D\",\n \"BalanceUuid\": \"71e73e45-a471-4059-b738-7f66adc72\",\n \"BalanceType\": \"*voice\",\n \"Directions\": null,\n \"Units\": 30000000000000,\n \"ExpiryTime\": \"2019-07-23T13:03:38Z\",\n \"Filter\": null,\n \"TimingTags\": \"*any\",\n \"DestinationIds\": \"GR_LANDLINE\",\n \"RatingSubject\": null,\n \"Categories\": null,\n \"SharedGroups\": null,\n \"BalanceWeight\": 30,\n \"ExtraParameters\": null,\n \"BalanceBlocker\": \"false\",\n \"BalanceDisabled\": \"false\",\n \"Weight\": 10\n }\n ],\n \"Overwrite\": true,\n \"ActionsId\": \"TOPUP_PKG_500M_GR_LANDLINE_FREE_30D\"\n }\n ]\n}" + "raw": "{\n \"method\": \"APIerSv1.SetActions\",\n \"params\": [\n {\n \"Actions\": [\n {\n \"Identifier\": \"*topup_reset\",\n \"BalanceId\": \"PKG_500M_GR_LANDLINE_FREE_30D\",\n \"BalanceUuid\": \"71e73e45-a471-4059-b738-7f66adc72\",\n \"BalanceType\": \"*voice\",\n \"Directions\": null,\n \"Units\": 30000000000000,\n \"ExpiryTime\": \"2019-07-23T13:03:38Z\",\n \"Filter\": null,\n \"RatingSubject\": null,\n \"Categories\": null,\n \"SharedGroups\": null,\n \"BalanceWeight\": 30,\n \"ExtraParameters\": null,\n \"BalanceBlocker\": \"false\",\n \"BalanceDisabled\": \"false\",\n \"Weight\": 10\n }\n ],\n \"Overwrite\": true,\n \"ActionsId\": \"TOPUP_PKG_500M_GR_LANDLINE_FREE_30D\"\n }\n ]\n}" }, "url": { "raw": "{{base_url}}/jsonrpc", @@ -6552,7 +6378,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"method\": \"APIerSv1.SetActions\",\n \"params\": [\n {\n \"Actions\": [\n {\n \"Identifier\": \"*topup_reset\",\n \"BalanceId\": \"PKG_500M_GR_UNLIMITED\",\n \"BalanceUuid\": \"71e73e45-a471-4059-b738-7f66adc72\",\n \"BalanceType\": \"*voice\",\n \"Directions\": null,\n \"Units\": 30000000000000,\n \"ExpiryTime\": \"*unlimited\",\n \"Filter\": null,\n \"TimingTags\": \"*any\",\n \"DestinationIds\": \"GR_MOBILE;GR_LANDLINE\",\n \"RatingSubject\": null,\n \"Categories\": null,\n \"SharedGroups\": null,\n \"BalanceWeight\": 30,\n \"ExtraParameters\": null,\n \"BalanceBlocker\": \"false\",\n \"BalanceDisabled\": \"false\",\n \"Weight\": 10\n }\n ],\n \"Overwrite\": true,\n \"ActionsId\": \"TOPUP_PKG_500M_GR_UNLIMITED\"\n }\n ]\n}" + "raw": "{\n \"method\": \"APIerSv1.SetActions\",\n \"params\": [\n {\n \"Actions\": [\n {\n \"Identifier\": \"*topup_reset\",\n \"BalanceId\": \"PKG_500M_GR_UNLIMITED\",\n \"BalanceUuid\": \"71e73e45-a471-4059-b738-7f66adc72\",\n \"BalanceType\": \"*voice\",\n \"Directions\": null,\n \"Units\": 30000000000000,\n \"ExpiryTime\": \"*unlimited\",\n \"Filter\": null,\n \"RatingSubject\": null,\n \"Categories\": null,\n \"SharedGroups\": null,\n \"BalanceWeight\": 30,\n \"ExtraParameters\": null,\n \"BalanceBlocker\": \"false\",\n \"BalanceDisabled\": \"false\",\n \"Weight\": 10\n }\n ],\n \"Overwrite\": true,\n \"ActionsId\": \"TOPUP_PKG_500M_GR_UNLIMITED\"\n }\n ]\n}" }, "url": { "raw": "{{base_url}}/jsonrpc", @@ -6657,7 +6483,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"method\": \"APIerSv1.SetActions\",\n \"params\": [\n {\n \"Actions\": [\n {\n \"Identifier\": \"*topup_reset\",\n \"BalanceId\": \"500MINUTES\",\n \"BalanceUuid\": \"71e73e45-a471-4059-b738-7f66adc72\",\n \"BalanceType\": \"*voice\",\n \"Directions\": null,\n \"Units\": 30000000000000,\n \"ExpiryTime\": \"*unlimited\",\n \"Filter\": null,\n \"TimingTags\": \"*any\",\n \"DestinationIds\": \"DST_+30xxxxxxxxxx\",\n \"RatingSubject\": \"*zero1m\",\n \"Categories\": null,\n \"SharedGroups\": null,\n \"BalanceWeight\": 30,\n \"ExtraParameters\": null,\n \"BalanceBlocker\": \"false\",\n \"BalanceDisabled\": \"false\",\n \"Weight\": 10\n }\n ],\n \"Overwrite\": true,\n \"ActionsId\": \"TOPUP_PKG_1000_GR\"\n }\n ]\n}" + "raw": "{\n \"method\": \"APIerSv1.SetActions\",\n \"params\": [\n {\n \"Actions\": [\n {\n \"Identifier\": \"*topup_reset\",\n \"BalanceId\": \"500MINUTES\",\n \"BalanceUuid\": \"71e73e45-a471-4059-b738-7f66adc72\",\n \"BalanceType\": \"*voice\",\n \"Directions\": null,\n \"Units\": 30000000000000,\n \"ExpiryTime\": \"*unlimited\",\n \"Filter\": null,\n \"RatingSubject\": \"*zero1m\",\n \"Categories\": null,\n \"SharedGroups\": null,\n \"BalanceWeight\": 30,\n \"ExtraParameters\": null,\n \"BalanceBlocker\": \"false\",\n \"BalanceDisabled\": \"false\",\n \"Weight\": 10\n }\n ],\n \"Overwrite\": true,\n \"ActionsId\": \"TOPUP_PKG_1000_GR\"\n }\n ]\n}" }, "url": { "raw": "{{base_url}}/jsonrpc", @@ -6686,7 +6512,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"method\": \"APIerSv1.SetActions\",\n \"params\": [\n {\n \"Actions\": [\n {\n \"Identifier\": \"*topup_reset\",\n \"BalanceId\": \"100EURO\",\n \"BalanceUuid\": \"71e73e45-a471-4059-b738-7f66adc71\",\n \"BalanceType\": \"*monetary\",\n \"Directions\": null,\n \"Units\": 100,\n \"ExpiryTime\": \"*unlimited\",\n \"Filter\": null,\n \"TimingTags\": \"*any\",\n \"DestinationIds\": \"*any\",\n \"RatingSubject\": null,\n \"Categories\": null,\n \"SharedGroups\": null,\n \"BalanceWeight\": 20,\n \"ExtraParameters\": null,\n \"BalanceBlocker\": \"false\",\n \"BalanceDisabled\": \"false\",\n \"Weight\": 10\n },\n {\n \"Identifier\": \"*topup_reset\",\n \"BalanceId\": \"500MINUTES\",\n \"BalanceUuid\": \"71e73e45-a471-4059-b738-7f66adc72\",\n \"BalanceType\": \"*voice\",\n \"Directions\": null,\n \"Units\": 30000000000000,\n \"ExpiryTime\": \"*unlimited\",\n \"Filter\": null,\n \"TimingTags\": \"*any\",\n \"DestinationIds\": \"DST_+30xxxxxxxxxx\",\n \"RatingSubject\": null,\n \"Categories\": null,\n \"SharedGroups\": null,\n \"BalanceWeight\": 30,\n \"ExtraParameters\": null,\n \"BalanceBlocker\": \"false\",\n \"BalanceDisabled\": \"false\",\n \"Weight\": 10\n }\n ],\n \"Overwrite\": true,\n \"ActionsId\": \"TOPUP_PKG_1000_GR\"\n }\n ]\n}" + "raw": "{\n \"method\": \"APIerSv1.SetActions\",\n \"params\": [\n {\n \"Actions\": [\n {\n \"Identifier\": \"*topup_reset\",\n \"BalanceId\": \"100EURO\",\n \"BalanceUuid\": \"71e73e45-a471-4059-b738-7f66adc71\",\n \"BalanceType\": \"*monetary\",\n \"Directions\": null,\n \"Units\": 100,\n \"ExpiryTime\": \"*unlimited\",\n \"Filter\": null,\n \"RatingSubject\": null,\n \"Categories\": null,\n \"SharedGroups\": null,\n \"BalanceWeight\": 20,\n \"ExtraParameters\": null,\n \"BalanceBlocker\": \"false\",\n \"BalanceDisabled\": \"false\",\n \"Weight\": 10\n },\n {\n \"Identifier\": \"*topup_reset\",\n \"BalanceId\": \"500MINUTES\",\n \"BalanceUuid\": \"71e73e45-a471-4059-b738-7f66adc72\",\n \"BalanceType\": \"*voice\",\n \"Directions\": null,\n \"Units\": 30000000000000,\n \"ExpiryTime\": \"*unlimited\",\n \"Filter\": null,\n \"RatingSubject\": null,\n \"Categories\": null,\n \"SharedGroups\": null,\n \"BalanceWeight\": 30,\n \"ExtraParameters\": null,\n \"BalanceBlocker\": \"false\",\n \"BalanceDisabled\": \"false\",\n \"Weight\": 10\n }\n ],\n \"Overwrite\": true,\n \"ActionsId\": \"TOPUP_PKG_1000_GR\"\n }\n ]\n}" }, "url": { "raw": "{{base_url}}/jsonrpc", @@ -6876,7 +6702,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"id\": 3,\n \"method\": \"APIerSv1.SetTPRatingPlan\",\n \"params\": [\n {\n \"TPid\": \"CGR_SPL_TESTSUPPLIER1_2019_01\",\n \"ID\": \"TP_RP_SPL_TESTSUPPLIER1_DST_ID_RT_GR_LANDLINE_2019_01\",\n \"RatingPlanBindings\": [\n {\n \"DestinationRatesId\": \"SPL_TESTSUPPLIER1_DST_RT_GR_LANDLINE_2019_01\",\n \"TimingId\": \"*any\",\n \"Weight\": 10\n }\n ]\n }\n ]\n}" + "raw": "{\n \"id\": 3,\n \"method\": \"APIerSv1.SetTPRatingPlan\",\n \"params\": [\n {\n \"TPid\": \"CGR_SPL_TESTSUPPLIER1_2019_01\",\n \"ID\": \"TP_RP_SPL_TESTSUPPLIER1_DST_ID_RT_GR_LANDLINE_2019_01\",\n \"RatingPlanBindings\": [\n {\n \"DestinationRatesId\": \"SPL_TESTSUPPLIER1_DST_RT_GR_LANDLINE_2019_01\",\n \"Weight\": 10\n }\n ]\n }\n ]\n}" }, "url": { "raw": "{{base_url}}/jsonrpc", @@ -7116,7 +6942,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"id\": 3,\n \"method\": \"APIerSv1.SetTPRatingPlan\",\n \"params\": [\n {\n \"TPid\": \"TPID_VL_INTERNAL_INBOUND_CALLS\",\n \"ID\": \"RatingPlan_CLI_VL_INTERNAL_INBOUND_CALLS_GR_MOBILE\",\n \"RatingPlanBindings\": [\n {\n \"DestinationRatesId\": \"TP_DSTRATE_CLI_VL_INTERNAL_INBOUND_CALLS_GR_MOBILE\",\n \"TimingId\": \"*any\",\n \"Weight\": 10\n },\n {\n \"DestinationRatesId\": \"DSTRATE_VL_INTERNAL_INBOUND_CALLS_ΑΝΥ\",\n \"TimingId\": \"*any\",\n \"Weight\": 10\n }\n ]\n }\n ]\n}" + "raw": "{\n \"id\": 3,\n \"method\": \"APIerSv1.SetTPRatingPlan\",\n \"params\": [\n {\n \"TPid\": \"TPID_VL_INTERNAL_INBOUND_CALLS\",\n \"ID\": \"RatingPlan_CLI_VL_INTERNAL_INBOUND_CALLS_GR_MOBILE\",\n \"RatingPlanBindings\": [\n {\n \"DestinationRatesId\": \"TP_DSTRATE_CLI_VL_INTERNAL_INBOUND_CALLS_GR_MOBILE\",\n \"Weight\": 10\n },\n {\n \"DestinationRatesId\": \"DSTRATE_VL_INTERNAL_INBOUND_CALLS_ΑΝΥ\",\n \"Weight\": 10\n }\n ]\n }\n ]\n}" }, "url": { "raw": "{{base_url}}/jsonrpc", @@ -7395,7 +7221,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"method\": \"APIerSv1.SetActions\",\n \"params\": [\n {\n \"Actions\": [\n {\n \"Identifier\": \"*log\",\n \"BalanceId\": null,\n \"BalanceUuid\": null,\n \"BalanceType\": null,\n \"Directions\": null,\n \"Units\": null,\n \"ExpiryTime\": null,\n \"Filter\": null,\n \"TimingTags\": null,\n \"DestinationIds\": null,\n \"RatingSubject\": null,\n \"Categories\": null,\n \"SharedGroups\": null,\n \"BalanceWeight\": null,\n \"ExtraParameters\": null,\n \"BalanceBlocker\": \"false\",\n \"BalanceDisabled\": \"false\",\n \"Weight\": 10\n }\n ],\n \"Overwrite\": true,\n \"ActionsId\": \"ACT_LOG_WARNING\"\n }\n ]\n}" + "raw": "{\n \"method\": \"APIerSv1.SetActions\",\n \"params\": [\n {\n \"Actions\": [\n {\n \"Identifier\": \"*log\",\n \"BalanceId\": null,\n \"BalanceUuid\": null,\n \"BalanceType\": null,\n \"Directions\": null,\n \"Units\": null,\n \"ExpiryTime\": null,\n \"Filter\": null,\n \"RatingSubject\": null,\n \"Categories\": null,\n \"SharedGroups\": null,\n \"BalanceWeight\": null,\n \"ExtraParameters\": null,\n \"BalanceBlocker\": \"false\",\n \"BalanceDisabled\": \"false\",\n \"Weight\": 10\n }\n ],\n \"Overwrite\": true,\n \"ActionsId\": \"ACT_LOG_WARNING\"\n }\n ]\n}" }, "url": { "raw": "{{base_url}}/jsonrpc", diff --git a/data/storage/docker_mysql/scripts/create_tariffplan_tables.sql b/data/storage/docker_mysql/scripts/create_tariffplan_tables.sql index f9c5a7317..5db9dff79 100644 --- a/data/storage/docker_mysql/scripts/create_tariffplan_tables.sql +++ b/data/storage/docker_mysql/scripts/create_tariffplan_tables.sql @@ -1,40 +1,3 @@ --- --- Table structure for table `tp_timings` --- -DROP TABLE IF EXISTS `tp_timings`; -CREATE TABLE `tp_timings` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `tpid` varchar(64) NOT NULL, - `tag` varchar(64) NOT NULL, - `years` varchar(255) NOT NULL, - `months` varchar(255) NOT NULL, - `month_days` varchar(255) NOT NULL, - `week_days` varchar(255) NOT NULL, - `time` varchar(32) NOT NULL, - `created_at` TIMESTAMP, - PRIMARY KEY (`id`), - KEY `tpid` (`tpid`), - KEY `tpid_tmid` (`tpid`,`tag`), - UNIQUE KEY `tpid_tag` (`tpid`,`tag`) -); - --- --- Table structure for table `tp_destinations` --- - -DROP TABLE IF EXISTS `tp_destinations`; -CREATE TABLE `tp_destinations` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `tpid` varchar(64) NOT NULL, - `tag` varchar(64) NOT NULL, - `prefix` varchar(24) NOT NULL, - `created_at` TIMESTAMP, - PRIMARY KEY (`id`), - KEY `tpid` (`tpid`), - KEY `tpid_dstid` (`tpid`,`tag`), - UNIQUE KEY `tpid_dest_prefix` (`tpid`,`tag`,`prefix`) -); - -- -- Table structure for table `tp_resources` diff --git a/data/storage/mysql/create_tariffplan_tables.sql b/data/storage/mysql/create_tariffplan_tables.sql index 8b19c1626..d73450bfd 100644 --- a/data/storage/mysql/create_tariffplan_tables.sql +++ b/data/storage/mysql/create_tariffplan_tables.sql @@ -1,39 +1,3 @@ --- --- Table structure for table `tp_timings` --- -DROP TABLE IF EXISTS `tp_timings`; -CREATE TABLE `tp_timings` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `tpid` varchar(64) NOT NULL, - `tag` varchar(64) NOT NULL, - `years` varchar(255) NOT NULL, - `months` varchar(255) NOT NULL, - `month_days` varchar(255) NOT NULL, - `week_days` varchar(255) NOT NULL, - `time` varchar(32) NOT NULL, - `created_at` TIMESTAMP, - PRIMARY KEY (`id`), - KEY `tpid` (`tpid`), - KEY `tpid_tmid` (`tpid`,`tag`), - UNIQUE KEY `tpid_tag` (`tpid`,`tag`) -); - --- --- Table structure for table `tp_destinations` --- - -DROP TABLE IF EXISTS `tp_destinations`; -CREATE TABLE `tp_destinations` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `tpid` varchar(64) NOT NULL, - `tag` varchar(64) NOT NULL, - `prefix` varchar(24) NOT NULL, - `created_at` TIMESTAMP, - PRIMARY KEY (`id`), - KEY `tpid` (`tpid`), - KEY `tpid_dstid` (`tpid`,`tag`), - UNIQUE KEY `tpid_dest_prefix` (`tpid`,`tag`,`prefix`) -); -- -- Table structure for table `tp_resources` diff --git a/data/storage/postgres/create_tariffplan_tables.sql b/data/storage/postgres/create_tariffplan_tables.sql index ea53acfc3..fbdf483ba 100644 --- a/data/storage/postgres/create_tariffplan_tables.sql +++ b/data/storage/postgres/create_tariffplan_tables.sql @@ -1,37 +1,3 @@ --- --- Table structure for table `tp_timings` --- -DROP TABLE IF EXISTS tp_timings; -CREATE TABLE tp_timings ( - id SERIAL PRIMARY KEY, - tpid VARCHAR(64) NOT NULL, - tag VARCHAR(64) NOT NULL, - years VARCHAR(255) NOT NULL, - months VARCHAR(255) NOT NULL, - month_days VARCHAR(255) NOT NULL, - week_days VARCHAR(255) NOT NULL, - time VARCHAR(32) NOT NULL, - created_at TIMESTAMP WITH TIME ZONE, - UNIQUE (tpid, tag) -); -CREATE INDEX tptimings_tpid_idx ON tp_timings (tpid); -CREATE INDEX tptimings_idx ON tp_timings (tpid,tag); - --- --- Table structure for table `tp_destinations` --- - -DROP TABLE IF EXISTS tp_destinations; -CREATE TABLE tp_destinations ( - id SERIAL PRIMARY KEY, - tpid VARCHAR(64) NOT NULL, - tag VARCHAR(64) NOT NULL, - prefix VARCHAR(24) NOT NULL, - created_at TIMESTAMP WITH TIME ZONE, - UNIQUE (tpid, tag, prefix) -); -CREATE INDEX tpdests_tpid_idx ON tp_destinations (tpid); -CREATE INDEX tpdests_idx ON tp_destinations (tpid,tag); -- -- Table structure for table `tp_resources` diff --git a/data/tariffplans/cluelrn/RatingPlans.csv b/data/tariffplans/cluelrn/RatingPlans.csv index 125b4d5ea..bfa73389c 100644 --- a/data/tariffplans/cluelrn/RatingPlans.csv +++ b/data/tariffplans/cluelrn/RatingPlans.csv @@ -1,4 +1,4 @@ -#Id,DestinationRatesId,TimingTag,Weight -RP_LEVEL3_INTER,DR_13128543000_2CNT,*any,10 -RP_TMOBILE_INTER,DR_13128543000_3CNT,*any,10 -RP_COMCAST_INTER,DR_13128543000_1CNT,*any,10 \ No newline at end of file +#Id,DestinationRatesId,Weight +RP_LEVEL3_INTER,DR_13128543000_2CNT,10 +RP_TMOBILE_INTER,DR_13128543000_3CNT,10 +RP_COMCAST_INTER,DR_13128543000_1CNT,10 \ No newline at end of file diff --git a/data/tariffplans/dispatchers/Attributes.csv b/data/tariffplans/dispatchers/Attributes.csv index 0c9c704f1..60dec3f81 100644 --- a/data/tariffplans/dispatchers/Attributes.csv +++ b/data/tariffplans/dispatchers/Attributes.csv @@ -20,7 +20,7 @@ cgrates.org,ATTR_API_PSE_AUTH,*auth,*string:~*req.ApiKey:pse12345,20,,*req.APIMe cgrates.org,ATTR_API_CFG_AUTH,*auth,*string:~*req.ApiKey:cfg12345,20,,*req.APIMethods,*constant,ConfigSv1.GetConfig&ConfigSv1.ReloadConfig,false cgrates.org,ATTR_API_APIER_AUTH,*auth,*string:~*req.ApiKey:apier12345,20,,*req.APIMethods,*constant,APIerSv1.GetAttributeProfile&APIerSv1.SetAttributeProfile,false cgrates.org,ATTR_API_RALS_AUTH,*auth,*string:~*req.ApiKey:rals12345,20,,*req.APIMethods,*constant,RALsV1.Ping&RALsV1.GetRatingPlansCost,false -cgrates.org,ATTR_API_REPLICATOR_AUTH,*auth,*string:~*req.ApiKey:repl12345,20,,*req.APIMethods,*constant,ReplicatorSv1.Ping&ReplicatorSv1.GetAccount&ReplicatorSv1.SetAccount&ReplicatorSv1.RemoveAccount&ReplicatorSv1.GetRouteProfile&ReplicatorSv1.SetRouteProfile&ReplicatorSv1.RemoveRouteProfile&ReplicatorSv1.GetAttributeProfile&ReplicatorSv1.SetAttributeProfile&ReplicatorSv1.RemoveAttributeProfile&ReplicatorSv1.SetChargerProfile&ReplicatorSv1.GetChargerProfile&ReplicatorSv1.RemoveChargerProfile&ReplicatorSv1.GetDispatcherProfile&ReplicatorSv1.SetDispatcherProfile&ReplicatorSv1.RemoveDispatcherProfile&ReplicatorSv1.GetDispatcherHost&ReplicatorSv1.SetDispatcherHost&ReplicatorSv1.RemoveDispatcherHost&ReplicatorSv1.GetFilter&ReplicatorSv1.SetFilter&ReplicatorSv1.RemoveFilter&ReplicatorSv1.GetThreshold&ReplicatorSv1.SetThreshold&ReplicatorSv1.RemoveThreshold&ReplicatorSv1.GetStatQueue&ReplicatorSv1.SetStatQueue&ReplicatorSv1.RemoveStatQueue&ReplicatorSv1.GetResource&ReplicatorSv1.SetResource&ReplicatorSv1.RemoveResource&ReplicatorSv1.GetResourceProfile&ReplicatorSv1.SetResourceProfile&ReplicatorSv1.RemoveResourceProfile&ReplicatorSv1.GetStatQueueProfile&ReplicatorSv1.SetStatQueueProfile&ReplicatorSv1.RemoveStatQueueProfile&ReplicatorSv1.GetThresholdProfile&ReplicatorSv1.SetThresholdProfile&ReplicatorSv1.RemoveThresholdProfile&ReplicatorSv1.GetTiming&ReplicatorSv1.SetTiming&ReplicatorSv1.RemoveTiming&ReplicatorSv1.GetActionTriggers&ReplicatorSv1.SetActionTriggers&ReplicatorSv1.RemoveActionTriggers&ReplicatorSv1.SetSharedGroup&ReplicatorSv1.GetSharedGroup&ReplicatorSv1.RemoveSharedGroup&ReplicatorSv1.SetActions&ReplicatorSv1.GetActions&ReplicatorSv1.RemoveActions&ReplicatorSv1.SetActionPlan&ReplicatorSv1.GetActionPlan&ReplicatorSv1.RemoveActionPlan&ReplicatorSv1.SetAccountActionPlans&ReplicatorSv1.GetAccountActionPlans&ReplicatorSv1.RemAccountActionPlans&ReplicatorSv1.SetRatingPlan&ReplicatorSv1.GetRatingPlan&ReplicatorSv1.RemoveRatingPlan&ReplicatorSv1.SetRatingProfile&ReplicatorSv1.GetRatingProfile&ReplicatorSv1.RemoveRatingProfile&ReplicatorSv1.SetDestination&ReplicatorSv1.GetDestination&ReplicatorSv1.RemoveDestination&ReplicatorSv1.SetLoadIDs&ReplicatorSv1.GetItemLoadIDs&ReplicatorSv1.SetRateProfile&ReplicatorSv1.GetRateProfile&ReplicatorSv1.RemoveRateProfile&ReplicatorSv1.SetAccount&ReplicatorSv1.GetAccount&ReplicatorSv1.RemoveAccount&ReplicatorSv1.SetActionProfile&ReplicatorSv1.GetActionProfile&ReplicatorSv1.RemoveActionProfile,false +cgrates.org,ATTR_API_REPLICATOR_AUTH,*auth,*string:~*req.ApiKey:repl12345,20,,*req.APIMethods,*constant,ReplicatorSv1.Ping&ReplicatorSv1.GetAccount&ReplicatorSv1.SetAccount&ReplicatorSv1.RemoveAccount&ReplicatorSv1.GetRouteProfile&ReplicatorSv1.SetRouteProfile&ReplicatorSv1.RemoveRouteProfile&ReplicatorSv1.GetAttributeProfile&ReplicatorSv1.SetAttributeProfile&ReplicatorSv1.RemoveAttributeProfile&ReplicatorSv1.SetChargerProfile&ReplicatorSv1.GetChargerProfile&ReplicatorSv1.RemoveChargerProfile&ReplicatorSv1.GetDispatcherProfile&ReplicatorSv1.SetDispatcherProfile&ReplicatorSv1.RemoveDispatcherProfile&ReplicatorSv1.GetDispatcherHost&ReplicatorSv1.SetDispatcherHost&ReplicatorSv1.RemoveDispatcherHost&ReplicatorSv1.GetFilter&ReplicatorSv1.SetFilter&ReplicatorSv1.RemoveFilter&ReplicatorSv1.GetThreshold&ReplicatorSv1.SetThreshold&ReplicatorSv1.RemoveThreshold&ReplicatorSv1.GetStatQueue&ReplicatorSv1.SetStatQueue&ReplicatorSv1.RemoveStatQueue&ReplicatorSv1.GetResource&ReplicatorSv1.SetResource&ReplicatorSv1.RemoveResource&ReplicatorSv1.GetResourceProfile&ReplicatorSv1.SetResourceProfile&ReplicatorSv1.RemoveResourceProfile&ReplicatorSv1.GetStatQueueProfile&ReplicatorSv1.SetStatQueueProfile&ReplicatorSv1.RemoveStatQueueProfile&ReplicatorSv1.GetThresholdProfile&ReplicatorSv1.SetThresholdProfile&ReplicatorSv1.RemoveThresholdProfile&ReplicatorSv1.GetActionTriggers&ReplicatorSv1.SetActionTriggers&ReplicatorSv1.RemoveActionTriggers&ReplicatorSv1.SetSharedGroup&ReplicatorSv1.GetSharedGroup&ReplicatorSv1.RemoveSharedGroup&ReplicatorSv1.SetActions&ReplicatorSv1.GetActions&ReplicatorSv1.RemoveActions&ReplicatorSv1.SetActionPlan&ReplicatorSv1.GetActionPlan&ReplicatorSv1.RemoveActionPlan&ReplicatorSv1.SetAccountActionPlans&ReplicatorSv1.GetAccountActionPlans&ReplicatorSv1.RemAccountActionPlans&ReplicatorSv1.SetRatingPlan&ReplicatorSv1.GetRatingPlan&ReplicatorSv1.RemoveRatingPlan&ReplicatorSv1.SetRatingProfile&ReplicatorSv1.GetRatingProfile&ReplicatorSv1.RemoveRatingProfile&ReplicatorSv1.SetDestination&ReplicatorSv1.GetDestination&ReplicatorSv1.RemoveDestination&ReplicatorSv1.SetLoadIDs&ReplicatorSv1.GetItemLoadIDs&ReplicatorSv1.SetRateProfile&ReplicatorSv1.GetRateProfile&ReplicatorSv1.RemoveRateProfile&ReplicatorSv1.SetAccount&ReplicatorSv1.GetAccount&ReplicatorSv1.RemoveAccount&ReplicatorSv1.SetActionProfile&ReplicatorSv1.GetActionProfile&ReplicatorSv1.RemoveActionProfile,false cgrates.org,ATTR_API_CDRSV2,*auth,*string:~*req.ApiKey:cdrsv212345,20,,*req.APIMethods,*constant,CDRsV2.ProcessEvent&CDRsV2.StoreSessionCost,false cgrates.org,ATTR_API_RATES_AUTH,*auth,*string:~*req.ApiKey:rPrf12345,20,,*req.APIMethods,*constant,RateSv1.Ping&RateSv1.CostForEvent,false cgrates.org,ATTR_API_CORE_AUTH,*auth,*string:~*req.ApiKey:core12345,20,,*req.APIMethods,*constant,CoreSv1.Status&CoreSv1.Ping&CoreSv1.Sleep,false diff --git a/data/tariffplans/dispatchers_gob/Attributes.csv b/data/tariffplans/dispatchers_gob/Attributes.csv index e96f9ba1f..451b0f220 100644 --- a/data/tariffplans/dispatchers_gob/Attributes.csv +++ b/data/tariffplans/dispatchers_gob/Attributes.csv @@ -20,7 +20,7 @@ cgrates.org,ATTR_API_PSE_AUTH,*auth,*string:~*req.ApiKey:pse12345,20,,*req.APIMe cgrates.org,ATTR_API_CFG_AUTH,*auth,*string:~*req.ApiKey:cfg12345,20,,*req.APIMethods,*constant,ConfigSv1.GetConfig&ConfigSv1.ReloadConfig,false cgrates.org,ATTR_API_APIER_AUTH,*auth,*string:~*req.ApiKey:apier12345,20,,*req.APIMethods,*constant,APIerSv1.GetAttributeProfile&APIerSv1.SetAttributeProfile,false cgrates.org,ATTR_API_RALS_AUTH,*auth,*string:~*req.ApiKey:rals12345,20,,*req.APIMethods,*constant,RALsV1.Ping&RALsV1.GetRatingPlansCost,false -cgrates.org,ATTR_API_REPLICATOR_AUTH,*auth,*string:~*req.ApiKey:repl12345,20,,*req.APIMethods,*constant,ReplicatorSv1.Ping&ReplicatorSv1.GetAccount&ReplicatorSv1.SetAccount&ReplicatorSv1.RemoveAccount&ReplicatorSv1.GetRouteProfile&ReplicatorSv1.SetRouteProfile&ReplicatorSv1.RemoveRouteProfile&ReplicatorSv1.GetAttributeProfile&ReplicatorSv1.SetAttributeProfile&ReplicatorSv1.RemoveAttributeProfile&ReplicatorSv1.SetChargerProfile&ReplicatorSv1.GetChargerProfile&ReplicatorSv1.RemoveChargerProfile&ReplicatorSv1.GetDispatcherProfile&ReplicatorSv1.SetDispatcherProfile&ReplicatorSv1.RemoveDispatcherProfile&ReplicatorSv1.GetDispatcherHost&ReplicatorSv1.SetDispatcherHost&ReplicatorSv1.RemoveDispatcherHost&ReplicatorSv1.GetFilter&ReplicatorSv1.SetFilter&ReplicatorSv1.RemoveFilter&ReplicatorSv1.GetThreshold&ReplicatorSv1.SetThreshold&ReplicatorSv1.RemoveThreshold&ReplicatorSv1.GetStatQueue&ReplicatorSv1.SetStatQueue&ReplicatorSv1.RemoveStatQueue&ReplicatorSv1.GetResource&ReplicatorSv1.SetResource&ReplicatorSv1.RemoveResource&ReplicatorSv1.GetResourceProfile&ReplicatorSv1.SetResourceProfile&ReplicatorSv1.RemoveResourceProfile&ReplicatorSv1.GetStatQueueProfile&ReplicatorSv1.SetStatQueueProfile&ReplicatorSv1.RemoveStatQueueProfile&ReplicatorSv1.GetThresholdProfile&ReplicatorSv1.SetThresholdProfile&ReplicatorSv1.RemoveThresholdProfile&ReplicatorSv1.GetTiming&ReplicatorSv1.SetTiming&ReplicatorSv1.RemoveTiming&ReplicatorSv1.GetActionTriggers&ReplicatorSv1.SetActionTriggers&ReplicatorSv1.RemoveActionTriggers&ReplicatorSv1.SetSharedGroup&ReplicatorSv1.GetSharedGroup&ReplicatorSv1.RemoveSharedGroup&ReplicatorSv1.SetActions&ReplicatorSv1.GetActions&ReplicatorSv1.RemoveActions&ReplicatorSv1.SetActionPlan&ReplicatorSv1.GetActionPlan&ReplicatorSv1.RemoveActionPlan&ReplicatorSv1.SetAccountActionPlans&ReplicatorSv1.GetAccountActionPlans&ReplicatorSv1.RemAccountActionPlans&ReplicatorSv1.SetRatingPlan&ReplicatorSv1.GetRatingPlan&ReplicatorSv1.RemoveRatingPlan&ReplicatorSv1.SetRatingProfile&ReplicatorSv1.GetRatingProfile&ReplicatorSv1.RemoveRatingProfile&ReplicatorSv1.SetLoadIDs&ReplicatorSv1.GetItemLoadIDs&ReplicatorSv1.SetRateProfile&ReplicatorSv1.GetRateProfile&ReplicatorSv1.RemoveRateProfile,false +cgrates.org,ATTR_API_REPLICATOR_AUTH,*auth,*string:~*req.ApiKey:repl12345,20,,*req.APIMethods,*constant,ReplicatorSv1.Ping&ReplicatorSv1.GetAccount&ReplicatorSv1.SetAccount&ReplicatorSv1.RemoveAccount&ReplicatorSv1.GetRouteProfile&ReplicatorSv1.SetRouteProfile&ReplicatorSv1.RemoveRouteProfile&ReplicatorSv1.GetAttributeProfile&ReplicatorSv1.SetAttributeProfile&ReplicatorSv1.RemoveAttributeProfile&ReplicatorSv1.SetChargerProfile&ReplicatorSv1.GetChargerProfile&ReplicatorSv1.RemoveChargerProfile&ReplicatorSv1.GetDispatcherProfile&ReplicatorSv1.SetDispatcherProfile&ReplicatorSv1.RemoveDispatcherProfile&ReplicatorSv1.GetDispatcherHost&ReplicatorSv1.SetDispatcherHost&ReplicatorSv1.RemoveDispatcherHost&ReplicatorSv1.GetFilter&ReplicatorSv1.SetFilter&ReplicatorSv1.RemoveFilter&ReplicatorSv1.GetThreshold&ReplicatorSv1.SetThreshold&ReplicatorSv1.RemoveThreshold&ReplicatorSv1.GetStatQueue&ReplicatorSv1.SetStatQueue&ReplicatorSv1.RemoveStatQueue&ReplicatorSv1.GetResource&ReplicatorSv1.SetResource&ReplicatorSv1.RemoveResource&ReplicatorSv1.GetResourceProfile&ReplicatorSv1.SetResourceProfile&ReplicatorSv1.RemoveResourceProfile&ReplicatorSv1.GetStatQueueProfile&ReplicatorSv1.SetStatQueueProfile&ReplicatorSv1.RemoveStatQueueProfile&ReplicatorSv1.GetThresholdProfile&ReplicatorSv1.SetThresholdProfile&ReplicatorSv1.RemoveThresholdProfile&ReplicatorSv1.GetActionTriggers&ReplicatorSv1.SetActionTriggers&ReplicatorSv1.RemoveActionTriggers&ReplicatorSv1.SetSharedGroup&ReplicatorSv1.GetSharedGroup&ReplicatorSv1.RemoveSharedGroup&ReplicatorSv1.SetActions&ReplicatorSv1.GetActions&ReplicatorSv1.RemoveActions&ReplicatorSv1.SetActionPlan&ReplicatorSv1.GetActionPlan&ReplicatorSv1.RemoveActionPlan&ReplicatorSv1.SetAccountActionPlans&ReplicatorSv1.GetAccountActionPlans&ReplicatorSv1.RemAccountActionPlans&ReplicatorSv1.SetRatingPlan&ReplicatorSv1.GetRatingPlan&ReplicatorSv1.RemoveRatingPlan&ReplicatorSv1.SetRatingProfile&ReplicatorSv1.GetRatingProfile&ReplicatorSv1.RemoveRatingProfile&ReplicatorSv1.SetLoadIDs&ReplicatorSv1.GetItemLoadIDs&ReplicatorSv1.SetRateProfile&ReplicatorSv1.GetRateProfile&ReplicatorSv1.RemoveRateProfile,false cgrates.org,ATTR_API_CDRSV2,*auth,*string:~*req.ApiKey:cdrsv212345,20,,*req.APIMethods,*constant,CDRsV2.ProcessEvent&CDRsV2.StoreSessionCost,false cgrates.org,ATTR_API_RATES_AUTH,*auth,*string:~*req.ApiKey:rPrf12345,20,,*req.APIMethods,*constant,RateSv1.Ping,false cgrates.org,ATTR_API_CORE_AUTH,*auth,*string:~*req.ApiKey:core12345,20,,*req.APIMethods,*constant,CoreSv1.Status&CoreSv1.Ping&CoreSv1.Sleep,false diff --git a/data/tariffplans/hundredrates/RatingPlans.csv b/data/tariffplans/hundredrates/RatingPlans.csv index eee8fad6d..60d0ab5c0 100644 --- a/data/tariffplans/hundredrates/RatingPlans.csv +++ b/data/tariffplans/hundredrates/RatingPlans.csv @@ -1,102 +1,102 @@ -#Id,DestinationRatesId,TimingTag,Weight -RP_ANY,DR_100,*any,10 -RP_ANY,DR_101,*any,10 -RP_ANY,DR_102,*any,10 -RP_ANY,DR_103,*any,10 -RP_ANY,DR_104,*any,10 -RP_ANY,DR_105,*any,10 -RP_ANY,DR_106,*any,10 -RP_ANY,DR_107,*any,10 -RP_ANY,DR_108,*any,10 -RP_ANY,DR_109,*any,10 -RP_ANY,DR_110,*any,10 -RP_ANY,DR_111,*any,10 -RP_ANY,DR_112,*any,10 -RP_ANY,DR_113,*any,10 -RP_ANY,DR_114,*any,10 -RP_ANY,DR_115,*any,10 -RP_ANY,DR_116,*any,10 -RP_ANY,DR_117,*any,10 -RP_ANY,DR_118,*any,10 -RP_ANY,DR_119,*any,10 -RP_ANY,DR_120,*any,10 -RP_ANY,DR_121,*any,10 -RP_ANY,DR_122,*any,10 -RP_ANY,DR_123,*any,10 -RP_ANY,DR_124,*any,10 -RP_ANY,DR_125,*any,10 -RP_ANY,DR_126,*any,10 -RP_ANY,DR_127,*any,10 -RP_ANY,DR_128,*any,10 -RP_ANY,DR_129,*any,10 -RP_ANY,DR_130,*any,10 -RP_ANY,DR_131,*any,10 -RP_ANY,DR_132,*any,10 -RP_ANY,DR_133,*any,10 -RP_ANY,DR_134,*any,10 -RP_ANY,DR_135,*any,10 -RP_ANY,DR_136,*any,10 -RP_ANY,DR_137,*any,10 -RP_ANY,DR_138,*any,10 -RP_ANY,DR_139,*any,10 -RP_ANY,DR_140,*any,10 -RP_ANY,DR_141,*any,10 -RP_ANY,DR_142,*any,10 -RP_ANY,DR_143,*any,10 -RP_ANY,DR_144,*any,10 -RP_ANY,DR_145,*any,10 -RP_ANY,DR_146,*any,10 -RP_ANY,DR_147,*any,10 -RP_ANY,DR_148,*any,10 -RP_ANY,DR_149,*any,10 -RP_ANY,DR_150,*any,10 -RP_ANY,DR_151,*any,10 -RP_ANY,DR_152,*any,10 -RP_ANY,DR_153,*any,10 -RP_ANY,DR_154,*any,10 -RP_ANY,DR_155,*any,10 -RP_ANY,DR_156,*any,10 -RP_ANY,DR_157,*any,10 -RP_ANY,DR_158,*any,10 -RP_ANY,DR_159,*any,10 -RP_ANY,DR_160,*any,10 -RP_ANY,DR_161,*any,10 -RP_ANY,DR_162,*any,10 -RP_ANY,DR_163,*any,10 -RP_ANY,DR_164,*any,10 -RP_ANY,DR_165,*any,10 -RP_ANY,DR_166,*any,10 -RP_ANY,DR_167,*any,10 -RP_ANY,DR_168,*any,10 -RP_ANY,DR_169,*any,10 -RP_ANY,DR_170,*any,10 -RP_ANY,DR_171,*any,10 -RP_ANY,DR_172,*any,10 -RP_ANY,DR_173,*any,10 -RP_ANY,DR_174,*any,10 -RP_ANY,DR_175,*any,10 -RP_ANY,DR_176,*any,10 -RP_ANY,DR_177,*any,10 -RP_ANY,DR_178,*any,10 -RP_ANY,DR_179,*any,10 -RP_ANY,DR_180,*any,10 -RP_ANY,DR_181,*any,10 -RP_ANY,DR_182,*any,10 -RP_ANY,DR_183,*any,10 -RP_ANY,DR_184,*any,10 -RP_ANY,DR_185,*any,10 -RP_ANY,DR_186,*any,10 -RP_ANY,DR_187,*any,10 -RP_ANY,DR_188,*any,10 -RP_ANY,DR_189,*any,10 -RP_ANY,DR_190,*any,10 -RP_ANY,DR_191,*any,10 -RP_ANY,DR_192,*any,10 -RP_ANY,DR_193,*any,10 -RP_ANY,DR_194,*any,10 -RP_ANY,DR_195,*any,10 -RP_ANY,DR_196,*any,10 -RP_ANY,DR_197,*any,10 -RP_ANY,DR_198,*any,10 -RP_ANY,DR_199,*any,10 +#Id,DestinationRatesId,Weight +RP_ANY,DR_100,10 +RP_ANY,DR_101,10 +RP_ANY,DR_102,10 +RP_ANY,DR_103,10 +RP_ANY,DR_104,10 +RP_ANY,DR_105,10 +RP_ANY,DR_106,10 +RP_ANY,DR_107,10 +RP_ANY,DR_108,10 +RP_ANY,DR_109,10 +RP_ANY,DR_110,10 +RP_ANY,DR_111,10 +RP_ANY,DR_112,10 +RP_ANY,DR_113,10 +RP_ANY,DR_114,10 +RP_ANY,DR_115,10 +RP_ANY,DR_116,10 +RP_ANY,DR_117,10 +RP_ANY,DR_118,10 +RP_ANY,DR_119,10 +RP_ANY,DR_120,10 +RP_ANY,DR_121,10 +RP_ANY,DR_122,10 +RP_ANY,DR_123,10 +RP_ANY,DR_124,10 +RP_ANY,DR_125,10 +RP_ANY,DR_126,10 +RP_ANY,DR_127,10 +RP_ANY,DR_128,10 +RP_ANY,DR_129,10 +RP_ANY,DR_130,10 +RP_ANY,DR_131,10 +RP_ANY,DR_132,10 +RP_ANY,DR_133,10 +RP_ANY,DR_134,10 +RP_ANY,DR_135,10 +RP_ANY,DR_136,10 +RP_ANY,DR_137,10 +RP_ANY,DR_138,10 +RP_ANY,DR_139,10 +RP_ANY,DR_140,10 +RP_ANY,DR_141,10 +RP_ANY,DR_142,10 +RP_ANY,DR_143,10 +RP_ANY,DR_144,10 +RP_ANY,DR_145,10 +RP_ANY,DR_146,10 +RP_ANY,DR_147,10 +RP_ANY,DR_148,10 +RP_ANY,DR_149,10 +RP_ANY,DR_150,10 +RP_ANY,DR_151,10 +RP_ANY,DR_152,10 +RP_ANY,DR_153,10 +RP_ANY,DR_154,10 +RP_ANY,DR_155,10 +RP_ANY,DR_156,10 +RP_ANY,DR_157,10 +RP_ANY,DR_158,10 +RP_ANY,DR_159,10 +RP_ANY,DR_160,10 +RP_ANY,DR_161,10 +RP_ANY,DR_162,10 +RP_ANY,DR_163,10 +RP_ANY,DR_164,10 +RP_ANY,DR_165,10 +RP_ANY,DR_166,10 +RP_ANY,DR_167,10 +RP_ANY,DR_168,10 +RP_ANY,DR_169,10 +RP_ANY,DR_170,10 +RP_ANY,DR_171,10 +RP_ANY,DR_172,10 +RP_ANY,DR_173,10 +RP_ANY,DR_174,10 +RP_ANY,DR_175,10 +RP_ANY,DR_176,10 +RP_ANY,DR_177,10 +RP_ANY,DR_178,10 +RP_ANY,DR_179,10 +RP_ANY,DR_180,10 +RP_ANY,DR_181,10 +RP_ANY,DR_182,10 +RP_ANY,DR_183,10 +RP_ANY,DR_184,10 +RP_ANY,DR_185,10 +RP_ANY,DR_186,10 +RP_ANY,DR_187,10 +RP_ANY,DR_188,10 +RP_ANY,DR_189,10 +RP_ANY,DR_190,10 +RP_ANY,DR_191,10 +RP_ANY,DR_192,10 +RP_ANY,DR_193,10 +RP_ANY,DR_194,10 +RP_ANY,DR_195,10 +RP_ANY,DR_196,10 +RP_ANY,DR_197,10 +RP_ANY,DR_198,10 +RP_ANY,DR_199,10 diff --git a/data/tariffplans/oldaccvsnew/ActionPlans.csv b/data/tariffplans/oldaccvsnew/ActionPlans.csv index 1dfd09f7a..fbc02a47d 100644 --- a/data/tariffplans/oldaccvsnew/ActionPlans.csv +++ b/data/tariffplans/oldaccvsnew/ActionPlans.csv @@ -1,3 +1,3 @@ -#Id,ActionsId,TimingId,Weight -AP_PACKAGE_10,ACT_TOPUP_RST_10,*asap,10 -AP_PACKAGE_11,ACT_TOPUP_RST_11,*asap,10 \ No newline at end of file +#Id,ActionsId,Weight +AP_PACKAGE_10,ACT_TOPUP_RST_10,10 +AP_PACKAGE_11,ACT_TOPUP_RST_11,10 \ No newline at end of file diff --git a/data/tariffplans/oldaccvsnew/Actions.csv b/data/tariffplans/oldaccvsnew/Actions.csv index 48ab4c657..1c52d0231 100644 --- a/data/tariffplans/oldaccvsnew/Actions.csv +++ b/data/tariffplans/oldaccvsnew/Actions.csv @@ -1,4 +1,4 @@ -#ActionsId[0],Action[1],ExtraParameters[2],Filter[3],BalanceId[4],BalanceType[5],Categories[6],DestinationIds[7],RatingSubject[8],SharedGroup[9],ExpiryTime[10],TimingIds[11],Units[12],BalanceWeight[13],BalanceBlocker[14],BalanceDisabled[15],Weight[16] +#ActionsId[0],Action[1],ExtraParameters[2],Filter[3],BalanceId[4],BalanceType[5],Categories[6],DestinationIds[7],RatingSubject[8],SharedGroup[9],ExpiryTime[10],Units[11],BalanceWeight[12],BalanceBlocker[13],BalanceDisabled[14],Weight[15] ACT_TOPUP_RST_10,*topup_reset,,,test,*voice,,*any,,,*unlimited,,3600000000000,10,false,false,10 ACT_TOPUP_RST_11,*topup_reset,,,,*voice,,*any,RP_ANY,,*unlimited,,3600000000000,10,false,false,10 ACT_TOPUP_RST_11,*topup_reset,,,,*monetary,,*any,,,*unlimited,,100,10,false,false,10 diff --git a/data/tariffplans/oldaccvsnew/RatingPlans.csv b/data/tariffplans/oldaccvsnew/RatingPlans.csv index 4749de4d3..b6dac7720 100644 --- a/data/tariffplans/oldaccvsnew/RatingPlans.csv +++ b/data/tariffplans/oldaccvsnew/RatingPlans.csv @@ -1,2 +1,2 @@ -#Id,DestinationRatesId,TimingTag,Weight -RP_ANY,DR_ANY,*any,10 \ No newline at end of file +#Id,DestinationRatesId,Weight +RP_ANY,DR_ANY,10 \ No newline at end of file diff --git a/data/tariffplans/oldtutorial/ActionPlans.csv b/data/tariffplans/oldtutorial/ActionPlans.csv index 69d8ee8fb..82bbf3301 100644 --- a/data/tariffplans/oldtutorial/ActionPlans.csv +++ b/data/tariffplans/oldtutorial/ActionPlans.csv @@ -1,4 +1,4 @@ -#Id,ActionsId,TimingId,Weight +#Id,ActionsId,Weight PACKAGE_10,TOPUP_RST_10,*asap,10 PACKAGE_10_SHARED_A_5,TOPUP_RST_5,*asap,10 PACKAGE_10_SHARED_A_5,TOPUP_RST_SHARED_5,*asap,10 diff --git a/data/tariffplans/oldtutorial/ActionTriggers.csv b/data/tariffplans/oldtutorial/ActionTriggers.csv index 427be4a99..5cfc66062 100644 --- a/data/tariffplans/oldtutorial/ActionTriggers.csv +++ b/data/tariffplans/oldtutorial/ActionTriggers.csv @@ -1,4 +1,4 @@ -#Tag[0],UniqueId[1],ThresholdType[2],ThresholdValue[3],Recurrent[4],MinSleep[5],ExpiryTime[6],ActivationTime[7],BalanceTag[8],BalanceType[9],BalanceCategories[10],BalanceDestinationIds[11],BalanceRatingSubject[12],BalanceSharedGroup[13],BalanceExpiryTime[14],BalanceTimingIds[15],BalanceWeight[16],BalanceBlocker[17],BalanceDisabled[18],ActionsId[19],Weight[20] +#Tag[0],UniqueId[1],ThresholdType[2],ThresholdValue[3],Recurrent[4],MinSleep[5],ExpiryTime[6],ActivationTime[7],BalanceTag[8],BalanceType[9],BalanceCategories[10],BalanceDestinationIds[11],BalanceRatingSubject[12],BalanceSharedGroup[13],BalanceExpiryTime[14],BalanceWeight[15],BalanceBlocker[16],BalanceDisabled[17],ActionsId[18],Weight[19] STANDARD_TRIGGERS,,*min_balance,2,false,0,,,,*monetary,,,,,,,,,,LOG_WARNING,10 STANDARD_TRIGGERS,,*max_event_counter,5,false,0,,,,*monetary,,FS_USERS,,,,,,,,LOG_WARNING,10 STANDARD_TRIGGERS,,*max_balance,20,false,0,,,,*monetary,,,,,,,,,,LOG_WARNING,10 diff --git a/data/tariffplans/oldtutorial/Actions.csv b/data/tariffplans/oldtutorial/Actions.csv index da08f7496..e7a5996d0 100644 --- a/data/tariffplans/oldtutorial/Actions.csv +++ b/data/tariffplans/oldtutorial/Actions.csv @@ -1,4 +1,4 @@ -#ActionsId[0],Action[1],ExtraParameters[2],Filter[3],BalanceId[4],BalanceType[5],Categories[6],DestinationIds[7],RatingSubject[8],SharedGroup[9],ExpiryTime[10],TimingIds[11],Units[12],BalanceWeight[13],BalanceBlocker[14],BalanceDisabled[15],Weight[16] +#ActionsId[0],Action[1],ExtraParameters[2],Filter[3],BalanceId[4],BalanceType[5],Categories[6],DestinationIds[7],RatingSubject[8],SharedGroup[9],ExpiryTime[10],Units[11],BalanceWeight[12],BalanceBlocker[13],BalanceDisabled[14],Weight[15] TOPUP_RST_10,*topup_reset,,,,*monetary,,*any,,,*unlimited,,10,10,false,false,10 TOPUP_RST_5,*topup_reset,,,,*monetary,,*any,,,*unlimited,,5,20,false,false,10 TOPUP_RST_5,*topup_reset,,,,*voice,,DST_1002,SPECIAL_1002,,*unlimited,,90s,20,false,false,10 diff --git a/data/tariffplans/oldtutorial/README.md b/data/tariffplans/oldtutorial/README.md index 65f577afe..b70f4be69 100644 --- a/data/tariffplans/oldtutorial/README.md +++ b/data/tariffplans/oldtutorial/README.md @@ -4,8 +4,6 @@ CGRateS Tutorial Scenario: --------- -- Create the necessary timings (always, asap, peak, offpeak). -- Configure 3 destinations (1002, 1003 and 10 used as catch all rule). - As rating we configure the following: - Rate id: *RT_10CNT* with connect fee of 20cents, 10cents per minute for the first 60s in 60s increments followed by 5cents per minute in 1s increments. diff --git a/data/tariffplans/oldtutorial/RatingPlans.csv b/data/tariffplans/oldtutorial/RatingPlans.csv index 59dc663d7..f183faf3e 100644 --- a/data/tariffplans/oldtutorial/RatingPlans.csv +++ b/data/tariffplans/oldtutorial/RatingPlans.csv @@ -1,21 +1,21 @@ -#Id,DestinationRatesId,TimingTag,Weight -RP_RETAIL1,DR_FS_40CNT,PEAK,10 -RP_RETAIL1,DR_FS_10CNT,OFFPEAK_MORNING,10 -RP_RETAIL1,DR_FS_10CNT,OFFPEAK_EVENING,10 -RP_RETAIL1,DR_FS_10CNT,OFFPEAK_WEEKEND,10 -RP_RETAIL1,DR_1007_MAXCOST_DISC,*any,10 -RP_RETAIL2,DR_1002_20CNT,PEAK,10 -RP_RETAIL2,DR_1003_20CNT,PEAK,10 -RP_RETAIL2,DR_FS_40CNT,PEAK,10 -RP_RETAIL2,DR_1002_10CNT,OFFPEAK_MORNING,10 -RP_RETAIL2,DR_1002_10CNT,OFFPEAK_EVENING,10 -RP_RETAIL2,DR_1002_10CNT,OFFPEAK_WEEKEND,10 -RP_RETAIL2,DR_1003_10CNT,OFFPEAK_MORNING,10 -RP_RETAIL2,DR_1003_10CNT,OFFPEAK_EVENING,10 -RP_RETAIL2,DR_1003_10CNT,OFFPEAK_WEEKEND,10 -RP_RETAIL2,DR_FS_10CNT,OFFPEAK_MORNING,10 -RP_RETAIL2,DR_FS_10CNT,OFFPEAK_EVENING,10 -RP_RETAIL2,DR_FS_10CNT,OFFPEAK_WEEKEND,10 -RP_RETAIL2,DR_1007_MAXCOST_FREE,*any,10 -RP_SPECIAL_1002,DR_SPECIAL_1002,*any,10 -RP_GENERIC,DR_GENERIC,*any,10 \ No newline at end of file +#Id,DestinationRatesId,Weight +RP_RETAIL1,DR_FS_40CNT,10 +RP_RETAIL1,DR_FS_10CNT,10 +RP_RETAIL1,DR_FS_10CNT,10 +RP_RETAIL1,DR_FS_10CNT,10 +RP_RETAIL1,DR_1007_MAXCOST_DISC,10 +RP_RETAIL2,DR_1002_20CNT,10 +RP_RETAIL2,DR_1003_20CNT,10 +RP_RETAIL2,DR_FS_40CNT,10 +RP_RETAIL2,DR_1002_10CNT,10 +RP_RETAIL2,DR_1002_10CNT,10 +RP_RETAIL2,DR_1002_10CNT,10 +RP_RETAIL2,DR_1003_10CNT,10 +RP_RETAIL2,DR_1003_10CNT,10 +RP_RETAIL2,DR_1003_10CNT,10 +RP_RETAIL2,DR_FS_10CNT,10 +RP_RETAIL2,DR_FS_10CNT,10 +RP_RETAIL2,DR_FS_10CNT,10 +RP_RETAIL2,DR_1007_MAXCOST_FREE,10 +RP_SPECIAL_1002,DR_SPECIAL_1002,10 +RP_GENERIC,DR_GENERIC,10 \ No newline at end of file diff --git a/data/tariffplans/precache/ActionPlans.csv b/data/tariffplans/precache/ActionPlans.csv index 69d8ee8fb..e1883da35 100644 --- a/data/tariffplans/precache/ActionPlans.csv +++ b/data/tariffplans/precache/ActionPlans.csv @@ -1,9 +1,9 @@ -#Id,ActionsId,TimingId,Weight -PACKAGE_10,TOPUP_RST_10,*asap,10 -PACKAGE_10_SHARED_A_5,TOPUP_RST_5,*asap,10 -PACKAGE_10_SHARED_A_5,TOPUP_RST_SHARED_5,*asap,10 -USE_SHARED_A,SHARED_A_0,*asap,10 -PACKAGE_1001,TOPUP_RST_5,*asap,10 -PACKAGE_1001,TOPUP_RST_SHARED_5,*asap,10 -PACKAGE_1001,TOPUP_120_DST1003,*asap,10 -PACKAGE_1001,TOPUP_RST_DATA_100,*asap,10 +#Id,ActionsId,Weight +PACKAGE_10,TOPUP_RST_10,10 +PACKAGE_10_SHARED_A_5,TOPUP_RST_5,10 +PACKAGE_10_SHARED_A_5,TOPUP_RST_SHARED_5,10 +USE_SHARED_A,SHARED_A_0,10 +PACKAGE_1001,TOPUP_RST_5,10 +PACKAGE_1001,TOPUP_RST_SHARED_5,10 +PACKAGE_1001,TOPUP_120_DST1003,10 +PACKAGE_1001,TOPUP_RST_DATA_100,10 diff --git a/data/tariffplans/precache/ActionTriggers.csv b/data/tariffplans/precache/ActionTriggers.csv index 427be4a99..5cfc66062 100644 --- a/data/tariffplans/precache/ActionTriggers.csv +++ b/data/tariffplans/precache/ActionTriggers.csv @@ -1,4 +1,4 @@ -#Tag[0],UniqueId[1],ThresholdType[2],ThresholdValue[3],Recurrent[4],MinSleep[5],ExpiryTime[6],ActivationTime[7],BalanceTag[8],BalanceType[9],BalanceCategories[10],BalanceDestinationIds[11],BalanceRatingSubject[12],BalanceSharedGroup[13],BalanceExpiryTime[14],BalanceTimingIds[15],BalanceWeight[16],BalanceBlocker[17],BalanceDisabled[18],ActionsId[19],Weight[20] +#Tag[0],UniqueId[1],ThresholdType[2],ThresholdValue[3],Recurrent[4],MinSleep[5],ExpiryTime[6],ActivationTime[7],BalanceTag[8],BalanceType[9],BalanceCategories[10],BalanceDestinationIds[11],BalanceRatingSubject[12],BalanceSharedGroup[13],BalanceExpiryTime[14],BalanceWeight[15],BalanceBlocker[16],BalanceDisabled[17],ActionsId[18],Weight[19] STANDARD_TRIGGERS,,*min_balance,2,false,0,,,,*monetary,,,,,,,,,,LOG_WARNING,10 STANDARD_TRIGGERS,,*max_event_counter,5,false,0,,,,*monetary,,FS_USERS,,,,,,,,LOG_WARNING,10 STANDARD_TRIGGERS,,*max_balance,20,false,0,,,,*monetary,,,,,,,,,,LOG_WARNING,10 diff --git a/data/tariffplans/precache/Actions.csv b/data/tariffplans/precache/Actions.csv index da08f7496..e7a5996d0 100644 --- a/data/tariffplans/precache/Actions.csv +++ b/data/tariffplans/precache/Actions.csv @@ -1,4 +1,4 @@ -#ActionsId[0],Action[1],ExtraParameters[2],Filter[3],BalanceId[4],BalanceType[5],Categories[6],DestinationIds[7],RatingSubject[8],SharedGroup[9],ExpiryTime[10],TimingIds[11],Units[12],BalanceWeight[13],BalanceBlocker[14],BalanceDisabled[15],Weight[16] +#ActionsId[0],Action[1],ExtraParameters[2],Filter[3],BalanceId[4],BalanceType[5],Categories[6],DestinationIds[7],RatingSubject[8],SharedGroup[9],ExpiryTime[10],Units[11],BalanceWeight[12],BalanceBlocker[13],BalanceDisabled[14],Weight[15] TOPUP_RST_10,*topup_reset,,,,*monetary,,*any,,,*unlimited,,10,10,false,false,10 TOPUP_RST_5,*topup_reset,,,,*monetary,,*any,,,*unlimited,,5,20,false,false,10 TOPUP_RST_5,*topup_reset,,,,*voice,,DST_1002,SPECIAL_1002,,*unlimited,,90s,20,false,false,10 diff --git a/data/tariffplans/precache/RatingPlans.csv b/data/tariffplans/precache/RatingPlans.csv index 59dc663d7..f183faf3e 100644 --- a/data/tariffplans/precache/RatingPlans.csv +++ b/data/tariffplans/precache/RatingPlans.csv @@ -1,21 +1,21 @@ -#Id,DestinationRatesId,TimingTag,Weight -RP_RETAIL1,DR_FS_40CNT,PEAK,10 -RP_RETAIL1,DR_FS_10CNT,OFFPEAK_MORNING,10 -RP_RETAIL1,DR_FS_10CNT,OFFPEAK_EVENING,10 -RP_RETAIL1,DR_FS_10CNT,OFFPEAK_WEEKEND,10 -RP_RETAIL1,DR_1007_MAXCOST_DISC,*any,10 -RP_RETAIL2,DR_1002_20CNT,PEAK,10 -RP_RETAIL2,DR_1003_20CNT,PEAK,10 -RP_RETAIL2,DR_FS_40CNT,PEAK,10 -RP_RETAIL2,DR_1002_10CNT,OFFPEAK_MORNING,10 -RP_RETAIL2,DR_1002_10CNT,OFFPEAK_EVENING,10 -RP_RETAIL2,DR_1002_10CNT,OFFPEAK_WEEKEND,10 -RP_RETAIL2,DR_1003_10CNT,OFFPEAK_MORNING,10 -RP_RETAIL2,DR_1003_10CNT,OFFPEAK_EVENING,10 -RP_RETAIL2,DR_1003_10CNT,OFFPEAK_WEEKEND,10 -RP_RETAIL2,DR_FS_10CNT,OFFPEAK_MORNING,10 -RP_RETAIL2,DR_FS_10CNT,OFFPEAK_EVENING,10 -RP_RETAIL2,DR_FS_10CNT,OFFPEAK_WEEKEND,10 -RP_RETAIL2,DR_1007_MAXCOST_FREE,*any,10 -RP_SPECIAL_1002,DR_SPECIAL_1002,*any,10 -RP_GENERIC,DR_GENERIC,*any,10 \ No newline at end of file +#Id,DestinationRatesId,Weight +RP_RETAIL1,DR_FS_40CNT,10 +RP_RETAIL1,DR_FS_10CNT,10 +RP_RETAIL1,DR_FS_10CNT,10 +RP_RETAIL1,DR_FS_10CNT,10 +RP_RETAIL1,DR_1007_MAXCOST_DISC,10 +RP_RETAIL2,DR_1002_20CNT,10 +RP_RETAIL2,DR_1003_20CNT,10 +RP_RETAIL2,DR_FS_40CNT,10 +RP_RETAIL2,DR_1002_10CNT,10 +RP_RETAIL2,DR_1002_10CNT,10 +RP_RETAIL2,DR_1002_10CNT,10 +RP_RETAIL2,DR_1003_10CNT,10 +RP_RETAIL2,DR_1003_10CNT,10 +RP_RETAIL2,DR_1003_10CNT,10 +RP_RETAIL2,DR_FS_10CNT,10 +RP_RETAIL2,DR_FS_10CNT,10 +RP_RETAIL2,DR_FS_10CNT,10 +RP_RETAIL2,DR_1007_MAXCOST_FREE,10 +RP_SPECIAL_1002,DR_SPECIAL_1002,10 +RP_GENERIC,DR_GENERIC,10 \ No newline at end of file diff --git a/data/tariffplans/testData/RatingPlans.csv b/data/tariffplans/testData/RatingPlans.csv index b0c2c8dbf..4b1094166 100644 --- a/data/tariffplans/testData/RatingPlans.csv +++ b/data/tariffplans/testData/RatingPlans.csv @@ -1,2 +1,2 @@ -#ID,DestinationRatesID,TimingID,Weight -RP_DATA,DR_ANY_10000_1,*any,10 +#ID,DestinationRatesID,Weight +RP_DATA,DR_ANY_10000_1,10 diff --git a/data/tariffplans/testit/ActionPlans.csv b/data/tariffplans/testit/ActionPlans.csv index 5358216bb..51fa0592c 100644 --- a/data/tariffplans/testit/ActionPlans.csv +++ b/data/tariffplans/testit/ActionPlans.csv @@ -1,3 +1,3 @@ -#Id,ActionsId,TimingId,Weight -PACKAGE_1001,TOPUP_RST_MONETARY_10,*asap,10 -PACKAGE_1002,TOPUP_RST_DATA_100,*asap,10 +#Id,ActionsId,Weight +PACKAGE_1001,TOPUP_RST_MONETARY_10,10 +PACKAGE_1002,TOPUP_RST_DATA_100,10 diff --git a/data/tariffplans/testit/Actions.csv b/data/tariffplans/testit/Actions.csv index 1bc50ce8f..520b2c15c 100644 --- a/data/tariffplans/testit/Actions.csv +++ b/data/tariffplans/testit/Actions.csv @@ -1,4 +1,4 @@ -#ActionsId[0],Action[1],ExtraParameters[2],Filter[3],BalanceId[4],BalanceType[5],Categories[6],DestinationIds[7],RatingSubject[8],SharedGroup[9],ExpiryTime[10],TimingIds[11],Units[12],BalanceWeight[13],BalanceBlocker[14],BalanceDisabled[15],Weight[16] +#ActionsId[0],Action[1],ExtraParameters[2],Filter[3],BalanceId[4],BalanceType[5],Categories[6],DestinationIds[7],RatingSubject[8],SharedGroup[9],ExpiryTime[10],Units[11],BalanceWeight[12],BalanceBlocker[13],BalanceDisabled[14],Weight[15] TOPUP_RST_MONETARY_10,*topup_reset,,,,*monetary,,*any,,,*unlimited,,10,10,false,false,10 TOPUP_MONETARY_10,*topup,,,,*monetary,,*any,,,*unlimited,,10,10,false,false,10 TOPUP_RST_DATA_100,*topup_reset,,,,*data,,*any,,,*monthly,,4096,10,false,false,10 diff --git a/data/tariffplans/testit/RatingPlans.csv b/data/tariffplans/testit/RatingPlans.csv index 0b50535b8..d235c1dd1 100644 --- a/data/tariffplans/testit/RatingPlans.csv +++ b/data/tariffplans/testit/RatingPlans.csv @@ -1,12 +1,12 @@ -#Id,DestinationRatesId,TimingTag,Weight -RP_TESTIT1,DR_ANY_1CNT,*any,10 -RP_SPECIAL_1002,DR_SPECIAL_1002,*any,10 -RP_RETAIL1,DR_FS_40CNT,*any,10 -RP_ANY2CNT,DR_ANY_2CNT,*any,10 -RP_ANY1CNT,DR_ANY_1CNT,*any,10 -RP_TEST,DR_TEST_1,*any,10 -RP_MOBILE,DR_MOBILE_1CNT,*any,10 -RP_LOCAL,DR_LOCAL_2CNT,*any,10 -RP_FREE,DR_FREE,*any,10 -RP_ANY2CNT_SEC,DR_ANY_2CNT_SEC,*any,10 -RP_ANY1CNT_SEC,DR_ANY_1CNT_SEC,*any,10 \ No newline at end of file +#Id,DestinationRatesId,Weight +RP_TESTIT1,DR_ANY_1CNT,10 +RP_SPECIAL_1002,DR_SPECIAL_1002,10 +RP_RETAIL1,DR_FS_40CNT,10 +RP_ANY2CNT,DR_ANY_2CNT,10 +RP_ANY1CNT,DR_ANY_1CNT,10 +RP_TEST,DR_TEST_1,10 +RP_MOBILE,DR_MOBILE_1CNT,10 +RP_LOCAL,DR_LOCAL_2CNT,10 +RP_FREE,DR_FREE,10 +RP_ANY2CNT_SEC,DR_ANY_2CNT_SEC,10 +RP_ANY1CNT_SEC,DR_ANY_1CNT_SEC,10 \ No newline at end of file diff --git a/data/tariffplans/testtp/ActionPlans.csv b/data/tariffplans/testtp/ActionPlans.csv index 29fbdc73a..9bfc87bc0 100644 --- a/data/tariffplans/testtp/ActionPlans.csv +++ b/data/tariffplans/testtp/ActionPlans.csv @@ -1,11 +1,11 @@ -#Tag,ActionsTag,TimingTag,Weight -PREPAID_10,PREPAID_10,ASAP,10 -PREPAID_10,BONUS_3,ASAP,10 -TEST_EXE,TOPUP_EXE,ALWAYS,10 -TEST_DATA_r,TOPUP_DATA_r,ASAP,10 -TEST_VOICE,TOPUP_VOICE,ASAP,10 -TEST_NEG,TOPUP_NEG,ASAP,10 -TEST_RPC,RPC,ALWAYS,10 -TEST_RPC,RPC_DEST,ALWAYS,10 -TEST_RPC,RPC_CDRSTATS,ALWAYS,10 -TEST_DID,DID,ALWAYS,10 +#Tag,ActionsTag,Weight +PREPAID_10,PREPAID_10,10 +PREPAID_10,BONUS_3,10 +TEST_EXE,TOPUP_EXE,10 +TEST_DATA_r,TOPUP_DATA_r,10 +TEST_VOICE,TOPUP_VOICE,10 +TEST_NEG,TOPUP_NEG,10 +TEST_RPC,RPC,10 +TEST_RPC,RPC_DEST,10 +TEST_RPC,RPC_CDRSTATS,10 +TEST_DID,DID,10 diff --git a/data/tariffplans/testtp/ActionTriggers.csv b/data/tariffplans/testtp/ActionTriggers.csv index 61482cbb3..16269f619 100644 --- a/data/tariffplans/testtp/ActionTriggers.csv +++ b/data/tariffplans/testtp/ActionTriggers.csv @@ -1,4 +1,4 @@ -#Tag[0],UniqueId[1],ThresholdType[2],ThresholdValue[3],Recurrent[4],MinSleep[5],ExpiryTime[6],ActivationTime[7],BalanceTag[8],BalanceType[9],BalanceCategories[10],BalanceDestinationIds[11],BalanceRatingSubject[12],BalanceSharedGroup[13],BalanceExpiryTime[14],BalanceTimingIds[15],BalanceWeight[16],BalanceBlocker[17],BalanceDisabled[18],ActionsId[19],Weight[20] +#Tag[0],UniqueId[1],ThresholdType[2],ThresholdValue[3],Recurrent[4],MinSleep[5],ExpiryTime[6],ActivationTime[7],BalanceTag[8],BalanceType[9],BalanceCategories[10],BalanceDestinationIds[11],BalanceRatingSubject[12],BalanceSharedGroup[13],BalanceExpiryTime[14],BalanceWeight[15],BalanceBlocker[16],BalanceDisabled[17],ActionsId[18],Weight[19] STANDARD_TRIGGERS,,*min_balance,2,false,0,,,,*monetary,,,,,,,,,,LOG_BALANCE,10 STANDARD_TRIGGERS,,*max_balance,20,false,0,,,,*monetary,,,,,,,,,,LOG_BALANCE,10 STANDARD_TRIGGERS,,*max_event_counter,15,false,0,,,,*monetary,,FS_USERS,,,,,,,,LOG_BALANCE,10 diff --git a/data/tariffplans/testtp/README.md b/data/tariffplans/testtp/README.md index 39e38049c..db01729e0 100644 --- a/data/tariffplans/testtp/README.md +++ b/data/tariffplans/testtp/README.md @@ -4,7 +4,6 @@ CGRateS - FSGermanyPrep1 Scenario: --------- -* Create the necessary timings (always, asap). * Configure 1 destination: FS_USERS. * Calls to FreeSWITCH users will be free and time independent. * This rating profile will be valid for any rating subject. diff --git a/data/tariffplans/testtp/RatingPlans.csv b/data/tariffplans/testtp/RatingPlans.csv index 5be68df5d..97668831e 100644 --- a/data/tariffplans/testtp/RatingPlans.csv +++ b/data/tariffplans/testtp/RatingPlans.csv @@ -1,6 +1,6 @@ -#Tag,DestinationRatesTag,TimingTag,Weight -RP_RETAIL,DR_RETAIL,ALWAYS,10 -RP_DATA1,DR_DATA_1,ALWAYS,10 -RP_SMS1,DR_SMS_1,ALWAYS,10 -RP_DATAr,DR_DATA_r,ALWAYS,10 -RP_FREE,DR_FREE,ALWAYS,10 +#Tag,DestinationRatesTag,Weight +RP_RETAIL,DR_RETAIL,10 +RP_DATA1,DR_DATA_1,10 +RP_SMS1,DR_SMS_1,10 +RP_DATAr,DR_DATA_r,10 +RP_FREE,DR_FREE,10 diff --git a/data/tariffplans/tp1cnt/RatingPlans.csv b/data/tariffplans/tp1cnt/RatingPlans.csv index d0e541ee8..8769d57b8 100644 --- a/data/tariffplans/tp1cnt/RatingPlans.csv +++ b/data/tariffplans/tp1cnt/RatingPlans.csv @@ -1,2 +1,2 @@ -#ID,DestinationRatesID,TimingID,Weight -RP_1CNT,DR_1CNT,*any,0 +#ID,DestinationRatesID,Weight +RP_1CNT,DR_1CNT,0 diff --git a/data/tariffplans/tp_destination_with_any/ActionPlans.csv b/data/tariffplans/tp_destination_with_any/ActionPlans.csv index b10e827b5..a55e23b86 100644 --- a/data/tariffplans/tp_destination_with_any/ActionPlans.csv +++ b/data/tariffplans/tp_destination_with_any/ActionPlans.csv @@ -1,2 +1,2 @@ -#Id,ActionsId,TimingId,Weight -AP_PACKAGE_10,ACT_TOPUP_RST_10,*asap,10 \ No newline at end of file +#Id,ActionsId,Weight +AP_PACKAGE_10,ACT_TOPUP_RST_10,10 \ No newline at end of file diff --git a/data/tariffplans/tp_destination_with_any/Actions.csv b/data/tariffplans/tp_destination_with_any/Actions.csv index 141226ac8..822752cc0 100644 --- a/data/tariffplans/tp_destination_with_any/Actions.csv +++ b/data/tariffplans/tp_destination_with_any/Actions.csv @@ -1,3 +1,3 @@ -#ActionsId[0],Action[1],ExtraParameters[2],Filter[3],BalanceId[4],BalanceType[5],Categories[6],DestinationIds[7],RatingSubject[8],SharedGroup[9],ExpiryTime[10],TimingIds[11],Units[12],BalanceWeight[13],BalanceBlocker[14],BalanceDisabled[15],Weight[16] +#ActionsId[0],Action[1],ExtraParameters[2],Filter[3],BalanceId[4],BalanceType[5],Categories[6],DestinationIds[7],RatingSubject[8],SharedGroup[9],ExpiryTime[10],Units[11],BalanceWeight[12],BalanceBlocker[13],BalanceDisabled[14],Weight[15] ACT_TOPUP_RST_10,*topup_reset,,,,*monetary,,*any,,,*unlimited,,10,10,false,false,10 ACT_LOG_WARNING,*log,,,,,,,,,,,,,false,false,10 \ No newline at end of file diff --git a/data/tariffplans/tp_destination_with_any/RatingPlans.csv b/data/tariffplans/tp_destination_with_any/RatingPlans.csv index 23fc2fe5d..8810cd1b6 100644 --- a/data/tariffplans/tp_destination_with_any/RatingPlans.csv +++ b/data/tariffplans/tp_destination_with_any/RatingPlans.csv @@ -1,3 +1,3 @@ -#Id,DestinationRatesId,TimingTag,Weight -RP_1001,DR_1002_1CNT,*any,20 -RP_1001,DR_ANY,*any,10 +#Id,DestinationRatesId,Weight +RP_1001,DR_1002_1CNT,20 +RP_1001,DR_ANY,10 diff --git a/data/tariffplans/tut_sip_redirect/ActionPlans.csv b/data/tariffplans/tut_sip_redirect/ActionPlans.csv index b10e827b5..a55e23b86 100644 --- a/data/tariffplans/tut_sip_redirect/ActionPlans.csv +++ b/data/tariffplans/tut_sip_redirect/ActionPlans.csv @@ -1,2 +1,2 @@ -#Id,ActionsId,TimingId,Weight -AP_PACKAGE_10,ACT_TOPUP_RST_10,*asap,10 \ No newline at end of file +#Id,ActionsId,Weight +AP_PACKAGE_10,ACT_TOPUP_RST_10,10 \ No newline at end of file diff --git a/data/tariffplans/tut_sip_redirect/Actions.csv b/data/tariffplans/tut_sip_redirect/Actions.csv index 343cded9c..6938dd534 100644 --- a/data/tariffplans/tut_sip_redirect/Actions.csv +++ b/data/tariffplans/tut_sip_redirect/Actions.csv @@ -1,2 +1,2 @@ -#ActionsId[0],Action[1],ExtraParameters[2],Filter[3],BalanceId[4],BalanceType[5],Categories[6],DestinationIds[7],RatingSubject[8],SharedGroup[9],ExpiryTime[10],TimingIds[11],Units[12],BalanceWeight[13],BalanceBlocker[14],BalanceDisabled[15],Weight[16] +#ActionsId[0],Action[1],ExtraParameters[2],Filter[3],BalanceId[4],BalanceType[5],Categories[6],DestinationIds[7],RatingSubject[8],SharedGroup[9],ExpiryTime[10],Units[11],BalanceWeight[12],BalanceBlocker[13],BalanceDisabled[14],Weight[15] ACT_TOPUP_RST_10,*topup_reset,,,test,*voice,,*any,,,*unlimited,,30s,10,false,false,10 \ No newline at end of file diff --git a/data/tariffplans/tut_sip_redirect/RatingPlans.csv b/data/tariffplans/tut_sip_redirect/RatingPlans.csv index f0e228a8c..79f9e0fd3 100644 --- a/data/tariffplans/tut_sip_redirect/RatingPlans.csv +++ b/data/tariffplans/tut_sip_redirect/RatingPlans.csv @@ -1,4 +1,4 @@ -#Id,DestinationRatesId,TimingTag,Weight -RP_20CNT,DR_20CNT,*any,10 -RP_10CNT,DR_10CNT,*any,10 -RP_1CNT,DR_1CNT,*any,10 \ No newline at end of file +#Id,DestinationRatesId,Weight +RP_20CNT,DR_20CNT,10 +RP_10CNT,DR_10CNT,10 +RP_1CNT,DR_1CNT,10 \ No newline at end of file diff --git a/data/tariffplans/tutorial/ActionPlans.csv b/data/tariffplans/tutorial/ActionPlans.csv index b10e827b5..a55e23b86 100644 --- a/data/tariffplans/tutorial/ActionPlans.csv +++ b/data/tariffplans/tutorial/ActionPlans.csv @@ -1,2 +1,2 @@ -#Id,ActionsId,TimingId,Weight -AP_PACKAGE_10,ACT_TOPUP_RST_10,*asap,10 \ No newline at end of file +#Id,ActionsId,Weight +AP_PACKAGE_10,ACT_TOPUP_RST_10,10 \ No newline at end of file diff --git a/data/tariffplans/tutorial/RatingPlans.csv b/data/tariffplans/tutorial/RatingPlans.csv index 9331090f6..3c7f95f10 100644 --- a/data/tariffplans/tutorial/RatingPlans.csv +++ b/data/tariffplans/tutorial/RatingPlans.csv @@ -1,8 +1,8 @@ -#Id,DestinationRatesId,TimingTag,Weight -RP_1001,DR_1002_20CNT,*any,10 -RP_1001,DR_1003_MAXCOST_DISC,*any,10 -RP_1002,DR_1001_20CNT,*any,10 -RP_1002_LOW,DR_1001_10CNT,*any,10 -RP_1003,DR_1001_10CNT,*any,10 -RP_SMS,DR_SMS,*any,0 -RP_MMS,DR_MMS,*any,0 \ No newline at end of file +#Id,DestinationRatesId,Weight +RP_1001,DR_1002_20CNT,10 +RP_1001,DR_1003_MAXCOST_DISC,10 +RP_1002,DR_1001_20CNT,10 +RP_1002_LOW,DR_1001_10CNT,10 +RP_1003,DR_1001_10CNT,10 +RP_SMS,DR_SMS,0 +RP_MMS,DR_MMS,0 \ No newline at end of file diff --git a/data/tariffplans/tutorial2/Actions.csv b/data/tariffplans/tutorial2/Actions.csv index 7dc625fb5..cde83a60b 100644 --- a/data/tariffplans/tutorial2/Actions.csv +++ b/data/tariffplans/tutorial2/Actions.csv @@ -1,4 +1,4 @@ -#ActionsId[0],Action[1],ExtraParameters[2],Filter[3],BalanceId[4],BalanceType[5],Categories[6],DestinationIds[7],RatingSubject[8],SharedGroup[9],ExpiryTime[10],TimingIds[11],Units[12],BalanceWeight[13],BalanceBlocker[14],BalanceDisabled[15],Weight[16] +#ActionsId[0],Action[1],ExtraParameters[2],Filter[3],BalanceId[4],BalanceType[5],Categories[6],DestinationIds[7],RatingSubject[8],SharedGroup[9],ExpiryTime[10],Units[11],BalanceWeight[12],BalanceBlocker[13],BalanceDisabled[14],Weight[15] # TOPUP_RST_MONETARY_10 resets the <*default> <*monetary> balance to 10 units TOPUP_RST_MONETARY_10,*topup_reset,,,*default,*monetary,,,,,,,10,10,,,10 diff --git a/data/tariffplans/tutorial2/RatingPlans.csv b/data/tariffplans/tutorial2/RatingPlans.csv index 7220236ef..771bc8dc8 100644 --- a/data/tariffplans/tutorial2/RatingPlans.csv +++ b/data/tariffplans/tutorial2/RatingPlans.csv @@ -1,15 +1,15 @@ -#ID,DestinationRatesID,TimingID,Weight -RP_STANDARD,DR_10_120C,PEAK,10 -RP_STANDARD,DR_10_60C,OFFPEAK_MORNING,10 -RP_STANDARD,DR_10_60C,OFFPEAK_EVENING,10 -RP_STANDARD,DR_10_60C,OFFPEAK_WEEKEND,10 -RP_STANDARD,DR_2030_120C,*any,10 -RP_STANDARD,DR_20_60C,NEW_YEAR,20 -RP_STANDARD,DR_VOICEMAIL_FREE,*any,10 -RP_1001,DR_1002_60C,*any,10 -RP_SPECIAL_BLC,DR_ANY_10C_CN,*any,10 -RP_DATA,DR_ANY_1024_1,*any,10 -RP_SMS,DR_1002_10C1,*any,10 -RP_SMS,DR_10_20C1,*any,10 -RP_1CNT,DR_1CNT,*any,0 -RP_10CNT,DR_10CNT,*any,0 \ No newline at end of file +#ID,DestinationRatesID,Weight +RP_STANDARD,DR_10_120C,10 +RP_STANDARD,DR_10_60C,10 +RP_STANDARD,DR_10_60C,10 +RP_STANDARD,DR_10_60C,10 +RP_STANDARD,DR_2030_120C,10 +RP_STANDARD,DR_20_60C,20 +RP_STANDARD,DR_VOICEMAIL_FREE,10 +RP_1001,DR_1002_60C,10 +RP_SPECIAL_BLC,DR_ANY_10C_CN,10 +RP_DATA,DR_ANY_1024_1,10 +RP_SMS,DR_1002_10C1,10 +RP_SMS,DR_10_20C1,10 +RP_1CNT,DR_1CNT,0 +RP_10CNT,DR_10CNT,0 \ No newline at end of file diff --git a/data/tariffplans/tutroutes/ActionPlans.csv b/data/tariffplans/tutroutes/ActionPlans.csv index 4d14f3e9a..5f96e49fa 100644 --- a/data/tariffplans/tutroutes/ActionPlans.csv +++ b/data/tariffplans/tutroutes/ActionPlans.csv @@ -1,2 +1,2 @@ -#Id,ActionsId,TimingId,Weight -STANDARD_PLAN,TOPUP_RST_MONETARY_10,*asap,10 +#Id,ActionsId,Weight +STANDARD_PLAN,TOPUP_RST_MONETARY_10,10 diff --git a/data/tariffplans/tutroutes/Actions.csv b/data/tariffplans/tutroutes/Actions.csv index e809987e7..3d78ab1a7 100644 --- a/data/tariffplans/tutroutes/Actions.csv +++ b/data/tariffplans/tutroutes/Actions.csv @@ -1,4 +1,4 @@ -#ActionsId[0],Action[1],ExtraParameters[2],Filter[3],BalanceId[4],BalanceType[5],Categories[6],DestinationIds[7],RatingSubject[8],SharedGroup[9],ExpiryTime[10],TimingIds[11],Units[12],BalanceWeight[13],BalanceBlocker[14],BalanceDisabled[15],Weight[16] +#ActionsId[0],Action[1],ExtraParameters[2],Filter[3],BalanceId[4],BalanceType[5],Categories[6],DestinationIds[7],RatingSubject[8],SharedGroup[9],ExpiryTime[10],Units[11],BalanceWeight[12],BalanceBlocker[13],BalanceDisabled[14],Weight[15] # TOPUP_RST_MONETARY_10 resets the <*default> <*monetary> balance to 10 units TOPUP_RST_MONETARY_10,*topup_reset,,,*default,*monetary,,,,,,,10,10,,,10 \ No newline at end of file diff --git a/data/tariffplans/tutroutes/RatingPlans.csv b/data/tariffplans/tutroutes/RatingPlans.csv index 9c199f211..2cec5737e 100644 --- a/data/tariffplans/tutroutes/RatingPlans.csv +++ b/data/tariffplans/tutroutes/RatingPlans.csv @@ -1,4 +1,4 @@ -#ID,DestinationRatesID,TimingID,Weight -RP_STANDARD,DR_10_1CSEC,*any,0 -RP_VENDOR1,DR_10_10C,*any,0 -RP_VENDOR2,DR_10_5C,*any,0 +#ID,DestinationRatesID,Weight +RP_STANDARD,DR_10_1CSEC,0 +RP_VENDOR1,DR_10_10C,0 +RP_VENDOR2,DR_10_5C,0 diff --git a/data/tutorial_tests/asterisk_ari/asterisk/etc/asterisk/modules.conf b/data/tutorial_tests/asterisk_ari/asterisk/etc/asterisk/modules.conf index 38df4bcac..56dd5b10d 100755 --- a/data/tutorial_tests/asterisk_ari/asterisk/etc/asterisk/modules.conf +++ b/data/tutorial_tests/asterisk_ari/asterisk/etc/asterisk/modules.conf @@ -110,7 +110,6 @@ load = res_sorcery_astdb.so load = res_sorcery_config.so load = res_sorcery_memory.so load = res_sorcery_realtime.so -load = res_timing_timerfd.so ;ARI load => app_stasis.so diff --git a/dispatchers/replicator_test.go b/dispatchers/replicator_test.go index 365c0be81..3a1f2c69c 100644 --- a/dispatchers/replicator_test.go +++ b/dispatchers/replicator_test.go @@ -232,47 +232,6 @@ func TestDspReplicatorSv1GetStatQueueProfileErrorNil(t *testing.T) { } } -func TestDspReplicatorSv1GetTimingNilEvent(t *testing.T) { - cgrCfg := config.NewDefaultCGRConfig() - dspSrv := NewDispatcherService(nil, cgrCfg, nil, nil) - cgrCfg.DispatcherSCfg().AttributeSConns = []string{"test"} - var reply *utils.TPTiming - result := dspSrv.ReplicatorSv1GetTiming(nil, reply) - expected := "MANDATORY_IE_MISSING: [ApiKey]" - if result == nil || result.Error() != expected { - t.Errorf("\nExpected <%+v>, \nReceived <%+v>", expected, result) - } -} - -func TestDspReplicatorSv1GetTimingNil(t *testing.T) { - cgrCfg := config.NewDefaultCGRConfig() - dspSrv := NewDispatcherService(nil, cgrCfg, nil, nil) - cgrCfg.DispatcherSCfg().AttributeSConns = []string{"test"} - CGREvent := &utils.StringWithAPIOpts{ - Tenant: "tenant", - } - var reply *utils.TPTiming - result := dspSrv.ReplicatorSv1GetTiming(CGREvent, reply) - expected := "MANDATORY_IE_MISSING: [ApiKey]" - if result == nil || result.Error() != expected { - t.Errorf("\nExpected <%+v>, \nReceived <%+v>", expected, result) - } -} - -func TestDspReplicatorSv1GetTimingErrorNil(t *testing.T) { - cgrCfg := config.NewDefaultCGRConfig() - dspSrv := NewDispatcherService(nil, cgrCfg, nil, nil) - CGREvent := &utils.StringWithAPIOpts{ - Tenant: "tenant", - } - var reply *utils.TPTiming - result := dspSrv.ReplicatorSv1GetTiming(CGREvent, reply) - expected := "DISPATCHER_ERROR:NO_DATABASE_CONNECTION" - if result == nil || result.Error() != expected { - t.Errorf("\nExpected <%+v>, \nReceived <%+v>", expected, result) - } -} - func TestDspReplicatorSv1GetResourceNil(t *testing.T) { cgrCfg := config.NewDefaultCGRConfig() dspSrv := NewDispatcherService(nil, cgrCfg, nil, nil) @@ -798,46 +757,6 @@ func TestDspReplicatorSv1RemoveResourceProfileNilEvent(t *testing.T) { } } -func TestDspReplicatorSv1RemoveTimingNil(t *testing.T) { - cgrCfg := config.NewDefaultCGRConfig() - dspSrv := NewDispatcherService(nil, cgrCfg, nil, nil) - cgrCfg.DispatcherSCfg().AttributeSConns = []string{"test"} - CGREvent := &utils.StringWithAPIOpts{ - Tenant: "tenant", - } - var reply *string - result := dspSrv.ReplicatorSv1RemoveTiming(CGREvent, reply) - expected := "MANDATORY_IE_MISSING: [ApiKey]" - if result == nil || result.Error() != expected { - t.Errorf("\nExpected <%+v>, \nReceived <%+v>", expected, result) - } -} - -func TestDspReplicatorSv1RemoveTimingErrorNil(t *testing.T) { - cgrCfg := config.NewDefaultCGRConfig() - dspSrv := NewDispatcherService(nil, cgrCfg, nil, nil) - CGREvent := &utils.StringWithAPIOpts{ - Tenant: "tenant", - } - var reply *string - result := dspSrv.ReplicatorSv1RemoveTiming(CGREvent, reply) - expected := "DISPATCHER_ERROR:NO_DATABASE_CONNECTION" - if result == nil || result.Error() != expected { - t.Errorf("\nExpected <%+v>, \nReceived <%+v>", expected, result) - } -} - -func TestDspReplicatorSv1RemoveTimingNilEvent(t *testing.T) { - cgrCfg := config.NewDefaultCGRConfig() - dspSrv := NewDispatcherService(nil, cgrCfg, nil, nil) - var reply *string - result := dspSrv.ReplicatorSv1RemoveTiming(nil, reply) - expected := "DISPATCHER_ERROR:NO_DATABASE_CONNECTION" - if result == nil || result.Error() != expected { - t.Errorf("\nExpected <%+v>, \nReceived <%+v>", expected, result) - } -} - func TestDspReplicatorSv1RemoveActionsNil(t *testing.T) { cgrCfg := config.NewDefaultCGRConfig() dspSrv := NewDispatcherService(nil, cgrCfg, nil, nil) @@ -1575,46 +1494,6 @@ func TestDspReplicatorSv1SetStatQueueProfileNilEvent(t *testing.T) { } } -func TestDspReplicatorSv1SetTimingNil(t *testing.T) { - cgrCfg := config.NewDefaultCGRConfig() - dspSrv := NewDispatcherService(nil, cgrCfg, nil, nil) - cgrCfg.DispatcherSCfg().AttributeSConns = []string{"test"} - CGREvent := &utils.TPTimingWithAPIOpts{ - Tenant: "tenant", - } - var reply *string - result := dspSrv.ReplicatorSv1SetTiming(CGREvent, reply) - expected := "MANDATORY_IE_MISSING: [ApiKey]" - if result == nil || result.Error() != expected { - t.Errorf("\nExpected <%+v>, \nReceived <%+v>", expected, result) - } -} - -func TestDspReplicatorSv1SetTimingErrorNil(t *testing.T) { - cgrCfg := config.NewDefaultCGRConfig() - dspSrv := NewDispatcherService(nil, cgrCfg, nil, nil) - CGREvent := &utils.TPTimingWithAPIOpts{ - Tenant: "tenant", - } - var reply *string - result := dspSrv.ReplicatorSv1SetTiming(CGREvent, reply) - expected := "DISPATCHER_ERROR:NO_DATABASE_CONNECTION" - if result == nil || result.Error() != expected { - t.Errorf("\nExpected <%+v>, \nReceived <%+v>", expected, result) - } -} - -func TestDspReplicatorSv1SetTimingNilEvent(t *testing.T) { - cgrCfg := config.NewDefaultCGRConfig() - dspSrv := NewDispatcherService(nil, cgrCfg, nil, nil) - var reply *string - result := dspSrv.ReplicatorSv1SetTiming(nil, reply) - expected := "DISPATCHER_ERROR:NO_DATABASE_CONNECTION" - if result == nil || result.Error() != expected { - t.Errorf("\nExpected <%+v>, \nReceived <%+v>", expected, result) - } -} - func TestDspReplicatorSv1SetResourceNil(t *testing.T) { cgrCfg := config.NewDefaultCGRConfig() dspSrv := NewDispatcherService(nil, cgrCfg, nil, nil) diff --git a/docs/filters.rst b/docs/filters.rst index 292167edd..113964533 100644 --- a/docs/filters.rst +++ b/docs/filters.rst @@ -77,9 +77,6 @@ The following types are implemented: \*notexists Is the negation of *\*exists*. -\*timings - Will compare the time contained in *Element* with one of the TimingIDs defined in Values. - \*nottimings Is the negation of *\*timings*. diff --git a/docs/rals.rst b/docs/rals.rst index 4f8e05089..f037f2228 100644 --- a/docs/rals.rst +++ b/docs/rals.rst @@ -287,9 +287,6 @@ Categories SharedGroup Pointing towards a shared balance ID. -TimingIDs - List of :ref:`Timing` profiles this *Balance* will match for, considering event's *AnswerTime* field. - Disabled Makes the *Balance* invisible to charging. diff --git a/engine/datadbmock.go b/engine/datadbmock.go index 1354707d3..4fba80185 100644 --- a/engine/datadbmock.go +++ b/engine/datadbmock.go @@ -113,14 +113,6 @@ func (dbM *DataDBMock) RemoveResourceDrv(string, string) error { return utils.ErrNotImplemented } -func (dbM *DataDBMock) GetTimingDrv(string) (*utils.TPTiming, error) { - return nil, utils.ErrNotImplemented -} - -func (dbM *DataDBMock) SetTimingDrv(*utils.TPTiming) error { - return utils.ErrNotImplemented -} - func (dbM *DataDBMock) RemoveTimingDrv(string) error { return utils.ErrNotImplemented } diff --git a/engine/filters.go b/engine/filters.go index 850bde754..310ecc86a 100644 --- a/engine/filters.go +++ b/engine/filters.go @@ -262,7 +262,7 @@ func NewFilterRule(rfType, fieldName string, vals []string) (*FilterRule, error) // FilterRule filters requests coming into various places // Pass rule: default negative, one matching rule should pass the filter type FilterRule struct { - Type string // Filter type (*string, *timing, *rsr_filters, *stats, *lt, *lte, *gt, *gte) + Type string // Filter type (*string, *rsr_filters, *stats, *lt, *lte, *gt, *gte) Element string // Name of the field providing us the Values to check (used in case of some ) Values []string // Filter definition rsrValues config.RSRParsers // Cache here the diff --git a/engine/libtest.go b/engine/libtest.go index 4e9710f32..fedc7fa80 100644 --- a/engine/libtest.go +++ b/engine/libtest.go @@ -59,12 +59,6 @@ DST_UK_Mobile_BIG5,447956 URG,112 EU_LANDLINE,444 EXOTIC,999 -` - TimingsCSVContent = ` -WORKDAYS_00,*any,*any,*any,1;2;3;4;5,00:00:00 -WORKDAYS_18,*any,*any,*any,1;2;3;4;5,18:00:00 -WEEKENDS,*any,*any,*any,6;7,00:00:00 -ONE_TIME_RUN,2012,,,,*asap ` ActionsCSVContent = ` diff --git a/engine/loader_csv_test.go b/engine/loader_csv_test.go index 3c7a475e1..64daac17d 100644 --- a/engine/loader_csv_test.go +++ b/engine/loader_csv_test.go @@ -23,7 +23,6 @@ import ( "sort" "strings" "testing" - "time" "github.com/cgrates/cgrates/utils" ) @@ -37,16 +36,12 @@ var csvr *TpReader func init() { var err error csvr, err = NewTpReader(dm.dataDB, NewStringCSVStorage(utils.CSVSep, - TimingsCSVContent, ResourcesCSVContent, StatsCSVContent, ThresholdsCSVContent, FiltersCSVContent, RoutesCSVContent, AttributesCSVContent, ChargersCSVContent, DispatcherCSVContent, DispatcherHostCSVContent, RateProfileCSVContent, ActionProfileCSVContent, AccountCSVContent), testTPID, "", nil, nil, false) if err != nil { log.Print("error when creating TpReader:", err) } - if err := csvr.LoadTimings(); err != nil { - log.Print("error in LoadTimings:", err) - } if err := csvr.LoadFilters(); err != nil { log.Print("error in LoadFilter:", err) } @@ -88,56 +83,6 @@ func init() { } } -func TestLoadTimimgs(t *testing.T) { - if len(csvr.timings) != 14 { - t.Error("Failed to load timings: ", csvr.timings) - } - timing := csvr.timings["WORKDAYS_00"] - if !reflect.DeepEqual(timing, &utils.TPTiming{ - ID: "WORKDAYS_00", - Years: utils.Years{}, - Months: utils.Months{}, - MonthDays: utils.MonthDays{}, - WeekDays: utils.WeekDays{1, 2, 3, 4, 5}, - StartTime: "00:00:00", - }) { - t.Error("Error loading timing: ", timing) - } - timing = csvr.timings["WORKDAYS_18"] - if !reflect.DeepEqual(timing, &utils.TPTiming{ - ID: "WORKDAYS_18", - Years: utils.Years{}, - Months: utils.Months{}, - MonthDays: utils.MonthDays{}, - WeekDays: utils.WeekDays{1, 2, 3, 4, 5}, - StartTime: "18:00:00", - }) { - t.Error("Error loading timing: ", timing) - } - timing = csvr.timings["WEEKENDS"] - if !reflect.DeepEqual(timing, &utils.TPTiming{ - ID: "WEEKENDS", - Years: utils.Years{}, - Months: utils.Months{}, - MonthDays: utils.MonthDays{}, - WeekDays: utils.WeekDays{time.Saturday, time.Sunday}, - StartTime: "00:00:00", - }) { - t.Error("Error loading timing: ", timing) - } - timing = csvr.timings["ONE_TIME_RUN"] - if !reflect.DeepEqual(timing, &utils.TPTiming{ - ID: "ONE_TIME_RUN", - Years: utils.Years{2012}, - Months: utils.Months{}, - MonthDays: utils.MonthDays{}, - WeekDays: utils.WeekDays{}, - StartTime: "*asap", - }) { - t.Error("Error loading timing: ", timing) - } -} - func TestLoadResourceProfiles(t *testing.T) { eResProfiles := map[utils.TenantID]*utils.TPResourceProfile{ {Tenant: "cgrates.org", ID: "ResGroup21"}: { diff --git a/engine/model_helpers_test.go b/engine/model_helpers_test.go index 8ad172788..0076cbefa 100644 --- a/engine/model_helpers_test.go +++ b/engine/model_helpers_test.go @@ -31,185 +31,6 @@ import ( "github.com/cgrates/cgrates/utils" ) -func TestModelHelperCsvLoad(t *testing.T) { - l, err := csvLoad(DestinationMdl{}, []string{"TEST_DEST", "+492"}) - tpd, ok := l.(DestinationMdl) - if err != nil || !ok || tpd.Tag != "TEST_DEST" || tpd.Prefix != "+492" { - t.Errorf("model load failed: %+v", tpd) - } -} - -func TestModelHelperCsvDump(t *testing.T) { - tpd := DestinationMdl{ - Tag: "TEST_DEST", - Prefix: "+492"} - csv, err := CsvDump(tpd) - if err != nil || csv[0] != "TEST_DEST" || csv[1] != "+492" { - t.Errorf("model load failed: %+v", tpd) - } -} - -func TestMapTPTimings(t *testing.T) { - var tps []*utils.ApierTPTiming - eOut := map[string]*utils.TPTiming{} - if rcv, err := MapTPTimings(tps); err != nil { - t.Error(err) - } else if !reflect.DeepEqual(eOut, rcv) { - t.Errorf("Expecting: %+v, received: %+v", eOut, rcv) - } - - tps = []*utils.ApierTPTiming{ - { - TPid: "TPid1", - ID: "ID1", - }, - } - eOut = map[string]*utils.TPTiming{ - "ID1": { - ID: "ID1", - Years: utils.Years{}, - Months: utils.Months{}, - MonthDays: utils.MonthDays{}, - WeekDays: utils.WeekDays{}, - }, - } - if rcv, err := MapTPTimings(tps); err != nil { - t.Error(err) - } else if !reflect.DeepEqual(eOut, rcv) { - t.Errorf("Expecting: %+v, received: %+v", utils.ToJSON(eOut), utils.ToJSON(rcv)) - } - tps = []*utils.ApierTPTiming{ - { - TPid: "TPid1", - ID: "ID1", - Months: "1;2;3;4", - }, - } - eOut = map[string]*utils.TPTiming{ - "ID1": { - ID: "ID1", - Years: utils.Years{}, - Months: utils.Months{1, 2, 3, 4}, - MonthDays: utils.MonthDays{}, - WeekDays: utils.WeekDays{}, - }, - } - if rcv, err := MapTPTimings(tps); err != nil { - t.Error(err) - } else if !reflect.DeepEqual(eOut, rcv) { - t.Errorf("Expecting: %+v, received: %+v", utils.ToJSON(eOut), utils.ToJSON(rcv)) - } - //same id error - tps = []*utils.ApierTPTiming{ - { - TPid: "TPid1", - ID: "ID1", - Months: "1;2;3;4", - }, - { - TPid: "TPid1", - ID: "ID1", - Months: "1;2;3;4", - }, - } - eOut = map[string]*utils.TPTiming{ - "ID1": { - ID: "ID1", - Years: utils.Years{}, - Months: utils.Months{1, 2, 3, 4}, - MonthDays: utils.MonthDays{}, - WeekDays: utils.WeekDays{}, - }, - } - if _, err := MapTPTimings(tps); err == nil || err.Error() != "duplicate timing tag: ID1" { - t.Errorf("Expecting: nil, received: %+v", err) - } -} - -func TestAPItoModelTimings(t *testing.T) { - ts := []*utils.ApierTPTiming{} - if rcv := APItoModelTimings(ts); rcv != nil { - t.Errorf("Expecting: nil, received: %+v", utils.ToJSON(rcv)) - } - - ts = []*utils.ApierTPTiming{ - { - TPid: "TPid1", - ID: "ID1", - Months: "1;2;3;4", - }, - } - eOut := TimingMdls{ - TimingMdl{ - Tpid: "TPid1", - Months: "1;2;3;4", - Tag: "ID1", - }, - } - if rcv := APItoModelTimings(ts); !reflect.DeepEqual(eOut, rcv) { - t.Errorf("Expecting: %+v, received: %+v", utils.ToJSON(eOut), utils.ToJSON(rcv)) - } - ts = []*utils.ApierTPTiming{ - { - TPid: "TPid1", - ID: "ID1", - Months: "1;2;3;4", - }, - { - TPid: "TPid2", - ID: "ID2", - Months: "1;2;3;4", - MonthDays: "1;2;3;4;28", - Years: "2020;2019", - WeekDays: "4;5", - }, - } - eOut = TimingMdls{ - TimingMdl{ - Tpid: "TPid1", - Months: "1;2;3;4", - Tag: "ID1", - }, - TimingMdl{ - Tpid: "TPid2", - Tag: "ID2", - Months: "1;2;3;4", - MonthDays: "1;2;3;4;28", - Years: "2020;2019", - WeekDays: "4;5", - }, - } - if rcv := APItoModelTimings(ts); !reflect.DeepEqual(eOut, rcv) { - t.Errorf("Expecting: %+v, received: %+v", utils.ToJSON(eOut), utils.ToJSON(rcv)) - } -} - -func TestApierTPTimingAsExportSlice(t *testing.T) { - tpTiming := &utils.ApierTPTiming{ - TPid: "TEST_TPID", - ID: "TEST_TIMING", - Years: "*any", - Months: "*any", - MonthDays: "*any", - WeekDays: "1;2;4", - Time: "00:00:01"} - expectedSlc := [][]string{ - {"TEST_TIMING", "*any", "*any", "*any", "1;2;4", "00:00:01"}, - } - ms := APItoModelTiming(tpTiming) - var slc [][]string - - lc, err := CsvDump(ms) - if err != nil { - t.Error("Error dumping to csv: ", err) - } - slc = append(slc, lc) - - if !reflect.DeepEqual(expectedSlc, slc) { - t.Errorf("Expecting: %+v, received: %+v", expectedSlc, slc) - } -} - func TestTpResourcesAsTpResources(t *testing.T) { tps := []*ResourceMdl{ { diff --git a/engine/models_test.go b/engine/models_test.go deleted file mode 100644 index 2240c6c65..000000000 --- a/engine/models_test.go +++ /dev/null @@ -1,35 +0,0 @@ -/* -Real-time Online/Offline Charging System (OCS) for Telecom & ISP environments -Copyright (C) ITsysCOM GmbH - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or56 -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see -*/ - -package engine - -import ( - "reflect" - "testing" - - "github.com/cgrates/cgrates/utils" -) - -func TestModelsTimingMdlTableName(t *testing.T) { - testStruct := TimingMdl{} - exp := utils.TBLTPTimings - result := testStruct.TableName() - if !reflect.DeepEqual(exp, result) { - t.Errorf("\nExpected <%+v>,\nreceived <%+v>", exp, result) - } -} diff --git a/engine/storage_csv.go b/engine/storage_csv.go index e94ae7910..e26f6f6c0 100644 --- a/engine/storage_csv.go +++ b/engine/storage_csv.go @@ -44,7 +44,6 @@ type CSVStorage struct { sep rune generator func() csvReaderCloser // file names - timingsFn []string resProfilesFn []string statsFn []string thresholdsFn []string @@ -117,7 +116,7 @@ func NewFileCSVStorage(sep rune, dataPath string) *CSVStorage { } // NewStringCSVStorage creates a csv storage from strings -func NewStringCSVStorage(sep rune, timingsFn, +func NewStringCSVStorage(sep rune, resProfilesFn, statsFn, thresholdsFn, filterFn, routeProfilesFn, attributeProfilesFn, chargerProfilesFn, dispatcherProfilesFn, dispatcherHostsFn, rateProfilesFn, actionProfilesFn, accountsFn string) *CSVStorage { diff --git a/engine/storage_mongo_datadb.go b/engine/storage_mongo_datadb.go index a85555b15..2c867144a 100644 --- a/engine/storage_mongo_datadb.go +++ b/engine/storage_mongo_datadb.go @@ -58,7 +58,6 @@ const ( ColVer = "versions" ColRsP = "resource_profiles" ColIndx = "indexes" - ColTmg = "timings" ColRes = "resources" ColSqs = "statqueues" ColSqp = "statqueue_profiles" @@ -871,42 +870,6 @@ func (ms *MongoStorage) RemoveResourceDrv(tenant, id string) (err error) { }) } -func (ms *MongoStorage) GetTimingDrv(id string) (t *utils.TPTiming, err error) { - t = new(utils.TPTiming) - err = ms.query(context.TODO(), func(sctx mongo.SessionContext) (err error) { - cur := ms.getCol(ColTmg).FindOne(sctx, bson.M{"id": id}) - if err := cur.Decode(t); err != nil { - t = nil - if err == mongo.ErrNoDocuments { - return utils.ErrNotFound - } - return err - } - return nil - }) - return -} - -func (ms *MongoStorage) SetTimingDrv(t *utils.TPTiming) (err error) { - return ms.query(context.TODO(), func(sctx mongo.SessionContext) (err error) { - _, err = ms.getCol(ColTmg).UpdateOne(sctx, bson.M{"id": t.ID}, - bson.M{"$set": t}, - options.Update().SetUpsert(true), - ) - return err - }) -} - -func (ms *MongoStorage) RemoveTimingDrv(id string) (err error) { - return ms.query(context.TODO(), func(sctx mongo.SessionContext) (err error) { - dr, err := ms.getCol(ColTmg).DeleteOne(sctx, bson.M{"id": id}) - if dr.DeletedCount == 0 { - return utils.ErrNotFound - } - return err - }) -} - // GetStatQueueProfileDrv retrieves a StatQueueProfile from dataDB func (ms *MongoStorage) GetStatQueueProfileDrv(tenant string, id string) (sq *StatQueueProfile, err error) { sq = new(StatQueueProfile) diff --git a/engine/tpreader.go b/engine/tpreader.go index ef084f94c..2350efcf5 100644 --- a/engine/tpreader.go +++ b/engine/tpreader.go @@ -35,7 +35,6 @@ type TpReader struct { timezone string dm *DataManager lr LoadReader - timings map[string]*utils.TPTiming resProfiles map[utils.TenantID]*utils.TPResourceProfile sqProfiles map[utils.TenantID]*utils.TPStatProfile thProfiles map[utils.TenantID]*utils.TPThresholdProfile @@ -70,14 +69,11 @@ func NewTpReader(db DataDB, lr LoadReader, tpid, timezone string, isInternalDB: isInternalDB, } tpr.Init() - //add default timing tag (in case of no timings file) - tpr.addDefaultTimings() return tpr, nil } func (tpr *TpReader) Init() { - tpr.timings = make(map[string]*utils.TPTiming) tpr.resProfiles = make(map[utils.TenantID]*utils.TPResourceProfile) tpr.sqProfiles = make(map[utils.TenantID]*utils.TPStatProfile) tpr.thProfiles = make(map[utils.TenantID]*utils.TPThresholdProfile) @@ -1245,98 +1241,3 @@ func (tpr *TpReader) ReloadScheduler(verbose bool) (err error) { // ToDoNext: ad // } return } - -func (tpr *TpReader) addDefaultTimings() { - tpr.timings[utils.MetaAny] = &utils.TPTiming{ - ID: utils.MetaAny, - Years: utils.Years{}, - Months: utils.Months{}, - MonthDays: utils.MonthDays{}, - WeekDays: utils.WeekDays{}, - StartTime: "00:00:00", - EndTime: "", - } - tpr.timings[utils.MetaASAP] = &utils.TPTiming{ - ID: utils.MetaASAP, - Years: utils.Years{}, - Months: utils.Months{}, - MonthDays: utils.MonthDays{}, - WeekDays: utils.WeekDays{}, - StartTime: utils.MetaASAP, - EndTime: "", - } - tpr.timings[utils.MetaEveryMinute] = &utils.TPTiming{ - ID: utils.MetaEveryMinute, - Years: utils.Years{}, - Months: utils.Months{}, - MonthDays: utils.MonthDays{}, - WeekDays: utils.WeekDays{}, - StartTime: utils.ConcatenatedKey(utils.Meta, utils.Meta, strconv.Itoa(time.Now().Second())), - EndTime: "", - } - tpr.timings[utils.MetaHourly] = &utils.TPTiming{ - ID: utils.MetaHourly, - Years: utils.Years{}, - Months: utils.Months{}, - MonthDays: utils.MonthDays{}, - WeekDays: utils.WeekDays{}, - StartTime: utils.ConcatenatedKey(utils.Meta, strconv.Itoa(time.Now().Minute()), strconv.Itoa(time.Now().Second())), - EndTime: "", - } - startTime := time.Now().Format("15:04:05") - tpr.timings[utils.MetaDaily] = &utils.TPTiming{ - ID: utils.MetaDaily, - Years: utils.Years{}, - Months: utils.Months{}, - MonthDays: utils.MonthDays{}, - WeekDays: utils.WeekDays{}, - StartTime: startTime, - EndTime: "", - } - tpr.timings[utils.MetaWeekly] = &utils.TPTiming{ - ID: utils.MetaWeekly, - Years: utils.Years{}, - Months: utils.Months{}, - MonthDays: utils.MonthDays{}, - WeekDays: utils.WeekDays{time.Now().Weekday()}, - StartTime: startTime, - EndTime: "", - } - tpr.timings[utils.MetaMonthly] = &utils.TPTiming{ - ID: utils.MetaMonthly, - Years: utils.Years{}, - Months: utils.Months{}, - MonthDays: utils.MonthDays{time.Now().Day()}, - WeekDays: utils.WeekDays{}, - StartTime: startTime, - EndTime: "", - } - tpr.timings[utils.MetaMonthlyEstimated] = &utils.TPTiming{ - ID: utils.MetaMonthlyEstimated, - Years: utils.Years{}, - Months: utils.Months{}, - MonthDays: utils.MonthDays{time.Now().Day()}, - WeekDays: utils.WeekDays{}, - StartTime: startTime, - EndTime: "", - } - tpr.timings[utils.MetaMonthEnd] = &utils.TPTiming{ - ID: utils.MetaMonthEnd, - Years: utils.Years{}, - Months: utils.Months{}, - MonthDays: utils.MonthDays{-1}, - WeekDays: utils.WeekDays{}, - StartTime: startTime, - EndTime: "", - } - tpr.timings[utils.MetaYearly] = &utils.TPTiming{ - ID: utils.MetaYearly, - Years: utils.Years{}, - Months: utils.Months{time.Now().Month()}, - MonthDays: utils.MonthDays{time.Now().Day()}, - WeekDays: utils.WeekDays{}, - StartTime: startTime, - EndTime: "", - } - -} diff --git a/engine/tpreader_test.go b/engine/tpreader_test.go index 126187285..a71121e87 100644 --- a/engine/tpreader_test.go +++ b/engine/tpreader_test.go @@ -718,7 +718,6 @@ func TestReloadCache(t *testing.T) { APIOpts: map[string]interface{}{}, Tenant: "", ArgsCache: map[string][]string{ - "TimingIDs": {"TimingsID"}, "ResourceProfileIDs": {"cgrates.org:resourceProfilesID"}, "StatsQueueProfileIDs": {"cgrates.org:statProfilesID"}, "ThresholdProfileIDs": {"cgrates.org:thresholdProfilesID"}, @@ -752,9 +751,6 @@ func TestReloadCache(t *testing.T) { utils.ConcatenatedKey(utils.MetaInternal, utils.MetaCaches): rpcInternal, }) tpr := &TpReader{ - timings: map[string]*utils.TPTiming{ - "TimingsID": {}, - }, resProfiles: map[utils.TenantID]*utils.TPResourceProfile{ {Tenant: "cgrates.org", ID: "resourceProfilesID"}: {}, }, diff --git a/engine/version_test.go b/engine/version_test.go index 5def28a52..7b5616230 100644 --- a/engine/version_test.go +++ b/engine/version_test.go @@ -74,7 +74,7 @@ func TestCurrentDBVersions(t *testing.T) { expVersDataDB := Versions{ utils.StatS: 4, utils.Accounts: 3, utils.Actions: 2, utils.Thresholds: 4, utils.Routes: 2, utils.Attributes: 7, - utils.Timing: 1, utils.RQF: 5, utils.Resource: 1, + utils.RQF: 5, utils.Resource: 1, utils.Subscribers: 1, utils.Chargers: 2, utils.Dispatchers: 2, utils.LoadIDsVrs: 1, utils.RateProfiles: 1, @@ -83,7 +83,7 @@ func TestCurrentDBVersions(t *testing.T) { expVersStorDB := Versions{ utils.CostDetails: 2, utils.SessionSCosts: 3, utils.CDRs: 2, utils.TpFilters: 1, utils.TpThresholds: 1, utils.TpRoutes: 1, - utils.TpStats: 1, utils.TpResources: 1, utils.TpTiming: 1, + utils.TpStats: 1, utils.TpResources: 1, utils.TpResource: 1, utils.TpChargers: 1, utils.TpDispatchers: 1, utils.TpRateProfiles: 1, utils.TpActionProfiles: 1, diff --git a/engine/z_actions2_it_test.go b/engine/z_actions2_it_test.go index 20164978f..f83de83f0 100644 --- a/engine/z_actions2_it_test.go +++ b/engine/z_actions2_it_test.go @@ -172,7 +172,6 @@ func testActionsExecuteRemoveSMCos1(t *testing.T) { Actions: []*utils.TPAction{ { Identifier: utils.MetaRemoveSessionCosts, - TimingTags: utils.MetaASAP, ExtraParameters: "*string:~*sc.OriginID:13;*notstring:~*sc.OriginID:12", Weight: 20, }, @@ -205,7 +204,6 @@ func testActionsExecuteRemoveSMCos2(t *testing.T) { Actions: []*utils.TPAction{ { Identifier: utils.MetaRemoveSessionCosts, - TimingTags: utils.MetaASAP, ExtraParameters: "", Weight: 20, }, diff --git a/engine/z_loader_it_test.go b/engine/z_loader_it_test.go index 940940fa2..873583979 100644 --- a/engine/z_loader_it_test.go +++ b/engine/z_loader_it_test.go @@ -52,7 +52,6 @@ var ( testLoaderITWriteToDatabase, testLoaderITImportToStorDb, testLoaderITInitDataDB, - testLoaderITLoadFromStorDb, testLoaderITInitDataDB, } ) @@ -153,9 +152,6 @@ func testLoaderITRemoveLoad(t *testing.T) { if err != nil { t.Error(err) } - if err = loader.LoadTimings(); err != nil { - t.Error("Failed loading timings: ", err.Error()) - } if err = loader.LoadFilters(); err != nil { t.Error("Failed loading filters: ", err.Error()) } @@ -205,9 +201,6 @@ func testLoaderITLoadFromCSV(t *testing.T) { if err != nil { t.Error(err) } - if err = loader.LoadTimings(); err != nil { - t.Error("Failed loading timings: ", err.Error()) - } if err = loader.LoadFilters(); err != nil { t.Error("Failed loading filters: ", err.Error()) } @@ -241,15 +234,6 @@ func testLoaderITLoadFromCSV(t *testing.T) { } func testLoaderITWriteToDatabase(t *testing.T) { - for k, tm := range loader.timings { - rcv, err := loader.dm.GetTiming(k, true, utils.NonTransactional) - if err != nil { - t.Error("Failed GetTiming: ", err.Error()) - } - if !reflect.DeepEqual(tm, rcv) { - t.Errorf("Expecting: %v, received: %v", tm, rcv) - } - } for tenantid, fltr := range loader.filters { rcv, err := loader.dm.GetFilter(context.TODO(), tenantid.Tenant, tenantid.ID, false, false, utils.NonTransactional) @@ -395,14 +379,6 @@ func testLoaderITImportToStorDb(t *testing.T) { } } -// Loads data from storDb into dataDb -func testLoaderITLoadFromStorDb(t *testing.T) { - loader, _ := NewTpReader(dataDbCsv.DataDB(), storDb, utils.TestSQL, "", []string{utils.ConcatenatedKey(utils.MetaInternal, utils.MetaCaches)}, nil, false) - if err := loader.LoadTimings(); err != nil && err.Error() != utils.NotFoundCaps { - t.Error("Failed loading timings: ", err.Error()) - } -} - /* // Compares previously loaded data from csv and stor to be identical, redis specific tests func TestMatchLoadCsvWithStorRating(t *testing.T) { diff --git a/engine/z_onstor_it_test.go b/engine/z_onstor_it_test.go index 35a1ccb47..a5f6df674 100644 --- a/engine/z_onstor_it_test.go +++ b/engine/z_onstor_it_test.go @@ -47,7 +47,6 @@ var ( // ToDo: testOnStorITLoadAccountingCache testOnStorITResource, testOnStorITResourceProfile, - testOnStorITTiming, //testOnStorITCRUDHistory, testOnStorITCRUDStructVersion, testOnStorITStatQueueProfile, @@ -240,76 +239,6 @@ func testOnStorITResource(t *testing.T) { } } -func testOnStorITTiming(t *testing.T) { - tmg := &utils.TPTiming{ - ID: "TEST", - Years: utils.Years{2016, 2017}, - Months: utils.Months{time.January, time.February, time.March}, - MonthDays: utils.MonthDays{1, 2, 3, 4}, - WeekDays: utils.WeekDays{1, 2, 3}, - StartTime: "00:00:00", - EndTime: "", - } - if _, rcvErr := onStor.GetTiming(tmg.ID, false, - utils.NonTransactional); rcvErr != utils.ErrNotFound { - t.Error(rcvErr) - } - if err := onStor.SetTiming(context.TODO(), tmg); err != nil { - t.Error(err) - } - if onStor.dataDB.GetStorageType() != utils.Internal { - //get from cache - if rcv, err := onStor.GetTiming(tmg.ID, false, utils.NonTransactional); err != nil { - t.Error(err) - } else if !reflect.DeepEqual(tmg, rcv) { - t.Errorf("Expecting: %v, received: %v", tmg, rcv) - } - } - //get from database - if rcv, err := onStor.GetTiming(tmg.ID, true, utils.NonTransactional); err != nil { - t.Error(err) - } else if !reflect.DeepEqual(tmg, rcv) { - t.Errorf("Expecting: %v, received: %v", tmg, rcv) - } - expectedT := []string{"tmg_TEST"} - if itm, err := onStor.DataDB().GetKeysForPrefix(context.TODO(), utils.TimingsPrefix); err != nil { - t.Error(err) - } else if !reflect.DeepEqual(expectedT, itm) { - t.Errorf("Expected : %+v, but received %+v", expectedT, itm) - } - //update - tmg.MonthDays = utils.MonthDays{1, 2, 3, 4, 5, 6, 7} - if err := onStor.SetTiming(context.TODO(), tmg); err != nil { - t.Error(err) - } - - //get from cache - if rcv, err := onStor.GetTiming(tmg.ID, false, utils.NonTransactional); err != nil { - t.Error(err) - } else if !reflect.DeepEqual(tmg, rcv) { - t.Errorf("Expecting: %v, received: %v", tmg, rcv) - } - //get from database - if rcv, err := onStor.GetTiming(tmg.ID, true, utils.NonTransactional); err != nil { - t.Error(err) - } else if !reflect.DeepEqual(tmg, rcv) { - t.Errorf("Expecting: %v, received: %v", tmg, rcv) - } - if err := onStor.RemoveTiming(tmg.ID, utils.NonTransactional); err != nil { - t.Error(err) - } - //check cache if removed - if _, rcvErr := onStor.GetTiming(tmg.ID, false, - utils.NonTransactional); rcvErr != utils.ErrNotFound { - t.Error(rcvErr) - } - //check database if removed - if _, rcvErr := onStor.GetTiming(tmg.ID, true, - utils.NonTransactional); rcvErr != utils.ErrNotFound { - t.Error(rcvErr) - } -} - func testOnStorITCRUDHistory(t *testing.T) { time := time.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC) ist := &utils.LoadInstance{ diff --git a/engine/z_stordb_it_test.go b/engine/z_stordb_it_test.go index bbd0a7866..916149a0a 100644 --- a/engine/z_stordb_it_test.go +++ b/engine/z_stordb_it_test.go @@ -54,7 +54,6 @@ var sTestsStorDBit = []func(t *testing.T){ testStorDBitCRUDTPThresholds, testStorDBitCRUDTPAttributes, testStorDBitCRUDTPChargers, - testStorDBitCRUDTpTimings, testStorDBitCRUDTpResources, testStorDBitCRUDTpStats, testStorDBitCRUDCDRs, @@ -872,67 +871,6 @@ func testStorDBitCRUDTPChargers(t *testing.T) { } } -func testStorDBitCRUDTpTimings(t *testing.T) { - // READ - if _, err := storDB.GetTPTimings("testTPid", ""); err != utils.ErrNotFound { - t.Error(err) - } - // WRITE - var snd = []*utils.ApierTPTiming{ - { - TPid: "testTPid", - ID: "testTag1", - Years: "*any", - Months: "*any", - MonthDays: "*any", - WeekDays: "1;2;3;4;5", - Time: "01:00:00", - }, - { - TPid: "testTPid", - ID: "testTag2", - Years: "*any", - Months: "*any", - MonthDays: "*any", - WeekDays: "1;2;3;4;5", - Time: "01:00:00", - }, - } - if err := storDB.SetTPTimings(snd); err != nil { - t.Error(err) - } - // READ - if rcv, err := storDB.GetTPTimings("testTPid", ""); err != nil { - t.Error(err) - } else { - if !(reflect.DeepEqual(snd[0], rcv[0]) || reflect.DeepEqual(snd[0], rcv[1])) { - t.Errorf("Expecting:\n%+v\nReceived:\n%+v\n||\n%+v", utils.ToJSON(snd[0]), utils.ToJSON(rcv[0]), utils.ToJSON(rcv[1])) - } - } - // UPDATE - snd[0].Time = "02:00:00" - snd[1].Time = "02:00:00" - if err := storDB.SetTPTimings(snd); err != nil { - t.Error(err) - } - // READ - if rcv, err := storDB.GetTPTimings("testTPid", ""); err != nil { - t.Error(err) - } else { - if !(reflect.DeepEqual(snd[0], rcv[0]) || reflect.DeepEqual(snd[0], rcv[1])) { - t.Errorf("Expecting:\n%+v\nReceived:\n%+v\n||\n%+v", utils.ToJSON(snd[0]), utils.ToJSON(rcv[0]), utils.ToJSON(rcv[1])) - } - } - // REMOVE - if err := storDB.RemTpData("", "testTPid", nil); err != nil { - t.Error(err) - } - // READ - if _, err := storDB.GetTPTimings("testTPid", ""); err != utils.ErrNotFound { - t.Error(err) - } -} - func testStorDBitCRUDTpResources(t *testing.T) { // READ if _, err := storDB.GetTPResources("testTPid", "", ""); err != utils.ErrNotFound { diff --git a/general_tests/a1_it_test.go b/general_tests/a1_it_test.go index 355e47a8d..6a0652bb0 100644 --- a/general_tests/a1_it_test.go +++ b/general_tests/a1_it_test.go @@ -360,24 +360,6 @@ func testA1itConcurrentAPs(t *testing.T) { // Change offer for _, acnt := range acnts { wg.Add(3) - go func(acnt string) { - var atms []*v1.AccountActionTiming - if err := a1rpc.Call(utils.APIerSv1GetAccountActionPlan, - &utils.TenantAccount{Tenant: "cgrates.org", Account: acnt}, &atms); err != nil { - t.Error(err) - //} else if len(atms) != 2 || atms[0].ActionPlanId != "PACKAGE_1" { - // t.Errorf("Received: %+v", atms) - } - wg.Done() - }(acnt) - go func(acnt string) { - var reply string - if err := a1rpc.Call(utils.APIerSv1RemoveActionTiming, - &v1.AttrRemoveActionTiming{Tenant: "cgrates.org", Account: acnt, ActionPlanId: "PACKAGE_1"}, &reply); err != nil { - t.Error(err) - } - wg.Done() - }(acnt) go func(acnt string) { attrSetAcnt := v2.AttrSetAccount{ Tenant: "cgrates.org", diff --git a/general_tests/attributes_it_test.go b/general_tests/attributes_it_test.go index 833d7f233..e0dcd0460 100644 --- a/general_tests/attributes_it_test.go +++ b/general_tests/attributes_it_test.go @@ -190,13 +190,13 @@ func testAttributeSProcessEventWithAccount(t *testing.T) { }, } alsPrf.Compile() - if err := attrRPC.Call(utils.APIerSv1SetAttributeProfile, alsPrf, &result); err != nil { + if err := attrRPC.Call(utils.AdminSv1SetAttributeProfile, alsPrf, &result); err != nil { t.Error(err) } else if result != utils.OK { t.Error("Unexpected reply returned", result) } var replyAttr *engine.AttributeProfile - if err := attrRPC.Call(utils.APIerSv1GetAttributeProfile, + if err := attrRPC.Call(utils.AdminSv1GetAttributeProfile, utils.TenantIDWithAPIOpts{TenantID: &utils.TenantID{Tenant: "cgrates.org", ID: "ATTR_ACCOUNT"}}, &replyAttr); err != nil { t.Fatal(err) } @@ -268,13 +268,13 @@ func testAttributeSProcessEventWithAccountFull(t *testing.T) { }, } alsPrf.Compile() - if err := attrRPC.Call(utils.APIerSv1SetAttributeProfile, alsPrf, &result); err != nil { + if err := attrRPC.Call(utils.AdminSv1SetAttributeProfile, alsPrf, &result); err != nil { t.Error(err) } else if result != utils.OK { t.Error("Unexpected reply returned", result) } var replyAttr *engine.AttributeProfile - if err := attrRPC.Call(utils.APIerSv1GetAttributeProfile, + if err := attrRPC.Call(utils.AdminSv1GetAttributeProfile, utils.TenantIDWithAPIOpts{TenantID: &utils.TenantID{Tenant: "cgrates.org", ID: "ATTR_ACCOUNT2"}}, &replyAttr); err != nil { t.Fatal(err) } @@ -303,7 +303,7 @@ func testAttributeSProcessEventWithAccountFull(t *testing.T) { ID: "testAttributeSProcessEventWithAccount2", Event: map[string]interface{}{ "EventName": "AddFullAccount", - "FullAccount": "{\"ID\":\"cgrates.org:1001\",\"BalanceMap\":{\"*monetary\":[{\"Uuid\":\"18160631-a4ae-4078-8048-b4c6b87a36c6\",\"ID\":\"\",\"Value\":10,\"ExpirationDate\":\"0001-01-01T00:00:00Z\",\"Weight\":10,\"DestinationIDs\":{},\"RatingSubject\":\"\",\"Categories\":{},\"SharedGroups\":{},\"Timings\":null,\"TimingIDs\":{},\"Disabled\":false,\"Factor\":null,\"Blocker\":false}]},\"UnitCounters\":null,\"ActionTriggers\":null,\"AllowNegative\":false,\"Disabled\":false,\"UpdateTime\":\"2020-10-06T12:43:51.805Z\"}", + "FullAccount": "{\"ID\":\"cgrates.org:1001\",\"BalanceMap\":{\"*monetary\":[{\"Uuid\":\"18160631-a4ae-4078-8048-b4c6b87a36c6\",\"ID\":\"\",\"Value\":10,\"ExpirationDate\":\"0001-01-01T00:00:00Z\",\"Weight\":10,\"DestinationIDs\":{},\"RatingSubject\":\"\",\"Categories\":{},\"SharedGroups\":{},\"Disabled\":false,\"Factor\":null,\"Blocker\":false}]},\"UnitCounters\":null,\"ActionTriggers\":null,\"AllowNegative\":false,\"Disabled\":false,\"UpdateTime\":\"2020-10-06T12:43:51.805Z\"}", }, APIOpts: map[string]interface{}{}, }, @@ -395,13 +395,13 @@ func testAttributeSProcessEventWithStat(t *testing.T) { } alsPrf.Compile() var result string - if err := attrRPC.Call(utils.APIerSv1SetAttributeProfile, alsPrf, &result); err != nil { + if err := attrRPC.Call(utils.AdminSv1SetAttributeProfile, alsPrf, &result); err != nil { t.Error(err) } else if result != utils.OK { t.Error("Unexpected reply returned", result) } var replyAttr *engine.AttributeProfile - if err := attrRPC.Call(utils.APIerSv1GetAttributeProfile, + if err := attrRPC.Call(utils.AdminSv1GetAttributeProfile, utils.TenantIDWithAPIOpts{TenantID: &utils.TenantID{Tenant: "cgrates.org", ID: "ATTR_STATS"}}, &replyAttr); err != nil { t.Fatal(err) } @@ -474,13 +474,13 @@ func testAttributeSProcessEventWithStatFull(t *testing.T) { } alsPrf.Compile() var result string - if err := attrRPC.Call(utils.APIerSv1SetAttributeProfile, alsPrf, &result); err != nil { + if err := attrRPC.Call(utils.AdminSv1SetAttributeProfile, alsPrf, &result); err != nil { t.Error(err) } else if result != utils.OK { t.Error("Unexpected reply returned", result) } var replyAttr *engine.AttributeProfile - if err := attrRPC.Call(utils.APIerSv1GetAttributeProfile, + if err := attrRPC.Call(utils.AdminSv1GetAttributeProfile, utils.TenantIDWithAPIOpts{TenantID: &utils.TenantID{Tenant: "cgrates.org", ID: "ATTR_STATS2"}}, &replyAttr); err != nil { t.Fatal(err) } @@ -615,13 +615,13 @@ func testAttributeSProcessEventWithResource(t *testing.T) { }, } alsPrf.Compile() - if err := attrRPC.Call(utils.APIerSv1SetAttributeProfile, alsPrf, &result); err != nil { + if err := attrRPC.Call(utils.AdminSv1SetAttributeProfile, alsPrf, &result); err != nil { t.Error(err) } else if result != utils.OK { t.Error("Unexpected reply returned", result) } var replyAttr *engine.AttributeProfile - if err := attrRPC.Call(utils.APIerSv1GetAttributeProfile, + if err := attrRPC.Call(utils.AdminSv1GetAttributeProfile, utils.TenantIDWithAPIOpts{TenantID: &utils.TenantID{Tenant: "cgrates.org", ID: "ATTR_RESOURCE"}}, &replyAttr); err != nil { t.Fatal(err) } @@ -694,13 +694,13 @@ func testAttributeSProcessEventWithResourceFull(t *testing.T) { }, } alsPrf.Compile() - if err := attrRPC.Call(utils.APIerSv1SetAttributeProfile, alsPrf, &result); err != nil { + if err := attrRPC.Call(utils.AdminSv1SetAttributeProfile, alsPrf, &result); err != nil { t.Error(err) } else if result != utils.OK { t.Error("Unexpected reply returned", result) } var replyAttr *engine.AttributeProfile - if err := attrRPC.Call(utils.APIerSv1GetAttributeProfile, + if err := attrRPC.Call(utils.AdminSv1GetAttributeProfile, utils.TenantIDWithAPIOpts{TenantID: &utils.TenantID{Tenant: "cgrates.org", ID: "ATTR_RESOURCE2"}}, &replyAttr); err != nil { t.Fatal(err) } @@ -781,13 +781,13 @@ func testAttributeSProcessEventWithLibPhoneNumber(t *testing.T) { }, } alsPrf.Compile() - if err := attrRPC.Call(utils.APIerSv1SetAttributeProfile, alsPrf, &result); err != nil { + if err := attrRPC.Call(utils.AdminSv1SetAttributeProfile, alsPrf, &result); err != nil { t.Error(err) } else if result != utils.OK { t.Error("Unexpected reply returned", result) } var replyAttr *engine.AttributeProfile - if err := attrRPC.Call(utils.APIerSv1GetAttributeProfile, + if err := attrRPC.Call(utils.AdminSv1GetAttributeProfile, utils.TenantIDWithAPIOpts{TenantID: &utils.TenantID{Tenant: "cgrates.org", ID: "ATTR_LIBPHONENUMBER2"}}, &replyAttr); err != nil { t.Fatal(err) } @@ -879,13 +879,13 @@ func testAttributeSProcessEventWithLibPhoneNumberComposed(t *testing.T) { }, } alsPrf.Compile() - if err := attrRPC.Call(utils.APIerSv1SetAttributeProfile, alsPrf, &result); err != nil { + if err := attrRPC.Call(utils.AdminSv1SetAttributeProfile, alsPrf, &result); err != nil { t.Error(err) } else if result != utils.OK { t.Error("Unexpected reply returned", result) } var replyAttr *engine.AttributeProfile - if err := attrRPC.Call(utils.APIerSv1GetAttributeProfile, + if err := attrRPC.Call(utils.AdminSv1GetAttributeProfile, utils.TenantIDWithAPIOpts{TenantID: &utils.TenantID{Tenant: "cgrates.org", ID: "ATTR_LIBPHONENUMBER_COMPOSED"}}, &replyAttr); err != nil { t.Fatal(err) } @@ -959,13 +959,13 @@ func testAttributeSProcessEventWithLibPhoneNumberFull(t *testing.T) { }, } alsPrf.Compile() - if err := attrRPC.Call(utils.APIerSv1SetAttributeProfile, alsPrf, &result); err != nil { + if err := attrRPC.Call(utils.AdminSv1SetAttributeProfile, alsPrf, &result); err != nil { t.Error(err) } else if result != utils.OK { t.Error("Unexpected reply returned", result) } var replyAttr *engine.AttributeProfile - if err := attrRPC.Call(utils.APIerSv1GetAttributeProfile, + if err := attrRPC.Call(utils.AdminSv1GetAttributeProfile, utils.TenantIDWithAPIOpts{TenantID: &utils.TenantID{Tenant: "cgrates.org", ID: "ATTR_LIBPHONENUMBER"}}, &replyAttr); err != nil { t.Fatal(err) } diff --git a/general_tests/doubleremove_it_test.go b/general_tests/doubleremove_it_test.go index e04377686..37e2cf956 100644 --- a/general_tests/doubleremove_it_test.go +++ b/general_tests/doubleremove_it_test.go @@ -299,13 +299,6 @@ func testdoubleRemoveActionPlan(t *testing.T) { } else if len(aps) != 1 { t.Errorf("Expected: %v,\n received: %v", 1, len(aps)) } else if aps[0].Id != "ATMS_1" { - t.Errorf("Expected: ATMS_1,\n received: %v", aps[0].Id) - } else if aps[0].ActionTimings[0].ActionsID != "ACTS_2" { - t.Errorf("Expected: ACTS_2,\n received: %v", aps[0].ActionTimings[0].ActionsID) - } else if aps[0].ActionTimings[0].Weight != 20.0 { - t.Errorf("Expected: 20.0,\n received: %v", aps[0].ActionTimings[0].Weight) - } - // remove if err := sesRPC.Call(utils.APIerSv1RemoveActionPlan, &v1.AttrGetActionPlan{ ID: "ATMS_1"}, &reply); err != nil { diff --git a/general_tests/sessionpause_it_test.go b/general_tests/sessionpause_it_test.go index 574a74551..984aee8f8 100644 --- a/general_tests/sessionpause_it_test.go +++ b/general_tests/sessionpause_it_test.go @@ -329,7 +329,6 @@ func testSesPauseItAllPause(t *testing.T) { RoundingDecimals: 5, MaxCost: 0, MaxCostStrategy: "", - TimingID: "", RatesID: utils.MetaPause, RatingFiltersID: utils.MetaPause, }, @@ -359,17 +358,7 @@ func testSesPauseItAllPause(t *testing.T) { RateUnit: 1, }}, }, - Timings: engine.ChargedTimings{ - "": { - StartTime: "00:00:00", - }, - }, } - // the Timings are not relevant for this test - for _, r := range cd.Rating { - r.TimingID = "" - } - cd.Timings = evCost.Timings if !reflect.DeepEqual(evCost, cd) { t.Errorf("Expected %s \n received: %s", utils.ToJSON(evCost), utils.ToJSON(cd)) } @@ -476,7 +465,6 @@ func testSesPauseItInitPause(t *testing.T) { RoundingDecimals: 5, MaxCost: 0, MaxCostStrategy: "", - TimingID: "", RatesID: utils.MetaPause, RatingFiltersID: utils.MetaPause, }, @@ -486,7 +474,6 @@ func testSesPauseItInitPause(t *testing.T) { RoundingDecimals: 4, MaxCost: 0, MaxCostStrategy: "", - TimingID: "", RatesID: "3d3179b", RatingFiltersID: "00eaefb", }, @@ -540,11 +527,6 @@ func testSesPauseItInitPause(t *testing.T) { RateUnit: 60 * time.Second, }}, }, - Timings: engine.ChargedTimings{ - "": { - StartTime: "00:00:00", - }, - }, } // we already tested that the keys are populated corectly // sync the curent keys to better compare @@ -671,7 +653,6 @@ func testSesPauseItInitUpdatePause(t *testing.T) { RoundingDecimals: 5, MaxCost: 0, MaxCostStrategy: "", - TimingID: "", RatesID: utils.MetaPause, RatingFiltersID: utils.MetaPause, }, @@ -681,7 +662,6 @@ func testSesPauseItInitUpdatePause(t *testing.T) { RoundingDecimals: 4, MaxCost: 0, MaxCostStrategy: "", - TimingID: "", RatesID: "3d3179b", RatingFiltersID: "00eaefb", }, @@ -735,11 +715,6 @@ func testSesPauseItInitUpdatePause(t *testing.T) { RateUnit: 60 * time.Second, }}, }, - Timings: engine.ChargedTimings{ - "": { - StartTime: "00:00:00", - }, - }, } // we already tested that the keys are populated corectly // sync the curent keys to better compare @@ -868,7 +843,6 @@ func testSesPauseItUpdatePause(t *testing.T) { RoundingDecimals: 5, MaxCost: 0, MaxCostStrategy: "", - TimingID: "", RatesID: utils.MetaPause, RatingFiltersID: utils.MetaPause, }, @@ -878,7 +852,6 @@ func testSesPauseItUpdatePause(t *testing.T) { RoundingDecimals: 4, MaxCost: 0, MaxCostStrategy: "", - TimingID: "", RatesID: "3d3179b", RatingFiltersID: "00eaefb", }, @@ -938,15 +911,6 @@ func testSesPauseItUpdatePause(t *testing.T) { RateUnit: 60 * time.Second, }}, }, - Timings: engine.ChargedTimings{ - "": { - Years: utils.Years{}, - Months: utils.Months{}, - MonthDays: utils.MonthDays{}, - WeekDays: utils.WeekDays{}, - StartTime: "00:00:00", - }, - }, } // we already tested that the keys are populated corectly // sync the curent keys to better compare diff --git a/general_tests/tut_smgeneric_it_test.go b/general_tests/tut_smgeneric_it_test.go index b1938a853..1d19af166 100644 --- a/general_tests/tut_smgeneric_it_test.go +++ b/general_tests/tut_smgeneric_it_test.go @@ -134,8 +134,6 @@ func testTutSMGCacheStats(t *testing.T) { // SupplierProfiles: 3, AttributeProfiles: 2} var rcvStats map[string]*ltcache.CacheStats expectedStats := engine.GetDefaultEmptyCacheStats() - expectedStats[utils.CacheDestinations].Items = 5 - expectedStats[utils.CacheReverseDestinations].Items = 7 expectedStats[utils.CacheRatingPlans].Items = 4 expectedStats[utils.CacheRatingProfiles].Items = 5 expectedStats[utils.CacheActions].Items = 9 @@ -155,7 +153,6 @@ func testTutSMGCacheStats(t *testing.T) { expectedStats[utils.CacheLoadIDs].Items = 33 expectedStats[utils.CacheChargerProfiles].Items = 1 expectedStats[utils.CacheRPCConnections].Items = 2 - expectedStats[utils.CacheTimings].Items = 14 expectedStats[utils.CacheThresholdFilterIndexes].Items = 10 expectedStats[utils.CacheThresholdFilterIndexes].Groups = 1 expectedStats[utils.CacheStatFilterIndexes].Items = 2 diff --git a/migrator/filters.go b/migrator/filters.go index ff1c4ac66..b0fde2421 100644 --- a/migrator/filters.go +++ b/migrator/filters.go @@ -801,7 +801,7 @@ type v1Filter struct { } type v1FilterRule struct { - Type string // Filter type (*string, *timing, *rsr_filters, *stats, *lt, *lte, *gt, *gte) + Type string // Filter type (*string, *rsr_filters, *stats, *lt, *lte, *gt, *gte) FieldName string // Name of the field providing us the Values to check (used in case of some ) Values []string // Filter definition rsrFields config.RSRParsers // Cache here the RSRFilter Values diff --git a/migrator/stats_it_test.go b/migrator/stats_it_test.go index 66fa5f9ff..a314bc53c 100644 --- a/migrator/stats_it_test.go +++ b/migrator/stats_it_test.go @@ -175,7 +175,6 @@ func testStsITFlush(t *testing.T) { // // ID: "Test", // // Balance: &engine.BalanceFilter{ // // ID: utils.StringPointer("TESTB"), -// // Timings: []*engine.RITiming{}, // // ExpirationDate: utils.TimePointer(tim), // // Type: utils.StringPointer(utils.MetaMonetary), // // }, @@ -357,7 +356,6 @@ func testStsITMigrateFromv1(t *testing.T) { // ID: "Test", // Balance: &engine.BalanceFilter{ // ID: utils.StringPointer("TESTB"), - // Timings: []*engine.RITiming{}, // ExpirationDate: utils.TimePointer(tim), // Type: utils.StringPointer(utils.MetaMonetary), // }, diff --git a/migrator/thresholds_it_test.go b/migrator/thresholds_it_test.go index 55889d26e..6d7ea21df 100644 --- a/migrator/thresholds_it_test.go +++ b/migrator/thresholds_it_test.go @@ -191,7 +191,6 @@ func testTrsITFlush(t *testing.T) { // ActivationDate: tim, // Balance: &engine.BalanceFilter{ // ID: utils.StringPointer("TESTZ"), -// Timings: []*engine.RITiming{}, // ExpirationDate: utils.TimePointer(tim), // Type: utils.StringPointer(utils.MetaMonetary), // }, diff --git a/services/cdrs_it_test.go b/services/cdrs_it_test.go index 0b7708e59..5d3b5cb24 100644 --- a/services/cdrs_it_test.go +++ b/services/cdrs_it_test.go @@ -47,7 +47,6 @@ func TestCdrsReload(t *testing.T) { close(chS.GetPrecacheChannel(utils.CacheChargerProfiles)) close(chS.GetPrecacheChannel(utils.CacheChargerFilterIndexes)) - close(chS.GetPrecacheChannel(utils.CacheTimings)) cfg.ChargerSCfg().Enabled = true server := cores.NewServer(nil) diff --git a/services/datadb_it_test.go b/services/datadb_it_test.go index fe8c6a435..9fb9a22aa 100644 --- a/services/datadb_it_test.go +++ b/services/datadb_it_test.go @@ -107,9 +107,6 @@ func TestDataDBReload(t *testing.T) { utils.MetaActions: { Replicate: false, Remote: false}, - utils.CacheTimings: { - Replicate: false, - Remote: false}, utils.MetaResourceProfile: { Replicate: false, Remote: false}, @@ -204,7 +201,6 @@ func TestDataDBReloadBadType(t *testing.T) { utils.Routes: 2, // old version for Attributes utils.Attributes: 5, - utils.Timing: 1, utils.RQF: 5, utils.Resource: 1, utils.Subscribers: 1, @@ -443,7 +439,6 @@ func TestDataDBStartVersion(t *testing.T) { utils.Routes: 2, // old version for Attributes utils.Attributes: 5, - utils.Timing: 1, utils.RQF: 5, utils.Resource: 1, utils.Subscribers: 1, @@ -499,7 +494,6 @@ func TestDataDBReloadCastError(t *testing.T) { utils.Routes: 2, // old version for Attributes utils.Attributes: 5, - utils.Timing: 1, utils.RQF: 5, utils.Resource: 1, utils.Subscribers: 1, @@ -636,7 +630,6 @@ func TestDataDBReloadIfaceAsDurationError(t *testing.T) { utils.Routes: 2, // old version for Attributes utils.Attributes: 5, - utils.Timing: 1, utils.RQF: 5, utils.Resource: 1, utils.Subscribers: 1, diff --git a/services/sessions_it_test.go b/services/sessions_it_test.go index a435f5215..6de678ee2 100644 --- a/services/sessions_it_test.go +++ b/services/sessions_it_test.go @@ -144,7 +144,6 @@ func TestSessionSReload2(t *testing.T) { chS := engine.NewCacheS(cfg, nil, nil) close(chS.GetPrecacheChannel(utils.CacheChargerProfiles)) close(chS.GetPrecacheChannel(utils.CacheChargerFilterIndexes)) - close(chS.GetPrecacheChannel(utils.CacheTimings)) internalChan := make(chan birpc.ClientConnector, 1) internalChan <- nil @@ -194,7 +193,6 @@ func TestSessionSReload3(t *testing.T) { chS := engine.NewCacheS(cfg, nil, nil) close(chS.GetPrecacheChannel(utils.CacheChargerProfiles)) close(chS.GetPrecacheChannel(utils.CacheChargerFilterIndexes)) - close(chS.GetPrecacheChannel(utils.CacheTimings)) internalChan := make(chan birpc.ClientConnector, 1) internalChan <- nil diff --git a/services/stordb_it_test.go b/services/stordb_it_test.go index 5c7cfa883..3a3f1651d 100644 --- a/services/stordb_it_test.go +++ b/services/stordb_it_test.go @@ -176,7 +176,6 @@ func TestStorDBReloadVersion1(t *testing.T) { utils.TpRoutes: 1, utils.TpStats: 1, utils.TpResources: 1, - utils.TpTiming: 1, utils.TpResource: 1, utils.TpChargers: 1, utils.TpDispatchers: 1, @@ -244,7 +243,6 @@ func TestStorDBReloadVersion2(t *testing.T) { utils.TpRoutes: 1, utils.TpStats: 1, utils.TpResources: 1, - utils.TpTiming: 1, utils.TpResource: 1, utils.TpChargers: 1, utils.TpDispatchers: 1, @@ -309,7 +307,6 @@ func TestStorDBReloadVersion3(t *testing.T) { utils.TpRoutes: 1, utils.TpStats: 1, utils.TpResources: 1, - utils.TpTiming: 1, utils.TpResource: 1, utils.TpChargers: 1, utils.TpDispatchers: 1, diff --git a/sessions/sessionscover_test.go b/sessions/sessionscover_test.go index cd1bb6ee4..49a5d2b64 100644 --- a/sessions/sessionscover_test.go +++ b/sessions/sessionscover_test.go @@ -2053,12 +2053,10 @@ func TestEndSession(t *testing.T) { Rating: map[string]*engine.RatingUnit{ "RATING_ID_TEST": { RatesID: utils.EmptyString, - TimingID: utils.EmptyString, RoundingDecimals: 2, }, utils.MetaRounding: { RatesID: utils.EmptyString, - TimingID: utils.EmptyString, }, "RATING_ID": { RatingFiltersID: utils.EmptyString, @@ -4458,7 +4456,6 @@ func TestBiRPCv1GetCost(t *testing.T) { Accounting: map[string]*engine.BalanceCharge{}, RatingFilters: map[string]engine.RatingMatchedFilters{}, Rates: map[string]engine.RateGroups{}, - Timings: map[string]*engine.ChargedTiming{}, }, } expectedVal.EventCost.Compute() diff --git a/utils/apitpdata.go b/utils/apitpdata.go index 5b0c47874..fc051ba93 100644 --- a/utils/apitpdata.go +++ b/utils/apitpdata.go @@ -83,54 +83,6 @@ func (pgnt Paginator) Clone() Paginator { } } -type ApierTPTiming struct { - TPid string // Tariff plan id - ID string // Timing id - Years string // semicolon separated list of years this timing is valid on, *any supported - Months string // semicolon separated list of months this timing is valid on, *any supported - MonthDays string // semicolon separated list of month's days this timing is valid on, *any supported - WeekDays string // semicolon separated list of week day names this timing is valid on *any supported - Time string // String representing the time this timing starts on -} - -type TPTiming struct { - ID string - Years Years - Months Months - MonthDays MonthDays - WeekDays WeekDays - StartTime string - EndTime string -} - -// TPTimingWithAPIOpts is used in replicatorV1 for dispatcher -type TPTimingWithAPIOpts struct { - *TPTiming - Tenant string - APIOpts map[string]interface{} -} - -func NewTiming(ID, years, mounths, mounthdays, weekdays, time string) (rt *TPTiming) { - rt = &TPTiming{} - rt.ID = ID - rt.Years.Parse(years, InfieldSep) - rt.Months.Parse(mounths, InfieldSep) - rt.MonthDays.Parse(mounthdays, InfieldSep) - rt.WeekDays.Parse(weekdays, InfieldSep) - times := strings.Split(time, InfieldSep) - rt.StartTime = times[0] - if len(times) > 1 { - rt.EndTime = times[1] - } - return -} - -type AttrSetDestination struct { - Id string - Prefixes []string - Overwrite bool -} - type AttrGetCdrs struct { CgrIds []string // If provided, it will filter based on the cgrids present in list MediationRunIds []string // If provided, it will filter on mediation runid @@ -657,7 +609,7 @@ type TPFilterProfile struct { // TPFilter is used in TPFilterProfile type TPFilter struct { - Type string // Filter type (*string, *timing, *rsr_filters, *cdr_stats) + Type string // Filter type (*string, *rsr_filters, *cdr_stats) Element string // Name of the field providing us the Values to check (used in case of some ) Values []string // Filter definition } diff --git a/utils/apitpdata_test.go b/utils/apitpdata_test.go index 1bb414b9d..c8d22f027 100644 --- a/utils/apitpdata_test.go +++ b/utils/apitpdata_test.go @@ -89,34 +89,6 @@ func TestClonePaginator(t *testing.T) { } } -func TestNewTiming(t *testing.T) { - eOut := &TPTiming{ - ID: "1", - Years: Years{2020}, - Months: []time.Month{time.April}, - MonthDays: MonthDays{18}, - WeekDays: WeekDays{06}, - StartTime: "00:00:00", - EndTime: "11:11:11", - } - rcv := NewTiming("1", "2020", "04", "18", "06", "00:00:00;11:11:11") - if !reflect.DeepEqual(eOut, rcv) { - t.Errorf("Expected %+v, received %+v", eOut, rcv) - } - //without endtime, check if .Split method works (only one timestamp) - rcv = NewTiming("1", "2020", "04", "18", "06", "00:00:00") - eOut.EndTime = "" - if !reflect.DeepEqual(eOut, rcv) { - t.Errorf("Expected %+v, received %+v", eOut, rcv) - } - //check if .Split method works (ignoring the last timestamp) - rcv = NewTiming("1", "2020", "04", "18", "06", "00:00:00;11:11:11;22:22:22") - eOut.EndTime = "11:11:11" - if !reflect.DeepEqual(eOut, rcv) { - t.Errorf("Expected %+v, received %+v", eOut, rcv) - } -} - //now working here func TestAttrGetCdrsAsCDRsFilter(t *testing.T) { attrGetCdrs := &AttrGetCdrs{ @@ -561,7 +533,6 @@ func TestNewAttrReloadCacheWithOpts(t *testing.T) { DispatcherProfileIDs: {MetaAny}, DispatcherHostIDs: {MetaAny}, RateProfileIDs: {MetaAny}, - TimingIDs: {MetaAny}, AttributeFilterIndexIDs: {MetaAny}, ResourceFilterIndexIDs: {MetaAny}, StatFilterIndexIDs: {MetaAny}, diff --git a/utils/researchreplace_test.go b/utils/researchreplace_test.go index 58fe8bdf8..4189150dc 100644 --- a/utils/researchreplace_test.go +++ b/utils/researchreplace_test.go @@ -52,7 +52,7 @@ func TestProcessReSearchReplace2(t *testing.T) { func TestProcessReSearchReplace3(t *testing.T) { //"MatchedDestId":"CST_31800_DE080" rsr := &ReSearchReplace{SearchRegexp: regexp.MustCompile(`"MatchedDestId":".+_(\w{5})"`), ReplaceTemplate: "$1"} - source := `[{"TimeStart":"2014-04-15T22:17:57+02:00","TimeEnd":"2014-04-15T22:18:01+02:00","Cost":0,"RateInterval":{"Timing":{"Years":[],"Months":[],"MonthDays":[],"WeekDays":[],"StartTime":"00:00:00","EndTime":""},"Rating":{"ConnectFee":0,"Rates":[{"GroupIntervalStart":0,"Value":0,"RateIncrement":1000000000,"RateUnit":60000000000}],"RoundingMethod":"*middle","RoundingDecimals":4},"Weight":10},"CallDuration":4000000000,"Increments":null,"MatchedSubject":"*out:sip.test.cgrates.org:call:*any","MatchedPrefix":"+49800","MatchedDestId":"CST_31800_DE080"}]` + source := `[{"TimeStart":"2014-04-15T22:17:57+02:00","TimeEnd":"2014-04-15T22:18:01+02:00","Cost":0,"RateInterval":{"Rating":{"ConnectFee":0,"Rates":[{"GroupIntervalStart":0,"Value":0,"RateIncrement":1000000000,"RateUnit":60000000000}],"RoundingMethod":"*middle","RoundingDecimals":4},"Weight":10},"CallDuration":4000000000,"Increments":null,"MatchedSubject":"*out:sip.test.cgrates.org:call:*any","MatchedPrefix":"+49800","MatchedDestId":"CST_31800_DE080"}]` expectOut := "DE080" if outStr := rsr.Process(source); outStr != expectOut { t.Error("Unexpected output from SearchReplace: ", outStr) diff --git a/utils/struct_test.go b/utils/struct_test.go index cb9912c6a..0b7f07ea0 100644 --- a/utils/struct_test.go +++ b/utils/struct_test.go @@ -25,13 +25,12 @@ import ( func TestMissingStructFieldsCorrect(t *testing.T) { var attr = struct { - Tenant string - Account string - Type string - ActionTimingsID string - }{"bevoip.eu", "danconns0001", MetaPrepaid, "mama"} + Tenant string + Account string + Type string + }{"bevoip.eu", "danconns0001", MetaPrepaid} if missing := MissingStructFields(&attr, - []string{"Tenant", "Account", "Type", "ActionTimingsID"}); len(missing) != 0 { + []string{"Tenant", "Account", "Type"}); len(missing) != 0 { t.Error("Found missing field on correct struct", missing) } } @@ -80,13 +79,12 @@ func TestUpdateStructWithIfaceMap(t *testing.T) { func TestMissingStructFieldsAppend(t *testing.T) { var attr = struct { - Tenant string - Account string - Type string - ActionTimingsID string - }{"", "", MetaPrepaid, ""} + Tenant string + Account string + Type string + }{"", "", MetaPrepaid} missing := MissingStructFields(&attr, - []string{"Tenant", "Account", "Type", "ActionTimingsID"}) + []string{"Tenant", "Account", "Type"}) if len(missing) == 0 { t.Error("Required missing field not found") }