Expanding CallStatsConfig

This commit is contained in:
DanB
2014-06-05 20:04:44 +02:00
parent c4a463606a
commit 6b1a67d4f5
2 changed files with 18 additions and 3 deletions

View File

@@ -23,9 +23,12 @@ import (
)
type CdrStatsConfig struct {
RatedCdrs bool // Build the stats for rated cdrs instead of raw ones
QueuedItems int64 // Number of items in the stats buffer
SetupInterval []time.Time // 2 or less items (>= start interval,< stop_interval)
Id string // Config id, unique per config instance
RatedCdrs bool // Build the stats for rated cdrs instead of raw ones
QueuedItems int64 // Number of items in the stats buffer
TimeWindow time.Duration // Will only keep the CDRs who's call setup time is not older than time.Now()-TimeWindow
ProcessedStats []string // ASR, ACD, ACC
SetupInterval []time.Time // 2 or less items (>= start interval,< stop_interval)
TOR []string
CdrHost []string
CdrSource []string
@@ -39,4 +42,14 @@ type CdrStatsConfig struct {
UsageInterval []time.Duration // 2 or less items (>= Usage, <Usage)
MediationRunIds []string
CostInterval []float64 // 2 or less items, (>=Cost, <Cost)
CdrStatsTriggers []*CdrStatsTrigger
}
type CdrStatsTrigger struct {
ThresholdType string // *min_asr, *max_asr, *min_acd, *max_acd, *min_acc, *max_acc
ThresholdValue float64
MinQueuedItems int // Trigger actions only if this number is hit
ActionsId string // Id of actions to be executed
Recurrent bool // Re-enable automatically once executed
Weight float64
}

View File

@@ -120,6 +120,8 @@ const (
CDR_IMPORT = "cdr_import"
CDR_EXPORT = "cdr_export"
CDRFIELD = "cdrfield"
ASR = "ASR"
ACD = "ACD"
)
var (