Bug 8128 fixed in this release via these changes

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@45103 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Steve Murphy
2006-10-13 20:52:17 +00:00
parent a05d2ebb96
commit dc04209898
4 changed files with 226 additions and 13 deletions

View File

@@ -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;
}

View File

@@ -2,17 +2,20 @@
(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:3803 func: pbx_load_module Starting AEL load process.
LOG: lev:2 file:pbx_ael.c line:3810 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
LOG: lev:2 file:pbx_ael.c line:3856 func: pbx_load_module Starting AEL load process.
LOG: lev:2 file:pbx_ael.c line:3863 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:3818 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
LOG: lev:2 file:pbx_ael.c line:3821 func: pbx_load_module AEL load process: checked config file name './extensions.ael'.
LOG: lev:2 file:pbx_ael.c line:3823 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'.
LOG: lev:2 file:pbx_ael.c line:3826 func: pbx_load_module AEL load process: merged config file name './extensions.ael'.
LOG: lev:2 file:pbx_ael.c line:3829 func: pbx_load_module AEL load process: verified config file name './extensions.ael'.
LOG: lev:2 file:pbx_ael.c line:3871 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
LOG: lev:3 file:pbx_ael.c line:816 func: check_includes Warning: file ./extensions.ael, line 2747-2751: The included context 'parkedcalls' cannot be found.
LOG: lev:3 file:pbx_ael.c line:816 func: check_includes Warning: file ./extensions.ael, line 2954-2957: The included context 'parkedcalls' cannot be found.
LOG: lev:3 file:pbx_ael.c line:816 func: check_includes Warning: file ./extensions.ael, line 3005-3012: The included context 'parkedcalls' cannot be found.
LOG: lev:2 file:pbx_ael.c line:3874 func: pbx_load_module AEL load process: checked config file name './extensions.ael'.
LOG: lev:2 file:pbx_ael.c line:3876 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'.
LOG: lev:2 file:pbx_ael.c line:3879 func: pbx_load_module AEL load process: merged config file name './extensions.ael'.
LOG: lev:2 file:pbx_ael.c line:3882 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, 2326 priorities

View File

@@ -0,0 +1,68 @@
[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,Macro(ndeep|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)
[macro-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,Goto(8)
exten => s,5,NoOp(Finish if-ndeep-3)
exten => s,6,Macro(ndeep|$[${level}-1])
exten => s,7,Goto(8)
exten => s,8,NoOp(End of Macro ndeep-s)
[t1extension]
include => dialextens
include => dialthrus