3 [dialextens]
4 exten => _10X,1,Dial(Zap/\${EXTEN:2}|30|tw)
5 exten => _1ZX,1,Dial(Zap/\${EXTEN:1}|30|tw)
8 [dialthrus]
9 exten => _3XX,1,Dial(Zap/\${EXTEN:1}|30|tw)
12 [t1incoming]
13 include => dialextens
14 include => parkedcalls
16 exten => s,2,Background(welcome-to-test-machine)
19 [incoming]
20 include => dialextens
21 include => parkedcalls
23 exten => s,2,Background(welcome-to-test-machine)
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,Goto(sw-2-\${EXTEN}|1)
46 exten => 83,2,NoOp(Finish switch-extension-2)
47 exten => _sw-2-[4-7]X,1,Verbose(and this too!)
48 exten => _sw-2-[4-7]X,2,Goto(83|2)
49 exten => _sw-2-9X,1,Verbose(handle both 8x and 9x calls)
50 exten => _sw-2-9X,2,Goto(sw-2-49|1)
51 exten => _sw-2-8X,1,Verbose(do something to prepare it)
52 exten => _sw-2-8X,2,Goto(sw-2-99|1)
55 [ndeep]
56 exten => s,1,Set(level=\${ARG1})
57 exten => s,2,GotoIf(\$[\${level} == 0]?3:5)
58 exten => s,3,Verbose(2|Got to Level 0)
59 exten => s,4,Return()
60 exten => s,5,NoOp(Finish if-ndeep-3)
61 exten => s,6,Gosub(ndeep|s|1(\$[\${level}-1]))
62 exten => s,7,Return()
65 [t1extension]
66 include => dialextens
67 include => dialthrus