Quantcast

MMGeoIP

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

MMGeoIP

Serge S. Yuriev
Hello,

How I can debug mmgeoip module? For any request it's returning Unknown.

OpenSIPS 2.4.0-dev
Params are
modparam("mmgeoip", "mmgeoip_city_db_path", "/usr/share/GeoIP/GeoIP.dat")
modparam("mmgeoip", "cache_type","MEM_CACHE_CHECK")

DB exists and accessible, geoiplookup shows info

root@rositten:/etc/opensips# geoiplookup 62.112.8.216
GeoIP Country Edition: NL, Netherlands
GeoIP City Edition, Rev 1: NL, N/A, N/A, N/A, N/A, 52.382401, 4.899500, 0, 0
GeoIP ASNum Edition: AS49981 WorldStream B.V.
root@rositten:/etc/opensips# geoiplookup 8.8.4.4
GeoIP Country Edition: US, United States
GeoIP City Edition, Rev 1: US, N/A, N/A, N/A, N/A, 37.750999,
-97.821999, 0, 0
GeoIP ASNum Edition: AS15169 Google Inc.

--
Serge S. Yuriev
Lead VoIP engineer


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MMGeoIP

Bogdan-Andrei Iancu-2
Hi Serge,

What is the return code of the mm_lookup() function ? also, have you
tried to run it in debug log level to see more info ?

Regards,

Bogdan-Andrei Iancu
   OpenSIPS Founder and Developer
   http://www.opensips-solutions.com

OpenSIPS Summit May 2017 Amsterdam
   http://www.opensips.org/events/Summit-2017Amsterdam.html

On 04/11/2017 01:23 PM, Serge S. Yuriev wrote:

> Hello,
>
> How I can debug mmgeoip module? For any request it's returning Unknown.
>
> OpenSIPS 2.4.0-dev
> Params are
> modparam("mmgeoip", "mmgeoip_city_db_path", "/usr/share/GeoIP/GeoIP.dat")
> modparam("mmgeoip", "cache_type","MEM_CACHE_CHECK")
>
> DB exists and accessible, geoiplookup shows info
>
> root@rositten:/etc/opensips# geoiplookup 62.112.8.216
> GeoIP Country Edition: NL, Netherlands
> GeoIP City Edition, Rev 1: NL, N/A, N/A, N/A, N/A, 52.382401,
> 4.899500, 0, 0
> GeoIP ASNum Edition: AS49981 WorldStream B.V.
> root@rositten:/etc/opensips# geoiplookup 8.8.4.4
> GeoIP Country Edition: US, United States
> GeoIP City Edition, Rev 1: US, N/A, N/A, N/A, N/A, 37.750999,
> -97.821999, 0, 0
> GeoIP ASNum Edition: AS15169 Google Inc.
>


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MMGeoIP

Serge S. Yuriev
Hello,

Function returns -1 and prints Unknown in debug mode

On 12/04/17 16:44, Bogdan-Andrei Iancu wrote:

> Hi Serge,
>
> What is the return code of the mm_lookup() function ? also, have you
> tried to run it in debug log level to see more info ?
>
> Regards,
>
> Bogdan-Andrei Iancu
>   OpenSIPS Founder and Developer
>   http://www.opensips-solutions.com
>
> OpenSIPS Summit May 2017 Amsterdam
>   http://www.opensips.org/events/Summit-2017Amsterdam.html
>
> On 04/11/2017 01:23 PM, Serge S. Yuriev wrote:
>> Hello,
>>
>> How I can debug mmgeoip module? For any request it's returning Unknown.
>>
>> OpenSIPS 2.4.0-dev
>> Params are
>> modparam("mmgeoip", "mmgeoip_city_db_path", "/usr/share/GeoIP/GeoIP.dat")
>> modparam("mmgeoip", "cache_type","MEM_CACHE_CHECK")
>>
>> DB exists and accessible, geoiplookup shows info
>>
>> root@rositten:/etc/opensips# geoiplookup 62.112.8.216
>> GeoIP Country Edition: NL, Netherlands
>> GeoIP City Edition, Rev 1: NL, N/A, N/A, N/A, N/A, 52.382401,
>> 4.899500, 0, 0
>> GeoIP ASNum Edition: AS49981 WorldStream B.V.
>> root@rositten:/etc/opensips# geoiplookup 8.8.4.4
>> GeoIP Country Edition: US, United States
>> GeoIP City Edition, Rev 1: US, N/A, N/A, N/A, N/A, 37.750999,
>> -97.821999, 0, 0
>> GeoIP ASNum Edition: AS15169 Google Inc.
>>
>

--
Serge S. Yuriev
Lead VoIP engineer


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MMGeoIP

Bogdan-Andrei Iancu-2
Hi,

So, if you run with log_level=4 in script, what are the log messages
from the mmgeoip module ?

Regards,

Bogdan-Andrei Iancu
   OpenSIPS Founder and Developer
   http://www.opensips-solutions.com

OpenSIPS Summit May 2017 Amsterdam
   http://www.opensips.org/events/Summit-2017Amsterdam.html

On 04/12/2017 05:38 PM, Serge S. Yuriev wrote:

> Hello,
>
> Function returns -1 and prints Unknown in debug mode
>
> On 12/04/17 16:44, Bogdan-Andrei Iancu wrote:
>> Hi Serge,
>>
>> What is the return code of the mm_lookup() function ? also, have you
>> tried to run it in debug log level to see more info ?
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>>   OpenSIPS Founder and Developer
>>   http://www.opensips-solutions.com
>>
>> OpenSIPS Summit May 2017 Amsterdam
>>   http://www.opensips.org/events/Summit-2017Amsterdam.html
>>
>> On 04/11/2017 01:23 PM, Serge S. Yuriev wrote:
>>> Hello,
>>>
>>> How I can debug mmgeoip module? For any request it's returning Unknown.
>>>
>>> OpenSIPS 2.4.0-dev
>>> Params are
>>> modparam("mmgeoip", "mmgeoip_city_db_path",
>>> "/usr/share/GeoIP/GeoIP.dat")
>>> modparam("mmgeoip", "cache_type","MEM_CACHE_CHECK")
>>>
>>> DB exists and accessible, geoiplookup shows info
>>>
>>> root@rositten:/etc/opensips# geoiplookup 62.112.8.216
>>> GeoIP Country Edition: NL, Netherlands
>>> GeoIP City Edition, Rev 1: NL, N/A, N/A, N/A, N/A, 52.382401,
>>> 4.899500, 0, 0
>>> GeoIP ASNum Edition: AS49981 WorldStream B.V.
>>> root@rositten:/etc/opensips# geoiplookup 8.8.4.4
>>> GeoIP Country Edition: US, United States
>>> GeoIP City Edition, Rev 1: US, N/A, N/A, N/A, N/A, 37.750999,
>>> -97.821999, 0, 0
>>> GeoIP ASNum Edition: AS15169 Google Inc.
>>>
>>
>


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MMGeoIP

Serge S. Yuriev
Hi,

As I wrote before
DBG:mmgeoip:mmg_lookup_cmd: '62.112.8.216'--> 'Unknown'.

Called as follows
if(mmg_lookup("cc:lon:lat","$si","$avp(lat_lon)")) {
..
}

On 13/04/17 12:28, Bogdan-Andrei Iancu wrote:

> Hi,
>
> So, if you run with log_level=4 in script, what are the log messages
> from the mmgeoip module ?
>
> Regards,
>
> Bogdan-Andrei Iancu
>   OpenSIPS Founder and Developer
>   http://www.opensips-solutions.com
>
> OpenSIPS Summit May 2017 Amsterdam
>   http://www.opensips.org/events/Summit-2017Amsterdam.html
>
> On 04/12/2017 05:38 PM, Serge S. Yuriev wrote:
>> Hello,
>>
>> Function returns -1 and prints Unknown in debug mode
>>
>> On 12/04/17 16:44, Bogdan-Andrei Iancu wrote:
>>> Hi Serge,
>>>
>>> What is the return code of the mm_lookup() function ? also, have you
>>> tried to run it in debug log level to see more info ?
>>>
>>> Regards,
>>>
>>> Bogdan-Andrei Iancu
>>>   OpenSIPS Founder and Developer
>>>   http://www.opensips-solutions.com
>>>
>>> OpenSIPS Summit May 2017 Amsterdam
>>>   http://www.opensips.org/events/Summit-2017Amsterdam.html
>>>
>>> On 04/11/2017 01:23 PM, Serge S. Yuriev wrote:
>>>> Hello,
>>>>
>>>> How I can debug mmgeoip module? For any request it's returning Unknown.
>>>>
>>>> OpenSIPS 2.4.0-dev
>>>> Params are
>>>> modparam("mmgeoip", "mmgeoip_city_db_path",
>>>> "/usr/share/GeoIP/GeoIP.dat")
>>>> modparam("mmgeoip", "cache_type","MEM_CACHE_CHECK")
>>>>
>>>> DB exists and accessible, geoiplookup shows info
>>>>
>>>> root@rositten:/etc/opensips# geoiplookup 62.112.8.216
>>>> GeoIP Country Edition: NL, Netherlands
>>>> GeoIP City Edition, Rev 1: NL, N/A, N/A, N/A, N/A, 52.382401,
>>>> 4.899500, 0, 0
>>>> GeoIP ASNum Edition: AS49981 WorldStream B.V.
>>>> root@rositten:/etc/opensips# geoiplookup 8.8.4.4
>>>> GeoIP Country Edition: US, United States
>>>> GeoIP City Edition, Rev 1: US, N/A, N/A, N/A, N/A, 37.750999,
>>>> -97.821999, 0, 0
>>>> GeoIP ASNum Edition: AS15169 Google Inc.
>>>>
>>>
>>
>

--
Serge S. Yuriev
Lead VoIP engineer


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MMGeoIP

Bogdan-Andrei Iancu-2
Ok, so the IP to be looked up is properly determined. Have you tried to
change the cache_type to other values ?

Regards,

Bogdan-Andrei Iancu
   OpenSIPS Founder and Developer
   http://www.opensips-solutions.com

OpenSIPS Summit May 2017 Amsterdam
   http://www.opensips.org/events/Summit-2017Amsterdam.html

On 04/13/2017 02:03 PM, Serge S. Yuriev wrote:

> Hi,
>
> As I wrote before
> DBG:mmgeoip:mmg_lookup_cmd: '62.112.8.216'--> 'Unknown'.
>
> Called as follows
> if(mmg_lookup("cc:lon:lat","$si","$avp(lat_lon)")) {
> ..
> }
>
> On 13/04/17 12:28, Bogdan-Andrei Iancu wrote:
>> Hi,
>>
>> So, if you run with log_level=4 in script, what are the log messages
>> from the mmgeoip module ?
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>>   OpenSIPS Founder and Developer
>>   http://www.opensips-solutions.com
>>
>> OpenSIPS Summit May 2017 Amsterdam
>>   http://www.opensips.org/events/Summit-2017Amsterdam.html
>>
>> On 04/12/2017 05:38 PM, Serge S. Yuriev wrote:
>>> Hello,
>>>
>>> Function returns -1 and prints Unknown in debug mode
>>>
>>> On 12/04/17 16:44, Bogdan-Andrei Iancu wrote:
>>>> Hi Serge,
>>>>
>>>> What is the return code of the mm_lookup() function ? also, have you
>>>> tried to run it in debug log level to see more info ?
>>>>
>>>> Regards,
>>>>
>>>> Bogdan-Andrei Iancu
>>>>   OpenSIPS Founder and Developer
>>>>   http://www.opensips-solutions.com
>>>>
>>>> OpenSIPS Summit May 2017 Amsterdam
>>>>   http://www.opensips.org/events/Summit-2017Amsterdam.html
>>>>
>>>> On 04/11/2017 01:23 PM, Serge S. Yuriev wrote:
>>>>> Hello,
>>>>>
>>>>> How I can debug mmgeoip module? For any request it's returning
>>>>> Unknown.
>>>>>
>>>>> OpenSIPS 2.4.0-dev
>>>>> Params are
>>>>> modparam("mmgeoip", "mmgeoip_city_db_path",
>>>>> "/usr/share/GeoIP/GeoIP.dat")
>>>>> modparam("mmgeoip", "cache_type","MEM_CACHE_CHECK")
>>>>>
>>>>> DB exists and accessible, geoiplookup shows info
>>>>>
>>>>> root@rositten:/etc/opensips# geoiplookup 62.112.8.216
>>>>> GeoIP Country Edition: NL, Netherlands
>>>>> GeoIP City Edition, Rev 1: NL, N/A, N/A, N/A, N/A, 52.382401,
>>>>> 4.899500, 0, 0
>>>>> GeoIP ASNum Edition: AS49981 WorldStream B.V.
>>>>> root@rositten:/etc/opensips# geoiplookup 8.8.4.4
>>>>> GeoIP Country Edition: US, United States
>>>>> GeoIP City Edition, Rev 1: US, N/A, N/A, N/A, N/A, 37.750999,
>>>>> -97.821999, 0, 0
>>>>> GeoIP ASNum Edition: AS15169 Google Inc.
>>>>>
>>>>
>>>
>>
>


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MMGeoIP

Serge S. Yuriev
Yes, I tried all types and no param at all. Result the same

On 13/04/17 14:32, Bogdan-Andrei Iancu wrote:

> Ok, so the IP to be looked up is properly determined. Have you tried to
> change the cache_type to other values ?
>
> Regards,
>
> Bogdan-Andrei Iancu
>   OpenSIPS Founder and Developer
>   http://www.opensips-solutions.com
>
> OpenSIPS Summit May 2017 Amsterdam
>   http://www.opensips.org/events/Summit-2017Amsterdam.html
>
> On 04/13/2017 02:03 PM, Serge S. Yuriev wrote:
>> Hi,
>>
>> As I wrote before
>> DBG:mmgeoip:mmg_lookup_cmd: '62.112.8.216'--> 'Unknown'.
>>
>> Called as follows
>> if(mmg_lookup("cc:lon:lat","$si","$avp(lat_lon)")) {
>> ..
>> }
>>
>> On 13/04/17 12:28, Bogdan-Andrei Iancu wrote:
>>> Hi,
>>>
>>> So, if you run with log_level=4 in script, what are the log messages
>>> from the mmgeoip module ?
>>>
>>> Regards,
>>>
>>> Bogdan-Andrei Iancu
>>>   OpenSIPS Founder and Developer
>>>   http://www.opensips-solutions.com
>>>
>>> OpenSIPS Summit May 2017 Amsterdam
>>>   http://www.opensips.org/events/Summit-2017Amsterdam.html
>>>
>>> On 04/12/2017 05:38 PM, Serge S. Yuriev wrote:
>>>> Hello,
>>>>
>>>> Function returns -1 and prints Unknown in debug mode
>>>>
>>>> On 12/04/17 16:44, Bogdan-Andrei Iancu wrote:
>>>>> Hi Serge,
>>>>>
>>>>> What is the return code of the mm_lookup() function ? also, have you
>>>>> tried to run it in debug log level to see more info ?
>>>>>
>>>>> Regards,
>>>>>
>>>>> Bogdan-Andrei Iancu
>>>>>   OpenSIPS Founder and Developer
>>>>>   http://www.opensips-solutions.com
>>>>>
>>>>> OpenSIPS Summit May 2017 Amsterdam
>>>>>   http://www.opensips.org/events/Summit-2017Amsterdam.html
>>>>>
>>>>> On 04/11/2017 01:23 PM, Serge S. Yuriev wrote:
>>>>>> Hello,
>>>>>>
>>>>>> How I can debug mmgeoip module? For any request it's returning
>>>>>> Unknown.
>>>>>>
>>>>>> OpenSIPS 2.4.0-dev
>>>>>> Params are
>>>>>> modparam("mmgeoip", "mmgeoip_city_db_path",
>>>>>> "/usr/share/GeoIP/GeoIP.dat")
>>>>>> modparam("mmgeoip", "cache_type","MEM_CACHE_CHECK")
>>>>>>
>>>>>> DB exists and accessible, geoiplookup shows info
>>>>>>
>>>>>> root@rositten:/etc/opensips# geoiplookup 62.112.8.216
>>>>>> GeoIP Country Edition: NL, Netherlands
>>>>>> GeoIP City Edition, Rev 1: NL, N/A, N/A, N/A, N/A, 52.382401,
>>>>>> 4.899500, 0, 0
>>>>>> GeoIP ASNum Edition: AS49981 WorldStream B.V.
>>>>>> root@rositten:/etc/opensips# geoiplookup 8.8.4.4
>>>>>> GeoIP Country Edition: US, United States
>>>>>> GeoIP City Edition, Rev 1: US, N/A, N/A, N/A, N/A, 37.750999,
>>>>>> -97.821999, 0, 0
>>>>>> GeoIP ASNum Edition: AS15169 Google Inc.
>>>>>>
>>>>>
>>>>
>>>
>>
>

--
Serge S. Yuriev
Lead VoIP engineer


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MMGeoIP

Serge S. Yuriev
I managed to resolve this by reading module docs from Kamailio ;)
Problem was in datafile: GeoIP.dat is GeoLite-Country while module
expects GeoLite-City so after loading correct file resolving working as
expected.
Sorry for noise.

On 13/04/17 15:28, Serge S. Yuriev wrote:

> Yes, I tried all types and no param at all. Result the same
>
> On 13/04/17 14:32, Bogdan-Andrei Iancu wrote:
>> Ok, so the IP to be looked up is properly determined. Have you tried to
>> change the cache_type to other values ?
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>>   OpenSIPS Founder and Developer
>>   http://www.opensips-solutions.com
>>
>> OpenSIPS Summit May 2017 Amsterdam
>>   http://www.opensips.org/events/Summit-2017Amsterdam.html
>>
>> On 04/13/2017 02:03 PM, Serge S. Yuriev wrote:
>>> Hi,
>>>
>>> As I wrote before
>>> DBG:mmgeoip:mmg_lookup_cmd: '62.112.8.216'--> 'Unknown'.
>>>
>>> Called as follows
>>> if(mmg_lookup("cc:lon:lat","$si","$avp(lat_lon)")) {
>>> ..
>>> }
>>>
>>> On 13/04/17 12:28, Bogdan-Andrei Iancu wrote:
>>>> Hi,
>>>>
>>>> So, if you run with log_level=4 in script, what are the log messages
>>>> from the mmgeoip module ?
>>>>
>>>> Regards,
>>>>
>>>> Bogdan-Andrei Iancu
>>>>   OpenSIPS Founder and Developer
>>>>   http://www.opensips-solutions.com
>>>>
>>>> OpenSIPS Summit May 2017 Amsterdam
>>>>   http://www.opensips.org/events/Summit-2017Amsterdam.html
>>>>
>>>> On 04/12/2017 05:38 PM, Serge S. Yuriev wrote:
>>>>> Hello,
>>>>>
>>>>> Function returns -1 and prints Unknown in debug mode
>>>>>
>>>>> On 12/04/17 16:44, Bogdan-Andrei Iancu wrote:
>>>>>> Hi Serge,
>>>>>>
>>>>>> What is the return code of the mm_lookup() function ? also, have you
>>>>>> tried to run it in debug log level to see more info ?
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> Bogdan-Andrei Iancu
>>>>>>   OpenSIPS Founder and Developer
>>>>>>   http://www.opensips-solutions.com
>>>>>>
>>>>>> OpenSIPS Summit May 2017 Amsterdam
>>>>>>   http://www.opensips.org/events/Summit-2017Amsterdam.html
>>>>>>
>>>>>> On 04/11/2017 01:23 PM, Serge S. Yuriev wrote:
>>>>>>> Hello,
>>>>>>>
>>>>>>> How I can debug mmgeoip module? For any request it's returning
>>>>>>> Unknown.
>>>>>>>
>>>>>>> OpenSIPS 2.4.0-dev
>>>>>>> Params are
>>>>>>> modparam("mmgeoip", "mmgeoip_city_db_path",
>>>>>>> "/usr/share/GeoIP/GeoIP.dat")
>>>>>>> modparam("mmgeoip", "cache_type","MEM_CACHE_CHECK")
>>>>>>>
>>>>>>> DB exists and accessible, geoiplookup shows info
>>>>>>>
>>>>>>> root@rositten:/etc/opensips# geoiplookup 62.112.8.216
>>>>>>> GeoIP Country Edition: NL, Netherlands
>>>>>>> GeoIP City Edition, Rev 1: NL, N/A, N/A, N/A, N/A, 52.382401,
>>>>>>> 4.899500, 0, 0
>>>>>>> GeoIP ASNum Edition: AS49981 WorldStream B.V.
>>>>>>> root@rositten:/etc/opensips# geoiplookup 8.8.4.4
>>>>>>> GeoIP Country Edition: US, United States
>>>>>>> GeoIP City Edition, Rev 1: US, N/A, N/A, N/A, N/A, 37.750999,
>>>>>>> -97.821999, 0, 0
>>>>>>> GeoIP ASNum Edition: AS15169 Google Inc.
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

--
Serge S. Yuriev
Lead VoIP engineer


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MMGeoIP

Bogdan-Andrei Iancu-2
Good !!

Is the correct file /usr/share/GeoIP/GeoLiteCity.dat ?

Regards,

Bogdan-Andrei Iancu
   OpenSIPS Founder and Developer
   http://www.opensips-solutions.com

OpenSIPS Summit May 2017 Amsterdam
   http://www.opensips.org/events/Summit-2017Amsterdam.html

On 04/13/2017 04:28 PM, Serge S. Yuriev wrote:

> I managed to resolve this by reading module docs from Kamailio ;)
> Problem was in datafile: GeoIP.dat is GeoLite-Country while module
> expects GeoLite-City so after loading correct file resolving working
> as expected.
> Sorry for noise.
>
> On 13/04/17 15:28, Serge S. Yuriev wrote:
>> Yes, I tried all types and no param at all. Result the same
>>
>> On 13/04/17 14:32, Bogdan-Andrei Iancu wrote:
>>> Ok, so the IP to be looked up is properly determined. Have you tried to
>>> change the cache_type to other values ?
>>>
>>> Regards,
>>>
>>> Bogdan-Andrei Iancu
>>>   OpenSIPS Founder and Developer
>>>   http://www.opensips-solutions.com
>>>
>>> OpenSIPS Summit May 2017 Amsterdam
>>>   http://www.opensips.org/events/Summit-2017Amsterdam.html
>>>
>>> On 04/13/2017 02:03 PM, Serge S. Yuriev wrote:
>>>> Hi,
>>>>
>>>> As I wrote before
>>>> DBG:mmgeoip:mmg_lookup_cmd: '62.112.8.216'--> 'Unknown'.
>>>>
>>>> Called as follows
>>>> if(mmg_lookup("cc:lon:lat","$si","$avp(lat_lon)")) {
>>>> ..
>>>> }
>>>>
>>>> On 13/04/17 12:28, Bogdan-Andrei Iancu wrote:
>>>>> Hi,
>>>>>
>>>>> So, if you run with log_level=4 in script, what are the log messages
>>>>> from the mmgeoip module ?
>>>>>
>>>>> Regards,
>>>>>
>>>>> Bogdan-Andrei Iancu
>>>>>   OpenSIPS Founder and Developer
>>>>>   http://www.opensips-solutions.com
>>>>>
>>>>> OpenSIPS Summit May 2017 Amsterdam
>>>>>   http://www.opensips.org/events/Summit-2017Amsterdam.html
>>>>>
>>>>> On 04/12/2017 05:38 PM, Serge S. Yuriev wrote:
>>>>>> Hello,
>>>>>>
>>>>>> Function returns -1 and prints Unknown in debug mode
>>>>>>
>>>>>> On 12/04/17 16:44, Bogdan-Andrei Iancu wrote:
>>>>>>> Hi Serge,
>>>>>>>
>>>>>>> What is the return code of the mm_lookup() function ? also, have
>>>>>>> you
>>>>>>> tried to run it in debug log level to see more info ?
>>>>>>>
>>>>>>> Regards,
>>>>>>>
>>>>>>> Bogdan-Andrei Iancu
>>>>>>>   OpenSIPS Founder and Developer
>>>>>>>   http://www.opensips-solutions.com
>>>>>>>
>>>>>>> OpenSIPS Summit May 2017 Amsterdam
>>>>>>> http://www.opensips.org/events/Summit-2017Amsterdam.html
>>>>>>>
>>>>>>> On 04/11/2017 01:23 PM, Serge S. Yuriev wrote:
>>>>>>>> Hello,
>>>>>>>>
>>>>>>>> How I can debug mmgeoip module? For any request it's returning
>>>>>>>> Unknown.
>>>>>>>>
>>>>>>>> OpenSIPS 2.4.0-dev
>>>>>>>> Params are
>>>>>>>> modparam("mmgeoip", "mmgeoip_city_db_path",
>>>>>>>> "/usr/share/GeoIP/GeoIP.dat")
>>>>>>>> modparam("mmgeoip", "cache_type","MEM_CACHE_CHECK")
>>>>>>>>
>>>>>>>> DB exists and accessible, geoiplookup shows info
>>>>>>>>
>>>>>>>> root@rositten:/etc/opensips# geoiplookup 62.112.8.216
>>>>>>>> GeoIP Country Edition: NL, Netherlands
>>>>>>>> GeoIP City Edition, Rev 1: NL, N/A, N/A, N/A, N/A, 52.382401,
>>>>>>>> 4.899500, 0, 0
>>>>>>>> GeoIP ASNum Edition: AS49981 WorldStream B.V.
>>>>>>>> root@rositten:/etc/opensips# geoiplookup 8.8.4.4
>>>>>>>> GeoIP Country Edition: US, United States
>>>>>>>> GeoIP City Edition, Rev 1: US, N/A, N/A, N/A, N/A, 37.750999,
>>>>>>>> -97.821999, 0, 0
>>>>>>>> GeoIP ASNum Edition: AS15169 Google Inc.
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MMGeoIP

Serge S. Yuriev
Yes, this file for IPv4.
For IPv6 /usr/share/GeoIP/GeoLiteCityv6.dat

On 13/04/17 16:37, Bogdan-Andrei Iancu wrote:

> Good !!
>
> Is the correct file /usr/share/GeoIP/GeoLiteCity.dat ?
>
> Regards,
>
> Bogdan-Andrei Iancu
>   OpenSIPS Founder and Developer
>   http://www.opensips-solutions.com
>
> OpenSIPS Summit May 2017 Amsterdam
>   http://www.opensips.org/events/Summit-2017Amsterdam.html
>
> On 04/13/2017 04:28 PM, Serge S. Yuriev wrote:
>> I managed to resolve this by reading module docs from Kamailio ;)
>> Problem was in datafile: GeoIP.dat is GeoLite-Country while module
>> expects GeoLite-City so after loading correct file resolving working
>> as expected.
>> Sorry for noise.
>>
>> On 13/04/17 15:28, Serge S. Yuriev wrote:
>>> Yes, I tried all types and no param at all. Result the same
>>>
>>> On 13/04/17 14:32, Bogdan-Andrei Iancu wrote:
>>>> Ok, so the IP to be looked up is properly determined. Have you tried to
>>>> change the cache_type to other values ?
>>>>
>>>> Regards,
>>>>
>>>> Bogdan-Andrei Iancu
>>>>   OpenSIPS Founder and Developer
>>>>   http://www.opensips-solutions.com
>>>>
>>>> OpenSIPS Summit May 2017 Amsterdam
>>>>   http://www.opensips.org/events/Summit-2017Amsterdam.html
>>>>
>>>> On 04/13/2017 02:03 PM, Serge S. Yuriev wrote:
>>>>> Hi,
>>>>>
>>>>> As I wrote before
>>>>> DBG:mmgeoip:mmg_lookup_cmd: '62.112.8.216'--> 'Unknown'.
>>>>>
>>>>> Called as follows
>>>>> if(mmg_lookup("cc:lon:lat","$si","$avp(lat_lon)")) {
>>>>> ..
>>>>> }
>>>>>
>>>>> On 13/04/17 12:28, Bogdan-Andrei Iancu wrote:
>>>>>> Hi,
>>>>>>
>>>>>> So, if you run with log_level=4 in script, what are the log messages
>>>>>> from the mmgeoip module ?
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> Bogdan-Andrei Iancu
>>>>>>   OpenSIPS Founder and Developer
>>>>>>   http://www.opensips-solutions.com
>>>>>>
>>>>>> OpenSIPS Summit May 2017 Amsterdam
>>>>>>   http://www.opensips.org/events/Summit-2017Amsterdam.html
>>>>>>
>>>>>> On 04/12/2017 05:38 PM, Serge S. Yuriev wrote:
>>>>>>> Hello,
>>>>>>>
>>>>>>> Function returns -1 and prints Unknown in debug mode
>>>>>>>
>>>>>>> On 12/04/17 16:44, Bogdan-Andrei Iancu wrote:
>>>>>>>> Hi Serge,
>>>>>>>>
>>>>>>>> What is the return code of the mm_lookup() function ? also, have
>>>>>>>> you
>>>>>>>> tried to run it in debug log level to see more info ?
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>>
>>>>>>>> Bogdan-Andrei Iancu
>>>>>>>>   OpenSIPS Founder and Developer
>>>>>>>>   http://www.opensips-solutions.com
>>>>>>>>
>>>>>>>> OpenSIPS Summit May 2017 Amsterdam
>>>>>>>> http://www.opensips.org/events/Summit-2017Amsterdam.html
>>>>>>>>
>>>>>>>> On 04/11/2017 01:23 PM, Serge S. Yuriev wrote:
>>>>>>>>> Hello,
>>>>>>>>>
>>>>>>>>> How I can debug mmgeoip module? For any request it's returning
>>>>>>>>> Unknown.
>>>>>>>>>
>>>>>>>>> OpenSIPS 2.4.0-dev
>>>>>>>>> Params are
>>>>>>>>> modparam("mmgeoip", "mmgeoip_city_db_path",
>>>>>>>>> "/usr/share/GeoIP/GeoIP.dat")
>>>>>>>>> modparam("mmgeoip", "cache_type","MEM_CACHE_CHECK")
>>>>>>>>>
>>>>>>>>> DB exists and accessible, geoiplookup shows info
>>>>>>>>>
>>>>>>>>> root@rositten:/etc/opensips# geoiplookup 62.112.8.216
>>>>>>>>> GeoIP Country Edition: NL, Netherlands
>>>>>>>>> GeoIP City Edition, Rev 1: NL, N/A, N/A, N/A, N/A, 52.382401,
>>>>>>>>> 4.899500, 0, 0
>>>>>>>>> GeoIP ASNum Edition: AS49981 WorldStream B.V.
>>>>>>>>> root@rositten:/etc/opensips# geoiplookup 8.8.4.4
>>>>>>>>> GeoIP Country Edition: US, United States
>>>>>>>>> GeoIP City Edition, Rev 1: US, N/A, N/A, N/A, N/A, 37.750999,
>>>>>>>>> -97.821999, 0, 0
>>>>>>>>> GeoIP ASNum Edition: AS15169 Google Inc.
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

--
Serge S. Yuriev
Lead VoIP engineer


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: MMGeoIP

Bogdan-Andrei Iancu-2
In this case, the opensips docs would also have helped you:
http://www.opensips.org/html/docs/modules/2.2.x/mmgeoip.html#idp55120

Regards,

Bogdan-Andrei Iancu
   OpenSIPS Founder and Developer
   http://www.opensips-solutions.com

OpenSIPS Summit May 2017 Amsterdam
   http://www.opensips.org/events/Summit-2017Amsterdam.html

On 04/13/2017 05:38 PM, Serge S. Yuriev wrote:

> Yes, this file for IPv4.
> For IPv6 /usr/share/GeoIP/GeoLiteCityv6.dat
>
> On 13/04/17 16:37, Bogdan-Andrei Iancu wrote:
>> Good !!
>>
>> Is the correct file /usr/share/GeoIP/GeoLiteCity.dat ?
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>>   OpenSIPS Founder and Developer
>>   http://www.opensips-solutions.com
>>
>> OpenSIPS Summit May 2017 Amsterdam
>>   http://www.opensips.org/events/Summit-2017Amsterdam.html
>>
>> On 04/13/2017 04:28 PM, Serge S. Yuriev wrote:
>>> I managed to resolve this by reading module docs from Kamailio ;)
>>> Problem was in datafile: GeoIP.dat is GeoLite-Country while module
>>> expects GeoLite-City so after loading correct file resolving working
>>> as expected.
>>> Sorry for noise.
>>>
>>> On 13/04/17 15:28, Serge S. Yuriev wrote:
>>>> Yes, I tried all types and no param at all. Result the same
>>>>
>>>> On 13/04/17 14:32, Bogdan-Andrei Iancu wrote:
>>>>> Ok, so the IP to be looked up is properly determined. Have you
>>>>> tried to
>>>>> change the cache_type to other values ?
>>>>>
>>>>> Regards,
>>>>>
>>>>> Bogdan-Andrei Iancu
>>>>>   OpenSIPS Founder and Developer
>>>>>   http://www.opensips-solutions.com
>>>>>
>>>>> OpenSIPS Summit May 2017 Amsterdam
>>>>>   http://www.opensips.org/events/Summit-2017Amsterdam.html
>>>>>
>>>>> On 04/13/2017 02:03 PM, Serge S. Yuriev wrote:
>>>>>> Hi,
>>>>>>
>>>>>> As I wrote before
>>>>>> DBG:mmgeoip:mmg_lookup_cmd: '62.112.8.216'--> 'Unknown'.
>>>>>>
>>>>>> Called as follows
>>>>>> if(mmg_lookup("cc:lon:lat","$si","$avp(lat_lon)")) {
>>>>>> ..
>>>>>> }
>>>>>>
>>>>>> On 13/04/17 12:28, Bogdan-Andrei Iancu wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> So, if you run with log_level=4 in script, what are the log
>>>>>>> messages
>>>>>>> from the mmgeoip module ?
>>>>>>>
>>>>>>> Regards,
>>>>>>>
>>>>>>> Bogdan-Andrei Iancu
>>>>>>>   OpenSIPS Founder and Developer
>>>>>>>   http://www.opensips-solutions.com
>>>>>>>
>>>>>>> OpenSIPS Summit May 2017 Amsterdam
>>>>>>> http://www.opensips.org/events/Summit-2017Amsterdam.html
>>>>>>>
>>>>>>> On 04/12/2017 05:38 PM, Serge S. Yuriev wrote:
>>>>>>>> Hello,
>>>>>>>>
>>>>>>>> Function returns -1 and prints Unknown in debug mode
>>>>>>>>
>>>>>>>> On 12/04/17 16:44, Bogdan-Andrei Iancu wrote:
>>>>>>>>> Hi Serge,
>>>>>>>>>
>>>>>>>>> What is the return code of the mm_lookup() function ? also, have
>>>>>>>>> you
>>>>>>>>> tried to run it in debug log level to see more info ?
>>>>>>>>>
>>>>>>>>> Regards,
>>>>>>>>>
>>>>>>>>> Bogdan-Andrei Iancu
>>>>>>>>>   OpenSIPS Founder and Developer
>>>>>>>>>   http://www.opensips-solutions.com
>>>>>>>>>
>>>>>>>>> OpenSIPS Summit May 2017 Amsterdam
>>>>>>>>> http://www.opensips.org/events/Summit-2017Amsterdam.html
>>>>>>>>>
>>>>>>>>> On 04/11/2017 01:23 PM, Serge S. Yuriev wrote:
>>>>>>>>>> Hello,
>>>>>>>>>>
>>>>>>>>>> How I can debug mmgeoip module? For any request it's returning
>>>>>>>>>> Unknown.
>>>>>>>>>>
>>>>>>>>>> OpenSIPS 2.4.0-dev
>>>>>>>>>> Params are
>>>>>>>>>> modparam("mmgeoip", "mmgeoip_city_db_path",
>>>>>>>>>> "/usr/share/GeoIP/GeoIP.dat")
>>>>>>>>>> modparam("mmgeoip", "cache_type","MEM_CACHE_CHECK")
>>>>>>>>>>
>>>>>>>>>> DB exists and accessible, geoiplookup shows info
>>>>>>>>>>
>>>>>>>>>> root@rositten:/etc/opensips# geoiplookup 62.112.8.216
>>>>>>>>>> GeoIP Country Edition: NL, Netherlands
>>>>>>>>>> GeoIP City Edition, Rev 1: NL, N/A, N/A, N/A, N/A, 52.382401,
>>>>>>>>>> 4.899500, 0, 0
>>>>>>>>>> GeoIP ASNum Edition: AS49981 WorldStream B.V.
>>>>>>>>>> root@rositten:/etc/opensips# geoiplookup 8.8.4.4
>>>>>>>>>> GeoIP Country Edition: US, United States
>>>>>>>>>> GeoIP City Edition, Rev 1: US, N/A, N/A, N/A, N/A, 37.750999,
>>>>>>>>>> -97.821999, 0, 0
>>>>>>>>>> GeoIP ASNum Edition: AS15169 Google Inc.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>


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