Order of GeoIP processing: Difference between revisions

From VoIPmonitor.org
(Add information about how to correct incorrect GeoIP data)
(Add documentation on manually updating GeoIP database by copying tables from another system)
Line 8: Line 8:
** freegeoip
** freegeoip
** maxmind
** maxmind
== Manually Updating the Local GeoIP Database ==
If you cannot upgrade the GUI directly but need to update the local GeoIP database, you can manually copy the GeoIP tables from a system that has the latest data (e.g., a server with a recently upgraded GUI).
'''Procedure to copy GeoIP tables:'''
# On the source system (with the latest GUI version), backup the GeoIP tables:
<pre>
mysqldump -u username -p voipmonitor geoip_country geoipv6_country > geoip_tables.sql
</pre>
# Restore the backup on the target system:
<pre>
mysql -u username -p voipmonitor < geoip_tables.sql
</pre>
# Update the GeoIP version record in the `system` table to match the source version:
<pre>
# First, check the current version on the source system
mysql -u username -p -e "SELECT * FROM voipmonitor.system WHERE type = 'geoip_country_version';"
# Then set the same version on the target system (example: version 14)
mysql -u username -p -e "INSERT INTO voipmonitor.system (type, content) VALUES ('geoip_country_version', '14') ON DUPLICATE KEY UPDATE content = '14';"
</pre>
After completing these steps, the GeoIP warning popup should no longer appear, as the local database will now be up-to-date.
'''Note:''' This procedure is useful when:
* Direct GUI upgrade is not possible
* You have multiple systems and want to ensure consistent GeoIP data across them
* You need to quickly update GeoIP data without waiting for a new GUI release


== Correcting Incorrect GeoIP Data ==
== Correcting Incorrect GeoIP Data ==
Line 24: Line 54:


=== AI Summary for RAG ===
=== AI Summary for RAG ===
'''Summary:''' Describes the priority order for GeoIP services in VoIPmonitor (MaxMind API keys, local database, or free demo portals) and how to correct incorrect GeoIP data.
'''Summary:''' Describes the priority order for GeoIP services in VoIPmonitor (MaxMind API keys, local database, or free demo portals), how to manually update the local GeoIP database by copying tables between systems, and how to correct incorrect GeoIP data.


'''Keywords:''' GeoIP, MaxMind, IPInfoDB, geolocation, IP location, map, CDR, correction, update database
'''Keywords:''' GeoIP, MaxMind, IPInfoDB, geolocation, IP location, map, CDR, correction, update database, geoip_country, geoipv6_country, manual restore, copy tables


'''Key Questions:'''
'''Key Questions:'''
* What is the order of GeoIP services used by VoIPmonitor?
* What is the order of GeoIP services used by VoIPmonitor?
* How do I manually update the local GeoIP database without upgrading the GUI?
* How do I copy GeoIP tables from one system to another?
* What is the geoip_country_version in the system table?
* How do I correct incorrect GeoIP location data?
* How do I correct incorrect GeoIP location data?
* How does VoIPmonitor get GeoIP data for the map view?

Revision as of 05:46, 6 January 2026

This doc describes order of GeoIP location services used with voipmonitor GUI

In the GUI settings -> system config -> GeoIP (You can define your keys for maxmind or ipinfodb.)

  • If you define keys for both providers the 'maxmind' have precedence.
  • In case you don't define a key, the local db will be used instead (this local db is updated with each GUI release, its stored into local db.)
  • In case you have no GeoIP data downloaded in local db (voipmonitor.org unacessible from GUI server), it will use following free(demo) portals in following order:
    • ipinfodb
    • freegeoip
    • maxmind

Manually Updating the Local GeoIP Database

If you cannot upgrade the GUI directly but need to update the local GeoIP database, you can manually copy the GeoIP tables from a system that has the latest data (e.g., a server with a recently upgraded GUI).

Procedure to copy GeoIP tables:

  1. On the source system (with the latest GUI version), backup the GeoIP tables:
mysqldump -u username -p voipmonitor geoip_country geoipv6_country > geoip_tables.sql
  1. Restore the backup on the target system:
mysql -u username -p voipmonitor < geoip_tables.sql
  1. Update the GeoIP version record in the `system` table to match the source version:
# First, check the current version on the source system
mysql -u username -p -e "SELECT * FROM voipmonitor.system WHERE type = 'geoip_country_version';"

# Then set the same version on the target system (example: version 14)
mysql -u username -p -e "INSERT INTO voipmonitor.system (type, content) VALUES ('geoip_country_version', '14') ON DUPLICATE KEY UPDATE content = '14';"

After completing these steps, the GeoIP warning popup should no longer appear, as the local database will now be up-to-date.

Note: This procedure is useful when:

  • Direct GUI upgrade is not possible
  • You have multiple systems and want to ensure consistent GeoIP data across them
  • You need to quickly update GeoIP data without waiting for a new GUI release

Correcting Incorrect GeoIP Data

The GeoIP location data is sourced from MaxMind. If you encounter incorrect IP location information, you can help improve the database accuracy by submitting a correction request to MaxMind directly.

Procedure to submit a correction:

  1. Go to the MaxMind GeoIP Update Form: Submit a Correction Request
  2. Fill out the form with the IP address, country, and other location details that need to be corrected
  3. Submit the correction request to MaxMind

After MaxMind updates their database:

  1. Notify the VoIPmonitor support team about the correction you submitted
  2. The support team will release a new version of the GUI that includes the updated MaxMind database
  3. Upgrade to the latest GUI version to get the corrected GeoIP data

AI Summary for RAG

Summary: Describes the priority order for GeoIP services in VoIPmonitor (MaxMind API keys, local database, or free demo portals), how to manually update the local GeoIP database by copying tables between systems, and how to correct incorrect GeoIP data.

Keywords: GeoIP, MaxMind, IPInfoDB, geolocation, IP location, map, CDR, correction, update database, geoip_country, geoipv6_country, manual restore, copy tables

Key Questions:

  • What is the order of GeoIP services used by VoIPmonitor?
  • How do I manually update the local GeoIP database without upgrading the GUI?
  • How do I copy GeoIP tables from one system to another?
  • What is the geoip_country_version in the system table?
  • How do I correct incorrect GeoIP location data?