Document toolboxDocument toolbox

(v1) Call Rates

Call Processing

Call Processing involves using the Import File process to import a raw Calls file from a Vendor or from a switch.

After the Import runs, the Call records will be in the Call Details table. All of the mapped fields and Conditional Logic from the Import process should have filled in most of the Call Detail fields.

Before Rating runs, the default Call Type of all of the Calls will be TBD ('To Be Determined'). However, the Call Type could be set by the Call Processing in the Conditional Logic.

Call Statuses

The following is a listing of the Call Statuses and what they mean:

  • Raw - Call successfully processed from Import File, but has not yet been Rated.
  • Duplicate - Same Call Start Time, Duration, Origination Number, and Destination Number as a previous Call. Duplicates do not appear on the Bill.
  • Error - An error occurred during the Import File processing. This will re-try each night.
  • Unrecoverable Error - An error that cannot be fixed, so it will not try again each night.
  • Rated - Call has been successfully Rated, but has not yet Billed.
  • Rated Unbillable - Successfully Rated, but Rate specified 'Do not bill', so this will not appear on the Bill. This is not an error.
  • Rating Error - An error during Rating. This will re-try each night.
  • Billed - Once Billed, a Call cannot be deleted or re-processed.
  • Billing Error - Indicates an error during Billing.

Call Rating

An example of the Call Rates grid

The PCR-360 Call Rating process does two things to Call records. It determines the Call Type, and it determines the cost of the call. Navigate to the Call Rates grid by clicking Admin > Billing > Call Rates.

On the Call Rates grid, Users can add new Call Rates and edit and delete existing ones.

Determining Call Type

Depending on the Import File Format used, there may be some Conditional Logic which can assign a Call Type based on indicators in the original raw Call record. This Conditional Logic usually determines if the Call is incoming or internal, but it may be used to assign any Call Type. This actually happens during the Import File processing before Rating. The Call Type rules all assume the Call is outgoing. If the Call is incoming, the Conditional Logic must determine this and set the Call Type to Incoming.

If the Call Type is still TBD ('To Be Determined', the initial Call Type value), Rating uses the following rules to determine the Call Type based on the dialed digits:

From the dialed digits, remove the leading dial prefix if present which is defined in a configuration file (usually 9 or blank). As soon as one of these rules assigns a Call Type, the remaining rules are skipped.

  1. If the dialed digits are "911", then set the Call Type to "EMERGENCY".
  2. If the dialed digits are "411" or "511", then set the Call Type to "LOCAL_INFO".
  3. If the dialed digits end with "5551212", then set the Call Type to "LD_INFO".
  4. If the dialed digits start with "011" and if the next two digits are equal to "52", then set the Call Type to "MEXICO",
  5. If dialed digits start with "011" and if next two digits are not equal to "52", then set Call Type to  "INTERNATIONAL".
  6. If length of dialed digits are less than "7" or the dialed digits exist as a Service ID in the Services > Phones table, then set the Call Type to "INTERNAL".
  7. If length of dialed digits are "7", set Call Type to "LOCAL".
  8. If length of dialed digits are greater than or equal to "10" and first digit is not "1", or the length of dialed digits is greater than or equal to "11" and first digit is "1" then;
    1. If first dialed digit is equal to "1", then remove the leading "1".
    2. Next, extract the NPA and NXX from the dialed digits and try using them along with the Service Host to find a matching record in the Call Type table.
      1. If no match is found with NPA and NXX, then try with NPA and a blank NXX.
      2. If no match is found, then try again with a blank Service Host.
      3. If a match is found in the Call Type table, assign that Call Type to the Call. A match is usually found here for local Calls. This table allows the local NPA-NXX values to be defined for each Service Host. It also defines the NPAs for Canadian and Caribbean Calls.
    3. If no match in Call Type table, the Call is Long Distance. If the Origination State and Destination State can be found (from a VH data lookup on the Origination and Destination numbers or from assignment during Call Processing), then if the Origination State is the same as the Destination State, set Call Type to "INTRASTATE", else set the Call Type to "INTERSTATE".
  9. If the Origination LATA or the Destination LATA cannot be determined due to a failed VH lookup, then don't set the Call Type.


If Call Type is still TBD and the Rate Method is "Rate Table", the Call will error "UNABLE_TO_DETERMINE_CALL_TYPE". If the Rate Method is "Pass through from file" or "Flat Rate", the Call Type is not required to Rate the Call, so no error.

The Import File Format will determine the Rate Method. The Rate Method determine where the rate comes from for the Calls. The options are the PCR-360 Rate Tables, a Cost or Rate field in the Import File, or a flat Rate defined in the Import File Format record.

Determining Call Cost

After the Call Type is found, the Rate is applied. If the Rate Method specified in the Import File Format is Flat Rate, that rate is multiplied by the duration to get the total cost. If the Rate Method is 'Pass through cost in file', the cost in the file is used. If the Rate Method is 'Rate Tables', the Rate must be found in the Call Rates table.

If the Call Type is "MEXICO", the dialed NPA is found in the Mexico VHdata table to determine which Mexico Rate Band the call is to.

The lookup into the Call Rate table is based on the following keys: From the Dialed Number: The NPA, NXX, Country Code (for International), Mexico Band (for Mexico). Also the Rating Group, Service Host, and Billing Group. For International calls, the country code must be extracted from the dialed digits. Unfortunately, the length of the country code can be 3, 2, or 1 digits. So we must try the lookup into the Call Rate table up to 3 times, using 3, 2, or 1 digit or until a match is found. If no match is found, then we try the lookup with a blank Country Code. This lets the User create one International default rate record for all countries that don't have an individual Rate.

For Mexico calls, we try the lookup into the Call Rate table with the 1 digit Mexico Band. If a Call Rate record is not found with that Band, do the lookup without the Band value. This is because when the Call Rate records are defined, you can create up to 8 different Mexico rates, one for each band, or you can create one rate for all of Mexico.

For all other Calls, the Rate record might include the dialed NPA-NXX, just the NPA, or neither. So we try the look-up with the NPA-NXX, then the NPA, then neither. For all of the lookups, the first attempts include the Rating Group, Service Host, and the Billing Group. These are read from the Service ID of the Phone making the Call (or receiving the Call for incoming calls). If the lookup fails, then they are tried again with a blank Rating Group, then a blank Billing Group, then again with a blank Service Host. After all this, a Call Rate record should have been found. If it has not, a Rating Error is assigned to the call with a Description of "No rate defined for this call type". If there was no error, the correct rate amounts (based on time of day of the call) in the Call Rate record are multiplied by the duration to get the Call Cost. Further the call duration can be rounded to a specified duration using the CALL_USAGE_RATING_DURATION_PRECISION and CALL_USAGE_RATING_DURATION_ROUND_METHOD configuration options.

Markups

After the Call cost is found, either from the Call Rate, or Pass Through, or Fixed Cost, some markups may be done, in this order:

1. The Markup Percent is applied from the Import File Format.
2. The Markup Amount is added from the Import File Format.

Then, if a Call Rate records was used for the rate,

  1. The Markup Percent is applied from the Call Rate record.
  2. The Markup Amount is added from the Call Rate record.

Rounding

The final adjustment to the Call cost is to round the cost to a whole penny, using the method specified in the CALL_USAGE_RATING_COST_ROUND_METHOD configuration option. The options are to round up, round down, round to nearest with 0.5 rounding up, or round to nearest with 0.5 rounding down.

Adding Call Rates

To add a new Call Rate, click the Add button located on the Grid Toolbar above the Call Rates grid.

An example of the Add New Call Rate form

In the Add New Call Rate form , the User is prompted to define several fields.

If the desired Call Type already exists, click the Look Up Call Type button and select it from the list. Otherwise, a new Call Type may be defined from this window. Select a 'Call Type' from the drop-down menu. The options here are defined in the Call Types as outlined in the Call Types section of this article. Keep in mind that, as was the case in Call Types, selection can cause changes in which fields are available or required. Following the protocol established in the Call Type section, define the remaining required data fields.

Rate Charges

To add a new Rate Charge, press the Add button located on the Grid Toolbar above the 'Rate Charges' Grid.

Add New Rate Charge form example

In the form the User is prompted to define several fields. The 'Initial Charge Increment' and 'Initial Charge Amount' specify the duration and cost for the initial portion of a call. Likewise, the 'Additional' fields specify the duration and cost thereafter.

For example, if a Call should be Billed at $.20 cents for the first minute and $.01 cent for each 6 seconds thereafter, the User would enter '0.20' and '1m' for the 'Initial Charge Increment' and 'Initial Charge Amount', and '0.01' and '6s' for the 'Additional Charge Increment' and 'Additional Charge Amount'.

The 'Start Time' and 'End Time' fields may be entered (in 24-hour format) to specify that this Rate is in effect for only a portion of the day. Once all required fields have been defined, click the Save New button at the bottom of the data entry form. The new Rate Charge will appear on the 'Rate Charges' grid in the Call Rate data entry form.

Editing and Deleting Call Rates

To edit or delete items from the Billing Call Rates Grid, follow the protocol established in the section Call Types in this article.


Help Desk Portal - Email: help@pcr.com - Phone: 616.259.9242