Sorry for the short and maybe obvious answer, but the cisco router can do anything you want, mixed or fixed legngh, support digit manipulation during migration times, etc.
This is done with appropriate dial-peer configuration and the detail changes depending by your specific case.
All you need is an experienced cisco voice engineer unless you want to undertake the task yourself.