CountryGrouping: Difference between revisions
(Add critical cdr_country_code parameter documentation and troubleshooting section) |
(Add common configuration errors section: country prefixes/rules tab, /tmp noexec mount, and multi-sensor settings) |
||
| Line 33: | Line 33: | ||
# Verify country prefixes are configured correctly in the GUI | # Verify country prefixes are configured correctly in the GUI | ||
# Make sure new calls are processed after the setting change (older CDRs will not show flags retroactively) | # Make sure new calls are processed after the setting change (older CDRs will not show flags retroactively) | ||
=== Common Configuration Errors === | |||
==== Incorrect Use of Country Prefixes/Rules Tab === | |||
The "Country prefixes/rules" tab in the GUI is designed for '''exceptions only'''. Do not place standard country codes (e.g., "32" for Belgium, "44" for UK, etc.) in this tab. Standard country codes belong in the main "country prefixes" table. | |||
Placing standard country codes in the "prefixes/rules" tab can interfere with proper country code assignment and filtering. Only use this tab for special cases or numbering rules that deviate from standard country code patterns. | |||
==== /tmp Directory Mounted with noexec === | |||
If you cannot restart or manage the sniffer service from the GUI (e.g., service restarts or upgrades fail), check the <code>/tmp</code> directory mount options: | |||
<syntaxhighlight lang="bash"> | |||
mount | grep /tmp | |||
</syntaxhighlight> | |||
If the output shows <code>noexec</code> flag (e.g., <code>tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noexec)</code>), the GUI cannot execute management scripts. Remount <code>/tmp</code> without the <code>noexec</code> flag: | |||
<syntaxhighlight lang="bash"> | |||
mount -o remount,exec /tmp | |||
</syntaxhighlight> | |||
To make this change persistent, edit your <code>/etc/fstab</code> and remove the <code>noexec</code> option from the <code>/tmp</code> mount entry. | |||
==== Multi-Sensor Setup Recommendations === | |||
In distributed architecture with multiple sensor probes and a central GUI host, consider adding these settings to the sensor probes' <code>/etc/voipmonitor.conf</code>: | |||
<pre> | |||
disable_partition_operations = yes | |||
disable_dbupgradecheck = yes | |||
</pre> | |||
These settings prevent redundant database operations on sensors, leaving the GUI host to manage partition management and database upgrades. This is especially important in setups where the GUI host has write access to the database while sensors only collect data. | |||
= CDR = | = CDR = | ||
| Line 75: | Line 110: | ||
== AI Summary for RAG == | == AI Summary for RAG == | ||
'''Summary:''' Country grouping assigns country codes to SIP source/destination IP addresses and to called/caller numbers based on international prefixes. This feature requires both sniffer configuration and GUI setup. The most critical requirement is setting <code>cdr_country_code = yes</code> in /etc/voipmonitor.conf on each sensor - without this setting, country flags will NOT appear in the CDR view even if all other settings are configured. Additionally, enable "database number lookup" in the GUI, and configure the number classification rules: international prefixes (e.g., "00" or "+"), minimum international length (for numbers without prefixes), local country assignment for unmatched numbers, and trim prefixes to remove trunk codes (e.g., stripping leading "0"). | '''Summary:''' Country grouping assigns country codes to SIP source/destination IP addresses and to called/caller numbers based on international prefixes. This feature requires both sniffer configuration and GUI setup. The most critical requirement is setting <code>cdr_country_code = yes</code> in /etc/voipmonitor.conf on each sensor - without this setting, country flags will NOT appear in the CDR view even if all other settings are configured. Additionally, enable "database number lookup" in the GUI, and configure the number classification rules: international prefixes (e.g., "00" or "+"), minimum international length (for numbers without prefixes), local country assignment for unmatched numbers, and trim prefixes to remove trunk codes (e.g., stripping leading "0"). Common configuration errors to avoid: placing standard country codes in the "Country prefixes/rules" tab (designed for exceptions only), mounting /tmp with noexec flag (prevents GUI from managing sniffer services), and not restarting sniffer after configuration changes. In multi-sensor setups, add <code>disable_partition_operations = yes</code> and <code>disable_dbupgradecheck = yes</code> to sensor probes to prevent redundant database operations. | ||
'''Keywords:''' country grouping, country flags, CDR view, cdr_country_code, international prefixes, local country, trim prefixes, database number lookup, country filtering, number classification, voipmonitor.conf, sniffer configuration | '''Keywords:''' country grouping, country flags, CDR view, cdr_country_code, international prefixes, local country, trim prefixes, database number lookup, country filtering, number classification, voipmonitor.conf, sniffer configuration, country prefixes/rules tab, noexec mount, disable_partition_operations, multi-sensor setup, troubleshooting | ||
'''Key Questions:''' | '''Key Questions:''' | ||
| Line 88: | Line 123: | ||
* How do I enable country grouping for SIP IP addresses? | * How do I enable country grouping for SIP IP addresses? | ||
* How do I configure country classification for phone numbers? | * How do I configure country classification for phone numbers? | ||
* Why is the Country prefixes/rules tab for exceptions only? | |||
* Can I place standard country codes in the.Country prefixes/rules tab? | |||
* How do I fix /tmp mounted with noexec flag for GUI service management? | |||
* What settings should I add to sensors in a multi-sensor setup? | |||
* How do I prevent redundant database operations on sensor probes? | |||
* Why is GUI unable to restart sniffer service from web interface? | |||
Revision as of 00:46, 6 January 2026
Country grouping
Settings
Country assign is implemented since sniffer 18.2 and GUI 16.11 and it assigns country to SIP source IP / destination IP and to called / caller number included in the first SIP INVITE.
Required Sniffer Configuration
For country flags to appear in the CDR view, you must enable country code processing on each sniffer sensor. Edit the sniffer configuration file (typically /etc/voipmonitor.conf)
cdr_country_code = yes
If this is set to no or commented out, country flags will not appear in the CDR view even if database number lookup is enabled and country prefixes are configured. After changing this setting, restart the sniffer service on the sensor for the changes to take effect.
GUI Configuration
For prefix matching, you need to set local country in Settings -> common settings:
- international prefixes - if calling to international destinations is prefixed with for example "00" put there 00
- min. international length - if you do not use prefix for calling to international destinations you might want to set here 10 which will treat every numbers longer than >= 10 as international number
- local numbers are in - choose to which country belongs number which does not match international prefix or min. international length
- trim prefixes - if you are using prefixes to call to special destinations or trunks (like 999 prefix) you should list it there (delimited with space)
Troubleshooting
If country flags are not appearing in the CDR view:
- Verify
cdr_country_code = yesis set in/etc/voipmonitor.confon each sensor - Restart the sniffer service after changing the configuration
- Check that "database number lookup" is enabled in Settings -> System Configuration
- Verify country prefixes are configured correctly in the GUI
- Make sure new calls are processed after the setting change (older CDRs will not show flags retroactively)
Common Configuration Errors
= Incorrect Use of Country Prefixes/Rules Tab
The "Country prefixes/rules" tab in the GUI is designed for exceptions only. Do not place standard country codes (e.g., "32" for Belgium, "44" for UK, etc.) in this tab. Standard country codes belong in the main "country prefixes" table.
Placing standard country codes in the "prefixes/rules" tab can interfere with proper country code assignment and filtering. Only use this tab for special cases or numbering rules that deviate from standard country code patterns.
= /tmp Directory Mounted with noexec
If you cannot restart or manage the sniffer service from the GUI (e.g., service restarts or upgrades fail), check the /tmp directory mount options:
mount | grep /tmp
If the output shows noexec flag (e.g., tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noexec)), the GUI cannot execute management scripts. Remount /tmp without the noexec flag:
mount -o remount,exec /tmp
To make this change persistent, edit your /etc/fstab and remove the noexec option from the /tmp mount entry.
= Multi-Sensor Setup Recommendations
In distributed architecture with multiple sensor probes and a central GUI host, consider adding these settings to the sensor probes' /etc/voipmonitor.conf:
disable_partition_operations = yes disable_dbupgradecheck = yes
These settings prevent redundant database operations on sensors, leaving the GUI host to manage partition management and database upgrades. This is especially important in setups where the GUI host has write access to the database while sensors only collect data.
CDR
Filtering
You can now filter by country IP addresses or caller/called country prefixes
CDR grid
In CDR section you should be able to see country flags in Caller and Called columns next to source and destination IP addresses and next to source / destination numbers.
CDR group panel
There are new grouping options - country by numbers or by ip address (src/dst)
CDR top calls
In CDR group panel tab -> top calls there are also grouping by country src/dst IP / numbers
Dashboard
In dashboard you can create custom CDR grid grouped by country IP/number
Report
You can create report which will show the same table as in dashboard
AI Summary for RAG
Summary: Country grouping assigns country codes to SIP source/destination IP addresses and to called/caller numbers based on international prefixes. This feature requires both sniffer configuration and GUI setup. The most critical requirement is setting cdr_country_code = yes in /etc/voipmonitor.conf on each sensor - without this setting, country flags will NOT appear in the CDR view even if all other settings are configured. Additionally, enable "database number lookup" in the GUI, and configure the number classification rules: international prefixes (e.g., "00" or "+"), minimum international length (for numbers without prefixes), local country assignment for unmatched numbers, and trim prefixes to remove trunk codes (e.g., stripping leading "0"). Common configuration errors to avoid: placing standard country codes in the "Country prefixes/rules" tab (designed for exceptions only), mounting /tmp with noexec flag (prevents GUI from managing sniffer services), and not restarting sniffer after configuration changes. In multi-sensor setups, add disable_partition_operations = yes and disable_dbupgradecheck = yes to sensor probes to prevent redundant database operations.
Keywords: country grouping, country flags, CDR view, cdr_country_code, international prefixes, local country, trim prefixes, database number lookup, country filtering, number classification, voipmonitor.conf, sniffer configuration, country prefixes/rules tab, noexec mount, disable_partition_operations, multi-sensor setup, troubleshooting
Key Questions:
- Why are country flags not appearing in the CDR view?
- How do I enable country flags in VoIPmonitor?
- What is the cdr_country_code setting?
- How do I configure international prefixes and local country?
- What is the difference between international prefixes and local country?
- How do I filter CDRs by country?
- How do I enable country grouping for SIP IP addresses?
- How do I configure country classification for phone numbers?
- Why is the Country prefixes/rules tab for exceptions only?
- Can I place standard country codes in the.Country prefixes/rules tab?
- How do I fix /tmp mounted with noexec flag for GUI service management?
- What settings should I add to sensors in a multi-sensor setup?
- How do I prevent redundant database operations on sensor probes?
- Why is GUI unable to restart sniffer service from web interface?






