mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-23 16:18:44 +05:00
cgrates.cfg _duration fields -> _usage one
This commit is contained in:
@@ -488,7 +488,7 @@ func loadConfig(c *conf.ConfigFile) (*CGRConfig, error) {
|
||||
destFld, _ := c.GetString("cdrc", "destination_field")
|
||||
setupTimeFld, _ := c.GetString("cdrc", "setup_time_field")
|
||||
answerTimeFld, _ := c.GetString("cdrc", "answer_time_field")
|
||||
durFld, _ := c.GetString("cdrc", "duration_field")
|
||||
durFld, _ := c.GetString("cdrc", "usage_field")
|
||||
extraFlds, _ := c.GetString("cdrc", "extra_fields")
|
||||
if cfg.CdrcCdrFields, err = ParseCdrcCdrFields(accIdFld, reqtypeFld, directionFld, tenantFld, categoryFld, acntFld, subjectFld, destFld,
|
||||
setupTimeFld, answerTimeFld, durFld, extraFlds); err != nil {
|
||||
|
||||
@@ -106,7 +106,7 @@ func ParseCfgDerivedCharging(c *conf.ConfigFile) (dcs utils.DerivedChargers, err
|
||||
if aTimeFlds, err = ConfigSlice(cfgVal); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
cfgVal, _ = c.GetString("derived_charging", "duration_fields")
|
||||
cfgVal, _ = c.GetString("derived_charging", "usage_fields")
|
||||
if durFlds, err = ConfigSlice(cfgVal); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ subject_fields = test1, test2
|
||||
destination_fields = test1, test2
|
||||
setup_time_fields = test1, test2
|
||||
answer_time_fields = test1, test2
|
||||
duration_fields = test1, test2
|
||||
usage_fields = test1, test2
|
||||
`)
|
||||
edcs := utils.DerivedChargers{
|
||||
&utils.DerivedCharger{RunId: "run1", ReqTypeField: "test1", DirectionField: "test1", TenantField: "test1", CategoryField: "test1",
|
||||
@@ -77,7 +77,7 @@ subject_field = subject1
|
||||
destination_field = destination1
|
||||
setup_time_field = setuptime1
|
||||
answer_time_field = answertime1
|
||||
duration_field = duration1
|
||||
usage_field = duration1
|
||||
extra_fields = extra1:extraval1,extra2:extraval1
|
||||
`)
|
||||
eCdrcCdrFlds := map[string]*utils.RSRField{
|
||||
|
||||
@@ -73,7 +73,7 @@ subject_field = test # Subject field identifier. Use index numbers in case of
|
||||
destination_field = test # Destination field identifier. Use index numbers in case of .csv cdrs.
|
||||
setup_time_field = test # Answer time field identifier. Use index numbers in case of .csv cdrs.
|
||||
answer_time_field = test # Answer time field identifier. Use index numbers in case of .csv cdrs.
|
||||
duration_field = test # Duration field identifier. Use index numbers in case of .csv cdrs.
|
||||
usage_field = test # Duration field identifier. Use index numbers in case of .csv cdrs.
|
||||
extra_fields = test:test # Field identifiers of the fields to add in extra fields section, special format in case of .csv "index1|field1,index2|field2"
|
||||
|
||||
[mediator]
|
||||
@@ -105,7 +105,7 @@ subject_fields = test # Name of fields to be used during additional sessions co
|
||||
destination_fields = test # Name of destination fields to be used during additional sessions control <""|*default|field_name>.
|
||||
setup_time_fields = test # Name of setup_time fields to be used during additional sessions control <""|*default|field_name>.
|
||||
answer_time_fields = test # Name of answer_time fields to be used during additional sessions control <""|*default|field_name>.
|
||||
duration_fields = test # Name of duration fields to be used during additional sessions control <""|*default|field_name>.
|
||||
usage_fields = test # Name of duration fields to be used during additional sessions control <""|*default|field_name>.
|
||||
combined_chargers = true # Combine accounts specific derived_chargers with server configured ones <true|false>.
|
||||
|
||||
[history_server]
|
||||
|
||||
@@ -51,13 +51,13 @@
|
||||
# mediator = # Address where to reach the Mediator. Empty for disabling mediation. <""|internal>
|
||||
|
||||
[cdre]
|
||||
# cdr_format = csv # Exported CDRs format <csv>
|
||||
# mask_destination_id = # Destination id containing called addresses to be masked on export
|
||||
# mask_length = 0 # Length of the destination suffix to be masked
|
||||
# cost_shift_digits = 0 # Shift cost on export with the number of digits digits defined here (eg: convert from Eur to cent).
|
||||
# export_dir = /var/log/cgrates/cdrexport/csv # Path where the exported CDRs will be placed
|
||||
# export_template = cgrid,mediation_runid,accid,cdrhost,reqtype,direction,tenant,category,account,subject,destination,setup_time,answer_time,duration,cost
|
||||
# Exported fields template <""|fld1,fld2|*xml:instance_name>
|
||||
# cdr_format = csv # Exported CDRs format <csv>
|
||||
# mask_destination_id = # Destination id containing called addresses to be masked on export
|
||||
# mask_length = 0 # Length of the destination suffix to be masked
|
||||
# cost_shift_digits = 0 # Shift cost on export with the number of digits digits defined here (eg: convert from Eur to cent).
|
||||
# export_dir = /var/log/cgrates/cdre # Path where the exported CDRs will be placed
|
||||
# export_template = cgrid,mediation_runid,accid,cdrhost,reqtype,direction,tenant,category,account,subject,destination,setup_time,answer_time,usage,cost
|
||||
# Exported fields template <""|fld1,fld2|*xml:instance_name>
|
||||
[cdrc]
|
||||
# enabled = false # Enable CDR client functionality
|
||||
# cdrs = internal # Address where to reach CDR server. <internal|127.0.0.1:2080>
|
||||
@@ -77,7 +77,7 @@
|
||||
# destination_field = 7 # Destination field identifier. Use index numbers in case of .csv cdrs.
|
||||
# setup_time_field = 8 # Setup time field identifier. Use index numbers in case of .csv cdrs.
|
||||
# answer_time_field = 9 # Answer time field identifier. Use index numbers in case of .csv cdrs.
|
||||
# duration_field = 10 # Duration field identifier. Use index numbers in case of .csv cdrs.
|
||||
# usage_field = 10 # Usage field identifier. Use index numbers in case of .csv cdrs.
|
||||
# extra_fields = # Extra fields identifiers. For .csv, format: <label_extrafield_1>:<index_extrafield_1>[...,<label_extrafield_n>:<index_extrafield_n>]
|
||||
|
||||
[mediator]
|
||||
@@ -109,7 +109,7 @@
|
||||
# destination_fields = # Name of destination fields to be used during additional sessions control <""|*default|field_name>.
|
||||
# setup_time_fields = # Name of setup_time fields to be used during additional sessions control <""|*default|field_name>.
|
||||
# answer_time_fields = # Name of answer_time fields to be used during additional sessions control <""|*default|field_name>.
|
||||
# duration_fields = # Name of duration fields to be used during additional sessions control <""|*default|field_name>.
|
||||
# usage_fields = # Name of usage fields to be used during additional sessions control <""|*default|field_name>.
|
||||
# combined_chargers = true # Combine accounts specific derived_chargers with server configured ones <true|false>.
|
||||
|
||||
[history_server]
|
||||
|
||||
@@ -28,8 +28,7 @@ subject_fields = ^dc2 # Name of fields to be used during additional sessions c
|
||||
destination_fields = *default # Name of destination fields to be used during additional sessions control <""|*default|field_name>.
|
||||
setup_time_fields = *default # Name of setup_time fields to be used during additional sessions control <""|*default|field_name>.
|
||||
answer_time_fields = *default # Name of answer_time fields to be used during additional sessions control <""|*default|field_name>.
|
||||
duration_fields = *default # Name of duration fields to be used during additional sessions control <""|*default|field_name>.
|
||||
# combined_chargers = true # Combine accounts specific derived_chargers with server configured ones <true|false>.
|
||||
usage_fields = *default # Name of usage fields to be used during additional sessions control <""|*default|field_name>.
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user