diff --git a/agents/httpagent_it_test.go b/agents/httpagent_it_test.go
index 783cf2e28..96f4ef0b1 100644
--- a/agents/httpagent_it_test.go
+++ b/agents/httpagent_it_test.go
@@ -193,11 +193,20 @@ func testHAitAuth1001(t *testing.T) {
if err != nil {
t.Error(err)
}
- eXml := []byte(`
+ var eXml []byte
+ if t := time.Now(); t.Weekday() != 6 && t.Weekday() != 7 { // Different rating plans for weekend
+ eXml = []byte(`
+
+ 1
+ 6042
+`)
+ } else {
+ eXml = []byte(`
1
10800
`)
+ }
if body, err := ioutil.ReadAll(rply.Body); err != nil {
t.Error(err)
} else if !reflect.DeepEqual(eXml, body) {
diff --git a/data/conf/samples/httpagent/httpagent.json b/data/conf/samples/httpagent/httpagent.json
index 3fbec266d..faed3abf9 100644
--- a/data/conf/samples/httpagent/httpagent.json
+++ b/data/conf/samples/httpagent/httpagent.json
@@ -59,7 +59,7 @@
"id": "mtcall_cdr",
"filters": ["*string:*req.request_type:MTCALL_CDR"],
"tenant": "cgrates.org",
- "flags": ["*cdrs"],
+ "flags": ["*cdrs","*log"],
"request_fields":[
{"tag": "RequestType", "field_id": "RequestType", "type": "*constant",
"value": "*pseudoprepaid", "mandatory": true},
@@ -69,14 +69,16 @@
"value": "~*req.msisdn", "mandatory": true},
{"tag": "Destination", "field_id": "Destination", "type": "*composed",
"value": "~*req.destination", "mandatory": true},
- {"tag": "SetupTime", "field_id": "SetupTime", "type": "*composed",
+ {"tag": "SetupTime", "field_id": "SetupTime", "type": "*variable",
"value": "~*req.timestamp", "mandatory": true},
- {"tag": "AnswerTime", "field_id": "SetupTime", "type": "*composed",
+ {"tag": "AnswerTime", "field_id": "AnswerTime", "type": "*variable",
"value": "~*req.timestamp", "mandatory": true},
{"tag": "Usage", "field_id": "Usage", "type": "*composed",
"value": "~*req.leg_duration;s", "mandatory": true},
],
"reply_fields":[
+ {"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
+ "field_id": "CDR_RESPONSE.RESULT_CODE", "type": "*composed", "value": "~*cgrep.Error", "blocker": true},
{"tag": "CDR_ID", "field_id": "CDR_RESPONSE.CDR_ID", "type": "*composed",
"value": "~*req.CDR_ID", "mandatory": true},
{"tag": "CDR_STATUS", "field_id": "CDR_RESPONSE.CDR_STATUS", "type": "*constant",
diff --git a/data/conf/samples/httpagenttls/httpagent.json b/data/conf/samples/httpagenttls/httpagent.json
index 92a7cfbff..1c0012b45 100755
--- a/data/conf/samples/httpagenttls/httpagent.json
+++ b/data/conf/samples/httpagenttls/httpagent.json
@@ -71,12 +71,14 @@
"value": "~*req.destination", "mandatory": true},
{"tag": "SetupTime", "field_id": "SetupTime", "type": "*composed",
"value": "~*req.timestamp", "mandatory": true},
- {"tag": "AnswerTime", "field_id": "SetupTime", "type": "*composed",
+ {"tag": "AnswerTime", "field_id": "AnswerTime", "type": "*composed",
"value": "~*req.timestamp", "mandatory": true},
{"tag": "Usage", "field_id": "Usage", "type": "*composed",
"value": "~*req.leg_duration;s", "mandatory": true},
],
"reply_fields":[
+ {"tag": "ResultCode", "filters": ["*rsr::~*cgrep.Error(!^$)"],
+ "field_id": "CDR_RESPONSE.RESULT_CODE", "type": "*composed", "value": "~*cgrep.Error", "blocker": true},
{"tag": "CDR_ID", "field_id": "CDR_RESPONSE.CDR_ID", "type": "*composed",
"value": "~*req.CDR_ID", "mandatory": true},
{"tag": "CDR_STATUS", "field_id": "CDR_RESPONSE.CDR_STATUS", "type": "*constant",