CountryGrouping: Difference between revisions
No edit summary |
(Add critical cdr_country_code parameter documentation and troubleshooting section) |
||
| Line 3: | Line 3: | ||
== Settings == | == 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. For prefix matching you need to set local country in Settings -> common 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 <code>/etc/voipmonitor.conf</code>) | |||
<pre> | |||
cdr_country_code = yes | |||
</pre> | |||
If this is set to <code>no</code> 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 | *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 | *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 | *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) | *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 <code>cdr_country_code = yes</code> is set in <code>/etc/voipmonitor.conf</code> on 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) | |||
= CDR = | = CDR = | ||
| Line 49: | Line 73: | ||
[[File:country_report.png]] | [[File:country_report.png]] | ||
== 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"). 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? | |||
Revision as of 05:55, 5 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)
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?






