← Volver al índice de módulos

geoip

This module allows real-time queries against the Max Mind GeoIP database to be performed from the config script. It uses the old version of API, still very common on OS distributions.
🛠️ Utilidades y Varios Kamailio 6.1 2 parámetros 2 funciones

Descripción general

This module allows real-time queries against the Max Mind GeoIP database to be performed from the config script. It uses the old version of API, still very common on OS distributions. For using the new version of GeoIP API, see geoip2 module. The Max Mind GeoIP database is a map of IP network address assignments to geographical locales that can be useful -- though approximate -- in identifying the physical location with which an IP host address is associated on a relatively granular level. This database itself can be obtained on a free or commercial basis from http://www.maxmind.com/app/ip-location. The library that interfaces with the Max Mind API, as well as scripts to automate downloading of the on-disk version of the open-source database is also packaged by the Debian Linux distribution and its derivatives as libgeoip, and probably by other distributions as well. Debian Linux squeeze includes already a database as dependency, but as this contain the wrong data, it will not work correctly with the module. More accurate, the module expect the GeoIP City Edition, and will not work with the GeoIP Country Edition. In newer Debian Linux releases the package geoip-database-contrib should contain the necessary database. You can download the Lite edition of the DB from http://www.maxmind.com/app/geolitecity. This module exports a new class of pseudo-variables - $gip(pvc=>key) - to enable access to the results of a query to the database. Many queries can be done and store results i

Documentación oficial: https://www.kamailio.org/docs/modules/stable/modules/geoip.html
Código fuente: https://github.com/kamailio/kamailio/tree/master/src/modules/geoip

Parámetros de configuración

ParámetroTipoDescripción
path string 3.1. path (string)
path string Path to the GeoIP database file.

Funciones exportadas

geoip_match(ipaddr, pvc)

4.1. geoip_match(ipaddr, pvc)

geoip_match(ipaddr, pvc)

Match ipaddr against the GeoIP database and set the pvc container. The function has to be called before accessing a key via: $gip(pvc=>key).

Autores y contribuidores

Daniel-Constantin MierlaDaniel-Constantin Mierla <miconda@gmail.com>Alex BalashovEvariste Systems LLC <abalashov@evaristesys.com>

Copyright © 2010 Daniel-Constantin Mierla (asipto.com)

Módulos relacionados

auth_web3 auth_xkeys avp avpops benchmark blst call_control call_obj