That is calling number based routing, and Cisco CM or CME t in itself can only support it using answer-adress under dial-peer. That requires one dial-peer, trnalsation-prfoile and rule peer number, making ti hardly a scalable solution.
So, I have this feature supported in my TCL/IVR script "number 2 namet" that is http-based. It can be aquired at www.ciscoscript.com.