[OpenSIPS-Users] [NEW FEATURE] Geo-location lookup module, 'mmgeoip.'

Kobi Eshun kobi at sightspeed.com
Thu Nov 6 01:48:55 CET 2008


I'm pleased to announce availability of the new 'mmgeoip' module,  
which adds runtime geo-location information to the OpenSIPS scripting  
environment. The following example prints out the latitude and  
longitude associated with the source IP address of the "current"  

	modparam("mmgeoip", "mmgeoip_city_db_path", "/usr/share/GeoIP/ 
	if(mmg_lookup("lon:lat",$si,$avp(lat_lon))) {
	  xlog("L_INFO","Source IP latitude:$(avp(lat_lon)[0])\n");
	  xlog("L_INFO","Source IP longitude:$(avp(lat_lon)[1])\n");

Other geographic data available include country code, region, city,  
postal code, time zone and more, all described in the module  

Lookups are executed against the freely-available GeoLite City  
database; and the non-free GeoIP City database is drop-in compatible.  
All lookup fields provided by the API are accessible by the script.  
Visit the MaxMind website (http://www.maxmind.com/app/geolitecity) for  
more information on the location databases and the API.

The module was developed against a Gentoo Linux distribution. Please  
do send me your comments/suggestions for bringing it up on other  
distributions and platforms.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20081105/15d3d323/attachment.htm 

More information about the Users mailing list