mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
ResourceLimit with AllocationMessage
This commit is contained in:
@@ -117,13 +117,13 @@ route[CGRATES_RL_REQUEST] {
|
||||
\"cgr_setuptime\":\"$TS\"}");
|
||||
}
|
||||
|
||||
# Process LCR_REPLY from CGRateS
|
||||
# Process RL_REPLY from CGRateS
|
||||
route[CGR_RL_REPLY] {
|
||||
json_get_field("$evapi(msg)", "ResourceAllowed", "$var(CGRResourceAllowed)");
|
||||
json_get_field("$evapi(msg)", "ResourceAllocated", "$var(CGRResourceAllocated)");
|
||||
json_get_field("$evapi(msg)", "Error", "$var(CgrError)");
|
||||
$var(id_index) = $(var(TransactionIndex){s.int});
|
||||
$var(id_label) = $(var(TransactionLabel){s.int});
|
||||
$var(CGRResourceAllowed) = $(var(CGRResourceAllowed){s.rm,"});
|
||||
$var(CGRResourceAllocated) = $(var(CGRResourceAllocated){s.rm,"});
|
||||
$var(CgrError) = $(var(CgrError){s.rm,"});
|
||||
t_continue("$var(id_index)", "$var(id_label)", "CGRATES_RL_REPLY"); # Unpark the transaction
|
||||
}
|
||||
|
||||
@@ -220,7 +220,7 @@ route[CGRATES_RL_REPLY] {
|
||||
sl_send_reply("503","CGR_ERROR");
|
||||
exit;
|
||||
}
|
||||
if $var(CGRResourceAllowed) == "false" {
|
||||
if $var(CGRResourceAllocated) == "false" {
|
||||
sl_send_reply("403","Resource not allowed");
|
||||
exit;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user