Thanks for the quick reply Steve. It turned out to be user error. D'oh. -----Original Message----- From: Steve Murphy [mailto:[EMAIL PROTECTED] Sent: Wed 10/4/2006 10:32 PM To: asterisk-users@lists.digium.com Cc: Subject: [asterisk-users] Re: Calling Functions from AEL2
On Wed, 2006-10-04 at 15:14 -0700, [EMAIL PROTECTED] wrote: > I am trying to call the DUNDILOOKUP dialplan function from > ael2, like this: > > context route { > Set(PATH=${DUNDILOOKUP(${EXTEN},DUNDIRegistr)}); > } > > The DUNDILOOKUP function returns no data. However, when I call > it exactly the same way in a regular context, it DOES return > data. > > [route] > > exten => _X.,n,Set(PATH= > ${DUNDILOOKUP(${EXTEN},DUNDIRegistr)}) > > That works. Could this possibly be an AEL2 bug? This is > Asterisk 1.4 beta2. > > Doug. > > Interesting! When I use aelparse -w, a closely adapted version of the above: context extensions { 84 => { Set(PATH=${DUNDILOOKUP(${EXTEN},DUNDIRegistr)}); } } turns into: exten => 84,1,Set(PATH=${DUNDILOOKUP(${EXTEN},DUNDIRegistr)}) Which is pretty much what you had. However, if I put in exactly what you specified: context route { Set(PATH=${DUNDILOOKUP(${EXTEN},DUNDIRegistr)}); } Then I get: File: /etc/asterisk/extensions.ael, Line 140, Cols: 20-20: Error: syntax error, unexpected '(', expecting '=' or '=>' LOG: lev:4 file:pbx_ael.c line:3938 func: pbx_load_module Sorry, but 1 syntax errors and 0 semantic errors were detected. It doesn't make sense to compile. So, I'd have to assume that you typed in the route context from memory into your post, and forgot to include the _X. => { ... } part. So, from here, I think AEL would have handled this correctly. So, something else is going on, and I wish you luck on nailing down what it might be! Use aelparse to check your file, and double checking the logs won't hurt, either. Sometimes, we forget to reload the dialplan, and can get thoroughly confused thereby (I know I do!)... also, the "dialplan show route" command to the CLI will list out what's in the 'route' context, which can also be informative. murf
_______________________________________________ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users