Document toolboxDocument toolbox

.Call Processing and Rating v2018.1

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 Rating

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.   Call Rate records are required for all Calls.  This requirement allows the Bill setting (Bill with call cost, Bill with zero cost or Do not bill) from the Call Rate to be assigned to every Call.  The Bill process will mark any calls flagged with a "Do not bill" rate as 'Rated Unbillable'.

Determining Call Type

Depending on the import 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.

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).

If Dialed Digits == "911", set Call Type to "EMERGENCY".

Else If Dialed Digits == "411" or "511", set Call Type to "LOCAL_INFO".

Else If Dialed Digits end with "5551212", set Call Type to "LD_INFO".

Else If Dialed Digits starts with "011"

If next two digits == "52", set Call Type to "MEXICO", else "INTERNATIONAL".

Else If length of Dialed Digits < 7 or the Dialed Digits exists in the Service table, set Call Type to "INTERNAL".

Else If length of Dialed Digits == 7, set Call Type to "LOCAL".

Else If length of Dialed Digits >= 10 and first digit is not "1", or length of Dialed Digits >= 11 and first digit is "1"

If first Dialed Digit is "1", then remove the leading "1". 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. If no match found with NPA and NXX, try with NPA and blank NXX. If no match is found, try again with a blank Service Host. 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. If no match in Call Type table, the call is probably long distance. If the Origination LATA and Destination LATA can be found (from a VH data lookup on the origination and destination numbers), If the Origination LATA and Destination LATA are the same, set Call Type to "ZONE". Else If the Origination State is then same as the Destination State, set Call Type to "INTRASTATE". Else set Call Type to "INTERSTATE". If the Origination LATA or Destination LATA cannot be determined due to failed VH lookup, then don't set the Call Type.

The Import 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 Format record.

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.

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, we 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 lookup with the NPA-NXX, then the NPA, then neither. For all of these 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 lookups fail, 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,
3. The Markup Percent is applied from the Call Rate record.
4. 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 int 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.

Call Statuses

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

  • Error - An error occurred during the import file processing. This will re-try each night.
  • Duplicate - Same call start time, duration, origination number, and destination number as a previous call. Duplicates do not appear on the bill.
  • Raw - Call successfully processed from import file, but has not yet been rated.
  • 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.
  • Unrecoverable Error - An error that cannot be fixed, so it will not try again each night.
  • Billed - Once billed, a call cannot be deleted or re-processed.
  • Billing Error - Indicates an error during billing.

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