Background application in AEL switch

Hello,

I’m currently working on an AEL-based dial plan and have seen that the “Background” application doesn’t work right inside of switch statements. I get the error message “Channel ‘SIP/143-09975dd0’ sent into invalid extension ‘sw-510-5’ in context ‘menutest’, but no invalid handler” when I call the with_switch extension and press 1. The extension ‘without_switch’ works fine. Can anyone explain that to me or is it a bug?

My test dial plan is as follows:

context menutest {
    with_switch => {
        Set(DUMMY=5);
        Answer();
        Wait(0.3);
        switch(${DUMMY}) {
            case 5:
                Background(menu);
                WaitExten();
            break;
            default:
                NoOp(Default action);
                break;
       }
       Hangup();
    };
    
    without_switch => {
        Answer();
        Wait(0.3);
        Background(menu);
        WaitExten();
    };
    
    1 => {
        NoOp(One);
        Hangup();
    };
}