Features of the Tariscope configuration to collect CDR from 3CX
Tariscope (SoftPI) allows you to collect, process and analyze the call information from different telephone systems including 3CX (3CX Phone System) of different versions. Tariscope provides a huge number of benefits to work with 3CX. You can see a list of the benefits on the page.
On the whole, the Tariscope configuration for 3CX is the same as for other PBXs and you can find out this in “Tariscope 4.6. Administration guide”.
We only consider the features of the configuration that are peculiar to 3CX.
Choice of 3CX in Tariscope. Configuration of main parameters
A choice of PBX type, from which Tariscope will collect and process CDR data, can be executed both a stage of the initial configuration and stage of the specific configuration.
If you perform the Tariscope initial configuration, you should choose the 3CX Phone System item in the Equipment list on the Step 3.
If you want to configure Tariscope independently, follow the steps in the article. Then, follow the steps in the article.
Connection to 3CX
The Tariscope Observer service is used to collect CDR data in the Tariscope system. You should create a new profile to collect data from 3CX. On the Tariscope Observer configuration page, in the list, click on the here link and select the 3CX item.
3CX can use three way to pass CDR in a billing system:
- A file in a folder. The file can contain all calls or it can be generated for each call.
- 3CX CDR service works as a TCP server.
- 3CX CDR service works as a TCP client.
For first option, Tariscope Observer select the Folder and file item in the Data source list. Then, follow the steps of the article.
For second option, Tariscope Observer select the TCP client item in the Data source list. Then, follow the steps of the article.
For third option, Tariscope Observer select the TCP server item in the Data source list. Then, follow the steps of the article.
Online monitoring of calls
Tariscope allows you to monitor calls in the real time. For this, you should have a Tariscope license with the restriction feature, select the Monitor active calls check box during the configuration, and execute the configuration as mentioned above.
Tariscope Observer has the Active calls page that allows you to monitor calls in the real time. An example of the Active calls page is shown in Figure 1.
Figure 1
The page displays calls that are executed at the current time or that have been completed less than one minute ago. Each call is presented in two lines for Outgoing and Incoming call legs in the table.
The table contains the following fields:
- Call ID. Displays a call identifier.
- ID. Displays an identifier of the call leg.
- Start time. Display date and time of call in the call leg.
- Direction. Displays a direction of the call leg. There are two types of directions: Outgoing and Incoming. An Outgoing direction is applied for each call leg, where the NumberA field shows the telephone number of the caller. An Incoming direction is applied for each call leg, where the NumberA field shows the telephone number of the called subscriber.
- Status. Displays a status of the call leg.
- NumberА. For internal calls, this field displays the phone number of calling subscriber for the Outgoing call leg and the phone number of called subscriber for the Incoming call leg. For external outgoing calls, this field shows the extension number of calling subscriber for the Outgoing call leg and the number of gateway in the Incoming call leg.
- NumberB. For internal calls, this field displays the phone number of called subscriber for the Outgoing call leg and the phone number of calling subscriber for the Incoming leg. For external outgoing calls, this field displays the dialed number for both call legs.
- Connect time. Displays the date and time of the connection of the call leg.
- Disconnect time. Displays the date and time of the disconnection of the call leg.
- Duration. Displays the current duration of the call in the call leg.
- Cost. Displays the current cost of the call.
- Subscriber. Displays a subscriber name from the Tariscope database.
- To place. Displays a city name, mobile operator or owner of a specific telephone number when the outgoing call is executed.
- Duration left. If a limit is set for the subscriber balance, this field displays how long the current call can be lasted.
A Tariscope user can customize the list of desired fields. To do this, right-click on the title of the table of Active calls. Menu appears as shown in Figure 2.
Figure 2
Select the desired fields.
Data of the Active calls table can be sorted by any field. This can be Duration, Cost, or To place. If necessary, the data in the table can be grouped on any field.
To quickly understand a call status, a specific font color is used:
- blue color is used when a call is in dialing status,
- green color is used when a call has been answered,
- gray color is used when a call was finished.
For a call, which has less than 10 seconds before the automatic disconnection will be executed, when a subscriber’s balance will reach the limit value, a red background is used. Remind that the automatic disconnection is possible, if the Tariscope license had been purchased with the restriction feature and you made the appropriate configuration of the software.
Tariscope configuration to use the restriction feature
The restriction feature allows the Tariscope administrator to set the restriction to the specific type of calls for a subscriber, group of subscribers, route or gateway. Any restriction can be set in the money or time duration. The restriction is set to the month, week or day. The specified type of calls is defined by a call category. See more information about the restriction feature on the page.
To configure Tariscope with restriction feature you should perform the following steps:
- Activate the restriction feature.
- Create categories that correspond to the specific call types, for which restrictions will be set.
- Specify the call categories for phone codes.
- Create restriction classes.
- Specify limits for subscribers.
- Specify a period of restriction action.
Restriction feature implementation
In the configuration tree of the Tariscope program, select the All nodes branch. The Tariscope program will be as shown in Figure 3.
Figure 3
In the Control expenses (limiting) list, select any value other than No control that corresponds to parameters of the license. To save changes, click on the Save icon on the toolbar.
Creation of categories
The categories are used to select a specific call types which you want to restrict. The categories are tied to particular telephone codes.
How to create a new category see in the article.
Assigning categories to telephone codes
To assign a category to a specific phone code, move to the Providers and rates configuration page → a specific provider → Outgoing or Incoming → Destination codes or Destinations table. Select the codes that should belong to a category. Using the feature of multiple replacement, set a desired category. Repeat these actions for other telephone codes for which you need to set another category of calls.
Creation of restriction classes
In the configuration tree of Tariscope, select All nodes → a desired node → Equipment items → a desired telephone system → Restriction classes. The Tariscope program will be as shown in Figure 4.
Figure 4
The following concepts are used for this configuration page.
Class of service (COS). This is an identifier that is used by a telephone system to determine rights to execute calls in different areas or countries. COS is passed to the restriction script, which uses it in the process of execution. The format and value of COS are depended on the type of PBX. COS is not used for 3CX Phone System. Don’t specify the parameter.
Call category. This is a parameter that is assigned to each call by Tariscope in accordance with the direction of the call. One of purposes of the categories is to define a type of telephone traffic, which should be considered to set the restrictions. A list of categories can be obtained from the Categories configuration page.
Restriction group. This is a set of rules, according to which a class of service is selected. A list of the restriction groups is common to all PBXs of a communication node. But the elements of the group and their corresponding classes of service are tied to a particular PBX. You must create at least two elements of the restriction group. For example, one element includes the class of service that permits phone calls, and another element that prohibits such calls. Groups of restrictions are tied to the subscribers.
The Restriction classes configuration page allows you to configure COS for each combination of available categories of calls. In the simplest case, each group of classes contains two elements: "everything is enabled" with a selection of All categories and "everything is disabled" when no categories were selected. If you want to restrict the various categories of calls individually, you need to create the elements of restriction group with all possible combinations of categories and corresponding COS. Tariscope automatically selects an element that is suitable for the current status of the subscriber restrictions, and pass it to the script.
You can assign any name for each group and element.
Setting of a limit for subscribers
In the configuration tree, select your telecommunications node → Subscribers. Select a desired subscriber for which you wish to set restrictions and click on the Edit icon on the toolbar. On the toolbar of the appeared window, click on the Details button. The window appears as shown in Figure 5.
Figure 5
Click on the Add button. The Category credit window appears as shown in Figure 6.
Figure 6
In the Category list, select a category for which you will set the restriction.
In the Restrict type list, select a desired restriction type: Money or time (Seconds).
In the Restriction class list, select a required class.
In the Credit box, specify a value of credit (limit) in time or money depending on the previous selection. In case of money, the credit is set in the main currency that was set in Tariscope. The time period is set in the seconds.
Click OK.
If you need to set restrictions for other call categories, repeat the above steps for these categories.
Repeat the above steps for other subscribers for which you need to set restrictions.
The action period of the restriction feature
The action period of the restriction feature is specified when configuring the Tariscope Observer service. In the configuration tree, select the Data collection/Observer branch → a service that collects CDR data from 3CX Phone System → Configuration. The window will be as shown in Figure 7.
Figure 7
Click on the Scripts button and in the Tariscope Observer scripts window, select the Subscriber COS change item (Figure 8).
Figure 8
In the Unrestricted interval list, select a desired interval. It is a period when a restriction can be set. This interval will apply after the first date of clearing restrictions.
The list contains the following options:
- every day,
- every week,
- every month,
- every year.
In the Next auto unrestricted date box, set the date when the next reset of the restrictions will be executed automatically. Click OK. Then, to save parameters of the Observer service, click on the Save icon on the toolbar (Figure 7).
Detailed description of some Tariscope features
Automatically addition of subscribers’ data from 3CX database
This feature allows to automatically create subscribers in the Tariscope database. At the beginning of a call, Tariscope checks the extension, from which call is made, in the Tariscope database. If the extension is absent, Tariscope downloads parameters of the subscriber from 3CX Phone System.
This feature greatly simplifies an administration by allowing the PBX administrator to automatically enter subscribers' data.
This feature cannot be used simultaneously with the feature of Drop calls from unknown extensions.
To implement this feature, in the 3CX parser configuration window (Figure 3.12.1.1), select the Monitor active calls check box and the Automatically create subscribers from 3CX database check box.
Synchronization of subscribers' data
The feature provides an automatic synchronization of subscribers' data of Tariscope database with appropriate data of 3CX Phone System. Tariscope synchronizes the following data: a subscriber name, extension, and Email address. At the beginning of each call, Tariscope verifies the parameters of the subscriber making the call with appropriate data of 3CX Phone System. If these data are somewhat different, Tariscope synchronizes its database with data of 3CX Phone System. The feature allows the administrator to change subscriber's data only in 3CX Phone System.
You can use the feature together with the feature of Automatically create subscribers from 3CX database.
To implement this feature in the 3CX parser configuration window (Figure 3.12.1.1), select the Monitor active calls check box and the Automatically synchronize a subscriber name, extension and email from 3CX database check box.
Disconnection of calls based on the account state
This feature can be used in the Tariscope Provider edition only. The feature works as follows. At the beginning of a call, Tariscope calculates a call duration when the account state will reach the specified value, for example, 0. As soon as this moment comes, Tariscope disconnects the call. All new attempts to execute calls that are rated will be dropped. But the subscriber can make calls to destinations that are not rated, for example, internal calls. After the subscriber replenishes the account state and this information appears in Tariscope database, Tariscope allows the subscriber to make calls.
To implement this feature:
- in the 3CX parser configuration window (Figure 3.12.1.1), select the Monitor active calls check box,
- in the main.xml file, set a value of 'true' in tags: <LimitSubscribersByBalance>true</LimitSubscribersByBalance>
- specify a value of customer balance when the feature will be applied in the tags: <BalanceThreshold>0</BalanceThreshold>
Disconnection of calls from unknown extension
The feature allows you to combat fraud. You can prohibit all calls made from extensions that are absent in the Tariscope database. To do this, in the 3CX parser configuration window (Figure 3.12.1.1), select the Monitor active calls check box and the Drop calls from unknown extensions check box.
This feature cannot be used simultaneously with the feature of Automatically addition of subscribers’ data from 3CX database.
Disconnection of long calls
You can set a threshold for call duration. If call duration reaches the threshold, Tariscope executes a disconnection of such call. To implement this feature:
- in the 3CX parser configuration window (Figure 3.12.1.1), select the Monitor active calls check box,
- specify a value of threshold (in seconds) for call duration in the tags: <DropCallDurationThreshold>0</DropCallDurationThreshold>
The value of 0 means that calls do not have a limit on the duration.
Disconnection of expensive calls
You can set a threshold for call cost. If call cost reaches the threshold, Tariscope executes a disconnection of such call. To implement this feature:
- in the 3CX parser configuration window (Figure 3.12.1.1), select the Monitor active calls check box,
- specify a value of threshold for call cost in the tags: <DropCallCostThreshold>0</DropCallCostThreshold>
The value of 0 means that calls do not have a limit on the cost.
Disconnection of calls on pattern
Tariscope allows you to disconnect calls that make to specific telephone numbers.
To implement this feature:
- in the 3CX parser configuration window (Figure 3.12.1.1), select the Monitor active calls check box,
- specify a template for telephone codes that should drop in the tags: <DropCallRulesNumberPattern>*</DropCallRulesNumberPattern>.
The value of '*' means that there are no prohibited telephone numbers.