Example Pricing Configuration to Handle Callout Errors

This example shows how you can configure pricing to detect and handle an error in the Mobile Application Part (MAP) callout pricing logic.

What Happens When a MAP Callout Fails

If a MAP callout fails, or times out, then the service logic makes another call to the pricing logic to allow an attempt to handle the problem. When this happens, the service logic enhances the message with information about the failure that the pricing logic uses to identify and deal with the problem.

In this example, the original configuration makes one MAP callout request to determine whether the destination number was ported, and if a callout was made, acts on that information in the enriched message. Errors like the following, reported in the system logs, indicate that the pricing configuration for the MAP callout is wrong:
LM_ERROR 23449|23494 2018-05-05 12:30:45.642136 [charging_server_1:1:1:1(5052.49743)] | 
CHRG-Charging:charging_task:RatingContext::getSubsInfoQueryActions: Pricing configuration for call out incorrect. 
Repeated use of same action (ActionProfile:1) within same session Message.

What Action to Take

You can configure pricing to detect an error in the callout pricing logic and then to pass the message on to the charging logic by:
  • Configuring another pricing component for detecting the error.
  • Denying the call if an error is detected and then attempting to apply charging logic.

The corrected configuration checks the number of callouts that have been made already for the enriched session message. The charging logic then checks for the results of any callouts and denies the call if a failure is detected.

Overview of Example Pricing Configuration

The following overview summarizes the pricing configuration used in this example.

  1. A prerating profile is configured that has one prerating callout action assigned to it. The callout action is configured to query Mobile Number Portability (MNP) information for a subscriber where the query source for the subscriber ID is the Called Station ID. For details, see the example configuration in Prerating MNP Profile.
  2. The prerating generator is configured to check the destination of the call and the number of callout attempts by using the following two normalizers:
    • MNP Callout Check
    • MAP Callout Attempt Count
    The prerating generator uses one table in which the results of these two normalizers are combined. By using the combined results, the generator can determine whether to perform a callout request for MNP information.

    For details, see the example configuration in Prerating MAP Callout Generator.

  3. The first pricing component in the charging logic is used to confirm the callout result and deny the call if there was a failure in the callout. If no callout was made, or a successful callout was reported, then charging logic continues as usual.

    For details of the example configuration to confirm the results, see Results Validation.

Normalizers and Normalizer Templates

Pricing Error Normalizers and Templates lists the normalizers used in this example, the templates each normalizer is based on, and the algorithms used.
Table 1. Pricing Error Normalizers and Templates
Normalizer Name Normalizer Template Algorithm Normalization Algorithm
MNP Callout Check DiamRoMsg CalledStation Template phonePattern Phone Number Pattern Match
MAP Callout Attempt Count MAP Callout Attempt Count Template numberEqual Unsigned Integer Equality
MAP Last Result MAP Last Result Template numberEqual Unsigned Integer Equality
MNP Value Check MNP Value Check Template StringEqual String Match

Prerating MNP Profile

In this example the prerating profile named MNP Profile is assigned one callout action (named MNP MAP Callout Action). Prerating Callout Action shows an example callout action configuration to query MNP information for the subscriber:
Table 2. Prerating Callout Action
Field Set To
Name MNP MAP Callout Action
Description v2+ ATI MNP
Query Frequency Initial Only
Info Query Flags Ask MNP Info
Preferred Domain Circuit Switched
Call Out Type MAP v2+ ATI
Query Source Called Station ID
Use Query Source For Destination Not set
Timeout In Milliseconds 5000
Routing Indicator Route on SSN
Subsystem Number 222
Global Title Type 4
Global Title Address 96895001006
Translation Type 0
Numbering Plan 1
Nature of Address 4

Prerating MAP Callout Generator

The prerating generator used in this example combines the results of the following two normalizers to determine if a MAP callout request for MNP information is required:
  • The MNP Callout Check normalizer
  • The MAP Callout Attempt normalizer
The MNP Callout Check normalizer inspects the CalledStationId field in the MtxDiamRoMsg MDC to see if MNP information is required. The normalizer results can be one of:
  • MNP — If the CalledStationId value matches a prefix defined in the normalizer table, then a MAP callout to check for MNP might be required.
  • Not MNP — This is the default result. Unless the CalledStationId value matches one of the predefined prefixes, MNP is not checked, no callout is made, and processing passes through to charging.
    Note: If the CalledStationId is not present, this also results in Not MNP. In this case processing passes straight through to charging. Charging treats the absence of a called party as an error and handles the call accordingly, for example, by terminating the call.
MNP Callout Check Normalizer Configuration shows how the MAP Callout Check normalizer is configured.
Table 3. MNP Callout Check Normalizer Configuration
Field Value
Name MNP Callout Check
Normalization Template DiamRoMsg CalledStation Template
Normalization Algorithm

Phone Number Pattern Match
Value If Field Not Present Not MNP
Default Not MNP
MDC Fields
  • Container — MtxDiamRoMsg
  • Field Name — CalledStationId
Rows
Name Value
Not MNP 968950115*
Not MNP 968220015*
MNP 9689*
MNP 9687*
MNP 9682*
The MAP Callout Attempt Count normalizer determines if this is the first callout attempt. MAP Callout Attempt Count Normalizer Configuration shows how the MAP Callout Attempt Count normalizer is configured.
Table 4. MAP Callout Attempt Count Normalizer Configuration
Field Value
Name MAP Callout Attempt Count
Normalization Template MAP Callout Attempt Template
Normalization Algorithm Unsigned Integer Equality
Value If Field Not Present 1st Attempt
Default All Attempts Failed
MDC Fields
  • Container — MtxDiamRoMsg
  • Field Name — CallOutSessionInfo.AttemptCount
Rows
Name Value
Ist Attempt 0
2nd Attempt 1
All Attempts Failed 2

Prerating MNP Generator Query Table and Prerating MNP Query Decision Table show how the prerating generator combines the results of the two normalizers in a decision table. If this is the first attempt and the result of the MNP Callout Check normalizer is MNP, then the MNP Profile is selected and a MAP callout request for MNP information is performed.

Table 5. Prerating MNP Generator Query Table
Field Value
Name Pre-Rating_MNP_Table
Description Check destination and earlier results
Default Result SKIP
Table 6. Prerating MNP Query Decision Table
MAP Callout Attempt Count Result MNP Callout Check Result Prerating Profile
1st Attempt MNP MNP Profile
1st Attempt Not MNP SKIP
2nd Attempt MNP SKIP
2nd Attempt Not MNP SKIP
All Attempts Failed MNP SKIP
All Attempts Failed Not MNP SKIP
Note: All the results, except the results for the first row, are a SKIP value, therefore the decision table could be simplified to contain only the first row.

Results Validation

The results validation process is used to confirm the callout results and then to determine whether to deny the call. The results validation used in this example is summarized as follows.
  1. In this example the MAP Last Result normalizer is configured to confirm the callout results by checking whether the callout was successful or whether it failed.

    For example configuration details, see MAP Last Result Normalizer.

  2. The first pricing component of the charging logic is configured to use the MAP Last Result normalizer to deny the call if there was a failure in the callout. If no callout was made, or a successful callout was reported, then charging logic continues as normal.

    For example configuration details, see Pricing Component Rate Table.

  3. If the first pricing component validates that a successful callout has been made, then the MNP Value Check normalizer is used to check the callout result. In this example, the normalizer is used to determine whether the call is OnNet or OffNet. The normalizer could be combined with other normalizers for calculating appropriate charging.

    For example configuration details, see MNP Value Check Normalizer.

MAP Last Result Normalizer

The Map Last Result normalizer validates whether the MAP callout was successful by examining the top level callout result field, CallOutSessionInfo.LastResult in the MtxDiamRoMsg MDC. MAP Last Result Normalizer Configuration shows how the MAP Last Result normalizer is configured.
Table 7. MAP Last Result Normalizer Configuration
Field Value
Name MAP Last Result
Normalization Template MAP Last Result Template
Normalization Algorithm Unsigned Integer Equality
Value If Field Not Present Not Present
Default Not Present
MDC Fields
  • Container — MtxDiamRoMsg
  • Field Name — CallOutSessionInfo.LastResult
Rows
Name Value
Success 0
Error 1
Timeout 2
Repeated Use of Same Profile 3

Pricing Component Rate Table

The rate table in the first pricing component of the charging logic uses the MAP Last Result normalizer to deny the call if there was failure in the callout. MAP Callout Failure Handling Rate Table and MAP Callout Failure Handling Decision Table show how the pricing component is configured.
Table 8. MAP Callout Failure Handling Rate Table
Field Value
Name MAP Callout Failure Handling DT
Balance Impact United States dollar Balance
Units None
Quantity Definition Usage Quantity
Default Beat 1 Second
Default Formula SKIP
Table 9. MAP Callout Failure Handling Decision Table
MAP Last Result Normalizer - Result Formula
Error DENIAL: 1
Timeout DENIAL: 1
Repeated Use of Same Profile DENIAL: 1

MNP Value Check Normalizer

For successful callouts, the MNP Value Check normalizer checks the callout result value to see if the call is OnNet or OffNet. MNP Value Check Normalizer Configuration shows how the MNP Value Check normalizer is configured.
Table 10. MNP Value Check Normalizer Configuration
Field Value
Name MNP Value Check
Normalization Template MNP Value Check Template
Normalization Algorithm String Match
Value If Field Not Present Not Specified
Default Unexpected
Match Prefix/Suffix Prefix
Case Sensitive Yes
MDC Fields
  • Container — MtxDiamRoMsg
  • Field Name — CallOutSessionInfo.CalledCallOutResponse.MnpRoutingPhoneNumber
Rows
Name Value
Onnet D12
Onnet D13
Onnet D95
Onnet b12
Onnet b13
Onnet b20
Offnet D11
Offnet D15
Offnet D21