Incoming route: DID to extension automapping

Here’s the situation: e.g. you sign up with and register a new server. As a result you may get a new number block assigned in the
+88299 range, e.g. 88299 012345 0 through 88299 012345 9999.

What I’d love to do is to be able to define a DID prefix in an inbound route, in this case 88299012345 and have everything that follows be interpreted as the extension to ring.

I guess that could be done with some custome app, but I wonder if that’s not a common scenario, e.g. companies getting a number block like 212 123 4500 through 212 123 4599 or something similar.
Also, with some ISDN systems, extra digits are delivered, and can be treated like direct dialed extensions.

So it might seem like this would be functionality common enough to have a generalized solution.