Updated integration tests

This commit is contained in:
Trial97
2020-06-12 13:55:54 +03:00
committed by Dan Christian Bogos
parent 6b84c27b2d
commit 39d49dcd2f
11 changed files with 40 additions and 38 deletions

View File

@@ -37,6 +37,7 @@
"cdrs": {
"enabled": true,
"stats_conns": ["*localhost"],
"chargers_conns": ["*internal"],
"rals_conns": ["*localhost"],
"sessions_cost_retries": 5,
},
@@ -59,7 +60,7 @@
"thresholds_conns": ["*localhost"],
"chargers_conns": ["*localhost"],
"debit_interval": "5s",
"channel_sync_interval":"7s",
"channel_sync_interval":"7s",
},
@@ -101,6 +102,7 @@
"enabled": true,
"resources_conns": ["*internal"],
"stats_conns": ["*internal"],
"rals_conns": ["*internal"],
"string_indexed_fields": ["Account"],
},

View File

@@ -217,14 +217,12 @@ route[CGRATES_SESSIONAUTH_REPLY] {
$dlg_var(cgrDestination) = $rU;
$dlg_var(paypalAccount) = $avp(PaypalAccount);
if $var(cgrMaxUsage) != -1 {
if $var(cgrMaxUsage) == 0 { // Not enough balance, do not allow the call to go through
sl_send_reply("403","Insufficient credit");
exit;
} else if !dlg_set_timeout("$var(cgrMaxUsage)") {
sl_send_reply("503","CGR_MAX_USAGE_ERROR");
exit;
}
if $var(cgrMaxUsage) == 0 { // Not enough balance, do not allow the call to go through
sl_send_reply("403","Insufficient credit");
exit;
} else if !dlg_set_timeout("$var(cgrMaxUsage)") {
sl_send_reply("503","CGR_MAX_USAGE_ERROR");
exit;
}
if $var(cgrSuppliers) != "" { # Enforce the supplier variable to the first one received from CGRateS, here more for demo purposes