| 1 |
macro endsess() |
| 2 |
{ |
| 3 |
NoOp(hithere); |
| 4 |
} |
| 5 |
|
| 6 |
macro nullchk(type) |
| 7 |
{ |
| 8 |
NoOp(${type} is this); |
| 9 |
} |
| 10 |
|
| 11 |
macro endcall(type) { |
| 12 |
switch(${type}) { |
| 13 |
case out: |
| 14 |
&nullchk(callid); |
| 15 |
if(${testnotnull}) { |
| 16 |
&endsess(); |
| 17 |
goto ptr1 ; // <-- goto call to valid label |
| 18 |
} |
| 19 |
else { |
| 20 |
ptr1: // <-- valid label |
| 21 |
Softhangup(${CHANNEL}); |
| 22 |
break ; |
| 23 |
} |
| 24 |
Noop(esac) ; |
| 25 |
} |
| 26 |
} |
| 27 |
|
| 28 |
macro endcall2(type) { |
| 29 |
switch(${type}) { |
| 30 |
case out: |
| 31 |
&nullchk(callid); |
| 32 |
if(${testnotnull}) { |
| 33 |
&endsess(); |
| 34 |
goto ptr1 ; // <-- goto call to valid label |
| 35 |
} |
| 36 |
case out2: |
| 37 |
{ |
| 38 |
ptr1: // <-- valid label |
| 39 |
Softhangup(${CHANNEL}); |
| 40 |
break ; |
| 41 |
} |
| 42 |
Noop(esac) ; |
| 43 |
} |
| 44 |
} |
| 45 |
|
| 46 |
macro endcall3(type) { |
| 47 |
switch(${type}) { |
| 48 |
case out: |
| 49 |
&nullchk(callid); |
| 50 |
if(${testnotnull}) { |
| 51 |
&endsess(); |
| 52 |
goto ptr1 ; // <-- goto call to valid label |
| 53 |
} |
| 54 |
Noop(esac) ; |
| 55 |
} |
| 56 |
if(${testnotnull}) { |
| 57 |
goto ptr1; |
| 58 |
} |
| 59 |
switch(${type}) { |
| 60 |
case out: |
| 61 |
if(${testnotnull}) { |
| 62 |
ptr1: // <-- valid label |
| 63 |
Softhangup(${CHANNEL}); |
| 64 |
break ; |
| 65 |
} |
| 66 |
Noop(esac) ; |
| 67 |
} |
| 68 |
} |
| 69 |
|
| 70 |
macro endcall4(type) { |
| 71 |
switch(${type}) { |
| 72 |
case out: |
| 73 |
&nullchk(callid); |
| 74 |
if(${testnotnull}) { |
| 75 |
&endsess(); |
| 76 |
goto ptr1 ; // <-- goto call to valid label |
| 77 |
} |
| 78 |
Noop(esac) ; |
| 79 |
} |
| 80 |
if(${testnotnull}) { |
| 81 |
goto ptr1; |
| 82 |
} |
| 83 |
switch(${type}) { |
| 84 |
case out: |
| 85 |
switch(${type}) |
| 86 |
{ |
| 87 |
case in: |
| 88 |
if(${testnotnull}) { |
| 89 |
ptr1: // <-- valid label |
| 90 |
Softhangup(${CHANNEL}); |
| 91 |
break ; |
| 92 |
} |
| 93 |
Noop(esac) ; |
| 94 |
} |
| 95 |
} |
| 96 |
} |
| 97 |
|
| 98 |
macro endcall5(type) { |
| 99 |
switch(${type}) { |
| 100 |
case out: |
| 101 |
&nullchk(callid); |
| 102 |
if(${testnotnull}) { |
| 103 |
&endsess(); |
| 104 |
goto ptr1 ; // <-- goto call to valid label |
| 105 |
} |
| 106 |
case in: |
| 107 |
&nullchk(callid); |
| 108 |
ptr2: |
| 109 |
if(${testnotnull}) { |
| 110 |
&endsess(); |
| 111 |
goto ptr1 ; // <-- goto call to valid label |
| 112 |
} |
| 113 |
Noop(esac) ; |
| 114 |
} |
| 115 |
if(${testnotnull}) { |
| 116 |
goto ptr1; |
| 117 |
} |
| 118 |
switch(${type}) { |
| 119 |
case out: |
| 120 |
switch(${type}) |
| 121 |
{ |
| 122 |
case in: |
| 123 |
if(${testnotnull}) { |
| 124 |
ptr1: // <-- valid label |
| 125 |
Softhangup(${CHANNEL}); |
| 126 |
break ; |
| 127 |
} |
| 128 |
Noop(esac) ; |
| 129 |
} |
| 130 |
} |
| 131 |
} |