Ipaccount: Difference between revisions

From VoIPmonitor.org
Jump to navigation Jump to search
(Created page with "It is used for enabling the counting of the packets per customer/resseler. in /etc/voipmonitor.conf enable following option and restart sniffer service ipaccount = yes by default the counts are increased every ipaccount_interval which is by default 300second ipaccount_interval = 300 After the sniffer service creates the agreggation tables in a DB in the GUI appears the new menuitems under the user&audit section (resellers and customers) In a GUI's configuration you...")
 
No edit summary
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
It is used for enabling the counting of the packets per customer/resseler.
== 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:


in /etc/voipmonitor.conf enable following option and restart sniffer service
  ipaccount = yes
  ipaccount = yes
 
by default the counts are increased every ipaccount_interval which is by default 300second
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


After the sniffer service creates the agreggation tables in a DB in the GUI appears the new menuitems under the user&audit section (resellers and customers)
Alternatively, for testing or debugging, you can reduce the interval:
In a GUI's configuration you can then enable following in configuration.php for the GUI in /var/www/html/config/configuration.php (when default path for the GUI is used /var/www/html):
 
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', 'customers');
  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:


above will stores the Customers into Users table, but you can force the GUI to store the Customers into separate table by definition of
  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 11: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.