Briefly about the billing system

NetUP UTM 5+ is the automated billing system designed for accounting and tariffing of provider services. The billing allows to keep directories of users, tariffs and services, account for Internet traffic and generate reports.

billing_structure

Detailed billing structure is described in the corresponding section and is available for users who are responsible for system administration.

Basic system objects

Basic objects can have a direct or indirect influence on the system logic.

User classes

In the billing users are divided into the following classes:

System users

They have access to the administration of the billing system. An ordinary user cannot be a system user at the same time, and vice versa.

Dealers

They have access to some administrator functions that allow them to manage their related users. For example, they can add services and make payments.

Users

Clients, customers, service consumers whose payment is controlled by the UTM 5+ billing system. In the billing, you can create groups and join users in them.

Card users

A type of users with special properties. Such users are created in the billing automatically as a result of prepaid card activation.

Account

Each user in the billing system can have one or several user accounts.

A User account is a system object that contains information about the user's financial status. All services that are provided to the user, both separate and as part of a tariff plan, are linked to the user's account through service and tariff links.

Account may get blocked, which suspends all services attached to it. There are three types of blocking in the UTM 5+:

  1. An Administrative blocking is activated by an administrator if it is necessary to block the user's account manually.

  2. A User blocking is activated by a user in the User Cabinet, for example, if the user does not plan to use the Internet for a certain period of time and wants to be free of charge for that period.

  3. A System blocking is activated automatically in case the sum of the accounts balance and credit becomes negative or when there are not enough funds on the user account to charge for the periodic component of service costs, as well as when a quota is exceeded.

Additional parameters for each blocking type can be set in the Charge policy settings. For example, recalculate the periodic fee when blocking is activated.

If a user account is blocked, the Internet option will automatically change its value to Off. When the blocking is removed, this parameter changes its value to On only if the Auto enable internet option is checked.
If this option is not checked and you removed the blocking manually, then go to the State settings tab and also manually set Internet ⇒ On or check the Auto enable internet option before unblocking the user account.

billing_structure

Services

A service is a system object that defines tariffing rules.

The services are connected to the user's account via service links. Service links can be created one by one or in groups as part of a tariff plan.

In the billing services are divided into two sorts and eight types.

Sorts of services:

Common service

is created without templates and is not part of the tariff plan, and can also be connected an unlimited number of times. For example, it may be a one-time service “Equipment setup”.

Tariff plan service

is created according to one of templates and can only be used as part of a tariff plan. This sort of service differs from the common one because it has the following options:

  • Attach by default – automatically activate the service when creating a tariff link.

  • Allow multiple linking means allow this service to be activated more than once.

Adding the service to a tariff plan you can modify the service parameters. Any changes apply only to this service and do not modify the template.

Service types:

One-time service

is intended for a single charge off the user’s account.
The cost of the service may be negative. In this case the charge-off turns into a contribution.
The time of charging is determined by service link parameters.
The service may also have a special parameter that requests for the exclusion of the user from some given group simultaneously with the charge-off.

Periodic service

is intended for a periodic charges off the user’s account.
The charge-off may be applied at the beginning of an accounting period, or at the end of it, or in smaller portions throughout the whole period.
The cost that is charged off in the initial accounting period may be corrected depending on the service link parameters, and the cost that is charged off in the current period may depend on the user account’s parameters as well as blocking options.

IP traffic
service

is intended for tariffing IP traffic.
The price may depend on time and on the amount of traffic consumed. A certain amount of traffic can be passed through without payment (so-called prepaid traffic). Also, maximum limits for traffic (so-called quotas) may be set up to block the user after the given amount is exhausted.

Hotspot service

is intended for providing wireless access via Wi-Fi with time-based tariffing and user authentication via RADIUS protocol or via standard web-interface of the system.
Different prices may be set for various time ranges.

Dial-up service

is intended for providing dial-up access with time-based tariffing.
Different prices may be set for various time ranges.

Telephony service

is intended to tariff phone calls.
The call cost may depend on direction and time and may include a fixed connection fee.
It is possible to provide a customer with some prepaid time.
Either the caller or the called number must be registered in the properties of the telephony service link, otherwise the charging of calls is impossible.

IPTV service

is intended to tariff IPTV services.
It is possible to provide and suspend access to certain IPTV content depending on the status of a user account, as well as charge the user account with a periodic fee.

Video on demand service

is intended to tariff Video on demand (VoD) services. It allows to provide access to certain content when a user purchases it for a while.

The service costs are specified excluding taxes.
Tax rates, including the value-added tax (VAT) and sales tax, are specified separately in the user account properties and considered in all charge-offs.
All types services, except for One-time services, have parameters of start date and end date of the service. The start date is the date when the service provision and fee charges start. The end date is the date when the providing of service stops, together with the charge-offs for the service. At this date the service is removed, if it is not attached to any service link.
Such types of services as IP traffic, Dial-up, Hotspot, Telephony and IPTV have a periodic cost component as one of their parameters. The corresponding charge-offs are made in the same way as for a periodic service, but in reports they are displayed as charges for services of corresponding types.

A Service templates are used to create services that are part of the tariff plans, and in case of automatic change of tariff plans at the time of closing the account period. The template is not a service, but a parent entity for the tariff plan services.
You can create one template for each type of service in advance, for example, a service template for the services with periodic charges, for the Internet traffic using a real IP address, and set the frequently used parameters for this type of service in the appropriate template. These parameters will be copied by default to the derived tariff plan services, once those are created.

Traffic classes

A Traffic class is a marker that determines to which traffic category it belongs. Classification of traffic is necessary to be able to charge it at different costs.

Traffic is checked against all classes in the decreasing order by ID until first match. If no match has been found, the traffic is attributed to the class with ID=0 (unclassified).

Traffic belongs to the class in the following cases:

  • traffic belongs to at least one subclass of that class;

  • traffic does not belong to any subclass of this class with the "Skip" option set;

  • traffic information came in the time range specified for the traffic class, if the time range is set.

A Traffic subclass is a set of attributes that determine whether a traffic class belongs to that class. Traffic is assigned to a subclass based on a set of attributes present in traffic data. The data contained in NetFlow packets (source and destination address and port) as well as the address of the NetFlow provider (IP router) can be used as attributes.

Traffic belongs to the subclass in the following cases:

  • sender and destination addresses belong to the corresponding networks set in the subclass parameters;

  • the rest of NetFlow record parameters is compatible with those stated in the subclass properties;

  • IP address of the NetFlow provider coincides with that set in the subclass properties, or none are set.

Accounting periods and time ranges

An Accounting period is a period of time to which various periodic activities are related, such as charge-off for periodic services.

Accounting periods are used for billing users at the same time, for example, from the first day of a month till the first day of the next month.

When an accounting period is closed, the following steps are performed:

  • recalculation of subscription fee and prepaid traffic (considering blockings);

  • transfer of the prepaid traffic left (if any) to the next accounting period;

  • charge-offs;

  • automatic change of tariff plan, if requested;

  • resetting balance to zero for those user accounts that have this option checked;

  • if Dynashape module is connected, the Delete bandwidth limit events for the IP addresses of service links subject to shaping, and execution of the corresponding firewall rules are sent;

  • automatic creation of a new accounting period.

The new period starts exactly at the end of the previous accounting period. The end time is set automatically depending on the type of period. The period type (i.e. its duration) as well as the number of charges-off per week remain unchanged. All service and tariff links referring to the previous accounting period are linked to the new period.

A Time range is a period or a combination of periods of time. Time ranges are used for services that are available only in certain periods of time, or services whose cost depends on time.

Coefficient scheme

A Coefficient scheme is a sequence of coefficients, applied to the periodic service fee. The scheme provides the possibility to change the service cost according to the set schedule.
For example, the cost of service in the first month is 50%, from the second to sixth month is 100%, the seventh month is 75%, and then all the time 100%. In this case, two coefficients should be included in the scheme: 0.50 for the first month and 0.75 for the seventh month. In those periods when the coefficients from the scheme are not valid, the cost of service is 100%.

To connect the scheme of coefficients to the service is possible while creating or editing the service.

If at least one service link refers to the service, another coefficient scheme cannot be connected to the service.

It is possible to make changes in the coefficients scheme: add and delete coefficients, change their period of validity and values. The updated coefficient scheme will be used for new service links and will not affect any of existing service links.

Currencies

A Currency is the billing unit.
The billings operates with internal conditional units. The currencies are only used for payment processing and billing. When making payments, currencies are converted to internal units. On the other hand, when a bill is issued, the internal units are converted to some currency.

Each currency is associated with the rate, interest (artificial correction to the rate) and history of rate changes during the whole period of billing. The history of exchange rate since the system’s deployment is also available in order to perform financial operations post factum. It is possible to update the rate online.

Each user (a customer) is associated with some preferred currency for billing. By default, the associated user currency is determined by the value of the system parameter ISO code of the system currency. NetUP UTM 5+ provides an opportunity to change the currency assigned to the user to any other one registered in the billing at any time. As a result of the currency change, all bills will be displayed in the new currency, regardless of the date when they were generated by the system, before or after the currency change.

Tariff plans

A Tariff plan is a bundle of services provided as a package. Attaching the tariff plan to a user, you can activate the whole package or exclude some services, as well as adjust some service settings.

The tariff plan is attached to a user account via a tariff link and tariff plan services attached via service links. Attaching the tariff plan you must select an accounting period, at the end of which the plan can be prolonged for the next period or replaced by another compatible tariff plan.

Tariff plans are compatible if they have one-to-one correspondence between their services. This means that the new tariff has only one service corresponding to the service from the previous tariff. In this case, the billing can change the tariff plan and save useful information from service links (for example, IP addresses in IP traffic service) without any operator intervention.

To make your tariff plans compatible, add to them services that are created with the same service templates. You can modify parameters of the service created by the template while adding this service to the tariff plan. Modifying will not edit the template. Any changes will affect only the service you add.

For example, a user has tariff plan #1, which includes service A, and it is expected that the user will switch to tariff plan #2 from the beginning of the next accounting period. The tariff plan #2 includes service B. In order for the correct transfer of all parameters of the service A to the service B, it is necessary that both services are produced from a common template.

Incompatible tariff plans can also be switched, but services that have no match in the tariff plan of the next accounting period will be deleted.

Charge policies

A Charge policy is a set of rules that are used when charging a user account. These rules are applied when a customer for some reason didn’t receive the service for some part of the accounting period.
For example, when a service was attached to a user in the middle of an accounting period, so the user will receive the service only for the rest of the accounting period, or when a user uses voluntary blocking, because the user does not want to receive the services for a while.
In such cases, the charge policy permits a recalculation of the service cost and charging a smaller amount or a refund if a charge-off has already been made. The recalculation is made proportionally to the part of the accounting period when the service was provided or will be provided in fact.

The cost of a service is not only influenced by the cost that is set when creating the service, but is influenced by the service link properties.

Besides the cost recalculation, the charge policy permits to recalculate the volume of provided services. For example, it is possible to recalculate the amount of prepaid traffic for the service that provides Internet access, or to recalculate the amount of free minutes for a telephony service.

Recalculation of the periodic part of the service cost and refunds are regulated by the following rules:

Recalc_periodic

The time and date of the service link creation may not match the current time and date and may be set in the future or in the past. If the date and time of the service link creation is set in the past, the current date and time is used instead.
This means that Recalculated price = (Full price for accounting period) × l1/L, if the starting date has been set in the future.
Otherwise Recalculated price = (Full price for accounting period) × l2/L.

The same rules are used to recalculate the amount of prepaid traffic or prepaid calls duration.

Besides in the charge policy settings you can set the moment when a repay should be made:

  • on block expire;

  • on payment;

  • on charge period end;

  • on remove service link.

For example, if the user blocking was activated when the accounting period has not yet ended and the funds for services during this accounting period have already been charged-off in full, then it’s necessary to return part of the funds to the user.

There are three types of blocking in the UTM 5+:

  1. An Administrative blocking is activated by an administrator if it is necessary to block the user's account manually.

  2. A User blocking is activated by a user in the User Cabinet, for example, if the user does not plan to use the Internet for a certain period of time and wants to be free of charge for that period.

  3. A System blocking is activated automatically in case the sum of the accounts balance and credit becomes negative or when there are not enough funds on the user account to charge for the periodic component of service costs, as well as when a quota is exceeded.

For each blocking type in the charge policy, you can set the following options:

  • do not charge periodic fee;

  • recalc periodic fee;

  • decrease prepaid traffic;

  • recalc prepaid telephony.

When recalculating the amount of prepaid traffic, prepaid calls or the periodic fee, it decreases corresponding to the part of the accounting period during which the account was blocked. Therefore if a user account is blocked and then is unblocked in the next accounting period, recalculation will take place twice.

Periodic fee charges for several services are done in an arbitrary order. If a charge-off leads to the system blocking of some user account, the rest charges are made according to the charge policy settings for the system blocking.

The periodic fee may be adjusted in the service link properties.

Payments

There are several ways to make a payment:

  • automatic payment via e-payment systems;

  • automatic payment via any third-party software using the utm5_payment_tool utilityl;

  • manual payment by an administrator via the UTM 5+ interface.

To divide payments by types, the billing uses payment methods.
The methods are combined into a corresponding reference book and by default it contains: cash payment, wire transfer, card payment, credit. You can add additional methods to the reference book.

Cash payment

for payments via utm5_payment_tool utility
for manual payments via the UTM 5+ interface

Wire transfer

for payments via e-payment systems

Credit

for Promised payments, which users make by themselves in personal cabinets

Promised payments are available to users if the properties of promised payments are configured in the billing.

The amounts of Credit type payments are displayed in a separate column on the user's personal account page. For such payments, the obligatory parameter is the Expiration date on which they are undone.

The amount of credit is not added to the user's total balance, but allows not blocking his personal account before the payment expiration date, in case the sum of the credit and the user balance creates a positive balance.

For example, a user has a negative balance – “-100 rubles”. The administrator gave this user a credit in the amount of 200 rubles for 3 days. In this case, the user has 3 days to recharge his balance, during which he will not be blocked, but will be able to use all already paid services and even connect some new services to the amount of 100 rubles. If the amount of services exceeds 100 rubles, the user's personal account will be blocked until his balance is positive or until a new credit is granted. If the user activates services during the credit period, the cost of services is charged from the balance. So the user will eventually pay the total amount for all services, but not the credit amount.

The administrator of UTM 5+ can manually change the credit account balance when editing the user's personal account, but cannot change the expiration date of the granted credit.

Also in the billing it is possible to make payments that allow to top up user's balance temporarily. Such payments are called expiring payments. They are also required to have an expiration date, but all methods can be used except the Credit.

Expiring payments are summed up with the user's balance and displayed in the personal account before the payment expiration date. If the amount of charges for the specified period is less than the amount of the expiring payment, the unused balance of the payment will still be charged off from the user's account when the expiry date comes.
If other payments are received before the expiry date, the combustion of all payments will be postponed until the latest expiry date.

The billing has the special report for tracking expiring payments.

The UTM 5+ has an option of payment rollback. The administrator of UTM 5+ can make a payment rollback via the context menu in the payment report.

Nominally, the rollback is done by making a payment of special method (Rollback) having the opposite sum.

The rollback procedure is not applicable to the expiring or credit payments.

Prepaid cards

The billing may work with prepaid cards intended for activation via web interface or via the utm5_tray application. A card may have either limited term of use, or an expiration date.

If the card is activated on the login page, a card user is generated by the system. User’s balance is set to the card balance value. User’s login is set to card_NUM, where card is the prefix of card user login and NUM is a number of the card.

If the card has a tariff plan attached to it, the services from this plan will be attached to the user’s personal account. If the card has limited term of use, its balance goes to the user’s account in a form of expiring payment with this term of expiration.

If the card is activated by an already existing user, the card’s balance is added to the user’s account, and the tariff plan associated with the card (if any) is ignored.

Documents

In the billing you can generate the following types of documents:

  • user info sheets;

  • contracts;

  • receipts;

  • invoices;

  • VAT invoices;

  • acceptance report;

  • detail invoice.

Documents are generated automatically from templates.

Generated documents except for contracts are not stored in system, and are rather generated immediately before use.
User contracts may be generated using a template or uploaded from a file. Each generated or uploaded contract is stored on User => Documents page.

Invoices may be created either automatically or manually. Manual invoices have no effect on the user’s account balance.

One-time services are billed as soon as these services are activated. If the user’s account has its Payment in advance option checked and the service’s charge method is set as At the start of the period, the invoices for the periodic services and for the periodic portion of special services’ price are issued at the beginning of an accounting period. Otherwise they are issued at the end of an accounting period.

Items in the automatic invoices are aggregated by tariff links (with the exception of telephony services, if any, which remain separated from the rest) and by accounting periods. Charges for the new services (those added during the current period) are also not aggregated and stay in a separate invoice, if Payment in advance is checked.

After having been generated from a template, an invoice may be edited for printing, but the changes can not be saved.

Invoices with negative VAT rate are hidden in the report.

System description

This section contains information about the structure of the billing and relationships of its components, the detailed description of the components can be found in the corresponding sections.

Detailed structure of the billing system

UTM_large

The Core is the main module responsible for the database access. The core provides access to it and processes incoming information according to the internal rules (such as tariffication, periodic write-offs). The core structure allows to use all provided resources evenly in case of high loads.

The billing core can interact with various routers and traffic information providers, as well as work over the NXT protocol with external applications. NXT (NetUP XML Transaction) is an application layer protocol that uses TCP as the transport protocol and SSL to encrypt data and authenticate the sender. A transaction is the basic data exchange unit. Each transaction may be addressed to one or more system components and includes a set of events intended for processing by the receiving component.

For more information on core components, see the Core section.

Besides the core, the billing includes auxiliary utilities responsible for the work via the RADIUS protocol, import of log files, low-level operations via the URFA protocol, interaction with payment systems and user web interface operation maintenance. Read more about the utilities in the corresponding sections.

The URFA (UTM Remote Function Access) module provides access to the billing core. It authorizes users according to CHAP scheme and provides the work of a remote user. The protocol supports data transmission and function calls.
URFA checks up whether a certain user has access to the function called, and on positive check allows the user to start the data exchange. Otherwise the access is rejected.
Each session is given a 128-bit replication-free system ID number (SID). SID can be used repeatedly to gain access to the system. In case of error when the session is restored, the SID will be deleted and the user will have to enter his login and password once more. The SID is related to the user's IP address and is automatically deleted after a certain downtime. An option of session restore is available, which requires the system user’s rights.

System users

System users have negative user ID. By default, the billing has the following system users:

init

is the top-level administrator

web

is the system account for the web interface

radius

is the system account for the RADIUS server

rfw

is the system account for the RFW daemon

dhcp

is the system account for the DHCP server

collector

is the system account for the Traffic collector daemon

A system user has the following properties:

  • login and password;

  • subnet the user is allowed to login from;

  • list of system groups to which the user belongs.

The access rights of a system user are determined by the system group where the user belongs. If a system user is a member of more than one system group, that user has summary privileges for all groups that they belong to. All calls for forbidden operations are registered in the system core journal. By default, the billing has the following system groups:

Wheel

administrators

they are permitted all system functions

Dealers

dealers

they can create users, assign services and make payments

User’s rights

Depending on the class, a user has some list of permitted functions:

  • customers are permitted to execute the functions with a negative identifier,

  • dealers are permitted to execute the functions with identifiers from 0x70000000 to 0x7fffffffff inclusive,

  • all other functions are allowed only to administrators.

Only system users are allowed to communicate over Stream, NXTv1 and NXTv2 protocols.

Logging

If a system component needs to log a message, it goes to the logging module and sends it an event level and message text.
There are following event levels:

0

EMERG

Fatal error, system operation is not possible

1

ALERT

Critical error that requires immediate action

2

CRIT

Critical error

3

ERROR

Uncritical errors

4

Warn

Warning

5

Notice

Information worth paying attention to

6

Info

General information

7

Debug

Debugging information

8

Trace

Additional debugging information

9

Stats

Statistics

The logging module puts the text to the appropriate log stream. The selection of the stream depends on the module settings and the event level. The logging stream is associated with the file specified in the module settings. By default all streams are associated with the standard error stream. There are following log streams:

Stream name Levels included

Critical

from 0 to 2

Main

from 0 to 3 + log_level

Debugging

all

Some components may activate the built-in mechanism of log file rotation. At that, after logging an event the module checks file size against some specified threshold. If the file size exceeds the threshold, the file is closed and renamed to include a certain suffix. If the file quantity is limited, the suffix is " .0 “. If the file quantity is unlimited, the suffix is " .<timestamp> ", where <timestamp> is the Unix Time Stamp of file closing time. If a file with such suffix already exists, the suffix is incremented. After that the number of files is also checked and older files are removed if the number exceeds the limit.

Logging settings for each particular module are described in more detail later on.

Ways to integrate the billing system

The versatile nature of the billing system allows integrating it into existing or intended network infrastructure in various ways:

  • if you provide your clients with access to the Internet via a hardware router that supports traffic statistics collection, and you manage the routers remotely, then a server with a billing system can be installed either inside or outside the local network, e.g. at the head office accessible via the Internet;

  • if you provide your clients with access to the Internet via a software router (PC router), take the statistics from the router interface and process the data either on a local machine, or if you transmit and process them on a remote server, then the billing system can be installed either on the router itself and on a remote server;

  • if your clients connect to the Internet via dial-up access, then the access server can be either a Cisco router or a PC router with modems connected to it. Client authentication will be performed via the RADIUS protocol, and billing can be performed either by time of connection or by traffic volume;

  • if your clients connect to the Internet via Wi-Fi, you can use the Hotspot module, which in the billing is responsible for accounting and tariffing of wireless access services.

You can get more details about all modules and billing features from our managers, who will help you to figure out what modules should be used to perform your tasks.

External charges

UTM 5+ contains an integration module intended to work with Rentsoft system, which is a distributor of software and digital content.
The charges for the subscription are made along with the charges for the Internet services. Services provided by Rentsoft are not included in the list of UTM 5+ services. The corresponding charges, however, are registered and gathered in a Custom charges report. The invoices for these charges are issued immediately upon the charge-off.
For more details on the possible settings and parameters of the integration module, see: rentsoft.ru/provider/new/netup_netup300/

Installation and startup

Every new major release of UTM 5+ is preceded by one or more versions of Release Candidates, which are suitable for early feature testing but not recommended to use in production. These are followed by the release version. If any critical problems are discovered later, one or more update versions may be issued; these contain no new functionality as compared to the release version, only the bug fixes. It is recommended to install the latest update, or just the latest release if there are no updates to it.

Getting a license key

  1. Pay the license.

  2. Log in to your personal account on our website — www.utm-billing.com/customer.php. Go to the License keys section, fill in the Request form and click on Send.

  3. When your request is processed, a list of modules available to you according to your license will appear in the section. Under the name of each module, click Activate, and then download the key – reg.sql file.
    Use this key to activate the billing. Without activation, you will only be able to use the demo mode with restrictions.

If you purchase new modules, you must activate those modules and then download the updated license key.

When the license expires, the UTM 5+ core will stop running.

Software requirements

Operating system

64-bit:
Debian Jessie is recommended / Stretch (9), CentOS 6 / 7

Database server

MySQL with InnoDB support is recommended.
Using SELinux with default settings may prevent normal operation of certain UTM 5+ components. Be sure UTM 5+ carefully setup SELinux or disable it.
Data Base Management System (DBMS) may be installed on a separate server.

Local server time

Must match the current date, otherwise the system may not work properly.

The server should have disk space for log files and files with primary traffic data, the size of which depends on the load on the system and can reach significant values.

Installation procedure

Step #1. Install the UTM 5+ package

Debian

Run the command: utm5-4.002.deb
If any library specified in the installation package dependencies is missing, the OS will display the corresponding message and interrupt the installation process. To install the missing libraries and continue to install the billing, run the command: apt-get install -f

CentOS 6 / 7

Run the command:
utm5-4.002.x86_64-centosV_x64.rpm

The installer will create /netup/ directory to store program data, configuration and log files. It will also create the following startup scripts:

/etc/init.d/utm5_core
/etc/init.d/utm5_radius
/etc/init.d/utm5_rfw
/etc/init.d/utm5_dhcp
/etc/init.d/utm5_traffic_collector

Step #2. Check and edit the core configuration file

Go to the /netup/utm5/ directory, open the utm5.cfg file and check the parameters which are responsible for database interaction.

For a detailed description of all parameters of the utm5.cfg file, see the corresponding section.

If you already have a database, specify its parameters (type, name, login/password, encoding, etc.) in the configuration file so that the core will connect to it at the first launch.

If you do not have a database, then at the first launch of the core it will be automatically created with the parameters specified in the configuration file.

If you want to enable automatic updating of the database structure and indexes at every core launch, enable verify_database and verify_database_index parameters in the configuration file. By default, the first option is enabled and the second option is disabled.

The database user account used by the UTM 5+ core must have the rights to create and modify database tables.

Step #3. Activate the license

After successfully installing the UTM 5+ package, and setting all the required configuration file parameters to appropriate values, copy the reg.sql (license key file) to the /netup/utm5/ directory

Step #4. Run the core

Start the billing core with the following command: /etc/init.d/utm5_core start

When the core is launched, the license will be automatically activated, and then the reg.sql file will be deleted. The core will connect to an existing database or create a new one, according to the parameters in the configuration file.

For CentOS only
In order to make UTM 5+ core start automatically after OS boot-up, execute the following commands (root privileges required):

chkconfig --add utm5_core
chkconfig utm5_core on

Execute similar commands for other modules of the UTM 5+, if necessary.

Follow these steps if you purchased a Telecom license.

Step #5. Get ready to launch the user cabinet and connect payment systems.

To be able to install new payment systems and service requests from user cabinet, unpack the utm5_customer_portal.zip archive and run the install.sh file as root.

You can add the utm5_customer_portal to the autorun. To do that, use the command:
systemctl enable utm5-customer-portal.service

To start, you need to execute the following command:
systemctl start utm5-customer-portal.service

Step #6. Check and edit the customer portal configuration file

Go to the /netup/utm5/ directory, open the customer_portal_config.env file and check parameters.

How to launch the billing system and personal user account

Use this instruction if you do not have other sites on your server.

If you already use UTM 5+, update your billing core first.

Step #1. Install nginx on your server

Use the command:
sudo apt install nginx

Step #2. Edit the configuration file

Go to the directory: /etc/nginx/sites-enabled/default

Replace the content with:

server { listen 80 default_server; listen [::]:80 default_server; root /var/www/; index index.html; server_name utm; location / { try_files $uri $uri/ =404; } location /api/ { proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://localhost:9080; } location /customer_api/ { proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://localhost:8000; } }

Step #3. Unpack the utm5_http.zip archive to the /var/www/utm directory

Download the archive in your personal cabinet and run the following commands:

  • to run the billing web interface

    cd /var/www/
    sudo mkdir admin
    cd admin
    sudo cp (путь к архиву) .
    sudo unzip utm5_http.zip

  • to run the web interface of the user cabinet

    cd /var/www/
    sudo mkdir cabinet
    cd cabinet
    sudo cp (путь к архиву) .
    sudo unzip utm5_customer_http.zip

Step #4. Restart nginx

sudo service nginx stop
sudo service nginx start

Step #5. Make sure that the web interface and the user cabinet are available

Enter <your server address>/admin in your browser, for example, 10.1.5.229/admin. If the browser displays a login page, you did everything correctly.

Enter <your server address>/cabinet in your browser, for example, 10.1.5.229/cabinet. If the browser displays a login page, you did everything correctly.

In the web interface for administrator go to Settings ⇒ Payment systems and activate the payment systems, which should be displayed in the user cabinet. To activate the payment system, select it from the list and set yes in the Enabled field.

How to launch the billing system with Docker

Use this manual if you have Linux (Debian) installed on your server.

Step #1. Install Docker and Docker-compose

Run the command:

apt install docker docker-compose -y

Read more about installation on the official website.

Step #2. Create docker-compose.yml file.

Save to this file the following configuration:

version: '3' services: utm: image: netup/utm:latest restart: always ports: - '11758:11758' - '9080:9080' volumes: - './log:/netup/utm5/log' links: - utmdb utmdb: image: 'mysql:5.7' environment: MYSQL_ALLOW_EMPTY_PASSWORD: 'yes' ports: - "3306:3306" utm_customer_portal: image: netup/utm_customer_portal restart: always volumes: - "./log:/customer_portal/log" links: - utm - utmdb web: image: netup/utm_http restart: always ports: - '80:80' links: - utm - utm_customer_portal

Step #3. Run docker-compose

Run the command:
docker-compose up

Step #4. Connect to the billing using the web interface

Enter <your server address>/admin in your browser, for example, localhost/admin. If the browser displays a login page, you did everything correctly.

By default, the login and password is init and init.

Step #5. Make sure the user cabinet is available

Enter <your server address>/cabinet in your browser, for example, localhost/cabinet. If the browser displays a login page, you did everything correctly.

In the web interface for administrator go to Settings ⇒ Payment systems and activate the payment systems, which should be displayed in the user cabinet. To activate the payment system, select it from the list and set yes in the Enabled field.

System core

The Core is a separate multi-threaded process that works in user mode.

To configure the core operation you can use the configuration file and the web interface for administrator.
Parameters from the configuration file are used to initialize the core and system components, so changes in parameters take effect the next time the core is launched.
The parameters that can be configured in the web interface define the behavior of the core and its components after launch. You can change the values of these parameters at any time when the core is running and the changes will take effect as soon as they are made.

Main components of the core

UTM_large

The URFA request handler (UTM Remote Function Access) is a server that invokes remote procedures.
It receives connections of clients and executes requested commands in the core. This component serves mainly as an organizer of the user and administrator interfaces.

The NetFlow buffer receives traffic data in NetFlow format version 5.7, 9, and 10 (IPFIX). Devices that do not support statistics delivery via these protocols must rely on some auxiliary utility to convert their output into compatible format.

The Traffic classifier sorts traffic by class according to the parameters specified in billing settings.
Traffic information for one customer, that hasn’t been tariffed, is stored in the primary store. After tariffication this information is extracted from the primary store and is placed to the secondary store. The customer's account is charged for the cost of the traffic stored in the secondary store when the cost of the traffic exceeds a certain amount, when it reaches the storage time limit, when the price of the traffic changes (e.g. when the traffic price depends on the amount consumed), when the core receives a SIGHUP signal and when an accounting period is being closed.

Tarifficator and classifiers are responsible for tariffication of all services, including IP traffic services. They convert the number of services provided by the operator into money equivalent, with all the dependencies specified by the billing administrator.

The Journaling module records all UTM 5+ events in log files, which allows administrators to diagnose and get information about failures.

The DBA (Database access) module converts internal data requests to external database requests.

As a database management system use MySQL.

Data is received via NetFlow buffer and URFA request handler. Input data are read from the database when the system is launched.

Changes made directly in the database afterwards may cause uncontrolled behavior of the system.

NetFlow data go to the business module where they are processed and all necessary charge-offs are calculated. At peak workloads NetFlow can be buffered to reduce possible losses. Raw NetFlow data are stored in files. A module that stores this data is created in a separate thread at startup and, if possible, with high priority.

Startup

The location of the UTM 5+ core executable file is /netup/utm5/bin/utm5_core
On the command line, you can specify the following parameters:

-p <path>

The path to the PID file

-c <path>

The path to the configuration file

-v

Version number and parameters information

There are three ways to run the utm5_core:

  1. Direct start of the /netup/utm5/bin/utm5_core executable with necessary parameters.

  2. Start on watchdog with start parameter
    /netup/utm5/bin/safe_utm5_core start
    The script will restart utm5_core automatically on failure.

  3. Start via the automatic startup script (recommended)
    /etc/init.d/utm5_core start
    To stop the utm5_core and the watchdog script, execute
    /etc/init.d/utm5_core stop

Configuration file

By default, the UTM 5+ core uses this configuration file – /netup/utm5/utm5.cfg

Config files have the following format: parameter=value.
A sequence of symbols before the equals sign is treated as parameter’s name, while the one after it stands for the parameter’s value.
Whitespaces count.
Empty lines are ignored.
A line starting with # is a comment.

Database related parameters

Parameter Possible values Default Description

database_type

mysql

mandatory parameter

Database type

database

string

mandatory parameter

Database name

database_host

string

localhost

Database host address

database_login

string

current user’s login

Database access login

database_password

string

empty string

Database access password

database_sock_path
Valid only for MySQL

string

/tmp/mysql.sock

Path to a unix socket.
Should be used only if database_host is not defined or is equal to localhost

database_port
Valid only for MySQL

string

3306

Port number for database access

dbcount

number
from 2 to 64

6

Number of database connections open simultaneously by the billing system core for user operations

dbcount_sys

number
from 2 to 64

4

Number of database connections open simultaneously by the billing system core for system operations

database_reconnect_count

integer number

5

Number of database connection attempts in case of failure. Also, the number of repeated SQL requests in case of failure

database_reconnect_sleep

integer number

2

Delay in seconds before repeated connection attempt or SQL query

database_charset
Valid only for MySQL

encoding specification string

utf8

Database connection encoding

verify_database

enable, disable

enable

Verify database before starting the UTM 5+ core

verify_archive_tables

enable, disable

disable

If the database verification is enabled, also verify archived tables

verify_database_index

enable, disable

disable

Verify indexes before starting the UTM 5+ core

URFA related parameters

Parameter Possible values Default Description

urfa_bind_host
May hold multiple values

IP address of the interface, or 0.0.0.0

server is disabled

The IP address on which the port for receiving URFA requests will be listened to

urfa_bind_port

number from 1 to 65534

11758

The port that the URFA server will listen to

Stream-related parameters

Parameter Possible values Default Description

stream_bind_host

IP address of the interface, or 0.0.0.0

0.0.0.0

IP address of the server listening to Stream requests

stream_bind_port

number
from 1 to 65534

12758

Port listening to Stream requests

NXT-related parameters

Parameter Possible values Default Description

nxt_bind_host

IP address of the interface, or 0.0.0.0

0.0.0.0

IP address of the server listening to NXT v.1

nxt_bind_port

number
from 1 to 65534

11777

Port listening to NXT v.1

nxt_v2_bind_host

IP address of the interface, or 0.0.0.0

0.0.0.0

IP address of the server listening to NXT v.2

nxt_v2_bind_port

number
from 1 to 65534

11778

Port listening to NXT v.2

iptv_cluster_host

IP address

not set

NetUP cluster core IP address

iptv_cluster_port

number
from 1 to 65534

50500

Port that IPTV cluster core is listening to for incoming connections

NetFlow buffer parameters

Parameter Possible values Default Description

nfbuffer_host

string

0.0.0.0

IP address of the server listening to NetFlow

nfbuffer_port

string

9997

Port listening to NetFlow

nfbuffer_bufsize

integer number

set by OS

Size of the UDP socket buffer used to accept NetFlow

Traffic counting parameters

Parameter Possible values Default Description

classifier_traffic_file

path to file

/netup/utm5/db/traffic.dat

File to store traffic information when UTM 5+ core stops

Document generation parameters

Parameter Possible values Default Description

doc_path

path to directory

/netup/utm5/doc

*.odt file storage directory

tmp_path

path to directory

/tmp

Temporary files storage

libreoffice_path

path to file

/usr/bin/libreoffice

LibreOffice executable path

max_upload_size

integer in bytes

1,000,000

Maximum size of document template / contract file for upload

Logging parameters

Parameter Possible values Default Description

log_level

number
from 0 to 3

1

Level of messages to be written to the main log file

log_file_main

path to file

standard error stream

Main log file

log_file_debug

path to file

standard error stream

Debugging log file

log_file_critical

path to file

standard error stream

Critical log file

log_file_verificator

path to file

/netup/utm5/log/ve-rificator.sql

Database verifier log file

syslog_name

string

not set

Log entry prefix (when logging to syslog is enabled)

rotate_logs

yes, on, enable

rotation off

Enables log files rotation

max_logfile_count
Works if log file rotation is enabled

number

unlimited

Maximum number of log files to keep

max_logfile_size
Works if log file rotation is enabled

size in bytes

10485760

Maximum size of log file

core_pid_file

path to file

/var/run/utm5_core.pid

PID file

Stack parameters

Parameter Possible values Default Description

thread_stack_size

size in bytes (not less than 65536)

8388608

Business logic thread stack size

rpc_stack_size

size in bytes (not less than 65536)

not set

URFA server thread stack size

License parameters

Parameter Possible values Default Description

ssl_cert_file

path to file

/netup/utm5/ cert.crt

Certificate file

ssl_privkey_file

path to file

/netup/utm5/ privkey.pem

Private key file

ssl_privkey_passphrase

string

empty string

Private key password

REST API SERVER-related parameters

Parameter Possible values Default Description

rest_api_port

number from 1 to 65535

9080

The port the server is listening to

rest_api_thread_count

number from 1 to 65535

2

Number of service threads

Modules

Dynashape

Scheme

RADIUS parameters

The Dynashape module is intended to regulate channel bandwidth (shaping) depending on the time and volume of traffic consumed by a user. The system core composes the firewall rules according to the settings, and passes them for execution to the external software. The development of shaping control executables for the particular networking configuration to the administrator’s area of responsibility.

Scheme

Shaping may be set up separately for each IP traffic service. The shaping settings include the collection of bandwidth limitations and the associated parameters that determine the conditions to apply each limitation.

How to configure shaping for a service:

  1. Select the service and set the main shaping parameters, including:

    • types of IP groups to which the shaping applies (VPN or non-VPN);

    • time range(s) when the shaping applies;

    • border values of traffic amount, on passing which the limitations will be applied sequentially;

    • bandwidth values for each time range and for each border value;

    • traffic classes to which the shaping applies.

  2. In the case of shaping using RADIUS attributes, specify the RADIUS attributes that set the bandwidth on the same page. The dynamic adjustment of attributes depending on the allowed bandwidth is enabled by the use of variables (see Параметры RADIUS).

  3. Set the firewall rules for the events Set bandwidth limit, Edit bandwidth limit and Delete bandwidth limit, for incoming and outgoing traffic, using the BANDWIDTH variable which on application is substituted with the allowed bandwidth value.

The limitations are applied during the selected time range(s) to the IP groups of selected kind(s) and to the selected traffic classes, according to the amount of traffic consumed by the given service link. On getting under the shaping conditions, or on changing those (i.e. on starting the time range for which the shaping is set, or when the traffic amount surpasses the given border), correspondingly, the Set bandwidth limit or Edit bandwidth limit event for incoming or outgoing traffic occurs. In addition, the respective RADIUS attributes are sent and their previous values (if any) removed. On running away from the shaping conditions (i.e. when the corresponding time range finishes, or when the traffic amount is nullified at the end of accounting period) the Delete bandwidth limit event is executed and the RADIUS attributes deleted.

When a new time range starts, the ensuing limitations are set within 5 minutes from the beginning of the said range. The limitations due to consumed traffic amount are set after the next aggregation, which happens at regular intervals defined by the raffic_agregation_interval parameter.

In case of shaping by external scripts the UTM 5+ core passes to them the given bandwidth value as is. On the contrary, in case of RADIUS attributes-driven shaping the input value is interpreted as Kbits/sec, and may be converted to other units as well as to derivative values, see RADIUS parameters.

If a NAS supports Change-of-Authorization (CoA) requests, UTM 5+ RADIUS can send a Change-of-Authorization (CoA) request to modify, apply or delete bandwith limitations. A CoA request contains attributes allowing session identification (User-Name, Framed-IP-Address, Called-Station-Id etc.) and the new RADIUS parameter values. DAC secret secret, if set, will also be included to the request.

CoA requests and responses are generated according to RFC 5176.

RADIUS parameters

The RADIUS attributes may include variables which get replaced with the respective values. These values are calculated from the bandwidth at given conditions.

Variables Description Value
(here W is the given bandwidth)

IN_BANDWIDTH_BITS

Incoming bandwidth in bits/sec

W*1024

IN_BANDWIDTH_KBITS

Same, in Kbits/sec

W

IN_BANDWIDTH_MBITS

Same, in Mbits/sec

W/1024

OUT_BANDWIDTH_BITS

Outgoing bandwidth in bits/sec

W*1024

OUT_BANDWIDTH_KBITS

Same, in Kbits/sec

W

OUT_BANDWIDTH_MBITS

Same, in Mbits/sec

W/1024

IN_CISCO_NORMAL_BURST

Incoming burst size in bytes

1.5*(W*1024)/8

IN_CISCO_EXTENDED_BURST

Incoming extended burst size in bytes

1.5*2(W*1024)/8

OUT_CISCO_NORMAL_BURST

Outgoing burst size in bytes

1.5*(W*1024)/8

OUT_CISCO_EXTENDED_BURST

Outgoing extended burst size in bytes

1.5*2*(W*1024)/8

IP telephony

Workflow description

Network organization schemes

The IP telephony module is intended for processing authorization requests and consumed services accounting for voice gateways, gatekeepers and voice proxy servers. It supports both traditional and IP telephony. The data to be accounted for may be based either on UTM 5+ RADIUS server requests (see Services ⇒ RADIUS) or on CDR files parsed by the utm5_send_cdr utility (see Utilities ⇒ Text files import).

Term Explanation

IP telephony
Also known as: Voice over IP, VoIP, Internet Telephony

is a general term denoting voice transmission over networks via IP

PSTN
(Public Switched Telephony Network)

is a Public Switched Telephone Network. This notion includes local and national telephone networks.

Caller ID
ANI (Automatic Number Identification)

is a phone number of a caller. ANI is Automatic Number Identification.

VoIP gateway

is a device with an IP port and also (if required) ports to connect to PSTN. Usually the device is used as a gateway between PSTN and IP network. Cisco router 3620 with the NM-2V + VIC2FXO module may serve as an example of a device of this type.

H.323

is a standard offered by the International Telecommunications Union (ITU-T) describing principles of IP telephony networks. The standard describes the protocols associated with IP telephony equipment registration (RAS – Registration, Admission and Status), call setting-up (H.225.0, H.245), voice transmission, user authorization, etc.

H.323 gatekeeper

is responsible for registration of terminal equipment (gateways, client devices), access rights control, distribution of numbers. Almost all gatekeepers can process authorization and transmit statistics on telephone calls via RADIUS protocol.

Codecs
G.711 (64 kbit/sec, high quality),
G.723.1 (5.3 - 6.4 kbit/sec, average quality),
G.729 (8 kbit/sec, average quality)

are the sound compression algorithms on the transmission side and decompression on the receiving side. Generally are used to minimize network traffic. That's why codecs are usually characterized by the bandwidth required for voice transmission using this codec. Uncompressed voice transmission takes 64 Kb per second. Codecs with high compression ratio require powerful computing resources. That's why encoding of a large number of voice flows requires usage of special microprocessors (DSP, digital signal processor).

IVR (Interactive Voice Response)

is Interactive Voice Response. Represents a technology of voice menu and is widely used for authorization of PSTN users to call via IP telephony.

Workflow description

RADIUS requests concerned with telephony are recognized by the system based on the cisco-h323-conf-id attribute. If it is missing, the request is interpreted as related to dialup service.

To register a caller, a gateway sends to the RADIUS server a registration request containing the Calling-ID (31) and caller’s login, but no Called-ID (30). The RADIUS server in turn searches for the telephony service link which is identified by the login in its properties. If the link in question is not found or the corresponding account appears to be blocked, the registration is denied. Otherwise, an affirmative response is sent, which may also contain the user’s phone number if it is set in the service link properties.

To authorize a call, a gateway or a voice gateway sends to the RADIUS server a registration request containing the Calling-ID (31) together with Called-ID (30). The RADIUS server in turn searches for the telephony service link which is identified by the login in its properties. If the link is not found, or the account is blocked, or the call parameters do not match those of any direction covered by the service, or the current time is not covered by the service, the registration is denied. Otherwise, an affirmative response is sent, which also contains the maximum duration of a connection. The maximum duration is calculated either as the time left till the end of time range covered by the service (unless the service provides round-the-clock coverage), or as the time till the account’s balance runs out given its current balance and the current connection price per minute (which may also be time-dependent), whichever of these happens sooner.

To account for a call, a gateway or a voice gateway sends to the RADIUS server an Accounting-Start request containing the Calling-ID (31), Called-ID (30) and probably the starting time. If the starting time is not provided, the arrival time of the Accounting-Start request is assumed instead. The RADIUS server in turn searches for the telephony service link which is identified by the login in its properties. If the link is not found, the request is ignored. Otherwise the connection price per minute is determined, which may depend on the telephone direction and current time. If the call parameters do not match those of any direction covered by the service, or the current time is not covered by the service, the call is accounted for by zero price. When a call finishes, an Accounting-Stop request is sent containing the Calling-ID (31), Called-ID (30), and probably the call duration and/or its finishing time. Then the RADIUS server accounts for the call considering its duration and the price per minute. If the call duration is not provided, the difference between the finishing time and starting time is assumed instead. If the finishing time is not provided, the arrival time of the Aссounting-Stop request is assumed instead. If the price per minute is time-dependent and does change during the time span in question, the call is split into parts of constant price and accounted for in parts. The charge-off information is passed to the UTM 5+ core.

The calls lacking an Accounting-Stop request may be either ignored or considered finished by timeout based on Interim-Update requests and accounted for accordingly, depending on the RADIUS server settings.

If the gateway does not support the Accounting-Request communication with the RADIUS server, it may dump the phone call information to text files to be parsed later by the utm5_send_cdr utility (see Utilities ⇒ Text files import). This utility parses log files, retrieves individual calls and sends those to the UTM 5+ core using URFA.

Network organization schemes

images\IPTel
Network organization schemes

A VoIP gateway connecting PSTN to an IP network organizes voice traffic conversion from IP network to PSTN. Thus, a user with an IP phone or a PC with a software phone installed (Microsoft NetMeeting, OpenPhone etc.) may give a call to a subscriber of PSTN.

Similarly a subscriber of PSTN may call a network user. For that it is required to dial the gateway phone number in PSTN (9391000 on the scheme) and then, after authorization (if the mechanism is enabled on the gateway) dial an internal number of an IP network user (numbers 100 and 200 on the scheme).

images\IPTel two
Scheme with the H.323 gatekeeper

In the scheme containing the H.323 gatekeeper, all devices should register on the gatekeeper. At that, authorization may be processed via RADIUS protocol by using the common Access-Request scheme.

As a result the gatekeeper has a table with IP addresses and numbers of all network devices. All calls begin with addressing to the gatekeeper for conversion of dialed numbers to IP addresses. For that the gatekeeper requests of the RADIUS server to authorize the call and pass the filled in attributes Called-Station-Id (30) (dialed number) and Calling-Station-Id (31) (a number of a calling subscriber). At that the RADIUS server checks a user balance, tariff plan for a called direction and, if all is OK, gives the Access-Accept packet in which it may set the maximum connection duration for the user calling to the certain direction. Usually this information is set in the h323-credit-time, vendor 9 (Cisco).

In case authorization is successful (and after all parameters are coordinated) the connection between a called and a calling station is established. At that the gatekeeper sends a packet (Accounting-Start) containing parameters for the established connection to the RADIUS server.

In case both stations are in the same network the connection is being established directly. If the called station is in another network then the connection is established via one of the gateways. Another variant is also possible, when a user communicates with the gatekeeper only. In this case the gatekeeper acts as a proxy server and real IP addresses of the stations are hidden. This scheme may be applied if the direct line between the stations is worse (e.g., serious IP packets loss or a delay) than between the gatekeeper and both of the stations.

When the connection is finished the gatekeeper sends a packet containing information about the call to the RADIUS server. In the packet it specifies the connection duration, a cause of the connection break and other parameters. Using these data the RADIUS server rates the session, charges the user and puts a record in a log file.

Authorization of PSTN users may be done using IVR as follows:

  1. A user of PSTN dials a local number of IP telephony access. The call is accepted by an IP telephony gateway (e.g., Cisco 3640 with E1 module) connected to the line.

  2. The gateway loads an audio file (usually of the .au type) with an invitation record and plays it to the user. Usually it prompts the user to enter a number and a PIN code of a prepaid telephone card.

  3. After a special digit combination is entered, the authorization is being processed on the R-ADIUS server. At that, the card number and PIN code are usually recorded to the attributes 1 (User-Name) and 2 (Password).

  4. In case of successful authorization the RADIUS server sends an Access-Accept packet with the user balance. For that the attributes h323-credit-amount and h323-currency с vendor=9 (Cisco) are used. IP telephony gateway loads appropriate voice files and in this way informs the user of his balance and invites to enter a telephone number. Note that usually IP telephony is profitable for remote calls (national and international calls).

  5. After the number is entered it is processed through second authorization on the RADIUS server. At that, an attribute Called-Station-Id (30) containing the dialed number is transmitted additionally. Depending on the balance and connection cost per minute, the RADIUS server calculates the maximum available session duration and sends the value in the Access-Accept packet attribute h323-credit-time. If the Called-Station-Id (30) attribute is missing, the R-ADIUS server returns h323-return-code (9,103) attribute with the following meaning:

    • 0 – means that the user is active;

    • 1 – means that the user does not exist;

    • 2 – means that the user is blocked.

  6. After the affirmative reply is received from the RADIUS server, the IP telephony gateway establishes connection with the called user. The connection will break if the session duration exceeds the maximum calculated in the previous step.

  7. On establishing the connection an Accounting-Start packet is sent on the RADIUS server. On breaking, the Accounting-Stop packet is sent.

Automatic registration of users

Guest access

Access with automatic registration

UTM5 has two options for activating the prepaid Internet cards and receiving the dial-up service: guest access and conventional access with automatic registration of users. After registration the user enters the system with one’s own access parameters. After registration the user enters the system with one’s own access parameters. In the second case the user enters card number and a pin code as a login and password for dial-up connection, and then is automatically registered and gets access to the Internet right at once.

For automatic registration of users using the options above, you have to generate the tariff plan and connect the dial-up service to the user with the corresponding connection cost.

On creating the tariff plan you have to generate the prepaid cards pool and bind it to the tariff plan.

Guest access

If you use guest access you have to generate a user with a login and a password known beforehand. For example, login guest and password guest.

These settings should allow the guest access only to the web-site to activate the Internet-card. The session time can be also restricted, say, to 600 seconds.

It is necessary to create a Dialup access service with pool GUEST, maximum connection timeout of 600 seconds, and connection cost of 0 c.u. (currency units) per hour.

Then you have to generate a pool of IP addresses with login GUEST and certain-range addresses, e.g., 172.16.0.0/16, on the router or in UTM 5+. The router settings should allow this range of users to get access only to the DNS and to the web server to activate the card. For the safety sake it is better to arrange an isolated DNS server, not connected to the Internet and containing only the records, which the user will need to access the registration web server.

On login the registration web server the user selects the Automatic registration of user menu item and enters the data from the Internet-card. If the data is entered correctly and the card was not activated or blocked in the past, a new card user will be generated in UTM 5+ automatically, and the user will receive the login and password info for connection in dial-up mode. By selecting the Login to UTM menu item and entering the login and the password received after the registration the user may get access to his personal office and account statistics.

Access with automatic registration

The immediate access with the prepaid cards requires RADIUS server additional tuning. In RADIUS server configuration file /netup/utm5/radius5.cfg define the option radius_card_autoadd=yes

Restart the server. RADIUS server will automatically register the user in UTM 5+ at his first attempt to get access on prepaid card.

In order to receive access the user should enter the card number as login and its pin code as a password on every connection. If the user connects with this card at a first time RADIUS server will register him automatically and connect him to the Internet right at once. On every new connection the user would have to enter the card number as a login and the PIN code as a password. When the card expires (balance turns red), the user has to activate a new card.

This kind of automatic registration is possible on authorization using PAP protocol only. This method is used by Windows by default for modem connections and requires no additional settings. However, sometimes the users' configuration should be changed to let them be registered automatically.

If access settings for the user automatic registration are correct the following records should appear in the RADIUS server log file on the first connection:

?Debug: Oct 27 12:08:00 RADIUS Auth: Packet from <example.org>
?Debug: Oct 27 12:08:00 RADIUS Auth: User <5> connecting
ERROR: Oct 27 12:08:00 RADIUS DBA: Can’t find login <5>
ERROR: Oct 27 12:08:00 RADIUS DBA: Can’t find card login <000000005>
?Debug: Oct 27 12:08:00 RADIUS Auth: Attempt to add new Card user: <5>
?Debug: Oct 27 12:08:00 RADIUS DBA: Sending Auto-Add Request for Card-ID: 5
?Debug: Oct 27 12:08:00 RADIUS URFA[plugin]: DLink: SLID/SID/AID: 14/6/14
?Debug: Oct 27 12:08:00 RADIUS URFA[plugin]: Account <14> with balance <10.000>
?Debug: Oct 27 12:08:00 RADIUS Auth: Got AutoAdd 14 UID from core.
ERROR: Oct 27 12:08:00 RADIUS DBA: Can’t find login <5>
?Debug: Oct 27 12:08:00 RADIUS DBA: login_store iter→second.dialup.session_count:0
Info: Oct 27 12:08:00 RADIUS Auth: User <5> added.
?Debug: Oct 27 12:08:00 RADIUS Auth: Auth scheme: PAP
?Debug: Oct 27 12:08:00 RADIUS Auth: PAP: <51154755> vs <51154755>
?Debug: Oct 27 12:08:00 RADIUS Auth: PAP: Authorized user <5>
?Debug: Oct 27 12:08:00 RADIUS Auth: Dialup session limit:0 session count:0 for user:5
?Debug: Oct 27 12:08:00 RADIUS Auth: Calculated maximum session time: 36000
?Debug: Oct 27 12:08:00 RADIUS DBA: dialup_link_up-date called for slink:14
?Debug: Oct 27 12:08:00 RADIUS DBA: soft dialup_ link_update for slink:14 session_count:1

Captive Portal

This module provides the possibility to register new users in the system and make the first payment for the connected services via web-interface.

To connect the Captive Portal:

  1. Unpack the corresponding archive to a separate directory on a web server.

  2. Check and, if necessary, change the connection parameters to the database, payment system and the billing core in the configuration file – /app/etc/config/app.xml

  3. In the tariffs.xml configuration file, specify ID, name and cost of each tariff that should be available to users on Captive Portal. By default, you can offer three tariff plans for users to choose from.

    Create tariff plans in advance.

By default the module's web interface is available at the following address: your.server/captive-portal/, where your.server is the name of your UTM 5+ server.

This link opens a registration page where a users has to enter the details: email, name and password. Once the details have been entered, the user should click the Next button to go to the page with available tariff plans.

When the tariff plan has been chosen, the user should click the Next button once more. As result, the user will see the info message about redirecting to the Payment Express to pay the fee. To make the payment, the user should click Register and proceed. After that a page for credit card data entry will be opened and user registration data will be transferred to the UTM 5+ database.

The user can make a payment:

  • from user’s personal cabinet, if acquiring systems are connected;

  • by entering the payment details.

    Users can see the payment details in the personal cabinet.

If for some reason the payment process has not been completed, the user can log on to your.server/cabinet using the email and password specified at the registration.

After payment, the module will work in the standard way (see Hotspot).

Hotspot

The Hotspot module is intended to provide Internet access paid by the hour. User authorization is performed using RADIUS protocol or via the user Web interface.

When using web interface for authorization, after entering card number and PIN, the page will update periodically to keep the server aware that the service is still being provided. If the refresh does not happen in due time because the user has closed the authorization page, the session expires. When the session is either expired or explicitly closed by the user selecting Close in the menu, the Internet access is blocked and the user is charged for the session’s duration. The expiration may also occur due to running out of money.

To set the lifetime of a hotspot session, go to the Settings ⇒ Systems ⇒ Other in the web interface and specify the amount of seconds for Hotspot session timeout from the moment of last refresh.

To use the hotspot module, add a tariff plan containing the hotspot service. You can set different cost of the service for different time ranges, as well as create a list of allowed networks to login from, and the number of simultaneous sessions for the given login.

To use the hotspot module along with prepaid cards, it is necessary to create a pool of cards and connect them to the tariff plan containing the hotspot service. After getting a card, a user should first register it in the Auto register user section of the web interface and obtain a login and password. They are subsequently used for authorization on the Enter (hotspot) page.

If you need billing on traffic for hotspot users, use hotspot service together with IP traffic service. Check the Dynamic IP address allocation option in the properties of both services. User authorization on the UTM 5+ web interface would require the login and password stored in the properties of the hotspot service link.

Integration with IPTV

This module allows to integrate billing with NetUP IPTV system. Due to this module UTM 5+ gets an opportunity to add services of watching TV channels and charge users for using these services. It is also possible to create service links for services of this type and, based on them, manage access to watching TV channels (deactivate access if the personal account is blocked, grant access if it’s paid for).

It is possible to integrate UTM 5+ with IPTV systems of other companies. In this case, the interaction can be done through RFW events and third-party scripts.

The integration module interacts with IPTV middleware. In order to let the module connect to NetUP IPTV Core, the DNS server on UTM 5+ server should be able to resolve IPTV domain names. All the other billing systems interacting with the IPTV cluster core must be disabled.

NetUP IPTV system uses access cards for user authorization. The card is a mandatory condition to access IPTV services. The integration module allows to create access cards and generate activation codes.

Client's TV channel access is managed by interacting with the NetUP IPTV Middleware system. When UTM 5+ needs to grant access to media content, e.g. when an IPTV service is attached to user’s personal account, it sends a request to IPTV middleware to grant access to certain media content to access card owner for an unlimited period of time. When it needs to prevent a user from accessing the content (e.g. when user switches tariff plan), UTM 5+ requests from IPTV middleware to set access end time for user’s access card to that media content to current time, which means that the content becomes no longer available.

To connect the module you need a Telecom license.

To connect a NetUP IPTV, follow these steps:

  1. In the UTM 5+ configuration file, set the values for the NetUP IPTV Core connection parameters:

    • iptv_cluster_host – is the IP address of the NetUP IPTV Core,

    • iptv_cluster_port – is the port which the NetUP IPTV Core is listening to for billing system connections (by default it is 50500).

      For proper operation the When UTM 5+ server must resolve db.iptv to the IPTV cluster core IP address.

  2. Open IPTV administrator's web interface and go to the Services page. Find the NetUP IPTV Billing service there. If the service is running, left-click on its name to open a dialog window and click Yes to stop the service.

  3. After that go to the Connections page and left-click the IP address next to the NetUP IPTV Billing connection name. In the opened window, click Auto detect to reset the information about the billing system.

  4. Launch the UTM 5+ and go to the Connections page in the IPTV administrator's web interface to make sure the NetUP IPTV Billing is connected and the IP address matches the server on which the billing is running.

    If the When UTM 5+ core was running while the NetUP IPTV Core connection setup, restart it after finishing the setup process.

You can see the example of creating a NetUP IPTV service and connecting it to the user in the Quick Start section.

Document templates

Basically, a template is an *.odt document that may contain variables E.g. user name, account balance, etc). During the generation of the document, the variables will be replaced with the corresponding values. For a complete list of variables, see Templates variables.

If LibreOffice package is installed on a server with UTM 5+, documents are generated in .pdf format, if not installed – in .odt format.

Depending on the template type, it may include variables from the following groups:

Template Groups of variables

Invoice
VAT invoice
Аacceptance report

  • Document

  • User

  • Account

  • Provider

  • Contract

  • Invoice

  • Bill iterators

User memo

  • Document

  • User

  • Account

  • Provider

  • Contract

  • IPTV service links

  • IP group table iterators

  • Connected tariff plans table iterators

Print receipt

  • Document

  • User

  • Account

  • Provider

  • Contract

  • Payment

Contract

  • Document

  • User

  • Account

  • Provider

  • Contract

  • IPTV service links

  • IP group table iterators

  • Connected tariff plans table iterators

Call details

  • Document

  • User

  • Account

  • Provider

  • Contract

  • Call details

  • Call details iterators

For a description of variables and iterated variables, see below.


Template variables

Template variables are split into several groups:

Document

User

Account

Provider

Contract

Payment

Invoice

Call details

IPTV service links

Read more about each Group below.

  • Document

Name Type Description

document.number

int32

Number of a document

document.alt_number

string

An alternative document number

document.date

int32

Date of document creation

  • User

Name Type Description

user.id

int32

User ID

user.full_name

string

User full name

user.login

string

User login

user.password

string

User password

user.actual_address

string

Actual address

user.juridical_address

string

Legal address

user.home_telephone

string

Home phone number

user.work_telephone

string

Work phone number

user.mobile_telephone

string

Mobile number

user.tax_number

string

User ITIN

user.kpp_number

string

Reg. code

user.icq_number

string

ICQ

user.web_page

string

Web page

user.district

string

User district

user.building

string

Building

user.entrance

string

Entrance

user.floor

string

Floor

user.flat_number

string

Flat number

user.personal_manager

string

Personal manager

user.basic_account

int32

Basic account ID

user.passport

string

Passport

user.email

string

E-mail

user.comments

string

Comments

user.bank_account

string

Bank account

user.bank_name

string

Bank name

user.bank_city

string

Bank city

user.bank_bic

string

BIN

user.bank_corr_account

string

Bank corr. account number

user.currency_short_name

string

Currency short name

user.currency_full_name

string

Currency full name

user.currency_code

int32

Currency code. Is used by IP telephony module

user.params.{param_id}
AVariable {param_id} can accept values of integer ID of additional customer parameter

string

Additional user parameter with ID {param_id}

user.contacts.{contact_id}.email
Variable {contact_id} can accept values of headman - manager, booker - accountant, or integer ordinal number of additional contact starting from one

string

Additional contact e-mail with ID {contact_id}

user.contacts.{contact_id}.full_name

string

Additional contact full name with ID {contact_id}

user.contacts.{contact_id}.short_name

string

Additional contact short name with ID {contact_id}

user.contacts.{contact_id}.position

string

Additional contact position with ID {contact_id}

user.contacts.{contact_id}.reason

string

Additional contact description with ID {contact_id}

user.contacts.{contact_id}.telephone

string

Additional contact phone number with ID {contact_id}

  • Account

Name Type Description

account.account_id

int32

Account ID

account.external_id

string

External account ID

account.balance

double

Balance

account.credit

double

Loan

account.vat_rate

double

VAT rate, %

account.sale_tax_rate

double

Sale tax rate, %

account.access_card_number

string

IPTV access card number

  • Provider

Name Type Description

provider.full_name

string

Provider full name

provider.short_name

string

Provider short name

provider.juridical_address

string

Legal address

provider.actual_address

string

Actual address

provider.tax_number

string

ITIN

provider.kpp_number

string

Industrial Enterprise Code

provider.chief_full_name

string

CEO

provider.chief_short_name

string

CEO short name

provider.booker_full_name

string

Accountant name

provider.booker_short_name

string

Accountant short name

provider.bank_account

string

Bank account

provider.bank_name

string

Bank name

provider.bank_city

string

Bank city

provider.bank_bic

string

BIN

provider.bank_corr_account

string

Bank corr. account number

  • Contract

Name Type Description

contract.number

int32

Contract number

contract.name

string

Contract name

contract.date

int32

Date of the first contract

contract.{contract_id}.number
{contract_id} is the user’s contract ID, starting with one.

int32

Contract ID with serial number {contract_id}

contract.{contract_id}.name

string

Name of the contract with the serial number {contract_id}

contract.{contract_id}. date

int32

Creation date of the contract with the serial number {contract_id}

user.connect_date

int32

User connection date (displayed in unixtime format)

user.connect_date..date_short

string

User connection date (displayed in dd.mm.yyyy format)

  • Payment

Name Type Description

payment.id

int32

Payment transaction ID

payment.amount_in_currency

double

Amount in currency

payment.amount_absolute

double

Amount in system currency

payment.date.actual

int32

Payment date

payment.date.enter

int32

Date when payment is made

payment.date.burn

int32

Burn date

payment.document_number

string

Payment document number

payment.comments.user

string

Comment for user

payment.comments.admin

string

Comment for an admin

payment.hash

string

Payment hash

payment.currency_rate

double

Currency rate

payment.currency_short_name

string

Currency short name

payment.currency_full_name

string

Currency full name

payment.currency_code

int32

Currency code. Is used by IP telephony module

  • Invoice

Name Type Description

bill.sum_without_tax

double

Amount without tax

bill.sum_with_tax

double

Amount with tax

bill.size

int32

Number of rows in the account

bill.period_start

int32

Start date of the period

bill.period_end

int32

End date of the period

bill.balance_when_created

double

Balance at the time of billing

bill.debt

double

Debt

bill.payment_amount

double

Payment amount without tax

bill.payment_amount_with_tax

double

Payment amount with tax

bill.date

int32

Date

  • Call details

Name Type Description

summary.periodic_fee

double

Amount of charges for periodic services

summary.total_fee

double

Telephony service charges

summary.other_fee

double

Amount of charges for other services

summary.local.charges

double

Amount of charges for local calls

summary.local.count

double

Number of local calls

summary.local.duration

double

Total duration of local calls

summary.innerzone.charges

double

Similarly for innerzone calls

summary.innerzone.count

double

summary.innerzone.duration

double

summary.intercity.charges

double

Similarly for intercity calls

summary.intercity.count

double

summary.intercity.duration

double

summary.international.charges

double

Similarly for international calls

summary.international.count

double

summary.international.duration

double

  • IPTV service links

Name Type Description

iptv.access_card_number

int32

IPTV access card number

iptv.activation_code.part1

string

Access card activation code, part 1. Activation code consists of six parts. For each part there is a corresponding variable with a different number at the end of it's name (.part2, .part3, etc.)


Iterating variables

Iterating variables are groups of variables, which are replaced by an array of values. They should be placed in a table row in a document template. In this case the number of rows in the table is automatically increased to hold all the values that are returned.

Iterating variables also are split into several groups:

IP group table iterators

Connected tariff plans table iterators

Bill iterators

Call details iterators

Iterators of service link parameters for dialup service

Iterators of service link parameters for hotspot service

Iterators of service link parameters for telephony service

  • IP group table iterators

Name Type Description

ipgroup.login

string

Login of IP group

ipgroup.password

string

Password of IP group

ipgroup.mac

string

MAC address

ipgroup.ip

string

IP address

ipgroup.mask

string

Subnet mask

ipgroup.gateway

string

Gateway

IP group table iterators only include non dynamically created IP groups that have a non empty Login field and a non zero IP address

  • Connected tariff plans table iterators

Name Type Description

tariff.name

string

Tariff name

tariff.cost

double

Cost

tariff.account_id

int32

Account ID

  • Bill iterators

Name Type Description

bill_entry.id

int32

Entry index, starting with one

bill_entry.name

string

Entry name

bill_entry.price

double

Entry price

bill_entry.quantity

double

Entry quantity

bill_entry.sum_with_tax

double

Amount with tax

bill_entry.sum_without_tax

double

Amount without tax

bill_entry.tax

double

Tax amount

bill_entry.tax_rate

double

Tax rate, %

bill_entry.unit_name

string

Unit name (returns replacement key)

bill_entry.unit_code

string

Unit code (returns replacement key)

bill_entry.alt.price

double

Alternative price

bill_entry.alt.quantity

double

Alternative quantity

bill_entry.alt.unit_name

string

Alternative unit name (returns replacement key)

bill_entry.alt.unit_code

string

Alternative unit code (returns replacement key)

  • Call details iterators

Name Type Description

call.id

int32

Call ID

call.zone

string

Zone name

call.direction

string

Direction name

call.date

int32

Call date

call.calling_number

string

Calling number

call.called_number

string

Called number

call.called_prefix

string

Called prefix

call.duration

int32

Call duration

call.type

string

Call type (returns replacement key)

call.cost

double

Call cost

  • Iterators of service link parameters for dialup service

Name Type Description

dialup.login

string

Login

dialup.password

string

Password

dialup.cid

string

CID parameter value

dialup.csid

string

CSID parameter value

  • Iterators of service link parameters for hotspot service

Name Type Description

hotspot.login

string

Login

hotspot.password

string

Password

  • Iterators of service link parameters for telephony service

Name Type Description

telephony.login

string

Login

telephony.password

string

Password

telephony.number

string

Phone number

telephony.incoming_trunk

string

Incoming trunk

telephony.outgoing_trunk

string

Outgoing trunk

telephony.pbx

string

PBX ID parameter value

telephony.cid

string

CID parameter value


Variable modifiers

Variable modifiers modify the values returned for variables.

Name Argument type Result type Description

translate

string

string

Replaces with a value from the replacements list if the variable and the key match

replace

string

string

Replaces matching part of the variable with the value from the replacements list

date_short

int32

string

Date format DD/MM/YYYY

date_long

int32

string

Date format “DD” Month YYYY

date_time

int32

string

Time format MM.DD HH:MM

duration

int32

string

Duration format HH:MM:SS

sum_to_string

double

string

Sum to string

When you are creating a custom field in LibreOffice, go to the Insert ⇒ Field ⇒ More fields to apply a modifier. On the Variables tab, select the variable and in theName field specify the name of the modifier after the function name, dividing them by two dots, for example tariff.cost..sum_to_string

LibreOffive_var

After that you can use the modified variable in the template. :experimental:

Servers

RADIUS

DM and CoA requests

Work flow of the RADIUS server

Authorization and accounting

Traffic Tariffication

utm5_radius daemon

Configuration file

Dynamic IP Address allocation

The RADIUS server interacts with the UTM 5+ core via the Stream protocol, and with access servers (hereinafter – NAS) via the RADIUS protocol according to the following standards: RFC 2865, 2866 and 5176.

The Remote Authentication Dial In User Service (RADIUS) protocol provides authorization, authentication, and accounting between the NAS and the Authorization Server (RADIUS server).

One instance of UTM 5+ core may work with only one RADIUS server.

If the NAS interacts via the RADIUS protocol, it does not keep the user base. To connect the user, the NAS sends an Access-Request to the RADIUS server.
If the RADIUS server permits a connection, it responds with an Access-Accept, otherwise it send an Access-Reject to the NAS. If the RADIUS server needs more information, it sends an Access-Challenge request to the NAS.

RADIUS_NAS

If the NAS is configured to send connection information, after establishing the connection, the RADIUS server sends an Accounting-Request that contains information about starting the session. Depending on the configuration, the NAS may also send additional periodical Accounting-Request containing current status info on the connection.

When a connection is broken, NAS must send a summarizing Accounting-Request, given that some Accounting-Request for this connection have already been sent before.

On receiving an Accounting-Request, the RADIUS server creates, changes or deletes an object associated with the connection. Depending on the request contents, some additional actions may be performed to maintain the delivered information on the connection.

After successfully handled an Accounting-Request, the RADIUS server sends to NAS a confirmation(Accounting-Response).
On failure, no response is sent.
Packets from an unknown (not registered) NAS are ignored.

RADIUS service and NAS exchange RADIUS packets via UDP. To receive Access-Requests, the RADIUS server usually uses port 1812 and port 1813 to receive Accounting-Requests.

Generally a RADIUS packet contains the following fields:

RADIUS_packet
  • Code – is an one-byte field used to identify the RADIUS packet type. The RADIUS server supports RADIUS packets with the following codes:

    Type Name The RADIUS-server receives / sends

    1

    Access-Request

    received

    2

    Access-Accept

    sent

    3

    Access-Reject

    sent

    4

    Accounting-Request

    received

    5

    Accounting-Response

    sent

    11

    Access-Challenge

    sent

  • Identifier – is a one-byte field intended to relate the request to the response.
    Duplicate requests with the same ID coming from the same NAS shortly after each other are ignored.

  • Length – is a two-bytes field containing packet size.

  • Authenticatorfor a request, it is some unique sequence used together with the md5 of the secret word common for the RADIUS and NAS for reversible encoding of the user’s password;
    for a response, it is md5 of Code, Identifier, Length, Authenticator, and Attributes fields together with the secret word.
    The common secret word must be considerably hard to break. It is strongly not recommended to leave it blank. The RADIUS server uses the sender address of the RADIUS packet to derive the common secret word.

  • Attributes – is a variable-length field containing the list of RADIUS attributes.

Starting from version 5.3-004 UTM5 supports tagged RADIUS attributes

Each RADIUS attribute contains specific information on a request or a response.

RADIUS_attributes

Generally, a RADIUS attribute looks as follows:

  • Type – is a number describing the attribute type.
    For a description of the RADIUS attribute types, see here.

  • Length – is the summary length of the Type, Length, and Value fields.

  • Value – is the type-specific information. Depending on the type, may contain the following fields:

    text

    from 1 to 253 bytes of UTF-8 text, zero byte forbidden

    string

    from 1 to 253 bytes of binary info

    address

    is a 32-bit data interpreted as an address

    integer

    is a 32-bit data interpreted as unsigned integer

    time

    is a 32-bit data interpreted as time in seconds since 00:00:00, January 1, 1970 UTC.

Some of the attributes may be included in a packet more than once. In this case their interpretation depends on the attribute type. Order of attributes is important.

Additional attributes set in NAS, services and service links settings are also included in the packet. Attributes set in NAS settings are added first, then go the attributes from the services settings and then the attributes from the service link settings. The UTM 5+ allows to perform certain actions when adding an attribute like replace or remove an attribute added earlier. That is, the attributes from service link settings have the highest priority.

From this point on, the RADIUS attributes are referred by common name followed by the typeID in parentheses. For example, User-Name (1).

There is a certain attribute type Vendor-specific (26) designed to store extended vendor-specific data.

RADIUS_vendor

These data are interpreted as follows:

  • Vendor-Id – is a number describing the organization that defines this attribute (for more details see RFC 1700);

  • Vendor-Type – is a number that described the attribute meaning;

  • Vendor-Length – is the summary length of the Vendor-Type, Vendor-Length and Data fields;

  • Data – contains the actual data.

From this point on, the vendor-specific attributes are referred by common name followed by the semicolon-separated Vendor-Id and Vendor-Type in parentheses. For example, Cisco-AVPair (9;1).

DM and CoA requests

If it is needed to change the session parameters or break it, the RADIUS server sends a request according to the 5176 standard. The RADIUS service sends a separate request to change parameters or break each session.

The Disconnect Message (DM) and Change of Authorization (CoA) requests are the same format and are sent by default to UDP port 3799. The port number can be changed in the NAS settings.

DM requests are used if the user's personal account balance becomes negative. The following attributes might be used to identify a session:

User-Name

is a user name, associated with one or more sessions

NAS-Port

is a port used by session that needs to be terminated

Framed-IP-Address

is an IPv4 address associated with the session

Vendor-Specific

is one or more vendor-specific attributes

Called-Station-Id

is the called party identifier

Calling-Station-Id

is the calling party identifier

Acct-Session-Id

is an ID that let’s one clearly identify a session on a NAS

NAS replies with a Disconnect-ACK in case it was able to identify and terminate the session, otherwise it replies with a Disconnect-NAK.

CoA requests are used for changing shaping parameters for current session. These parameters are most likely to be changed at a certain time or after reaching a certain traffic limit.

In case NAS supports CoA requests and a corresponding flag is checked in the administrator’s interface, if one of these happens, the RADIUS server will send a CoA request to NAS.

Like a DM request, CoA request contains attributes required for identifying a session and the new values of RADIUS parameters that need to be updated. If NAS is able to identify session and update RADIUS parameters it replies with a CoA-ACK, otherwise it replies with a CoA-NAK.

Work flow of the RADIUS server

  1. Connects to the billing core.

  2. Retrieves from the billing core the info on events to await.

  3. Interacts with NAS.

  4. Sends the resulting data to the billing core.

On startup the RADIUS server connects to the UTM 5+ core, authorizes according to its configuration file parameters, and establishes a Stream connection.
Once a connection is set, the UTM 5+ core passes to the RADIUS server the description of the needed objects in the corresponding events.
The RADIUS server keeps the Stream connection to the core. Upon creating, changing, or deleting system objects related to the RADIUS server functionality, the UTM 5+ core sends the corresponding event over Stream in order to inform RADIUS.

On reception of certain events, the RADIUS server creates, modifies or deletes its inner records related to the following objects:

  • IP groups;

  • NAS;

  • Accounts;

  • Time ranges;

  • IP traffic, hotspot, and telephony services;

  • IP traffic, hotspot, and telephony service links;

  • Telephone zones;

  • Telephone directions;

  • IP pools.

Authorization and accounting

On receiving an Access-Request the RADIUS server performs the user authentication procedure and defines the service credential to which the login received in the authorization request belongs.

One of the following methods can be used for authentication: PAP, CHAP, MS-CHAP v1, MS-CHAP v2, EAP-MD5, EAP-TTLS, Digest.

The Digest authentication is implemented according to tools.ietf.org/id/draft-sterman-aaa-sip-00.txt, rather than the corresponding RFC

The authorization request must contain the User-Name (1) attribute. Part of the value of User-Name (1) to the character : is written to the Callback_prefix parameter. Login is considered without prefix. All letters contained in the login are cast to lower case. If the User-Name (1) is not specified, the server ignores Access-Request and does not perform subsequent actions.
If authentication fails or requires unsupported method, an Access-Reject is sent to NAS.
If the guest_pool_name parameter is set in the configuration file of the RADIUS server, the guest users may be authorized as well.

The following actions depend on the service link type.

For an IP traffic service link:

  • If the radius_auth_vap parameter is set in the configuration file of the RADIUS server, the account referred in the given service link is checked for blocking.

  • The given IP group is checked for presence of free IP addresses.

  • If the IP group parameter Allowed CID is not empty, the Calling-Station-Id (31) value is checked against it as a regular expression.

  • If the radius_nas_port_vpn, parameter is set in the configuration file of the RADIUS server, the NAS-Port-Type (61) is checked for exact correspondence with the value of at least one radius_nas_port_ vpn.

Failure of any of these checks result in sending an Access-Reject packet and skipping the rest of actions.
If the checks are successful, an Access-Accept packet is sent with the following attributes:

Service-Type (6)

set to 2

Framed-IP-Netmask (9)

set to 0xFFFF FFFF

Framed-Routing (10)

set to 0

Framed-Protocol (7)

set to 1

Framed-IP-Address (8)

set to the first free IP address in the given IP group. The IP address is marked busy for the time span defined by the parameter radius_ippool_acct_timeout from the configuration file of the RADIUS service.

Session-Timeout (27)

set to the value of radius_default_session_timeout parameter from the configuration file of the RADIUS service.

For a dial-up service link:

  • If Callback Allowed is not set, the check returns a negative result if Callback_prefix is present. If Ringdown Allowed is not set, the check returns a negative result when Callback_prefix is absent.

  • If Allowed CID parameter has a non-empty value, the correspondence of the value of Calling-Station-Id (31) to the regular expression specified in the value of this parameter is checked.

  • If Allowed CSID parameter has a non-empty value, the correspondence of Called-Station-Id (30) value to the regular expression set in the value of this parameter is checked.

  • The amount of connections established for this service link is compared to the maximum number of simultaneous connections set in the service properties.

  • If the blocked_pool_name parameter is not set in the configuration file of the RADIUS server, the absence of a valid personal account blocking is checked.

  • Maximum connection time is calculated from the account balance and the service link parameters. The check will sucessfully pas if the max connection time is greater than 0 and the current time is in the set bounds and if the current account balance is enough for at least one second of connection.

  • If a registered IP pool is set in the service properties, it is checked for presence of free addresses. If there are no free addresses, the check won't pass.

  • If the radius_nas_port_vpn parameter is set in the configuration file of the RADIUS server, the NAS-Port-Type (61) value is checked to match one of its values.

Failure of any of these checks result in sending an Access-Reject packet and skipping the rest of actions.
If the checks are successful, an Access-Accept packet is sent.

If the user is blocked and the blocked_pool_name parameter is set in the configuration file of the RADIUS server, the IP address will be issued from the pool intended for blocked users, which is defined by this parameter.

When user’s account is unblocked, a DM (disconnect message) will be sent, so the session will terminate and the user will need to reconnect.

If the user is not registered and the guest_pool_name parameter is set in the configuration file of the RADIUS server, the IP address will be issued from the pool intended for guest users, which is defined by this parameter.

If the dial-up service parameter Pool name is set to some registered IP pool, the following attributes are returned:

Service-Type (6)

set to 2

Framed-IP-Netmask (9)

set to 0xFFFF FFFF

Framed-Routing (10)

set to 0

Framed-Protocol (7)

set to 1

Framed-IP-Address (8)

set to the free IP address from the given IP group. The IP address is marked busy for the time span defined by the parameter radius_ippool_acct_timeout from the configuration file of the RADIUS server

Session-Timeout (27)

set to the maximum session time

If the dial-up service parameter Pool name is set to some registered IP pool, the following attributes are returned:

Service-Type (6)

set to 2

Framed-MTU (12)

set to 1500

Framed-Routing (10)

set to 0

Framed-Protocol (7)

set to 1

Session-Timeout (27)

set to the maximum session time

Cisco-AVPair (9;1).

set to addr-pool=<pool name>.

Besides that, if the Callback_prefix is set, the following attributes are added:

Callback-Number (19)

set to the value of the callback number, if the radius_callback_avpair_enable parameter is not set in the configuration file of the RADIUS server

Callback-Id (20)

set to the Callback login, if the radius_callback_avpair_enable parameter is not set in the configuration file of the RADIUS server

Cisco-AVPair (9;1).

set to lcp:callback-dialstring= <callback_prefix>, if the radius_callback_avpair_enable parameter is not set in the configuration file of the RADIUS server

The issued IP address is marked busy for the time span defined by the parameter radius_ippool_timeout from the configuration file of the RADIUS server

For any type of service, the NAS attributes set for the service link are included in the Access-Accept response.

Accounting-Requests are used by RADIUS server to determine if an IP address is occupied, charge for hotspot, dial-up or telephony services, charge for consumed traffic and dynamically create, modify or remove IP groups.

Accounting-Request must contain the following attributes:

  • Acct-Status-Type (40)

  • Acct-Session-Id (44)

  • Framed-IP-Address (8)

If any of these attributes is missing, the request is ignored.

Type of the request is defined by the Acct-Status-Type (40) attribute.

The following request types are recognized by RADIUS:

Acct-Status-Type Name Comments

(1)

Start

announces the start of the session

(2)

Stop

announces the end of the session

(3)

Interim-Update

provides intermediate data of the established connection

On receiving a Start packet:

  • An object describing the session is created and the core is informed over Stream. The Acct-Session-Id (44) parameter contains the object ID.

  • If the login set in User-Name (1) belongs to some IP group or a dial-up service link, the last IP address of this IP group or the service link is marked as busy for an unspecified time. The IP address is marked as busy for the time specified in the radius_ippool_timeout parameter, if this parameter is set. When the interim_update_interval is set, the IP address will be released in the triple time interval set for this parameter if no Interim-Update requests have been received for the session.

  • IP address associated with the session is marked busy.

On receiving a Stop packet:

  • If the login set in User-Name (1) corresponds to some IP traffic or hotspot service link, the session is tariffed based on the time set in Acct-Session-Time (46). The information about a needed charge is sent to the core via Stream protocol in a corresponding event.

  • The object describing the session with the identifier specified in Acct-Session-Id (44) attribute is removed. The information about this object deletion is sent to the core via Stream protocol in a corresponding event.

  • IP address is marked as unused.

On receiving an Interim-Update packet:

  • The object describing the session with the identifier specified in Acct-Session-Id (44) attribute is modified.

  • If the login set in User-Name (1) belong to some IP group or dial-up service link, the Interim-Update session control is on and interim_update_interval parameter is set, the IP address will be released only if during the triple time interval specified in this parameter the session has not received Interim-Update requests.

There are certain properties of processing accounting requests. For an incoming Stop or Interim-Update requests with a session ID that doesn’t match any open session ID, a new session will be created. The RADIUS server may cache the list of closed sessions to avoid creating new sessions when receiving a Stop or an Interim-Update requests for an already closed session. This feature is turned off by default. To involve the closed session cache, you have to set the values for two parameters in the configuration file:

  • use_closed_sessions_cache=on

  • Closed_sessions_cache_size=<number> is the cache size (the number of closed sessions to store information of).

When the closed sessions cache is involved, if a session status changes to closed, it’s Acct-Session-Id данной сессии помещается в кеш закрытых сессий. При поступлении запроса Stop или Interim-Update производится поиск Acct-Session-Id is added to the cache. If the Acct-Session-Id fount in the request is present in the cache, this request won’t pass to UTM5 core. When a Start is received, the session identifier is removed from the cache.

When the number of entries reaches the cache size limit, the oldest entry is removed and the new one is added. The larger the size of the cache, the less probability of creating a re-session by Stop or Interim-Update request, but the more time and resources it will take to search the cache.
For each system, the required cache size depends on many parameters such as the number of registered users, number of sessions per user, etc. Therefore, the closed_sessions_cache_size parameter does not have a default value.

When RADIUS server stops, all the information about closed sessions is lost.

Traffic Tariffication

If the access server does not support exporting statistics via NetFlow, information about the traffic consumed can be obtained via Stop or Interim-Update requests. To use this mechanism you should assign an arbitrary value to the radius_do_accounting parameter (for billing by Stop requests) or radius_do_interim_accounting parameter (for billing by requests of both types).

When receiving a Stop or Interim-Update request, RADIUS server will create two records with traffic information, which will then be accounted in the billing core in a standard way.

In the first record with traffic information, the IP address of the access server will be specified as the sender address, and the IP address of the user used in this session as the destination address. The number of consumed bytes is taken from the Acct-Input-Octets (42) and Acct-Input-Gigawords (52) attributes contained in the Stop or Interim-Update request. In the second record with traffic information, the IP address of the access server will be specified as the destination address and the IP address of the user used in this session as the sender address. The number of bytes is taken from the Acct-Output-Octets (43) or Acct-Output-Gigawords (53) attributes.

The created records are sent to the UTM 5+ core over Stream.

If the interim_update_interval parameter ia set, it is assumed that the NAS should send Interim-Update requests for each open session at this interval. If there are no new requests within the triple period or if a Stop request is received, the session is closed and the associated IP addresses are released.

The default value for this parameter is not set and the session will only end when a Stop request is received. If the NAS supports sending the Interim-Update requests, it is recommended to define a value for this parameter to avoid "hanging" sessions.

utm5_radius daemon

The location of the RADIUS executable file is /netup/utm5/bin/utm5_radius. On the command line, you can specify the following parameters:

-p <path>

The path to the PID file

-c <path>

The path to the configuration file

-v

Version number and parameter information

There are 3 ways to run the utm5_radius:

  1. Direct start of the /netup/utm5/bin/utm5_radius binary with the required parameters.

  2. Start on watchdog with start parameter
    /netup/utm5/bin/safe_utm5_radius start
    The script will restart utm5_radius automatically on failure.

  3. Start via the automatic startup script (recommended):
    /etc/init.d/utm5_radius start
    In this case the watchdog script will run. To stop the utm5_radius and the script, execute:
    /etc/init.d/utm5_radius stop

Configuration file

By default, the RADIUS server uses this configuration file – /netup/utm5/radius5.cfg.

Config files have the following format: parameter=value.
A sequence of symbols before the equals sign is treated as parameter’s name, while the one after it stands for the parameter’s value.
Whitespaces count.
Empty lines are ignored.
A line starting with # is a comment.

Parameter Possible values Default Description

core_host

IP address

mandatory parameter

IP address of the host on which the UTM 5+ core is running

core_port

from 1 to 65534

mandatory parameter

The port where the UTM 5+ core listens to Stream (stream_bind_port parameter in the configuration file of the core)

radius_login

string

radius

User login to access the billing core

radius_password

string

radius

User password to access the billing core

radius_pid_file

file name

/var/run/utm5_radius.pid

PID file

radius_ping_interval

number

30

Duration of repeated attempts to connect to the core (in seconds)

radius_acct_host

IP address of the interface, or 0.0.0.0

0.0.0.0

Host address for receiving Accounting-Requests

radius_acct_port

number from 1 to 65534

1813

Port for receiving Accounting-Request

radius_auth_host

IP address of the interface, or 0.0.0.0

0.0.0.0

Host address to receive access verification requests (Access-Request)

radius_auth_port

from 1 to 65534

1812

Port for receiving Access-Requests

radius_auth_mppe

enable

key generation is not performed

Includes generation of 128-bit MPPE keys used for authorization via MS-CHAP-v2

radius_auth_vap

1

authorization is enabled

If this value is set, blocked users whose logins are specified in the traffic service link are not allowed to authorize

radius_ippool_acct_timeout

time in seconds

30

Time in which the IP address will be marked as busy after Access-Accept is sent

radius_ippool_timeout

time in seconds

until the Stop packet arrives

Time in which the IP address will be marked as busy after Accounting-Start arrives. It is not recommended to use this parameter

radius_auth_null

yes or enable

not set

When this option is enabled, RADIUS-server will accept and successfully authorize requests without User-Password (2) attribute, if the user password specified in the service link is empty

radius_auth_h323_remote_address

enable, on, yes

not set

When this option is enabled for telephone calls, authentication is performed not by the User-Name (1) attribute, but by the value of h323-remote-address (9;23) attribute. The value of the attribute is used as a login

radius_nas_port_vpn
Multiple instances of the parameter are possible

integer number

not set (no check)

If set, the NAS-Port-Type (61) attribute is checked against this value on authorization of the IP traffic user

radius_nas_port_dialup
Multiple instances of the parameter are possible

integer number

not set (no check)

If set, the NAS-Port-Type (61) attribute is checked against this value on authorization of the dial-up user

radius_nas_port_tel
Multiple instances of the parameter are possible

integer number

not set (no check)

If set, the NAS-Port-Type (61) attribute is checked against this value on authorization of the telephony user

radius_nas_port_hotspot
Multiple instances of the parameter are possible

integer number

not set (no check)

If set, the NAS-Port-Type (61) attribute is checked against this value on authorization of the hotspot user

send_xpgk_ep_number

any

not set (numbers not sent)

If set, the Access-Accept request for telephony users will have the Cisco-AVPair (9;1) attribute with the following value: xpgk-ep-number=<semicolon-separated list of numbers>

send_h323_ivr_in

any

not set (numbers not sent)

If set, the Access-Accept request for telephony users will have the Cisco-AVPair (9;1) attribute with the following value: h323-ivr-in=terminal-alias: <semicolon-separated list of numbers>

h323_origin_-reject

string

not set

Sets zero cost for Accounting-Request having the h323-call-origin (9;26) attribute equal to this parameter’s value

interim_update_interval

time in seconds >60

not set (standard mechanism is used)

Enables advanced session control mechanism based on Interim-U-pdate packets. The value is passed via the Acct-Interim-Interval (85) attribute of the Access-Accept packet

radius_default_session_timeout

integer number

86400

Value of the Session-Ti-meout (27) attribute sent in Access-Accept for an IP traffic service

radius_callback_avpair_enable

any

not set

Enables sending of the Cisco-AVPair (9;1) attribute having value lcp:callback-dialstring=<callback n-umber>, where callback number is a part of login preceding the colon symbol

radius_acct_rewrite_login_answer

enable, on, true

not set

Enables substitution of login with the h323-call-address (9;23) attribute value for the Accounting-Request packets having the h323-remote-origin (9;26) attribute set to answer

radius_acct_rewrite_ login_originate

enable, on, true

not set

Enables substitution of login with the h323-call-address (9;23) attribute value for the Accounting-Request packets having the h323-remote-origin (9;26) attribute set to originate

blocked_pool_name

string

not set

Name of the IP pool to provide addresses for blocked users (in case those are entitled to some limited Internet access)

guest_pool_name

string

not set

Name of the IP pool to provide addresses for guest users (in case those are entitled to some limited Internet access)

named_pool_shuffle

yes, no

not set

Enables providing IP addresses from a random pool (if there are several with similar name). By default the addresses are issued from each pool in turn until it runs out; the pools follow in the order of addition

radius_auth_tel_ext_reg

yes, on, enable

not set

Enables recognizing of registration request by the condition Calling-Station-Id = Called-Station-Id in Access-Request

tls_certificate_path

string

not set

Path to the certificate file when using EAP-TTLS

tls_private_key_path

string

not set

Path to the private key file when using EAP-TTLS

tel_session_timeout

integer number

86400

Maximum duration (in seconds) of a VoIP session

disconnect_request_timeout

integer number

5

PoD response timeout after manual drop of the session

incoming_trunk_format

any

not set

Incoming trunk format: vendor_id:attribute_id:regexp

outgoing_trunk_format

any

not set

Outgoing trunk format: vendor_id:attribute_id:regexp

pbx_id_format

any

not set

Call id format: vendor_id:attribute_id:regexp

override_service_type

yes, on, enable

not set

Override service type in the incoming request. Set service type “framed”

dac_bind_host

IP address of the interface, or 0.0.0.0

0.0.0.0

Host to accept requests for connection parameters modification (incoming RADIUS server request)

h323_currency

string

USD

Currency code. Is used by IP telephony module

use_closed_sessions_cache

yes, on, enable

not set

Store information about recently closed sessions in cache

closed_sessions_сache_size

integer number

0

Size of closed sessions cache Measured by the number of sessions about which information is stored

h323_return_code_positive

yes, on, enable

not set

Make RADIUS server return Cisco:h323_return_code with positive values

Logging parameters Possible values Default Description

log_level

number from 0 to 3

1

Level of messages to be written to the main log file

log_file_main

file name

standard error stream

Main log file

log_file_debug

file name

standard error stream

Debugging log file

log_file_critical

file name

standard error stream

Critical log file

rotate_logs

yes, on, enable

rotation off

Enables log files rotation

max_logfile_size
Works if log file rotation is enabled
Interface parameters.

size in bytes

10485760

Maximum size of log file

syslog_name

string

not set

Log entry prefix (when logging to syslog is enabled)

Dynamic IP Address allocation

To tariff traffic in case when a user is dynamically assigned an IP address, a scheme of dynamic binding of an IP address to an IP traffic service link is introduced in UTM 5+.

The IP traffic service or dial-up/hotspot service link bound to the user’s account must have its Dynamic IP addresses option switched on.

If the Accounting-Start request has been received with the User-Name (1) attribute, which contains the login specified in the properties of the service link with the switched on Dynamic IP Addresses option, and the Framed-IP-Address (8) attribute, which contains a non-zero IP address, the UTM 5+ core sends an event to link this IP address to the user’s account. The event contains the account details and the issued IP address. The event handler calls the function that performs all the necessary validations and the linking itself (if applicable).

Control flow of the said function goes as follows:

  1. search for the IP traffic service link having its Dynamic IP addresses option on and bound to the given account. If not found, skip the rest;

  2. search for the IP group to which the given IP address belongs. If found, remove the group;

  3. Create an IP group with the given IP for address and 255.255.255.255 for mask (leave default values for the rest of parameters). Other IP group parameters are assigned default values;

  4. the IP group is connected to the service link found on step 1.

When creating or removing IP group, the system performs the following actions:

  • if the Internet for the personal account that the IP group belongs to is On, It changes to Off before creating or removing an IP group, After the IP group has been created or deleted the Internet status changes back to On.

  • Besides that a couple of Internet access enable events might be generated for the personal account if the Internet status was Off.

We do NOT recommended using dynamic IP address allocation if the address pool overlaps with the static IP addresses that are already associated with IP traffic service links.

DHCP

Entities

Processing a DHCP request

Configuration file

The DHCP allows you to associate a static IP address or a dynamic address pool with a MAC address, switch or a certain switch port. It receives messages and processes them according to RFC 2132.

The DCHP only allows to assign IPv4 addresses.

The server uses data from the database, communicates with the UTM 5+ Core via the Stream protocol and is able to receive messages about changes in the database and the need to update certain information.

By default the server works in not authoritative mode That can be set up in the configuration file (is_authoritative parameter).

Entities

The DHCP uses the following entities:

  1. Switch type - an entity that contains a certain switch type parameters. Those parameters are:

    Name

    a string containing the name of the switch.
    Uniqueness is not mandatory, but is recommended

    Supported volumes

    the number of ports for this switch type.
    May be several numbers, separated by commas

    DHCP option 82 parameters

    description of DHCP option 82 parameters, used by this switch type for composing DHCP requests:

    Remote ID

    is the ID of the switch, acting as a DHCP relay, which the request came from

    Port

    is the port number of the switch, acting as a DHCP relay, which the request came from

    VLAN ID

    is the VLAN ID, if there is one

    These parameters have properties like parameter type (string/binary), disposition, offset and length. These properties are used to read those parameters from the option 82 of a DHCP request.

  2. Switch - an entity that contains a certain switch parameters.

    Name

    is the name of the switch.
    One may use simple names that can help identifying a particular switch.
    Uniqueness is not mandatory, but is recommended

    Actual address

    is the actual address where one can find this switch

    Type

    is the internal Switch type ID, which contains the parameters for this switch type

    Remote ID

    is the Remote ID parameter of the DHCP option 82. It is used for composing a DHCP request.
    The parameter type and its length are set in the corresponding Switch type

    Ports count

    the number of ports for this switch type.
    The possible values of this parameter are specified in the device profile

    Access parameters

    are IP, login and password for the switch

    These parameters may be used in the firewall rules (see RFW section), which have to do with sending commands to the router. For example, when you need to turn off a switch port to prevent the user from using Internet, when the user has run into debt.

    These parameters are associated with the following variables: USW_IP, USW_LOGIN, USW_PASS, USW_REMOTE_ID, USW_ID, USW_PORT, UVLAN, SWITCH_IP, SWITCH_PORT
    See more here.

    You can also add other DHCP options in the switch properties. These options and their values will be included in the DHCP response if a DHCP client includes those options in the DHCP request.

  3. DHCP pool- an entity that contains an IP pool parameters such as standard DHCP options that are used to form the DHCP response when providing an IP address from this IP pool. The mandatory options are: gateway, mask, DNS server 1, the lease time in seconds (lease time less than 3600 seconds is not recommended). Default value is 86400 seconds (24 hours).
    The nonmandatory options are: DNS server 2, NTP server, Domain.
    You can add extra DHCP options to the DHCP pool properties. These options and their values will be included in the DHCP response if a DHCP client includes those options in the DHCP request.
    The Gateway and Mask parameters are used to identify which DHCP pool does an IP address belong to.
    IP address ranges are also a part of a DHCP pool properties. Every IP address range is defined by the first and the last IP address.
    Besides that there’s a Block action type for every DHCP pool. This parameter determines how a DHCP request from a blocked user is processed. It allows one to provide IP addresses from this pool only to blocked users, provide IP addresses from this pool despite of user being or not being blocked, or to ignore requests coming from blocked users. Available options: Use blocked and Ignore request

    If certain DHCP options are specified in a DHCP request, the DHCP response will include those options if their values are set in the database. If no options are specified in a DHCP request, the DHCP response will include all the options whose values are set in the database.

  4. IP group is a description of a network and its parameters, associated with an IP traffic service link. The IP traffic is identified for the following tariffing and IP addresses are provided based on the IP group settings. An IP group defines the link between a static IP address or a dynamic IP address pool and the following parameters:

    • MAC address

    • Internal switch ID

    • Switch port

    • VLAN ID

You need to set a static IP address or a dynamic IP pool It is also necessary to specify the values of the parameters described above, to which an IP address or a pool of dynamic addresses should be assigned.

The static IP address ranges shouldn’t cross the dynamic IP address ranges.
In other words, the static IP address pool should not be specified as a dynamic IP address pool in any IP group, as it may lead to an inappropriate DHCP behavior.

Port and VLAN ID are DHCP option 82 parameters. The DHCP reads them according to the Switch type chosen for the current switch.

After adding an IP traffic service link and adding an IP group containing parameters defining a link with an IP address, a record of correspondence of a static IP address or a dynamic pool and those parameters will appear in the database.

Processing a DHCP request

When receiving a DHCP request, the server compares the parameters of the request with the IP group’s parameters from the database. The parameters priority is as follows: MAC address ⇒ Switch ID ⇒ Port ⇒ VLAN ID. The database is sorted descending by these parameters and then the search is performed. Each database record contains parameters for a single IP group.

The DHCP server only compares database records that contain one of the following sets of parameters:

  • MAC address

  • MAC address and Switch ID

  • MAC address, Switch ID and Port

  • MAC address, Switch ID, Port and VLAN ID

  • Switch ID

  • Switch ID and Port

  • Switch ID, Port and VLAN ID

MAC address is compared first (if it is set in the database) Then the DHCP server reads the option 82 parameters (if it is present in the DHCP request), based on the appropriate Switch type parameters for the switch specified in the database record that is currently being checked. If the parameters were read correctly, UTM5 DHCP server compares those parameters with the corresponding parameters present in the database. If one of the parameters is not present in the DHCP request, it is ignored for the comparison. The comparison is considered to be successful if there are DHCP request parameters that match the corresponding parameters from the database and there are no corresponding parameters that do not match.

After providing an IP address, the DHCP server adds a record, containing the IP address lease start date and the lease time (lease time is set in the DHCP pool properties) to the database. The lease term is set in the properties of the DHCP pool.

Configuration file

By default, the RADIUS server uses this configuration file/netup/utm5/dhcpd5.cfg

The configuration file have the following format: parameter=value.

A sequence of symbols before the equals sign is treated as parameter’s name, while the one after it stands for the parameter’s value. Whitespaces count. Empty lines are ignored. A line starting with # is a comment.

Parameter Possible values Default Description

Database_type mandatory parameter

mysql, postgres

mysql

UTM 5+ database type

database mandatory parameter

string

UTM5

UTM 5+ database name

database_host

IP-address/hostname

localhost

UTM 5+ database host name

database_login

string

root

Login to access the UTM 5+ database

database_password

string

not set

Password use to access the UTM 5+ database

database_sock_path

path to file

/var/run/mysqld/ mysqld.sock

MySQL only. The path to the database socket file. This parameter is used if the database_host parameter is not set or has a “localhost” value

database_port

from 1 to 65534

3306

MySQL only. The database server port

database_charset

encoding specification string

utf8

MySQL only. Database connection encoding

core_host mandatory parameter

IP address

127.0.0.1

UTM 5+ core host IP address

core_port mandatory parameter

from 1 to 65534

12758

The port where the UTM 5+ core listens to Stream (stream_bind_port parameter in the configuration file of the core)

dhcp_login

string

dhcp

User login to access the billing core

dhcp_password

string

dhcp

User password to access the billing core

dhcp_lease_expire_timeout

time in seconds

1800

Minimum time after lease expiration that the IP address, assigned by the DHCP may still be used

dhcp_lease_validation_period

time in seconds

86400

Remaining lease time check rate

interface

<interface name>,<IP-address> pairs of parameters. Add multiple interfaces each at new string: interface=<interface name>,<IP address> etc.

not set

List of interfaces, accepting DHCP requests and corresponding IP addresses. If the name of the interface is eth0, there are two possible cases: 1) IP address is set (e.g. 10.0.0.1) - the server accepts only unicast requests to address 10.0.0.1:67 2) IP address is set to 0.0.0.0 - the server receives broadcast requests, that come to eth0 (in Linux socket options SO_BROADCAST and SO_BINDTODEVICE are used)

is_authoritative

yes, on, enable

disabled

DHCP server mode: authoritative or not authoritative

load_log

yes, on, enable

disabled

Load leases log at DHCP startup. The default value should be good for most systems

log_level

from 0 to 3

1

Determines the level of the messages that get to the main message stream

log_file_main

path to file

standard error stream

Main log file

log_file_debug

path to file

standard error stream

Debugging log file

log_file_critical

path to file

standard error stream

Critical log file

max_logfile_count

number

unlimited

Maximum number of log files to keep

max_logfile_size

size in bytes

10485760

Maximum size of log file

ping_retry_count

number

1

The ICMP request retries limit (see use_ping)

rotate_logs

yes, on, enable

rotation off

Enables log files rotation

siaddr

IP address

Server IP address

The IP address of the next server participating in the download

use_ping

yes, on, enable

disabled

If an existing lease is found when trying to give an IP address to a client, send an ICMP request to that IP address to find out the actual status of the client

use_old_lease

yes, on, enable

disabled

Renew lease for a particular MAC address in case the DHCP option 82 parameters can’t be matched

RFW

Firewall rules

Variables

Events

Firewall

The utm5_rfw settings

Configuration file

Synchronization of rules

RFW is a daemon that executes the commands issued by the UTM 5+ core. RFW is intended for controlling the external software, including firewalls, routers, shapers, etc.

Workflow description:

  • Connects to the billing core.

  • Receive commands from it;

  • Execute commands locally or remotely.

On startup the RFW authorizes in the system using the parameters given in its configuration file. For successful authorization the RFW must be registered in the list of firewalls (see Admin interface: Firewall list). The amount of RFWs in the system is unlimited.

RFW establishes permanent connection with the core using the Stream protocol and awaits for commands issued by the core on some events. Commands for particular events are assigned in the administrator’s interface on Settings: Firewall rules.

The commands are executed either on the same server where RFW is running (if the firewall type is set to Local), either remotely over rsh, if it was set to Cisco (rsh).

If the RFW is not connected to the core, the commands are cached for 24 hours. On reconnection of RFW to the core some commands may be executed according to the given synchronization parameters (see ); if the reconnection was without any flags, all cached rules will be sent to the affector. Also, an arbitrary command may be assigned for execution on RFW startup by the firewall_flush_cmd parameter.

Firewall rules

A firewall rule is an object that contains the command’s template and defines the conditions to execute the command.

The set of registered firewall rules may be found at Settings: Firewall rules page of the administrator’s interface.

Firewall rules ready for execution are passed to the RFW.

Firewall rules have the following parameters:

  • Applicability domain (to which users it is applicable);

  • Initiating event (the event that causes the rule to execute);

  • Place to apply (RFW to which the rule is passed and the corresponding firewall where it is actually executed);

  • Template (the command proper).

The command templates may include variables which are substituted with their values on sending the command to RFW.

Applicability domain is a property that defines accounts to which the rule is applicable. If All users option is checked, the rule is applicable to all accounts in the system. Otherwise the subset of interest may be defined by user ID, by group, or by the tariff plan. combined by default with logical OR, though an alternative option of using logical AND is also available.

Selection by tariff plan covers the accounts having (among others) some tariff links with this tariff plan set as current. The rules applicable to service links or IP groups will be applied to all service links or IP groups related to these accounts, including those which by themselves are connected with different tariff plans.

Initiating event (one or more) is selected from the list.

Place to apply – selects the firewall to use from the list of existing firewalls, or probably selects all of them.

Command template is a string probably containing variables which are substituted with their values on sending the command to the RFW.

When executing locally, an RFW calls the command as follows:
[sudo_path ][firewall_path ]arg1[ arg2[ arg3…​]],
where the optional parameters sudo_path and firewall_path are taken from the config file, and the rest is the command template where variables are already substituted with their values. Therefore the case when neither sudo_path nor firewall_path set requires the command template to start with the name of some external executable file.

When executed over rsh, the command is sent as is, i.e. just the template with substituted variable values.

Variables

You can use variables from the table below in the command templates. If you use a variable in the command that cannot be applied to the selected event, the default value will be used instead.

The list of events:

Parameter Default Applicability domain Description

UID

empty string

All events excluding closing detailed statistics file and the logfile

User ID

UGROUP

empty string

Semicolon-delimited list of IDs of groups which the user belongs to

LOGIN

empty string

User login

EMAIL

empty string

All events excluding closing detailed statistics file, closing logfile and User deleted

E-mail address set in the user’s properties

ACCOUNT_ID

0

Account ID

RULE_ID

0

User ID plus fw_rule_ offset value from the list of system parameters

FULL_NAME

empty string

Full name of a user

MOBILE_PHONE

empty string

User mobile phone number

WORK_PHONE

empty string

User work phone number

HOME_PHONE

empty string

User home phone number

SWITCH_IP

empty string

Firewall name set in the Remote switch field in the user properties

SWITCH_PORT

empty string

Port set in the user’s properties

SLINK_ID

0

All events excluding closing detailed statistics file, closing logfile, Add user, Edit user and Balance events

Service link ID

ULOGIN

empty string

Internet events Add/Edit/Delete dialup service link, hotspot enabled, hotspot disabled, Set bandwidth limit (incoming), Edit bandwidth limit (incoming), Delete bandwidth limit (incoming), Set bandwidth limit (outgoing), Edit bandwidth limit (outgoing) and Delete bandwidth limit (outgoing)

Login set in the properties of a service link or an IP group

UIP

0.0.0.0

Internet events, hotspot enabled, hotspot disabled, Set bandwidth limit (incoming), Edit bandwidth limit (incoming), Delete bandwidth limit (incoming), Set bandwidth limit (outgoing), Edit bandwidth limit (outgoing) and Delete bandwidth limit (outgoing)

User network address set in the IP group properties under IP

UMASK

255.255.255.255

Dot-separated network mask (for example, 255.255.255.0).

UINVERTMASK

0.0.0.0

Dot-separated inverted network mask (for example, 0.255.255.255). Used for Cisco routers

UBITS

32

Binary network mask (for example, 32 means 255.255.255.255)

MAC

empty string

Internet events, Set bandwidth limit (incoming), Edit bandwidth limit (incoming), Delete bandwidth limit (incoming), Set bandwidth limit (outgoing), Edit bandwidth limit (outgoing) and Delete bandwidth limit (outgoing)

MAC address set in the IP group properties

SERVICE_ID

0

Add/ Edit/Delete dialup service link, Open session, Close session, Add/Edit/Delete IP traffic service link, Add/Edit/Delete telephony service link, Add/Edit/Delete tech parameter Add/Edit/Delete IPTV service link

Service ID;

UPASS

empty string

Add/Edit/Delete dialup service link, hotspot enabled and hotspot disabled

Hotspot or dialup service password

DIALUP_FLAGS

empty string

Add/Edit/Delete dialup service link

Dialup service link flags:
0 – Ringdown allowed is set;
3 – Callback allowed is set;
1 – both are set

UCID

empty string

CID parameter value for a dial-up service link

UCSID

empty string

CSID parameter value for a dial-up service link

DIALUP_LIST

empty string

Blocking events

Semicolon-separated list of parameters of dial-up service links related to the given account in a form ID/ l-ogin/password/CID/CSID/flags for each link

BLOCK_TYPE

-1

Blocking type

SLINK_LIST

empty string

Semicolon-separated list of service link IDs related to the given account

EXTERNAL_ID

empty string

External account ID

BALANCE

0

Balance events

Account balance

TECH_PARAM_TYPE

0

Add tech parameter, Modify tech parameter and Delete tech parameter

Tech parameter type:
1 – web, 2 – email

TECH_PARAM_ID

0

Tech parameter ID

TECH_PARAM_VALUE

empty string

Tech parameter value

TECH_PARAM_PASS

empty string

Tech parameter password

TECH_PARAM_T_ID

-1

Tech parameter type ID:
1 – web, 2 – email

SERVICE_TYPE

0

Open session, Close session, Add tech parameter, Modify tech parameter and Delete tech parameter

Service type

TARIFF_LINK_ID

0

Add / Edit / Delete IP traffic service link / Video on demand

Tariff link ID

DISCOUNT_PERIOD_ID

0

Accounting period ID

START_DATE

0

Staring date of a service link

END_DATE

0

Ending date of a service link

IP_GROUP_ID

0

IP group ID of a service link

IPTV_SERVICE_DATA

empty string

Add/Edit/Delete IPTV service link

The contents of Custom options field in IPTV service parameters

IP_GROUP_LIST

empty string

Blocking events, Add IP traffic link, Edit IP traffic link and Delete IP traffic link

Semicolon separated list of IP groups in a form address/mask/login/password/MAC/NetFlow provider for each group

TIME_LIMIT

0

Hotspot enabled, hotspot disabled

Remaining time of service for hotspot

TEL_LIST

empty string

Add telephony link, Edit telephony link, Delete telephony link and Blocking events

Semicolon-separated list of telephone numbers in a formnumber/ l-ogin/CIDs/incoming trank/outgoing trank/pbx_id/password for each number

NAS_ID

empty string

Open session иClose session

PBX ID;

NAS_IP

0.0.0.0

NAS IP address

SESSION_ID

empty string

Session ID (string)

ACCT_STATUS_TYPE

0

Session status
1 – open, 2 – closed

CALLING_SID

empty string

Calling staton ID

IP_GROUP_ID

empty string

Called staton ID

FRAMED_IP

0.0.0.0

IP address set in the Framed-IP-Address (8) RADIUS attribute

BANDWIDTH

0

Set bandwidth limit (incoming), Edit bandwidth (incoming), Delete bandwidth limit (incoming), Set bandwidth limit (outgoing), Edit bandwidth limit (outgoing) and Delete bandwidth limit (outgoing)

Currently permitted bandwidth

PATH

empty string

Detailed statistics file closed and Log file closed

Path to the log file or statistics file

PAYMENT_AMOUNT

0

Making payment

Payment amount

PAYMENT_TYPE

0

Payment method ID

ACTION

empty string

User log events

Action ID

COMMENTS

empty string

User log changes comments

WHO

empty string

ID of a user who initiated the changes

PASSWORD

empty string

HotSpot user registration

User personal cabinet password

TEL_NUMBER

empty string

User mobile phone number

TILL

empty string

User card existence time limit. When registering again before the end of the period the existence time is updated

USW_IP

empty string

Internet events

Switch IP address in IP group properties

USW_LOGIN

empty string

Switch login in IP group properties

USW_PASS

empty string

Switch password in IP group properties

USW_REMOTE_ID

empty string

Switch Remote ID in IP group properties

USW_ID

empty string

Switch ID in IP group properties

USW_PORT

empty string

Switch port in IP group properties

UVLAN

empty string

VLAN in IP group properties

Events

The list of events that may trigger a command:

Turn Internet on

executes for each IP group in every IP traffic service link related to the given account when the Internet status for this account is changed to On

Turn Internet off

executes twice for each IP group in every IP traffic service link related to the given account when the Internet status for this account is changed to Off

Adding users

executes for the user being added to the system via the administrator’s interface or automatically

User modified

executes for the user whose data has been changed

Removing a user

executes for the user which is being deleted

Blocking events Block type changed

executes for an account on changing its blocking state (that is, on blocking or unblocking)

Balance events

executes for an account when its balance passes by the threshold defined by the system parameter notification_borders. Event is only executed if balance passes one of the borders

Session opened

executes for a service link on Accounting-Start request from the RADIUS

Session closed

executes for a service link on Accounting-Stop RADIUS request

Dialup link added

executes for a dial-up service link on its creation

Dialup link modified

executes for a dial-up service link on changing its parameters

Dialup link deleted

executes for a dial-up service link on its removal

IP traffic link added

executes for an IP traffic service link on its creation

IP traffic link modified

executes for an IP traffic service link on changing its parameters

IP traffic link deleted

executes for an IP traffic service link on its removal

Telephony service link added

executes for a telephony service link on its creation

Telephony service link modified

executes for a telephony service link on changing its parameters

Telephony service link deleted

executes for a telephony service link on its removal

Hotspot enabled

executes for a hotspot service link on user’s authorization

Hotspot disabled

executes for a hotspot service link on user’s logout or session stopping

Add hotspot user

executes for a hotspot user being added to the system via the web interface

Tech parameters events Tech parameter added

executes for a service link on creation of a technical parameter (see ) related to it

Tech parameter modified

executes for a service link on changing a technical parameter related to it

Tech parameter deleted

executes for a service link on removal of a technical parameter related to it

Set bandwidth limit (incoming)

executes for each IP group on changing the shaping conditions imposed on the given service link for the incoming channel

Edit bandwidth limit (incoming)

executes for each IP group on changing the shaping conditions imposed on the given service link for the incoming channel (say, when the amount of traffic passes over the border limits)

Delete bandwidth limit (incoming)

executes for each IP group on leaving the shaping conditions imposed on the given service link for the incoming channel (say, when the amount of traffic is zeroed at the end of accounting period)

Set bandwidth limit (outgoing)

executes for each IP group on approaching the shaping conditions imposed on the given service link for the outgoing channel (say, when the amount of traffic reaches the lower border limit)

Edit bandwidth limit (outgoing)

executes for each IP group on changing the shaping conditions imposed on the given service link for the outgoing channel

Delete bandwidth limit (outgoing)

executes for each IP group on leaving the shaping conditions imposed on the given service link for the outgoing channel

Raw traffic file closed

executes for the detailed statistics file on its closing

Log file closed

executes for the log file on its closing

Making payment

executes when a payment is made

New DHCP lease

executes on new IP address allocation (DHCP lease is offered)

DHCP lease update

executes when a DHCP lease is updated

DHCP lease expire

executes when a DHCP lease expires

IPTV link added

executes on IPTV service link creation

IPTV link modified

executes on IPTV service link modification

IPTV link deleted

executes on IPTV service link deletion

VoD link added

executes on VoD service link creation

VoD link modified

executes on VoD service link modification

VoD link deleted

executes on VoD service link deletion

Store user log

executes for any User log events

Firewall

The Firewall is a system object used to identify an affector, a commutator, or a NetFlow provider.

The Settings: Firewalls page of the administrator’s interface lists the registered firewalls and contains the interface for adding, modifying or deleting them.

Each firewall has the following parameters:

ID

is assigned automatically

Type

is Local to execute the commands locally, or Remotte Cisco to execute them remotely over rsh. Must conform to the firewall_type parameter set in the RFW configuration file of this firewall.

Name

is a unique name to identify the RFW. Must conform to the rfw_name parameter set in the RFW configuration file of this firewall.

IP

is an IP address of NetFlow provider to be set in the properties of an IP group

Login

is a login to use as remote login in rsh authorization. Relevant only for the Remote Cisco type. netup is always used as the local login.

Comments

is an arbitrary comment

The utm5_rfw settings

The utm5_rfw executable file is called /netup/utm5/bin/utm5_rfw. On the command line, you can specify the following parameters:

-c <path>

The path to the configuration file

-s <flags>

Synchronize firewall rules on startup (only commands associated with this RFW are executed, and only on this RFW)

-f

Deprecated, superseded with -s enable

-o

Deprecated, superseded with -s enable

-v

Version number and parameter information

The following options for utm5_rfw startup on unix systems are available:

  1. Direct start of the /netup/utm5/bin/utm5_rfw executable with necessary parameters.

  2. Start on watchdog with start parameter:

    /netup/utm5/bin/safe_utm5_rfw start
    In this case the -f command line parameter is effectively passed to the executable. The script will restart utm5_rfw automatically on failure;

  3. Start via the automatic startup script (recommended).

    /etc/init.d/utm5_rfw start
    To stop the utm5_rfw and the watchdog script, execute:
    /etc/init.d/utm5_rfw stop

To start an RFW on a remote machine, it is essential that its config file parameters core_host and core_port conform to the address and port used by the core for Stream protocol connections.

Several RFWs may run on the same machine simultaneously, given that they have separate config and PID files.

Configuration file

By default, the RFW uses this configuration file – /netup/utm5/rfw5.cfg.

The configuration file have the following format: parameter=value.

A sequence of symbols before the equals sign is treated as parameter’s name, while the one after it stands for the parameter’s value. Whitespaces count. Empty lines are ignored. A line starting with # is a comment.

Parameter Possible values Default Description

Database_type mandatory parameter

mysql, postgres

mysql

UTM 5+ database type

rfw_name

string

mandatory parameter

Name of the RFW by which it is known to the UTM 5+ core. The same value should be specified in the Name field when adding the firewall to the list of firewalls

core_host

IP address

mandatory parameter

IP address of the host on which the UTM 5+ core is running

core_port

number from 1 to 65534

mandatory parameter

The port where the UTM 5+ core listens to Stream (stream_bind_port parameter in the configuration file of the core)

rfw_login

string

mandatory parameter

Login to access the UTM 5+ core

rfw_password

string

mandatory parameter

User password to access the billing core

firewall_type

local, cisco

local

Firewall type. Must conform to the Type parameter of the corresponding firewall. If set to local, the commands will be executed locally, and in the case of cisco – will be passed via the rsh

sync_flags

see below

not set

Syncronization flags

Parameters that apply to the specified firewall_type=local:

sudo_path

executable file name

not set

Name of the sudo executable file

firewall_path

executable file name

empty string

Name of the executable file controlling the external software

firewall_flush_cmd

executable file name

empty string

Script running on connection and reconnection to the core

dont_fork

yes, enable, true

commands execute in parallel

If the value is set, the rules are executed sequentially, i.e. each rule is executed only after the previous one. When using the iptables command, it is recommended that this option be set to

Parameters that apply to the specified firewall_type=cisco:

cisco_ip

IP address

mandatory parameter

IP address to send the rsh commands to

Logging parameters Possible values Default Description

log_level

number from 0 to 3

1

Level of messages to be written to the main log file

log_file_main

file name

standard error stream

Main log file

log_file_debug

file name

standard error stream

Debugging log file

log_file_critical

file name

standard error stream

Critical log file

rotate_logs

yes, on, enable

rotation off

Enables log files rotation

max_logfile_count
Works if log file rotation is enabled

number

unlimited

Maximum number of log files to keep

max_logfile_size
Works if log file rotation is enabled

size in bytes

10485760

Maximum size of log file

pid_file

file name

/var/run/utm5_rfw.pid

PID file

syslog_name

string

not set

Log entry prefix (when logging to syslog is enabled)

The core_timeout parameter is deprecated and out of use.

Synchronization of rules

On automatic startup of RFW some rules may be executed in order to reinstall the configuration of the external software.

Only the rules related to the given RFW may be executed, and only on this RFW itself. The set of rules to execute is defined by the flags (listed below).

The flags may be passed either via the config file parameter sync_flags or via the command line parameter -s, the latter having higher priority. When several flags used simultaneously, they must be joined into a colon-separated string. Available flags include:

enable

enable executes the rules related to the Internet on event

disable

disable executes Internet off

users

users executes User added for all users

iptraffic

executes IP traffic link added for all such links

dialup

executes Dialup link added for all such links

blocks

executes Block type changed for all accounts

shaping

executes Set bandwidth limit for all IP groups

UTM 5+ Traffic collector

This module gathers the IP traffic data in NetFlow format, converts it to internal UTM 5+ format and classifies it. Using additional traffic collectors decreases the UTM 5+ core server load and allows you to correctly process information from NetFlow providers from subnetworks with crossing address spaces. The executable file utm5_traffic_collector is located in /netup/utm5/bin.

In standard UTM 5+ configuration a single System traffic collector is available. Go to the Settings group, Traffic collectors page of the administrator’s interface for the traffic collector and UTM 5+ core interaction settings.

By default, the UTM 5+ Traffic Collector on UNIX systems uses this configuration file – /netup/utm5/utm5_traffic_collector.cfg.

The configuration file have the following format: parameter=value.

A sequence of symbols before the equals sign is treated as parameter’s name, while the one after it stands for the parameter’s value. Whitespaces count. Empty lines are ignored. A line starting with # is a comment.

Parameter Possible values Default Description

core_host mandatory parameter

IP address

127.0.0.1

IP address of the UTM 5+ core host

core_port mandatory parameter

from 1 to 65534

12758

The port where the UTM 5+ core listens to Stream (stream_bind_port parameter in the configuration file of the core)

tc_login

string

collector

Login to access the UTM 5+ core Is set on the System users page of the administrator’s interface

tc_password

string

collector

Password to access the UTM 5+ core Is set on the System users page of the administrator’s interface

tc_name

string

traffic_collector

A unique traffic collector name. Is set on the Traffic collectors page of the administrator’s interface

nfbuffer_host

string

0.0.0.0

IP address of the server listening to NetFlow

nfbuffer_port

string

9997

Port listening to NetFlow

nfbuffer_bufsize

integer number

set by OS

Size of the UDP socket buffer used to accept NetFlow

log_level

from 0 to 3

1

Defines the level of messages that fall into the message stream

log_file_main

path to file

standard error stream

Main log file

log_file_debug

path to file

standard error stream

Debugging log file

log_file_critical

path to file

standard error stream

Critical log file

rotate_logs

yes, on, enable

rotation off

Enables log files rotation

max_logfile_count

number

unlimited

Maximum number of log files to keep

max_logfile_size

size in bytes

10485760

Maximum size of log file

tc_pid_file

path to file

/var/run/utm5_traffic_collector.pid

Traffic collector PID file path

Utilities

Urfaclient

Scheme

Script

Data files

Utility usage

Configuration file

Examples

The urfaclient is intended for the unified access to the UTM 5+ core data structures via RPC interface (URFA).

The Urfaclient consists of:

  • the liburfaclient.so library, which provides interaction between the utility and the billing core;

  • utm5_urfaclient utility that actually performs the requested actions;

  • schemes describing input and output parameters of the involved URFA functions;

  • Specific URFA scripts for any particular action or a sequence thereof.

Output of the executed URFA functions is directed to stdout.

The Urfaclient provides direct interface for low-level operations which (unlike those performed via the control center or the web interface)
may lack proper verifications or the coupled actions necessary to maintain the data integrity.
Therefore any urfaclient operation to be applied to the production system must be thoroughly checked in the test environment beforehand.
NetUP does not assume responsibility for any possible losses caused by incorrect usage of the urfaclient module.

Scheme

The api.xml scheme contains descriptions of the input and output parameters of functions in the form of XML tags; sequences of actions depending on the value of these parameters.

Path to api.xml may be passed via the command line key -api. By default: it is /-netup/utm5/xml/api.xml.

Expression value is either the value of a variable, or the output value of a built-in function, or a constant, if neither a variable nor a function with such name exist.

Variables are actually arrays of strings. When array index is not specified, zeroth element is assumed by default.

Interpretation of variables is context-dependent. For example, an integer tag implies parsing of string on return and serialization on assignment.

All variables belong to the global scope, so care must be taken to avoid name conflict.

The built-in system functions are:

  • now() returns string representation of current time in unix format;

  • max_time() returns string representation of maximum possible time in UTM 5+ in unix format (2000000000, year 2033);

  • size(varname) returns the length of the var_name array.

Permissible tags: Description

urfa

A root tag.
Has no attributes. May contain one or several function tags.

function

Describes a function.
Mandatory attributes: name of the function; id of the function.
Mandatory tags are: input and output (one for each function’s description).
The order of input and output tags does not matter.

input

Contains description of the function’s input parameters.
Has no attributes. May contain an ordered sequence of the following tags: integer, long, double, string, ip_address, if, for, error.

output

The same as input, only for output parameters of a function.

integer

May reside either in input or in output. Contains 32-bit signed integer.
Must have the name attribute with variable name.
May also have attributes:
default – default value. Relevant only for input parameters, in case if the corresponding variable with a name set in the name property has not been found. If both the variable and the default value are absent, the program will abort and return a non-zero error code.
array_index – source or destination array index.

long

It is similar to the integer but contains description of integer character parameters with the length of 64 bits (int64_t).

double

It is similar to the integer but contains a description of floating point parameters (double).

string

It is similar to the integer but contains a description of string parameters.

ip_address

It is similar to the integer but contains a description of IPv4 address type parameters (for example, 192.168.0.1 or 255.255.0.0). The internal representation of an IPv4 address is a 32-bit integer (int32_t type).

if

Provides conditional operator in a sequence of parameters depending on the variable value.
Must have the following attributes: variable is the name of the variable to be checked, value to check against, condition to check (eq for equal, ne for not equal).
May contain an ordered sequence of the following tags: integer, long, double, string, ip_address, if, for, error.
Other nested tags are not allowed.

for

Provides loop operation.
Must have the following attributes: name of the iterator variable, from as starting iterator value, count as number of iterations.
May contain an ordered sequence of the following tags: integer, long, double, string, ip_address, if, for, error.
Other nested tags are not allowed.

error

Causes exit with a non-zero error code.
May have the following attributes: code – the exit code to return, comment – error description, variable to print out after the comment.

Script

URFA script describes a sequence of URFA function calls, loops and conditional operators in a form of XML tags. Each action correspond to one file called <action_name.xml>.

Name of the directory containing URFA scripts may be passed via the command line key -x. The default value is /netup/utm5/xml/. For example, the add_user action by default uses the file /ne-tup/utm5/xml/add_user.xml.

URFA script must conform to the scheme.

Permissible tags: Description

urfa

A root tag.
Must contain an ordered sequence of the following tags: call, parameter, add, sub, mul, div, cat, if, for, message, out, set, error, remove.

call

Performs a call to a URFA function defined in an api file.
Must have the following attribute: function is the name of the function to be called.
May have the output attribute, if set to zero, XML output is blocked.
May contain parameter tags.
Other nested tags are not allowed.

parameter

Must have the name attribute with variable name.
May provide input value if contains the value attribute; otherwise defines a command line parameter.
If a variable is set both via the value attribute in the action file and via the command line, the latter has higher priority. All values of the given parameter or its default value are placed in an array with name defined in the name attribute.
Multidimensional arrays, whenever required, must be entered by means of the datafile (see Data file).
Also may have the comment attribute containing the description of the variable which may be printed out via combined use of the command line keys -a [action_name] and ‑help.

add

The tag of arithmetic addition.
Must have the following attributes: arg1 – first addend, arg2 – second addend, dst – name of the variable to store the result.

sub

The tag of arithmetic subtraction.
Must have the following attributes: arg1 – minuend, arg2 – subtrahend, dst – name of the variable to store the result.

mul

The tag of arithmetic multiplication.
Must have the following attributes: arg1 – first addend, arg2 – second addend, dst – name of the variable to store the result.

div

The tag of arithmetic division.
Must have the following attributes: arg1 – dividend, arg2 – divider, dst – name of the variable to store the result.

cat

The tag of string concatenation.
Must have the following attributes: arg1 – first string, arg2 – second string, dst – name of the variable to store the result.

if

Provides conditional operator in a sequence of parameters depending on the variable value.
Must have the following attributes: variable is the name of the variable to be checked, value to check against, condition to check (eq for equal, ne for not equal).
May contain an ordered sequence of the following tags: call, parameter, add, sub, mul, div, cat, if, for, message, out, set, error, remove.
Other nested tags are not allowed.

for

Provides loop operation.
Must have the following attributes: name of the iterator variable, from as starting iterator value, count as number of iterations.
May contain an ordered sequence of the following tags: call, parameter, add, sub, mul, div, cat, if, for, message, out, set, error, remove.
Other nested tags are not allowed.

message

Must have the text attribute.
Outputs a debugging message, defined in the text attribute, to STDOUT.

out

Must have the var attribute.
Outputs a variable defined by var to STDOUT.

set

Sets the variable value.
Must have the following attributes: dst and either src or value.
Simultaneous use of src and value is forbidden.
May also have the following attributes:
Dst_index is the array index for destination (0 assumed by default);
src_index is the array index for source (0 assumed by default);
dst defines the name of the destination variable (created if does not exist);
src defines the name of the source variable;
value is the expression to assign to the variable.
New element of an array may be written either to an existing element or to the next adjacent one (i.e. the element with index equal to the current size of the array). Indexes start from 0.
Calls to out-of-range elements cause program abort.

error

Causes exit with a non-zero error code.
May have the following attributes: code – the exit code to return, comment – error description, variable to print out after the comment.

shift

shifts the name array one step to the left, removing the first element. Usage not recommended.

break

Interrupts the innermost for tag execution and continues from the following line.

remove

Removes the whole array name, or its single element with index array_index, in case if the attribute is given, otherwise the whole array is removed. In this case the subsequent elements are shifted left by one.

Data files

Data file describes an array or several arrays of data to be used as input parameter(s) in a function. Data file should be passed to urfaclient via the command line key -datafile.

Permissible tags: Description

urfa

A root tag.
Must contain a sequence of array tags.

array

An array of arbitrary dimensions.
Must have the following attributes: name of the variable; dimension of the array.
Also may have the comment attribute which contains an arbitrary comment.
Must contain an ordered sequence of the dim tags.
Other nested tags are not allowed.

dim

An array element, which itself may or may not be an array.
May have the comment attribute which contains an arbitrary comment.
The content of a tag must be either the value of an array element or an ordered sequence of dim tags.
Other nested tags are not allowed.

Utility usage

Utility usage is done from the command line with the parameters. Launch the Urfaclient with the following command:
/netup/utm5/bin/utm5_urfaclient

Each command line parameter consists of the space-separated key-value pair, with the exception of the ‑help, -debug, -u, and -dealer keys which require no value.

Most of parameters have their counterparts in the config file. The complete list of command line keys and config file parameters is given below.

Besides that, some action-specific parameters are possible. Depending on the nature of the action, they may or may not be mandatory.

All string values must be passed in UTF-8 encoding. Order of parameters is not important.

Configuration file

By default, the Urfaclient uses this configuration file /netup/utm5/utm5_urfaclient.cfg.

Config files have the following format: parameter=value.

A sequence of symbols before the equals sign is treated as parameter’s name, while the one after it stands for the parameter’s value. Whitespaces count. Empty lines are ignored. A line starting with # is a comment.

All parameters may be passed to the program via the command line as well. The command line parameters have priority over those given in the config file and in the data file (if any).

The list of available parameters and command line keys is given below.

Key Parameter Default Description

-h

core_host

127.0.0.1

IP address of the host on which the UTM 5+ core is running

-p

core_port

11758

The port where the UTM 5+ core listens to URFA (urfa_bind_port parameter in the configuration file of the core)

-l

core_login

init

Login to access the UTM 5+ core

-P

core_password

init

Password to access the UTM 5+ core

-x

xml_path

/netup/utm5/xml/

The name of the directory that contains the schema and URFA scripts

-api

api

/-netup/utm5/xml/api.xml.

Path to schema file

-u

plain_user

not set

If the value is "yes", only user functions can be called, otherwise only system functions can be called.

-dealer

dealer

not set

If the value is "yes", only dealer functions can be called

-s

session_key

not set

If this parameter is specified, the user session is restored by the key specified as the parameter value. The login and password of the system user must be specified in the configuration file or in the command line

-i

user_ip

127.0.0.1

When restoring a session by key, the value of this parameter determines the IP address from which the session to be restored was initialized

-a

not set

not set

Action name (mandatory parameter)

-c

not set

/netup/utm5/utm5_urfaclient.cfg

The path to the configuration file

-help

not set

not set

Displays help on parameters of the called script, if it exists

-debug

not set

not set

Enables additional debugging output, including the inner variables’ values

-datafil e

not set

not set

Name of data file

-<name>

not set

not set

Value of the function input parameter called <name>

Usage example

Sample URFA scripts are located at /netup/utm5/xml. There are also a scheme (api.xml) and data file examples: search_users_new_data.xml and teldata.xml.

Utility usage example:

utm5_urfaclient -a link_tariff_with_services -user_id 5
-account_id 5 -discount_period_id 2 -tariff_current 1
-ip_address 10.4.5.7 -iptraffic_login test4
-iptraffic_password 123

In this example a link_tariff_with_services.xml script is called, which attaches certain tariff plan to a specified user account, together with attachment of all services having their Attach by default flag set.

The resulting output is directed to STDOUT.

Importing from text files

File parsing

Utilities usage

Configuration files

utm5_send_traffic should be employed to import traffic info in case if the said info contains neither sender nor destination address, but provides the data on traffic quantity, its class, and the login of the IP traffic service link to which the traffic belongs. If the option of providing traffic data via NetFlow is available, it should be used instead.

utm5_send_cdr should be used to import the info on phone calls in case if the provider of the said info does not support the RADIUS Accounting-Request. If the option of sending the phone calls info via the RADIUS Accounting-Request is available, it should be used instead.

File parsing

In case of parsing a traffic info file the following actions are performed:

  1. A connection is established to the UTM 5+ core using URFA protocol.

  2. The file is read line by line, and each line parsed according to standard format.

  3. Data from each string are stored in the internal format.

  4. Data structures in the internal format are passed to by calling the URFA function 0x5511.

  5. utm5_send_traffic stops.

The traffic data file should contain the data in the following format:

  1. Each string must be formatted like:
    <LOGIN><BYTES><TCLASS><IP>

    LOGIN

    is the login of the IP traffic service link to which the traffic belongs

    BYTES

    is the traffic amount in bytes (should not exceed 2GB)

    TCLASS

    is the number of traffic class registered in UTM 5+ to which this traffic belongs

    IP

    is an IP address specified for this traffic in traffic reports grouped by IP. May contain arbitrary value.

  2. The file should contain neither strings containing any other information, nor information in a different format.

In case of parsing a phone calls info file the following actions are performed:

  1. A connection is established to the UTM 5+ core using URFA protocol.

  2. The file is read line by line, and each line parsed according to standard format.

  3. Data from each string are stored in the internal format.

  4. Data structures in the internal format are passed to the UTM 5+ core by calling the URFA function 0x10310.

  5. utm5_send_cdr stops.

The phone calls data file should contain the data in the following format:

  1. Each record of a phone call must be on a separate line.

  2. No record may span more than one line.

  3. Each record must conform to the format specified in the configuration file. The format should conform the common telephony call record requirements.

  4. The file should contain neither strings containing any other information, nor information in a different format.

Each single record must meet the following requirements:

  1. To contain text data on one call.

  2. To contain several fields: The following fields are mandatory:

    • Calling party ID (telephone number);

    • Called party ID (telephone number);

    • Call length in seconds;

    • Call date and time, if the call is going to be recorded under date different from current;

  3. The following optional fields may also appear:

    • Incoming trunk;

    • Outgoing trunk;

    • PBX ID;

    • Unique call ID (optional).

If the call date format is not specified in the configuration file, the following is assumed by default:
<hh>:<mm>:<ss>.<mls><tmz><wdd><mth><dt><yyyy>

Field Number of symbols Description

hh

2

hours

mm

2

minutes

ss

2

seconds

mls

3

milliseconds

tmz

3

time zone

wdd

3

weekday

mth

3

month

dt

2

date

yyyy

4

year

For example, 00:35:05.000 UTC Tue Jul 19 2016.

Milliseconds and day of week are ignored.

The field delimiter symbol is set in the configuration file and is the same for the whole parsing file.

Utilities usage

Utilities are started as follows:
/Netup/utm5/bin/utm5_send_traffic
and
/netup/utm5/bin/utm5_send_cdr

The acceptable command line parameters for both utilities are:

-c <path>

The path to the configuration file.

-s <path>

Path to the data file to be imported. “ - ” denotes STDIN.
The default file is /netup/utm5/source.dat

-v

Version number and parameter information

Configuration files

The utilities use the following configuration files: utm5_send_traffic.cfg and utm5_send_cdr.cfg, which located on UNIX systems in the /netup/utm5/ directory, and at UTM 5+ on Windows, in the installation directory (by default C:\Program Files\NetUP\UTM5\).

The configuration file have the following format: parameter=value.

A sequence of symbols before the equals sign is treated as parameter’s name, while the one after it stands for the parameter’s value. Whitespaces count. Empty lines are ignored. A line starting with # is a comment.

Below is the list of possible parameters.

Parameters of connection to the UTM 5+ core (present in both files):

Parameter Possible values Default Description

core_host

IP address

127.0.0.1

IP address of the host on which the UTM 5+ core is running

core_port

number from 1 to 65534

11758

The port where the UTM 5+ core listens to URFA (urfa_bind_port parameter in the configuration file of the core)

core_login

string

init

Login to access the UTM 5+ core

core_password

string

init

Password to access the UTM 5+ core

Parameters for parsing phone call info files (found only in utm5_send_cdr.cfg):

Parameter Possible values Default Description

pbx_calling_sid

integer number

0

Number of position containing the calling number

pbx_called_sid

integer number

1

Number of position containing the called number

pbx_duration

integer number

2

Number of position containing the call duration

pbx_duration_format

format string

default format

Call duration format.
Time format string may include specifiers %H, %h, %M, %m, %S, and %s, see below.

radius_auth_host

IP address of the interface, or 0.0.0.0

0.0.0.0

Host address to receive access verification requests (Access-Request)

pbx_time

integer number

not set

Number of position containing the time of the call (if stored separately from date)

pbx_time_format

format string

not set

Call start time format.
Time format string may include specifiers %H, %h, %M, %m, %S, and %s, see below.

pbx_accounting_code

integer number

not set

Number of position containing the user name (if it is included)

pbx_incoming_trunk

integer number

not set

Number of position containing the incoming trunk (if present)

pbx_outgoing_trunk

integer number

not set

Number of position containing the outgoing trunk (if present)

pbx_id

integer number

not set

Number of position containing the PBX ID (if present)

pbx_delimiter

string

space

Field delimiter symbol

pbx_quote

string

empty string

Field enclosing symbol

Date format string may include specifiers, see the full list below.

%Y

four-digit year (1970…​)

%y

two-digit year (00..99)

%N

month with leading zeros (01…​12)

%n

month without leading zeros (1..12)

%H

hour with leading zeros (00..23)

%h

hour without leading zeros(0..23)

%D

day of the month with leading zeros (01..31)

%d

day of the month without leading zeros (1..31)

%M

minutes with leading zeros (00..59)

%m

minutes without leading zeros (0..59)

%S

seconds with leading zeros (00..60)

%s

seconds without leading zeros (0..60)

%b

three-letter month name (Jan..Dec)

%U

time in unix timestamp format

%z

time zone identifier (for example, GMT) – valid only for Linux

%

any symbol

Logging parameters Possible values Default Description

log_level

number from 0 to 3

1

Level of messages to be written to the log file (unless -d option is set)

log_file_main

file name

standard error stream

Main log file

log_file_debug

file name

standard error stream

Debugging log file

log_file_critical

file name

standard error stream

Critical log file

Export of statistics

To emulate activity of users and export statistics via NetFlow v.5 protocol there is a utility called utm5_flowgen, which is installed to: /netup/utm5/bin/utm5_flowgen

It may accept the following command line parameters:

-h

IP address of the host to send generated NetFlow packets to.
Default value is 127.0.0.1.

-p

Port to send generated NetFlow packets to.
Default value is 9996

-c

Number of NetFlow records. Default value is 65535.

-v

NetFlow protocol version. Supports versions 5 and 9

-f

Name of a file which will be used as the source of data for sending.
The default source is /dev/random/ Only for NetFlow version 5

-t

NetFlow packets send rate

-s

Sender IP address in the NetFlow record

-d

Destination IP address in the NetFlow record

-z

Traffic source port in the NetFlow record

-x

Traffic destination port in the NetFlow record

-n

Traffic source AS in the NetFlow record

-m

Traffic destination AS in the NetFlow record

-i

Incoming traffic index in the NetFlow record

-o

Outgoing traffic index in the NetFlow record

-b

Number of transmitted bytes in the NetFlow record

-P

Number of transmitted packets in the NetFlow record

-j

TOS in the NetFlow record

-k

TCP flags in the NetFlow record

-l

Protocol ID in the NetFlow record. E.g. 6=TCP, 17=UDP, etc.

-N

Next router IP address in the NetFlow record

-u

Use a *.utm file as a source for the detailed NetFlow statistics

The following example command generates one NetFlow packet describing 1048576 bytes of traffic transmitted from 10.0.0.1 to 10.0.0.2:

/netup/utm5/bin/utm5_flowgen -c 1 -s 10.0.0.1 -d 10.0.0.2 -b 1048576

For emulation of user activity and export of statistics via RADIUS protocol there is a utility called utm5_radgen which is installed to
/netup/utm5/bin/utm5_radgen.

It may accept the following command line parameters:

-p

Port for generated RADUIS packets to be sent to

-h

IP address for generated RADIUS packets to be sent to

-s

Secret word for communicating with RADIUS server

-c

RADIUS packet code. Default value is 1 (Access-Request)

-i

RADIUS packet ID.
Default value is 1

-u

User password in public form. The value is sent with attribute ID equal to 2 (Password)

-a

Attribute values

-b

Binary attribute values in HEX ASCII

-q

Quick mode: don’t wait for reply

-f

Name of a file to read the authenticator from.
By default: /dev/random

-v

Display utility version

It is possible to set multiple attributes in a string of the following format:
vendor_id:attr_id:is_digit:value

Fields are separated by colons. In the first field the vendor identifier is set. Default value is 0.

The second field contains attribute identifier.

The third field is used to set data type, i.e. numeric or char. If the value is 0 then the data is transmitted as a character string. If the value is 1 then values are transmitted as digits (integer).

The 4th field is used for transmission of the value itself.

Usage examples:

  1. To send an authorization request (Access-request) run the following command:

    value/netup/utm5/bin/utm5_radgen -h 127.0.0.1 -p 1812 -s secret -u password -a 0:1:0:username
    A RADIUS authorization packet will be generated for a username user with password.

  2. To send a request for accounting (Accounting-Request) run the command:

    /netup/utm5/bin/utm5_radgen -h 127.0.0.1 -p 1813 -s secret -a 0:1:0:username -a 0:40:1:1 -a 0:44:0:sessionid1 -c 4
    A RADIUS packet will be generated with the accounting request for a username user, and it will be indicated that the session was opened (start). Session Identifier is sessionid1.

  3. To send a request for accounting (Accounting-Request) run the command:

    /netup/utm5/bin/utm5_radgen -h 127.0.0.1 -p 1813 -s secret -a 0:1:0:username -a 0:32:0:localhost -a 0:40:1:2 -a 0:44:0:sessionid1 -a 0:46:1:100 -c 4
    A RADIUS packet will be generated with the accounting request for a username user, and it will be indicated that the session was closed (stop). Session Identifier is sessionid1. Session duration (Acct-Session-Time) – 100 seconds.

Traffic reports

The get_nf_direct utility is designed to form detailed traffic reports based on the saved raw information.

The executable file is called /netup/utm5/bin/get_nf_direct.

It may accept the following command line parameters:

-D <path>

Path to directory containing the primary traffic information files

-b <path>

Name of file with primary traffic information

-a

Account ID for the report

IP address

Traffic source ID for the report

IP address

Traffic destination ID for the report

-p <port>

Source port for the report

-P <port>

Destination port for the report

-c <class>

Traffic class for the report

-f <time>

Time (Unix timestamp) to create the report since

-t <time>

Time (Unix timestamp) to create the report till. If not set, current time is used

-l <number>

Maximum number of lines in the report.
Unlimited by default

-e

Represent extended statistics

-C

CSV format output

-h

Version number and parameter information

Making payments

The utm5_payment_tool utility is intended for making payments to a customer's personal account using third party software. The utility is called from the command line with the specified parameters. The utilities are started as follows:
/netup/utm5/bin/utm5_payment_tool

Each command line parameter consists of the space-separated key-value pair. The complete list of command line keys and config file parameters is given below.

All string values must be passed in UTF-8 encoding. Order of parameters is not important.

By default, the utm5_payment_tool uses this configuration file – /netup/utm5/utm5_payment_tool.cfg.

Parameter values in the configuration file for this utility have higher priority than those specified in the command line.

Config files have the following format: parameter=value.
A sequence of symbols before the equals sign is treated as parameter’s name, while the one after it stands for the parameter’s value.
Whitespaces count.
Empty lines are ignored.
A line starting with # is a comment.

Key Parameter Default Description

-h <IP address>

core_host

127.0.0.1

IP address of the UTM 5+ core host

-P <port>

core_port

11758

The port where the UTM 5+ core listens to URFA

-l

core_user

init

Login to access the UTM 5+ core

-p

core_password

init

Password to access the UTM 5+ core

-k

user_comment

empty string

Comment for a customer

-L

admin_comment

empty string

Comment for an admin

-c

currency_id

810 (RUR)

Payment currency ID (three-digit numeric code)

-m

payment_method

0 (payment in cash)

Payment method ID For a full list of available methods, see the reference in the admin interface

-i

turn_on_internet

no

Open the Internet after making a payment: yes / no

-a

accoun_id

not set

Personal account number

-e

external_number

not set

External Payment ID

-b

payment

0.0

Payment amount

Checking database structure

The db_archiver utility is used when updating UTM 5+. It allows you to compare the current DB structure with the one needed by the updated the billing core. Besides, the utility allows archiving the tables that are meant to be archived.

The executable file is /netup/utm5/bin/db_archiver.

It may accept the following command line parameters:

-a

Archive tables that are meant to be archived

-c <path>

UTM 5+ configuration file path.
By default: /netup/utm5/utm5.cfg

-d

Write the difference between the current DB structure and the DB structure, required by the new UTM 5+ core to the log file

-e

Update only those columns that have changed since the previous release and are marked for update by NetUP

-f

Update all columns whose format is different from the format, required by the new version of the UTM 5+ core

-g

Update the structure of tables meant for archiving

-i

Update indexes

-n

Do not consider a primary key without a default value as a change in structure

-t

Verify archived tables

-l

Temporarily prevent the UTM 5+ core from writing to the DB. This is required when archiving tables without stopping the core. Use this option together with -a when the core is running

-q

Turn off confirmations and minimize the output to log file. This may be useful when running this utility on a schedule

-u

Update the DB structure. This parameter is used together with the following parameters -e, -f, -g and -i. E.g. -uef

-v

Write the new DB structure description of the new version of UTM 5+ into the log file

-x <login>

Login for communicating with the UTM 5+ core via the URFA protocol

-y <password>

Password required for communicating with the UTM 5+ core via the URFA protocol. Both login and password may be required if for some reason they differ from the ones in the billing core configuration file

-?, -h

Show this help

E-mail notifications

The UTM 5+ may send automatic e-mail messages to the users (or rather those of them who has valid e-mail addresses entered in their user info) for a number of reasons.

The messages are sent via SMTP server set by the smtp_relay parameter. The SMTP server must be set up correctly and must send every incoming message within 1 second. Longer delays in email processing may drastically reduce the billing performance. It is recommended to use the local SMTP server.

Possible types of e-mail messages include:

  • Invoices are sent when either an invoice is issued to a user having the Send invoices by email parameter checked, or when the Send by email context menu item is hit in the report on invoices.
    Message subject is set by the invoice_subject system parameter. Message text is set by invoice_text, while the invoice itself is contained in an attachment as an HTML file. The invoice is generated on the basis of the Invoice document template.

  • Payment notifications are sent on the event of a payment being made, if the corresponding parameter is checked in the payment’s properties.
    Message subject is Payment notification. Message text is composed from the template stored in the payment_notification_message system parameter.

  • Balance notifications are sent when the user’s balance (not considering the credit) crosses the borders defined by the notification_borders system parameter, if the latest is set.
    Message subject is defined by the notification_message_subject system parameter. Message text is composed from the template stored in the notification_message system parameter.

Test cases

All the test cases are executed correctly only when UTM 5+ works with the demo-license.

Traffic transmission

The test case is designed to check the correct functioning of the NetUP UTM 5+ billing system on your server. The main point of the check is to upload five users to the database and emulate the work of these users within three months. The necessary data for starting the test case are included with the billing system.

Stop services that are critical to changing the date on the server.

  1. Stop the utm5_core.

  2. Set the date on the server to 00 hours 00 minutes on April 1, 2003.

    date 0304010000

  3. Execute commands to upload data to the database:

    mysqladmin drop UTM5
    mysqladmin create UTM5
    mysql UTM5 < UTM5_MYSQL_kp.sql
    mysql -f UTM5 < UTM5_MYSQL_update.sql

  4. Edit the kp.pl file. Specify the port on which the core of the billing system accepts NetFlow packets, and the path to the utm5_flowgen utility that generates NetFlow packets (usually /netup/utm5/bin/utm5_flowgen).

  5. Run the utm5_core.

  6. Run the kp.pl program with the command: perl kp.pl

While the program is running, the date on the server will change from April 1, 2003 to July 1, 2003. This will emulate the work of test users for three months: April, May, June 2003.
If the billing system works correctly, the values you get after working with the kp.pl program should match those specified in the tables.
After completing the test case, set the correct date on the server.

First month (April, 2003)

cli1 cli2 cli3 cli4 cli5

Volume per day, MB

0.5

2

4

10

40

Amount of days

30

30

30

30

30

Volume per month, MB

15

60

120

300

1200

Cost per unit of excess

0.2

0.2

0.2

0.15

0.15

Prepaid, MB

50

50

50

500

500

Cost of excess

0

2

14

0

105

Periodic fee

3

3

3

100

100

Rest

-3

-5

-17

-100

-205

Second month (May, 2003)

cli1 cli2 cli3 cli4 cli5

Volume per day, MB

1

2.5

5

20

50

Amount of days

31

31

31

31

31

Volume per month, MB

31

77.5

155

620

1550

Cost per unit of excess

0.2

0.2

0.2

0.15

0.15

Prepaid, MB

50

50

50

500

500

Cost of excess

0

5.5

21

18

157.5

Periodic fee

3

3

3

100

100

Rest

-6

-13.5

-41

-218

-462.5

Third month (June, 2003)

cli1 cli2 cli3 cli4 cli5

Volume per day, MB

1.5

3

6

30

60

Amount of days

30

30

30

30

30

Volume per month, MB

45

90

180

900

1800

Cost per unit of excess

0.2

0.2

0.2

0.15

0.15

Prepaid, MB

50

50

50

500

500

Cost of excess

0

8

26

60

195

Periodic fee

3

3

3

100

100

Rest

-6

-13.5

-41

-218

-462.5

TOTAL rest

-9

-24.5

-70

-378

-757.5

Dial-up access

The test case is designed to check the correct functioning of the NetUP UTM 5+ billing system on your server. The main point of the check is to upload three users to the database and emulate the work of these users within three months. The necessary data for starting the test case are included with the billing system.

Stop services that are critical to changing the date on the server.

  1. Stop the utm5_core.

  2. Set the date on the server to 00 hours 00 minutes on April 1, 2003.

    date 0304010000

  3. Execute commands to upload data to the database:

    mysqladmin drop UTM5
    mysqladmin create UTM5
    mysql UTM5 < UTM5_MYSQL_kp.sql
    mysql -f UTM5 < UTM5_MYSQL_update.sql

  4. Edit the kp_dialup.pl file. Specify on which port the utm5_radius process receives Radius Accounting packets, and the path to the utm5_radgen utility, which generates RADIUS packets (usually /netup/utm5/bin/utm5_radgen).

  5. Run the utm5_core and utm5_radius.

  6. Run the kp_dialup.pl program with the command: perl kp_dialup.pl

While the program is running, the date on the server will change from April 1, 2003 to July 1, 2003. This will emulate the work of test users for three months: April, May, June 2003.
If the billing system works correctly, the values you get after working with the kp_dialup.pl program should match those specified in the tables.
After completing the test case, set the correct date on the server.

First month (April, 2003). Amount of days – 30.

dialup1 dialup2 dialup3

8:00 AM - 7:59 PM

8:00 PM - 7:59 AM

8:00 AM - 7:59 PM

8:00 PM - 7:59 AM

8:00 AM - 7:59 PM

8:00 PM - 7:59 AM

Duration per day, hour

0.1

0.1

0.2

0.2

0.3

0.3

Volume per month, hour

3

3

6

6

9

9

Cost, conventional units per hour

1

2

1

2

1

2

Cost, conventional units

3

6

6

12

9

18

Periodic fee

10

10

10

Rest

-19

-28

-37

Second month (May, 2003). Amount of days – 31.

dialup1 dialup2 dialup3

8:00 AM - 7:59 PM

8:00 PM - 7:59 AM

8:00 AM - 7:59 PM

8:00 PM - 7:59 AM

8:00 AM - 7:59 PM

8:00 PM - 7:59 AM

Duration per day, hour

0.1

0.1

0.2

0.2

0.3

0.3

Volume per month, hour

3.1

3.1

6.2

6.2

9.3

9.3

Cost, conventional units per hour

1

2

1

2

1

2

Cost, conventional units

3.1

6.2

6.2

12.4

9.3

18.6

Periodic fee

10

10

10

Rest

-19.3

-28.6

-37.9

Third month (June, 2003). Amount of days – 30.

dialup1 dialup2 dialup3

8:00 AM - 7:59 PM

8:00 PM - 7:59 AM

8:00 AM - 7:59 PM

8:00 PM - 7:59 AM

8:00 AM - 7:59 PM

8:00 PM - 7:59 AM

Duration per day, hour

0.1

0.1

0.2

0.2

0.3

0.3

Volume per month, hour

3

3

6

6

9

9

Cost, conventional units per hour

1

2

1

2

1

2

Cost, conventional units

3

6

6

12

9

18

Periodic fee

10

10

10

Rest

-19

-28

-37

TOTAL rest

-57.3

-84.6

-111.9

Telephony

  1. Run commands to load a database with data for the test case:

    mysql UTM5 < /netup/utm5/tests/UTM5_tel_kp_clean.sql
    mysql -f UTM5 < /netup/utm5/UTM5_MYSQL_update.sql /dev/null 2>&1

  2. Run the RADIUS server and the billing system core.

  3. To download test data from a CDR file, execute the command: /netup/utm5/bin/utm5_send_cdr -c /netup/utm5/utm5_send_cdr.cfg -s /netup/utm5/tests/src.cdr

    As a result, telephone calls from two test users in July 2005 will be uploaded and tariffed in the database.

  4. Connect to the core via the administrator interface.

The system should have two test customers, telephone directions and tariff plans according to the time of day and days of week.

Test customers

Customer #1

Customer #2

Phone number

5409652

5409653

Plan

Tariff #1

Tariff #2

Telephony directions

Zone Prefix (code)

Moscow (1)

7095

Saint Petersburg (2)

7812

МТС (mobile) (3)

7910, 7915, 7916, 7917

Chelyabinsk (4)

7351

Tyumen (5)

7345

Italy (6)

81039

France (7)

81033

Sudan (8)

810249

Tariff plans

Tariff #1:

  • free period – 5 seconds,

  • starting period – 60 seconds,

  • tariff step in the starting period – 10 seconds,

  • tariff step in the next period – 1 second,

  • tariff unit size – 60 seconds,

  • periodic fee – 10 conventional units

Cost of calls at the tariff #1 (conventional units):

Zone Working days Weekend

12:00 AM - 9:00 AM

9:00 AM - 11:59:59 PM

Moscow (1)

0.1

0.2

0.1

Saint Petersburg (2)

0.2

0.4

0.3

МТС (mobile) (3)

0.2

0.3

0.2

Chelyabinsk (4)

0.4

0.6

0.4

Tyumen (5)

0.5

0.8

0.6

Italy (6)

1

1.3

1.1

France (7)

1.2

1.6

1.2

Sudan (8)

2.1

2.9

2.5

Tariff #2:

  • free period – 0 seconds,

  • starting period – 60 seconds,

  • tariff step in the starting period – 10 seconds,

  • tariff step in the next period – 1 second,

  • tariff unit size – 60 seconds,

  • periodic fee – 5 conventional units

Cost of calls at the tariff #2 (conventional units):

Zone Working days Weekend

12:00 AM - 9:00 AM

9:00 AM - 11:59:59 PM

Moscow (1)

0.08

0.15

0.08

Saint Petersburg (2)

0.15

0.22

0.2

МТС (mobile) (3)

0.2

0.3

0.2

Chelyabinsk (4)

0.35

0.5

0.4

Tyumen (5)

0.4

0.7

0.4

Italy (6)

1.2

1.5

1.2

France (7)

1.5

1.9

1.5

Sudan (8)

2.4

3.1

2.3

Test phone calls, customer #1

Date Zone Duration Duration (round-off) Cost
per minute
Cost

01.07.05
11:20:00 AM

Saint Petersburg (2)

730

730

0.4

4.867

01.07.05
3:55:40 PM

МТС (mobile) (3)

4200

4200

0.3

21

01.07.05
9:05:00 PM

Chelyabinsk (4)

174

174

0.6

1.74

02.07.05
1:25:00 AM

Tyumen (5)

724

724

0.6

7.24

03.07.05
11:15:00 AM

Italy (6)

601

601

1.1

11.018

04.07.05
9:53:00 PM

France (7)

3714

3714

1.6

99.04

05.07.05
12:13:00 PM

Sudan (8)

24

30

2.9

1.45

06.07.05
1:25:00 AM

Moscow (1)

64

64

0.1

0.107

07.07.05
11:05:20 AM

France (7)

7201

7201

1.6

192.027

08.07.05
21:25:00

МТС (mobile) (3)

1925

1925

0.3

9.625

09.07.05
09:55:00 AM

Chelyabinsk (4)

721

721

0.4

4.807

10.07.05
08:05:00 AM

Chelyabinsk (4)

9

10

0.4

0.067

11.07.05
04:35:00 AM

Italy (6)

1372

1372

1

22.867

12.07.05
1:10:00 PM

Chelyabinsk (4)

84

84

0.6

0.84

13.07.05
01:05:00 AM

Sudan (8)

193

193

2.1

6.755

14.07.05
4:03:00 PM

France (7)

420

420

1.6

11.2

15.07.05
6:04:00 PM

Chelyabinsk (4)

2352

2352

0.6

23.52

16.07.05
7:15:00 PM

Italy (6)

54

60

1.1

1.1

17.07.05
4:35:00 PM

Moscow (1)

23

30

0.1

0.05

18.07.05
2:10:00 PM

Moscow (1)

1325

1325

0.2

4.417

19.07.05
11:01:00 PM

Tyumen (5)

1271

1271

0.8

16.947

20.07.05
12:35:00 AM

Saint Petersburg (2)

721

721

0.2

2.403

21.07.05
12:35:00 AM

Italy (6)

13

20

1

0.333

22.07.05
10:22:00 AM

Moscow (1)

82

82

0.2

0.273

23.07.05
6:16:00 AM

Saint Petersburg (2)

3

3

0

0

24.07.05
1:14:00 AM

Sudan (8)

3125

3125

2.5

130.208

25.07.05
12:19:00 PM

Sudan (8)

1099

1099

2.9

53.118

26.07.05
1:45:00 PM

Saint Petersburg (2)

1221

1221

0.4

8.14

27.07.05
11:05:00 AM

Moscow (1)

70

70

0.2

0.233

28.07.05
3:17:00 PM

Saint Petersburg (2)

132

132

0.4

0.88

29.07.05
12:25:00 PM

Moscow (1)

1925

1925

0.2

6.417

30.07.05
9:25:00 PM

Italy (6)

134

134

1.1

2.457

31.07.05
2:00:10 AM

Moscow (1)

85

85

0.1

0.142

TOTAL:

Italy (6)

2174

2187

37.775

Chelyabinsk (4)

3340

3341

30.973

Moscow (1)

3574

3581

11.638

МТС (mobile) (3)

6125

6125

30.625

Tyumen (5)

1995

1995

24.187

Sudan (8)

4441

4447

191.531

Saint Petersburg (2)

2807

2807

16.29

France (7)

11335

11335

302.267

35791

35818

645.287

Test phone calls, customer #2

Date Zone Duration Duration (round-off) Cost
per minute
Cost

01.07.05
4:15:10 AM

Moscow (1)

19

20

0.08

0.027

02.07.05
2:25:30 PM

France (7)

71

71

1.5

1.775

03.07.05
6:11:24 PM

Moscow (1)

1234

1234

0.08

1.645

04.07.05
1:21:10 AM

Italy (6)

939

939

1.2

18.78

05.07.05
7:12:23 AM

Moscow (1)

15

20

0.08

0.027

06.07.05
5:22:13 PM

Saint Petersburg (2)

43

50

0.22

0.183

07.07.05
10:45:52 PM

Sudan (8)

18

20

3.1

1.033

08.07.05
9:10:15 AM

Saint Petersburg (2)

20

20

0.22

0.073

09.07.05
12:32:16 PM

Moscow (1)

81

81

0.08

0.108

10.07.05
7:11:25 PM

Tyumen (5)

345

345

0.4

2.3

11.07.05
2:50:38 AM

Italy (6)

607

607

1.2

12.14

12.07.05
6:00:20 AM

Chelyabinsk (4)

4521

4521

0.35

26.373

13.07.05
1:11:45 PM

Saint Petersburg (2)

92

92

0.22

0.337

14.07.05
10:12:28 AM

МТС (mobile) (3)

165

165

0.3

0.825

15.07.05
3:27:13 PM

Moscow (1)

13

20

0.15

0.05

16.07.05
11:58:22 AM

Moscow (1)

441

441

0.08

0.588

17.07.05
2:17:23 PM

Saint Petersburg (2)

1002

1002

0.2

3.34

18.07.05
8:34:31 PM

Italy (6)

1935

1935

1.5

48.375

19.07.05
11:15:53 AM

Moscow (1)

11741

11741

0.15

29.353

20.07.05
5:52:33 PM

Moscow (1)

4232

4232

0.15

10.58

21.07.05
7:20:41 PM

Chelyabinsk (4)

261

261

0.5

2.175

22.07.05
2:16:14 AM

Tyumen (5)

594

594

0.4

3.96

23.07.05
3:47:22 PM

Italy (6)

334

334

1.2

6.68

24.07.05
11:17:27 AM

France (7)

955

955

1.5

23.875

25.07.05
10:34:51 PM

Tyumen (5)

1245

1245

0.7

14.525

26.07.05
10:37:21 AM

Moscow (1)

6977

6977

0.15

17.443

27.07.05
2:47:29 PM

Moscow (1)

1316

1316

0.15

3.29

28.07.05
8:45:23 AM

Saint Petersburg (2)

2892

877

0.15

2.193

28.07.05
8:45:23 AM

Saint Petersburg (2)

2892

2015

0.22

7.388

29.07.05
11:04:03 AM

Italy (6)

775

775

1.5

19.375

30.07.05
6:05:11 PM

МТС (mobile) (3)

231

231

0.2

0.77

31.07.05
11:14:43 PM

Moscow (1)

492

492

0.08

0.656

TOTAL:

Chelyabinsk (4)

4782

4782

28.548

Italy (6)

4590

4590

105.35

МТС (mobile) (3)

396

396

1.595

Moscow (1)

26561

26574

63.766

Tyumen (5)

2184

2184

20.785

Sudan (8)

18

20

1.033

Saint Petersburg (2)

6941

4056

13.515

France (7)

1026

1026

25.65

46498

43628

260.241

System maintenance

Database backup

This is normally done with the standard tools specific to the particular kind of DB server. To prevent possible loss of data, it is recommended to make backup copies of the database regularly (say, monthly). Besides regular backups, it is also advisable to make an extra copy before any low-level operation on the database, like archiving of tables, direct manual intervention, debugging of urfaclient scripts, etc.

The backup copy may be either brief or full. The latter one contains all tables, while the former one omits the charge-off tables.

Creating a full copy may take a long time due to the large size of tables with charge-offs. For this procedure it is recommended to stop the UTM 5+ core. Otherwise prolonged blocking of tables may lead to core crash.

For large projects, where the tables are especially huge and yet it is critical to keep downtime low, we recommend the use of a slave DB server, which makes it possible to create a backup copy without shutting down the billing.

Database integrity verification

Once the UTM 5+ core is started, it fills the system cache and verifies the database. The revealed inconsistencies in the cached data are resolved automatically. However, the original data in the database remain corrupted and have to be fixed manually. To do that, one may use the verifier log file.

The location of the said file is given by the log_file_v-erificator system parameter (by default, /netup/log/verificator.log). For each item it contains:

  • Description of the inconsistency, including its level (ERROR or WARNING);

  • Supposed way to resolve the issue;

  • SQL command (if required) equivalent to the automatic fix applied to the cached data:

    -- WARNING slink 4876 exists only in dtagg_periodic + — SQL DESC check slink exists and delete dtagg_periodic entry for deleted slink
    UPDATE dtagg_periodic SET is_closed=1 WHERE slink_id=4876;

The objects listed in verificator.log as condemned to deletion are not loaded by the system and also neither accounted for in the reports nor shown wherever in the administrator’s interface.

Before fixing the errors, it is recommended to stop the UTM 5+ core and back up the database (at least the tables involved in the fix).

In the trivial case all fixes may be applied by simply feeding the verifier log file into MySQL: mysql UTM5 < /netup/utm5/log/verificator.log

However, some SQL queries in the log file are commented out, since they imply some (probably undesired) loss of data. When dealing with such queries, one has to check every individual issue separately.

Archiving of tables

Some of the fastest-growing data tables may be archived in order to reduce the overhead expenses on insert operations. An archiving implies that the table in question is renamed into an archive table, while an empty table with the original name and structure is created to store the incoming data. Archiving may be done periodically. The limitations are listed below.

Currently the following tables are being archived:

Table Type Data field name

discount_transactions_all

1

discount_date

discount_transactions_iptraffic_all

2

discount_date

tel_sessions_log

3

recv_date

tel_sessions_detail

4

dhs_sessions_log

5

recv_date

dhs_sessions_detail

6

payment_transactions

7

payment_enter_date

user_log

8

date

dhcp_leases_log

9

updated

invoices

10

invoice_date

invoice_entry

11

invoice_entry_details

12

In order to archive these tables:

  1. Use the administrator’s interface to connect to UTM 5+

  2. Go to the Settings ⇒ Systems ⇒ Archive DB page.

  3. Click add in the upper part of the page.

You can do archiving once in 28 days. If the button is not active, this means that less than 28 days passed since the last archive was created.

If you need to archive more often than the administrator interface allows, use the db_archiver utility (see db_archiver)

Administrator’s interface

General info

The web interface is under development, so the section contains only those pages that are already available.

On the web interface pages you can see the following icons:

search ⇒ search

save ⇒ save

edit ⇒ edit

delete ⇒ delete

Besides, you can see function buttons there, for example add or add

Click on an icon or button to open the corresponding dialog window and perform the required action.

Examples of actions such as adding a new user or connecting a service to a user, as well as a description of dialog windows, see the Quick start section.

The web interface menu is located at the top of the window. It displays names of the groups. Each group combines several pages:

Main

Users

System users

Accounts

Card pools

Groups

IP groups

Telephone numbers

Tariffication

Services / Tariffs

Telephony settings

Main parameters

Other

Reference book

Payment methods

Currency

IP zone

Buildings

Streets

Banks

Companies

Reports

Payments

Services

Other

Inventory

Profiles

Switches

DHCP pools

DHCP lease

Settings

Telephony

Documents

Systems

Inventory

Customer portal

The main page of web interface is Users.

Users

The page displays the list of users ( customers). User IDs are colored: red indicates that user accounts are blocked, green indicates that user accounts are not blocked, yellow indicates that some accounts are blocked and some are not.

There are buttons in front of each user:

promised_payment ⇒ make a promised payment,

payment ⇒ make a payment to a user account,

download ⇒ download a user memo,

delete_user ⇒ delete a user.

Click on the button, in the window that opens fill in the necessary fields and confirm the corresponding action.

Click on a user data line to expand the panel that contains detailed information about the user.

There are sections in the panel: User, Tariffication and Reports. Each section combines several tabs. Go to one of them, change the user data and click Save.


The User section combines following tabs:

Main

User ID, basic account, login, name, password and Payment in advance option.
Here you can change your user password.

Additional parameters

Settings for IPTV connection: Lifestream user id / email, iptvportal login / password, Megogo user email.

Contacts

Full address, phone, email, etc.
Legal person option.

Additional contacts

For example, contacts of a manager or an accountant.

Personal

Bank account, passport details, ITIN, bank, checkpoint, connection date and personal manager.

Groups

ID and name of the groups the user is included in.
Here you can add a user to the group or remove him/her from it.

Other

Profile of documents, router, port, currency.

Documents

Documents ID, template ID, date of creation, name, path and type.
Upload user documents (in .odt format) to the billing or create them from existing templates.

Additional info

Date and time of user creation, date and time of last modification of user data.


The Tariffication section combines following tabs:

Accounts

ID and balance of user's personal accounts, credit amount and type of blocking.
Click on a personal account to edit it.

Services

ID, name and type of the service, in tarrif this service or not and its cost, service link ID and accounting period ID.
Here you can add, edit or delete services to the user.

Tariff links

Tlink ID, ID of current and next tariff plan, accounting period.
Here you can add tariffs to the user, edit or delete them. To delete a tariff plan, first delete all tariff links.

Technical parameters

Custom parameters associated with the user's personal account. Their values may be used in the commands for controlling the external software, which are sent by as a response to certain events.

IPTV activation codes

The list of activation codes for an access card assigned to the selected personal account.


Reports are divided into three groups:

Payments

Payments, internal transfer, expiring payments, other charges and documents (invoice, VAT invoice, acceptance report and detail report).

Services

General, services, custom charges report, traffic, detailed traffic, telephony, telephony directions report.

Other

Blockings, user change log, sessions and DHCP lease.

Set the parameters for the filter and click generate to see a report.


Helpful links:

Basic system objects ⇒ User classes
Quick start ⇒ Add a new user (customer)

System users

A system user has the following settings:

  • ID.

  • Login and Password to enter the billing.

  • IPv4 and IPv6 subnets from which the user is allowed access.

  • Groups to which the user belongs.

    Any changes to the list of groups take effect only after the next UTM 5+ core restart.

  • API Token

Click edit on the user data line. In the opened window you can see all the parameters of the user and modify them if necessary.


Helpful links:

Basic system objects ⇒ User classes

Accounts

Click on an account data line to expand the panel that contains detailed information about the account. There are three tabs in the panel:

Main

Account ID, credit, balance, VAT, external ID and sale tax rate.

IPTV settings

IPTV access card, Irdeto IPTV access card, Irdeto IPTV STB.
If the NetUP IPTV access card is not yet linked to the personal account, click the add button and the card will be created automatically.

State settings

Unlimited mode (all charges-offs should be made at zero cost), Internet, type and date of blocking.
Here you can enable or disable the Internet, as well as set or remove the blocking.

Note that if you manually unblocked some account, you will also need to manually change the Internet status for that account to On.


Helpful links:

Basic system objects ⇒ Account
Quick start ⇒ Add a personal account to user

Card pools

The page contains a list of payment card pools. Users can activate payment cards to top up their balance.

A pool has the following parameters: ID, Card count in the pool, how many cards are Activated, when the pool was Created and Updated.

You can add new card pools to the billing and edit existing ones.

Note that you can not remove the created pools, but you can clear the pool of expired cards by clicking on the corresponding button.


Helpful links:

Basic system objects ⇒ Prepaid cards
Quick start ⇒ Add a card pool and Edit a card pool

Groups

The page contains the list of groups to which users can be included. You can merge users into groups to perform group operations, such as enabling or disabling the Internet, changing the tariff plan or charge policy for all users in the group.

You can create new groups to the billing and delete them. When adding a group, you need to specify the ID and Name for it.

Click edit next to one of the existing groups to see the list of users included in it.
To remove a user from the group, find the user in the list and click on delete

IP groups

This page contains the list of IP groups defined within service links of IP traffic services.

Telephone numbers

This page contains the list of telephone numbers defined within telephony service links.

Services / Tariffs

The Services / Tariffs page combines following tabs:

Services

Service templates

Tariff plans

Services in tariffs

Read more about each tab below.


Services

The tab contains the list of one-time and periodic services which can be added to customers without tariff plan.

You can delete only the service that is not used.
The service is used if there are related service links, so first remove those service links, and then remove the service.

The services have main and special parameters:

Main

  • ID is assigned automatically when the service is added to the billing.

  • Full name of the service.

  • Type is selected before the service is created.

  • Comment.

  • Supplier to invoice to invoice.

One-time service

  • Cost of the service.

  • Delete from group after being charged for this service.

  • Contract type which can be selected from the previously created comments list.

Periodic service

  • Cost of the service.

  • Charge method:

    • At the start of the period means that the charge-off is done at the same time when the service link is created and at the start of the new accounting period.
      Accounting period is set in the service link properties.

    • At the end of the period means that the charge-off is done immediately before the closing of the accounting period associated with the service link.

    • Flow method means that the charge-off is done in portions during the whole length of the accounting period and depend on the Charges per week parameter specified in the properties of the accounting period to which the service link refers (read more below).

  • Charge policy which will be set by default when a service link based on this service.

  • Scheme for schedule applied to the periodic service fee.

  • Contract type which can be selected from the previously created comments list.

IP traffic service

  • Cost of the service.

  • Charge method as for the periodic service.

  • Charge policy which will be set by default when a service link based on this service.

  • Scheme for schedule applied to the periodic service fee.

  • Contract type which can be selected from the previously created comments list.

  • Traffic aggregation interval – by default is 0.

  • Limit of simultaneous sessions sets the maximum number of concurrent connections that may be established with the same login.

  • Reset prepaid traffic is the option of resetting the prepaid traffic at the end of the accounting period. If set, the unused prepaid traffic is cast to zero, otherwise it is transferred to the next period.

  • Dynamic IP address allocation option is used to link a hotspot or dial-up service to an IP traffic service in order to tariff not only for connection time but also for traffic consumption.

    For both services to be linked, this option must be enabled. One account may have only one service of hotspot or dial-up type with enabled Dynamic IP Address Allocation option.

  • RADIUS parameters that will be added to the RADIUS request.

  • Tariffication borders are borders of traffic quantity for an accounting period, used to assign different cost per megabyte of traffic in ranges specified by these borders. Each border specification consists of the following values: traffic class, volume and cost per byte.

    The price linked to this border determines the cost of the traffic of this class from the current to the next border. There is a default (hidden) border at traffic volume 0 having price 0.

  • Groups allow you to combine several classes of traffic and change the tariff logic for them. A group of type max is tariffed by the prevailing class, i. e. the price for the whole group is determined via tariffication borders based on the amount of traffic for the class with maximum traffic. This means that when the amount of traffic of any class reaches the tariffication border, the rest of the traffic will be tariffed with the new price.
    A group of type sum is tariffed by the price determined according to the summary amount of traffic for all classes. This means that when the sum of the amounts of traffic for all the group member traffic classes reaches the tariffication border, the selected class will be billed at the specified cost.

    Groups must be created ahead of the tariffication borders. Once the borders are defined, the group creation interface is disabled.

  • Prepaid traffic contains the list of prepaid traffic amounts for each of the traffic classes. The prepaid traffic is expended first of all and tariffed by zero price. At the end of the accounting period the unused prepaid traffic is transferred to the following period. The Accumulate no more than parameter, if set to a non-zero value, limits the amount of unused traffic that may be transferred so, regardless of its origin. If the parameter is set to 0, accumulation of prepaid traffic is not limited.

    Prepaid traffic and group tariffication are mutually exclusive options, i.e. their simultaneous use is impossible.

Hotspot service

  • Cost of the service.

  • Charge method as for the periodic service.

  • Charge policy which will be set by default when a service link based on this service.

  • Contract type which can be selected from the previously created comments list.

  • Limit of simultaneous sessions allows you to set a limit on the number of simultaneous sessions.

  • Dynamic IP address allocation is used to link some service to the IP traffic service (which must also have this flag!) in order to tariff not only for connection time, but also for traffic consumption. One account may have only one hotspot or dial-up service with this flag set.

  • Allowed networks are networks from which the user is allowed to authorize on the UTM 5+ web interface. Authorization requests from other addresses are denied.

  • Price per hour is the connection time cost, which depends on the time range. Must contain at least one entry. Time is counted with precision to seconds.

  • RADIUS parameters that will be added to the RADIUS request.

Dial-up service

  • Cost of the service.

  • Charge method as for the periodic service.

  • Charge policy which will be set by default when a service link based on this service.

  • Contract type which can be selected from the previously created comments list.

  • Pool name that will be used to issue IP addresses. These parameters are cached by RADIUS. If the pool is registered in the billing, the first available IP address from it is issued. Otherwise the pool name itself is passed instead.

  • Maximum timeout is the duration of the session until the forced break (in seconds; typical value is 86400 seconds, i.e. 24 hours).

  • Limit of simultaneous sessions sets the maximum number of concurrent connections that may be established with the same login. This parameter is cached by RADIUS.

  • Login prefix is the prefix that will be automatically added to the user’s login on creation of a service link.

  • Dynamic IP address allocation is used to link some service to the IP traffic service (which must also have this flag!) in order to tariff not only for connection time, but also for traffic consumption. One account may have only one hotspot or dial-up service with this flag set.

  • Price per hour is the connection time cost, which depends on the time range. Must contain at least one entry. Time is counted with precision to seconds.

  • RADIUS parameters that will be added to the RADIUS request.

Telephony service

  • Cost of the service.

  • Minimal invoice sum is the minimum service cost for the customer.

  • Charge method as for the periodic service.

  • Charge policy which will be set by default when a service link based on this service.

  • Scheme for schedule applied to the periodic service fee.

  • Contract type which can be selected from the previously created comments list.

  • Free time is the time threshold (say, 5 sec.) for free calls. Longer calls are charged for based on the full time of the call.

  • Starting period length is the length of initial period having special rounding step.

  • Starting period step is the rounding step for the starting period.

  • Next period step is the rounding step for the rest of the call.

  • Tariffication unit size is the time (in seconds), the price for which is set in the price table.

  • Limit of simultaneous sessions sets the maximum number of concurrent connections that may be established with the same login.

  • Discount free time option, when selected, makes the billing consider the prepaid time in the cumulative summary duration of calls on which the call price per minute may depend.

  • Price editor contains the list of call time prices defined separately for various time ranges and for various telephone zones or directions.

    To create a telephony service, at least one telephone zone or direction must exist in the billing.

  • Tariffication borders are the values of total duration of calls per accounting period defined separately for different telephone zones or directions. The borders are used to set the different cost per second of a telephone connection in the ranges defined by these borders. The price from this border to the next will be determined by the value associated with this border.

    To set the tariffication borders for a particular telephone zone or direction, this zone or direction must be present in the price editor of this telephony service.

  • Prepaid values contains the amount of prepaid telephone traffic that is set depending on the telephone zone or direction.

  • Fixed cost is set according to the telephone zone or direction. This cost is independent of the duration of the call and is charged in addition to the variable part defined in Price editor and Tariffication borders.

  • RADIUS parameters that will be added to the RADIUS request.

IPTV service

  • Cost of the service.

  • Charge method as for the periodic service.

  • Charge policy which will be set by default when a service link based on this service.

  • Contract type which can be selected from the previously created comments list.

  • IPTV system type: NetUP, Megogo, Lifestream, IPTVPortal, IrdetoCAS, Other. By default it is set to NetUP. Depending on the selected system, a certain set of additional options is displayed in the settings:

    • NetUP: Type (TV-channels or Radio), Media content and Media group.

    • Megogo: Service ID, Test period, Additional packet.

    • Other IPTV systems: Custom options as a text field. Data for it can be sent as a string in an RFW event.

Video on demand service

  • Cost and Duration of the service.

  • Contract type which can be selected from the previously created comments list.

  • IPTV system type: NetUP, Megogo, Other. By default it is set to NetUP. Depending on the selected system, a certain set of additional options is displayed in the settings:

    • NetUP: Type (TV-channels or Radio), Media content and Media group.

    • Megogo: Service ID, Test period, Additional packet.

    • Other: Custom options as a text field. Data for it can be sent as a string in an RFW event.

For more information on service assignment see Basic system objects ⇒ Services.

If for the service you have selected Charge method ⇒ Flow method, the minimal one-time payment value will be determined based on the cost of the service and the parameters of the selected accounting period.

In the settings of the accounting period you can specify Charges per week. The minimum time interval between charge-offs is calculated based on the number of charges.
Once the service link is initialized, the corresponding accounting period is divided into equal parts.
At the end of each part, the total cost of the service to the moment and the total payments for the service to the moment are determined. If the difference between these two values exceeds the minimal payment, then the sum rounded to the multiple of the minimal payment is charged off the user’s account.

If Charges per week is not set in the accounting period properties, the period is divided into equal parts anyway, but the number of parts is given by the Number of periodic charges in the accounting period for flowing charge method system parameter (by default 64).
At the end of each part a business logic event is generated. The event handler runs through all periodic services linked to this period and having flow method of charging. For every such service, the amount to be charged is determined, and if it exceeds the discount_barrier parameter, the charge-off is made.


Helpful links:


Service templates

The tab contains the list of templates, based on which you can add services to tariff plans.

You can delete only the service template that is not used.
If a template is used, first remove all services that were created with it, and then delete the template.

The template has the same parameters as the service of the corresponding type (see the previous section), as well as the following options:

  • Attach by default option means to activate the service automatically when creating a tariff link.

  • Allow multiple linking means allow this service to be activated more than once.


Tariff plans

A tariff plan has the following settings:

  • ID is assigned automatically.

  • Tariff name.

  • Comment.

  • Created on, Last modified on are the dates of creation and the last modification of the tariff plan.

  • Created by, Modified by are the names of the system users responsible for the tariff plan creation and its last modification, correspondingly.

  • The Zero balance at the accounting period end option. If it is enabled, the balance of the personal account associated with such tariff will be reset at the end of the accounting period.

  • Services included in the tariff plan.

Only the services created from the template can be included in the tariff plan.

A tariff plan may not contain multiple services originating in the same template.


Services in tariffs

The tab contains the list of services included in the tariff plans.

Above the list are search ⇒ search service in the list, and opposite services are edit ⇒ edit and delete ⇒ delete.


Helpful links:

Basic system objects ⇒ Tariff plans
Quick start ⇒ Add a tariff to a user


Telephony settings

The Telephony settings page combines following tabs:

Telephony directions

Telephone zones

Read more about each tab below.


Telephone zones

The Telephone zone is a set of telephone destinations combined for easy billing of telephone calls.

A telephone zone has the following settings:

  • ID is assigned automatically.

  • Full name.

  • Type: local, innerzone, intercity and international coverage.

  • Directions is the list of telephone destinations that are part of this telephone zone.

Every telephone direction may be included in one and only one telephone zone.


Telephony directions

Telephone direction is a set of telephone numbers. The attribution of a particular number to a direction is checked by means of regular expressions. Telephone directions are used to classify phone calls for subsequent tariffication.

A telephone zone has the following settings:

  • ID is assigned automatically.

  • Zone.

  • Type: local, innerzone, intercity and international coverage.

    The type is assigned automatically when the direction is included in some zone. Every telephone direction may be included in one and only one telephone zone.

  • Full name.

  • Called prefix is a prefix or a regular expression to check the called number.

  • Calling prefix is a prefix or a regular expression to check the calling number.

    A regular expression is built according to the POSIX 1003.2.

  • Incoming and outgoing trunk.

  • PBX ID.

  • The Skip option cancels the accounting for this direction.

    If theSkip option is enabled, no calls will be identified as belonging to this direction.

The list of directions is kept ordered lexicographically by called prefix, then by calling prefix, then by incoming trunk, and then by outgoing trunk. The search is performed from the beginning of the list till the first match. Directions with matching called prefix are sorted by the calling prefix in a descending order. Directions with both prefixes matching are sorted by the incoming trunk, etc.

Search goes from the beginning of the sorted list until the first match. To be identified with the direction, a call must match all parameters (called prefix, calling prefix, incoming trunk, outgoing trunk, PBX ID) which are set for this direction.

It is recommended to create the default direction with called prefix ^.*$, so as to leave no number unassigned.


Main parameters

The Additional page combines following tabs:

Accounting periods

Charge policies

Coefficient scheme

Read more about each tab below.


Accounting periods

The tab contains the list of accounting periods.

An accounting period can not be removed.

When you edit an existing period, you can change its end date and select a reporting period.

An accounting period has the following settings:

  • Start time is the date and time when the period begins.

  • End time is the time when the period ends. When creating a new period, the end time is not entered, and calculated automatically.

    Once a period finishes, a new period of the same type is created automatically.

  • Period type that takes one of the following values: Daily, Weekly, Monthly, Quarterly, Annual, Custom duration.

    Monthly period ends in the next calendar month after its start, on the same day of month. However, if the starting date exceeds the number of days in the next month (say, January 30), the period lasts only till the end of the next month.

  • Report period allows you to link the invoices generation date to a calendar month. Is only available for a monthly period type.

  • Custom duration is the length of period in seconds. Enabled only if Period type is set to Custom duration. The shortest possible duration is 3600 seconds.

  • Enabled Set number of charges option allows set the Charges per week for the periodic part of the cost.


Helpful links:

Basic system objects ⇒ Accounting periods and time ranges


Charge policies

Every charge policy contains certain rules for recalculation of periodic component of a service price, prepaid services amount and refunding rules. In particular, these are the periodic fee, prepaid traffic and calls amount recalculation settings.

A charge policy has the following parameters:

Full name

Main

Recalculation on service link creation

  • Periodic fee

  • Traffic

  • Telephony

Do not charge without block

  • Periodic fee

This condition works only if the Recalc periodic fee option is set for the blocking type that applies to the user. For more information see the Creating a charge policy section.

System block settings

  • Set system block on funds lack

If this option is enabled, the personal account will be blocked at the moment when there are not enough funds on the account to charge off the fee for the next accounting period (no funds will be charged off!). If this option is disabled, the personal account will be blocked only when the account balance becomes negative.

Recalculation on block

Three types of blocking: Administrative, Usercp, System

  • Do not charge periodic fee means that the account won’t be charged for the periodic fee while in block

  • Recalc periodic fee means that the periodic fee will be recalculated proportionally to the time spent in block during the current accounting period

  • Decrease prepaid traffic means that the amount of prepaid traffic will be recalculated in the same way as the periodic fee

  • Recalc prepaid telephony means that the amount of prepaid calls will be recalculated in the same way as the periodic fee

Note that the recalculation parameters are set when blocking starts. This means that when the blocking ends, periodic fee, prepaid traffic and calls will be recalculated according to the charge policy parameters recorded when blocking started, even if the charge policy parameters were changed since then.

Repay

At what moment a refund should be made in case of debt to the user (when the customer’s account has been charged excessively):

  • On block expire

  • On payment

  • On charge period end

  • On remove service link

Block timemarks

At what moment to check the funds in the account. The check time is only used if the Set system block on funds lack option is activated. If at some point there are enough funds in the account to provide the service for the rest of the current accounting period, the account is charged and the service is provided.


Helpful links:

Basic system objects ⇒ Charge policy


Coefficient scheme

The tab contains the list of coefficient schemes.

You can delete only the coefficient scheme that is not used.
If the scheme is used in some service that is connected to service links, first remove these service links and then remove the coefficient scheme. No need to remove the service. Once the scheme is removed from the billing, it will be automatically removed from the service.

A coefficient scheme has the following parameters:

  • Name

  • Comments

  • Cost

    • Since is the ordinal number of the accounting period from which the coefficient starts to apply,

    • Till is the ordinal number of the accounting period, at the end of which the coefficient is no longer applied

      The ordinal number of the accounting period is set automatically. Numbering order of accounting periods is individual for each service link and starts from zero: 0 – ordinal number of accounting period valid at the moment of creating the service link, 1 – ordinal number of the first full accounting period, 2 – ordinal number of the second full accounting period, etc. depending on the time period of the service link.

    • Coefficient is a numerical multiplier applied to the cost of the service over a specified period of time

      In those periods when the coefficients from the scheme are not valid, the cost of service is 100%.


Helpful links:

Basic system objects ⇒ Coefficient scheme


Other

The Other page combines following tabs:

Contract type

Traffic classes

Time ranges

Read more about each tab below.


Contract type

Contract type is an additional comment to a service. The same of contract type may be added to any number of services.

After editing the contract type, its value will change in all services where this type is used. In case of removing the contract type from the system, its value will be automatically deleted from all services.

A contract type has the following settings:

  • ID

  • Name

  • Creation date

  • Modification date

Traffic classes

You can delete only the traffic class that is not used.
If the class is used, first remove the entities (services, etc.) that link to it, and then remove the class.

After deleting a class from the billing, the related traffic is displayed in the reports as unidentified, and the class is still displayed as an existing one.

A traffic class has the following settings:

  • ID

  • Local traffic policy: To receiver, To sender, Both.

  • Traffic class name

  • The Don’t save option. If it is enabled, detailed information on the traffic of this class will not be saved. May be worthwhile to set for the free traffic or in other cases when the detailed information is unlikely to ever become necessary. Reduces the raw traffic data files size.

  • Time range. If it is defined, the traffic class will only act at the specified time.

  • Graph color is the color to represent the traffic of this class in the graphic reports.

  • The Display option. If it is enabled, the traffic of this class will be displayed in graphical reports.

  • The Fill in option sets fill style for the graph reports.

You can add Subclasses to a class with the following parameters:

Source,
Addressee

  • Address is mandatory parameter, may be entered as IPv4 or IPv6

  • Port

  • Interface

  • AS is an autonomous system number.

Common part

  • Protocol

  • Next router

  • TOS is TCP/IP “type of service” .

  • TCP flags

  • NetFlow provider

  • Skip

Types (IPv4 vs. IPv6) of the source and destination addresses must coincide; type of the router IP does not have to follow them and may be arbitrary.

If theNetFlow provider is not set, its address does not take part in the logic of determining whether a subclass belongs to a class.

If Skip is checked, the affiliation with subclass is interpreted negatively in the classification, i.e. it means that the traffic does not belong to the given class and needs to be checked against other classes. This may be useful if some address or a group of addresses needs to be pick out as a separate class.


Helpful links:

Basic system objects ⇒ Traffic classes


Time ranges

The tab contains a list of time ranges registered in the billing.

You can delete only the time range that is not used. If a range is used, i.e. it is linked to services, first remove those service links and then remove the range.

A time range has the following settings:

  • ID is number (assigned automatically).

  • Name of the time range.

  • Ranges is a set of time intervals within the range.

  • Priority is the order of importance of the ranges if they overlap. The higher the value of the number specified in this parameter, the higher the priority of the time range.

    If the two time ranges overlap, the ambiguous time is appropriated to the one with higher priority. In the case of equal priority the outcome is platform-dependent and generally unreliable. Such collisions are to be avoided.

  • Days is individual days to be included in the range.. These days are included as a whole, from 12:00 a.m. till 11:59 p.m. If both intervals and days are set in the range, they will be combined.


Helpful links:

Basic system objects ⇒ Accounting periods and time ranges


Payment methods

The tab contains the list of payment methods.

The predefined payment methods (those with ID<100) are not editable. User methods are automatically given sequential IDs starting from 100. These methods are functionally equivalent to the predefined Cash payment method. User methods are editable, but can not be removed.

Currencies

The tab contains the list of currencies registered in the billing.

A currency has the following parameters:

  • ID is the digital currency code according to ISO 4217.

  • Abbreviation is the three-letter currency code according to ISO4217.

  • Full name.

  • Percent is an artificial correction to the course used when updating it online.

  • Rate is the exchange rate against the internal system currency.

  • Currency rate history contains the history of former exchange rates in the system. The first line of the table contains the current currency exchange rate.

In the Currency window, click Online update to update the currency exchange rate (adjusted for Percent, if it is different from 0).
Russian rouble exchange rate is always 1. The Online update button is available if the value of the system currency ISO code parameter is 810 (see Tarification Settings), i.e. if the system currency is the Russian ruble.

IP zones

Each IP zone has an ID, Name and list of subnets included in the zone. Each Subnet must have a Network and a Gateway.

An IP zone can not be removed.

Buildings

If you specify House from the reference book in the user’s Contacts,the IP addresses for the user are issued from the IP zone associated with the house.

A house has the following parameters:

  • ID.

  • Connected on is a date of network connection.

  • ZIP code, Country, Province/State, City, Street, Building#, Constr.#.

  • IP zones in which the house is included.

Streets

The tab contains a list of streets registered in the billing.

A street has the following parameters: Country, Province/State, City, Street.

Banks

Banks registered in the billing can be linked to a user on the User ⇒ Personal tab.

A bank has the following parameters: BIN, Name, City, Correspondent account.

Companies

The tab contains the list of legal entities whose details can be used in document templates. When selecting a company, its data will be automatically inserted into document templates.

For a company you can specify the following parameters: Detals (company name, legal and actual addresses, ITIN, reg code), Executive managers, Bank and Contract. You can select a bank from the list of banks registered in billing.

Reports on payments

The upper part of the window contains the filter settings:

  • number of lines per page,

  • time interval,

  • period of time that corresponds to one of the accounting periods: Current day / week / month / year,

  • group of users, if you want to report data only for a particular group;

  • type of documents: Invoice / VAT invoice / acceptance report / detail invoice, if you want a report on documents issued.

Once you have defined the filter settings, click generate to generate a report.

To generate a report by one user, go to the Main ⇒ Users, find the user in the list, go to the tab of one of the reports, set up a filter and generate a report.

Name Purpose of the report Data in the report:

Payments

This report provides information about payments made by a certain user during the given time span.

  • account ID

  • actual payment time and time of payment in the billing

  • total payment amount in system currency and in the currency of payment

  • currency

  • payment method

  • received by

  • comment

  • payment document

  • expiration date

Internal transfer

This report provides information about the internal transfers of funds, i. e. the transfers between different accounts of one user, made either via web interface or via utm5_tray application

  • transferred from account ID and transferred to account ID

  • volume and date of payment

  • user ID

  • login and full name of user

Expiring payments

This report summarizes the information on expiring payments during the selected time span

  • account ID

  • login

  • first payment date and last payment date

  • expiration date

  • sum

  • already charged off

Other charges

This report provides information on charge-offs, not related to services. The charges are included in the report for the following reasons:

  • expiration of expiring payments;

  • payment rollback;

  • resetting of user’s account to zero at the end of period.

In addition, the report contains rebates for the services not used because of blocking, if some of the user’s service links have their recalculation options set correspondingly.

  • account ID

  • login

  • full name of a payment

  • charge type

  • time of charge

  • sum

Documents

You can generate the following types of reports in the tab:

  • invoice report;

  • VAT invoice;

  • Acceptance report;

  • Detail invoice.

  • internal and alternative number

  • external number

  • account ID and full name of user

  • reg code, ITIN

  • year, month, time

  • paid / unpaid

  • total (include taxes), tax total, charges without tax total

  • creation and modification date

  • status

  • whether the document is e-mailed to a user


Helpful links:

Basic system objects ⇒ Payments


Reports on services

The upper part of the window contains the filter settings:

  • number of lines per page,

  • time interval,

  • period of time that corresponds to one of the accounting periods: Current day / week / month / year,

  • group of users, if you want to report data only for a particular group;

  • traffic type: Groupped by IP / hour / day / month / group, if you want a traffic report;

  • traffic collector in the detail traffic report.

Once you have defined the filter settings, click generate to generate a report.

To generate a report by one user, go to the Main ⇒ Users, find the user in the list, go to the tab of one of the reports, set up a filter and generate a report.

Name Purpose of the report Data in the report:

Main

This report shows information about the transactions on users' personal accounts for a specified period of time.
The general report does not contain the charge-offs caused by the nullification of one’s balance at the end of accounting period (if this option is employed), those caused by the expiration of expiring payments, and the credit payments. If the selected time span contains no flow of funds, then all columns, including the incoming and closing balance, will read 0.

  • account number

  • initial balance

  • charge per service type

  • tax sum and total sum with taxes

  • payments

  • closing balance

Services

This report summarizes information on charge-offs from the user account made during the given time span for the provided services.

  • account ID

  • login and full name of user

  • name and type of service

  • charge time

  • accounting period

  • sum

Custom charges report

This report provides information on charge-offs made at the request of the Rentsoft system integration module

  • account ID

  • login

  • date

  • mark (a unique ID of the transaction)

  • volume and amount with tax

  • service and service ID

  • revoked (a flag that shows whether the charge has been revoked)

Traffic

This report provides information about the volume of transferred IP traffic for each personal account and traffic class for a specified period of time

  • account ID

  • login

  • traffic classes

  • MBytes

  • cost per unit

  • sum

Detailed traffic report

This report is built on the basis of the original data about the transferred traffic.
Detailed statistics over a long time interval typically constitutes huge amounts of data, so the formation of detailed traffic report may take quite a while. To generate a report for a long period of time we recommend using the Traffic collector filter or selecting data directly from the detailed statistics database using the get_nf_direct utility.

  • date

  • link ID

  • personal account

  • traffic classes

  • source

  • destination

  • packets

  • bytes

  • source and destination port

  • TCP flags

  • protocol

  • TOS

Telephony

Report on telephony sessions is based on RADIUS server statistics and summarizes data on telephony sessions (calls).
A call spanning across the border between time periods having different prices per minute is nominally split in two and represented in the report as two calls with the same session ID but with different prices per minute.
A call that has not been tariffed yet is represented in the report as a call with zero price.

  • session and account ID

  • receive date

  • start and end date

  • called and calling station

  • NAS port and session ID

  • login

  • NAS IP

  • status

  • zone and direction

  • session duration

  • rounded duration of the call (calculated based on the rounding step as set in the properties of the telephony service)

  • incoming and outgoing trunk

  • PBX ID

  • cost per unit and total cost

  • termination cause

  • coefficient

  • flags

Telephony directions

This report summarizes the calls made to different telephone destinations

  • direction ID and name

  • aggregate duration

  • total cost

  • calls count

  • calls count with nonezero duration

Other reports

The upper part of the window contains the filter settings:

  • number of lines per page,

  • time interval,

  • period of time that corresponds to one of the accounting periods: Current day / week / month / year,

  • group of users, if you want to report data only for a particular group;

  • type of user change for user change log.

Once you have defined the filter settings, click generate to generate a report.

To generate a report by one user, go to the Main ⇒ Users, find the user in the list, go to the tab of one of the reports, set up a filter and generate a report.

Name Purpose of the report Data in the report:

Blockings

The report provides information on all the blockages implemented during a selected period of time

  • account ID

  • login

  • block type

  • start and end time

  • accounting period

  • deleted

User change log

The report provides information on changes in user properties and some other system objects (services, tariff plans, charge policies) for the selected period:

  • user ID

  • user login and system user who made the changes

  • time of change and comment

  • action

Sessions

Report on modem sessions and VPN sessions, which is based on RADIUS server statistics and summarizes data on dialup access sessions.

  • session and account ID

  • end date

  • called and calling station

  • IP address

  • NAS port and session ID

  • login

  • NAS IP

  • status

  • incoming bytes and gigabytes, outgoing bytes and gigabytes

  • duration

  • termination cause

  • total cost

  • flags

DHCP lease

This report provides the lease history of IP addresses issued by the built-in DHCP server

  • user ID

  • login

  • IP

  • MAC

  • Relay-Agent info

  • updated

  • expired

Profiles

The tab contains a list of equipment profiles.

A profile has the following parameters:

  • Name of profile.

  • Ports capacity – number of ports in a profile. May be several numbers, separated by commas.

  • Ports start with 0 option.

  • On the REMOTE ID, PORT ID and VLAN ID tabs, if Enable is checked, the following options are available:

    • TypeString or Binary.

      The byte order is important for PORT ID and VLAN ID. You can select between Binary (BE) - big endian or Binary (LE) - little endian.

    • Disposition is a suboption of the option 82 to which the offset is applied.. Suboption code is considered to be the start of the suboption and the start of the offset. If the Option 82 value is set, the offset starts at the beginning of the whole option 82.

    • Offset in bytes shows the beginning of this parameter in respect to the beginning of the option or one of its parts.

    • Length in bytes.

Switches

The tab contains a list of switches added to the billing.

A switch has the following parameters:

Tab Parameters:

Main

  • name is the switch name in the database (name uniqueness is not checked, but is recommended);

  • actual address is a field that contains information about the actual address of this particular switch.

Device parameters

  • type is a list that allows to choose one of the existing switch types;

  • Remote ID is a DHCP option 82 parameter. It is used by the switch to form DHCP requests. The parameter type is set in the corresponding switch type properties;

  • ports count in the switch.

Access parameters

IP, login and password. These parameters might be used in firewall rules.

Ports usage

after adding the switch to the billing, it is assigned an ID and in the properties appears Ports usage tab, which shows the number of free and used ports.

Linked pools

Pool ID and gateway.

DHCP options

ID, type and value of additional DHCP options. These options and their values will be included in the DHCP response if a DHCP client includes those options in the DHCP request.

DHCP pools

The tab contains a list of DHCP pools added to the billing.

A DHCP pool has the following parameters:

Tab Parameters:

Main parameters

  • gateway;

  • mask;

  • DNS server 1, 2;

  • NTP server;

  • domain;

  • lease time;

  • block action is DHCP server behavior if a request comes from a user whose personal account is blocked:

    • Not defined means that the DHCP server will lease an IP address for both blocked and not blocked users;

    • Use blocked allows to assign IP addresses from a certain DHCP pool to blocked users. In order to use this option, you must also select the pool from which the IP address will be issued. This option is only available when more than one DHCP pool is registered in the system;

    • Ignore request, if it comes from a blocked user.

Dynamic ranges

  • First and last address of a pool, for example, 10.1.0.1 – 10.1.0.50.

DHCP options

ID, type and value of additional DHCP options. These options and their values will be included in the DHCP response if a DHCP client includes those options in the DHCP request.

DHCP lease

This page contains the list of active and expired DHCP leases.

The list has the following parameters:

  • ID is an automatically assigned record number;

  • IP is the leased IP address;

  • MAC is the client’s MAC address;

  • Server id;

  • Client id is a HostName attribute of the DHCP option 12 from the client’s DHCP request;

  • Expired is the date of the IP address lease expiration;

  • Updated is the start date of the IP address lease;

  • Flags is the lease status:

    • Static – the address has been assigned statically (has been entered in IP group settings);

    • Dynamic – the address has been assigned dynamically;

    • Static, Modified – the address has been assigned statically, after that IP group settings have changed, or it has been removed;

    • Dynamic, Modified – the address has been assigned dynamically, after that IP group settings have changed, or it has been removed.

Telephony

Emergency calls

The page contains the list of telephone zones / directions which are available for a call even when the user’s account is blocked.


Documents

Document templates

Profiles of documents

Replacements in documents

Read more about each tab below.


Document templates

The page contains the list of document templates.

A document template has the following settings:

  • ID,

  • Type: bill, TAX invoice, user info sheet, etc.,

  • Full name of the template,

  • Path to the file,

  • Created / Modified.


Profiles of documents

The page contains the list of document profiles.

Profile of documents is a set of templates for document types that can be generated in the billing. You can assign a profile to a user to define the document format for this user.

By default, a profile number one (default) is assigned to all users. This profile cannot be deleted.

To assign a different document profile to a user, click on the line with the user's details and go to User ⇒ Other.


Replacements in documents

The page contains the list of replacements that can be used in document templates. Here you can add new replacements and edit existing ones, as well as delete replacements that are no longer used.


Helpful links:

Basic system objects ⇒ Documents

Modules ⇒ Document templates


Systems

Main

IP pools

Archive DB

ISG attributes

Read more about each tab below.


Main

Tab Parameter Default

Tariffication

System ISO сurrency code

810 (Russian roubles)

Bytes in tariffing unit of kilobyte

1024

Minimal periodic charge threshold in units of system currency

0.1

Number of periodic charges in the accounting period for flowing charge method

64

Traffic aggregation timeout before the next charge

900

Minimal traffic charge threshold in units of system currency

The Traffic aggregation timeout and Minimum traffic charge threshold parameters define the rate at which the user's personal account is being charged. These parameters are considered simultaneously. User’s personal account is charged when either condition is satisfied.

The lower these parameters, the faster will grow the tables that store charges statistics. Those tables are the largest in the database and may require table archiving in order to reduce the DB load.

5

“Discard old prepaid traffic when tariff is changed” option

Off

“Force modification of prepaid traffic in dangerous cases” option

Off

Collecting data from traffic collectors period

60

“Save balance to balance history on closing discount period” option

Off

“Create invoice when charge is zero” option

Off

Card users

Card user`s login prefix

_card

Callback/ringdown setting for auto created dialup service links

0

CID value for auto created dialup service links

Empty string

CSID value for auto created dialup service links

Empty string

Length of pin code part user as telephony service link login

0

Notification

Email address to copy low balance notifications

Empty string

“Send low balance notifications by the internal messaging system” option

Off

List balance notification borders separated by space

1

Email address of balance notification message sender

admin

Subject of low balance notification message

Notification

Template of low balance email notification

Text with variables

Subject of payment email notification

Payment

Template of payment email notification

Text with variables

Subject of invoice email notification

UTM invoice

Template of invoice mail notification

Invoice

SMTP protocol

SMTP server host

127.0.0.1

SMTP server port

25

SMTP fully qualified domain name

localhost

Invoice document

“Create a bill document per each telephony provider” option

Off

“Add telephony number to the bill document rows” option

Off

“Create bill documents of an old format” option

Off

Rules for invoice generating

default

Rules for prepaid invoice generating

Rules for invoice generating and Rules for prepaid invoice generating determine invoice position aggregation rules. An aggregation rule consists of comma-separated field names. To have service-related positions included in a single invoice, the field values must be equal for these services.
See this example – Configure invoice document settings.

single

Directory for generated documents

/netup/utm5/doc/storage

“Generate printed forms” option

Off

“including bills” option

Off

“including invoices” option

Off

“including certificates of completion” option

Off

“including bill details” option

Off

“days for keeping created documents(0-forever)” option

0

Other

Minimal value of the RULE_ID variable in the firewall rules

5000

Login prefix delimiter

: (colon)

Removal timeout of dynamically allocated IP address

900

“Encrypt passwords of users and service links” option

Off

Group of system users which receives messages from customers

0

“Don't append telepohy direction/zone ID to the telepony report rows” option

Off

Maximal number of rpcf_search_users_lite results

5

Hotspot session timeout from the moment of last refresh

600

“Enable 'internet status' for the personal account when the payment has been received from the external system” option

Off

“Send notification email when the payment has been received from the external system” option

Off

Collecting statistic from traffic collectors period

60

Archive database name

Empty string

Hide password in service link

Off

RADIUS protocol

Login realm for VPN users

Empty string

Period of loading of recent sessions to the RADIUS server on the startup

86400

“Enable billing of RADIUS Accounting-Stop packets” option

Off

“Enable billing of RADIUS Interim-Update and Accounting-Stop packets” option

Off

Default

Default vat rate

0

Irdeto

Address

Empty string

Username

Empty string

Password

Empty string

Operator

Empty string

Nationality

Empty string

Region

Empty string

Location

Empty string

Megogo

Megogo partner id

Empty string

Megogo user prefix

Empty string

Megogo salt

Empty string

Period type for new Megogo discount period

3

Duration for new Megogo discount period

0

IPTV portal

Iptvportal address

Empty string

Iptvportal username

Empty string

Iptvportal password

Empty string

Lifestream

Lifestream address

Empty string

Lifestream user prefix

Empty string


IP pools

The page contains a list of pools added to the billing, from which IP addresses are issued to users of dial-up access services.

If there are several IP pools with the same name in the billing, the order of issuing addresses from them is regulated by the parameter named_pool_shuffle (see the RADIUS configuration file).

An IP pool has the following parameters: ID, name and address.


Archive DB

This page contains an interface for automatic DB archiving.

To create an archive, click add.

A archive has the following parameters:

  • ID of archive;

  • Start time is the time, when first archive record was created;

  • End time is the time, when last archive record was created;

  • Status of the archive (OK, Verify, Unable to verify, Need repair).

You can do archiving once in 28 days.

In order for the archived data to be used in reports, the archived tables structure must comply with the core requirements. Press Verify to verify the archived tables structure. As a result of the check, the status of the archives will change. If the archive fulfills the core requirements, the archive status is OK if not, the status is Need repair.

To adjust the structure of the archive tables to the requirements, press Verify. In case of success, the status will change from Need repair to OK. Otherwise the status will change to Unable to verify.

You can fix the structure of tables with the status Unable to verify only manually.


Helpful links:

System maintenance ⇒ Checking database structure


ISG attributes

The page contains a list of ISG attributes that can be used to describe how a RADIUS server communicates with an intelligent IPoE gateway (in particular, Cisco ISG). To use attributes, set them as parameters for a registered NAS.

An ISG attributes has the following parameters:

  • ID of attribute profile which assigned automatically, when the profile is added to the billing;

  • Name;

  • Attribute id;

  • Vendor id.


Inventory

NetFlow providers

Traffic collectors

Read more about each tab below.


NetFlow providers

The page contains the list of NetFlow providers registered in the system.

An NetFlow provider has the following parameters:

  • ID – assigned automatically;

  • Traffic collector that should process the information coming from this NetFlow provider;

  • Name – must be unique;

  • IP address of the NetFlow provider;

  • Comments.


Traffic collectors

The page contains the list of available traffic collectors registered in the system.

A collector has the following parameters:

  • ID – assigned automatically;

  • Name must match the value of tc_name parameter in the configuration file of the traffic collector;

  • Comments;

  • Uptime since the launch of this collector;

  • Netflow records that have been processed by this collector;

  • Netflow error records is the number of non NetFlow records.

To configure the traffic collector, open it for editing and click Properties. In the opened window, you can see the following settings:

  • Path to .utm file is the directory path for storing detailed traffic

  • Raw process script is the script executed when closing the detailed statistics file

  • Max file size for detailed traffic

  • Max files count for detailed traffic

  • Records send limit is the limit of records in the detailed report

  • Max buffer size of detailed statistics

  • Duration between commits (sec)

  • Multiplicator for traffic


Customer portal

Switch tariff

Payment systems

Promised payments

Transfer funds

Voluntary suspension

The pages of this section of the menu contain sets of parameters for configuring various operations, which are available to the user in his personal cabinet.

The applicability of sets to a particular user is determined based on group affiliation and priorities.
This means that one of the sets of parameters can be applied to a particular user, if the user is a member of a group for which this set is available. If there are several sets defined for this group (or the user belongs to multiple groups), only one set is applied, namely the one with the highest priority. When this set is disabled, so is this facility for this user, despite possible presence of other sets, if even for the same group.

Read more about each tab below.


Switch tariff

The page contains sets of parameters for switching a tariff plan.

The applicability of sets to a particular user is determined based on group affiliation and priorities (read more above).

To configure the tariff switch, use the following parameters:

  • ID – assigned automatically;

  • Group of users to which this set is applicable;

  • Active option – if enabled, this set is available to users;

  • Instant change – if on, the tariff plan is changed immediately; if off, the tariff is changed at the end of the accounting period;

  • Instant change count is the maximum allowed number of plan switches during one accounting period;

  • Tariff plan list from which the user can choose the next tariff. Click add and in the opened window, set the parameters:

    • Tariff;

    • Min balance is the minimum value of the user’s balance required to switch plans;

    • Service is a one-time service used to collect fee for the plan switch;

    • Free if balance more then is the minimum of the user’s balance required to switch plans for free.

      Enable the Use option if you want to set a minimum balance or balance for free activation.


Helpful links:

Basic system objects ⇒ Tariff plans
Quick start ⇒ Add a tariff to a user


Payment systems

Payment systems are available for connection and configuration if you have a Telecom license.

The page displays a list of added to the billing payment systems that users can use to pay for services through the web interface of their personal cabinet. The list is divided into user groups.

Availability of payment systems for a particular user is determined by group affiliation.

Click add and in the opened window, select:

  • Group of users who will have access to the payment system;

  • Payment system you want to add to the billing.

Click on one of the payment systems added to the billing to expand the parameter panel and make changes. After you finish setting up the payment system, click on save over the list of parameters.

Please note that if the same payment system is available to different user groups, it must be configured for each group separately.

Payment systems Parameters:

Sberbank

  • Currency code to send a payment to a bank.

  • Enabled – Yes or No.

  • Internal currency is the currency used to make the payment in the billing.

  • Interface language

  • Page view – DESKTOP – PC screen; MOBILE – page intended for displaying on mobile screens..

  • Password and Username were issued by the bank.

  • Payment method to be assigned to the payment in the billing.

  • Return URL – personal cabinet address – http://localhost/cabinet.

  • Test mode for payments.

  • Turn on inet after payment.

QIWI

  • Internal currency is the currency used to make the payment in the billing.

  • Payment method to be assigned to the payment in the billing.

  • Turn on inet after payment.

Yandex

  • API key is issued by Yandex.

  • Currency for Yandex.

  • Enabled – Yes or No.

  • Internal currency is the currency used to make the payment in the billing.

  • Payment method to be assigned to the payment in the billing.

  • Return URL – personal cabinet address – http://localhost/cabinet.

  • Shop key is issued by Yandex.

  • Turn on inet after payment.

PayPal

  • Client ID is issued by PayPal.

  • Currency for PayPal.

  • Enabled – Yes or No.

  • Internal currency is the currency used to make the payment in the billing.

  • Payment method to be assigned to the payment in the billing.

  • Return URL – personal cabinet address – http://localhost/cabinet.

  • Secret is issued by PayPal.

  • Test mode for payments.

  • Turn on inet after payment.


Promised payment

The page contains sets of parameters for promised payments.

The applicability of sets to a particular user is determined based on group affiliation and priorities (read more above).

To configure the promised payments, use the following parameters:

  • ID – assigned automatically;

  • Group of users to which this set is applicable;

  • Max payment that can be made;

  • Until balance not positive – if enabled, automatically sets the minimum possible payment amount so that the balance becomes positive;

  • Expires in (days) – this is the due date for the promised payment;

  • Interval between uses (days) – minimum interval, after which the user can reuse the Promised payment service;

  • Min balance is the minimum value of the user’s balance required to use the promised payment;

  • Service is a one-time service used to collect fee for the promised payments;

  • Free if balance over is the minimum balance value required to make promised payments for free.

  • Active option – if enabled, this set is available to users.

    Enable the Use option if you want to set a minimum balance or balance for free activation.


Helpful links:

Basic system objects ⇒ Payments
Quick start ⇒ Make a promised payment


Transfer funds

The page contains sets of parameters that allow users to transfer funds between their own accounts.

The applicability of sets to a particular user is determined based on group affiliation and priorities (read more above).

To configure the transfer funds, use the following parameters:

  • ID – assigned automatically;

  • Group of users to which this set is applicable;

  • Active option – if enabled, this set is available to users.


Voluntary suspension

The page contains sets of voluntary blocking parameters.

The applicability of sets to a particular user is determined based on group affiliation and priorities (read more above).

In case of voluntary blocking, the periodic fee is recalculated according to the parameters set in the properties of the service link.

To configure the voluntary suspension, use the following parameters:

  • ID – assigned automatically;

  • Group of users to which this set is applicable;

  • Minimal duration (seconds);

  • Maximum duration (seconds);

  • Interval between uses (seconds);

  • Min balance is the minimum value of the user’s balance required to use the voluntary suspension;

  • Service is a one-time service used to collect fee for the voluntary suspension;

  • Free if balance over is the minimum balance value required voluntary suspension for free.

  • Self unlock – If enabled, the user can terminate the voluntary blocking prematurely;

  • Active option – if enabled, this set is available to users.

    Enable the Use option if you want to set a minimum balance or balance for free activation.


Helpful links:

Basic system objects ⇒ Account and Charge policies


Quick start

The web interface is under development, so the section contains only those pages that are already available.

Add a new user (customer)

  1. Go to the Main ⇒ Users page and click add above the list of users.

  2. In the opened window, type in the login, user name and set the password.

    The password for the user is generated automatically, but you can change it.

  3. Check Payment in advance box if necessary.

    If the Payment in advance option is enabled, the invoices for the periodic services that have “at the start of the period” charge method are issued at the beginning of an accounting period. This parameter does not affect the charge-off order.

  4. Click save and the user will appear on the list.

    Together with the account, the user's main personal account will be created and the billing currency will be set at Russian roubles (RUR). If you want to change the currency for billing the user, click on the line with user details, go to the User ⇒ Other tab, select Currency from the list and click save

  5. Configure the user account. Click on a user data line and go to Tariffication ⇒ Accounts. Click on the line with the personal account details to edit its parameters, make the necessary changes and click save

    Any number of additional personal accounts may be associated with the user. How to add a personal account to a user, read the next section.

Add a personal account to user

  1. Find a user in the list – enter any information about the user into the search field and click search

  2. Click on a user data line and go to Tariffication ⇒ Accounts.

  3. Click add above the list of personal accounts and in the opened window fill in the required fields:

    Loan

    Account credit. You can change it manually or by making a payment using the Credit method. By default is 0 (zero).

    VAT rate

    It is applied when issuing invoices. By default is 0 (zero).

    External account ID

    It is for integration with some external system. By default is empty string.

    Sale tax rate

    It is applied when issuing invoices. By default is 0 (zero).

    Internet status

    Internet status: on or off. By default is on.

    Block

    Status of blocking: active or admin block. By default is active.

    Auto enable internet

    The option allows to configure the automatic activation of the Internet when making a payment and exiting the blocking. By default is disable.

    Unlimited mode

    The option allows all charge-offs from the user account to be made at zero cost. By default is disable.

  4. Press save

    After creating a personal account, you can edit its parameters. Click on a personal account to expand the panel with its data, make the necessary changes and click save

Connect a service to user

  1. Find a user in the list.

  2. Click on the user data line and go to Tariffication ⇒ Service links.

  3. Click add and in the opened window, select one of the available services, and then click ok to open the window with the selected service options. If necessary, change the service parameters, fill in the fields and press ok to add the service, i.e. create a service link.

For periodic services it is obligatory to specify the accounting period. If there is no suitable accounting period in the list, create it and then go back to adding the service.

Delete a user

  1. Go to Users page and find a user in the list.

  2. On the user data line, click on delete

  3. Confirm the removal in the window that opens.

If the user has any service links, they cannot be deleted. Open the user profile, delete all services and tariffs that the user has, and then delete the user.

Download a user memo

  1. Go to Users page and find a user in the list.

  2. On the user data line, click on download

  3. In the opened window, rename the file, if necessary, select the file format (.pdf or .odt) and click download

Make a payment to a user account

  1. Go to Users page and find a user in the list.

  2. On the user data line, click on payment

  3. In the opened window, select a personal account from the list to open a form for making a payment and fill in the necessary fields:

    Payment

    Enter the amount of payment. By default is 0 (zero).

    Currency

    The list of currencies that are added to the billing. By default is ruble (RUR).

    Payment date

    By default is the current date.

    Burn date

    Turn on the option and set an expiry date. By default is not set.

    Payment method

    Select a method from the list. By default is Cash payment.

    Other settings

    Comments

    Enter comments for the administrator and user, if necessary.

    Payment extern number

    If the payment is being done on demand of some external document, enter the number of that document.

    Invoice number

    If the payment is being done on demand of some internal invoice, select the number of that invoice from the list.

    Switch internet on

    Enable this option if you want to enable the Internet for the user. The Internet will be activated if the user's balance becomes positive after making this payment.

    Be sure to enter the Payment amount and select the Payment method from the list, the other fields can be left with default values or empty.

  4. Press save

Make a promised payment

  1. Go to Users page and find a user in the list.

  2. On the user data line, click on promised_payment, to open the corresponding window.

    Promised payment can be issued only to those users who are in the group specified by the billing administrator in the promised payment settings, and only for the amount not exceeding the amount of the Maximum payment set. To view the promised payment parameters, click Other settings.

  3. Enter the amount of the promised payment and click save

Add a tariff to a user

  1. Go to Users page and find a user in the list.

  2. Click on the user data line and go to Tariffication ⇒ Tariff links.

  3. If the user has more than one personal account, select from the list the personal account to which you want to link the tariff, and then click add

  4. In the opened window, select the Current tariff plan and Next tariff plan (or leave Do not change) and Accounting period, and then click ok to create the tariff link.

  5. For each service included in the tariff there will be a window where you can modify service parameters, if necessary. Click ok to add the service or click cancel to remove the service from the tariff plan for this user.

    If the current tariff plan includes one-time services with the Attach by default option, then select the desired date and time for each of them.

Create a traffic class

By default there are 2 classes of traffic in the billing:

  • Incoming class includes a single subclass where the Address parameter contains the address and the mask of the local network – ID (10);

  • Outgoing class includes the Source parameter which contains the same address and mask – ID (20).

You can create additional classes, for example, to rate traffic at different times of day at different prices.

Please note! To create a class in which traffic is time-dependent, you should first create time ranges.

  1. Go to Tariffication ⇒ Other ⇒Traffic classes and click add above the class list.

  2. In the opened window, specify the Class ID (e.g. 15), name of the class (e.g. Night Incoming), select the time range (e.g. Night) and add subclasses of traffic.

  3. Click add above the list of traffic subclasses. In the Addressee group enter the IP address and subnet mask for local network, in the Source group enter the source network address and subnet mask (e.g. enter 0.0.0.0/0 if source of the traffic doesn’t matter) and click ok.

  4. After setting all necessary parameters, click ok in the Traffic classes window to add it to the billing.

Create an IP traffic service

It is necessary to create traffic classes beforehand.

  1. Go to Tariffication ⇒ Services/Tariff and click add above the list of services.

  2. In the opened window, select the IP traffic service and click ok

  3. In the IPTV service window enter the service name, comment and select the Supplier to invoice (your company name).

  4. Go to Service parameters and enter cost of the service, charge method and, if necessary, fill in other parameters or leave the default values.

  5. Go to Tariffication borders and click add. In the opened window, select a traffic class for the border, enter the border position in bytes (0) and cost for traffic exceeding the border in currency units per megabyte. Press ok

  6. If you want to add prepaid traffic, go to the Prepaid traffic and click add. In the opened window, select the class and volume of traffic and specify how much traffic can be collected. Press ok

  7. After setting all necessary parameters, click ok in the service window to add the service to the billing.

Create the NetUP IPTV service and connect it to a user

  1. Go to Tariffication ⇒ Services/Tariff and click add above the list of services.

  2. In the opened window, select the IPTV service and click ok

  3. In the IPTV service window enter the service name, comment and select the Supplier to invoice (your company name).

  4. Go to Service parameters and specify the cost of the service, the charge method, the IPTV system type ⇒ NetUP and select the media content or content group to which you want to grant access to users of this service. If necessary, fill in other parameters or leave the default values. After setting all necessary parameters, click ok to add the service to the billing.

    Create an IPTV service template if you want to include it in the tariff plan.

  5. Go to Users and find the user you want to connect the IPTV service to in the list.

  6. Click on the user data line and go to Tariffication ⇒ Accounts.

  7. If the user has more than one personal account, select from the list the personal account to which you want to link the service and go to IPTV settings.

  8. Click add opposite the IPTV access card as result, you will see the number of the access card for this personal account.

    The activation code of the access card you can see on the Tariffication ⇒ IPTV activation cards tab

  9. Go to Tariffication ⇒ Service links and click add above the list of services attached to the user.

  10. Select the IPTV service you have created from the list, choose the accounting period in the window that opens and click ok

Add a card pool

  1. Go to Main ⇒ Card pools and click add above the list pools services.

  2. In the opened window, fill in the required fields:

    Cards count

    is the number of cards to be generated. By default is 100 (one hundred).

    Balance

    is the monetary value of one card. Required field.

    Currency

    Currency of card value. By default is ruble (RUR).

    PIN code length

    is the number of digits in the PIN codes to be generated. By default is 8 (eight).
    The Unique PIN codes option is available for generating PIN codes. Turn it on to ensure that the PIN codes are unique.

    Random numbers

    enable this option to generate random numbers (identifiers) for cards. By default – this option is disabled, card IDs are in a row.

    Activate before

    date and time of card validity. By default is the current date and time. Turn on the Not installed option if you do not want to limit the validity of cards.

    Days to use

    is the optional term of expiration of the payment made when the card gets activated. If not set, the payment is not expiring. By default is 0 (zero).

    Tariff ID

    Tariff, which will be connected to the card user after card activation and registration in the billing.

    The created cards may be neither edited nor removed.If the tariff for the card users contains some services with periodic component, on user’s registration those get attached to the system accounting period, which is since 1/1/1970 till 1/19/2038. Therefore only the services with no or negligible periodic payment are suitable to include in such tariff plans.

    Be sure to specify Balance, the other fields can be left with default values or empty.

  3. Click ok and the new pool will appear on the list.

Edit a card pool

  1. Go to the Main ⇒ Card pools and click edit opposite one of the pools to open the editing window.

  2. In the opened window, you can see the following possibility:

    • click add above the list of cards if you want to add cards to the selected pool;

    • click on the line with the card data and click to_block or unblock to perform the corresponding action;

    • click add above the list of cardholders at the bottom of the window if you want to add a system user who is allowed to automatically register users based on cards from this pool;

    • click add nex to the system user to remove this user from the owner list.

      The option of having different owners for various pools relevant when the system contains several web server interfaces run by different system users. If the list is not set, any system user has the right to register users.

  3. Press ok to save the changes.

Edit a template

  1. Go to the Settings ⇒ Documents ⇒ Document templates and click edit opposite one of the templates to open the editing window.

  2. In the opened window, press download to save the current template to an *.odt format.

  3. Open the saved file in LibreOffice and make the necessary changes. To add a new variable, go to the Insert ⇒ Field ⇒ More fields and on the Variables tab , select the desired variable from the list or enter its name in the Name field and press Insert.

    Make sure that the variable you want to add is available for this template type (see Modules ⇒ Document templates).

    If an array of values corresponds to a variable (the variable is iterated), it should be placed in one of the cells in a table row, for example:

    IP addresses

    IP address

    Subnet mask

    Gateway

    Login

    Password

    MAC address

    <IP address>

    <Subnet mask>

    <Gateway>

    <Login>

    <Password>

    <MAC address>

    In this case a necessary number of rows will be inserted into the table when generating the documents.

    If none of the variables returns a corresponding value, the corresponding rows will be removed from the resulting document.

Use an alternative document number

An alternative document number separate document numbering for different service providers. The alternative document number may be used for generating invoices, VAT invoices, etc.
Some modules can send an alternative number as an account number.

  1. Open with LibreOffice the .odt document template where you want to use the alternative number and remove the <doc number> field.

  2. Go to Insert ⇒ Field ⇒ More fields and select the Variables tab:

    • in the Type – User field,

    • in the Select column – document.alt_number,

    • in the Format column - Text.

      Press Insert, and then Close.

  3. As a result, the <alternative number> will be displayed in the document template instead of <doc number>. Save the changes and close the template.

  4. In the billing web interface, go to Reference book ⇒ Companies, click edit to open a legal entity profile for editing, or add to add a new legal entity. In the opened window, go to the Contract and specify the format of the alternative document number in the Number format field.

    In general, the alternative number has the following format: prefix{alt_number(количество_символов)}postfix. For example ABC#{alt_number(5)}-DE will appear as ABC#00001-DE.

  5. Press save to save the changes.

Configure invoice document settings

In the admin web interface, on the Settings ⇒ Systems ⇒ Main ⇒ Invoice document tab you can see Rules for invoice generating and Rules for prepaid invoice generating that define the rules for aggregation of account positions.

An aggregation rule consists of comma-separated field names. To have service-related positions included in a single invoice, the field values must be equal for these services.

For example, the rule is company.id, which means that entries that share the same service provider will get into the same Invoice.

Let’s suppose we have three services:

  • (1) IP traffic,

  • (2) Hotspot from one service provider (sharing the same company.id=1)

  • (3) telephony service from another service provider (company.id=2).

Services (1) and (2) must generate two entries each - A, B and C, D respectively. Service (3) also generates two invoice entries - E, F. In this case two invoices will be formed:

  • the first invoice will contain entries A, B, C, and D;

  • the second one – will contain entries E and F.

The following field names are allowed for setting the rule:

Field Description

tariff.link_id

is a tariff link ID

tariff.id

is a tariff plan ID

tariff.name

is a tariff plan name

service.link_id

is a service link ID

service.type

is a service type

service.id

Is a service ID

service.name

is a service name

company.id

is the service provider ID

company.name

is the name of the service provider

Use colon to separate rules for services that are included in a tariff plan from ones that are not (common services). In this case, if a user have a tariff plan and a common service connected, two the personal will be generated. If a user have only a tariff plan connected, a single Invoice will be generated.

The following preset rules could be used as well:

Rule Description

default

Create an invoice with a certain fixed set of fields.
This rule is equivalent to the following: tariff.link_id,company.id:service.link_id
This means that two invoices will be generated. One will include all positions for the services that are associated with the same tariff plan and the same company. The other will include the positions for each common service.

single

All services will be included in a single invoice.
This rule equivalent to empty parameter value field: No field names are set, thus all positions will be included in a single invoice.

separate

Two invoices will be generated: one is for tariff plan services and the other is for common services.
The separate rule is equivalent to setting : (colon) in the parameter value field.
No field names are set, but the colon determines that all common services will be calculated separately. Hence, if a user have both tariff plan services and common services connected, then two the invoices will be generated.

Create a charge policy

  1. Go to the Tariffication ⇒ Additional ⇒ Charge policies and click add

  2. In the opened window, enter Name for the policy and enable the necessary options on each of the tabs:

    Main

    Select what you want to recalulate on service link creation (at the moment of service connection): periodic fee, traffic, telephony.

    And enable the Don`t charge without block, if during the blocking the user's account should be charged for some services.

    This condition works only if the Recalc periodic fee option is set for the blocking type that applies to the user (see below).

    For example, a user is in User blocking. In order for the periodic fee to be charged during this blocking, you must enable the following options:

    • Do not charge periodic fee;

    • Recalculate the periodic fee in the group of options Recalculation on block, on the tab with settings for the User block.

    Recalculation on block

    For each type of lock (Administrative, User, System) enable the necessary options:

    • Do not charge periodic fee means that the account won’t be charged for the periodic fee while it is in block.

    • Recalc periodic fee means that the periodic fee will be recalculated proportionally to the time spent in block during the current accounting period.

    • Decrease prepaid traffic similar to the periodic fee.

    • Recalc prepaid telephony similar to the periodic fee.

    Repay

    Check the events that you want to be coupled with refund when excessive amount of money was withdrawn from the user’s account:

    • on block expire;

    • on payment;

    • on charge period end;

    • on remove service link.

    System blocking

    Enable the Set system block on funds lack option to block users when the balance is negative, and set the time to check the users' balance.

  3. Press ok to save the changes.