Order of GeoIP processing: Difference between revisions

From VoIPmonitor.org
(Review: improved formatting, structure, code syntax highlighting, added Category tag)
(Rewrite: add GeoIP use cases intro, consolidate manual import, improve tables)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{DISPLAYTITLE:Order of GeoIP Processing}}
[[Category:Configuration]]
[[Category:Configuration]]
= Dashboard =


Dashboard allows placing panels with various types of data which can be refreshed on regular basis. The main purpose of this feature is to have realtime overview on the whole system or part of it. You can create your own panel layout templates and load them whenever you need them. Each user can create his own layouts which will be visible only to him or admin can creates global layouts visible for all users.
= GeoIP Processing =


You can open dashboard template with direct URL:
VoIPmonitor uses GeoIP services to determine geographic location of IP addresses for:
* '''Anti-fraud alerts''' - Detecting calls to/from unexpected countries (see [[Anti-fraud]])
* '''CDR enrichment''' - Adding country information to call records
* '''Reporting''' - Country-based statistics and filtering


<code>http://localhost/voipmon/admin.php?user=yourUser&password=yourPass&dashboard=Default&hidemenu=1</code>
== Processing Priority ==


[[File:dashboardv2.png|Dashboard default template]]
The system uses a fallback mechanism, trying each method in order until successful:


== Add panel ==
<kroki lang="mermaid">
%%{init: {'flowchart': {'nodeSpacing': 15, 'rankSpacing': 40}}}%%
flowchart TB
    A[IP Address] --> B{MaxMind API}
    B -->|Success| Z[Return Country]
    B -->|Fail| C{IPInfoDB API}
    C -->|Success| Z
    C -->|Fail| D{Local Database}
    D -->|Success| Z
    D -->|Fail| E{Free Portals}
    E -->|Success| Z
    E -->|Fail| F[Unknown]
</kroki>


You can add as many panels as you can fit to the main layout window. The panel can be resized and moved. The panel can be locked or unlocked so you cannot move or resize them. Current layout can be saved as template by clicking on "save" button providing name of the template. If you choose existing name of a previously created panel you will be asked if you want to replace the old one. Panels on current layout can be deleted at once by clicking on "remove all panels" button. When you click on "hide menu" the current layout will hide the left menu and current layout will have maximized size.
{| class="wikitable"
! Priority !! Method !! Notes
|-
| 1 || '''MaxMind API''' || Commercial service, highest accuracy. Requires API key.
|-
| 2 || '''IPInfoDB API''' || Alternative commercial API
|-
| 3 || '''Local Database''' || File-based (<code>GeoIPCity.dat</code>) OR MySQL tables
|-
| 4 || '''Free Portals''' || Online fallback services
|}


== Panel types ==
{{Tip|For best accuracy, configure MaxMind API with a valid license key.}}


When adding new panel you can choose between various panel types:
== Configuration ==


=== CDR charts ===
'''GUI Path:''' Settings → System Configuration → GeoIP


This is analogical to the [[Charts]] section.
=== Local Database Options ===


[[File:dashboardv2-cdrcharts.png|CDR charts]]
{| class="wikitable"
! Type !! Location/Table !! Description
|-
| File-based || <code>GeoIPCity.dat</code> || Legacy MaxMind format
|-
| MySQL IPv4 || <code>geoip_country</code> || Database table for IPv4
|-
| MySQL IPv6 || <code>geoipv6_country</code> || Database table for IPv6
|}


Version tracking is stored in the <code>system</code> table:
* <code>type='geoip_country_version'</code>
* <code>type='geoipv6_country_version'</code>


=== SIP responses (pie chart) ===
== Manual GeoIP Import ==


[[File:dashboardv2-piechart.png|SIP responses pie chart]]
Use this when GUI "Update GeoIP" fails or completes partially (version shows correct but lookups fail).


=== Top IP addresses ===
'''Export from working server:'''
<syntaxhighlight lang="bash">
mysqldump -c voipmonitor geoip_country > gc.sql
mysqldump -c voipmonitor geoipv6_country > gc6.sql
</syntaxhighlight>


[[File:dashboardv2-topip.png|Top IP addresses]]
'''Import to affected server:'''
<syntaxhighlight lang="bash">
mysql voipmonitor < gc.sql
mysql voipmonitor < gc6.sql
</syntaxhighlight>


=== Custom CDR grid - by SIP IP ===
'''Update version tracking:'''
<syntaxhighlight lang="sql">
-- Replace '12' with actual version number from source
INSERT INTO system SET content='12\n', type='geoip_country_version';
INSERT INTO system SET content='12\n', type='geoipv6_country_version';
</syntaxhighlight>


Custom grids allows to see total numbers of CDR grouped by source IP or destination IP and configure custom columns like MOS, Loss, Delay etc. You can also choose which column will be sorted by default.
{{Warning|1=Ensure database name matches your installation (default: <code>voipmonitor</code>).}}


[[File:dashboardv2-customcdrform.png|Custom CDR grid - form]]
== See Also ==


[[File:dashboardv2-customcdrgridbyip.png|Custom CDR grid - by SIP IP]]
* [[Anti-fraud]] - Country-based fraud detection using GeoIP
 
* [[Groups#IP_Groups|IP Groups]] - Creating IP address groups for filtering
=== Custom CDR grid - by SIP response ===
 
Custom CDR grid by SIP responses are identical to Custom CDR grid - by SIP IP except the CDR rows are grouped by SIP responses instead of IP addresses. This is handful in case you need to see SIP responses numbers.
 
[[File:dashboardv2-customcdrgridbyresponse.png|Custom CDR grid - by SIP response]]
 
=== Register charts (beta) ===
 
This panel type visualizes SIP registration statistics on the dashboard. You can display various registration metrics including successful registrations, failed registrations, and registration states.
 
To create a dashboard with register charts:
 
# Navigate to '''GUI > Dashboard''' view
# Click "new" or "create" to create a new dashboard
# Select a desired layout for the dashboard
# For each new panel, choose the panel type "Register charts beta" from the dropdown menu
# After creating the panel, edit its settings to select a template or specific register series to display
 
Register charts require the SIP Register feature to be enabled. See [[Register]] for detailed configuration steps.


== AI Summary for RAG ==
== AI Summary for RAG ==


'''Summary:''' The Dashboard feature provides a customizable real-time monitoring interface with multiple panel types. Users can create personal layouts or admins can create global templates visible to all users. Available panel types include: CDR charts (similar to Charts section), SIP responses pie chart, Top IP addresses, Custom CDR grids grouped by SIP IP or SIP response (with configurable columns for MOS, Loss, Delay), and Register charts (beta) for SIP registration statistics. Panels can be resized, moved, locked/unlocked, and saved as templates. Direct URL access is supported with parameters for user authentication, dashboard name, and menu hiding.
'''Summary:''' Documents GeoIP processing priority in VoIPmonitor. Uses fallback mechanism: (1) MaxMind API (commercial, highest accuracy), (2) IPInfoDB API, (3) Local Database (file-based GeoIPCity.dat OR MySQL tables geoip_country/geoipv6_country), (4) Free Portals. GeoIP is used for anti-fraud alerts, CDR country enrichment, and reporting. Configuration via GUI Settings → System Configuration → GeoIP. Version tracking in system table (geoip_country_version, geoipv6_country_version). Manual import procedure: mysqldump from working installation, import to affected server, update version in system table.


'''Keywords:''' dashboard, panels, real-time monitoring, CDR charts, SIP responses, pie chart, top IP, custom grid, MOS, Loss, Delay, register charts, layout templates, global layouts, user layouts, hidemenu
'''Keywords:''' GeoIP, MaxMind, IPInfoDB, country lookup, IP geolocation, processing order, priority, fallback, local database, GeoIPCity.dat, MySQL tables, geoip_country, geoipv6_country, manual import, system table, geoip_country_version, anti-fraud, country detection


'''Key Questions:'''
'''Key Questions:'''
* How do I create a custom dashboard in VoIPmonitor?
* What is the order of GeoIP processing in VoIPmonitor?
* What panel types are available in the Dashboard?
* Which GeoIP service has highest priority?
* How do I save a dashboard layout as a template?
* Where do I configure GeoIP services in VoIPmonitor?
* How do I access the dashboard via direct URL?
* How to manually import GeoIP data when GUI update fails?
* How do I add register charts to the dashboard?
* What MySQL tables store GeoIP data?
* Can I create a dashboard visible to all users?
* What is GeoIP used for in VoIPmonitor?
* How do I display MOS/Loss/Delay metrics on the dashboard?
* How do I group CDR data by SIP response on the dashboard?

Latest revision as of 16:47, 8 January 2026


GeoIP Processing

VoIPmonitor uses GeoIP services to determine geographic location of IP addresses for:

  • Anti-fraud alerts - Detecting calls to/from unexpected countries (see Anti-fraud)
  • CDR enrichment - Adding country information to call records
  • Reporting - Country-based statistics and filtering

Processing Priority

The system uses a fallback mechanism, trying each method in order until successful:

Priority Method Notes
1 MaxMind API Commercial service, highest accuracy. Requires API key.
2 IPInfoDB API Alternative commercial API
3 Local Database File-based (GeoIPCity.dat) OR MySQL tables
4 Free Portals Online fallback services

💡 Tip: For best accuracy, configure MaxMind API with a valid license key.

Configuration

GUI Path: Settings → System Configuration → GeoIP

Local Database Options

Type Location/Table Description
File-based GeoIPCity.dat Legacy MaxMind format
MySQL IPv4 geoip_country Database table for IPv4
MySQL IPv6 geoipv6_country Database table for IPv6

Version tracking is stored in the system table:

  • type='geoip_country_version'
  • type='geoipv6_country_version'

Manual GeoIP Import

Use this when GUI "Update GeoIP" fails or completes partially (version shows correct but lookups fail).

Export from working server:

mysqldump -c voipmonitor geoip_country > gc.sql
mysqldump -c voipmonitor geoipv6_country > gc6.sql

Import to affected server:

mysql voipmonitor < gc.sql
mysql voipmonitor < gc6.sql

Update version tracking:

-- Replace '12' with actual version number from source
INSERT INTO system SET content='12\n', type='geoip_country_version';
INSERT INTO system SET content='12\n', type='geoipv6_country_version';

⚠️ Warning: Ensure database name matches your installation (default: voipmonitor).

See Also

  • Anti-fraud - Country-based fraud detection using GeoIP
  • IP Groups - Creating IP address groups for filtering

AI Summary for RAG

Summary: Documents GeoIP processing priority in VoIPmonitor. Uses fallback mechanism: (1) MaxMind API (commercial, highest accuracy), (2) IPInfoDB API, (3) Local Database (file-based GeoIPCity.dat OR MySQL tables geoip_country/geoipv6_country), (4) Free Portals. GeoIP is used for anti-fraud alerts, CDR country enrichment, and reporting. Configuration via GUI Settings → System Configuration → GeoIP. Version tracking in system table (geoip_country_version, geoipv6_country_version). Manual import procedure: mysqldump from working installation, import to affected server, update version in system table.

Keywords: GeoIP, MaxMind, IPInfoDB, country lookup, IP geolocation, processing order, priority, fallback, local database, GeoIPCity.dat, MySQL tables, geoip_country, geoipv6_country, manual import, system table, geoip_country_version, anti-fraud, country detection

Key Questions:

  • What is the order of GeoIP processing in VoIPmonitor?
  • Which GeoIP service has highest priority?
  • Where do I configure GeoIP services in VoIPmonitor?
  • How to manually import GeoIP data when GUI update fails?
  • What MySQL tables store GeoIP data?
  • What is GeoIP used for in VoIPmonitor?