Browse Source

fix ACL logic

3.20
SIPLABS, LLC 11 years ago
parent
commit
418a1820a3
1 changed files with 5 additions and 6 deletions
  1. +5
    -6
      kamailio/acl-role.cfg

+ 5
- 6
kamailio/acl-role.cfg View File

@ -45,7 +45,6 @@ route[ACL_CHECK] {
$var(acl-realm-request) = "true";
} else if ($var(realm-decision) == 1 ){ # We have cached decision, let's use it
xlog("L_INFO", "$ci |ACL| $var(sip-packet) from $si is permitted by ACL for $var(realm)\n");
return;
} else {
if (!isflagset(FLAG_IS_REPLY)) {
sl_send_reply(ACL_CODE_DENY, ACL_MESSAGE_DENY);
@ -67,7 +66,6 @@ route[ACL_CHECK] {
$var(acl-device-request) = "true";
} else if ($var(device-decision) == 1 ){ # We have cached decision, let's use it
xlog("L_INFO", "$ci |ACL| $var(sip-packet) from $si is permitted by ACL for $var(device)\n");
return;
} else {
if (!isflagset(FLAG_IS_REPLY)) {
sl_send_reply(ACL_CODE_DENY, ACL_MESSAGE_DENY);
@ -77,7 +75,7 @@ route[ACL_CHECK] {
}
}
if ($var(acl-realm-request) == "true" || $var(acl-device-request)) {
if ($var(acl-realm-request) == "true" || $var(acl-device-request) == "true") {
if (not_empty("$fU"))
$var(query) = "{'Event-Category': 'acl', 'Event-Name': 'query', 'Entity': '" + $var(device) + "', 'With-Realm': " + $var(acl-realm-request) + "}";
else
@ -100,9 +98,10 @@ route[ACL_CHECK] {
}
}
route(ACL_CHECK_REALM);
if (not_empty("$fU")) {
route(ACL_CHECK_DEVICE);
route(ACL_CHECK_REALM);
if (not_empty("$fU")) {
route(ACL_CHECK_DEVICE);
}
}
}


Loading…
Cancel
Save