[asterisk-users] How to write custom functions in AEL2 ,

Olivier oza-4h07 at myamail.com
Mon May 11 02:30:24 CDT 2009


Hi,

I'm using asterisk 1.6.1 and AEL2.
I'm trying to find the best way to write my own custom functions ?


At the moment, I'm using this pattern (extensions.ael) :

context foo {
123 => {
    &myfunc(123456);
    NoOp(${GOSUB_RETVAL});
};

macro myfunc (arg) {
    Return (${arg});
}

1. First, I keep getting warnings like
Warning: file /etc/asterisk/extensions.ael, line 446-446: application call
to Return affects flow of control, and needs to be re-written using AEL if,
while, goto, etc. keywords instead!
and I would like to get rid of them.

2. Secondly, I would like not to use GOSUB_RETVAL  and call a custom
function just like I'm calling other functions with statements like :
123 => {
     NoOp(TOLOWER(fOo BaR));
     NoOp(myfunc(123456));
};


What would you advise me to do ?

Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090511/c61ce3d9/attachment.htm 


More information about the asterisk-users mailing list