mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 10:06:24 +05:00
Add action type *dynamic_action_plan_accounts and tests for it
This commit is contained in:
committed by
Dan Christian Bogos
parent
2d94ca89bb
commit
801631196d
4
data/tariffplans/dynamic_tps/ActionPlanAccounts.csv
Normal file
4
data/tariffplans/dynamic_tps/ActionPlanAccounts.csv
Normal file
@@ -0,0 +1,4 @@
|
||||
#Id[0];ActionsId[1];TimingId[2];Weight[3];Overwrite[4];Tenant:AccountIDs[5]
|
||||
PACKAGE_1001;TOPUP_RST_MONETARY_10;*asap;10;false;cgrates.org:1001
|
||||
ACTION_PLAN_ENABLE_ACC_AFTER_5S;ACT_ENABLE_ACC;TM_AFTER_5S;10;true;<*tenant+:+~*opts.*accountID>
|
||||
PACKAGE_<~*opts.*accountID>;TOPUP_RST_DATA_100;*asap;10;false;cgrates.org:<~*opts.*accountID>&cgrates.org:1002
|
||||
|
3
data/tariffplans/dynamic_tps/ActionPlans.csv
Normal file
3
data/tariffplans/dynamic_tps/ActionPlans.csv
Normal file
@@ -0,0 +1,3 @@
|
||||
#Id[0];ActionsId[1];TimingId[2];Weight[3];Overwrite[4]
|
||||
PACKAGE_1001;TOPUP_RST_MONETARY_10;*asap;10;false
|
||||
ACTION_PLAN_LW5S;LOG_WARNING;TM_AFTER_5S;10;true
|
||||
|
17
data/tariffplans/dynamic_tps/Actions.csv
Normal file
17
data/tariffplans/dynamic_tps/Actions.csv
Normal file
@@ -0,0 +1,17 @@
|
||||
#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]
|
||||
TOPUP_RST_10;*topup_reset;;;;*monetary;;*any;;;*unlimited;;10;10;false;false;10
|
||||
|
||||
TOPUP_RST_<~*req.Account>;*topup_reset;;;;*monetary;;*any;;;*unlimited;;5;20;false;false;10
|
||||
TOPUP_RST_<~*req.Account>;*topup_reset;;;;*voice;;DST_1002;SPECIAL_1002;;*unlimited;;90s;20;false;false;10
|
||||
|
||||
LOG_WARNING;*log;;;;;;;;;;;;;false;false;10
|
||||
ENABLE_AND_LOG;*log;;;;;;;;;;;;;false;false;10
|
||||
ENABLE_AND_LOG;*enable_account;;;;;;;;;;;;;false;false;10
|
||||
|
||||
|
||||
ACT_RAD_COA_ACNT_<~*req.Account>;*cgr_rpc;\f"{""Address"":""localhost:2012"";""Transport"":""*json"";""Method"":""SessionSv1.AlterSessions"";""Attempts"":1;""Async"":false;""Params"":{""Filters"":[""*string:~*req.Account:<~*req.Account>""];""Tenant"":""cgrates.org"";""APIOpts"":{""*radCoATemplate"":""mycoa""};""Event"":{""CustomFilter"":""custom_filter""}}}"\f;;;;;;;;;;;;;;20
|
||||
|
||||
|
||||
Alter_Session_<~*req.Account>;*alter_sessions;\fcgrates.org;*string:~*req.Account:<~*req.Account>;1;*radCoATemplate:mycoa;CustomFilter:mycustomvalue\f;*string:~*req.Account:<~*req.Account>&filter2;balID;*monetary;call&data;1002&1003;SPECIAL_1002;SHARED_A&SHARED_B;*unlimited;weekdays&offpeak;10;10;true;true;10
|
||||
|
||||
CDR_Log_<~*req.Account>;*cdrlog;\f{\"Account\":\"<~*req.Account>\",\"RequestType\":\"*pseudoprepaid\",\"Subject\":\"DifferentThanAccount\", \"ToR\":\"~ActionType:s/^\\*(.*)$/did_$1/\"}\f;*string:~*req.Account:<~*req.Account>&filter2;balID;*monetary;call&data;1002&1003;SPECIAL_1002;SHARED_A&SHARED_B;*unlimited;weekdays&offpeak;10;10;true;true;10
|
||||
|
Can't render this file because it contains an unexpected character in line 12 and column 45.
|
5
data/tariffplans/dynamic_tps/Attributes.csv
Normal file
5
data/tariffplans/dynamic_tps/Attributes.csv
Normal file
@@ -0,0 +1,5 @@
|
||||
#Tenant[0];ID[1];Contexts[2];FilterIDs[3];ActivationInterval[4];AttributeFilterIDs[5];Path[6];Type[7];Value[8];Blocker[9];Weight[10];APIOpts[11]
|
||||
|
||||
cgrates.org;Attr_1;*sessions&*chargers;FLTR_ATTR_1&FLTR_ATTR_2;2014-07-29T15:00:00Z;AttrFltr_1&AttrFltr2;*req.Subject;*constant;SUPPLIER1&SUPPLIER2;true;10;*accountID:<~*req.Account>
|
||||
|
||||
*tenant;Attr_<~*req.Account>;*any;*string:~*req.Account:<~*req.Account>;*now&3000-07-29T15:00:00Z;AttrFltr_1&AttrFltr2;*req.Subject;*constant;SUPPLIER1;true;10;
|
||||
|
2
data/tariffplans/dynamic_tps/Destinations.csv
Normal file
2
data/tariffplans/dynamic_tps/Destinations.csv
Normal file
@@ -0,0 +1,2 @@
|
||||
#Id;Prefix
|
||||
DST_<~*req.Destination>;<~*req.Destination>
|
||||
|
4
data/tariffplans/dynamic_tps/Filters.csv
Normal file
4
data/tariffplans/dynamic_tps/Filters.csv
Normal file
@@ -0,0 +1,4 @@
|
||||
#Tenant[0];ID[1];Type[2];Path[3];Values[4];ActivationInterval[5];APIOpts[6]
|
||||
cgrates.org,FLTR_1,*string,~*req.Account,<~*req.Account>;1002,*now;
|
||||
cgrates.org;Fltr_2;*string;~*req.Account;1001&1002;2014-07-29T15:00:00Z;
|
||||
*tenant;Fltr_<~*req.Account>;*string;~*req.<~*req.ExtraInfo>;<~*req.Account>&1002;*now&3000-07-29T15:00:00Z;
|
||||
|
3
data/tariffplans/dynamic_tps/Rankings.csv
Normal file
3
data/tariffplans/dynamic_tps/Rankings.csv
Normal file
@@ -0,0 +1,3 @@
|
||||
#Tenant[0];Id[1];Schedule[2];StatIDs[3];MetricIDs[4];Sorting[5];SortingParameters[6];Stored[7];ThresholdIDs[8];APIOpts[9]
|
||||
cgrates.org;RANK1;@every 15m;Stats2&Stats3&Stats4;Metric1&Metric3;*asc;;true;THD1&THD2
|
||||
*tenant;RANK_ACNT_<~*req.Account>;@every 15m;Stats2&Stats3&Stats4;Metric1&Metric3;*asc;metricA:true&metricB:false;true;THD1&THD2;*accountID:<~*req.Account>
|
||||
|
4
data/tariffplans/dynamic_tps/Routes.csv
Normal file
4
data/tariffplans/dynamic_tps/Routes.csv
Normal file
@@ -0,0 +1,4 @@
|
||||
#Tenant[0];ID[1];FilterIDs[2];ActivationInterval[3];Sorting[4];SortingParameters[5];RouteID[6];RouteFilterIDs[7];RouteAccountIDs[8];RouteRatingPlanIDs[9];RouteResourceIDs[10];RouteStatIDs[11];RouteWeight[12];RouteBlocker[13];RouteParameters[14];Weight[15];APIOpts[16]
|
||||
cgrates.org;ROUTE_WEIGHT_ACNT_1001;*string:~*req.Account:1001&*string:~*req.Account:1002;2014-07-29T15:00:00Z;*weight;*acd&*tcc;route1;*string:~*req.Account:1001&*string:~*req.Account:1002;1001&1002;RP1&RP2;RS1&RS2;Stat_1&Stat_1_1;10;true;param;10;
|
||||
|
||||
*tenant;ROUTE_WEIGHT_ACNT_<~*req.Account>;*string:~*req.Account:<~*req.Account>&*string:~*req.Account:1002;*now&3000-07-29T15:00:00Z;*weight;*acd&*tcc;route1;*string:~*req.Account:<~*req.Account>&*string:~*req.Account:1002;<~*req.Account>&1002;RP1&RP2;RS1&RS2;Stat_1&Stat_1_1;10;true;param;10;*accountID:<~*req.Account>
|
||||
|
6
data/tariffplans/dynamic_tps/Stats.csv
Normal file
6
data/tariffplans/dynamic_tps/Stats.csv
Normal file
@@ -0,0 +1,6 @@
|
||||
#Tenant[0];Id[1];FilterIDs[2];ActivationInterval[3];QueueLength[4];TTL[5];MinItems[6];Metrics[7];MetricFilterIDs[8];Stored[9];Blocker[10];Weight[11];ThresholdIDs[12];APIOpts[13]
|
||||
*tenant;Stat_<~*req.Account>;*string:~*req.Account:<~*req.Account>&*exists:~*opts.*accountID:;*now;;5s;;*sum#1;;true;false;10;THD_ACNT_<~*req.Account>&THD_BLOCKER_ACNT_<~*req.Account>;
|
||||
|
||||
cgrates.org;Stat_1;FLTR_STS1;2014-07-29T15:00:00Z;100;10s;0;*acd&*tcd&*asr;Metric_FLTR;false;true;30;*none;*accountID:<~*req.Account>
|
||||
|
||||
*tenant;Stat_<~*req.Account>;*string:~*req.Account:<~*req.Account>;*now&3000-07-29T15:00:00Z;100;10s;0;*acd&*tcd&*asr;Metric_FLTR;false;true;30;*none;
|
||||
|
7
data/tariffplans/dynamic_tps/Thresholds.csv
Normal file
7
data/tariffplans/dynamic_tps/Thresholds.csv
Normal file
@@ -0,0 +1,7 @@
|
||||
#Tenant[0];Id[1];FilterIDs[2];ActivationInterval[3];MaxHits[4];MinHits[5];MinSleep[6];Blocker[7];Weight[8];ActionIDs[9];Async[10];EeIDs[11];APIOpts[12]
|
||||
*tenant;THD_ACNT_<~*req.Account>;*string:~*req.StatID:Stat_<~*req.Account>&*string:~*req.*sum#1:100;*now;-1;1;5s;true;4;ACT_BLOCK_ACC&ACT_DYN_ACT_PLAN_ACC_ENABLE;true;;
|
||||
|
||||
*tenant;THD_BLOCKER_ACNT_<~*req.Account>;*string:~*opts.*accountID:<~*req.Account>;*now;-1;1;;true;3;;true;;*accountID:<~*req.Account>
|
||||
|
||||
cgrates.org;THD_ACNT_<~*req.Account>;*string:~*req.Account:<~*req.Account>;*now&3000-07-29T15:00:00Z;1;1;1s;true;10;ACT_LOG_WARNING;true;eeID1&eeID2;
|
||||
|
||||
|
Reference in New Issue
Block a user