mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-15 13:19:53 +05:00
Merge branch 'master' of https://github.com/cgrates/cgrates
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
language: go
|
||||
|
||||
go:
|
||||
- 1.4
|
||||
- 1.5
|
||||
|
||||
script: $TRAVIS_BUILD_DIR/test.sh
|
||||
|
||||
@@ -72,7 +72,7 @@ func (self *ApierV1) GetTPAliasIds(attrs AttrGetTPAliasIds, reply *[]string) err
|
||||
if missing := utils.MissingStructFields(&attrs, []string{"TPid"}); len(missing) != 0 { //Params missing
|
||||
return utils.NewErrMandatoryIeMissing(missing...)
|
||||
}
|
||||
if ids, err := self.StorDb.GetTpTableIds(attrs.TPid, utils.TBL_TP_ALIASES, utils.TPDistinctIds{"`direction`", "`tenant`", "`category`", "`account`", "`subject`", "`group`"}, nil, &attrs.Paginator); err != nil {
|
||||
if ids, err := self.StorDb.GetTpTableIds(attrs.TPid, utils.TBL_TP_ALIASES, utils.TPDistinctIds{"direction", "tenant", "category", "account", "subject", "context"}, nil, &attrs.Paginator); err != nil {
|
||||
return utils.NewErrServerError(err)
|
||||
} else if ids == nil {
|
||||
return utils.ErrNotFound
|
||||
|
||||
@@ -47,7 +47,8 @@ func (self *ApierV1) GetTPUser(attr AttrGetTPUser, reply *utils.TPUsers) error {
|
||||
return utils.NewErrMandatoryIeMissing(missing...)
|
||||
}
|
||||
usr := &engine.TpUser{
|
||||
Tpid: attr.TPid,
|
||||
Tpid: attr.TPid,
|
||||
Masked: true,
|
||||
}
|
||||
usr.SetId(attr.UserId)
|
||||
if tms, err := self.StorDb.GetTpUsers(usr); err != nil {
|
||||
|
||||
@@ -197,20 +197,21 @@ CREATE TABLE `tp_action_triggers` (
|
||||
`tpid` varchar(64) NOT NULL,
|
||||
`tag` varchar(64) NOT NULL,
|
||||
`unique_id` varchar(64) NOT NULL,
|
||||
`balance_tag` varchar(64) NOT NULL,
|
||||
`balance_type` varchar(24) NOT NULL,
|
||||
`balance_direction` varchar(8) NOT NULL,
|
||||
`threshold_type` char(12) NOT NULL,
|
||||
`threshold_value` DECIMAL(20,4) NOT NULL,
|
||||
`recurrent` BOOLEAN NOT NULL,
|
||||
`min_sleep` varchar(16) NOT NULL,
|
||||
`balance_tag` varchar(64) NOT NULL,
|
||||
`balance_type` varchar(24) NOT NULL,
|
||||
`balance_direction` varchar(8) NOT NULL,
|
||||
`balance_category` varchar(32) NOT NULL,
|
||||
`balance_destination_tags` varchar(64) NOT NULL,
|
||||
`balance_weight` DECIMAL(8,2) NOT NULL,
|
||||
`balance_rating_subject` varchar(64) NOT NULL,
|
||||
`balance_shared_group` varchar(64) NOT NULL,
|
||||
`balance_expiry_time` varchar(24) NOT NULL,
|
||||
`balance_timing_tags` varchar(128) NOT NULL,
|
||||
`balance_rating_subject` varchar(64) NOT NULL,
|
||||
`balance_category` varchar(32) NOT NULL,
|
||||
`balance_shared_group` varchar(64) NOT NULL,
|
||||
`balance_weight` DECIMAL(8,2) NOT NULL,
|
||||
`balance_disabled` BOOL NOT NULL,
|
||||
`min_queued_items` int(11) NOT NULL,
|
||||
`actions_tag` varchar(64) NOT NULL,
|
||||
`weight` DECIMAL(8,2) NOT NULL,
|
||||
|
||||
@@ -192,20 +192,21 @@ CREATE TABLE tp_action_triggers (
|
||||
tpid VARCHAR(64) NOT NULL,
|
||||
tag VARCHAR(64) NOT NULL,
|
||||
unique_id VARCHAR(64) NOT NULL,
|
||||
balance_tag VARCHAR(64) NOT NULL,
|
||||
balance_type VARCHAR(24) NOT NULL,
|
||||
balance_direction VARCHAR(8) NOT NULL,
|
||||
threshold_type char(12) NOT NULL,
|
||||
threshold_value NUMERIC(20,4) NOT NULL,
|
||||
recurrent BOOLEAN NOT NULL,
|
||||
min_sleep VARCHAR(16) NOT NULL,
|
||||
balance_tag VARCHAR(64) NOT NULL,
|
||||
balance_type VARCHAR(24) NOT NULL,
|
||||
balance_direction VARCHAR(8) NOT NULL,
|
||||
balance_category VARCHAR(32) NOT NULL,
|
||||
balance_destination_tags VARCHAR(64) NOT NULL,
|
||||
balance_weight NUMERIC(8,2) NOT NULL,
|
||||
balance_rating_subject VARCHAR(64) NOT NULL,
|
||||
balance_shared_group VARCHAR(64) NOT NULL,
|
||||
balance_expiry_time VARCHAR(24) NOT NULL,
|
||||
balance_timing_tags VARCHAR(128) NOT NULL,
|
||||
balance_rating_subject VARCHAR(64) NOT NULL,
|
||||
balance_category VARCHAR(32) NOT NULL,
|
||||
balance_shared_group VARCHAR(64) NOT NULL,
|
||||
balance_weight NUMERIC(8,2) NOT NULL,
|
||||
balance_disabled BOOL NOT NULL,
|
||||
min_queued_items INTEGER NOT NULL,
|
||||
actions_tag VARCHAR(64) NOT NULL,
|
||||
weight NUMERIC(8,2) NOT NULL,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#Tag[0],UniqueId[1],ThresholdType[2],ThresholdValue[3],Recurrent[4],MinSleep[5],BalanceTag[6],BalanceType[7],BalanceDirection[8],BalanceCategory[9],BalanceDestinationTag[10],BalanceRatingSubject[11],BalanceSharedGroup[12],BalanceExpiryTime[13],BalanceTimingTags[14],BalanceWeight[15],StatsMinQueuedItems[16],ActionsTag[17],Weight[18]
|
||||
CDRST3_WARN_ASR,,*min_asr,45,true,1h,,,,,,,,,,,3,CDRST_LOG,10
|
||||
CDRST3_WARN_ACD,,*min_acd,10,true,1h,,,,,,,,,,,5,CDRST_LOG,10
|
||||
CDRST3_WARN_ACC,,*max_acc,10,true,10m,,,,,,,,,,,5,CDRST_LOG,10
|
||||
CDRST4_WARN_ASR,,*min_asr,30,true,0,,,,,,,,,,,5,CDRST_LOG,10
|
||||
CDRST4_WARN_ACD,,*min_acd,3,true,0,,,,,,,,,,,2,CDRST_LOG,10
|
||||
#Tag[0],UniqueId[1],ThresholdType[2],ThresholdValue[3],Recurrent[4],MinSleep[5],BalanceTag[6],BalanceType[7],BalanceDirection[8],BalanceCategory[9],BalanceDestinationTag[10],BalanceRatingSubject[11],BalanceSharedGroup[12],BalanceExpiryTime[13],BalanceTimingTags[14],BalanceWeight[15],BalanceDisabled[16],StatsMinQueuedItems[17],ActionsTag[18],Weight[19]
|
||||
CDRST3_WARN_ASR,,*min_asr,45,true,1h,,,,,,,,,,,,3,CDRST_LOG,10
|
||||
CDRST3_WARN_ACD,,*min_acd,10,true,1h,,,,,,,,,,,,5,CDRST_LOG,10
|
||||
CDRST3_WARN_ACC,,*max_acc,10,true,10m,,,,,,,,,,,,5,CDRST_LOG,10
|
||||
CDRST4_WARN_ASR,,*min_asr,30,true,0,,,,,,,,,,,,5,CDRST_LOG,10
|
||||
CDRST4_WARN_ACD,,*min_acd,3,true,0,,,,,,,,,,,,2,CDRST_LOG,10
|
||||
|
||||
|
@@ -1,9 +1,9 @@
|
||||
#Tag[0],UniqueId[1],ThresholdType[2],ThresholdValue[3],Recurrent[4],MinSleep[5],BalanceTag[6],BalanceType[7],BalanceDirection[8],BalanceCategory[9],BalanceDestinationTag[10],BalanceRatingSubject[11],BalanceSharedGroup[12],BalanceExpiryTime[13],BalanceTimingTags[14],BalanceWeight[15],StatsMinQueuedItems[16],ActionsTag[17],Weight[18]
|
||||
STANDARD_TRIGGERS,,*min_balance,2,false,0,,*monetary,*out,,,,,,,,,LOG_BALANCE,10
|
||||
STANDARD_TRIGGERS,,*max_balance,20,false,0,,*monetary,*out,,,,,,,,,LOG_BALANCE,10
|
||||
STANDARD_TRIGGERS,,*max_counter,15,false,0,,*monetary,*out,,FS_USERS,,,,,,,LOG_BALANCE,10
|
||||
CDRST1_WARN_ASR,,*min_asr,45,true,1h,,,,,,,,,,,3,CDRST_WARN_HTTP,10
|
||||
CDRST1_WARN_ACD,,*min_acd,10,true,1h,,,,,,,,,,,5,CDRST_WARN_HTTP,10
|
||||
CDRST1_WARN_ACC,,*max_acc,10,true,10m,,,,,,,,,,,5,CDRST_WARN_HTTP,10
|
||||
CDRST2_WARN_ASR,,*min_asr,30,true,0,,,,,,,,,,,5,CDRST_WARN_HTTP,10
|
||||
CDRST2_WARN_ACD,,*min_acd,3,true,0,,,,,,,,,,,2,CDRST_LOG,10
|
||||
#Tag[0],UniqueId[1],ThresholdType[2],ThresholdValue[3],Recurrent[4],MinSleep[5],BalanceTag[6],BalanceType[7],BalanceDirection[8],BalanceCategory[9],BalanceDestinationTag[10],BalanceRatingSubject[11],BalanceSharedGroup[12],BalanceExpiryTime[13],BalanceTimingTags[14],BalanceWeight[15],BalanceDisabled[16],StatsMinQueuedItems[17],ActionsTag[18],Weight[19]
|
||||
STANDARD_TRIGGERS,,*min_balance,2,false,0,,*monetary,*out,,,,,,,,,,LOG_BALANCE,10
|
||||
STANDARD_TRIGGERS,,*max_balance,20,false,0,,*monetary,*out,,,,,,,,,,LOG_BALANCE,10
|
||||
STANDARD_TRIGGERS,,*max_counter,15,false,0,,*monetary,*out,,FS_USERS,,,,,,,,LOG_BALANCE,10
|
||||
CDRST1_WARN_ASR,,*min_asr,45,true,1h,,,,,,,,,,,,3,CDRST_WARN_HTTP,10
|
||||
CDRST1_WARN_ACD,,*min_acd,10,true,1h,,,,,,,,,,,,5,CDRST_WARN_HTTP,10
|
||||
CDRST1_WARN_ACC,,*max_acc,10,true,10m,,,,,,,,,,,,5,CDRST_WARN_HTTP,10
|
||||
CDRST2_WARN_ASR,,*min_asr,30,true,0,,,,,,,,,,,,5,CDRST_WARN_HTTP,10
|
||||
CDRST2_WARN_ACD,,*min_acd,3,true,0,,,,,,,,,,,,2,CDRST_LOG,10
|
||||
|
||||
|
@@ -1,12 +1,12 @@
|
||||
#Tag[0],UniqueId[1],ThresholdType[2],ThresholdValue[3],Recurrent[4],MinSleep[5],BalanceTag[6],BalanceType[7],BalanceDirection[8],BalanceCategory[9],BalanceDestinationId[10],BalanceRatingSubject[11],BalanceSharedGroup[12],BalanceExpiryTime[13],BalanceTimingIds[14],BalanceWeight[15],StatsMinQueuedItems[16],ActionsId[17],Weight[18]
|
||||
STANDARD_TRIGGERS,,*min_balance,2,false,0,,*monetary,*out,,,,,,,,,LOG_WARNING,10
|
||||
STANDARD_TRIGGERS,,*max_counter,5,false,0,,*monetary,*out,,FS_USERS,,,,,,,LOG_WARNING,10
|
||||
STANDARD_TRIGGERS,,*max_balance,20,false,0,,*monetary,*out,,,,,,,,,LOG_WARNING,10
|
||||
STANDARD_TRIGGERS,,*max_balance,100,false,0,,*monetary,*out,,,,,,,,,DISABLE_AND_LOG,10
|
||||
CDRST1_WARN,,*min_asr,45,true,1m,,,,,,,,,,,3,LOG_WARNING,10
|
||||
CDRST1_WARN,,*min_acd,10,true,1m,,,,,,,,,,,5,LOG_WARNING,10
|
||||
CDRST1_WARN,,*max_acc,10,true,1m,,,,,,,,,,,5,LOG_WARNING,10
|
||||
CDRST1001_WARN,,*min_asr,65,true,1m,,,,,,,,,,,3,LOG_WARNING,10
|
||||
CDRST1001_WARN,,*min_acd,10,true,1m,,,,,,,,,,,5,LOG_WARNING,10
|
||||
CDRST1001_WARN,,*max_acc,5,true,1m,,,,,,,,,,,5,LOG_WARNING,10
|
||||
CDRST3_WARN,,*min_acd,60,false,1m,,,,,,,,,,,5,LOG_WARNING,10
|
||||
#Tag[0],UniqueId[1],ThresholdType[2],ThresholdValue[3],Recurrent[4],MinSleep[5],BalanceTag[6],BalanceType[7],BalanceDirection[8],BalanceCategory[9],BalanceDestinationId[10],BalanceRatingSubject[11],BalanceSharedGroup[12],BalanceExpiryTime[13],BalanceTimingIds[14],BalanceWeight[15],BalanceDisabled[16],StatsMinQueuedItems[17],ActionsId[18],Weight[19]
|
||||
STANDARD_TRIGGERS,,*min_balance,2,false,0,,*monetary,*out,,,,,,,,,,LOG_WARNING,10
|
||||
STANDARD_TRIGGERS,,*max_counter,5,false,0,,*monetary,*out,,FS_USERS,,,,,,,,LOG_WARNING,10
|
||||
STANDARD_TRIGGERS,,*max_balance,20,false,0,,*monetary,*out,,,,,,,,,,LOG_WARNING,10
|
||||
STANDARD_TRIGGERS,,*max_balance,100,false,0,,*monetary,*out,,,,,,,,,,DISABLE_AND_LOG,10
|
||||
CDRST1_WARN,,*min_asr,45,true,1m,,,,,,,,,,,,3,LOG_WARNING,10
|
||||
CDRST1_WARN,,*min_acd,10,true,1m,,,,,,,,,,,,5,LOG_WARNING,10
|
||||
CDRST1_WARN,,*max_acc,10,true,1m,,,,,,,,,,,,5,LOG_WARNING,10
|
||||
CDRST1001_WARN,,*min_asr,65,true,1m,,,,,,,,,,,,3,LOG_WARNING,10
|
||||
CDRST1001_WARN,,*min_acd,10,true,1m,,,,,,,,,,,,5,LOG_WARNING,10
|
||||
CDRST1001_WARN,,*max_acc,5,true,1m,,,,,,,,,,,,5,LOG_WARNING,10
|
||||
CDRST3_WARN,,*min_acd,60,false,1m,,,,,,,,,,,,5,LOG_WARNING,10
|
||||
|
||||
|
@@ -46,6 +46,7 @@ type ActionTrigger struct {
|
||||
BalanceRatingSubject string // filter for balance
|
||||
BalanceCategory string // filter for balance
|
||||
BalanceSharedGroup string // filter for balance
|
||||
BalanceDisabled bool // filter for balance
|
||||
Weight float64
|
||||
ActionsId string
|
||||
MinQueuedItems int // Trigger actions only if this number is hit (stats only)
|
||||
@@ -111,7 +112,7 @@ func (at *ActionTrigger) Match(a *Action) bool {
|
||||
}
|
||||
id := a.BalanceType == "" || at.BalanceType == a.BalanceType
|
||||
direction := a.Direction == "" || at.BalanceDirection == a.Direction
|
||||
thresholdType, thresholdValue, destinationId, weight, ratingSubject, category, sharedGroup := true, true, true, true, true, true, true
|
||||
thresholdType, thresholdValue, destinationId, weight, ratingSubject, category, sharedGroup, disabled := true, true, true, true, true, true, true, true
|
||||
if a.ExtraParameters != "" {
|
||||
t := struct {
|
||||
ThresholdType string
|
||||
@@ -121,6 +122,7 @@ func (at *ActionTrigger) Match(a *Action) bool {
|
||||
BalanceRatingSubject string
|
||||
BalanceCategory string
|
||||
BalanceSharedGroup string
|
||||
BalanceDisabled bool
|
||||
}{}
|
||||
json.Unmarshal([]byte(a.ExtraParameters), &t)
|
||||
thresholdType = t.ThresholdType == "" || at.ThresholdType == t.ThresholdType
|
||||
@@ -130,8 +132,9 @@ func (at *ActionTrigger) Match(a *Action) bool {
|
||||
ratingSubject = t.BalanceRatingSubject == "" || at.BalanceRatingSubject == t.BalanceRatingSubject
|
||||
category = t.BalanceCategory == "" || at.BalanceCategory == t.BalanceCategory
|
||||
sharedGroup = t.BalanceSharedGroup == "" || at.BalanceSharedGroup == t.BalanceSharedGroup
|
||||
disabled = at.BalanceDisabled == t.BalanceDisabled
|
||||
}
|
||||
return id && direction && thresholdType && thresholdValue && destinationId && weight && ratingSubject && category && sharedGroup
|
||||
return id && direction && thresholdType && thresholdValue && destinationId && weight && ratingSubject && category && sharedGroup && disabled
|
||||
}
|
||||
|
||||
func (at *ActionTrigger) sortDestinationIds() string {
|
||||
|
||||
@@ -178,16 +178,16 @@ POST_AT,NEG,*asap,10
|
||||
`
|
||||
|
||||
actionTriggers = `
|
||||
STANDARD_TRIGGER,st0,*min_counter,10,false,0,,*voice,*out,,GERMANY_O2,,,,,,,SOME_1,10
|
||||
STANDARD_TRIGGER,st1,*max_balance,200,false,0,,*voice,*out,,GERMANY,,,,,,,SOME_2,10
|
||||
STANDARD_TRIGGERS,,*min_balance,2,false,0,,*monetary,*out,,,,,,,,,LOG_WARNING,10
|
||||
STANDARD_TRIGGERS,,*max_balance,20,false,0,,*monetary,*out,,,,,,,,,LOG_WARNING,10
|
||||
STANDARD_TRIGGERS,,*max_counter,5,false,0,,*monetary,*out,,FS_USERS,,,,,,,LOG_WARNING,10
|
||||
CDRST1_WARN_ASR,,*min_asr,45,true,1h,,,,,,,,,,,3,CDRST_WARN_HTTP,10
|
||||
CDRST1_WARN_ACD,,*min_acd,10,true,1h,,,,,,,,,,,5,CDRST_WARN_HTTP,10
|
||||
CDRST1_WARN_ACC,,*max_acc,10,true,10m,,,,,,,,,,,5,CDRST_WARN_HTTP,10
|
||||
CDRST2_WARN_ASR,,*min_asr,30,true,0,,,,,,,,,,,5,CDRST_WARN_HTTP,10
|
||||
CDRST2_WARN_ACD,,*min_acd,3,true,0,,,,,,,,,,,5,CDRST_WARN_HTTP,10
|
||||
STANDARD_TRIGGER,st0,*min_counter,10,false,0,,*voice,*out,,GERMANY_O2,,,,,,,,SOME_1,10
|
||||
STANDARD_TRIGGER,st1,*max_balance,200,false,0,,*voice,*out,,GERMANY,,,,,,,,SOME_2,10
|
||||
STANDARD_TRIGGERS,,*min_balance,2,false,0,,*monetary,*out,,,,,,,,,,LOG_WARNING,10
|
||||
STANDARD_TRIGGERS,,*max_balance,20,false,0,,*monetary,*out,,,,,,,,,,LOG_WARNING,10
|
||||
STANDARD_TRIGGERS,,*max_counter,5,false,0,,*monetary,*out,,FS_USERS,,,,,,,,LOG_WARNING,10
|
||||
CDRST1_WARN_ASR,,*min_asr,45,true,1h,,,,,,,,,,,,3,CDRST_WARN_HTTP,10
|
||||
CDRST1_WARN_ACD,,*min_acd,10,true,1h,,,,,,,,,,,,5,CDRST_WARN_HTTP,10
|
||||
CDRST1_WARN_ACC,,*max_acc,10,true,10m,,,,,,,,,,,,5,CDRST_WARN_HTTP,10
|
||||
CDRST2_WARN_ASR,,*min_asr,30,true,0,,,,,,,,,,,,5,CDRST_WARN_HTTP,10
|
||||
CDRST2_WARN_ACD,,*min_acd,3,true,0,,,,,,,,,,,,5,CDRST_WARN_HTTP,10
|
||||
`
|
||||
accountActions = `
|
||||
vdf,minitsboy,*out,MORE_MINUTES,STANDARD_TRIGGER,,
|
||||
|
||||
@@ -231,6 +231,7 @@ func APItoModelActionTrigger(ats *utils.TPActionTriggers) (result []TpActionTrig
|
||||
BalanceRatingSubject: at.BalanceRatingSubject,
|
||||
BalanceCategory: at.BalanceCategory,
|
||||
BalanceSharedGroup: at.BalanceSharedGroup,
|
||||
BalanceDisabled: at.BalanceDisabled,
|
||||
MinQueuedItems: at.MinQueuedItems,
|
||||
ActionsTag: at.ActionsId,
|
||||
Weight: at.Weight,
|
||||
|
||||
@@ -436,6 +436,7 @@ func (tps TpActionTriggers) GetActionTriggers() (map[string][]*utils.TPActionTri
|
||||
BalanceRatingSubject: tpAt.BalanceRatingSubject,
|
||||
BalanceCategory: tpAt.BalanceCategory,
|
||||
BalanceSharedGroup: tpAt.BalanceSharedGroup,
|
||||
BalanceDisabled: tpAt.BalanceDisabled,
|
||||
Weight: tpAt.Weight,
|
||||
ActionsId: tpAt.ActionsTag,
|
||||
MinQueuedItems: tpAt.MinQueuedItems,
|
||||
|
||||
@@ -561,6 +561,7 @@ func TestTPActionPlanAsExportSlice(t *testing.T) {
|
||||
BalanceRatingSubject: "special1",
|
||||
BalanceCategory: "call",
|
||||
BalanceSharedGroup: "SHARED_1",
|
||||
BalanceDisabled: false,
|
||||
MinQueuedItems: 0,
|
||||
ActionsId: "LOG_WARNING",
|
||||
Weight: 10},
|
||||
@@ -579,14 +580,15 @@ func TestTPActionPlanAsExportSlice(t *testing.T) {
|
||||
BalanceRatingSubject: "special1",
|
||||
BalanceCategory: "call",
|
||||
BalanceSharedGroup: "SHARED_1",
|
||||
BalanceDisabled: false,
|
||||
MinQueuedItems: 0,
|
||||
ActionsId: "LOG_WARNING",
|
||||
Weight: 10},
|
||||
},
|
||||
}
|
||||
expectedSlc := [][]string{
|
||||
[]string{"STANDARD_TRIGGERS", "", "*min_balance", "2", "false", "0", "b1", "*monetary", "*out", "call", "", "special1", "SHARED_1", "*never", "T1", "0", "0", "LOG_WARNING", "10"},
|
||||
[]string{"STANDARD_TRIGGERS", "", "*max_counter", "5", "false", "0", "b2", "*monetary", "*out", "call", "FS_USERS", "special1", "SHARED_1", "*never", "T1", "0", "0", "LOG_WARNING", "10"},
|
||||
[]string{"STANDARD_TRIGGERS", "", "*min_balance", "2", "false", "0", "b1", "*monetary", "*out", "call", "", "special1", "SHARED_1", "*never", "T1", "0", "false", "0", "LOG_WARNING", "10"},
|
||||
[]string{"STANDARD_TRIGGERS", "", "*max_counter", "5", "false", "0", "b2", "*monetary", "*out", "call", "FS_USERS", "special1", "SHARED_1", "*never", "T1", "0", "false", "0", "LOG_WARNING", "10"},
|
||||
}
|
||||
ms := APItoModelActionTrigger(at)
|
||||
var slc [][]string
|
||||
|
||||
@@ -201,9 +201,10 @@ type TpActionTrigger struct {
|
||||
BalanceExpiryTime string `index:"13" re:"\*\w+\s*|\+\d+[smh]\s*|\d+\s*"`
|
||||
BalanceTimingTags string `index:"14" re:"[0-9A-Za-z_;]*|\*any"`
|
||||
BalanceWeight float64 `index:"15" re:"\d+\.?\d*"`
|
||||
MinQueuedItems int `index:"16" re:"\d+"`
|
||||
ActionsTag string `index:"17" re:"\w+"`
|
||||
Weight float64 `index:"18" re:"\d+\.?\d*"`
|
||||
BalanceDisabled bool `index:"16" re:""`
|
||||
MinQueuedItems int `index:"17" re:"\d+"`
|
||||
ActionsTag string `index:"18" re:"\w+"`
|
||||
Weight float64 `index:"19" re:"\d+\.?\d*"`
|
||||
CreatedAt time.Time
|
||||
}
|
||||
|
||||
|
||||
@@ -482,6 +482,7 @@ type TPActionTrigger struct {
|
||||
BalanceRatingSubject string // filter for balance
|
||||
BalanceCategory string // filter for balance
|
||||
BalanceSharedGroup string // filter for balance
|
||||
BalanceDisabled bool // filter for balance
|
||||
MinQueuedItems int // Trigger actions only if this number is hit (stats only)
|
||||
ActionsId string // Actions which will execute on threshold reached
|
||||
Weight float64 // weight
|
||||
|
||||
Reference in New Issue
Block a user