/
1.6.2 Tariffs

1.6.2 Tariffs


Tariff, also referred to as a rate plan, is used to calculate the cost/price of the event. The event can be an SMS or a call. The cost of the event is determined by the combination of the matching rate, based on the dialed number, and a special properties – rating time discounts.  Those parameters are grouped in a tariff.

There is no limits in the system as per number of tariffs. A tariff can be assigned to each type of client account as well as to resellers and destination gateways (cost tariff)

Tariffs section is under the Billing menu.

The usage charges are based on the destination number of a call or an SMS. The number can be in fact any string sent in the SIP TO header from a client to voipswitch. Next, the number is modified by the rules from the Tariff matching. Only after that, the modified number is rated according to the tariff.

Tariff matching is defined per account and was described in the Client accounts chapter.

Creating new tariff

To add a new tariff  press the Add button located in left up corner. Already in the dialogue you will be asked to set some of the properties.


If the tariff should belong to a reseller activate the switch  located infront of a Reseller level field  then select the reseller’s level and the reseller’s identifier.

To edit a tariff click on its row in the table. In the edit view there are couple of tabs: general,  call rates, sms rates, dnis mapping, ani mapping.

A newly created tariff will have an empty rates. You can add them manually or import from a file which is much more convenient way. 

Settings

Each tariff has its own set of properties. They are available in the General tab in the tariff edit panel.

 

Tariff name

A tariff identifier which must be unique in the system. Tariffs created by resellers have the reseller identifier automatically added to the name as a prefix, e.g. If the reseller identifier is Roy and the tariff name is Standard, then the tariff name in the system with the prefix would be Roy:Standard

Minimal time

Defines the minimal duration of a call (in seconds) that is charged as one block. Even if the call is connected for a shorter time it will be charged for the time set as the Minimal duration. Resolution steps required to cover minimal duration will be used to calculate the cost. If the resolution is 6 and the minimum time is 40 then the minimum time will be 7 billing steps as 7*6=42 seconds.

If the minimal duration is set to 0 (default value) the minimal cost will be determined by the billing step (resolution). Using minimal duration is required only if it should be different from the resolution.

Resolution (billing step)

Rates defined in the tariff are per one minute. Resolution allows for fractional charging, i.e. for time units different than one minute. Usually it will be one second but can be any number of seconds.

Example:

Rate per minute is 0,20 USD

Resolution is 1 sec

Minimal duration is 0 sec

 Call duration 12 seconds.

The cost of the call will be calculated as:  cost of one billing step * duration= 0,20/60*12=0,0033*12=0,04  USD

If we set the resolution to 60 seconds it would be per minute billing and the cost would be 0,20 USD even if the caller used only a fraction of minute.

Per second billing allows for very accurate charging for the time used by the caller.

Surcharge time and Surcharge amount

This value defines the initial duration of a call (in seconds) which will be charged with a Surcharge amount. The remainder of the call will be charged using Minimal duration and Resolution.

When the surcharge amount is set to 0 then the duration defined in Surcharge time will be free of charge.

The opposite is if you want to charge extra fee for the first 30 seconds and then charge normally. For example the surcharge time is set to 30 seconds and the duration of a call was 60 seconds.  The surcharge amount is 1 USD, it will be added to the total cost of a call. The remaining 30 seconds will be calculated using Minimal duration and Resolution.

Another case is if you want to charge extra connection fee regardless the call duration. If the Surcharge time is set to 0 then the system will charge the fee defined in the Surcharge amount for every connected call.

After the Surcharge time the billing starts as if it was the beginning of the call. For example, if the Surcharge time field is 10 seconds and Surcharge amount is 0.1 then the first 10 seconds of each call will be charged 0.1 and only after then will the normal billing start.

Tariff multiplier

In some situations you may want the clients to see in the dialer or portal different rates than those at which they are actually charged. The Tariff multiplier is a value by which the charging function will multiply the rate when calculating the cost of call.  

Examples: if it is set to 1.1, every rate will be 10% higher than the client can see on the portal; the value 0.8 will decrease every rate by 20%.

This feature is also used in Calling cards services, the IVR announces the cost of the call based on rates whereas the charging function takes the rate multiplied by the tariff multiplier’s value.

Rate addition

Works in a similar way to Tariff multiplier but instead of multiplying, it adds a defined value to a rate per minute.

Time span

When this option is enabled you can set different rates for different days or hours. The time spans can be defined per each prefix in the Rates tab. This option only mark the tariff as supporting time spans. After enabling you have to save the change, only then the time span related fields will appear in rate edit view.

Currency

Defines the tariff rates currency. See details in the Currency section.

Rates 

Rates tab is a list of prefixes and their corresponding parameters including cost per minute and other properties.

The prefixes allow the charging function to match the dialed number with appropriate entry. The match is when the dialed number contains the prefix. If there are many matches the charging is based on the best match, which is with the longest prefix.

Example:

Prefix 4 : rate 0,40 USD

Prefix 44: rate 0,20 USD

Dialed number 44208445566

The best match is for prefix 44 which is for UK as the dialed number is in UK too. Prefix 4 is more general and even though it is a match the system will not use it.

This way you can create a very detailed list of breakouts, with different rates for different networks, services or areas within the same country.

When many variations of a prefix have the same rate you should consider replacing them with one, more general prefix. Tariffs including fewer prefixes are easier to manage. In some situations however you may want to keep detailed breakouts for reporting purposes.

When adding a new prefix, you need to utilize either the SMS Rates tab or the Calls Rates tab. Additionally, when searching for rates, select either the Calls or SMS rates tab and click on 'Show Filters' to display the input field

For each prefix you can define a set of properties, some of the parameters are used for cost calculation.  They will differ for SMS and call type of event.

Call rates properties

 

Description

Description of the entry, usually related to the area or network represented by the prefix, e.g. UK Orange mobile.

Country

Country to which the prefix belongs. It is used for grouping the prefixes per country. For example in the portal, when a client wants to check rates for United Kingdom he just has to choose the country name and the list of all different prefixes which belong to this country will be shown. If you do not want some of the rates to be shown do not assign the country to it.

Voice rate

A rate for one minute of call or cost of one SMS, the cost in the currency defined for the whole tariff.

Rate multiplier

The Rate multiplier is the same as Tariff multiplier but defined only for a certain prefix.

Rate addition

Works in a similar way to Tariff multiplier but instead of multiplying, it adds a defined value to a rate per minute.

Grace period

Allows to set a threshold, defined in seconds, which renders the call chargeable only when crossed. If the call’s duration is shorter than that it will not be billed at all, its cost will be 0. If the call duration is longer than the grace period the call will be charged for the whole duration, from the moment the call started.

Example

Grace period set to 10 seconds

Call duration 6 seconds – the call is not charged.

Call duration 11 seconds – the call is charged normally for the whole duration i.e. 11 seconds.

Minimal duration, Resolution, Surcharge time and amount

These parameters have the same meaning as those described earlier, which were defined for the whole tariff. The global tariff settings apply for all rates. If you want to exclude some specific prefixes only you can set the different settings for them. The per prefix settings override any global tariff settings.

Time span

Values set in this section define on which days of a week (From day, To day) and between what hours (From hour, To hour) the prefix with specified properties is active and should be used.
Below is an example of how to set different off-peak and on-peak rates. 

Example

You want to offer cheaper calling on weekends and from Monday to Friday during the off-peak hours - between 8:00PM and 10:00AM - and more expensive from Monday to Friday during the peak hours - between 10:00AM and 8:00PM. To accomplish this task you have to create five separate entries for the same prefix. Four of them will cover the off-peak hours and one will cover the peak hours.

Time intervals which cover midnight e.g.: 22:00 (10 PM) - 06:00 (6 AM) must be set as two separate entries in the tariff: first 22:00 - 24:00 and second 00:00 - 06:00.

Bundle

If you assign a bundle to a particular prefix it will make the charging function first to check if the client account has the bundle’s balance. If yes, the cost of the call will be calculated according to the bundles properties and rates. For details check the chapter dedicated to Plans


SMS rate properties

SMS is charged per its occurrence, there is no duration and therefore there is fewer parameters that influence the calculated cost. They include Multiplier and Addition which works same as for the call rate.

 

Assigning countries

Both in VUP and the dialers a user can look for rates per country by choosing the country from the drop down list. Information about the selected country is sent to the voipswitch platform which responds with the prefixes, rates and descriptions for those records from the client’s tariff that have the chosen country assigned.

Country is an optional field and is used only to allow grouping prefixes which we want to present to clients for a particular country. Usually when you define a tariff the list of prefixes is huge, often several thousand entries. Some of the rates might be equal for different prefixes but still you cannot group them into one record because you may need to keep all those breakouts for reporting purposes.

If you want to show clients only selected prefixes, which differ in rates, assign them the country. The ones without country will not be shown but of course they will still be used by the billing system.

You can assign countries using bulk operation by first selecting prefixes by ticking their checkboxes and then click on More button and choose Assign countries from menu.

Importing rates from file

Import function is next to the Add button in the Calls/SMS Rates tab.  Next drag and drop the csv file that contains the rate list using your right mouse button or press on the field to upload the rates .  You can also tick the Convert currency option, it will convert voice rates from the file being imported to one of the currencies defined in the system. The rates will be calculated using the ratio assigned to the chosen currency.

 


VSM enables importing tariff rates from a CSV file. The CSV file format requires the header with column names and a certain column order, separated with semicolons or commas. Prefixes with rates and other parameters should be placed under the header. An example file can be downloaded from the upload veiw by clicking the download icon located in down right corner.

CSV file header

prefix;description;voice_rate;from_day;to_day;from_hour;to_hour;grace_period;minimal_time;resolution;rate_multiplier;rate_addition;surcharge_time;surcharge_amount;free_seconds;country_code

Below is an example SMS rates export csv file:

 

SMS Rates CSV file header

prefix,description,voice_rate,from_day,to_day,from_hour,to_hour,rate_multiplier,rate_addition,country_code
1,USA - BenNet,0.0000,0,6,0,2400,-1,-1,US
44,UK - BenNet,0.2000,0,6,0,2400,-1,-1,UK


The import process can take a while depending on the number of rows in the file.

If there are rows with missing values for some columns, the user will be warned. Even if there are incorrect entries, the correct rows will be imported.

Existing prefixes are not replaced if there is the same prefix in the import file. If you want to replace the records from the tariff with the new ones from the file you should first remove the existing entries. To do so check the rows which should be removed (or tick the first checkbox which selects all rows) and then go to More and click Delete.

Exporting rates

In the Call or SMS Rates tab, there is the Export function on the right. It lets you download the rates from the system to a csv file. The file format is exactly the same as for importing rates into the system.

Exporting rates is often helpful if you want to apply several changes in the list. The easiest way is to download them to a file, open in excel or any other editor, work locally and then replace the rates on the server through the import procedure.

Copying a tariff

If you want to create a new tariff based on an existing one you should use the Copy function which is under the New menu in the main Tariffs section (above the list of tariffs).

 


A dialogue will appear where you have to enter the name for the new tariff and choose its currency. Note: if the currency is different than the source one the system will not convert rates. It will only replace the currency, the nominal amounts will remain the same.

To convert between currencies you will need to do it using Change rate by percent option and increase or decrease the base rate according to their exchange ratio.



The options in the drop down list allow you to modify all the rates being copied (base rates), the modified rates are saved into the newly created tariff.

Change rate by percentage – changes the base rates by a percentage value. For example if you want to create a new tariff which will differ only in a margin, with all the rates higher of 10%.  Or just the opposite, if you want a tariff with rates lower by 10% just enter there negative – 10%.

Change rate by value- adds a fixed value to each rate. For example if you want to increase each rate by 0,01 USD just put 0,01 in the input field corresponding to this option.

Set new rate – replaces all base rates with the same fixed value

Do not change – just copies the rates


There are separate modification options for sms and calling rates.

Define future changes

This function’s purpose is to override the existing tariff with a new one at a given moment in future. For example when you work on a new rates and want to make them effective from the beginning of the week. The Event Manager process is responsible for switching the tariffs at the programmed moment.

To enable this feature first choose a tariff by ticking the checkbox in the leftmost column. Next click on the More button and choose Define future changes.


 

In the new dialog window set the date and time when the existing tariff should be replaced.

Below are two options:

  • disabled "copy data from tariff" the new future tariff will be created without any rates, we will have to enter or import the rates before the tariff can be used
  • enabled "copy data from tariff" the new future tariff will be created with the rates copied from the original tariff i.e. the one which will be overrode

The new tariff is visible in the tariff menu when switching the type under the filter from Current data to Future changes.



In the future tariff you can edit all the settings as for the regular tariff. In addition you can change the date and time when the change will take effect.


To activate the future changes in VSM4 go under the Settings→Event manager:

Tariff to Dialed number

Tariff to DNIS feature allows to use a different tariff depending on the dialed number. It is used only in two stage dialing scenarios when a client first connects to the access number and then dials the destination number through the IVR. Depending on which access number was used to dial in to the IVR the system will choose appropriate tariff.

Example:

This is the case when you as a Calling cards provider have a toll free number and a regular geographical access number. For clients it will be cheaper to use the toll free number, otherwise they have to pay a fee to their local carrier for the PSTN connection with the access number. For you as a provider it is just the opposite as you have to pay a fee for receiving calls on the toll free number. Therefore it makes sense to charge slightly more those clients that use the toll free number in order to offset your extra costs. The solution is to add the access number or a prefix in a case if you want to cover a range of numbers and select a tariff. The system will first check the dialed number and look for a matching entry in the Tariff to DNIS table, if there is a match it will use the associated tariff to charge for further calls, i.e. calls made after dialing in to the IVR.

The mechanism of the calling cards service is described in a dedicated chapter. With regards to this feature we need to know that the call to the IVR is made as a wholesale type of client and only after IVR based authentication (PIN or PINless) the retail user is identified.

The retail client has a default tariff assigned in his account. That tariff is used for all kind services, for example when making calls from a softphone or calling through other access number. When he uses the particular access number, in this example starting with prefix 0700, the system will take TestTariff and will use it for charging for all calls made by this client as long as he is connected through the 0700xxx access number.

A single Tariff to DNIS rule comprises the prefix, name of the tariff and the type of entity for whom the rule is applicable (clients, resellers).

This feature is configurable per client account. If you want to enable for a particular client click on the menu button next to the tariff drop down list in the client edit view and in the dialogue select the based on dialed access number option.


The entries in the Tariff to DNIS can be added also by Resellers.


Two entries with the same prefix and same who can use type cannot be added. Same prefixes are allowed only if they differ in type, i.e. one entry is for the client type and the other for resellers only.

Tariff to ANI

Similarly as the Tariff to DNIS this option is used mainly while providing the calling cards service. Tariffs to AN'I enables changing the tariff depending on client’s ANI (Caller ID).

Clients call from the telephone network (PSTN) to the IVR through an access number. The client is then authenticated by PIN or ANI. Once identified, the client can start making calls. Normally the account tariff will be used for calculating the costs. In some cases however you as a provider may want to charge more or less depending on the origin network of the client’s phone number. For example clients that call from mobile network numbers may have to pay a bit more than the clients that call from landline numbers.

This feature is configurable per client account. If you want to enable for a particular client click on the menu button next to the tariff drop down list in the client edit view and in the dialogue select the Tariff based on caller ID option.


NPA

The NPA numbers table enables changing the tariff assigned to a client according to two parameters – the dialed number and Caller ID. This feature is useful in the USA, where it is often necessary to use different tariffs depending on the destination state and the origination state. This function requires a special table that links places with codes.

The NPA numbers configuration is available under Billing\Tariffs\

 A list of NPA numbers along with locations has to be imported from a CSV file.

The first line of the file has to contain header information:

CSV file format

npa_number;location

A CSV file example can be downloaded from the following link: NPA.csv.

This feature is configurable per client account. If you want to enable for a particular client click on the menu button next to the tariff drop down list in the client edit view and in the dialogue select the Intrastate or interstate tariffs option.


The procedure of deciding whether the call is intrastate or interstate, which determines the tariff to be used, is as follows:

  • Client makes a call to a US domestic phone number
  • Billing function checks if there is a location with prefix matching the dialed number
  • If the location is found, the system checks if the CLI has a match with a location. If it has and the location is the same as for the dialed number then the call is treated as intrastate and appropriate tariff is used
  • If there is no common match the Interstate Tariff is used.

Related content