diff --git a/config/config_defaults.go b/config/config_defaults.go index af1fdd041..c1c413c14 100644 --- a/config/config_defaults.go +++ b/config/config_defaults.go @@ -285,6 +285,7 @@ const CGRATES_CFG_JSON = ` "request_filter": "Subscription-Id>Subscription-Id-Type(0)", // filter requests processed by this processor "flags": [], // flags to influence processing behavior "continue_on_success": false, // continue to the next template if executed + "append_cca": false, // when continuing will append cca fields to the previous ones "ccr_fields":[ // import content_fields template, tag will match internally CDR field, in case of .csv value will be represented by index of the field value {"tag": "TOR", "field_id": "ToR", "type": "*composed", "value": "^*voice", "mandatory": true}, {"tag": "OriginID", "field_id": "OriginID", "type": "*composed", "value": "Session-Id", "mandatory": true}, diff --git a/config/config_json_test.go b/config/config_json_test.go index 462597e1f..654159925 100644 --- a/config/config_json_test.go +++ b/config/config_json_test.go @@ -443,6 +443,7 @@ func TestDiameterAgentJsonCfg(t *testing.T) { Request_filter: utils.StringPointer("Subscription-Id>Subscription-Id-Type(0)"), Flags: utils.StringSlicePointer([]string{}), Continue_on_success: utils.BoolPointer(false), + Append_cca: utils.BoolPointer(false), CCR_fields: &[]*CdrFieldJsonCfg{ &CdrFieldJsonCfg{Tag: utils.StringPointer("TOR"), Field_id: utils.StringPointer(utils.TOR), Type: utils.StringPointer(utils.META_COMPOSED), Value: utils.StringPointer("^*voice"), Mandatory: utils.BoolPointer(true)}, diff --git a/config/daconfig.go b/config/daconfig.go index ae92905b5..6e465d6ae 100644 --- a/config/daconfig.go +++ b/config/daconfig.go @@ -110,6 +110,7 @@ type DARequestProcessor struct { RequestFilter utils.RSRFields Flags utils.StringMap // Various flags to influence behavior ContinueOnSuccess bool + AppendCCA bool CCRFields []*CfgCdrField CCAFields []*CfgCdrField } @@ -139,6 +140,9 @@ func (self *DARequestProcessor) loadFromJsonCfg(jsnCfg *DARequestProcessorJsnCfg if jsnCfg.Continue_on_success != nil { self.ContinueOnSuccess = *jsnCfg.Continue_on_success } + if jsnCfg.Append_cca != nil { + self.AppendCCA = *jsnCfg.Append_cca + } if jsnCfg.CCR_fields != nil { if self.CCRFields, err = CfgCdrFieldsFromCdrFieldsJsonCfg(*jsnCfg.CCR_fields); err != nil { return err diff --git a/config/libconfig_json.go b/config/libconfig_json.go index 58f25c529..bc94bca2d 100644 --- a/config/libconfig_json.go +++ b/config/libconfig_json.go @@ -266,6 +266,7 @@ type DARequestProcessorJsnCfg struct { Request_filter *string Flags *[]string Continue_on_success *bool + Append_cca *bool CCR_fields *[]*CdrFieldJsonCfg CCA_fields *[]*CdrFieldJsonCfg }