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.
On Wed, 2006-10-04 at 15:14 -0700, dgarstang@oneeighty.com 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 -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3239 bytes Desc: not available Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20061004/3d2f56b8/smime.bin
Thanks for the quick reply Steve. It turned out to be user error. D'oh. -----Original Message----- From: Steve Murphy [mailto:murf@parsetree.com] 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, dgarstang@oneeighty.com 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
Douglas Garstang 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. > > > _______________________________________________ > --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 >I'll look into what I can find as soon as time permits (my company is entering a beta release today), but my first suggestion to debug what's happening is to do 'show dialplan route' and see what the "compiled" dialplan shows. That could help you figure out if it's an AEL2 bug, because it would show what the AEL2 compiler did with that line. Hope this helps, SKM