[OpenSIPS-Users] Problem with mmgeoip.so

Bogdan-Andrei Iancu bogdan at voice-system.ro
Mon Jan 25 14:40:59 CET 2010


Hi Leonid,

Use quotes for 2nd and 3rd parameters of the function -> 
f(mmg_lookup("lon:lat","$si","$avp(lat_lon)")) {

Regards,
Bogdan

Леонид Наседкин wrote:
> Hi there.
> I tried to use mmgeoip.so with configuration from example
> opensips 1.6.1
>
> loadmodule "mmgeoip.so"
> 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");
> };
>
> ls -la /usr/share/GeoIP/GeoLiteCity.dat
> -rw-r--r-- 1 root root 28543655 2010-01-25 11:15 
> /usr/share/GeoIP/GeoLiteCity.dat
>
> I got some errors:
> Jan 25 11:44:08 [10466] CRITICAL:core:yyerror: parse error in config 
> file, line 300, column 26-43: syntax error
> Jan 25 11:44:08 [10466] CRITICAL:core:yyerror: parse error in config 
> file, line 300, column 43-44: bad arguments for command <mmg_lookup>
>
> What is wrong?
>
>
> -- 
> WBR, Leonid Nasedkin
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   


-- 
Bogdan-Andrei Iancu
www.voice-system.ro




More information about the Users mailing list