Merged revisions 290255 via svnmerge from
[asterisk/asterisk.git] / pbx / ael / ael-test / ref.ael-vtest17
1
2
3 [dialextens]
4 exten => _10X,1,Dial(Zap/${EXTEN:2},30,tw)
5 exten => _1ZX,1,Dial(Zap/${EXTEN:1},30,tw)
6
7
8 [dialthrus]
9 exten => _3XX,1,Dial(Zap/${EXTEN:1},30,tw)
10
11
12 [t1incoming]
13 include => dialextens
14 include => parkedcalls
15 exten => s,1,Answer()
16 exten => s,2,Background(welcome-to-test-machine)
17
18
19 [incoming]
20 include => dialextens
21 include => parkedcalls
22 exten => s,1,Answer()
23 exten => s,2,Background(welcome-to-test-machine)
24
25
26 [extension]
27 include => dialextens
28 include => dialthrus
29 exten => 5,1,Record(recording:gsm)
30 exten => 5,2,Background(recording)
31 exten => 81,1,Set(iterations=$[1000000])
32 exten => 81,2,Set(time1=${EPOCH})
33 exten => 81,3,Set(i=$[1])
34 exten => 81,4,GotoIf($[${i}<${iterations}]?5:8)
35 exten => 81,5,NoOp(Hello)
36 exten => 81,6,Set(i=$[${i}+1])
37 exten => 81,7,Goto(4)
38 exten => 81,8,NoOp(Finish for_extension_1)
39 exten => 81,9,Set(time2=${EPOCH})
40 exten => 81,10,Verbose(The time diff is $[${time2} - ${time1} ] seconds)
41 exten => 81,11,Verbose(Which means that the priorities/sec = $[4* ${iterations} / (${time2} - ${time1}) ])
42 exten => 81,12,SayNumber($[4 * ${iterations} / (${time2} - ${time1}) ])
43 exten => 82,1,Gosub(ndeep,s,1(100000))
44 exten => 82,2,Verbose(Finished 100000 levels deep call!)
45 exten => 83,1,Set(~~EXTEN~~=${EXTEN})
46 exten => 83,2,Goto(sw_2_${~~EXTEN~~},10)
47 exten => 83,3,NoOp(Finish switch_extension_2)
48 exten => _sw_2_.,10,Goto(83,3)
49 exten => sw_2_,10,Goto(sw_2_.,10)
50 exten => _sw_2_[4-7]X,10,Verbose(and this too!)
51 exten => _sw_2_[4-7]X,11,Goto(sw_2_.,10)
52 exten => _sw_2_9X,10,Verbose(handle both 8x and 9x calls)
53 exten => _sw_2_9X,11,Goto(sw_2_49,10)
54 exten => _sw_2_8X,10,Verbose(do something to prepare it)
55 exten => _sw_2_8X,11,Goto(sw_2_99,10)
56
57
58 [ndeep]
59 exten => s,1,Set(LOCAL(level)=${ARG1})
60 exten => s,2,GotoIf($[${level} == 0]?3:5)
61 exten => s,3,Verbose(2|Got to Level 0)
62 exten => s,4,Return()
63 exten => s,5,NoOp(Finish if_ndeep_3)
64 exten => s,6,Gosub(ndeep,s,1($[${level}-1]))
65 exten => s,7,Return()
66
67
68 [t1extension]
69 include => dialextens
70 include => dialthrus