[OpenSIPS-Users] MMGeoIP
Serge S. Yuriev
me at nevian.org
Thu Apr 13 09:28:55 EDT 2017
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 at 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 at 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
More information about the Users
mailing list