[asterisk-users] AEL2 #include madness in Asterisk 1.4 - Murf?

Douglas Garstang dgarstang at oneeighty.com
Wed Oct 4 22:03:40 MST 2006


Asterisk 1.4 beta2.
 
My top level /etc/asterisk/extensions.ael has the following two lines:
 
#include "include/syst/extensions.ael"
#include "include/btck/extensions.ael"

Here is the console output on Asterisk load.
 
app_system.so => (Generic System() application)
[Oct  4 15:48:15] NOTICE[1143]: pbx_ael.c:3798 pbx_load_module: Starting AEL load process.
[Oct  4 15:48:15] NOTICE[1143]: pbx_ael.c:3805 pbx_load_module: AEL load process: calculated config file name '/etc/asterisk/extensions.ael'.
[Oct  4 15:48:15] NOTICE[1143]: ael.flex:429 ael_yylex:   --Read in included file /etc/asterisk/include/syst/extensions.ael, 4130 chars
[Oct  4 15:48:15] NOTICE[1143]: ael.flex:429 ael_yylex:   --Read in included file /etc/asterisk/include/syst/macros.ael, 1463 chars
[Oct  4 15:48:15] NOTICE[1143]: ael.flex:429 ael_yylex:   --Read in included file /etc/asterisk/include/syst/dundiapps.ael, 758 chars
[Oct  4 15:48:15] NOTICE[1143]: ael.flex:429 ael_yylex:   --Read in included file /etc/asterisk/include/syst/rdapps.ael, 275 chars
[Oct  4 15:48:15] NOTICE[1143]: ael.flex:429 ael_yylex:   --Read in included file /etc/asterisk/include/btck/extensions.ael, 1385 chars
[Oct  4 15:48:15] NOTICE[1143]: pbx_ael.c:3808 pbx_load_module: AEL load process: parsed config file name '/etc/asterisk/extensions.ael'.
[Oct  4 15:48:15] ERROR[1143]: pbx_ael.c:1162 check_goto: Error: file /etc/asterisk/include/syst/extensions.ael, line 157-157: goto:  no label remote exists in the current extension!
[Oct  4 15:48:15] ERROR[1143]: pbx_ael.c:1162 check_goto: Error: file /etc/asterisk/include/syst/extensions.ael, line 159-159: goto:  no label local exists in the current extension!
[Oct  4 15:48:15] ERROR[1143]: pbx_ael.c:3821 pbx_load_module: Sorry, but 0 syntax errors and 2 semantic errors were detected. It doesn't make sense to compile.
pbx_ael.so => (Asterisk Extension Language Compiler)
 
Here's the context from /etc/asterisk/include/syst/extensions.ael, that contains lines 157 that the parser is complaining about:
 
   148  context syst_Route {
   149
   150      _[*0123456789]. => {
   151          NoOp(*** Originated call ${CALLERID} -> ${EXTEN});
   152          Set(TMP=${CALLERID(number)});
   153          &SysLogger(This is a test message);
   154          &FastAGIConnectGet(CALLERID);
   155          ChanIsAvail(SIP/${EXTEN});
   156          if ("${AVAILCHAN}" = "") {
   157              goto remote;
   158          } else {
   159              goto local;
   160          }
   161          remote:
   162              NoOp(REMOTE);
   163              Set(PATH=${DUNDILOOKUP(3254103,DUNDIRegistr)});
   164              //Set(PATH=${DUNDILOOKUP(${EXTEN},DUNDIRegistr)});
   165              Dial(${PATH});
   166              Hangup();
   167          local:
   168              NoOp(LOCAL);
   169              Dial(SIP/${EXTEN});
   170              Hangup();
   171
   172      }
   173  }
 
As you can quite clearly see, labels 'remote' and 'local' DO exist in the syst_Route context.
 
Now, if I switcheroo the two includes around in the top level /etc/asterisk/extensions.ael, to:
 
#include "include/btck/extensions.ael"
#include "include/syst/extensions.ael"

and reload Asterisk, I get:
 
[Oct  4 15:57:28] NOTICE[1202]: pbx_ael.c:3813 pbx_load_module: AEL load process: compiled config file name '/etc/asterisk/extensions.ael'.
[Oct  4 15:57:28] NOTICE[1202]: pbx_ael.c:3816 pbx_load_module: AEL load process: merged config file name '/etc/asterisk/extensions.ael'.
[Oct  4 15:57:28] WARNING[1202]: pbx.c:6194 ast_context_verify_includes: Context 'syst_PSTNStart' tries includes nonexistent context 'syst_AppACDQueue'
[Oct  4 15:57:28] WARNING[1202]: pbx.c:6194 ast_context_verify_includes: Context 'btck_CallStart' tries includes nonexistent context 'syst_ACD'
[Oct  4 15:57:28] NOTICE[1202]: pbx_ael.c:3819 pbx_load_module: AEL load process: verified config file name '/etc/asterisk/extensions.ael'.
pbx_ael.so => (Asterisk Extension Language Compiler)

There are no errors about nonexistent labels in the syst_Route extension. I would not have thought that #include order made any difference, since all we are doing is pulling a bunch of contexts into a global context space. 
 
Anyone? Mr Murpy, care to take a shot at it?  :)
 
Doug.
 
 
 
 
 
 
 


More information about the asterisk-users mailing list