[OpenSIPS-Users] Problem with mmgeoip.so

Леонид Наседкин leonidnasedkin at gmail.com
Thu Jan 28 07:54:36 CET 2010


Hi Bogdan.
Thank you. Its ok now.

2010/1/26 Bogdan-Andrei Iancu <bogdan at voice-system.ro>

> Hi Leoida,
>
> found a bug in the module - please update from svn and give it another try.
>
> Regards,
> Bogdan
>
> Леонид Наседкин wrote:
> > Hi. Bogdan.
> >
> > I got a new trouble. Please look at the last string in log. How can I
> > get a normal output?
> >
> > if (mmg_lookup("lon:lat:cc:reg","$si","$avp(lat_lon)")) {
> > xdbg("GEOIP: $(avp(lat_lon)[0]) $(avp(lat_lon)[1]) $(avp(lat_lon)[2])
> > $(avp(lat_lon)[3]) $(avp(lat_lon)[4]) $avp(lat_lon)");
> > }
> >
> > Jan 26 08:03:50 dev-sip /usr/sbin/opensips[26484]:
> > DBG:mmgeoip:mmg_lookup_cmd: mmgeoip:mmg_lookup_cmd: ipaddr:'x.x.x.x';
> > fields:'lon:lat:cc:reg'.
> > Jan 26 08:03:50 dev-sip /usr/sbin/opensips[26484]:
> > DBG:mmgeoip:mmg_lookup_cmd: mmgeoip:mmg_lookup_cmd: x.x.x.x[lon]
> 82.934402
> > Jan 26 08:03:50 dev-sip /usr/sbin/opensips[26484]:
> > DBG:mmgeoip:mmg_lookup_cmd: mmgeoip:mmg_lookup_cmd: x.x.x.x[lat]
> 55.041100
> > Jan 26 08:03:50 dev-sip /usr/sbin/opensips[26484]:
> > DBG:mmgeoip:mmg_lookup_cmd: mmgeoip:mmg_lookup_cmd: x.x.x.x[cc] RU
> > Jan 26 08:03:50 dev-sip /usr/sbin/opensips[26484]:
> > DBG:mmgeoip:mmg_lookup_cmd: mmgeoip:mmg_lookup_cmd: x.x.x.x[reg] 53
> > Jan 26 08:03:50 dev-sip /usr/sbin/opensips[26484]: GEOIP: 3215296676
> > 3215296676 3215296676 3215296676 3215296676
> >
> >
> >
> >
> > 2010/1/25 Bogdan-Andrei Iancu <bogdan at voice-system.ro
> > <mailto:bogdan at voice-system.ro>>
> >
> >     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 <mailto:Users at lists.opensips.org>
> >     > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >     >
> >
> >
> >     --
> >     Bogdan-Andrei Iancu
> >     www.voice-system.ro <http://www.voice-system.ro>
> >
> >
> >     _______________________________________________
> >     Users mailing list
> >     Users at lists.opensips.org <mailto:Users at lists.opensips.org>
> >     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >
> >
> >
> >
> > --
> > WBR, Leonid Nasedkin
> > cell: +7 923 731 0077
> > icq: 256816
> > skype: leonidnasedkin
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Users mailing list
> > Users at lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >
>
>
> --
> Bogdan-Andrei Iancu
> www.voice-system.ro
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>



-- 
WBR, Leonid Nasedkin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20100128/0c900a6a/attachment.htm 


More information about the Users mailing list