Example Callouts Using Logical State
This example shows how to use the Next Logical State value defined in the pr-rating profile. You can use this value to perform a sequence of callouts that use the previous callout results to select a another profile, and to perform more queries. Callouts on the start message are used to establish the location of the A-party (caller) and the B-party (called party) so that the call is charged appropriately.
Callout Process Using the Next Logical State
MtxDiamRoMsg.LogicalState
field to 0 (zero). The generator then selects a prerating profile. After the call to
the generator, the service logic deletes the LogicalState
field before inspecting the Next Logical State field configured for the selected profile. If Next Logical
State is: - Set to a value, that value is copied into the
MtxDiamRoMsg.LogicalState
field. - Not present, the
MtxDiamRoMsg.LogicalState
field remains empty.
All the callouts for the prerating profile are attempted exactly once. If any of the callouts fail, then processing returns to the prerating profile generator.
If all the callouts succeed and the MtxDiamRoMsg.LogicalState
field is not present, then processing passes to rating. If all the callouts succeed and the
MtxDiamRoMsg.LogicalState
field is set to a value, then processing returns to the generator.
Example Prerating Profiles
Prerating Profile Name | Next Logical State Value | Description |
---|---|---|
Empty | Null | An empty prerating profile that has no prerating actions. When the prerating profile generator selects an empty prerating profile, no further callouts are made and the message is passed on to rating. If an empty prerating profile is selected because a callout for a previously selected prerating profile was unsuccessful, rating must be configured to handle the failure conditions, such as a timeout or an error. |
Check_Access_on_Called_LS1 | 1 | Checks access on the called number, for example, to check whether the number is blocked. |
MNP_on_Called_LS2 | 2 | Queries the MNP of the called number. |
MNP_on_Corrected_LS3 | 3 | Queries the MNP of the corrected number for the called number. |
MNP_on_Called_LS4 | 4 | Queries the MNP of the called number. |
Location_Caller_LSN | Null | Queries the location of the caller. |
Location_Corrected_LSN | Null | Queries the location of the corrected number. |
Location_Called_LSN | Null | Queries the location of the called number. |
Example Prerating Logic
In this example, if more information is needed to rate a call, the service logic calls the prerating profile generator. The selected prerating profile determines the callouts that are made to request the missing information. Based on the conditions set in the generator decision tables, the generator selects the Empty profile or a profile based on the LogicalState value.
- If the message is not the start message.
- If the message is the start message, but the callouts for the current profile have been unsuccessful due to a timeout or an error.
- If the message is the start message, all the callouts for the current profile have been successful, and the
MtxDiamRoMsg.LogicalState
is set to null (not present).When the generator selects the Empty profile for these conditions, processing passes to rating. Rating must be configured to check fo and handle any error conditions.
- If the message is the start message, there are no callout results (no timeouts or errors) because this is the first pass of the
generator. The
MtxDiamRoMsg.LogicalState
is set to 0. - If the message is the start message, all the callouts for the current profile have been successful. The
MtxDiamRoMsg.LogicalState
is set to a value in the range 0 to 4.
LogicalState 0
The MtxDiamRoMsg.LogicalState
field is initially set to 0 (zero) by the system. When LogicalState
is set to 0, it means that the service logic is calling the
prerating profile generator for the first time for the current message.
LogicalState
is set to 0, the generator decision tables check whether the caller is roaming. If the caller is: - Roaming, the generator selects the Check_Access_on_Called_LS1 profile.
- Not roaming, the generator selects the MNP_on_Called_LS2 profile.
LogicalState
is 0:
LogicalState 1 - Check Access on Called Number
If the caller was roaming, the prerating generator selected the Check_Access_on_Called_LS1 profile for processing.
MtxDiamRoMsg.LogicalState
field is set to 1. Because the LogicalState
field is set, processing returns to the generator. If the
callouts for the Check_Access_on_Called_LS1 profile are successful, the generator decision tables check the query results and select one of the following profiles based on the access
for the called number: - MNP_on_Corrected_LS3
- MNP_on_Called_LS4
- Empty
LogicalState 2 - MNP for Called Number Requested
If the caller was not roaming, the prerating profile generator selected the MNP_on_Called_LS2 profile to request the MNP of the called number.
MtxDiamRoMsg.LogicalState
field to 2, and processing returns to the generator to select another profile. If the callouts for
the MNP_on_Called_LS2 profile were successful, the generator decision tables check the query results to determine the MNP of the called number. If the called number is: - Not ported, then the generator selects the Location_Caller_LSN profile to request the location of the number. No further callouts are required.
- Otherwise, the Empty profile is selected. No more information is needed, and the message is passed on to rating.
LogicalState 3 - MNP for Corrected Number Requested
Following on from logical state 1, which determined the caller is roaming, the prerating profile generator selected the MNP_on_Corrected_LS3 profile to request the MNP of the corrected number.
MtxDiamRoMsg.LogicalState
field to 3, and processing returns to the generator to select another profile. If the callouts for
the MNP_on_Corrected_LS3 profile were successful, the generator decision tables check the query results to determine whether the MNP for the corrected number is a ported number. If the
number is: - Not ported, then the generator selects the Location_Corrected_LSN profile to request the location of the corrected number. No further callouts are required.
- Otherwise, the Empty profile is selected. Because no more information is needed, the message is passed on to rating.
LogicalState 4 - MNP for Called Number Requested
Following on from LogicalState 1, which determined that the caller is roaming, the prerating profile generator selected the MNP_on_Called_LS4 profile to request the MNP of the called number.
MtxDiamRoMsg.LogicalState
field to 4, and processing returns to the generator to select another profile. If the callouts for
the MNP_on_Called_LS4 profile are successful, the generator decision tables check the query results to determine whether the MNP for the called number is a ported number. If the number
is: - Not ported, then the generator selects the Location_Called_LSN profile to request the location of the number. No further callouts are required
- Otherwise, the Empty profile is selected. Because no more information is needed, the message is passed on to rating.