summaryrefslogtreecommitdiff
path: root/pbx/ael/ael-test
diff options
context:
space:
mode:
authorSteve Murphy <murf@digium.com>2006-08-07 12:59:47 +0000
committerSteve Murphy <murf@digium.com>2006-08-07 12:59:47 +0000
commit14c12fed9be7047bfa768640441ea1f85048bab6 (patch)
tree5be827baeaa02c5e2b53e45899f861e630ebe160 /pbx/ael/ael-test
parentb57c23826069819a48c8f57131b159d00b9ac4f2 (diff)
The contents of branch teams/murf/bug_7598 are being folded in here.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39151 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'pbx/ael/ael-test')
-rw-r--r--pbx/ael/ael-test/ael-ntest10/extensions.ael131
-rw-r--r--pbx/ael/ael-test/ael-test11/extensions.ael56
-rw-r--r--pbx/ael/ael-test/ref.ael-ntest10133
-rw-r--r--pbx/ael/ael-test/ref.ael-test1111
-rw-r--r--pbx/ael/ael-test/ref.ael-test334
-rw-r--r--pbx/ael/ael-test/ref.ael-test725
6 files changed, 361 insertions, 29 deletions
diff --git a/pbx/ael/ael-test/ael-ntest10/extensions.ael b/pbx/ael/ael-test/ael-ntest10/extensions.ael
new file mode 100644
index 000000000..4a8386ccf
--- /dev/null
+++ b/pbx/ael/ael-test/ael-ntest10/extensions.ael
@@ -0,0 +1,131 @@
+macro endsess()
+{
+ NoOp(hithere);
+}
+
+macro nullchk(type)
+{
+ NoOp(${type} is this);
+}
+
+macro endcall(type) {
+ switch(${type}) {
+ case out:
+ &nullchk(callid);
+ if(${testnotnull}) {
+ &endsess();
+ goto ptr1 ; // <-- goto call to valid label
+ }
+ else {
+ptr1: // <-- valid label
+ Softhangup(${CHANNEL});
+ break ;
+ }
+ Noop(esac) ;
+ }
+}
+
+macro endcall2(type) {
+ switch(${type}) {
+ case out:
+ &nullchk(callid);
+ if(${testnotnull}) {
+ &endsess();
+ goto ptr1 ; // <-- goto call to valid label
+ }
+ case out2:
+ {
+ptr1: // <-- valid label
+ Softhangup(${CHANNEL});
+ break ;
+ }
+ Noop(esac) ;
+ }
+}
+
+macro endcall3(type) {
+ switch(${type}) {
+ case out:
+ &nullchk(callid);
+ if(${testnotnull}) {
+ &endsess();
+ goto ptr1 ; // <-- goto call to valid label
+ }
+ Noop(esac) ;
+ }
+ if(${testnotnull}) {
+ goto ptr1;
+ }
+ switch(${type}) {
+ case out:
+ if(${testnotnull}) {
+ptr1: // <-- valid label
+ Softhangup(${CHANNEL});
+ break ;
+ }
+ Noop(esac) ;
+ }
+}
+
+macro endcall4(type) {
+ switch(${type}) {
+ case out:
+ &nullchk(callid);
+ if(${testnotnull}) {
+ &endsess();
+ goto ptr1 ; // <-- goto call to valid label
+ }
+ Noop(esac) ;
+ }
+ if(${testnotnull}) {
+ goto ptr1;
+ }
+ switch(${type}) {
+ case out:
+ switch(${type})
+ {
+ case in:
+ if(${testnotnull}) {
+ptr1: // <-- valid label
+ Softhangup(${CHANNEL});
+ break ;
+ }
+ Noop(esac) ;
+ }
+ }
+}
+
+macro endcall5(type) {
+ switch(${type}) {
+ case out:
+ &nullchk(callid);
+ if(${testnotnull}) {
+ &endsess();
+ goto ptr1 ; // <-- goto call to valid label
+ }
+ case in:
+ &nullchk(callid);
+ ptr2:
+ if(${testnotnull}) {
+ &endsess();
+ goto ptr1 ; // <-- goto call to valid label
+ }
+ Noop(esac) ;
+ }
+ if(${testnotnull}) {
+ goto ptr1;
+ }
+ switch(${type}) {
+ case out:
+ switch(${type})
+ {
+ case in:
+ if(${testnotnull}) {
+ptr1: // <-- valid label
+ Softhangup(${CHANNEL});
+ break ;
+ }
+ Noop(esac) ;
+ }
+ }
+}
diff --git a/pbx/ael/ael-test/ael-test11/extensions.ael b/pbx/ael/ael-test/ael-test11/extensions.ael
new file mode 100644
index 000000000..886a51eb5
--- /dev/null
+++ b/pbx/ael/ael-test/ael-test11/extensions.ael
@@ -0,0 +1,56 @@
+context test1
+{
+ s =>
+ {
+ goto lab1;
+ if( ${testnotnull} )
+ {
+ lab1:
+ NoOp(hello);
+ }
+ else
+ {
+ lab1:
+ MoOp(goodbye);
+ }
+ }
+
+ 1 =>
+ {
+ lab1:
+ NoOp(This one is OK.);
+ }
+}
+
+macro endcall5(type) {
+ switch(${type}) {
+ case out:
+ if(${testnotnull}) {
+ NoOp(whoosh);
+ goto ptr1 ; // <-- goto call to valid label
+ }
+ case in:
+ ptr1: // The First label is the valid one...
+ if(${testnotnull}) {
+ NoOp(wow);
+ goto ptr1 ; // <-- goto call to valid label
+ }
+ Noop(esac) ;
+ }
+ if(${testnotnull}) {
+ goto ptr1;
+ }
+ switch(${type}) {
+ case out:
+ switch(${type})
+ {
+ case in:
+ if(${testnotnull}) {
+ptr1: // <-- duplicate label (macros are about the equiv of an extension)
+ Softhangup(${CHANNEL});
+ break ;
+ }
+ Noop(esac) ;
+ }
+ }
+}
diff --git a/pbx/ael/ael-test/ref.ael-ntest10 b/pbx/ael/ael-test/ref.ael-ntest10
new file mode 100644
index 000000000..e74e07fde
--- /dev/null
+++ b/pbx/ael/ael-test/ref.ael-ntest10
@@ -0,0 +1,133 @@
+Executed ast_register_file_version();
+Executed ast_register_file_version();
+Executed ast_register_file_version();
+Executed ast_register_file_version();
+
+(You can use the -n option if you aren't interested in seeing all the instructions generated by the compiler)
+
+Executed ast_cli_register_multiple();
+LOG: lev:2 file:../pbx/pbx_ael.c line:3732 func: pbx_load_module Starting AEL load process.
+LOG: lev:2 file:../pbx/pbx_ael.c line:3739 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
+LOG: lev:2 file:../pbx/pbx_ael.c line:3742 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
+LOG: lev:2 file:../pbx/pbx_ael.c line:3745 func: pbx_load_module AEL load process: checked config file name './extensions.ael'.
+Executed ast_context_create(conts, name=macro-endsess, registrar=pbx_ael);
+Executed ast_context_create(conts, name=macro-nullchk, registrar=pbx_ael);
+Executed ast_context_create(conts, name=macro-endcall, registrar=pbx_ael);
+Executed ast_context_create(conts, name=macro-endcall2, registrar=pbx_ael);
+Executed ast_context_create(conts, name=macro-endcall3, registrar=pbx_ael);
+Executed ast_context_create(conts, name=macro-endcall4, registrar=pbx_ael);
+Executed ast_context_create(conts, name=macro-endcall5, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=s, priority=1, label=(null), callerid=(null), appl=NoOp, data=hithere, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=s, priority=1, label=(null), callerid=(null), appl=Set, data=type=${ARG1}, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=s, priority=2, label=(null), callerid=(null), appl=NoOp, data=${type} is this, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=s, priority=1, label=(null), callerid=(null), appl=Set, data=type=${ARG1}, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=s, priority=2, label=(null), callerid=(null), appl=Goto, data=sw-1-${type}|1, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=s, priority=3, label=(null), callerid=(null), appl=NoOp, data=Finish switch-endcall-1, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-1-out, priority=1, label=(null), callerid=(null), appl=Macro, data=nullchk|callid, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-1-out, priority=2, label=(null), callerid=(null), appl=GotoIf, data=$[${testnotnull}]?3:6, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-1-out, priority=3, label=(null), callerid=(null), appl=Macro, data=endsess, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-1-out, priority=4, label=(null), callerid=(null), appl=Goto, data=sw-1-out|ptr1, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-1-out, priority=5, label=(null), callerid=(null), appl=Goto, data=8, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-1-out, priority=6, label=ptr1, callerid=(null), appl=Softhangup, data=${CHANNEL}, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-1-out, priority=7, label=(null), callerid=(null), appl=Goto, data=s|3, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-1-out, priority=8, label=(null), callerid=(null), appl=NoOp, data=Finish if-sw-endcall-out-1-2, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-1-out, priority=9, label=(null), callerid=(null), appl=Noop, data=esac, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-1-out, priority=10, label=(null), callerid=(null), appl=Goto, data=s|3, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=s, priority=1, label=(null), callerid=(null), appl=Set, data=type=${ARG1}, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=s, priority=2, label=(null), callerid=(null), appl=Goto, data=sw-3-${type}|1, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=s, priority=3, label=(null), callerid=(null), appl=NoOp, data=Finish switch-endcall2-3, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-3-out2, priority=1, label=ptr1, callerid=(null), appl=Softhangup, data=${CHANNEL}, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-3-out2, priority=2, label=(null), callerid=(null), appl=Goto, data=s|3, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-3-out2, priority=3, label=(null), callerid=(null), appl=Noop, data=esac, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-3-out2, priority=4, label=(null), callerid=(null), appl=Goto, data=s|3, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-3-out, priority=1, label=(null), callerid=(null), appl=Macro, data=nullchk|callid, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-3-out, priority=2, label=(null), callerid=(null), appl=GotoIf, data=$[${testnotnull}]?3:5, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-3-out, priority=3, label=(null), callerid=(null), appl=Macro, data=endsess, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-3-out, priority=4, label=(null), callerid=(null), appl=Goto, data=sw-3-out2|ptr1, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-3-out, priority=5, label=(null), callerid=(null), appl=NoOp, data=Finish if-sw-endcall2-out-3-4, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-3-out, priority=6, label=(null), callerid=(null), appl=Goto, data=sw-3-out2|1, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=s, priority=1, label=(null), callerid=(null), appl=Set, data=type=${ARG1}, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=s, priority=2, label=(null), callerid=(null), appl=Goto, data=sw-5-${type}|1, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=s, priority=3, label=(null), callerid=(null), appl=NoOp, data=Finish switch-endcall3-5, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=s, priority=4, label=(null), callerid=(null), appl=GotoIf, data=$[${testnotnull}]?5:6, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=s, priority=5, label=(null), callerid=(null), appl=Goto, data=sw-8-out|ptr1, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=s, priority=6, label=(null), callerid=(null), appl=NoOp, data=Finish if-endcall3-7, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=s, priority=7, label=(null), callerid=(null), appl=Goto, data=sw-8-${type}|1, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=s, priority=8, label=(null), callerid=(null), appl=NoOp, data=Finish switch-endcall3-8, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-8-out, priority=1, label=(null), callerid=(null), appl=GotoIf, data=$[${testnotnull}]?2:4, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-8-out, priority=2, label=ptr1, callerid=(null), appl=Softhangup, data=${CHANNEL}, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-8-out, priority=3, label=(null), callerid=(null), appl=Goto, data=s|8, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-8-out, priority=4, label=(null), callerid=(null), appl=NoOp, data=Finish if-sw-endcall3-out-8-9, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-8-out, priority=5, label=(null), callerid=(null), appl=Noop, data=esac, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-8-out, priority=6, label=(null), callerid=(null), appl=Goto, data=s|8, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-5-out, priority=1, label=(null), callerid=(null), appl=Macro, data=nullchk|callid, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-5-out, priority=2, label=(null), callerid=(null), appl=GotoIf, data=$[${testnotnull}]?3:5, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-5-out, priority=3, label=(null), callerid=(null), appl=Macro, data=endsess, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-5-out, priority=4, label=(null), callerid=(null), appl=Goto, data=sw-8-out|ptr1, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-5-out, priority=5, label=(null), callerid=(null), appl=NoOp, data=Finish if-sw-endcall3-out-5-6, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-5-out, priority=6, label=(null), callerid=(null), appl=Noop, data=esac, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-5-out, priority=7, label=(null), callerid=(null), appl=Goto, data=s|3, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=s, priority=1, label=(null), callerid=(null), appl=Set, data=type=${ARG1}, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=s, priority=2, label=(null), callerid=(null), appl=Goto, data=sw-10-${type}|1, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=s, priority=3, label=(null), callerid=(null), appl=NoOp, data=Finish switch-endcall4-10, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=s, priority=4, label=(null), callerid=(null), appl=GotoIf, data=$[${testnotnull}]?5:6, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=s, priority=5, label=(null), callerid=(null), appl=Goto, data=sw-14-in|ptr1, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=s, priority=6, label=(null), callerid=(null), appl=NoOp, data=Finish if-endcall4-12, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=s, priority=7, label=(null), callerid=(null), appl=Goto, data=sw-13-${type}|1, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=s, priority=8, label=(null), callerid=(null), appl=NoOp, data=Finish switch-endcall4-13, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-13-out, priority=1, label=(null), callerid=(null), appl=Goto, data=sw-14-${type}|1, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-13-out, priority=2, label=(null), callerid=(null), appl=NoOp, data=Finish switch-sw-endcall4-out-13-14, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-13-out, priority=3, label=(null), callerid=(null), appl=Goto, data=s|8, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-14-in, priority=1, label=(null), callerid=(null), appl=GotoIf, data=$[${testnotnull}]?2:4, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-14-in, priority=2, label=ptr1, callerid=(null), appl=Softhangup, data=${CHANNEL}, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-14-in, priority=3, label=(null), callerid=(null), appl=Goto, data=sw-13-out|2, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-14-in, priority=4, label=(null), callerid=(null), appl=NoOp, data=Finish if-sw-sw-endcall4-out-13-in-14-15, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-14-in, priority=5, label=(null), callerid=(null), appl=Noop, data=esac, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-14-in, priority=6, label=(null), callerid=(null), appl=Goto, data=sw-13-out|2, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-10-out, priority=1, label=(null), callerid=(null), appl=Macro, data=nullchk|callid, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-10-out, priority=2, label=(null), callerid=(null), appl=GotoIf, data=$[${testnotnull}]?3:5, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-10-out, priority=3, label=(null), callerid=(null), appl=Macro, data=endsess, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-10-out, priority=4, label=(null), callerid=(null), appl=Goto, data=sw-14-in|ptr1, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-10-out, priority=5, label=(null), callerid=(null), appl=NoOp, data=Finish if-sw-endcall4-out-10-11, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-10-out, priority=6, label=(null), callerid=(null), appl=Noop, data=esac, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-10-out, priority=7, label=(null), callerid=(null), appl=Goto, data=s|3, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=s, priority=1, label=(null), callerid=(null), appl=Set, data=type=${ARG1}, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=s, priority=2, label=(null), callerid=(null), appl=Goto, data=sw-16-${type}|1, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=s, priority=3, label=(null), callerid=(null), appl=NoOp, data=Finish switch-endcall5-16, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=s, priority=4, label=(null), callerid=(null), appl=GotoIf, data=$[${testnotnull}]?5:6, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=s, priority=5, label=(null), callerid=(null), appl=Goto, data=sw-21-in|ptr1, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=s, priority=6, label=(null), callerid=(null), appl=NoOp, data=Finish if-endcall5-19, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=s, priority=7, label=(null), callerid=(null), appl=Goto, data=sw-20-${type}|1, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=s, priority=8, label=(null), callerid=(null), appl=NoOp, data=Finish switch-endcall5-20, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-20-out, priority=1, label=(null), callerid=(null), appl=Goto, data=sw-21-${type}|1, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-20-out, priority=2, label=(null), callerid=(null), appl=NoOp, data=Finish switch-sw-endcall5-out-20-21, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-20-out, priority=3, label=(null), callerid=(null), appl=Goto, data=s|8, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-21-in, priority=1, label=(null), callerid=(null), appl=GotoIf, data=$[${testnotnull}]?2:4, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-21-in, priority=2, label=ptr1, callerid=(null), appl=Softhangup, data=${CHANNEL}, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-21-in, priority=3, label=(null), callerid=(null), appl=Goto, data=sw-20-out|2, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-21-in, priority=4, label=(null), callerid=(null), appl=NoOp, data=Finish if-sw-sw-endcall5-out-20-in-21-22, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-21-in, priority=5, label=(null), callerid=(null), appl=Noop, data=esac, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-21-in, priority=6, label=(null), callerid=(null), appl=Goto, data=sw-20-out|2, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-16-in, priority=1, label=(null), callerid=(null), appl=Macro, data=nullchk|callid, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-16-in, priority=2, label=ptr2, callerid=(null), appl=GotoIf, data=$[${testnotnull}]?3:5, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-16-in, priority=3, label=(null), callerid=(null), appl=Macro, data=endsess, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-16-in, priority=4, label=(null), callerid=(null), appl=Goto, data=sw-21-in|ptr1, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-16-in, priority=5, label=(null), callerid=(null), appl=NoOp, data=Finish if-sw-endcall5-in-16-18, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-16-in, priority=6, label=(null), callerid=(null), appl=Noop, data=esac, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-16-in, priority=7, label=(null), callerid=(null), appl=Goto, data=s|3, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-16-out, priority=1, label=(null), callerid=(null), appl=Macro, data=nullchk|callid, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-16-out, priority=2, label=(null), callerid=(null), appl=GotoIf, data=$[${testnotnull}]?3:5, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-16-out, priority=3, label=(null), callerid=(null), appl=Macro, data=endsess, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-16-out, priority=4, label=(null), callerid=(null), appl=Goto, data=sw-21-in|ptr1, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-16-out, priority=5, label=(null), callerid=(null), appl=NoOp, data=Finish if-sw-endcall5-out-16-17, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=sw-16-out, priority=6, label=(null), callerid=(null), appl=Goto, data=sw-16-in|1, FREE, registrar=pbx_ael);
+LOG: lev:2 file:../pbx/pbx_ael.c line:3747 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'.
+Executed ast_merge_contexts_and_delete();
+LOG: lev:2 file:../pbx/pbx_ael.c line:3750 func: pbx_load_module AEL load process: merged config file name './extensions.ael'.
+Executed ast_walk_contexts();
+LOG: lev:2 file:../pbx/pbx_ael.c line:3753 func: pbx_load_module AEL load process: verified config file name './extensions.ael'.
+LOG: lev:4 file:ael2_parse line:253 func: main 7 contexts, 17 extensions, 104 priorities
+Executed ast_unregister_file_version();
+Executed ast_unregister_file_version();
+Executed ast_unregister_file_version();
+Executed ast_unregister_file_version();
diff --git a/pbx/ael/ael-test/ref.ael-test11 b/pbx/ael/ael-test/ref.ael-test11
new file mode 100644
index 000000000..581ac6035
--- /dev/null
+++ b/pbx/ael/ael-test/ref.ael-test11
@@ -0,0 +1,11 @@
+Executed ast_register_file_version();
+Executed ast_register_file_version();
+Executed ast_register_file_version();
+Executed ast_register_file_version();
+LOG: lev:2 file:../pbx/pbx_ael.c line:3732 func: pbx_load_module Starting AEL load process.
+LOG: lev:2 file:../pbx/pbx_ael.c line:3739 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
+LOG: lev:2 file:../pbx/pbx_ael.c line:3742 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
+LOG: lev:4 file:../pbx/pbx_ael.c line:1041 func: check_label Error: file ./extensions.ael, line 13-13: Duplicate label lab1! Previously defined at file ./extensions.ael, line 8.
+LOG: lev:4 file:../pbx/pbx_ael.c line:1041 func: check_label Error: file ./extensions.ael, line 49-49: Duplicate label ptr1! Previously defined at file ./extensions.ael, line 33.
+LOG: lev:4 file:../pbx/pbx_ael.c line:3755 func: pbx_load_module Sorry, but 0 syntax errors and 2 semantic errors were detected. It doesn't make sense to compile.
+LOG: lev:4 file:ael2_parse line:253 func: main 0 contexts, 0 extensions, 0 priorities
diff --git a/pbx/ael/ael-test/ref.ael-test3 b/pbx/ael/ael-test/ref.ael-test3
index 4dcc0ce09..afa17f6d2 100644
--- a/pbx/ael/ael-test/ref.ael-test3
+++ b/pbx/ael/ael-test/ref.ael-test3
@@ -1,18 +1,18 @@
Executed ast_register_file_version();
-LOG: lev:2 file:../pbx/pbx_ael.c line:3428 func: pbx_load_module Starting AEL load process.
-LOG: lev:2 file:../pbx/pbx_ael.c line:3435 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
-LOG: lev:2 file:ael.flex line:467 func: ael_yylex --Read in included file ./include1.ael2, 78 chars
-LOG: lev:2 file:ael.flex line:467 func: ael_yylex --Read in included file ./include2.ael2, 98 chars
-LOG: lev:2 file:ael.flex line:467 func: ael_yylex --Read in included file ./include3.ael2, 57 chars
-LOG: lev:2 file:ael.flex line:467 func: ael_yylex --Read in included file ./include5.ael2, 56 chars
-LOG: lev:2 file:ael.flex line:467 func: ael_yylex --Read in included file ./include4.ael2, 87 chars
-LOG: lev:2 file:ael.flex line:467 func: ael_yylex --Read in included file /etc/asterisk/telemarket_torture.ael2, 28036 chars
-LOG: lev:2 file:../pbx/pbx_ael.c line:3438 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
-LOG: lev:3 file:../pbx/pbx_ael.c line:2186 func: check_pval_item Warning: file ./extensions.ael, line 5-5: expression Console/dsp has operators, but no variables. Interesting...
-LOG: lev:3 file:../pbx/pbx_ael.c line:2186 func: check_pval_item Warning: file ./extensions.ael, line 8-8: expression "Joe-Worker" has operators, but no variables. Interesting...
-LOG: lev:3 file:../pbx/pbx_ael.c line:2186 func: check_pval_item Warning: file ./extensions.ael, line 10-10: expression Zap/6 has operators, but no variables. Interesting...
-LOG: lev:2 file:../pbx/pbx_ael.c line:3441 func: pbx_load_module AEL load process: checked config file name './extensions.ael'.
-LOG: lev:2 file:../pbx/pbx_ael.c line:3443 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'.
-LOG: lev:2 file:../pbx/pbx_ael.c line:3446 func: pbx_load_module AEL load process: merged config file name './extensions.ael'.
-LOG: lev:2 file:../pbx/pbx_ael.c line:3449 func: pbx_load_module AEL load process: verified config file name './extensions.ael'.
-LOG: lev:4 file:ael2_parse line:261 func: main 172 contexts, 858 extensions, 2326 priorities
+Executed ast_register_file_version();
+Executed ast_register_file_version();
+Executed ast_register_file_version();
+LOG: lev:2 file:../pbx/pbx_ael.c line:3732 func: pbx_load_module Starting AEL load process.
+LOG: lev:2 file:../pbx/pbx_ael.c line:3739 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
+LOG: lev:2 file:ael.flex line:422 func: ael_yylex --Read in included file ./include1.ael2, 78 chars
+LOG: lev:2 file:ael.flex line:422 func: ael_yylex --Read in included file ./include2.ael2, 98 chars
+LOG: lev:2 file:ael.flex line:422 func: ael_yylex --Read in included file ./include3.ael2, 57 chars
+LOG: lev:2 file:ael.flex line:422 func: ael_yylex --Read in included file ./include5.ael2, 56 chars
+LOG: lev:2 file:ael.flex line:422 func: ael_yylex --Read in included file ./include4.ael2, 87 chars
+LOG: lev:2 file:ael.flex line:422 func: ael_yylex --Read in included file /etc/asterisk/telemarket_torture.ael2, 28036 chars
+LOG: lev:2 file:../pbx/pbx_ael.c line:3742 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
+LOG: lev:2 file:../pbx/pbx_ael.c line:3745 func: pbx_load_module AEL load process: checked config file name './extensions.ael'.
+LOG: lev:2 file:../pbx/pbx_ael.c line:3747 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'.
+LOG: lev:2 file:../pbx/pbx_ael.c line:3750 func: pbx_load_module AEL load process: merged config file name './extensions.ael'.
+LOG: lev:2 file:../pbx/pbx_ael.c line:3753 func: pbx_load_module AEL load process: verified config file name './extensions.ael'.
+LOG: lev:4 file:ael2_parse line:253 func: main 172 contexts, 858 extensions, 2326 priorities
diff --git a/pbx/ael/ael-test/ref.ael-test7 b/pbx/ael/ael-test/ref.ael-test7
index fddd1ed28..b1f5522c1 100644
--- a/pbx/ael/ael-test/ref.ael-test7
+++ b/pbx/ael/ael-test/ref.ael-test7
@@ -1,13 +1,14 @@
Executed ast_register_file_version();
-LOG: lev:2 file:../pbx/pbx_ael.c line:3428 func: pbx_load_module Starting AEL load process.
-LOG: lev:2 file:../pbx/pbx_ael.c line:3435 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
-LOG: lev:2 file:../pbx/pbx_ael.c line:3438 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
-LOG: lev:3 file:../pbx/pbx_ael.c line:2186 func: check_pval_item Warning: file ./extensions.ael, line 6-6: expression Console/dsp has operators, but no variables. Interesting...
-LOG: lev:3 file:../pbx/pbx_ael.c line:2186 func: check_pval_item Warning: file ./extensions.ael, line 10-10: expression pstn-spa3k has operators, but no variables. Interesting...
-LOG: lev:4 file:../pbx/pbx_ael.c line:2055 func: check_pval_item Error: file ./extensions.ael, line 98-98: The macro call to checkanddial has 5 arguments, but the macro definition has 7 arguments
-LOG: lev:4 file:../pbx/pbx_ael.c line:2055 func: check_pval_item Error: file ./extensions.ael, line 107-107: The macro call to checkanddial has 5 arguments, but the macro definition has 7 arguments
-LOG: lev:4 file:../pbx/pbx_ael.c line:2055 func: check_pval_item Error: file ./extensions.ael, line 284-284: The macro call to checkanddial has 5 arguments, but the macro definition has 7 arguments
-LOG: lev:4 file:../pbx/pbx_ael.c line:2055 func: check_pval_item Error: file ./extensions.ael, line 287-287: The macro call to checkanddial has 5 arguments, but the macro definition has 7 arguments
-LOG: lev:4 file:../pbx/pbx_ael.c line:2036 func: check_pval_item Error: file ./extensions.ael, line 452-452: macro call to non-existent std-exten-ael !
-LOG: lev:4 file:../pbx/pbx_ael.c line:3451 func: pbx_load_module Sorry, but 0 syntax errors and 5 semantic errors were detected. It doesn't make sense to compile.
-LOG: lev:4 file:ael2_parse line:261 func: main 0 contexts, 0 extensions, 0 priorities
+Executed ast_register_file_version();
+Executed ast_register_file_version();
+Executed ast_register_file_version();
+LOG: lev:2 file:../pbx/pbx_ael.c line:3732 func: pbx_load_module Starting AEL load process.
+LOG: lev:2 file:../pbx/pbx_ael.c line:3739 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
+LOG: lev:2 file:../pbx/pbx_ael.c line:3742 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
+LOG: lev:4 file:../pbx/pbx_ael.c line:2229 func: check_pval_item Error: file ./extensions.ael, line 98-98: The macro call to checkanddial has 5 arguments, but the macro definition has 7 arguments
+LOG: lev:4 file:../pbx/pbx_ael.c line:2229 func: check_pval_item Error: file ./extensions.ael, line 107-107: The macro call to checkanddial has 5 arguments, but the macro definition has 7 arguments
+LOG: lev:4 file:../pbx/pbx_ael.c line:2229 func: check_pval_item Error: file ./extensions.ael, line 284-284: The macro call to checkanddial has 5 arguments, but the macro definition has 7 arguments
+LOG: lev:4 file:../pbx/pbx_ael.c line:2229 func: check_pval_item Error: file ./extensions.ael, line 287-287: The macro call to checkanddial has 5 arguments, but the macro definition has 7 arguments
+LOG: lev:4 file:../pbx/pbx_ael.c line:2210 func: check_pval_item Error: file ./extensions.ael, line 452-452: macro call to non-existent std-exten-ael !
+LOG: lev:4 file:../pbx/pbx_ael.c line:3755 func: pbx_load_module Sorry, but 0 syntax errors and 5 semantic errors were detected. It doesn't make sense to compile.
+LOG: lev:4 file:ael2_parse line:253 func: main 0 contexts, 0 extensions, 0 priorities