Routing Plan LNP rules
Routing Plan LNP (Local Number Portability) rules are used to enable LNP queries.
WARNING
The system processes Routing Plan LNP rules only when the call is handled by a Routing Plan with the Use LNP flag enabled.
- Id
- Unique identifier
- Routing plan
- Routing plan to which the rule belongs.
- Dst prefix
- Prefix used to match rules by the destination number.
- Req dst rewrite rule/result
- Regular expression used to transform the destination number before sending the request to the LNP database. Refer to Numbers translations documentation for details.
- Database
- LNP Database where LNP requests are sent.
- Lrn rewrite rule/result
- Regular expression used to modify the LRN received in the LNP database response. Refer to Numbers translations documentation for details.
- Drop call on error
- Drops the call if LNP resolution fails. When disabled, routing falls back to the original destination number.
- Rewrite call destination
- When enabled, the original destination number is replaced with the LRN from the LNP response.
Processing logic
When a call is handled by Routing Plan A with the Use LNP flag enabled, the system performs a lookup of Routing Plan LNP rules based on the routing plan and the destination number:
- Only rules that belong to
Routing Plan Aand have aDST Prefixmatching the destination number are considered. - The system selects the best-matching rule (based on the longest DST Prefix).
When a rule is found, the destination number is modified according to the Req dst rewrite rule/result and an LNP request is sent to the specified LNP Database.
If the request succeeds, the system modifies the LRN returned in the response according to the Lrn rewrite rule/result and uses it for Destination and Dialpeer lookup, instead of the original destination number. By default, the original destination number is preserved for sending to the termination gateway. The LRN may also be forwarded - see the Gateway Send lnp information option in the termiantion gateway settings.
Alternatively, the destination number can be fully replaced by enabling the Rewrite call destination flag.
Behavior in case of an unsuccessful LNP request is controlled by the Drop call on error flag.