diff --git a/kamailio/acl-role.cfg b/kamailio/acl-role.cfg index a45365f..2439f9a 100644 --- a/kamailio/acl-role.cfg +++ b/kamailio/acl-role.cfg @@ -15,6 +15,13 @@ modparam("htable", "htable", "acl=>initval=-1;autoexpire=7200") ## Route for ACL functionality route[ACL_CHECK] { + # If packet came from platform or from 4 class MERA, do not check it + if (isflagset(FLAG_INTERNALLY_SOURCED) || isflagset(FLAG_TRUSTED_SOURCE) ) { + xlog("L_DEBUG", "$ci |ACL| Trusted source IP($si) ignoring"); + return; + } + + if (isflagset(FLAG_IS_REPLY)) { $var(sip-packet) = $rs; } else { diff --git a/kamailio/rate-limiter-role.cfg b/kamailio/rate-limiter-role.cfg index 9f037b4..f39a184 100644 --- a/kamailio/rate-limiter-role.cfg +++ b/kamailio/rate-limiter-role.cfg @@ -13,6 +13,12 @@ modparam("htable", "htable", "rate_limits=>initval=-1;autoexpire=60") # init route[DOS_PREVENTION] { + # If packet came from platform or from 4 class MERA, do not check it + if (isflagset(FLAG_INTERNALLY_SOURCED) || isflagset(FLAG_TRUSTED_SOURCE) ) { + xlog("L_DEBUG", "$ci |RL| Trusted source IP($si) ignoring"); + return; + } + # Initially we do not want to get data $var(with-realm-request) = "false"; $var(with-realm-total) = "false";