How to handle very high number of inbound routes?

Have an interesting situation here. Customer (potential customer) has 1000+ DIDs and they also want to route inbound calls by CID to various ring groups, queues, etc. So as their clients call in they add routes so that the customer gets routed to the same place each time based on their CID. It’s essentially a multi-tenant setup but everyone is dialing just a few numbers (still not 100% sure why they have so many DIDs).

I’m worried about the PBX having to scan through potentially thousands of routes looking for a caller each time. Kind of hoping for an off the shelf solution for this. Thanks.

It won’t have a problem scanning however you will reach the max includes limit pretty quickly with over 1000 Inbound routes and nothing will function.

So forgetting the number of DIDs, whats the best way to sift through a giant list of CIDs to route the calls appropriately?

A custom AGI script would probably benefit you the best

Pardon my ignorance but does this script need to be called in the additional.conf file or how do I grab the call before it gets processed normally?