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