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

Philipp Kempgen philipp.kempgen at amooma.de
Wed Mar 4 08:10:17 CST 2009


Klaus Darilion schrieb:
> 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:
>>              {

                ^ no code block required here.
                  probably invalid syntax.

>>                // if-then-else not permitted
>>                If (${ael-var} = 1)
> 
>                    ^^ case sensitive?
> 
>>                    {
>>                      Playback(beep); 
>>                      return;
>>                    }
>>              }
>>         case BUSY:
>>              {
>>                return;
>>              }
>>         default:
>>              {
>>                Hangup();
>>              };
>>       }

Try `aelparse -n`


    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
-- 



More information about the asterisk-users mailing list