Module: kamailio
Branch: master
Commit: 5e3a9b3ead73ec6c92d716134e8d7adde78a3e1b
URL: 
https://github.com/kamailio/kamailio/commit/5e3a9b3ead73ec6c92d716134e8d7adde78a3e1b

Author: Kamailio Dev <kamailio....@kamailio.org>
Committer: Kamailio Dev <kamailio....@kamailio.org>
Date: 2025-08-26T21:31:09+02:00

modules: readme files regenerated - secfilter ... [skip ci]

---

Modified: src/modules/secfilter/README

---

Diff:  
https://github.com/kamailio/kamailio/commit/5e3a9b3ead73ec6c92d716134e8d7adde78a3e1b.diff
Patch: 
https://github.com/kamailio/kamailio/commit/5e3a9b3ead73ec6c92d716134e8d7adde78a3e1b.patch

---

diff --git a/src/modules/secfilter/README b/src/modules/secfilter/README
index 574e9446c74..dd7d66be4e3 100644
--- a/src/modules/secfilter/README
+++ b/src/modules/secfilter/README
@@ -381,13 +381,28 @@ klisted");
      * -1 = error
      * -2 = the value is blacklisted
 
+   You can filter by blocking the IPs of messages coming from countries
+   that are on the blacklist. Alternatively, you can block everything that
+   is not explicitly on the whitelist.
+
    Example 1.11. secf_check_country usage
                 ...
         if (geoip2_match("$si", "src")) {
                 secf_check_country($gip2(src=>cc));
-                if ($avp(secfilter) == -2) {
-                        xlog("L_ALERT", "$rm from $si blocked because Country 
'$
-gip2(src=>cc)' is blacklisted");
+                if ($? == -2) {
+                        xdbg("$rm from $si blocked because Country 
'$gip2(src=>c
+c)' is blacklisted");
+                        exit;
+                }
+        }
+
+                ...
+
+        if (geoip2_match("$si", "src")) {
+                secf_check_country($gip2(src=>cc));
+                if ($? != 2) {
+                        xdbg("$rm from $si blocked because Country 
'$gip2(src=>c
+c)' is not whitelisted");
                         exit;
                 }
         }

_______________________________________________
Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to