aboutsummaryrefslogtreecommitdiffstats
path: root/pbx/ael
diff options
context:
space:
mode:
authormurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2006-10-13 18:08:33 +0000
committermurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2006-10-13 18:08:33 +0000
commite38441a0ee22fa1dc9dd9fc2b007d79080a4f69d (patch)
tree91d193b521e404bf87011e2d856d05355d77b01e /pbx/ael
parent8b605c60dea81cee1cdcf9dadb3ad8380513d566 (diff)
Correction for bug 8128 in trunk
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45078 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx/ael')
-rw-r--r--pbx/ael/ael-test/ael-vtest17/extensions.ael116
-rw-r--r--pbx/ael/ael-test/ref.ael-test319
-rw-r--r--pbx/ael/ael-test/ref.ael-vtest1767
3 files changed, 194 insertions, 8 deletions
diff --git a/pbx/ael/ael-test/ael-vtest17/extensions.ael b/pbx/ael/ael-test/ael-vtest17/extensions.ael
new file mode 100644
index 000000000..d13fe99d7
--- /dev/null
+++ b/pbx/ael/ael-test/ael-vtest17/extensions.ael
@@ -0,0 +1,116 @@
+context dialextens
+{
+ /*
+ 101 thru 123, 149 thru 152
+ */
+ _10X => Dial(Zap/${EXTEN:2},30,tw);
+ _1ZX => Dial(Zap/${EXTEN:1},30,tw);
+}
+/*
+ Due to extenal wiring:
+
+ dialing 125 will ring 101
+ dialing 126 will ring 102
+ and so on until
+ dialing 147 will ring 123
+
+We can dial out on zap 69 thru 72; and 25-47
+
+*/
+
+context dialthrus
+{
+ /* 369-372; 325-347 */
+ _3XX => Dial(Zap/${EXTEN:1},30,tw);
+}
+
+context t1incoming
+{
+ includes
+ {
+ dialextens;
+ parkedcalls;
+ }
+ s => {
+ Answer();
+ Background(welcome-to-test-machine);
+ }
+
+}
+
+context t1extension
+{
+ includes
+ {
+ dialextens;
+ dialthrus;
+ }
+
+}
+
+context incoming
+{
+ includes
+ {
+ dialextens;
+ parkedcalls;
+ }
+ s => {
+ Answer();
+ Background(welcome-to-test-machine);
+ }
+}
+
+context extension
+{
+ includes
+ {
+ dialextens;
+ dialthrus;
+ }
+ 5 => {
+ Record(recording:gsm);
+ Background(recording);
+ }
+
+ 81 => {
+ iterations=1000000;
+ Set(time1=${EPOCH});
+ for(i=1; ${i}<${iterations}; i=${i}+1)
+ {
+ NoOp(Hello);
+ }
+ Set(time2=${EPOCH});
+ Verbose(The time diff is $[${time2} - ${time1} ] seconds);
+ Verbose(Which means that the priorities/sec = $[4* ${iterations} / (${time2} - ${time1}) ]);
+ SayNumber($[4 * ${iterations} / (${time2} - ${time1}) ]);
+ }
+ 82 => {
+ &ndeep(100000);
+ Verbose(Finished 100000 levels deep call!);
+ }
+ 83 => {
+ switch (${EXTEN})
+ {
+ pattern 8X:
+ Verbose(do something to prepare it);
+ pattern 9X:
+ Verbose(handle both 8x and 9x calls);
+ pattern [4-7]X:
+ Verbose(and this too!);
+
+ }
+
+ }
+}
+
+macro ndeep(level)
+{
+ if( ${level} == 0)
+ {
+ Verbose(2|Got to Level 0);
+ return;
+ }
+ &ndeep($[${level}-1]);
+ return;
+}
diff --git a/pbx/ael/ael-test/ref.ael-test3 b/pbx/ael/ael-test/ref.ael-test3
index 4b65c8cbe..fdd79f177 100644
--- a/pbx/ael/ael-test/ref.ael-test3
+++ b/pbx/ael/ael-test/ref.ael-test3
@@ -2,17 +2,17 @@
(If you find progress and other non-error messages irritating, you can use -q to suppress them)
(You can use the -w option to dump extensions.conf format to extensions.conf.aeldump)
-LOG: lev:2 file:pbx_ael.c line:3910 func: pbx_load_module Starting AEL load process.
-LOG: lev:2 file:pbx_ael.c line:3917 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:3941 func: pbx_load_module Starting AEL load process.
+LOG: lev:2 file:pbx_ael.c line:3948 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
LOG: lev:2 file:ael.flex line:429 func: ael_yylex --Read in included file ./include1.ael2, 78 chars
LOG: lev:2 file:ael.flex line:429 func: ael_yylex --Read in included file ./include2.ael2, 98 chars
LOG: lev:2 file:ael.flex line:429 func: ael_yylex --Read in included file ./include3.ael2, 57 chars
LOG: lev:2 file:ael.flex line:429 func: ael_yylex --Read in included file ./include5.ael2, 56 chars
LOG: lev:2 file:ael.flex line:429 func: ael_yylex --Read in included file ./include4.ael2, 87 chars
LOG: lev:2 file:ael.flex line:429 func: ael_yylex --Read in included file ./telemarket_torture.ael2, 28036 chars
-LOG: lev:2 file:pbx_ael.c line:3925 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:3956 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
LOG: lev:3 file:pbx_ael.c line:712 func: check_macro_returns Warning: file ./extensions.ael, line 14-34: The macro std-exten does not end with a return; I will insert one.
-LOG: lev:3 file:pbx_ael.c line:1352 func: check_goto Warning: file ./extensions.ael, line 17-17: It's bad form to have a goto in a macro to a target outside the macro!
+LOG: lev:3 file:pbx_ael.c line:1378 func: check_goto Warning: file ./extensions.ael, line 17-17: It's bad form to have a goto in a macro to a target outside the macro!
LOG: lev:3 file:pbx_ael.c line:712 func: check_macro_returns Warning: file ./extensions.ael, line 36-59: The macro std-priv-exten_1 does not end with a return; I will insert one.
LOG: lev:3 file:pbx_ael.c line:712 func: check_macro_returns Warning: file ./extensions.ael, line 62-85: The macro std-priv-exten_2 does not end with a return; I will insert one.
LOG: lev:3 file:pbx_ael.c line:712 func: check_macro_returns Warning: file ./extensions.ael, line 88-111: The macro std-priv-exten_3 does not end with a return; I will insert one.
@@ -93,8 +93,11 @@ LOG: lev:3 file:pbx_ael.c line:712 func: check_macro_returns Warning: file ./e
LOG: lev:3 file:pbx_ael.c line:712 func: check_macro_returns Warning: file ./extensions.ael, line 2030-2048: The macro ciddial2 does not end with a return; I will insert one.
LOG: lev:3 file:pbx_ael.c line:712 func: check_macro_returns Warning: file ./extensions.ael, line 2050-2065: The macro callerid-liar does not end with a return; I will insert one.
LOG: lev:3 file:pbx_ael.c line:712 func: check_macro_returns Warning: file ./extensions.ael, line 2067-2072: The macro callerid-bad does not end with a return; I will insert one.
-LOG: lev:2 file:pbx_ael.c line:3928 func: pbx_load_module AEL load process: checked config file name './extensions.ael'.
-LOG: lev:2 file:pbx_ael.c line:3930 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'.
-LOG: lev:2 file:pbx_ael.c line:3933 func: pbx_load_module AEL load process: merged config file name './extensions.ael'.
-LOG: lev:2 file:pbx_ael.c line:3936 func: pbx_load_module AEL load process: verified config file name './extensions.ael'.
+LOG: lev:3 file:pbx_ael.c line:863 func: check_includes Warning: file ./extensions.ael, line 2748-2752: The included context 'parkedcalls' cannot be found.
+LOG: lev:3 file:pbx_ael.c line:863 func: check_includes Warning: file ./extensions.ael, line 2955-2958: The included context 'parkedcalls' cannot be found.
+LOG: lev:3 file:pbx_ael.c line:863 func: check_includes Warning: file ./extensions.ael, line 3006-3013: The included context 'parkedcalls' cannot be found.
+LOG: lev:2 file:pbx_ael.c line:3959 func: pbx_load_module AEL load process: checked config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:3961 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:3964 func: pbx_load_module AEL load process: merged config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c line:3967 func: pbx_load_module AEL load process: verified config file name './extensions.ael'.
LOG: lev:4 file:ael2_parse line:479 func: main 172 contexts, 858 extensions, 2406 priorities
diff --git a/pbx/ael/ael-test/ref.ael-vtest17 b/pbx/ael/ael-test/ref.ael-vtest17
new file mode 100644
index 000000000..bf181547b
--- /dev/null
+++ b/pbx/ael/ael-test/ref.ael-vtest17
@@ -0,0 +1,67 @@
+
+
+[dialextens]
+exten => _10X,1,Dial(Zap/${EXTEN:2}|30|tw)
+exten => _1ZX,1,Dial(Zap/${EXTEN:1}|30|tw)
+
+
+[dialthrus]
+exten => _3XX,1,Dial(Zap/${EXTEN:1}|30|tw)
+
+
+[t1incoming]
+include => dialextens
+include => parkedcalls
+exten => s,1,Answer()
+exten => s,2,Background(welcome-to-test-machine)
+
+
+[incoming]
+include => dialextens
+include => parkedcalls
+exten => s,1,Answer()
+exten => s,2,Background(welcome-to-test-machine)
+
+
+[extension]
+include => dialextens
+include => dialthrus
+exten => 5,1,Record(recording:gsm)
+exten => 5,2,Background(recording)
+exten => 81,1,Set(iterations=$[1000000])
+exten => 81,2,Set(time1=${EPOCH})
+exten => 81,3,Set(i=$[1])
+exten => 81,4,GotoIf($[${i}<${iterations}]?5:8)
+exten => 81,5,NoOp(Hello)
+exten => 81,6,Set(i=$[${i}+1])
+exten => 81,7,Goto(4)
+exten => 81,8,NoOp(Finish for-extension-1)
+exten => 81,9,Set(time2=${EPOCH})
+exten => 81,10,Verbose(The time diff is $[${time2} - ${time1} ] seconds)
+exten => 81,11,Verbose(Which means that the priorities/sec = $[4* ${iterations} / (${time2} - ${time1}) ])
+exten => 81,12,SayNumber($[4 * ${iterations} / (${time2} - ${time1}) ])
+exten => 82,1,Gosub(ndeep|s|1(100000))
+exten => 82,2,Verbose(Finished 100000 levels deep call!)
+exten => 83,1,Goto(sw-2-${EXTEN}|1)
+exten => 83,2,NoOp(Finish switch-extension-2)
+exten => _sw-2-[4-7]X,1,Verbose(and this too!)
+exten => _sw-2-[4-7]X,2,Goto(83|2)
+exten => _sw-2-9X,1,Verbose(handle both 8x and 9x calls)
+exten => _sw-2-9X,2,Goto(sw-2-49|1)
+exten => _sw-2-8X,1,Verbose(do something to prepare it)
+exten => _sw-2-8X,2,Goto(sw-2-99|1)
+
+
+[ndeep]
+exten => s,1,Set(level=${ARG1})
+exten => s,2,GotoIf($[${level} == 0]?3:5)
+exten => s,3,Verbose(2|Got to Level 0)
+exten => s,4,Return()
+exten => s,5,NoOp(Finish if-ndeep-3)
+exten => s,6,Gosub(ndeep|s|1($[${level}-1]))
+exten => s,7,Return()
+
+
+[t1extension]
+include => dialextens
+include => dialthrus