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

Steve Murphy murf at digium.com
Thu Oct 5 06:10:00 MST 2006


On Thu, 2006-10-05 at 01:08 -0700, dgarstang at oneeighty.com wrote:
>         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.

Doug-- 

I cannot reproduce the problems, given just the one context. 
There is something magical about your data, that the code trips over it,
and
to find the bugs, I will need your files! Is this possible?

As to order, you are correct, it should not make a difference what order
the
files are included in the data.

I did note that in the above output, you got the error messages:

[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'

These messages do not come from the AEL compiler, but rather, are
complaints from the bowels of the asterisk engine: somewhere, it's not
finding some included contexts... which may mean yet one more bug in the
AEL code: why didn't AEL make note of it first?

murf

-- 
Steve Murphy
Software Developer
Digium
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3227 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20061005/e682b5e6/smime.bin


More information about the asterisk-users mailing list