Ipaccount: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
== IP Accounting Configuration == | |||
IP accounting is used for enabling the counting of packets per customer or reseller. To enable this, follow these steps: | |||
1. In the sniffer configuration file located at <code>/etc/voipmonitor.conf</code>, enable the following option and restart the sniffer service: | |||
ipaccount = yes | ipaccount = yes | ||
the counts are increased every ipaccount_interval which is | 2. By default, the counts are increased every <code>ipaccount_interval</code>, which is set to 300 seconds. You can adjust this interval as needed. For example, to change the interval to 10 seconds, modify the following configuration: | ||
ipaccount_interval = 300 | ipaccount_interval = 300 | ||
Alternatively, for testing or debugging, you can reduce the interval: | |||
ipaccount_interval = 10 | |||
Once the sniffer service is restarted and the aggregation tables are created in the database, new menu items will appear under the '''Users & Audit''' section in the GUI, specifically for resellers and customers. | |||
== Enabling Customer Differentiation == | |||
To enable customer differentiation in the GUI, follow these steps: | |||
1. In the GUI configuration file located at <code>/var/www/html/config/configuration.php</code> (assuming the default path for the GUI is <code>/var/www/html</code>), add the following definitions: | |||
define('ENABLE_CUSTOMERS', true); | define('ENABLE_CUSTOMERS', true); | ||
define('TYPE_CUSTOMERS_TABLES', 'users'); | define('TYPE_CUSTOMERS_TABLES', 'users'); | ||
This will store the customers in the <code>users</code> table. | |||
=== Alternative Table Structure === | |||
If you want to store customers in a separate table, rather than in the <code>users</code> table, modify the configuration as follows: | |||
define('ENABLE_CUSTOMERS', true); | define('ENABLE_CUSTOMERS', true); | ||
define('TYPE_CUSTOMERS_TABLES', 'customers'); | define('TYPE_CUSTOMERS_TABLES', 'customers'); | ||
This will create a separate table for storing customer data. The sniffer will then understand that it needs to differentiate between customers when storing data. Additionally, customers can log in to the GUI and view their data in the <code>ipacc</code> tables, including their call logs if number prefixes are specified for them. | |||
Once the customers and resellers are defined, the GUI will allow for the definition of superior and subordinate instances, further differentiating between customer levels. |
Latest revision as of 10:38, 19 September 2024
IP Accounting Configuration
IP accounting is used for enabling the counting of packets per customer or reseller. To enable this, follow these steps:
1. In the sniffer configuration file located at /etc/voipmonitor.conf
, enable the following option and restart the sniffer service:
ipaccount = yes
2. By default, the counts are increased every ipaccount_interval
, which is set to 300 seconds. You can adjust this interval as needed. For example, to change the interval to 10 seconds, modify the following configuration:
ipaccount_interval = 300
Alternatively, for testing or debugging, you can reduce the interval:
ipaccount_interval = 10
Once the sniffer service is restarted and the aggregation tables are created in the database, new menu items will appear under the Users & Audit section in the GUI, specifically for resellers and customers.
Enabling Customer Differentiation
To enable customer differentiation in the GUI, follow these steps:
1. In the GUI configuration file located at /var/www/html/config/configuration.php
(assuming the default path for the GUI is /var/www/html
), add the following definitions:
define('ENABLE_CUSTOMERS', true); define('TYPE_CUSTOMERS_TABLES', 'users');
This will store the customers in the users
table.
Alternative Table Structure
If you want to store customers in a separate table, rather than in the users
table, modify the configuration as follows:
define('ENABLE_CUSTOMERS', true); define('TYPE_CUSTOMERS_TABLES', 'customers');
This will create a separate table for storing customer data. The sniffer will then understand that it needs to differentiate between customers when storing data. Additionally, customers can log in to the GUI and view their data in the ipacc
tables, including their call logs if number prefixes are specified for them.
Once the customers and resellers are defined, the GUI will allow for the definition of superior and subordinate instances, further differentiating between customer levels.