Interruptible playback

I am setting an Asterisk server and want to prompt the user for a conference room number. Then I want to confirm the input. I am using Playback(), Read(), and SayDigits(). Here is the extensions.ael fragment:

while (${Confirm}=0) {
    Playback(conf-roomnumber);
    Read(RoomNumber,,3);
    Playback(conf-youentered);
    SayDigits(${RoomNumber});
    Playback(conf-confirm);
    Read(Confirm,,1);
    if (${Confirm}=1) {
        MeetMe(${RoomNumber},I);
    } else {
        Confirm=0;
    }
}

This works well, but I would like the user to be able to enter the 1 or 2 at the confirmation step without having to listen to the entire prompt. I know that Background is interruptible, but it jumps to a new extension. Is there any way to have an interruptible playback without it? I know I can cobble together a dialplan with confirmation extensions, but that is kind of like writing spaghetti code :smile:

Thanks!

Russell Markus

Read is interruptable too. Just set the max digits. I’m not too familiar with AEL, but you can probably combine your Playback & Read statements into just a Read.

Thanks! It had escaped my notice that Read was interruptible. All is working as desired

Russell Markus.