How to control phone call costs?

Any medium or large company or organization that has a PBX is faced with the issue of controlling the use of funds for telephone calls. This can be especially relevant for government agencies, because they spend not their personal funds, but taxpayers' funds. There have long been organizational methods where orders at the enterprise stipulate the specifics of the use of telephone communications. But as practice shows, these orders are not always carried out by all employees. Can this be done using computer programs? Yes, this is exactly what the Tariscope Enterprise (hereinafter Tariscope) call accounting system from SoftPI is. And this is proven by the fact that this system has thousands of users in more than 40 countries.
How does Tariscope do it?
First, Tariscope has a rather unique feature compared to similar systems, namely the restriction feature. This feature allows the system administrator to set limits on the use of either any or a specific type of telephone traffic for specific subscribers or for a group of subscribers. After the limit is exhausted, Tariscope sends commands to the PBX, which changes the class of service of the subscriber, or group of subscribers, if the limit was set for a group of subscribers. With the beginning of a new month, Tariscope automatically restores the previous value of the class of service to subscribers to whom the limit was set. Thus, a company that has a monthly budget for telephone calls will strictly adhere to this budget.
Secondly, Tariscope contains a large number of opportunities for analyzing calls made. These are views for calls that allow you to choose the order and the required number of fields describing the call, sorting information by any field, filter data by various criteria, and group data by different fields, as well as a large number of various report forms. All this allows you to get a complete picture of how departments and subscribers use funds for telephone conversations.
Finally, Tariscope allows subscribers to access information about their calls through the Tariscope Personal Area, where subscribers are allowed to categorize their calls, for example, business or private. The head of the department has the opportunity to check this information on the calls of his subordinates, and if necessary, edit the categories. As a result, in Tariscope it is possible to generate reports by call categories, and if the company considers it necessary, to reduce the cost of their private telephone conversations from the employees' salaries. If you have any doubts about the above Tariscope capabilities, we suggest downloading Tariscope and testing it for free.
Retrieving CDR data from Alcatel-Lucent OmniPCX Enterprise (Alcatel-Lucent OXE) via FTP
The Tariscope Enterprise call accounting system and the Tariscope Provider billing system (SoftPI) can receive CDR data from the Alcatel-Lucent OXE using various PBX ports. This can be done over a local network or the Internet using TCP or FTP protocols, or via a serial port. The latter case is already quite outdated, so we will not consider it, although Tariscope also has such an option. A description of how to receive CDR data from Alcatel-Lucent OXE using TCP is given in the article "Alcatel-Lucent OXE. Receiving CDR via TCP in Tariscope". In the current article, we will consider how to configure Tariscope to receive CDR via FTP.
The Alcatel-Lucent OXE contains files named TAX-----.DAT. These are actually 7z archive files, so if you change the extension of this file from DAT to 7z, the file contents can be unzipped, for example, using the 7-Zip application.
Before starting Tariscope Observer (Observer), it is essential to correctly specify the date format used in CDR files for correct processing of CDR records. If the date format is specified incorrectly, errors will occur when processing CDR records and the data will not be entered into the Tariscope database.
To determine the date format, you need to unpack one of the CDR files (TAX*.DAT). An example of the unpacked file with the date and time value highlighted is shown in Figure 1.

Figure 1
For the value displayed in Figure 1 in the PBX parameters shown in Figure 2, the following format should be selected: yyyyMMdd HH:mm:ss

Figure 2
Or, if you already have Observer running and it is receiving these files, select Current Data File (CDR/SMDR) from the Observer menu. The Service Log page will be displayed, where you can see the date and time format.
In the Tariscope system, both Tariscope Enterprise and Tariscope Provider, Observer modules are used to collect CDR (SMDR). To create a new Observer, select Data Collection/Observer -> Observer management in the Tariscope system menu. The Data Collection/Observer page will appear, where you can click the Add icon on the toolbar and select New Observer. The New Observer window will appear, where you need to enter its name, for example, Alcatel-Lucent OXE. In the window confirming the creation of the Observer, click the Settings button. As a result, the Tariscope Observer configuration page will appear, an example of which is shown in Figure 3.

Figure 3
Creating a new Observer assumes that the user has already created and configured the PBX settings.
To select the created PBX in the Observer settings, click the "here" link and select the name of the created PBX. In the Data source list, select the FTP client value, and click the Data source configuration button to the right of the list. The Data source configuration window will be displayed, an example of which is shown in Figure 4.

Figure 4
A feature of the FTP client settings for processing CDR files from Alcatel-Lucent OXE is the setting of the Unpack 7-zip switch. This means that the received files will be unpacked using the 7-zip archive. All other FTP client settings for receiving files from Alcatel-Lucent OXE are no different from those described in the document “Tariscope 4.6. Administrator Guide”.
Automatic generation of reports only for a specified group of subscribers in Tariscope
One of the modules of the Tariscope billing system, both Tariscope Enterprise and Tariscope Provider, is the Tariscope Tasks. Its main purpose is to automate actions related to most of the tasks faced by the Tariscope system user.
One of the main such tasks is the automatic generation of reports on schedule. If such reports are to be generated for individual subscribers, the question arises of how to specify them when creating a Scheduler task. This is the question we will consider in this article.
To create a new task for Tariscope Tasks, select Tariscope Tasks → Task List from the menu. The Task List page will open, an example of which is shown in Figure 1.

Figure 1
Click on the Add icon on the toolbar. The New task page will open (Figure 2).

Figure 2
We will not describe all the features of setting up a task to generate a report. You can see this in the article. The only thing to note is that in the Action type list, the Report item must be selected, and in the Report name box, the report that needs to be generated.
The Source list is used to determine which subscribers should generate this report. It has three values:
- SQL queries.
- Subscriber.
- Group.
Any of these items allow you to select a list of subscriber’s IDs for which you want to create a report.
If you want to create a report for individual groups of subscribers that are in the Tariscope system, then select the Group item (Figure 3).

Figure 3
Click on the “…” button to the right of the Select subscribers group item. The Group window appears, an example of which is shown in Figure 4.

Figure 4
Select the subscriber groups for which the report should be created and click Select. The identifiers of the selected groups will be displayed in the Select subscriber group box.
Other task settings are performed as in general for setting up a task for generating a report.
In the case when you want to generate reports for subscribers based on some other criteria than their belonging to a group, then select the value Subscriber in the Source list. Click on the “…” button to the right of the Select subscriber group item. The Subscribers window appears, an example of which is shown in Figure 5.

Figure 5
Select the required subscribers and click the Select button. In this case, the identifiers of the selected subscribers will be displayed in the Select subscriber group box.
Other task settings are performed as in general for setting up a task for generating a report.
In the case when you need to generate reports for some subscribers you have selected or subscribers who have some identical parameter, then in the Source list, select the SQL queries value. This choice requires the user to know SQL and the structure of the Tariscope database but allows you to flexibly select any subscribers by any of their parameters.
[The Tariscope database catalog, which contains a description of the database tables, can be provided to an official Tariscope user upon his request to the SoftPI support service.]
Click on the Select subscriber group button, which is located to the right of the item with the same name. The Edit Subscriber Group window appears, an example of which is shown in Figure 6.

Figure 6
This window displays an SQL query that selects the ID and Email fields of those subscribers who are currently active from the stored procedure dbo.ab_mc_abonents (this is done using the condition:
GETDATE() BETWEEN ConnectDate AND DisconnectDate, where
GETDATE() is a function that gets the current date,
ConnectDate is the date from which the subscriber becomes active,
DisconnectDate is the date until which the subscriber is considered active.
For the above query, you can use the Subscribers table instead of the dbo.ab_mc_subscribers stored procedure.
The query selects two fields: ID and Email. ID (subscriber identifier) is a required field because it is passed to the report via the AbonentID report parameter, ensuring that the report is created specifically for this subscriber.
If reports do not need to be sent to subscribers by email, but will only be stored in a folder, then you can omit the Email field in the request.
Suppose, you want to generate reports using the Tariscope Tasks for subscribers with IDs: 6229, 6225, 6233. In this case, replace the SQL query in the window (Figure 6) with the following:
SELECT ID, EMail FROM Abonents WHERE ID IN (6229, 6225, 6233)
The selection of subscribers with specific identifiers (ID) is performed based on the following condition:
ID IN (6229, 6225, 6233)
Now let's assume that you want to generate reports for all subscribers who have an active tariff plan with identifier (ID) = 43. To do this, you need to write an SQL query, one of the options of which is given below:
SELECT ID, EMail FROM ab_mc_abonents AS Ab
WHERE AbonentPlaneID = 43
Other SQL reports are also possible when you need to select subscribers by other parameters.
If you need to create an SQL query to generate reports for some specific subscribers, but you do not know how to write an SQL query, contact the SoftPI technical support service.
Automation of work Tariscope
Tariscope is a call accounting system (Tariscope Enterprise) or a billing system for telecommunications operators (Tariscope Provider). If there is no need to specify the Tariscope edition in the future, we will use the name either Tariscope or the Tariscope system.
Each Tariscope user has their own set of operations that they most often perform in the system. If it is not a search for some calls, which is performed each time according to specific parameters and which cannot be automated, then the Tariscope Tasks allows you to automatically perform the most common operations on a schedule. Here is a list of tasks that the Tariscope Scheduler can perform:
- Generating reports.
- Creating database backups.
- Archiving call information.
- Updating currency rates.
- Synchronizing subscriber parameters with the company's Active Directory.
- Charging periodic services.
- Sending some information to subscribers.
- Launching applications.
- Performing a group of tasks.
Reports
The most common action in the Tariscope system is generating some reports. If such reports need to be generated periodically, it is more correct to create a corresponding task for the Tariscope Tasks, which will automatically execute this task according to the schedule. When creating a task for generating reports, you can specify the date and time of the first execution of the task, as well as the period after which it will be repeated. The following periods are possible for the execution of any tasks by the Tariscope Tasks, including those for generating reports:
- One-time. The task will be executed only once. If you need to do this task again, you must either change the date of its first execution or set a different period.
- Every minute. The task will be executed every minute.
- Every hour. The task will be executed every hour.
- Daily. The task will be executed once a day.
- Weekly. The task will be executed once a week.
- Monthly. The task will be executed once a month.
- Yearly. The task will be executed once a year.
- At service start. The task will be executed once when the Tariscope Tasks service starts. The Tariscope Tasks service starts automatically when the Tariscope server starts in the Tariscope Start application (when running on Windows) or can be started manually (when running on Windows or Linux).
In the case when it is necessary for the task to be executed, for example, not every hour, but after 4 hours, then this period of 4 hours is set in the Every textbox. The default value is 1.
In the case when the task of generating a report should be performed not for one, but for every subscriber of a certain group, then you can specify such a group of subscribers. Details on how to do this are described in the article "Automatic generation of reports only for a specified group of subscribers in Tariscope".
If the reports that the Tariscope Tasks should generate are related to call information, then to limit the calls that should be processed, you can select the appropriate filter in the Filter list. If this list does not contain the required filter, you can create it in the call view.
The task for generating reports allows you to select the folder where the reports will be stored, set the report file name template, specify whether this report is generated for each subscriber and whether subscribers will have access to their reports through the Tariscope Personal Area.
The generated report(s) can also be received by the Tariscope administrator via e-mail.
Tariscope contains many various report forms. At the same time, it allows users to independently edit existing report forms or create their own.
Creating database backups
Practically all information of the Tariscope system is stored in the database. Failure of the server where Microsoft SQL server is installed, or hacker attack can lead to loss of all information. Therefore, we recommend periodically creating backup copies of the database and storing them on other servers or media. This operation can be performed manually in Tariscope or using Microsoft SQL Server Management Studio.
But in order not to forget to do it on time, it is easier to create a corresponding task in the Tariscope Tasks. It is possible to set the creation of both a full backup and a differential copy.
Call archiving
The Tariscope installation package contains the installation of Microsoft SQL Server Express Edition. This edition has a database size limit of 10 GB. If the database reaches this size, further processing of new call information will be stopped. Instead of the specified edition of SQL Server, the user can use paid editions that do not have such a limit. But even on such editions, with a significant increase in the size of the database, SQL queries may slow down. Therefore, in both cases, using a free edition of SQL Server or a paid one, it makes sense to periodically archive call information for past periods that are not of interest now.
This operation in Tariscope can be activated manually, but it is easier to transfer it to the Tariscope Tasks. As for the task of creating a database backup, we recommend storing the call archive file on a physically different server or media than the SQL server.
Currency exchange rate updates
This task may be relevant only when calls or services are specified in different currencies and there is a need to convert them into the base currency. The task allows you to automatically obtain the exchange rates of the required currencies from a given web site.
Synchronization of subscriber parameters with AD
This task may be relevant only for users of the Tariscope Enterprise edition, if the company has Active Directory (AD). To perform data synchronization, the Tariscope administrator must first create the appropriate AD profile before creating a data synchronization task. And then in the task parameters, select this profile and set the date, time and period for data synchronization.
Charging for periodic services
This task is relevant only for users of the Tariscope Provider edition who charge periodic services to subscribers. Any services in Tariscope can be charged as needed manually, but it is easier to assign this operation to the Tariscope Tasks. The Tariscope Tasks allows you to create separate tasks for charging periodic services for separate groups of subscribers.
Sending messages
This task may be more relevant for telecom operators using Tariscope Provider when it is necessary to simultaneously send a message to a specific group of subscribers. But this task can also be used by Tariscope Enterprise users. In order for this task to work, you need to configure the email sending settings in Tariscope and specify their email addresses in the subscriber settings.
Running an application
Report forms, which are created on the basis of Report Definition Language (RDL), allow you to perform many different actions with data. But sometimes it is easier to perform some actions with separate applications that users have created themselves. As the simplest example of using this task is copying some Tariscope system logs, possibly with prior archiving and subsequent deletion of these logs, so that Tariscope creates a new log. Tariscope allows you to create a corresponding task that will periodically launch the required application.
Group of tasks
Sometimes it is necessary to perform a group of tasks, and the completion of the tasks depends on the result of the previous task.
As an example of this: a telecommunications operator performs charging periodic services, performs a report that calculates VAT for subscribers for the month, and reports are performed on the formation of invoices, receipts, and acts for subscribers.
Different options for task groups are possible:
- Independent chain. Each subsequent task in the group will be launched for execution without analyzing the result of the previous task.
- Dependent chain. Each subsequent task in the group will be launched for execution only if the previous task was successfully completed.
- Independent chain with feedback. Launching tasks in the group is similar to option 1, but if any task is unsuccessful, an attempt will be made to execute it again. The number of task execution attempts is configurable. If all attempts are exhausted, but the task has not been successfully completed, the next task in the list will still be launched for execution.
- Dependent chain with feedback. This group is similar to option 3, but if the execution attempts are exhausted and the task has not been successfully completed, the next task in the list will not be executed. The execution chain stops.
- Run all together. All tasks in the group will be launched simultaneously in different threads, without a queue for their execution.
As we mentioned at the beginning of the article, the Tariscope Tasks implements the tasks that users use most often. At the same time, existing Tariscope users, or those who plan to purchase it, may have wishes for creating new tasks for the Tariscope Tasks. In this case, please send your wishes to the SoftPI support service.
Virtual subscribers
Tariscope that is a call accounting and billing system contains a feature that is named 'virtual subscribers'. What is it and for which purposes it can be used?
"Virtual subscribers" are pseudo-subscribers, which can be assigned to a route (a group of lines) or an IP gateway connecting your telephone system with some communication operator.
Tariscope performs a call rating only if calls were made from or to a subscriber whose data are in the Tariscope database. In the case of transit calls, as a rule, there are no such subscribers and, accordingly, such calls are not rated. But if you still need to rate them, the virtual subscriber will come in handy. The entire cost of calls passing through a route or gateway will be charged on the subscriber and transit calls will also be charged.
Consider a different situation. For example, the PBX has 3 routes, each of which is connected to various telecom provides. And you want to know at any moment: how many calls and what call types passed on a route, how much they cost, what kind of telephone traffic prevails: incoming or outgoing, etc. Answers to such questions can be relevant both for corporate users who use the Tariscope Enterprise edition and for telecom providers who use the Tariscope Provider edition. This information can be obtained, for example, from a report on routes. But again, if transit calls pass through the routes, then these calls will not be rated without virtual subscribers, and the report will contain data that will not include the cost of transit calls. The use of virtual subscribers is the most correct way to solve such a task.
The feature of "virtual subscribers" can be especially actual for transit telecom operators or telecommunication operators offering services of a virtual PBX. Because Tariscope allows users to simultaneously calculate the cost of calls at two different rates, you can immediately get the cost of calls that subscribers must pay and the cost at which it is necessary to carry out mutual settlements with another telecom operator.
When creating a virtual subscriber, please note that its use corresponds to 100 subscribers of a Tariscope Enterprise license or 100 phone numbers of a Tariscope Provider license.
Creating Virtual Subscribers
To create a virtual subscriber, in the Tariscope program, go to the Subscribers configuration page. On the toolbar, click on the New subscriber icon. The New subscriber window appears where you should specify a subscriber name which allows you to understand who is this subscriber. For example: Route to the AAA provider.
Make other settings: set a rate plan, the rates of which will be applied to this subscriber, and if necessary, specify the date that this subscriber is considered as. It does not matter what type of subscriber will be assigned to him. You do not need to specify phone numbers and other parameters that are necessary for a real subscriber.
To specify that this subscriber is a virtual one, select the Details tab and turn on the Virtual subscriber switch as shown in Figure 1.

Figure 1
Save these data.
Go to the Routes and gateways configuration page for PBX. If you already have previously set route / gateway data, select the desired route / gateway from the list of routes / gateways and click on the Transit call tariffication icon on the toolbar. The Transit call tariffication window appears, the example of which is shown in Figure 2.
Figure 2
In the Virtual subscriber list, select the virtual subscriber who was created on the previous step.
Click Save.
This completes the entire configuration for the virtual subscriber. All new calls on the route (gateway) will be charged to this subscriber. If necessary, you can re-rate the already available calls data so that the cost of calls will be also charged to the virtual subscriber.
If you are using the Tariscope Provider edition, then find the created virtual subscriber in the accounts and select the month. The call charges for this month will be displayed. If you need to estimate the costs for a route/gateway for a period shorter than a month, then in the call view, filter the data for the required period for this virtual subscriber and group the data for this subscriber. It is also possible to generate a report by routes.

