mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Adding PddInterval in CdrStats
This commit is contained in:
@@ -320,6 +320,7 @@ CREATE TABLE tp_cdrstats (
|
||||
`accounts` varchar(24) NOT NULL,
|
||||
`subjects` varchar(64) NOT NULL,
|
||||
`destination_prefixes` varchar(64) NOT NULL,
|
||||
`pdd_interval` varchar(64) NOT NULL,
|
||||
`usage_interval` varchar(64) NOT NULL,
|
||||
`suppliers` varchar(64) NOT NULL,
|
||||
`disconnect_causes` varchar(64) NOT NULL,
|
||||
|
||||
@@ -315,6 +315,7 @@ CREATE TABLE tp_cdrstats (
|
||||
accounts VARCHAR(24) NOT NULL,
|
||||
subjects VARCHAR(64) NOT NULL,
|
||||
destination_prefixes VARCHAR(64) NOT NULL,
|
||||
pdd_interval VARCHAR(64) NOT NULL,
|
||||
usage_interval VARCHAR(64) NOT NULL,
|
||||
suppliers VARCHAR(64) NOT NULL,
|
||||
disconnect_causes VARCHAR(64) NOT NULL,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#Id[0],QueueLength[1],TimeWindow[2],Metric[3],SetupInterval[4],TOR[5],CdrHost[6],CdrSource[7],ReqType[8],Direction[9],Tenant[10],Category[11],Account[12],Subject[13],DestinationPrefix[14],UsageInterval[15],Supplier[16],DisconnectCause[17],MediationRunIds[18],RatedAccount[19],RatedSubject[20],CostInterval[21],Triggers[22]
|
||||
CDRST3,5,60m,ASR,2014-07-29T15:00:00Z;2014-07-29T16:00:00Z,*voice,87.139.12.167,FS_JSON,rated,*out,cgrates.org,call,dan,dan,+49,5m;10m,,,default,rif,rif,0;2,CDRST3_WARN_ASR
|
||||
CDRST3,,,ACD,,,,,,,,,,,,,,,,,,,CDRST3_WARN_ACD
|
||||
CDRST3,,,ACC,,,,,,,,,,,,,,,,,,,CDRST3_WARN_ACC
|
||||
CDRST4,10,0,ASR,,,,,,,cgrates.org,call,,,,,,,,,,,CDRST4_WARN_ASR
|
||||
CDRST4,,,ACD,,,,,,,,,,,,,,,,,,,CDRST4_WARN_ACD
|
||||
#Id[0],QueueLength[1],TimeWindow[2],Metric[3],SetupInterval[4],TOR[5],CdrHost[6],CdrSource[7],ReqType[8],Direction[9],Tenant[10],Category[11],Account[12],Subject[13],DestinationPrefix[14],PddInterval[15],UsageInterval[16],Supplier[17],DisconnectCause[18],MediationRunIds[19],RatedAccount[20],RatedSubject[21],CostInterval[22],Triggers[23]
|
||||
CDRST3,5,60m,ASR,2014-07-29T15:00:00Z;2014-07-29T16:00:00Z,*voice,87.139.12.167,FS_JSON,rated,*out,cgrates.org,call,dan,dan,+49,,5m;10m,,,default,rif,rif,0;2,CDRST3_WARN_ASR
|
||||
CDRST3,,,ACD,,,,,,,,,,,,,,,,,,,,CDRST3_WARN_ACD
|
||||
CDRST3,,,ACC,,,,,,,,,,,,,,,,,,,,CDRST3_WARN_ACC
|
||||
CDRST4,10,0,ASR,,,,,,,cgrates.org,call,,,,,,,,,,,,CDRST4_WARN_ASR
|
||||
CDRST4,,,ACD,,,,,,,,,,,,,,,,,,,,CDRST4_WARN_ACD
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#Id[0],QueueLength[1],TimeWindow[2],Metric[3],SetupInterval[4],TOR[5],CdrHost[6],CdrSource[7],ReqType[8],Direction[9],Tenant[10],Category[11],Account[12],Subject[13],DestinationPrefix[14],UsageInterval[15],Supplier[16],DisconnectCause[17],MediationRunIds[18],RatedAccount[19],RatedSubject[20],CostInterval[21],Triggers[22]
|
||||
CDRST1,5,60m,ASR,2014-07-29T15:00:00Z;2014-07-29T16:00:00Z,*voice,87.139.12.167,FS_JSON,rated,*out,cgrates.org,call,dan,dan,+49,5m;10m,,,default,rif,rif,0;2,CDRST1_WARN_ASR
|
||||
CDRST1,,,ACD,,,,,,,,,,,,,,,,,,,CDRST1_WARN_ACD
|
||||
CDRST1,,,ACC,,,,,,,,,,,,,,,,,,,CDRST1_WARN_ACC
|
||||
CDRST2,10,10m,ASR,,,,,,,cgrates.org,call,,,,,,,,,,,CDRST2_WARN_ASR
|
||||
CDRST2,,,ACD,,,,,,,,,,,,,,,,,,,CDRST2_WARN_ACD
|
||||
#Id[0],QueueLength[1],TimeWindow[2],Metric[3],SetupInterval[4],TOR[5],CdrHost[6],CdrSource[7],ReqType[8],Direction[9],Tenant[10],Category[11],Account[12],Subject[13],DestinationPrefix[14],PddInterval[15],UsageInterval[16],Supplier[17],DisconnectCause[18],MediationRunIds[19],RatedAccount[20],RatedSubject[21],CostInterval[22],Triggers[23]
|
||||
CDRST1,5,60m,ASR,2014-07-29T15:00:00Z;2014-07-29T16:00:00Z,*voice,87.139.12.167,FS_JSON,rated,*out,cgrates.org,call,dan,dan,+49,,5m;10m,,,default,rif,rif,0;2,CDRST1_WARN_ASR
|
||||
CDRST1,,,ACD,,,,,,,,,,,,,,,,,,,,CDRST1_WARN_ACD
|
||||
CDRST1,,,ACC,,,,,,,,,,,,,,,,,,,,CDRST1_WARN_ACC
|
||||
CDRST2,10,10m,ASR,,,,,,,cgrates.org,call,,,,,,,,,,,,CDRST2_WARN_ASR
|
||||
CDRST2,,,ACD,,,,,,,,,,,,,,,,,,,,CDRST2_WARN_ACD
|
||||
|
@@ -1,24 +1,24 @@
|
||||
#Id[0],QueueLength[1],TimeWindow[2],Metric[3],SetupInterval[4],TOR[5],CdrHost[6],CdrSource[7],ReqType[8],Direction[9],Tenant[10],Category[11],Account[12],Subject[13],DestinationPrefix[14],UsageInterval[15],Supplier[16],DisconnectCause[17],MediationRunIds[18],RatedAccount[19],RatedSubject[20],CostInterval[21],Triggers[22]
|
||||
CDRST1,10,0,ASR,,,,,,,cgrates.org,,,,,,,,*default,,,,CDRST1_WARN
|
||||
CDRST1,,,ACD,,,,,,,,,,,,,,,,,,,
|
||||
CDRST1,,,ACC,,,,,,,,,,,,,,,,,,,
|
||||
CDRST1,,,TCD,,,,,,,,,,,,,,,,,,,
|
||||
CDRST1,,,TCC,,,,,,,,,,,,,,,,,,,
|
||||
CDRST_1001,10,10m,ASR,,,,,,,cgrates.org,,,1001,,,,,*default,,,,CDRST1001_WARN
|
||||
CDRST_1001,,,ACD,,,,,,,,,,,,,,,,,,,
|
||||
CDRST_1001,,,ACC,,,,,,,,,,,,,,,,,,,
|
||||
CDRST_1002,10,10m,ASR,,,,,,,cgrates.org,,,1002,,,,,*default,,,,CDRST1001_WARN
|
||||
CDRST_1002,,,ACD,,,,,,,,,,,,,,,,,,,
|
||||
CDRST_1002,,,ACC,,,,,,,,,,,,,,,,,,,
|
||||
CDRST_1003,,,ASR,,,,,,,cgrates.org,,,,1003,,,,*default,,,,CDRST3_WARN
|
||||
CDRST_1003,,,ACD,,,,,,,,,,,,,,,,,,,
|
||||
STATS_SUPPL1,,,ACD,,,,,,,,,,,,,suppl1,,,,,,
|
||||
STATS_SUPPL1,,,ASR,,,,,,,,,,,,,suppl1,,,,,,
|
||||
STATS_SUPPL1,,,ACC,,,,,,,,,,,,,suppl1,,,,,,
|
||||
STATS_SUPPL1,,,TCD,,,,,,,,,,,,,suppl1,,,,,,
|
||||
STATS_SUPPL1,,,TCC,,,,,,,,,,,,,suppl1,,,,,,
|
||||
STATS_SUPPL2,,,ACD,,,,,,,,,,,,,suppl2,,,,,,
|
||||
STATS_SUPPL2,,,ASR,,,,,,,,,,,,,suppl2,,,,,,
|
||||
STATS_SUPPL2,,,ACC,,,,,,,,,,,,,suppl2,,,,,,
|
||||
STATS_SUPPL2,,,TCD,,,,,,,,,,,,,suppl2,,,,,,
|
||||
STATS_SUPPL2,,,TCC,,,,,,,,,,,,,suppl2,,,,,,
|
||||
#Id[0],QueueLength[1],TimeWindow[2],Metric[3],SetupInterval[4],TOR[5],CdrHost[6],CdrSource[7],ReqType[8],Direction[9],Tenant[10],Category[11],Account[12],Subject[13],DestinationPrefix[14],PddInterval[15],UsageInterval[16],Supplier[17],DisconnectCause[18],MediationRunIds[19],RatedAccount[20],RatedSubject[21],CostInterval[22],Triggers[23]
|
||||
CDRST1,10,0,ASR,,,,,,,cgrates.org,,,,,,,,,*default,,,,CDRST1_WARN
|
||||
CDRST1,,,ACD,,,,,,,,,,,,,,,,,,,,
|
||||
CDRST1,,,ACC,,,,,,,,,,,,,,,,,,,,
|
||||
CDRST1,,,TCD,,,,,,,,,,,,,,,,,,,,
|
||||
CDRST1,,,TCC,,,,,,,,,,,,,,,,,,,,
|
||||
CDRST_1001,10,10m,ASR,,,,,,,cgrates.org,,,1001,,,,,,*default,,,,CDRST1001_WARN
|
||||
CDRST_1001,,,ACD,,,,,,,,,,,,,,,,,,,,
|
||||
CDRST_1001,,,ACC,,,,,,,,,,,,,,,,,,,,
|
||||
CDRST_1002,10,10m,ASR,,,,,,,cgrates.org,,,1002,,,,,,*default,,,,CDRST1001_WARN
|
||||
CDRST_1002,,,ACD,,,,,,,,,,,,,,,,,,,,
|
||||
CDRST_1002,,,ACC,,,,,,,,,,,,,,,,,,,,
|
||||
CDRST_1003,,,ASR,,,,,,,cgrates.org,,,,1003,,,,,*default,,,,CDRST3_WARN
|
||||
CDRST_1003,,,ACD,,,,,,,,,,,,,,,,,,,,
|
||||
STATS_SUPPL1,,,ACD,,,,,,,,,,,,,,suppl1,,,,,,
|
||||
STATS_SUPPL1,,,ASR,,,,,,,,,,,,,,suppl1,,,,,,
|
||||
STATS_SUPPL1,,,ACC,,,,,,,,,,,,,,suppl1,,,,,,
|
||||
STATS_SUPPL1,,,TCD,,,,,,,,,,,,,,suppl1,,,,,,
|
||||
STATS_SUPPL1,,,TCC,,,,,,,,,,,,,,suppl1,,,,,,
|
||||
STATS_SUPPL2,,,ACD,,,,,,,,,,,,,,suppl2,,,,,,
|
||||
STATS_SUPPL2,,,ASR,,,,,,,,,,,,,,suppl2,,,,,,
|
||||
STATS_SUPPL2,,,ACC,,,,,,,,,,,,,,suppl2,,,,,,
|
||||
STATS_SUPPL2,,,TCD,,,,,,,,,,,,,,suppl2,,,,,,
|
||||
STATS_SUPPL2,,,TCC,,,,,,,,,,,,,,suppl2,,,,,,
|
||||
|
||||
|
@@ -198,12 +198,12 @@ vdf,emptyY,*out,TOPUP_EMPTY_AT,
|
||||
*out,cgrates.org,call,dan,*any,extra1,,,,,,rif2,rif2,,,,,,
|
||||
`
|
||||
cdrStats = `
|
||||
#Id[0],QueueLength[1],TimeWindow[2],Metric[3],SetupInterval[4],TOR[5],CdrHost[6],CdrSource[7],ReqType[8],Direction[9],Tenant[10],Category[11],Account[12],Subject[13],DestinationPrefix[14],UsageInterval[15],Supplier[16],DisconnectCause[17],MediationRunIds[18],RatedAccount[19],RatedSubject[20],CostInterval[21],Triggers[22]
|
||||
CDRST1,5,60m,ASR,2014-07-29T15:00:00Z;2014-07-29T16:00:00Z,*voice,87.139.12.167,FS_JSON,*rated,*out,cgrates.org,call,dan,dan,49,5m;10m,suppl1,NORMAL_CLEARING,default,rif,rif,0;2,STANDARD_TRIGGERS
|
||||
CDRST1,,,ACD,,,,,,,,,,,,,,,,,,,STANDARD_TRIGGER
|
||||
CDRST1,,,ACC,,,,,,,,,,,,,,,,,,,
|
||||
CDRST2,10,10m,ASR,,,,,,,cgrates.org,call,,,,,,,,,,,
|
||||
CDRST2,,,ACD,,,,,,,,,,,,,,,,,,,
|
||||
#Id[0],QueueLength[1],TimeWindow[2],Metric[3],SetupInterval[4],TOR[5],CdrHost[6],CdrSource[7],ReqType[8],Direction[9],Tenant[10],Category[11],Account[12],Subject[13],DestinationPrefix[14],PddInterval[15],UsageInterval[16],Supplier[17],DisconnectCause[18],MediationRunIds[19],RatedAccount[20],RatedSubject[21],CostInterval[22],Triggers[23]CDRST1,5,60m,ASR,2014-07-29T15:00:00Z;2014-07-29T16:00:00Z,*voice,87.139.12.167,FS_JSON,*rated,*out,cgrates.org,call,dan,dan,49,5m;10m,suppl1,NORMAL_CLEARING,default,rif,rif,0;2,STANDARD_TRIGGERS
|
||||
CDRST1,5,60m,ASR,2014-07-29T15:00:00Z;2014-07-29T16:00:00Z,*voice,87.139.12.167,FS_JSON,*rated,*out,cgrates.org,call,dan,dan,49,3m;7m,5m;10m,suppl1,NORMAL_CLEARING,default,rif,rif,0;2,STANDARD_TRIGGERS
|
||||
CDRST1,,,ACD,,,,,,,,,,,,,,,,,,,,STANDARD_TRIGGER
|
||||
CDRST1,,,ACC,,,,,,,,,,,,,,,,,,,,
|
||||
CDRST2,10,10m,ASR,,,,,,,cgrates.org,call,,,,,,,,,,,,
|
||||
CDRST2,,,ACD,,,,,,,,,,,,,,,,,,,,
|
||||
`
|
||||
)
|
||||
|
||||
@@ -1063,6 +1063,7 @@ func TestLoadCdrStats(t *testing.T) {
|
||||
Account: []string{"dan"},
|
||||
Subject: []string{"dan"},
|
||||
DestinationPrefix: []string{"49"},
|
||||
PddInterval: []time.Duration{3 * time.Minute, 7 * time.Minute},
|
||||
UsageInterval: []time.Duration{5 * time.Minute, 10 * time.Minute},
|
||||
Supplier: []string{"suppl1"},
|
||||
DisconnectCause: []string{"NORMAL_CLEARING"},
|
||||
|
||||
@@ -336,6 +336,7 @@ func APItoModelCdrStat(stats *utils.TPCdrStats) (result []TpCdrstat) {
|
||||
Accounts: st.Accounts,
|
||||
Subjects: st.Subjects,
|
||||
DestinationPrefixes: st.DestinationPrefixes,
|
||||
PddInterval: st.PddInterval,
|
||||
UsageInterval: st.UsageInterval,
|
||||
Suppliers: st.Suppliers,
|
||||
DisconnectCauses: st.DisconnectCauses,
|
||||
|
||||
@@ -516,6 +516,7 @@ func (tps TpCdrStats) GetCdrStats() (map[string][]*utils.TPCdrStat, error) {
|
||||
Accounts: tpCs.Accounts,
|
||||
Subjects: tpCs.Subjects,
|
||||
DestinationPrefixes: tpCs.DestinationPrefixes,
|
||||
PddInterval: tpCs.PddInterval,
|
||||
UsageInterval: tpCs.UsageInterval,
|
||||
Suppliers: tpCs.Suppliers,
|
||||
DisconnectCauses: tpCs.DisconnectCauses,
|
||||
@@ -602,6 +603,31 @@ func UpdateCdrStats(cs *CdrStats, triggers ActionTriggerPriotityList, tpCs *util
|
||||
if tpCs.DestinationPrefixes != "" {
|
||||
cs.DestinationPrefix = append(cs.DestinationPrefix, tpCs.DestinationPrefixes)
|
||||
}
|
||||
if tpCs.PddInterval != "" {
|
||||
pdds := strings.Split(tpCs.PddInterval, utils.INFIELD_SEP)
|
||||
if len(pdds) > 0 {
|
||||
if sPdd, err := time.ParseDuration(pdds[0]); err == nil {
|
||||
if len(cs.PddInterval) < 1 {
|
||||
cs.PddInterval = append(cs.PddInterval, sPdd)
|
||||
} else {
|
||||
cs.PddInterval[0] = sPdd
|
||||
}
|
||||
} else {
|
||||
log.Printf("Error parsing PddInterval %v for cdrs stats %v", tpCs.PddInterval, cs.Id)
|
||||
}
|
||||
}
|
||||
if len(pdds) > 1 {
|
||||
if ePdd, err := time.ParseDuration(pdds[1]); err == nil {
|
||||
if len(cs.PddInterval) < 2 {
|
||||
cs.PddInterval = append(cs.PddInterval, ePdd)
|
||||
} else {
|
||||
cs.PddInterval[1] = ePdd
|
||||
}
|
||||
} else {
|
||||
log.Printf("Error parsing UsageInterval %v for cdrs stats %v", tpCs.PddInterval, cs.Id)
|
||||
}
|
||||
}
|
||||
}
|
||||
if tpCs.UsageInterval != "" {
|
||||
durations := strings.Split(tpCs.UsageInterval, utils.INFIELD_SEP)
|
||||
if len(durations) > 0 {
|
||||
|
||||
@@ -9,16 +9,16 @@ import (
|
||||
|
||||
func TestModelHelperCsvLoad(t *testing.T) {
|
||||
l, err := csvLoad(TpDestination{}, []string{"TEST_DEST", "+492"})
|
||||
tpd := l.(TpDestination)
|
||||
if err != nil || tpd.Tag != "TEST_DEST" || tpd.Prefix != "+492" {
|
||||
tpd, ok := l.(TpDestination)
|
||||
if err != nil || !ok || tpd.Tag != "TEST_DEST" || tpd.Prefix != "+492" {
|
||||
t.Errorf("model load failed: %+v", tpd)
|
||||
}
|
||||
}
|
||||
|
||||
func TestModelHelperCsvLoadInt(t *testing.T) {
|
||||
l, err := csvLoad(TpCdrstat{}, []string{"CDRST1", "5", "60m", "ASR", "2014-07-29T15:00:00Z;2014-07-29T16:00:00Z", "*voice", "87.139.12.167", "FS_JSON", "*rated", "*out", "cgrates.org", "call", "dan", "dan", "49", "5m;10m", "suppl1", "NORMAL_CLEARING", "default", "rif", "rif", "0;2", "STANDARD_TRIGGERS"})
|
||||
tpd := l.(TpCdrstat)
|
||||
if err != nil || tpd.QueueLength != 5 {
|
||||
l, err := csvLoad(TpCdrstat{}, []string{"CDRST1", "5", "60m", "ASR", "2014-07-29T15:00:00Z;2014-07-29T16:00:00Z", "*voice", "87.139.12.167", "FS_JSON", "*rated", "*out", "cgrates.org", "call", "dan", "dan", "49", "3m;7m", "5m;10m", "suppl1", "NORMAL_CLEARING", "default", "rif", "rif", "0;2", "STANDARD_TRIGGERS"})
|
||||
tpd, ok := l.(TpCdrstat)
|
||||
if err != nil || !ok || tpd.QueueLength != 5 {
|
||||
t.Errorf("model load failed: %+v", tpd)
|
||||
}
|
||||
}
|
||||
@@ -389,6 +389,7 @@ func TestTPCdrStatsAsExportSlice(t *testing.T) {
|
||||
Accounts: "dan",
|
||||
Subjects: "dan",
|
||||
DestinationPrefixes: "49",
|
||||
PddInterval: "3m;7m",
|
||||
UsageInterval: "5m;10m",
|
||||
Suppliers: "supplier1",
|
||||
DisconnectCauses: "NORMAL_CLEARNING",
|
||||
@@ -412,6 +413,7 @@ func TestTPCdrStatsAsExportSlice(t *testing.T) {
|
||||
Accounts: "dan",
|
||||
Subjects: "dan",
|
||||
DestinationPrefixes: "49",
|
||||
PddInterval: "3m;7m",
|
||||
UsageInterval: "5m;10m",
|
||||
Suppliers: "supplier1",
|
||||
DisconnectCauses: "NORMAL_CLEARNING",
|
||||
@@ -424,9 +426,9 @@ func TestTPCdrStatsAsExportSlice(t *testing.T) {
|
||||
}
|
||||
expectedSlc := [][]string{
|
||||
[]string{"CDRST1", "5", "60m", "ASR;ACD", "2014-07-29T15:00:00Z;2014-07-29T16:00:00Z", "*voice", "87.139.12.167", "FS_JSON", utils.META_RATED, "*out", "cgrates.org", "call",
|
||||
"dan", "dan", "49", "5m;10m", "supplier1", "NORMAL_CLEARNING", "default", "rif", "rif", "0;2", "STANDARD_TRIGGERS"},
|
||||
"dan", "dan", "49", "3m;7m", "5m;10m", "supplier1", "NORMAL_CLEARNING", "default", "rif", "rif", "0;2", "STANDARD_TRIGGERS"},
|
||||
[]string{"CDRST1", "5", "60m", "ASR", "2014-07-29T15:00:00Z;2014-07-29T16:00:00Z", "*voice", "87.139.12.167", "FS_JSON", utils.META_RATED, "*out", "cgrates.org", "call",
|
||||
"dan", "dan", "49", "5m;10m", "supplier1", "NORMAL_CLEARNING", "default", "dan", "dan", "0;2", "STANDARD_TRIGGERS"},
|
||||
"dan", "dan", "49", "3m;7m", "5m;10m", "supplier1", "NORMAL_CLEARNING", "default", "dan", "dan", "0;2", "STANDARD_TRIGGERS"},
|
||||
}
|
||||
ms := APItoModelCdrStat(cdrStats)
|
||||
var slc [][]string
|
||||
|
||||
@@ -306,14 +306,15 @@ type TpCdrstat struct {
|
||||
Accounts string `index:"12" re:""`
|
||||
Subjects string `index:"13" re:""`
|
||||
DestinationPrefixes string `index:"14" re:""`
|
||||
UsageInterval string `index:"15" re:""`
|
||||
Suppliers string `index:"16" re:""`
|
||||
DisconnectCauses string `index:"17" re:""`
|
||||
MediationRunids string `index:"18" re:""`
|
||||
RatedAccounts string `index:"19" re:""`
|
||||
RatedSubjects string `index:"20" re:""`
|
||||
CostInterval string `index:"21" re:""`
|
||||
ActionTriggers string `index:"22" re:""`
|
||||
PddInterval string `index:"15" re:""`
|
||||
UsageInterval string `index:"16" re:""`
|
||||
Suppliers string `index:"17" re:""`
|
||||
DisconnectCauses string `index:"18" re:""`
|
||||
MediationRunids string `index:"19" re:""`
|
||||
RatedAccounts string `index:"20" re:""`
|
||||
RatedSubjects string `index:"21" re:""`
|
||||
CostInterval string `index:"22" re:""`
|
||||
ActionTriggers string `index:"23" re:""`
|
||||
CreatedAt time.Time
|
||||
}
|
||||
|
||||
|
||||
@@ -73,9 +73,9 @@ type StoredCdr struct {
|
||||
Subject string // rating subject (rating subsystem) this record should be attached to
|
||||
Destination string // destination to be charged
|
||||
SetupTime time.Time // set-up time of the event. Supported formats: datetime RFC3339 compatible, SQL datetime (eg: MySQL), unix timestamp.
|
||||
Pdd time.Duration // PDD value
|
||||
AnswerTime time.Time // answer time of the event. Supported formats: datetime RFC3339 compatible, SQL datetime (eg: MySQL), unix timestamp.
|
||||
Usage time.Duration // event usage information (eg: in case of tor=*voice this will represent the total duration of a call)
|
||||
Pdd time.Duration // PDD value
|
||||
Supplier string // Supplier information when available
|
||||
DisconnectCause string // Disconnect cause of the event
|
||||
ExtraFields map[string]string // Extra fields to be stored in CDR
|
||||
|
||||
@@ -336,6 +336,7 @@ type TPCdrStat struct {
|
||||
Accounts string
|
||||
Subjects string
|
||||
DestinationPrefixes string
|
||||
PddInterval string
|
||||
UsageInterval string
|
||||
Suppliers string
|
||||
DisconnectCauses string
|
||||
|
||||
Reference in New Issue
Block a user