Foremost, it is required to notice that in the routing rules interface there are 2 “Condition” fields, at the level of the entire rule and in the choice conditions.
Entire rule condition (1) defines the selection condition for this rule. If an attempt during routing does not satisfy this rule, it will be ignored. While condition at the choice level (2) determines whether a given choice will be selected. For example, if the rule contains 1 condition, the 'Huntstop' option is set, and the attempt during routing does not satisfy the condition, then the routing will end unsuccessfully, and the attempt will have the status "NO ROUTES".
Now let's move on to possible uses of the operators "AND", "OR" & "IN"
1. “AND”
In this case, let's split it into 2 separate conditions. For example:
(MRG >= 0,1) and (hlrResponseCode == 0)
This condition will return "TRUE" (satisfy the condition) only when each of the parts is TRUE. That is, MRG must be greater than 0,1 and HLR RESPONSE CODE must be equal to 0. Accordingly, if there are more than two such conditions, each of them must return “TRUE” for this condition to be passed.
2. “OR”
The same as in the previous point, let's split it into the separate conditions. For example:
(MRG >= 0,1) or (hlrResponseCode == 0)
This condition will return "TRUE" (satisfy the condition) when at least one of the parts is TRUE. That is, MRG must be greater than 0,1 or HLR RESPONSE CODE must be equal to 0. With the same logic, if there are more than two such conditions, at least one of them must return “TRUE” for this condition to be passed.
3. “IN”
The operating logic of this operator rule can be described based on the logic of the "OR" operator. For example:
hlrResponseCode in (1,2,3,4,5) equals the condition:
(hlrResponseCode == 1) or (hlrResponseCode == 2) or (hlrResponseCode == 3) or (hlrResponseCode == 4) or (hlrResponseCode == 5).
Thus, for this condition to pass, at least 1 of the IN conditions must return “True”.
In addition, you can find more information regarding operators in our manual.
We hope this article will clarify the logic behind the operation of the condition fields.
But anyway, if you have any additional questions, feel free to reach us. Thank you.
AKBSMS - Alaris Knowledge Base
Related Questions:
Condition in the routing rules
"AND", "OR", "IN" operators
How to configure a condition in the routing rule?
What is the difference between conditions in routing rules?
Link to this Article: https://helpdesk.alarislabs.com/en/knowledge_base/article/274/category/134/