Module: kamailio Branch: master Commit: 2b152b09adb9bbfefe24826e075f3f6dd525a23f URL: https://github.com/kamailio/kamailio/commit/2b152b09adb9bbfefe24826e075f3f6d...
Author: Kamailio Dev kamailio.dev@kamailio.org Committer: Kamailio Dev kamailio.dev@kamailio.org Date: 2023-07-14T15:02:09+02:00
modules: readme files regenerated - geoip2 ... [skip ci]
---
Modified: src/modules/geoip2/README
---
Diff: https://github.com/kamailio/kamailio/commit/2b152b09adb9bbfefe24826e075f3f6d... Patch: https://github.com/kamailio/kamailio/commit/2b152b09adb9bbfefe24826e075f3f6d...
---
diff --git a/src/modules/geoip2/README b/src/modules/geoip2/README index d89372c48b3..256689b5782 100644 --- a/src/modules/geoip2/README +++ b/src/modules/geoip2/README @@ -35,6 +35,7 @@ Henning Westerholt 4. Functions
4.1. geoip2_match(ipaddr, pvc) + 4.2. distance(ip_addr, latitude, longitude)
5. RPC Commands
@@ -47,7 +48,8 @@ Henning Westerholt 1.1. Set path parameter 1.2. Set resid parameter 1.3. geoip2_match usage - 1.4. geoip2.reload usage + 1.4. distance usage + 1.5. geoip2.reload usage
Chapter 1. Admin Guide
@@ -67,6 +69,7 @@ Chapter 1. Admin Guide 4. Functions
4.1. geoip2_match(ipaddr, pvc) + 4.2. distance(ip_addr, latitude, longitude)
5. RPC Commands
@@ -151,6 +154,7 @@ if(geoip2_match("$si", "src")) { 4. Functions
4.1. geoip2_match(ipaddr, pvc) + 4.2. distance(ip_addr, latitude, longitude)
4.1. geoip2_match(ipaddr, pvc)
@@ -165,6 +169,23 @@ if(geoip2_match("$si", "src")) xlog("SIP message from: $gip2(src=>cc)\n"); ...
+4.2. distance(ip_addr, latitude, longitude) + + The function calculates the distance in miles between the + geocoordinates of the IP address passed as parameter (the coordinates + are calculated inside the function) and the geocoordinates latitude and + longitude + + Example 1.4. distance usage +... + $var(client_ip) = "109.184.18.64"; + $var(lat_pos) = "53.200660"; + $var(lon_pos) = "45.004640"; + $var(dist) = distance($var(client_ip), $var(lat_pos), $var(lon_pos)); + + xlog("distance is $var(dist)\n"); +... + 5. RPC Commands
5.1. geoip2.reload @@ -174,7 +195,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.4. geoip2.reload usage + Example 1.5. geoip2.reload usage ... kamcmd geoip2.reload ...