[asterisk-users] AEL2: If-then-else not permitted in Switch-Case

Lee, John (Sydney) John.Lee at compuware.com
Tue Mar 3 18:20:27 CST 2009


I just want to confirm but it seems that if-then-else is not permitted
in case structure.
It was not really documented but it seems to be the case.

Can anyone confirm?

switch(${DIALSTATUS})
      {
        case NOANSWER:
             {
               // if-then-else not permitted
               If (${ael-var} = 1)
                   {
                     Playback(beep); 
                     return;
                   }
             }
        case BUSY:
             {
               return;
             }
        default:
             {
               Hangup();
             };
      }





More information about the asterisk-users mailing list