> For the complete documentation index, see [llms.txt](https://v5cookbook.denovolab.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://v5cookbook.denovolab.com/troubleshoot/enforce-valid-dnis-length.md).

# Enforce Valid DNIS Length

&#x20;In this article, I am going to show you how to block calls that have valid length for the DNIS and ANI.&#x20;

Here is how a normal basic routing plan looks.  It basically just route all calls according to the vendor trunks defined in the dynamic route specified.&#x20;

![](/files/-MYWQGuAq1LlTXsDwWyR)

However, you can set it so that this rule is applied with the length of ANI and DNIS meets the valid size.&#x20;

You can do this by clicking "Edit" on this rule:

![](/files/-MYWQXnHgn7ucZ0bbu_G)

You can use ANI/DNIS Prefix, Min Length, and Max Length to specify traffic you don't like.  For those traffic, you can send them to a different Dynamic or Static Route that either always return 503 or route to a miss call vendors like some of our clients are doing.&#x20;
