# 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;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://v5cookbook.denovolab.com/troubleshoot/enforce-valid-dnis-length.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
