Module: kamailio
Branch: 5.6
Commit: 8d7dee8bb08ef7f44394c0add165dea66bf9c316
URL:
https://github.com/kamailio/kamailio/commit/8d7dee8bb08ef7f44394c0add165dea…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2023-05-11T14:31:43+02:00
modules: readme files regenerated - modules ... [skip ci]
---
Modified: src/modules/geoip2/README
---
Diff:
https://github.com/kamailio/kamailio/commit/8d7dee8bb08ef7f44394c0add165dea…
Patch:
https://github.com/kamailio/kamailio/commit/8d7dee8bb08ef7f44394c0add165dea…
---
diff --git a/src/modules/geoip2/README b/src/modules/geoip2/README
index 80691c55168..a8ebc98adfb 100644
--- a/src/modules/geoip2/README
+++ b/src/modules/geoip2/README
@@ -30,6 +30,7 @@ Henning Westerholt
3. Parameters
3.1. path (string)
+ 3.2. resid (str)
4. Functions
@@ -44,8 +45,9 @@ Henning Westerholt
List of Examples
1.1. Set path parameter
- 1.2. geoip2_match usage
- 1.3. geoip2.reload usage
+ 1.2. Set resid parameter
+ 1.3. geoip2_match usage
+ 1.4. geoip2.reload usage
Chapter 1. Admin Guide
@@ -60,6 +62,7 @@ Chapter 1. Admin Guide
3. Parameters
3.1. path (string)
+ 3.2. resid (str)
4. Functions
@@ -115,6 +118,7 @@ Chapter 1. Admin Guide
3. Parameters
3.1. path (string)
+ 3.2. resid (str)
3.1. path (string)
@@ -127,6 +131,23 @@ Chapter 1. Admin Guide
modparam("geoip2", "path",
"/usr/local/share/GeoIP/GeoLite2-City.mmdb")
...
+3.2. resid (str)
+
+ Preregister result container id during initialization, enabling the use
+ of the module in KEMI scripts. In native Kamailio.cfg file,
+ registration is done when parsing config and finding variables.
+
+ Default value is ������ (empty).
+
+ Example 1.2. Set resid parameter
+...
+modparam("geoip2", "resid", "src")
+...
+if(geoip2_match("$si", "src")) {
+ ...
+}
+...
+
4. Functions
4.1. geoip2_match(ipaddr, pvc)
@@ -135,8 +156,10 @@ modparam("geoip2", "path",
"/usr/local/share/GeoIP/GeoLite2-City.mmdb")
Match ipaddr against the GeoIP database and set the pvc container. The
function has to be called before accessing a key via: $gip2(pvc=>key).
+ At least one function needs to be present that access the pvc
+ container, otherwise this function will not work.
- Example 1.2. geoip2_match usage
+ Example 1.3. geoip2_match usage
...
if(geoip2_match("$si", "src"))
xlog("SIP message from: $gip2(src=>cc)\n");
@@ -151,7 +174,7 @@ if(geoip2_match("$si", "src"))
Reload the internal GeoIP database. This is necessary after the
database file has been changed on the disk.
- Example 1.3. geoip2.reload usage
+ Example 1.4. geoip2.reload usage
...
kamcmd geoip2.reload
...