Lee, John (Sydney) schrieb: > 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; > } > }
I would have written this like so: switch ("${DIALSTATUS}") { case "NOANSWER": if ("${ael-var}" = "1") { Playback(beep); } break; } Give it a try. Philipp Kempgen -- AMOOCON 2009, May 4-5, Rostock / Germany -> http://www.amoocon.de Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied -> http://www.amooma.de Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998 -- _______________________________________________ -- 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