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

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Kobi Eshun
Hi,

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" message:

modparam("mmgeoip", "mmgeoip_city_db_path", "/usr/share/GeoIP/GeoLiteCity.dat")
...
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 documentation.

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.

Cheers,
--
kobi



_______________________________________________
Devel mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

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

Sergio Gutierrez
Hello Kobi.

Congratulations for your contrib; I think it is very useful, in applications related to security and audit.

I am preparing the packaging files for Solaris for the module., but I am still having some troubles, because the dependency does not compile well in Solaris.

I also created a patch which could improve portability of module, by finding geoip library relative to LOCALBASE. The patch has been uploaded in the tracker, so, you could apply it, or if you prefer, I could do it too.

Finally, a little refactor on the code, would be helpful, to organize the module in the same way of other modules. If you like, I am willing to help you with this; we can talk off-list about it.

Best regards.

Sergio Gutierrez.

On Wed, Nov 5, 2008 at 7:48 PM, Kobi Eshun <[hidden email]> wrote:
Hi,

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" message:

modparam("mmgeoip", "mmgeoip_city_db_path", "/usr/share/GeoIP/GeoLiteCity.dat")
...
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 documentation.

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.

Cheers,
--
kobi



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Devel mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

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

Kobi Eshun
Glad you will find this useful, Sergio.

Please do make the changes required to improve portability, and whatever you need to get it to compile on Solaris -- thanks for the help. I'll ping you offline on the refactoring discussion. Cheers,
--
kobi


On Nov 6, 2008, at 8:17 AM, Sergio Gutierrez wrote:

Hello Kobi.

Congratulations for your contrib; I think it is very useful, in applications related to security and audit.

I am preparing the packaging files for Solaris for the module., but I am still having some troubles, because the dependency does not compile well in Solaris.

I also created a patch which could improve portability of module, by finding geoip library relative to LOCALBASE. The patch has been uploaded in the tracker, so, you could apply it, or if you prefer, I could do it too.

Finally, a little refactor on the code, would be helpful, to organize the module in the same way of other modules. If you like, I am willing to help you with this; we can talk off-list about it.

Best regards.

Sergio Gutierrez.

On Wed, Nov 5, 2008 at 7:48 PM, Kobi Eshun <[hidden email]> wrote:
Hi,

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" message:

modparam("mmgeoip", "mmgeoip_city_db_path", "/usr/share/GeoIP/GeoLiteCity.dat")
...
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 documentation.

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.

Cheers,
--
kobi



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users




_______________________________________________
Devel mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

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

Adrian Georgescu
Kobi,

This seem to be quite useful for a closest path media proxy selection algorithm.

Thanks,
Adrian
 
On Nov 6, 2008, at 7:51 PM, Kobi Eshun wrote:

Glad you will find this useful, Sergio.

Please do make the changes required to improve portability, and whatever you need to get it to compile on Solaris -- thanks for the help. I'll ping you offline on the refactoring discussion. Cheers,
--
kobi


On Nov 6, 2008, at 8:17 AM, Sergio Gutierrez wrote:

Hello Kobi.

Congratulations for your contrib; I think it is very useful, in applications related to security and audit.

I am preparing the packaging files for Solaris for the module., but I am still having some troubles, because the dependency does not compile well in Solaris.

I also created a patch which could improve portability of module, by finding geoip library relative to LOCALBASE. The patch has been uploaded in the tracker, so, you could apply it, or if you prefer, I could do it too.

Finally, a little refactor on the code, would be helpful, to organize the module in the same way of other modules. If you like, I am willing to help you with this; we can talk off-list about it.

Best regards.

Sergio Gutierrez.

On Wed, Nov 5, 2008 at 7:48 PM, Kobi Eshun <[hidden email]> wrote:
Hi,

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" message:

modparam("mmgeoip", "mmgeoip_city_db_path", "/usr/share/GeoIP/GeoLiteCity.dat")
...
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 documentation.

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.

Cheers,
--
kobi



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Devel mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


_______________________________________________
Devel mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel