CCX Script to divert set of extensions to new extensions

Version 1
    This document was generated from CDN thread

    Created by: Robert Newton on 23-12-2010 05:48:12 PM
    I have a client who has requested a CCX script to prompt callers that they have called an old extension and that they should update their contact records for future calling, then redirects the caller to the new extension. Basically, the client has ordered a new ISDN service and DDIs (200 extensions) but is retaining the old ISDN for 6 months for the transition. I need a script that grabs the original called extension digits, compares the digits to a list (document object) and then from same list (I guess) sets the related forwarding number, prompts the caller as specified above and then redirects the call to the new extension.
    Has anyone done this before or know of any existing repository scripts I can use to achieve the above requirements?

    Subject: RE: CCX Script to divert set of extensions to new extensions
    Replied by: Steven Pawlak on 04-02-2011 09:03:08 AM
    Getting the calledNumber will be tricky if you use a Translation Pattern to a Trigger in CCX. I would suggest hanging all 200 old DIDs on the CCX as the triggers. Then it is just a get called number, do XML lookup, get new number, play prompt and redirect.

    The prompt will have to be a hybrid that plays a standard recorded message ("in future call ") and then speak back the new digits to use.