[asterisk-users] Reasons to use AEL (was: Re: Goto from a feature macro is not working?)

Tzafrir Cohen tzafrir.cohen at xorcom.com
Mon Jul 27 03:29:38 CDT 2009


On Sat, Jul 25, 2009 at 01:03:27PM +0200, Philipp Kempgen wrote:

> == extensions.conf:
> 
> exten => 30,1,Set(x=5)
> exten => 30,n,While($[${x} <= 9])
> exten => 30,n,NoOp(x ist ${x})
> exten => 30,n,ExecIf($[${x} > 5],ExitWhile)
> exten => 30,n,Playback(beep)
> exten => 30,n,Set(x=$[${x} + 1])
> exten => 30,n,EndWhile()
> exten => 30,n,NoOp(done)
> 
> == extensions.ael:
> 
> 30 => {
>     x=0;
>     while (${x} <= 9) {
>         NoOp(x ist ${x});
>         if (${x} > 5) {
>             break;
>         }
>         Playback(beep);
>         y=${x} + 1;

AEL is so easy that you managed to err with it :-p

>     }
>     NoOp(done);
> }

-- 
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen at xorcom.com
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir



More information about the asterisk-users mailing list