Hi Bogdan.<div>Thank you. Its ok now.<br><br><div class="gmail_quote">2010/1/26 Bogdan-Andrei Iancu <span dir="ltr"><<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi Leoida,<br>
<br>
found a bug in the module - please update from svn and give it another try.<br>
<div class="im"><br>
Regards,<br>
Bogdan<br>
<br>
Леонид Наседкин wrote:<br>
</div><div class="im">> Hi. Bogdan.<br>
><br>
> I got a new trouble. Please look at the last string in log. How can I<br>
> get a normal output?<br>
><br>
> if (mmg_lookup("lon:lat:cc:reg","$si","$avp(lat_lon)")) {<br>
> xdbg("GEOIP: $(avp(lat_lon)[0]) $(avp(lat_lon)[1]) $(avp(lat_lon)[2])<br>
> $(avp(lat_lon)[3]) $(avp(lat_lon)[4]) $avp(lat_lon)");<br>
> }<br>
><br>
> Jan 26 08:03:50 dev-sip /usr/sbin/opensips[26484]:<br>
> DBG:mmgeoip:mmg_lookup_cmd: mmgeoip:mmg_lookup_cmd: ipaddr:'x.x.x.x';<br>
> fields:'lon:lat:cc:reg'.<br>
> Jan 26 08:03:50 dev-sip /usr/sbin/opensips[26484]:<br>
> DBG:mmgeoip:mmg_lookup_cmd: mmgeoip:mmg_lookup_cmd: x.x.x.x[lon] 82.934402<br>
> Jan 26 08:03:50 dev-sip /usr/sbin/opensips[26484]:<br>
> DBG:mmgeoip:mmg_lookup_cmd: mmgeoip:mmg_lookup_cmd: x.x.x.x[lat] 55.041100<br>
> Jan 26 08:03:50 dev-sip /usr/sbin/opensips[26484]:<br>
> DBG:mmgeoip:mmg_lookup_cmd: mmgeoip:mmg_lookup_cmd: x.x.x.x[cc] RU<br>
> Jan 26 08:03:50 dev-sip /usr/sbin/opensips[26484]:<br>
> DBG:mmgeoip:mmg_lookup_cmd: mmgeoip:mmg_lookup_cmd: x.x.x.x[reg] 53<br>
> Jan 26 08:03:50 dev-sip /usr/sbin/opensips[26484]: GEOIP: 3215296676<br>
> 3215296676 3215296676 3215296676 3215296676<br>
><br>
><br>
><br>
><br>
> 2010/1/25 Bogdan-Andrei Iancu <<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a><br>
</div>> <mailto:<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>>><br>
<div><div></div><div class="h5">><br>
> Hi Leonid,<br>
><br>
> Use quotes for 2nd and 3rd parameters of the function -><br>
> f(mmg_lookup("lon:lat","$si","$avp(lat_lon)")) {<br>
><br>
> Regards,<br>
> Bogdan<br>
><br>
> Леонид Наседкин wrote:<br>
> > Hi there.<br>
> > I tried to use mmgeoip.so with configuration from example<br>
> > opensips 1.6.1<br>
> ><br>
> > loadmodule "mmgeoip.so"<br>
> > modparam("mmgeoip",<br>
> > "mmgeoip_city_db_path","/usr/share/GeoIP/GeoLiteCity.dat")<br>
> > ...<br>
> > if(mmg_lookup("lon:lat",$si,$avp(lat_lon))) {<br>
> > xlog("L_INFO","Source IP latitude:$(avp(lat_lon)[0])\n");<br>
> > xlog("L_INFO","Source IP longitude:$(avp(lat_lon)[1])\n");<br>
> > };<br>
> ><br>
> > ls -la /usr/share/GeoIP/GeoLiteCity.dat<br>
> > -rw-r--r-- 1 root root 28543655 2010-01-25 11:15<br>
> > /usr/share/GeoIP/GeoLiteCity.dat<br>
> ><br>
> > I got some errors:<br>
> > Jan 25 11:44:08 [10466] CRITICAL:core:yyerror: parse error in config<br>
> > file, line 300, column 26-43: syntax error<br>
> > Jan 25 11:44:08 [10466] CRITICAL:core:yyerror: parse error in config<br>
> > file, line 300, column 43-44: bad arguments for command <mmg_lookup><br>
> ><br>
> > What is wrong?<br>
> ><br>
> ><br>
> > --<br>
> > WBR, Leonid Nasedkin<br>
> ><br>
> ><br>
> ------------------------------------------------------------------------<br>
> ><br>
> > _______________________________________________<br>
> > Users mailing list<br>
</div></div>> > <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a> <mailto:<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>><br>
<div class="im">> > <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
> ><br>
><br>
><br>
> --<br>
> Bogdan-Andrei Iancu<br>
</div>> <a href="http://www.voice-system.ro" target="_blank">www.voice-system.ro</a> <<a href="http://www.voice-system.ro" target="_blank">http://www.voice-system.ro</a>><br>
><br>
><br>
> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a> <mailto:<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>><br>
<div><div></div><div class="h5">> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
><br>
><br>
><br>
><br>
> --<br>
> WBR, Leonid Nasedkin<br>
> cell: +7 923 731 0077<br>
> icq: 256816<br>
> skype: leonidnasedkin<br>
> ------------------------------------------------------------------------<br>
><br>
> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
><br>
<br>
<br>
--<br>
Bogdan-Andrei Iancu<br>
<a href="http://www.voice-system.ro" target="_blank">www.voice-system.ro</a><br>
<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>WBR, Leonid Nasedkin<br><br>
</div>