> 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?
No, if-then-else works fine inside a case statement. See inline comments. > > switch(${DIALSTATUS}) > { > case NOANSWER: > { This brace, and its closing-brace mate, are superfluous though not harmful. > // if-then-else not permitted > If (${ael-var} = 1) Your primary problem is probably right here, the if needs to be all lower-case ( If != if ). > { > Playback(beep); > return; > } > } Again, unnecessary. > case BUSY: > { > return; > } > default: > { > Hangup(); > }; > } > > > > _______________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users > > _______________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users