Re: [asterisk-users] Reasons to use AEL

2009-07-27 Thread Philipp Kempgen
Tzafrir Cohen schrieb:
> 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

oops :-)

>> }
>> NoOp(done);
>> }

Philipp Kempgen
-- 
AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied  ->  http://www.amooma.de
Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998
Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de
Videos of the AMOOCON VoIP conference 2009 ->  http://www.amoocon.de
-- 

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


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

2009-07-27 Thread Tzafrir Cohen
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.co...@xorcom.com
+972-50-7952406   mailto:tzafrir.co...@xorcom.com
http://www.xorcom.com  iax:gu...@local.xorcom.com/tzafrir

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


Re: [asterisk-users] Reasons to use AEL

2009-07-26 Thread Zeeshan Zakaria
I think if someone knows well how to make dialplans in regular
extensions.conf file, then there is nothing much to learn about AEL. There
is a page on voip-info.org on AEL (
http://www.voip-info.org/wiki/view/Asterisk+AEL) and to me it proved to be
more than enough to switch to AEL. I used only that one page to learn AEL
and have been creating complex dial plans for a while now purely in AEL. You
can also test your AEL dialplans by doing "show dialplan  and it'll show the dialplan in 'exten => ...' format, which will help
you understand if you have programmed it right or not.

Zeeshan

On Sat, Jul 25, 2009 at 12:17 PM, Philipp Kempgen  wrote:

> Scott Gifford schrieb:
>
> > Can you recommend a good tutorial or book that covers AEL?
>
> http://www.das-asterisk-buch.de/2.1/extensions.ael.html has some
> examples but unfortunately the explanations are in German. :-)
>
> voip-info has some examples as well:
> http://www.voip-info.org/wiki/view/Asterisk+AEL
> http://www.voip-info.org/wiki/view/Asterisk+AEL2
>
>
>Philipp Kempgen
> --
> AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied  ->  http://www.amooma.de
> Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998
> Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de
> Videos of the AMOOCON VoIP conference 2009 ->  http://www.amoocon.de
> --
>
> ___
> -- 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
>



-- 
Zeeshan A Zakaria
___
-- 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

Re: [asterisk-users] Reasons to use AEL

2009-07-25 Thread Philipp Kempgen
Scott Gifford schrieb:

> Can you recommend a good tutorial or book that covers AEL?

http://www.das-asterisk-buch.de/2.1/extensions.ael.html has some
examples but unfortunately the explanations are in German. :-)

voip-info has some examples as well:
http://www.voip-info.org/wiki/view/Asterisk+AEL
http://www.voip-info.org/wiki/view/Asterisk+AEL2


Philipp Kempgen
-- 
AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied  ->  http://www.amooma.de
Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998
Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de
Videos of the AMOOCON VoIP conference 2009 ->  http://www.amoocon.de
-- 

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


Re: [asterisk-users] Reasons to use AEL

2009-07-25 Thread Tilghman Lesher
On Saturday 25 July 2009 10:53:48 Scott Gifford wrote:
> Philipp Kempgen  writes:
> > Miguel Molina schrieb:
> >> Philipp Kempgen escribió:
> >>> Use macros in AEL so you don't have to care about the underlying
> >>> implementation. :-) scnr
> >>
> >> Right now for every implementation I made, I didn't have the need to
> >> program in AEL, only plain extensions, some AMI and AGI. But well, it
> >> seems to have a lot of advantages. Please tell me some, I may take a
> >> look to it too see if it's worth spending the time to learn and get the
> >> best out of it.
> >
> > I'd say control structures (and proper indentation) are one of the
> > most important reasons to use AEL (conditionals: if .. else, switch
> > .. case, ..., loops: for, while) because they look so familiar.
> > Imagine nested "control structures" in extensions.conf with Goto(),
> > GotoIf(), While(), EndWhile(), ExitWhile(), ContinueWhile() and
> > priorities - such code is not what I call maintainable.
>
> Can you recommend a good tutorial or book that covers AEL?  I tend to
> use extensions.conf because most of the examples I come across use it,
> and it's covered by my first edition of the O'Reilly Asterisk book.
> Do later editions of the O'Reilly book cover AEL thoroughly?

Not as of this date.  We're looking at covering AEL in the 3rd edition,
though.

-- 
Tilghman & Teryl
with Peter, Cottontail, Midnight, Thumper, & Johnny (bunnies)
and Harry, BB, & George (dogs)

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


Re: [asterisk-users] Reasons to use AEL

2009-07-25 Thread Scott Gifford
Philipp Kempgen  writes:

> Miguel Molina schrieb:
>> Philipp Kempgen escribió:
>
>>> Use macros in AEL so you don't have to care about the underlying
>>> implementation. :-) scnr
>
>> Right now for every implementation I made, I didn't have the need to 
>> program in AEL, only plain extensions, some AMI and AGI. But well, it 
>> seems to have a lot of advantages. Please tell me some, I may take a 
>> look to it too see if it's worth spending the time to learn and get the 
>> best out of it.
>
> I'd say control structures (and proper indentation) are one of the
> most important reasons to use AEL (conditionals: if .. else, switch
> .. case, ..., loops: for, while) because they look so familiar.
> Imagine nested "control structures" in extensions.conf with Goto(),
> GotoIf(), While(), EndWhile(), ExitWhile(), ContinueWhile() and
> priorities - such code is not what I call maintainable.

Can you recommend a good tutorial or book that covers AEL?  I tend to
use extensions.conf because most of the examples I come across use it,
and it's covered by my first edition of the O'Reilly Asterisk book.
Do later editions of the O'Reilly book cover AEL thoroughly?

Thanks,

Scott.

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


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

2009-07-25 Thread Philipp Kempgen
Miguel Molina schrieb:
> Philipp Kempgen escribió:

>> Use macros in AEL so you don't have to care about the underlying
>> implementation. :-) scnr

> Right now for every implementation I made, I didn't have the need to 
> program in AEL, only plain extensions, some AMI and AGI. But well, it 
> seems to have a lot of advantages. Please tell me some, I may take a 
> look to it too see if it's worth spending the time to learn and get the 
> best out of it.

I'd say control structures (and proper indentation) are one of the
most important reasons to use AEL (conditionals: if .. else, switch
.. case, ..., loops: for, while) because they look so familiar.
Imagine nested "control structures" in extensions.conf with Goto(),
GotoIf(), While(), EndWhile(), ExitWhile(), ContinueWhile() and
priorities - such code is not what I call maintainable.

== 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;
}
NoOp(done);
}

In this example, we needed more lines in AEL; if we had added another
command to the if condition in our while loop, ExecIf() would not be
enough anymore and we would be forced to use a more complex construc-
tion with GotoIf(). Our extensions.conf would be a lot longer.


Philipp Kempgen
-- 
AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied  ->  http://www.amooma.de
Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998
Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de
Videos of the AMOOCON VoIP conference 2009 ->  http://www.amoocon.de
-- 

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