aboutsummaryrefslogtreecommitdiffstats
path: root/trunk/pbx/ael/ael-test/ael-test11/extensions.ael
blob: a6b2226f8e5a1b544e27841739f4fe661e9981c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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) ;
	  }
   }
	return;
}