CountryGrouping

From VoIPmonitor.org
Revision as of 05:55, 5 January 2026 by Admin (talk | contribs) (Add critical cdr_country_code parameter documentation and troubleshooting section)

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:

  1. Verify cdr_country_code = yes is set in /etc/voipmonitor.conf on each sensor
  2. Restart the sniffer service after changing the configuration
  3. Check that "database number lookup" is enabled in Settings -> System Configuration
  4. Verify country prefixes are configured correctly in the GUI
  5. Make sure new calls are processed after the setting change (older CDRs will not show flags retroactively)

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"). The Troubleshooting checklist provides step-by-step guidance when flags do not appear in the CDR view.

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

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?