Inbound route check CallerID Number in a Data Base

Dynroutes is an option

Another would be a completely custom context that you connect to an inbound route. go to if Callerid(num) matches dbresult.