diff options
Diffstat (limited to 'pbx/ael')
91 files changed, 0 insertions, 24146 deletions
diff --git a/pbx/ael/ael-test/ael-ntest10/extensions.ael b/pbx/ael/ael-test/ael-ntest10/extensions.ael deleted file mode 100644 index 4a8386ccf..000000000 --- a/pbx/ael/ael-test/ael-ntest10/extensions.ael +++ /dev/null @@ -1,131 +0,0 @@ -macro endsess() -{ - NoOp(hithere); -} - -macro nullchk(type) -{ - NoOp(${type} is this); -} - -macro endcall(type) { - switch(${type}) { - case out: - &nullchk(callid); - if(${testnotnull}) { - &endsess(); - goto ptr1 ; // <-- goto call to valid label - } - else { -ptr1: // <-- valid label - Softhangup(${CHANNEL}); - break ; - } - Noop(esac) ; - } -} - -macro endcall2(type) { - switch(${type}) { - case out: - &nullchk(callid); - if(${testnotnull}) { - &endsess(); - goto ptr1 ; // <-- goto call to valid label - } - case out2: - { -ptr1: // <-- valid label - Softhangup(${CHANNEL}); - break ; - } - Noop(esac) ; - } -} - -macro endcall3(type) { - switch(${type}) { - case out: - &nullchk(callid); - if(${testnotnull}) { - &endsess(); - goto ptr1 ; // <-- goto call to valid label - } - Noop(esac) ; - } - if(${testnotnull}) { - goto ptr1; - } - switch(${type}) { - case out: - if(${testnotnull}) { -ptr1: // <-- valid label - Softhangup(${CHANNEL}); - break ; - } - Noop(esac) ; - } -} - -macro endcall4(type) { - switch(${type}) { - case out: - &nullchk(callid); - if(${testnotnull}) { - &endsess(); - goto ptr1 ; // <-- goto call to valid label - } - Noop(esac) ; - } - if(${testnotnull}) { - goto ptr1; - } - switch(${type}) { - case out: - switch(${type}) - { - case in: - if(${testnotnull}) { -ptr1: // <-- valid label - Softhangup(${CHANNEL}); - break ; - } - Noop(esac) ; - } - } -} - -macro endcall5(type) { - switch(${type}) { - case out: - &nullchk(callid); - if(${testnotnull}) { - &endsess(); - goto ptr1 ; // <-- goto call to valid label - } - case in: - &nullchk(callid); - ptr2: - if(${testnotnull}) { - &endsess(); - goto ptr1 ; // <-- goto call to valid label - } - Noop(esac) ; - } - if(${testnotnull}) { - goto ptr1; - } - switch(${type}) { - case out: - switch(${type}) - { - case in: - if(${testnotnull}) { -ptr1: // <-- valid label - Softhangup(${CHANNEL}); - break ; - } - Noop(esac) ; - } - } -} diff --git a/pbx/ael/ael-test/ael-ntest12/extensions.ael b/pbx/ael/ael-test/ael-ntest12/extensions.ael deleted file mode 100644 index 1e3183358..000000000 --- a/pbx/ael/ael-test/ael-ntest12/extensions.ael +++ /dev/null @@ -1,13 +0,0 @@ -context test1 -{ - 771 => { - for( i=0; - ${i} <= 3; - i = ${i} + 1 ) - NoOp(i is '${i}'); - } - 772 => { - for(i=0; ${i} <= 3;i= ${i} + 1 ) - NoOp(i is '${i}'); - } -} diff --git a/pbx/ael/ael-test/ael-ntest22/extensions.ael b/pbx/ael/ael-test/ael-ntest22/extensions.ael deleted file mode 100644 index b787f4b03..000000000 --- a/pbx/ael/ael-test/ael-ntest22/extensions.ael +++ /dev/null @@ -1,7 +0,0 @@ -#include "t1/*.ael" - -context z -{ - 123 => NoOp(hi there, z); - 124 => NoOp(hi there, z); -} diff --git a/pbx/ael/ael-test/ael-ntest22/qq.ael b/pbx/ael/ael-test/ael-ntest22/qq.ael deleted file mode 100644 index c446f53fc..000000000 --- a/pbx/ael/ael-test/ael-ntest22/qq.ael +++ /dev/null @@ -1,6 +0,0 @@ - - -context qq -{ - 567 => NoOp(hi there, qq); -} diff --git a/pbx/ael/ael-test/ael-ntest22/t1/a.ael b/pbx/ael/ael-test/ael-ntest22/t1/a.ael deleted file mode 100644 index 62e3fc588..000000000 --- a/pbx/ael/ael-test/ael-ntest22/t1/a.ael +++ /dev/null @@ -1,4 +0,0 @@ -context a -{ - 134 => NoOp(hi there, a); -} diff --git a/pbx/ael/ael-test/ael-ntest22/t1/b.ael b/pbx/ael/ael-test/ael-ntest22/t1/b.ael deleted file mode 100644 index 29d8d1ff4..000000000 --- a/pbx/ael/ael-test/ael-ntest22/t1/b.ael +++ /dev/null @@ -1,6 +0,0 @@ - - -context b -{ - 456 => NoOp(hithere, b); -} diff --git a/pbx/ael/ael-test/ael-ntest22/t1/c.ael b/pbx/ael/ael-test/ael-ntest22/t1/c.ael deleted file mode 100644 index 3c6df4bde..000000000 --- a/pbx/ael/ael-test/ael-ntest22/t1/c.ael +++ /dev/null @@ -1,13 +0,0 @@ - - -context c -{ - 567 => NoOp(hi there, c); -} - -#include "t2/*.ael" - -context w -{ - 890 => NoOp(hi there, w); -} diff --git a/pbx/ael/ael-test/ael-ntest22/t2/d.ael b/pbx/ael/ael-test/ael-ntest22/t2/d.ael deleted file mode 100644 index 6362278f7..000000000 --- a/pbx/ael/ael-test/ael-ntest22/t2/d.ael +++ /dev/null @@ -1,4 +0,0 @@ -context d -{ - 134 => NoOp(hi there, d); -} diff --git a/pbx/ael/ael-test/ael-ntest22/t2/e.ael b/pbx/ael/ael-test/ael-ntest22/t2/e.ael deleted file mode 100644 index 9465c8b4e..000000000 --- a/pbx/ael/ael-test/ael-ntest22/t2/e.ael +++ /dev/null @@ -1,6 +0,0 @@ - - -context e -{ - 456 => NoOp(hithere, e); -} diff --git a/pbx/ael/ael-test/ael-ntest22/t2/f.ael b/pbx/ael/ael-test/ael-ntest22/t2/f.ael deleted file mode 100644 index ba15a6389..000000000 --- a/pbx/ael/ael-test/ael-ntest22/t2/f.ael +++ /dev/null @@ -1,9 +0,0 @@ -#include "qq.ael" - -context f -{ - 567 => NoOp(hi there, f); -} - -#include "t3/*.ael" - diff --git a/pbx/ael/ael-test/ael-ntest22/t3/g.ael b/pbx/ael/ael-test/ael-ntest22/t3/g.ael deleted file mode 100644 index 0f1ecc805..000000000 --- a/pbx/ael/ael-test/ael-ntest22/t3/g.ael +++ /dev/null @@ -1,4 +0,0 @@ -context g -{ - 134 => NoOp(hi there, g); -} diff --git a/pbx/ael/ael-test/ael-ntest22/t3/h.ael b/pbx/ael/ael-test/ael-ntest22/t3/h.ael deleted file mode 100644 index f9e3ca89f..000000000 --- a/pbx/ael/ael-test/ael-ntest22/t3/h.ael +++ /dev/null @@ -1,6 +0,0 @@ - - -context h -{ - 456 => NoOp(hithere, h); -} diff --git a/pbx/ael/ael-test/ael-ntest22/t3/i.ael b/pbx/ael/ael-test/ael-ntest22/t3/i.ael deleted file mode 100644 index 5639a1e98..000000000 --- a/pbx/ael/ael-test/ael-ntest22/t3/i.ael +++ /dev/null @@ -1,4 +0,0 @@ -context i -{ - 134 => NoOp(hi there, i); -} diff --git a/pbx/ael/ael-test/ael-ntest22/t3/j.ael b/pbx/ael/ael-test/ael-ntest22/t3/j.ael deleted file mode 100644 index 8dfc6c05f..000000000 --- a/pbx/ael/ael-test/ael-ntest22/t3/j.ael +++ /dev/null @@ -1,6 +0,0 @@ - - -context j -{ - 567 => NoOp(hi there, j); -} diff --git a/pbx/ael/ael-test/ael-ntest23/extensions.ael b/pbx/ael/ael-test/ael-ntest23/extensions.ael deleted file mode 100644 index 7128258ed..000000000 --- a/pbx/ael/ael-test/ael-ntest23/extensions.ael +++ /dev/null @@ -1,7 +0,0 @@ -#include "t1/*.ael" - -context z () -{ - 123 => NoOp(hi there, z); - 124 => NoOp(hi there, z); -} diff --git a/pbx/ael/ael-test/ael-ntest23/qq.ael b/pbx/ael/ael-test/ael-ntest23/qq.ael deleted file mode 100644 index c446f53fc..000000000 --- a/pbx/ael/ael-test/ael-ntest23/qq.ael +++ /dev/null @@ -1,6 +0,0 @@ - - -context qq -{ - 567 => NoOp(hi there, qq); -} diff --git a/pbx/ael/ael-test/ael-ntest23/t1/a.ael b/pbx/ael/ael-test/ael-ntest23/t1/a.ael deleted file mode 100644 index 62e3fc588..000000000 --- a/pbx/ael/ael-test/ael-ntest23/t1/a.ael +++ /dev/null @@ -1,4 +0,0 @@ -context a -{ - 134 => NoOp(hi there, a); -} diff --git a/pbx/ael/ael-test/ael-ntest23/t1/b.ael b/pbx/ael/ael-test/ael-ntest23/t1/b.ael deleted file mode 100644 index 29d8d1ff4..000000000 --- a/pbx/ael/ael-test/ael-ntest23/t1/b.ael +++ /dev/null @@ -1,6 +0,0 @@ - - -context b -{ - 456 => NoOp(hithere, b); -} diff --git a/pbx/ael/ael-test/ael-ntest23/t1/c.ael b/pbx/ael/ael-test/ael-ntest23/t1/c.ael deleted file mode 100644 index d18eb7677..000000000 --- a/pbx/ael/ael-test/ael-ntest23/t1/c.ael +++ /dev/null @@ -1,13 +0,0 @@ - - -context c() -{ - 567 => NoOp(hi there, c); -} - -#include "t2/*.ael" - -context w() -{ - 890 => NoOp(hi there, w); -} diff --git a/pbx/ael/ael-test/ael-ntest23/t2/d.ael b/pbx/ael/ael-test/ael-ntest23/t2/d.ael deleted file mode 100644 index 6362278f7..000000000 --- a/pbx/ael/ael-test/ael-ntest23/t2/d.ael +++ /dev/null @@ -1,4 +0,0 @@ -context d -{ - 134 => NoOp(hi there, d); -} diff --git a/pbx/ael/ael-test/ael-ntest23/t2/e.ael b/pbx/ael/ael-test/ael-ntest23/t2/e.ael deleted file mode 100644 index 9465c8b4e..000000000 --- a/pbx/ael/ael-test/ael-ntest23/t2/e.ael +++ /dev/null @@ -1,6 +0,0 @@ - - -context e -{ - 456 => NoOp(hithere, e); -} diff --git a/pbx/ael/ael-test/ael-ntest23/t2/f.ael b/pbx/ael/ael-test/ael-ntest23/t2/f.ael deleted file mode 100644 index ba15a6389..000000000 --- a/pbx/ael/ael-test/ael-ntest23/t2/f.ael +++ /dev/null @@ -1,9 +0,0 @@ -#include "qq.ael" - -context f -{ - 567 => NoOp(hi there, f); -} - -#include "t3/*.ael" - diff --git a/pbx/ael/ael-test/ael-ntest23/t3/g.ael b/pbx/ael/ael-test/ael-ntest23/t3/g.ael deleted file mode 100644 index 0f1ecc805..000000000 --- a/pbx/ael/ael-test/ael-ntest23/t3/g.ael +++ /dev/null @@ -1,4 +0,0 @@ -context g -{ - 134 => NoOp(hi there, g); -} diff --git a/pbx/ael/ael-test/ael-ntest23/t3/h.ael b/pbx/ael/ael-test/ael-ntest23/t3/h.ael deleted file mode 100644 index f9e3ca89f..000000000 --- a/pbx/ael/ael-test/ael-ntest23/t3/h.ael +++ /dev/null @@ -1,6 +0,0 @@ - - -context h -{ - 456 => NoOp(hithere, h); -} diff --git a/pbx/ael/ael-test/ael-ntest23/t3/i.ael b/pbx/ael/ael-test/ael-ntest23/t3/i.ael deleted file mode 100644 index 5639a1e98..000000000 --- a/pbx/ael/ael-test/ael-ntest23/t3/i.ael +++ /dev/null @@ -1,4 +0,0 @@ -context i -{ - 134 => NoOp(hi there, i); -} diff --git a/pbx/ael/ael-test/ael-ntest23/t3/j.ael b/pbx/ael/ael-test/ael-ntest23/t3/j.ael deleted file mode 100644 index 8dfc6c05f..000000000 --- a/pbx/ael/ael-test/ael-ntest23/t3/j.ael +++ /dev/null @@ -1,6 +0,0 @@ - - -context j -{ - 567 => NoOp(hi there, j); -} diff --git a/pbx/ael/ael-test/ael-ntest9/extensions.ael b/pbx/ael/ael-test/ael-ntest9/extensions.ael deleted file mode 100755 index b9762ed54..000000000 --- a/pbx/ael/ael-test/ael-ntest9/extensions.ael +++ /dev/null @@ -1,12 +0,0 @@ - -context workext { - ignorepat => 8; - ignorepat => 9; - 793 => { - Set(QUERYSTRING=SELECT\ foo\,\ bar\ FROM\ foobar); - Verbose(2|${QUERYSTRING}); - query="SELECT foo\, bar FROM foobar" ; - Verbose(2|${query}) ; - } -} - diff --git a/pbx/ael/ael-test/ael-test1/extensions.ael b/pbx/ael/ael-test/ael-test1/extensions.ael deleted file mode 100644 index e1943f67c..000000000 --- a/pbx/ael/ael-test/ael-test1/extensions.ael +++ /dev/null @@ -1,163 +0,0 @@ - -macro testdial(number, timeout) { - Dial(IAX2/vpconnect-t02/${number},${timeout},${OG_DIAL_FLAGS}); - switch (${DIALSTATUS}) { - case CHANUNAVAIL: - goto dial-trunk2; - break; - default: - NoOp(t02 Unavailable - ${DIALSTATUS}); - return; - } - -dial-trunk2: - Dial(IAX2/vpconnect-t01/${number},${timeout},${OG_DIAL_FLAGS}); - -} - -macro exten-gen(name,pword) -{ - if( ${DB_EXISTS(org/${GroupID}/${name}/secret)} = 0 ) - goto other|nomatch|begin; - if( ${DB(org/${GroupID}/${name}/secret)}foo != ${pword}foo ) - goto other|nomatch|begin; - -}; - -context what { - who => - { - random(51) NoOp(This should appear 51% of the time); - - random( 60 ) - { - NoOp( This should appear 60% of the time ); - } - else - { - random(75) - { - NoOp( This should appear 30% of the time! ); - } - else - { - NoOp( This should appear 10% of the time! ); - } - } - } -} - -context other { - nomatch => { - begin: - NoOp(Hello!); - switch(${DIALSTATUS}) - { - case BUSY: - NoOp(wow); - case TORTURE: - NoOp(woow); - }; - NoOp(woohoo); - }; -}; - -context testloop { - includes { - other|16:00-23:59|m0n-fri|*|*; - }; - - 1 => { - for (x=0; ${x} < 3; x=${x} + 1) { - Verbose(x is ${x} !); - if( ${x} = 1 ) - continue; - if( ${x} = 2 ) - break; - }; - ifTime(14:00-25:00|sat-sun|*|*) { - BackGround(Hello); - } else - BackGround(Sorry); - NoOp(This is a totally useless NOOP); - }; - 2 => { - y=10; - while (${y} >= 0) { - Verbose(y is ${y} !); - if( ${y} = 1 ) - continue; - if( ${y} = 2 ) - break; - if( ${y} = 3 ) - return; - y=${y}-1; - }; - }; - regexten hint(nasty/Thingy&nasty/Thingamabob) 3 => { - for (x=0; ${x} < 3; x=${x} + 1) - { - Verbose(x is ${x} !); - if( ${x} = 4 ) - break; - if( ${x} = 5 ) - continue; - if( ${x} = 6 ) - return; - - y=10; - while (${y} >= 0) - { - Verbose(y is ${y} !); - if( ${y} = 4 ) - break; - if( ${y} = 5 ) - continue; - if( ${y} = 6 ) - return; - y=${y}-1; - }; - }; - }; - 4 => { - y=10; - while (${y} >= 0) - { - Verbose(y is ${y} !); - if( ${y} = 4 ) - break; - if( ${y} = 5 ) - continue; - if( ${y} = 6 ) - return; - for (x=0; ${x} < 3; x=${x} + 1) - { - Verbose(x is ${x} !); - if( ${x} = 4 ) - break; - if( ${x} = 5 ) - continue; - if( ${x} = 6 ) - return; - for (z=0; ${z} < 17; z=${z} + 1) - { - Verbose(z is ${z} !); - Verbose(z is ${z} !); - if( ${z} = 4 ) - break; - if( ${z} = 5 ) - continue; - if( ${z} = 6 ) - return; - Verbose(z is ${z} !); - Verbose(z is ${z} !); - }; - - }; - y=${y}-1; - }; - }; - 5 => { - &exten-gen(axel,brain); - }; -}; diff --git a/pbx/ael/ael-test/ael-test11/extensions.ael b/pbx/ael/ael-test/ael-test11/extensions.ael deleted file mode 100644 index 886a51eb5..000000000 --- a/pbx/ael/ael-test/ael-test11/extensions.ael +++ /dev/null @@ -1,56 +0,0 @@ -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) ; - } - } -} diff --git a/pbx/ael/ael-test/ael-test14/extensions.ael b/pbx/ael/ael-test/ael-test14/extensions.ael deleted file mode 100644 index 20d69134f..000000000 --- a/pbx/ael/ael-test/ael-test14/extensions.ael +++ /dev/null @@ -1,20 +0,0 @@ -context test1 -{ - 10 => { - // nothing but a comment! - } - - 11 => { - switch(${somevar}) - { - case somecase: - // nothing but a comment! - break; - case somecase: - // nothing but a comment! - continue; - } - break; - } - -} diff --git a/pbx/ael/ael-test/ael-test15/extensions.ael b/pbx/ael/ael-test/ael-test15/extensions.ael deleted file mode 100644 index c9cfdab96..000000000 --- a/pbx/ael/ael-test/ael-test15/extensions.ael +++ /dev/null @@ -1,17 +0,0 @@ -/* and some comments - would make a nice touch */ - -context t1 -{ - /* this a test of block comments */ - - _15x => { - /* more comments - across several lines - * what do you think* - */ - } - -} - -/* amd some more */ diff --git a/pbx/ael/ael-test/ael-test16/extensions.ael b/pbx/ael/ael-test/ael-test16/extensions.ael deleted file mode 100644 index 5f3b2e4e9..000000000 --- a/pbx/ael/ael-test/ael-test16/extensions.ael +++ /dev/null @@ -1,4 +0,0 @@ -context real-small { - -} - diff --git a/pbx/ael/ael-test/ael-test18/extensions.ael b/pbx/ael/ael-test/ael-test18/extensions.ael deleted file mode 100644 index ee03d5909..000000000 --- a/pbx/ael/ael-test/ael-test18/extensions.ael +++ /dev/null @@ -1,40 +0,0 @@ -context default -{ - -706/3077610011 => { - JabberStatus(asterisk|jmls@mike,StatusCode); - - switch(${StatusCode}) { - case 1: - Dial(SIP/706,12); - switch(${DIALSTATUS}) { - case BUSY: - Voicemail(b706); - break; - default: - Voicemail(u706); - }; - BackGround(hello); - break; - default: - Voicemail(u706); - }; - ifTime(3:00-13:00|*|*|*) - { - NoOp(hello); - label1: - NoOp(goodbye); - } - else - { - NoOp(hithere); - label2: - NoOp(whatonearth?); - } - goto label1; - goto label2; - Hangup(); - }; - -} - diff --git a/pbx/ael/ael-test/ael-test19/extensions.ael b/pbx/ael/ael-test/ael-test19/extensions.ael deleted file mode 100644 index 5218c52aa..000000000 --- a/pbx/ael/ael-test/ael-test19/extensions.ael +++ /dev/null @@ -1,377 +0,0 @@ -context dialextens -{ - /* - 101 thru 123, 149 thru 152 - */ - _10X => Dial(Zap/${EXTEN:2},30,Ttw); - _1ZX => Dial(Zap/${EXTEN:1},30,Ttw); -} -/* - 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,Ttw); -} - -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 incoming -{ - s => { - Answer(); - } -} - -macro std-priv-exten( dev, ext , timeout, opts, torcont, dontcont ) -{ - // &increment_chosecount(); - dial_again: - Dial(${dev},${timeout},${opts}); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - - case DONTCALL: - goto ${dontcont}|s|begin; - break; - - case BUSY: - label_busy: - Read(reply|work-exten-busy|1||2|15); - if ("${reply}"=="") - goto label_busy; // infinite loop if Read has probs!! - switch(${reply}) - { - case 1: - Set(time1=${EPOCH}); - - label_redial: - - WaitMusicOnHold(5); - Dial(${dev},${timeout},${opts}); - - switch(${DIALSTATUS}) - { - case BUSY: - if(${EPOCH}-${time1} >= 20) - goto label_busy; - goto label_redial; - - default: - return;// goto work_line|s|loopback; - } - break; - case 2: - Voicemail(${ext}|b); - break; - case 3: - return; // goto work_line|s|loopback; - default: - Background(invalid); - goto label_busy; - } - break; - - case ANSWER: - break; - - case NOANSWER: - noanswer_label: - Read(reply|work-exten-noanswer|1|skip|2|15); - switch(${reply}) - { - case 1: - switch(${ext}) - { - case 10: - Background(no-cell); - break; - case 11: - // &ciddial(2729495,3072729495,30,tw,${GRAMS_TELCO},${WORK_TELCO}); - break; - case 12: - // &ciddial(2725560,3072725560,30,tw,${GRAMS_TELCO},${WORK_TELCO}); - break; - case 13: - // &ciddial(2720197,3072720197,30,tw,${GRAMS_TELCO},${WORK_TELCO}); - break; - case 14: - // &ciddial(2501174,3072501174,30,tw,${GRAMS_TELCO},${WORK_TELCO}); - break; - case 15: - Background(no-cell); - break; - case 16: - Background(no-cell); - break; - default: - Background(invalid); - break; - } - goto noanswer_label; - break; - case 2: - Voicemail(${ext}|u); - break; - case 3: - return; // goto work_line|s|loopback; - default: - Background(invalid); - goto noanswer_label; - } - Voicemail(${ext}|u); - break; - default: - Voicemail(${ext}|u); - } -} -/* Putting these 3 funcs in extensions.conf! -macro funcC(a,b) -{ - Set(Key=); - menu: - Read(Key,main-menu,1,n,1,5); - if("${Key}" = "2") - goto y,lab1; - catch y - { lab1: - &funcB(${a},${b}); - } -} - -macro funcB(a,b) -{ - Set(Key=); - menu: - Read(Key,tt-monkeys,1,n,1,5); - if("${Key}" = "2") - goto z,lab2; - catch z - { lab2: - &funcC(${a},${b}); - } -} - -macro funcA() -{ - &funcB(1,2); -} -*/ - -context extension -{ - includes - { - dialextens; - dialthrus; - parkedcalls; - } - 5 => { - Record(recording:wav); - 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 1xx and 2xx calls); - pattern [4-7]X: - Verbose(and this too!); - } - Set(junky=${RAND(0|99999)}); - Verbose(Here is a random number: ${junky}.); - } - 84 => { - agi(agi://192.168.134.252/|hello|goodbye|whatever|whoknows,hell2,hello3); - } - 85 => { - &std-priv-exten( Zap/50, 150 , 25, mtw, torcont, dontcont ); - } - 86 => { - Verbose(The version is: ${VERSION()} ); - Verbose(The versionnum is: ${VERSION(ASTERISK_VERSION_NUM)} ); - Verbose(The user is: ${VERSION(BUILD_USER)} ); - Verbose(The hostname is: ${VERSION(BUILD_HOSTNAME)} ); - Verbose(The machine is: ${VERSION(BUILD_MACHINE)} ); - Verbose(The OS is: ${VERSION(BUILD_OS)} ); - Verbose(The date is: ${VERSION(BUILD_DATE)} ); - Verbose(The kernel is: ${VERSION(BUILD_KERNEL)} ); - Set(vinf=${VERSION()}); - Set(vrand=${RAND()}); - if( ${ISNULL(${vinf})} ) - { - if( ${ISNULL(${vrand})} ) - Verbose(Version 1.2 or earlier); - else - Verbose(Version 1.4!!!); - } - else - Verbose(${vinf} indicates version pre-1.6 or higher); - } - 871 => { - NoOp( 1 1 1 1 1 1 1); - NoOp( 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6); - NoOp(012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678890123456789012345678901234567890); - NoOp(${EXTEN:1:2} ${EXTEN} ${EXTEN:1} 1 1 1 1 1 1 1); - &dialoutpstn(${TDIRECTCALL-PST}/0${EXTEN},${E${CALLERID(num)}-OPT},${TDIRECTCALL-CID},${TDIRECTCALL-MAX},RotaPadrao) ; - - } - 872 => { - Set(ChannelOnly=${CUT(CHANNEL||1)}); - Verbose(ChannelOnly=${ChannelOnly}; neat huh?); - Set(ChannelOnly=${CUT(CHANNEL,,1)}); - Verbose(ChannelOnly=${ChannelOnly}; neat huh?); - } - 873 => { - NOOP(this is a forkcdr test); - Set(CALLERID(number)=1234567890); - Set(CALLERID(name)=before fork); - Forkcdr(v); - Set(CALLERID(number)=0987654321); - Set(CALLERID(name)=after fork); - Answer(); - Echo(); - Hangup(); - } - 874 => { - SayDigits(307-754-5675); - SayPhoneNumber(307-754-5675); - SayDigits(--); - SayPhoneNumber(123-456-7890); - SayDigits(++); - SayPhoneNumber(307-754-4454); - } - 875 => { - &funcA(); - &funcD(); - } - 876 => { - NoOp(Query resultid ${connid} SELECT var1\, var2 FROM did); - NoOp($["Query resultid ${connid} SELECT var1\, var2 FROM did"]); - NoOp($["Query resultid ${connid} SELECT var1, var2 FROM did"]); - goto test5,s,1; - } - 88 => { - SET(LIMIT_PLAYAUDIO_CALLER=yes); - SET(LIMIT_PLAYAUDIO_CALLEE=no); - SET(LIMIT_TIMEOUT_FILE=timeup); - SET(LIMIT_CONNECT_FILE=limit60); - SET(LIMIT_WARNING_FILE=almostup); - Dial(Zap/51,20,L(60000:30000:8000)); - } - 89 => { - goto callbackmenu|100|1; - } -} - -context income1 -{ - s => { - Answer(); - Dial(Zap/50,20,m); - } - 150 => Dial(Zap/50,20,m); -} - -context callbackmenu -{ - _X. => { - Answer(); - Wait(1); - Set(TIMEOUT(digit)=5); - Set(TIMEOUT(response)=30); - DISA(no-password,callbackdialout); - } -} - -context callbackdialout -{ - _X. => { - Dial(Zap/51,20,w); - } - -} - - -macro dialoutpstn(something1, something2, something3, something4, something5) -{ - Verbose(${something1}--- ${something2}--- ${something3}--- ${something4}--- ${something5}); -} - -macro ndeep(level) -{ - if( ${level} == 0) - { - Verbose(2|Got to Level 0); - return; - } - &ndeep($[${level}-1]); - return; -} diff --git a/pbx/ael/ael-test/ael-test2/apptest.ael2 b/pbx/ael/ael-test/ael-test2/apptest.ael2 deleted file mode 100644 index c477d8531..000000000 --- a/pbx/ael/ael-test/ael-test2/apptest.ael2 +++ /dev/null @@ -1,146 +0,0 @@ -// this is a quick test to see how many of the apps we can spot j options in -// include this in a macro or extension -// at this moment, there are 18 apps that accept the j option. - - AddQueueMember(zork,iface,20,j); - ADSIProg(sfile); - AgentCallbackLogin(agent,s,30@cont); - AgentLogin(agent,s); - AgentMonitorOutgoing(dcn); - AGI(whatever); - AlarmReceiver(); - Answer(2); - AppendCDRUserField(value); - Authenticate(pword,adjmr); - BackGround(filename,snm,eng); - BackgroundDetect(filename,20,2,10); - Busy(10); - ChangeMonitor(fnamebase); - ChanIsAvail(Zap/5,sj); - ChanSpy(prefix,bg()qrv); - Congestion(5); - ControlPlayback(filename,10,6,4,0,5,7,j); - DateTime(unixtime,tz,fmt); - DBdel(fam/key); - DBdeltree(fam); - DeadAGI(command); - Dial(zap/1,45,A()CdD()fgG()hHjL()m()M()nNoprS()tTwW); - Dictate(basedir); - Directory(cont,dcont,f); - DISA(68986869876,context); - DumpChan(verblev); - DUNDiLookup(90709780978,context,bj); - EAGI(command); - Echo(); - EndWhile(); - Exec(appname,args); - ExecIf(expr,app,data); - ExecIfTime(*,*,*,*,appname); - ExternalIVR(command,arg1); - Festival(text); - Flash(); - ForkCDR(v); - GetCPEID(); - Gosub(cont,exten,priority); - GosubIf(cond?label); - Goto(cont,exten,prior); - GotoIf(cond?t:f); - GotoIfTime(*,*,*,*?cont,ext,prior); - Hangup(); - HasNewVoicemail(vmbox,var,j); - HasVoicemail(vmbox,var,j); - IAX2Provision(template); - ICES(xmlconfig); - ImportVar(nevar@chann,var); - Log(NOTICE,message); - LookupBlacklist(j); - LookupCIDName(); - Macro(macro,arg1); - MacroExit(); - MacroIf(expr?etc); - MailboxExists(mbox@cont,j); - Math(v,2+2); - MeetMe(5555,aAbcdDeimMpPqrstTovwxX); - MeetMeAdmin(5555,e,user); - MeetMeCount(5555,var); - Milliwatt(); - MixMonitor(filename,abv()V()W(),command); - Monitor(file.fmt,base,mb); - MP3Player(location); - MusicOnHold(class); - NBScat(); - NoCDR(); - NoOp(ignored); - Page(Zap/1,dq); - Park(exten); - ParkAndAnnounce(template,5,238,retcont); - ParkedCall(exten); - PauseQueueMember(queue,zap,j); - Pickup(ext@cont); - Playback(file,j); - PlayTones(arg); - PrivacyManager(3,4,j); - Progress(); - Queue(queuename,dhHnrtTwW,http://www.where.what,over,5); - Random(30,cont,ext,pri); - Read(var,fname,10,skip,2,5); - ReadFile(var=file,10); - RealTime(fam,2,val,prefix); - RealTimeUpdate(fam,2,val,2,newval); - Record(file,2,10,anqst); - RemoveQueueMember(queuename,iface,j); - ResetCDR(wav); - RetryDial(annound,4,2); - Return(); - Ringing(); - RxFAX(fname,caller); - SayAlpha(string); - SayDigits(string); - SayNumber(digits); - SayPhonetic(string); - SayUnixTime(unixtime,tz,fmt); - SendDTMF(digits,10); - SendImage(filename); - SendText(text,j); - SendURL(URL); - Set(a=b); - SetAMAFlags(); - SetCallerID(clid,a); - SetCallerPres(allowed_passed_screen); - SetCDRUserField(value); - SetGlobalVar(var=val); - SetMusicOnHold(class); - SetTransferCapability(SPEECH); - SIPAddHeader(header); - SIPDtmfMode(inband,info,rfc); - SIPGetHeader(var@headername); - SMS(name); - SoftHangup(zap/1,a); - StackPop(); - StartMusicOnHold(class); - StopMonitor(); - StopMusicOnHold(); - StopPlayTones(); - System(command); - TestClient(testid); - TestServer(); - Transfer(zap/1,j); - TrySystem(command); - TxFAX(filename,caller,debug); - UnpauseQueueMember(queuename,iface,j); - UserEvent(eventanme,body); - Verbose(5,message); - VMAuthenticate(mailbox@cont,s); - VoiceMail(mailbox@cont,bg()suj); - VoiceMailMain(mailbox@cont,pg()s); - Wait(2); - WaitExten(3,m()); - WaitForRing(2); - WaitForSilence(2,y); - WaitMusicOnHold(2); - While(expr); - Zapateller(answer,5); - ZapBarge(channel); - ZapRAS(arg); - ZapScan(group); - ZapSendKeypadFacility(); diff --git a/pbx/ael/ael-test/ael-test2/extensions.ael b/pbx/ael/ael-test/ael-test2/extensions.ael deleted file mode 100644 index 176338872..000000000 --- a/pbx/ael/ael-test/ael-test2/extensions.ael +++ /dev/null @@ -1,8 +0,0 @@ -context test1 -{ - s => - { - #include "apptest.ael2"; - } -} - diff --git a/pbx/ael/ael-test/ael-test20/extensions.ael b/pbx/ael/ael-test/ael-test20/extensions.ael deleted file mode 100644 index 8ec219864..000000000 --- a/pbx/ael/ael-test/ael-test20/extensions.ael +++ /dev/null @@ -1,8 +0,0 @@ -context interesting { - eswitches { - Realtime/default@extensions; - IAX2/context@${CURSERVER}; - } - 13 => NoOp(LuckyNumber!); -} - diff --git a/pbx/ael/ael-test/ael-test3/extensions.ael b/pbx/ael/ael-test/ael-test3/extensions.ael deleted file mode 100755 index dd77c0531..000000000 --- a/pbx/ael/ael-test/ael-test3/extensions.ael +++ /dev/null @@ -1,3183 +0,0 @@ -globals -{ - static=yes; - writeprotect=yes; - CONSOLE=Console/dsp; // Console interface for demo - IAXINFO=murf:tlhfckoct; // IAXtel username/password - FWDNUMBER=544788 ; // your calling number - FWDCIDNAME="Joe-Worker"; // your caller id - FWDPASSWORD=zingledoodle ; // your password - FWDRINGS=Zap/6 ; // the phone to ring - FWDVMBOX=1 ; // the VM box for this user -} - -macro std-exten( ext , dev ) -{ - Dial(${dev}/${ext},20); - switch(${DIALSTATUS}) - { - case BUSY: - Voicemail(b${ext}); - break; - case NOANSWER: - Voicemail(u${ext}); - break; - case ANSWER: - break; - default: - Voicemail(u${ext}); - } - catch a { - VoiceMailMain(${ext}); - } -} - -macro std-priv-exten_1( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_2( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_3( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_4( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_5( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_6( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_7( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_8( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_9( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_10( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_11( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_12( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_13( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_14( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_15( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_16( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_17( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_18( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_19( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_20( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_21( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_22( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_23( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_24( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_25( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_26( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_27( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_28( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_29( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_30( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_31( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_32( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_33( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_34( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_35( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_36( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_37( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_38( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_39( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_40( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_41( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_42( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_43( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_44( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_45( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_46( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_47( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_48( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_49( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_50( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_51( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_52( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_53( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_54( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_55( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_56( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_57( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_58( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_59( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_60( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_61( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_62( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_63( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_64( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_65( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_66( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_67( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_68( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_69( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_70( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_71( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_72( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_73( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - -macro fillcidname() -{ - if( "${CALLERID(number)}" = "" ) // nothing to work with, quit!!! - return; - Set(cidn=${DB(cidname/${CALLERID(num)})}); - if( "${CALLERID(name)}" != "" ) - { - if( ("${cidn}" = "Privacy Manager" & "${CALLERID(name)}" != "Privacy Manager") | "${cidn}" = "" ) // if the entry isn't in the database, - // or if an entry exists, and it's "Privacy Manager", empty, (or add other useless possibilities). - { - Set(DB(cidname/${CALLERID(number)})=${CALLERID(name)}); // then set or override what's in the DB - } - } - // Now, we fill in the callerid info from the incoming entry, if it's stuff worth using - // Ignore fundamentally semi-anonymous information from local cell phones - // if the db has an entry for this number, and it's not a canned string from a cell phone company - if( ( "${cidn}" != "" ) & ( "${CALLERID(name)}" = "" - | "${CALLERID(name)}" = "CODY,WY " - | "${CALLERID(name)}" = "POWELL,WY " - | "${CALLERID(name)}" = "WIRELESS CALLER" - | "${CALLERID(name)}" = "SUBSCRIBER,WIRE" - | "${CALLERID(name)}" = "CELLULAR ONE" - | "${CALLERID(name)}" = "Cellular One Customer" - | "${CALLERID(name)}" = "CELLULAR ONE " - | "${CALLERID(name)}" = "Privacy Manager" - | "${CALLERID(name)}" = "RIVERTON,WY " - | "${CALLERID(name)}" = "BASIN,WY " - | "${CALLERID(name)}" = "BILLINGS,MT " - | "${CALLERID(name)}" = "PROVO,UT " - | "${CALLERID(name)}" = "TOLL FREE " ) ) // put stuff in the above, that the phone company tends to put in your callerid, - // that you would rather override with DB info - // there's no way to guess them all, but you can get the most popular ones... - // why cell phones can't do CID like everybody else, ....? - { - Set(CALLERID(name)=${cidn}); // Override what the phone company provides with what's in the DB for this number. - } -} - -macro ciddial(dialnum, lookup, waittime, dialopts, ddev) -{ - Set(cidnu=${CALLERID(num)}); - Set(cidn=${DB(cidname/${lookup})}); - Set(CALLERID(name)=${cidn}); - Dial(${ddev}/${dialnum}|${waittime}|${dialopts}); - if( "${DIALSTATUS}" = "CHANUNAVAIL" ) - { - BackGround(try_voip); - CALLERID(num)=7075679201; - Dial(SIP/1${lookup}@tctwest,${waittime},${dialopts}); - if( "${DIALSTATUS}" = "CHANUNAVAIL" ) - { - BackGround(try_cell); - CALLERID(num)=${cidnu}; // put the original number back - Dial(Zap/2/${lookup},${waittime},${dialopts}); - } - } -} - -macro ciddial3(dialnum, lookup, waittime, dialopts, ddev) -{ - Set(cidnu=${CALLERID(num)}); - Set(cidn=${DB(cidname/${lookup})}); - Set(CALLERID(name)=${cidn}); - Dial(${ddev}/${dialnum}|${waittime}|${dialopts}); - if( "${DIALSTATUS}" = "CHANUNAVAIL" ) - { - BackGround(try_cell); - Dial(Zap/2/${lookup},${waittime},${dialopts}); - } -} - -macro ciddial2(dialnum, lookup, waittime, dialopts, ddev) // give priority to tctwest, then the ZAP in emergencies -{ - Set(cidn=${DB(cidname/${lookup})}); - Set(cidnu=${CALLERID(num)}); - Set(CALLERID(name)=${cidn}); - Set(CALLERID(num)=7075679201); - Dial(SIP/1${lookup}@tctwest,${waittime},${dialopts}); - if( "${DIALSTATUS}" = "CHANUNAVAIL" ) - { - Set(CALLERID(num)=${cidnu}); // put the original number back - BackGround(try_zap); - Dial(${ddev}/${dialnum},${waittime}|${dialopts}); - if( "${DIALSTATUS}" = "CHANUNAVAIL" ) - { - BackGround(try_cell); - Dial(Zap/2/${lookup},${waittime},${dialopts}); - } - } -} - -macro callerid-liar() -{ - TrySystem(/usr/bin/play /var/lib/asterisk/sounds/priv-callerintros/LIAR.gsm&); - Background(priv-liar); // Script: OOOps! Sorry! I don't allow men with ski masks pulled over their - // faces to get in the front door, and unidentified callers won't fair - // any better. You entered *MY* phone number. That won't work. - // If you are telemarketing, cross me off the list, and don't call again. - // If you did this by mistake, forgive my defenses, and call again. - // Alternate: (priv-liar2) - // Script: You have chosen to try to deceive my system and withold your CallerID, - // by entering my own phone number as YOUR CallerID. I find this - // offensive because you are being dishonest. I will not do business nor - // waste my time talking to anyone who is less than honest and forthcoming. - // Take me off your call list and do not call me again. - Hangup(); -} - -macro callerid-bad() -{ - mycid=${CALLERID(num)}:"1([0-9]+)"; - Set(CALLERID(num)=${mycid}); - Wait(0); -} - -context privacyManagerFailed { - s => { - begin: - Background(PrivManInstructions); // Script: OOps, that didn't go well. You need to enter *your* area code, and *your* 7 digit - // phone number, for a total of 10 digits, or you'll be handed over to the monkeys. Let's - // try this again, and hopefully you can get past our front-line defenses! - PrivacyManager(); - if( "${PRIVACYMGRSTATUS}" = "FAILED" ) - { - Background(tt-allbusy); - Background(tt-somethingwrong); - Background(tt-monkeysintro); - Background(tt-monkeys); - Background(tt-weasels); - Hangup(); - } - else - { - goto homeline|s|postPriv; - } - } -} - -// Some comments -// Some more comments - -context homeline { - s => { - begin: - Answer(); - Set(repeatcount=0); - Zapateller(nocallerid); - PrivacyManager(); - if( "${PRIVACYMGRSTATUS}" = "FAILED" ) - { - TrySystem(/usr/bin/play /var/lib/asterisk/sounds/privmanfailed.gsm); - &std-priv-exten(Zap/3r1&Zap/5r1,2,25,mtw,telemarket,telemarket); - Hangup(); - return; -// goto privacyManagerFailed|s|begin; - } - postPriv: - &fillcidname(); - Set(CONFCIDNA=${CALLERID(name)}); - Set(CONFCIDNU=${CALLERID(num)}); - AGI(callall); - AGI(submit-announce.agi); - if( "${CALLERID(num)}" : "1" ) - { - &callerid-bad(); - } - if( "${CALLERID(num)}" = "7077577685" & "${CALLERID(name)}" : "Privacy Manager" ) - { - &callerid-liar(); - } - TrySystem(/usr/local/bin/who-is-it ${CALLERID(num)} "${CALLERID(name)}"&); - Set(lds=${DB(playlds/${CALLERID(num)})}); - if( "${lds}" = "1" ) - { - SetMusicOnHold(mohlds); - } - direct=${DB(DirectCall/${CALLERID(num)})}; - if( "${direct}" != "" & ${direct} != 0 ) - { - verbose(direct is XXX#${direct}XXXX); - Playback(greetings/direct); // Welcome to the Murphy residence. This system will automatically try to connect you to... - Playback(/var/spool/asterisk/voicemail/default/${direct}/greet); - TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm); - TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/${direct}/greet.wav&); - switch(${direct}) - { - case 1: //Steve - &std-priv-exten(Zap/6r3&Sip/murf,1,25,mpA(beep)tw,telemarket,telemarket); - goto s|loopback; - case 2: //Sonya - &std-priv-exten(Zap/3r1&Zap/5r1,2,25,mtw,telemarket,telemarket); - goto s|loopback; - default: // all the kids - Set(z=${direct}-2); - goto homeline-kids|${z}|1; - } - } - loopback: - ifTime(*|*|20-25|dec) - { - Playback(greetings/christmas); - } - else ifTime(*|*|31|dec) - { - Playback(greetings/newyear); - } - else ifTime(*|*|1|jan) - { - Playback(greetings/newyear); - } - else ifTime(*|*|14|feb) - { - Playback(greetings/valentines); - } - else ifTime(*|*|17|mar) - { - Playback(greetings/stPat); - } - else ifTime(*|*|31|oct) - { - Playback(greetings/halloween); - } - else ifTime(*|mon|15-21|jan) - { - Playback(greetings/mlkDay); - } - else ifTime(*|thu|22-28|nov) - { - Playback(greetings/thanksgiving); - } - else ifTime(*|mon|25-31|may) - { - Playback(greetings/memorial); - } - else ifTime(*|mon|1-7|sep) - { - Playback(greetings/labor); - } - else ifTime(*|mon|15-21|feb) - { - Playback(greetings/president); - } - else ifTime(*|sun|8-14|may) - { - Playback(greetings/mothers); - } - else ifTime(*|sun|15-21|jun) - { - Playback(greetings/fathers); - } - else - { - Playback(greetings/hello); // None of the above? Just a plain hello will do - } - Background(murphy-homeline-intro1); // Script: Hello-- Welcome to the Murphy's! If you already know what - // option you want, you don't have to wait for this entire spiel-- just - // have at it. - // If you are calling because this number is on a list of some sort, dial 6. - // If you want Sonya, dial 1. - // If you want one of the kids, dial 2. - // If you want Steve, dial 3. - // to play with your introduction, dial 5. - // If we don't seem to be giving you the time of day, try 7. - // Have a good day! - - } - 1 => { // Sonya - TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm); - TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/2/greet.wav&); - &std-priv-exten(Zap/3r1&Zap/5r1,2,25,mtw,telemarket,telemarket); - goto s|loopback; - } - 2 => { // Kids - goto homeline-kids|s|begin; - } - 21 => { - Dial(IAX2/seaniax,20,T); - } - 3 => { // Steve - &std-priv-exten(Zap/6r3&Sip/murf,1,25,mpA(beep)tw,telemarket,telemarket); - goto s|loopback; - } - 4 => { // Voicemail - VoicemailMain(); - goto s|loopback; - } - 5 => { // play with intro - goto home-introduction|s|begin; - } - 6 => { // Telemarketers - goto telemarket|s|begin; - } - 7 => { // time of day, riddle - agi(tts-riddle.agi); - Background(gsm/what-time-it-is2); - SayUnixTime(); - goto s|loopback; - } - 792 => { // Page All - goto pageall|s|begin; - } - 793 => { // check the tone recognition - Read(zz,,0,,1,0); - SayDigits(${zz}); - } - t => { - Set(repeatcount=${repeatcount} + 1); - if( ${repeatcount} < 3 ) - { - goto s|loopback; // just loopback isn't enough - } - Hangup(); - } - i => { - Background(invalid); - goto s|loopback; - } - o => { - Congestion(); - } - fax => { - Dial(Zap/4); - } -} - -// Some comments -// Some more comments - -context pageall { - s => { - begin: - AGI(callall); - MeetMe(5555,dtqp); - MeetMeAdmin(5555,K); - Hangup(); - } - - h => { - begin: - MeetMeAdmin(5555,K); - Background(conf-muted); - Hangup(); - } -} - -// Some comments -// Some more comments - -context add-to-conference { - start => { - NoCDR(); - MeetMe(5555,dmqp); - } - h => { - Hangup(); - } -} - -context home-introduction { - s => { - begin: - Background(intro-options); // Script: To hear your Introduction, dial 1. - // to record a new introduction, dial 2. - // to return to the main menu, dial 3. - // to hear what this is all about, dial 4. - } - 1 => { - Playback(priv-callerintros/${CALLERID(num)}); - goto s|begin; - } - 2 => { - goto home-introduction-record|s|begin; - } - 3 => { - goto homeline|s|loopback; - } - 4 => { - Playback(intro-intro); // Script: - // This may seem a little strange, but it really is a neat - // thing, both for you and for us. I've taped a short introduction - // for many of the folks who normally call us. Using the Caller ID - // from each incoming call, the system plays the introduction - // for that phone number over a speaker, just as the call comes in. - // This helps the folks - // here in the house more quickly determine who is calling. - // and gets the right ones to gravitate to the phone. - // You can listen to, and record a new intro for your phone number - // using this menu. - goto s|begin; - } - t => { - goto s|begin; - } - i => { - Background(invalid); - goto s|begin; - } - o => { - goto s|begin; - } -} - -context home-introduction-record { - s => { - begin: - Background(intro-record-choices); // Script: - // If you want some advice about recording your - // introduction, dial 1. - // otherwise, dial 2, and introduce yourself after - // the beep. - } - 1 => { - Playback(intro-record); - // Your introduction should be short and sweet and crisp. - // Your introduction will be limited to 10 seconds. - // This is NOT meant to be a voice mail message, so - // please, don't say anything about why you are calling. - // After we are done making the recording, your introduction - // will be saved for playback. - // If you are the only person that would call from this number, - // please state your name. Otherwise, state your business - // or residence name instead. For instance, if you are - // friend of the family, say, Olie McPherson, and both - // you and your kids might call here a lot, you might - // say: "This is the distinguished Olie McPherson Residence!" - // If you are the only person calling, you might say this: - // "This is the illustrious Kermit McFrog! Pick up the Phone, someone!!" - // If you are calling from a business, you might pronounce a more sedate introduction,like, - // "Fritz from McDonalds calling.", or perhaps the more original introduction: - // "John, from the Park County Morgue. You stab 'em, we slab 'em!". - // Just one caution: the kids will hear what you record every time - // you call. So watch your language! - // I will begin recording after the tone. - // When you are done, hit the # key. Gather your thoughts and get - // ready. Remember, the # key will end the recording, and play back - // your intro. Good Luck, and Thank you!" - goto 2|begin; - } - 2 => { - begin: - Background(intro-start); - // OK, here we go! After the beep, please give your introduction. - Background(beep); - Record(priv-callerintros/${CALLERID(num)}:gsm,3); - Background(priv-callerintros/${CALLERID(num)}); - goto home-introduction|s|begin; - } - t => { - goto s|begin; - } - i => { - Background(invalid); - goto s|begin; - } - o => { - goto s|begin; - } -} - -context homeline-kids { - s => { - begin: - Background(murphy-homeline-kids); // Which Kid? 1=Sean, 2:Eric, 3:Ryan, 4:Kyle, 5:Amber, 6:Alex, 7:Neal - } - 1 => { // SEAN - TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm); - TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/3/greet.wav&); - // &std-priv-exten(Zap/3r2&Zap/5r2,3,35,mtw,telemarket,telemarket); - &std-priv-exten(IAX2/seaniax&Zap/5r2,3,35,mtw,telemarket,telemarket); - goto homeline|s|loopback; - } - 2 => { // ERIC - TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm); - TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/4/greet.wav&); - Voicemail(u4); - goto homeline|s|loopback; - - // SetMusicOnHold(erics); - // TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm); - // TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/4/greet.wav&); - // &std-priv-exten(Zap/3r2&Zap/5r2,4,35,mtw,telemarket,telemarket); - // goto homeline|s|loopback; - } - 3 => { // RYAN - TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm); - TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/5/greet.wav&); - &std-priv-exten(Zap/3r2&Zap/5r2,5,35,mtw,telemarket,telemarket); - goto homeline|s|loopback; - } - 4 => { // KYLE - TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm); - TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/6/greet.wav&); - &std-priv-exten(Zap/3r2&Zap/5r2,6,35,mtw,telemarket,telemarket); - goto homeline|s|loopback; - } - 5 => { - TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm); - TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/7/greet.wav&); - &std-priv-exten(Zap/3r2&Zap/5r2,7,35,mtw,telemarket,telemarket); - goto homeline|s|loopback; - - } - 6 => { - TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm); - TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/8/greet.wav&); - &std-priv-exten(Zap/3r2&Zap/5r2,8,35,mtw,telemarket,telemarket); - goto homeline|s|loopback; - } - 7 => { - TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm); - TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/9/greet.wav&); - &std-priv-exten(Zap/3r2&Zap/5r2,9,35,mtw,telemarket,telemarket); - goto homeline|s|loopback; - } - t => { - goto s|begin; - } - i => { - Background(invalid); - goto s|begin; - } - o => { - goto s|begin; - } -} - -context voipworkline { - s => { - begin: - Answer(); - TrySystem(/usr/local/bin/who-is-it ${CALLERID(num)} "${CALLERID(name)}"&); - goto workline|s|loopback; - } - 7075679201 => { - Answer(); - TrySystem(/usr/local/bin/who-is-it ${CALLERID(num)} "${CALLERID(name)}"&); - goto workline|s|loopback; - } -} - -context workline { - s => { - begin: - Answer(); - Wait(1); - Set(repeatcount=0); - Zapateller(nocallerid); -// PrivacyManager(); -// if( "${PRIVACYMGRSTATUS}" = "FAILED" ) -// { -// goto privacyManagerFailed|s|begin; -// } - &fillcidname(); - TrySystem(/usr/local/bin/who-is-it ${CALLERID(num)} "${CALLERID(name)}"&); - loopback: - Background(greetings/greeting); //script: Hello - Background(murphy-office-intro1); //script: welcome to Steve Murphy's office. If you are dialing - // this number because it was on a calling list of any sort, dial 6. - // Otherwise, dial 1, and hopefully, you will reach Steve. - } - 1 => { - TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm); - TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/1/greet.wav&); - - &std-priv-exten(Zap/6&Sip/murf,1,30,mtw,telemarket,telemarket); - goto s|loopback; - } - 4 => { - VoicemailMain(); - goto s|loopback; - } - 6 => { - goto telemarket|s|begin; - } - 793 => { // check the tone recognition - Read(zz,,0,,1,0); - SayDigits(${zz}); - } - t => { - repeatcount=${repeatcount} + 1; - if( ${repeatcount} < 3 ) - { - goto s|loopback; // just loopback isn't enough - } - Hangup(); - } - i => { - Background(invalid); - goto s|loopback; - } - o => { - Congestion(); - } - fax => { - Answer(); - Dial(Zap/4); - } -} - -context dialFWD { - ignorepat => 8; - ignorepat => 9; - _83. => { - Set(CALLERID(name)=${FWDCIDNAME}); - Dial(IAX2/${FWDNUMBER}:${FWDPASSWORD}@iax2.fwdnet.net/${EXTEN:2},60,r); - Congestion(); - } - _82NXX => { - Set(CALLERID(name)=${FWDCIDNAME}); - Dial(IAX2/${FWDNUMBER}:${FWDPASSWORD}@iax2.fwdnet.net/${EXTEN:2},60,r); - Congestion(); - } - _92NXX => { - Set(CALLERID(name)=${FWDCIDNAME}); - Dial(IAX2/${FWDNUMBER}:${FWDPASSWORD}@iax2.fwdnet.net/${EXTEN:2},60,r); - Congestion(); - } -} - -context dialiaxtel { - ignorepat => 8; - ignorepat => 9; - _81700NXXXXXX => { - Dial(IAX2/zorch:zilchnoodle@iaxtel.com/${EXTEN:1}@iaxtel); - } - _81800NXXXXXX => { - Dial(IAX2/zorch:zilchnoodle@iaxtel.com/${EXTEN:1}@iaxtel); - } - _91700NXXXXXX => { - Dial(IAX2/zorch:zilchnoodle@iaxtel.com/${EXTEN:1}@iaxtel); - } - _91800NXXXXXX => { - Dial(IAX2/zorch:zilchnoodle@iaxtel.com/${EXTEN:1}@iaxtel); - } - -} - -context dialgoiax { - ignorepat => 9; - _93. => { - Set(CALLERID(name)="Joe Worker"); - Dial(IAX2/878201007658:stickyfinger295@server1.goiax.com/${EXTEN:2},60,r); - Congestion(); - } - -} - -context homefirst { - ignorepat => 9; - _91NXXNXXXXXX => { - &ciddial(${EXTEN:1},${EXTEN:2},30,TW,Zap/1); - } - _9754XXXX => { - &ciddial(${EXTEN:1},707${EXTEN:1},30,TW,Zap/1); - } - _9574XXXX => { - &ciddial(${EXTEN:1},707${EXTEN:1},30,TW,Zap/1); - } - _9202XXXX => { - &ciddial(${EXTEN:1},707${EXTEN:1},30,TW,Zap/1); - } - _9219XXXX => { - &ciddial(${EXTEN:1},707${EXTEN:1},30,TW,Zap/1); - } - _9254XXXX => { - &ciddial(${EXTEN:1},707${EXTEN:1},30,TW,Zap/1); - } - _9716XXXX => { - &ciddial(${EXTEN:1},707${EXTEN:1},30,TW,Zap/1); - } - _9NXXXXXX => { - &ciddial(1707${EXTEN:1},707${EXTEN:1},30,TW,Zap/1); - } - _9011. => { - &ciddial(${EXTEN:1},${EXTEN:1},30,TW,Zap/1); - } - _9911 => { - Dial(Zap/1/911,30,T); - } - _9411 => { - Dial(Zap/1/411,30,T); - } -} - -context workfirst { - ignorepat => 9; - _91NXXNXXXXXX => { - &ciddial2(${EXTEN:1},${EXTEN:2},30,TW,Zap/1); - } - _9754XXXX => { - &ciddial2(${EXTEN:1},707${EXTEN:1},30,TW,Zap/1); - } - _9574XXXX => { - &ciddial2(${EXTEN:1},707${EXTEN:1},30,TW,Zap/1); - } - _9202XXXX => { - &ciddial2(${EXTEN:1},707${EXTEN:1},30,TW,Zap/1); - } - _9219XXXX => { - &ciddial2(${EXTEN:1},707${EXTEN:1},30,TW,Zap/1); - } - _9254XXXX => { - &ciddial2(${EXTEN:1},707${EXTEN:1},30,TW,Zap/1); - } - _9716XXXX => { - &ciddial2(${EXTEN:1},707${EXTEN:1},30,TW,Zap/1); - } - _9NXXXXXX => { - &ciddial2(1707${EXTEN:1},707${EXTEN:1},30,TW,Zap/1); - } - _9911 => { - Dial(Zap/1/911,30,T); - } - _9411 => { - Dial(Zap/1/411,30,T); - } -} - -context force_cell { - ignorepat => 8; - _81NXXNXXXXXX => { - &ciddial(${EXTEN:1}#,${EXTEN:2},30,TW,Zap/2); - } - _8754XXXX => { - &ciddial(${EXTEN:1}#,707${EXTEN:1},30,TW,Zap/2); - } - _8574XXXX => { - &ciddial(${EXTEN:1}#,707${EXTEN:1},30,TW,Zap/2); - } - _8202XXXX => { - &ciddial(${EXTEN:1}#,707${EXTEN:1},30,TW,Zap/2); - } - _8219XXXX => { - &ciddial(${EXTEN:1}#,707${EXTEN:1},30,TW,Zap/2); - } - _8254XXXX => { - &ciddial(${EXTEN:1}#,707${EXTEN:1},30,TW,Zap/2); - } - _8716XXXX => { - &ciddial(${EXTEN:1}#,707${EXTEN:1},30,TW,Zap/2); - } - _8NXXXXXX => { - &ciddial(${EXTEN:1}#,707${EXTEN:1},30,TW,Zap/2); - } - _8911 => { - Dial(Zap/1/911|30|T); - } - _8411 => { - Dial(Zap/1/411|30|T); - } -} - -context force_home { - ignorepat => 8; - _81NXXNXXXXXX => { - &ciddial3(${EXTEN:1}#,${EXTEN:2},30,TW,Zap/1); - } - _8754XXXX => { - &ciddial3(${EXTEN:1}#,707${EXTEN:1},30,TW,Zap/1); - } - _8574XXXX => { - &ciddial3(${EXTEN:1}#,707${EXTEN:1},30,TW,Zap/1); - } - _8202XXXX => { - &ciddial3(${EXTEN:1}#,707${EXTEN:1},30,TW,Zap/1); - } - _8219XXXX => { - &ciddial3(${EXTEN:1}#,707${EXTEN:1},30,TW,Zap/1); - } - _8254XXXX => { - &ciddial3(${EXTEN:1}#,707${EXTEN:1},30,TW,Zap/1); - } - _8716XXXX => { - &ciddial3(${EXTEN:1}#,707${EXTEN:1},30,TW,Zap/1); - } - _8NXXXXXX => { - &ciddial3(1707${EXTEN:1}#,707${EXTEN:1},30,TW,Zap/1); - } - _8911 => { - Dial(Zap/1/911|30|T); - } - _8411 => { - Dial(Zap/1/411|30|T); - } -} - -context homeext { - ignorepat => 8; - ignorepat => 9; - includes { - parkedcalls; - homefirst; - force_cell; - } - s => { - loopback: - Wait(0); - } - 1 => { - &std-priv-exten(Zap/3&Zap/5,2,35,mtw,telemarket,telemarket); - goto s|loopback; - } - 2 => { - &std-priv-exten(Zap/6&Zap/5,1,35,mpA(beep3)Tt,telemarket,telemarket); - goto s|loopback; - } - 4 => { - VoicemailMain(); - } - 5 => { - Record(recording:gsm); - Background(recording); - } - 6 => { - Background(recording); - } - 760 => { - DateTime(); - goto s|loopback; - } - 761 => { - Record(announcement:gsm); - TrySystem(/usr/bin/play /var/lib/asterisk/sounds/announcement.gsm&); - goto s|loopback; - } - 762 => { - agi(tts-riddle.agi); - Background(gsm/what-time-it-is2); - SayUnixTime(); - goto s|loopback; - } - 763 => { - Set(CALLERID(num)=); - Dial(Zap/6r3,35,mptA(beep3)); //results: it should ALWAYS ask for an intro; the intro should not be left behind - Hangup(); - } - 764 => { - Set(CALLERID(num)=); - Dial(Zap/6r3,35,mptnA(beep3)); //results: Don't save the intro; shouldn't anyway if no callerid - Hangup(); - } - 765 => { - Set(CALLERID(num)=); - Dial(Zap/6r3,35,mptNA(beep3)); //results: Don't screen if there's CALLERID; it should screen the call. - Hangup(); - } - 766 => { - Dial(Zap/6r3,35,mptNA(beep3)); //results: Don't screen if there's CALLERID; it should screen the call. - Hangup(); - } - 767 => { - Dial(Zap/6r3,35,mptnA(beep3)); //results: Don't save the intro; the interesting case, because callerID should be present. - Hangup(); - } - 769 => { - Playtones(dial); - Wait(2); - Playtones(busy); - Wait(2); - Playtones(ring); - Wait(2); - Playtones(congestion); - Wait(2); - Playtones(callwaiting); - Wait(2); - Playtones(dialrecall); - Wait(2); - Playtones(record); - Wait(2); - Playtones(info); - Wait(5); - Hangup(); - } - 790 => { - MeetMe(790,p); - } - 792 => { - goto pageall|s|begin; - } - 795 => { - AGI(wakeup.agi);Congestion(); - } - 544716 => { // Incoming call from FWD - TrySystem(/usr/local/bin/who-is-it ${CALLERID(num)} "${CALLERID(name)}"&); - goto s|loopback; - } - - i => { - Background(invalid); - goto s|loopback; - } - o => { - goto s|loopback; - } - t => { - Congestion(); - } -} - -context fromvmhome { - 1 => { - Dial(Zap/6&Sip/murf|20|Tt); - } - 2 => { - Dial(Zap/3&Zap/5|20|Tt); - } - _707202XXXX => { - &ciddial(1${EXTEN:3},${EXTEN},30,TW,Zap/1); - } - _707219XXXX => { - &ciddial(1${EXTEN:3},${EXTEN},30,TW,Zap/1); - } - _707254XXXX => { - &ciddial(1${EXTEN:3},${EXTEN},30,TW,Zap/1); - } - _707716XXXX => { - &ciddial(1${EXTEN:3},${EXTEN},30,TW,Zap/1); - } - _707754XXXX => { - &ciddial(${EXTEN:3},${EXTEN},30,TW,Zap/1); - } - _707574XXXX => { - &ciddial(${EXTEN:3},${EXTEN},30,TW,Zap/1); - } - _NXXNXXXXXX => { - &ciddial(1${EXTEN},${EXTEN},30,TW,Zap/1); - } - _1NXXNXXXXXX => { // HAND DIALING - &ciddial(${EXTEN},${EXTEN:1},30,TW,Zap/1); - } - _754XXXX => { - &ciddial(${EXTEN},707${EXTEN},30,TW,Zap/1); - } - _574XXXX => { - &ciddial(${EXTEN},707${EXTEN},30,TW,Zap/1); - } - _NXXXXXX => { - &ciddial(1707${EXTEN},707${EXTEN},30,TW,Zap/1); - } - _911 => { - &ciddial(911,911,30,TW,Zap/1); - } - _411 => { - &ciddial(411,411,30,TW,Zap/1); - } -} - -context fromvmwork { - 1 => { - Dial(Zap/6&Sip/murf|20|Tt); - } - 2 => { - Dial(Zap/3&Zap/5|20|Tt); - } - _707202XXXX => { - &ciddial(1${EXTEN:3},${EXTEN},30,TW,Zap/1); - } - _707219XXXX => { - &ciddial(1${EXTEN:3},${EXTEN},30,TW,Zap/1); - } - _707254XXXX => { - &ciddial(1${EXTEN:3},${EXTEN},30,TW,Zap/1); - } - _707716XXXX => { - &ciddial(1${EXTEN:3},${EXTEN},30,TW,Zap/1); - } - _707754XXXX => { - &ciddial(${EXTEN:3},${EXTEN},30,TW,Zap/1); - } - _707574XXXX => { - &ciddial(${EXTEN:3},${EXTEN},30,TW,Zap/1); - } - _NXXNXXXXXX => { - &ciddial(1${EXTEN},${EXTEN},30,TW,Zap/1); - } - _1NXXNXXXXXX => { // HAND DIALING - &ciddial(${EXTEN},${EXTEN:1},30,TW,Zap/1); - } - _754XXXX => { - &ciddial(${EXTEN},707${EXTEN},30,TW,Zap/1); - } - _574XXXX => { - &ciddial(${EXTEN},707${EXTEN},30,TW,Zap/1); - } - _NXXXXXX => { - &ciddial(1707${EXTEN},707${EXTEN},30,TW,Zap/1); - } - 911 => { - &ciddial(911,911,30,TW,Zap/1); - } - 411 => { - &ciddial(411,411,30,TW,Zap/1); - } -} - -context fromSeanUniden { - includes - { - parkedcalls; - } - 21 => { - Dial(IAX2/seaniax,20,T); - } - _707202XXXX => { - &ciddial(${EXTEN:3},${EXTEN},30,TW,Zap/1); - } - _707219XXXX => { - &ciddial(${EXTEN:3},${EXTEN},30,TW,Zap/1); - } - _707254XXXX => { - &ciddial(${EXTEN:3},${EXTEN},30,TW,Zap/1); - } - _707716XXXX => { - &ciddial(${EXTEN:3},${EXTEN},30,TW,Zap/1); - } - _707754XXXX => { - &ciddial(${EXTEN:3},${EXTEN},30,TW,Zap/1); - } - _707574XXXX => { - &ciddial(${EXTEN:3},${EXTEN},30,TW,Zap/1); - } - _NXXNXXXXXX => { - &ciddial(1${EXTEN},${EXTEN},30,TW,Zap/1); - } - _1NXXNXXXXXX => { - &ciddial(${EXTEN},${EXTEN:1},30,TW,Zap/1); - } - _754XXXX => { - &ciddial(${EXTEN},707${EXTEN},30,TW,Zap/1); - } - _574XXXX => { - &ciddial(${EXTEN},707${EXTEN},30,TW,Zap/1); - } - _NXXXXXX => { - &ciddial(1707${EXTEN},707${EXTEN},30,TW,Zap/1); - } - 911 => { - &ciddial(911,911,30,TW,Zap/1); - } - 411 => { - &ciddial(411,411,30,TW,Zap/1); - } -} - -context workext { - ignorepat => 8; - ignorepat => 9; - includes { - parkedcalls; - workfirst; - force_home; - dialFWD; - dialiaxtel; - dialgoiax; - } - s => { - loopback: - Wait(0); - } - 1 => { - Dial(Zap/3&Zap/5,20,tT); - } - 2 => { - Dial(Zap/5&Zap/6,20,tT); - } - 21 => { - Dial(IAX2/seaniax,20,T); - } - 22 => { - Set(CALLERID(num)=1234567890); - Set(CALLERID(name)=TestCaller); - Dial(Zap/5,20,mP()A(beep)tw); - NoOp(here is dialstatus: ${DIALSTATUS}...); - goto s|loopback; - } - 4 => { - VoicemailMain(); - goto s|loopback; - } - 5 => { - Record(recording:gsm); - Background(recording); - } - 6 => { - ZapBarge(); - } - 760 => { - DateTime(); - goto s|loopback; - } - 761 => { - ZapBarge(); - goto s|loopback; - } - 765 => { - Playback(demo-echotest); - Echo(); - Playback(demo-echodone); - goto s|loopback; - } - 766 => { - Festival(The other thing to watch is neuro-electronics: the ability to interface technology with our neural system: My wife: Sigrid: has had a cochlear implant since 1996. This once profoundly deaf person now uses the phone: recognizes accents: and listens to movies and recorded books.); - goto s|loopback; - } - 767 => { - agi(tts-riddle.agi); - Background(gsm/what-time-it-is2); - SayUnixTime(); - goto s|loopback; - } - 768 => { - agi(tts-computer.agi); - } - 771 => { - eagi(eagi-test); - agi(my-agi-test); - } - 772 => { - agi(wakeup.agi); - } - 775 => { - if( ${EXTEN}=${EXTEN} ) - { - BackGround(digits/1); - } - else - { - BackGround(digits/0); - } - if( ${EXTEN}=${LANGUAGE} ) - { - BackGround(digits/1); - } - else - { - BackGround(digits/0); - } - BackGround(digits/2); - } - 776 => { - Set(TEST=00359889811777); - if( ${TEST}= 00359889811777 ) - { - BackGround(digits/1); - } - else - { - BackGround(digits/0); - } - if( ${TEST}= 00359889811888 ) - { - BackGround(digits/1); - } - else - { - BackGround(digits/0); - } - Hangup(); - } - 790 => { - MeetMe(790,p); - } - 792 => { - goto pageall|s|begin; - } - 793 => { - #include "include1.ael2" - } - 795 => { - AGI(wakeup.agi); - Congestion(); - } - 797 => { - Set(CONFCIDNA=${CALLERID(name)}); - Set(CONFCIDNU=${CALLERID(num)}); - AGI(callall); - AGI(submit-announce.agi); - Hangup(); - } -} - -context wakeup { - 3 => { - Dial(Zap/3|30); - } - 4 => { - Dial(Zap/4|30); - - } - 5 => { - Dial(Zap/5|30); - - } - 6 => { - Dial(Zap/6|30); - - } - 99 => { - Dial(IAX2/murfiaxphone|30); - } - 97 => { - Dial(IAX2/ryaniax|30); - } - 94 => { - Dial(IAX2/seaniax|30); - } -} - -context announce-all { - s => { - begin: - MeetMe(5555,dtqp); - MeetMeAdmin(5555,K); - Hangup(); - } - h => { - MeetMeAdmin(5555,K); - Hangup(); - } -} - -// now include the telemarketer torture scripts! - -#include "telemarket_torture.ael2" - - diff --git a/pbx/ael/ael-test/ael-test3/include1.ael2 b/pbx/ael/ael-test/ael-test3/include1.ael2 deleted file mode 100644 index 80c562cb2..000000000 --- a/pbx/ael/ael-test/ael-test3/include1.ael2 +++ /dev/null @@ -1,3 +0,0 @@ - NoOp(Hello, this is included from include1.ael2); - #include "include2.ael2" - diff --git a/pbx/ael/ael-test/ael-test3/include2.ael2 b/pbx/ael/ael-test/ael-test3/include2.ael2 deleted file mode 100644 index 8d892fb0c..000000000 --- a/pbx/ael/ael-test/ael-test3/include2.ael2 +++ /dev/null @@ -1,4 +0,0 @@ - NoOp(This was included from include2.ael2); - #include "include3.ael2" - #include "include4.ael2" - diff --git a/pbx/ael/ael-test/ael-test3/include3.ael2 b/pbx/ael/ael-test/ael-test3/include3.ael2 deleted file mode 100644 index 3c6c1e3dd..000000000 --- a/pbx/ael/ael-test/ael-test3/include3.ael2 +++ /dev/null @@ -1,2 +0,0 @@ - NoOp(This is include3.ael2!); - #include "include5.ael2" diff --git a/pbx/ael/ael-test/ael-test3/include4.ael2 b/pbx/ael/ael-test/ael-test3/include4.ael2 deleted file mode 100644 index 7d3703a5e..000000000 --- a/pbx/ael/ael-test/ael-test3/include4.ael2 +++ /dev/null @@ -1,2 +0,0 @@ - NoOp(This is include4.ael2! Isn't it cool!?!?!?!); - NoOp(4 doesn't include anything); diff --git a/pbx/ael/ael-test/ael-test3/include5.ael2 b/pbx/ael/ael-test/ael-test3/include5.ael2 deleted file mode 100644 index 0e18983ef..000000000 --- a/pbx/ael/ael-test/ael-test3/include5.ael2 +++ /dev/null @@ -1 +0,0 @@ - NoOp(Include5.ael2 doesn't include anything, either!); diff --git a/pbx/ael/ael-test/ael-test3/telemarket_torture.ael2 b/pbx/ael/ael-test/ael-test3/telemarket_torture.ael2 deleted file mode 100755 index ebd8e9f2f..000000000 --- a/pbx/ael/ael-test/ael-test3/telemarket_torture.ael2 +++ /dev/null @@ -1,812 +0,0 @@ -// -// AN EXCERSIZE IN BAD DIALPLAN DESIGN -// (What better testing ground than on telemarketers?) -// - - -// BAD DESIGN: long, boring introductions followed by long, drawn out menus of choices. -// if they survive to the last option, how will they remember the choices? -// - -// BAD DESIGN: Amateur Recording. Poor voice quality, too quiet. -// Also, the announcer is definitely not vocally gifted. -// Also, the long pauses and clicks between the intro -// and menu choices might lead some to think that -// the announcements are over, and hang up. Too bad! - -// WORSE DESIGN: Instead of using the Background application, the Playback -// application is used. After taking so much time and trouble -// to record this material, the caller must listen and enjoy -// every syllable before they can make an option choice. None -// of that interrupting with a choice. We want them to savour -// every word! - -// GOOD/BAD, ER INSIDIOUS -- DANGLE A CARROT-- GIVE THE LISTENER A GOOD REASON TO -// HANG ON AND VOLUNTARILY LISTEN TO THE TORTURE. -// BUT, DON'T MAKE PROMISES YOU WON'T KEEP! - - -context telemarket { - s => { - begin: - Playback(telemarketer-intro); // ; Script: - // Due to the extremely high volume of calls from everything from telemarketers - // to Septic System Bacteria vendors, we are asking all such organizations - // to remove this number from their call list, or as need be, to add this - // number to their No-Call list, whichever is relevent. - - // [THE CARROT:] - // We HAVE made some exceptions, and if you wish to see if your organization - // has been exempted, please listen to and follow the following prompts. - // - // Otherwise, please Cease calling this number! - // - Playback(telemarketer-choices); - // if you represent a charitable organization, please dial 1, - // if you represent a political organization, please dial 2. - // if you represent a polling company, please dial 3, - // if you represent a market research organization, please dial 4. - // if you represent a magazine or newsletter, please dial 5. - // if you represent a commercial organization, please dial 6. - } - 1 => goto telemarket-charity|s|begin; - 2 => goto telemarket-political|s|begin; - 3 => goto telemarket-pollster|s|begin; - 4 => goto telemarket-research|s|begin; - 5 => goto telemarket-magazine|s|begin; - 6 => goto telemarket-commercial|s|begin; - 7 => goto telemarket-other|s|begin; - t => goto telemarket|s|begin; - i => goto telemarket|s|begin; - o => goto telemarket|s|begin; -} - -context telemarket-charity { - s => { - begin: - Playback(telemark-charity-intro); - // We have contributed generously to many worthy causes in the past, and will - // continue to do so in the future. But we suspect that such organizatons - // have sold our name and phone number to each other until we are now hounded - // day and night by literally hundreds of such organizations. - // Enough is Enough! - // - // If we have contributed to your cause in the past, we may, perhaps, be disposed to - // do so in the future, at our option, - // we give no pledges nor make any commitments here. - // Send us material via the post if you feel this necessary - // but do not even consider email. Any email or further phone calls from your organization - // in the future, will be considered an act of aggression, and we will - // blacklist your organization for the rest of our natural lives. - // - // To see if your organization is exempt from these prohibitions, please - // comply with the following options. - Playback(telemark-charity-choices); - // If your organization is disease or genetic defect related, dial 1, - // If your organization is handicap related, dial 2. - // If your organization is a police or fireman or other similar support entity, please dial 3. - // If your organization is a grade school to high school related - // fund raiser or other type of activity, please dial 4. - // If your organization is a college or univerity or alumnis organization, please dial 5. - // If your organization is animal rights or ecology related organization, please dial 6. - // If your organization is a political action or candidate support related, please dial 7. - // If your organization is a substance abuse related organization or cause, please dial 8. - // And any other charity or tax exempt organization should dial 9. - } - 1 => goto telemarket-char-disease|s|begin; - 2 => goto telemarket-char-handicap|s|begin; - 3 => goto telemarket-char-police|s|begin; - 4 => goto telemarket-char-school|s|begin; - 5 => goto telemarket-char-college|s|begin; - 6 => goto telemarket-char-animal|s|begin; - 7 => goto telemarket-char-candidate|s|begin; - 8 => goto telemarket-char-abuse|s|begin; - 9 => goto telemarket-char-other|s|begin; -// BAD DESIGN: referring all timeouts,invalid choices, etc, back to the root of the menu tree will frustrate users no end! -// WORSE DESIGN: How about having the user have to push a button to repeat the current menu? When a time out could just -// automatically do it for the user? - t => goto telemarket|s|begin; - i => goto telemarket|s|begin; - o => goto telemarket|s|begin; -} - -context telemarket-char-disease { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-char-handicap { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-char-police { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-char-school { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-char-college { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-char-animal { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-char-candidate { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-char-abuse { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-char-other { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-sorry { - s => { - begin: - Playback(telemarket-sorry); - // Sorry -- your organization is not exempt. Please stop calling us. - // Thank you. goodbye. - Hangup(); - } -} - - -// BAD DESIGN: Hanging up on your audience, no matter what the outcome, is not a nice thing to do! - -context telemarket-exception { - s => { - begin: - Playback(telemarket-success); - // Congratulations. Your organization IS exempt. Please call us back, - // but this time, just act like a normal caller. Thank you. Goodbye. - Hangup(); - } -} - - -// BAD DESIGN: Making long cascading menu choices is a nasty thing to do to callers! -// BAD DESIGN: Putting the most frequently encountered items at the end of a list is also a nasty thing to do! - - -// GOOD DESIGN: All rejection notices use a single context. All Acceptance also. To change a rejection to an -// acceptance, just change the reference from telemarket-sorry to telemarket-exception - - -context telemarket-political { - s => { - begin: - Playback(telemark-polit-intro); - // To see if your organization is exempt from our prohibitions, - // please follow the following prompts. - // please note that they are not in alphabetical order, and you will have to - // give them your full attention. - Playback(telemark-polit-choices); - // if You represent the America First Party, dial 1. - // if You represent the American Party, dial 2. - // if You represent the American Heritage Party, dial 3. - // if You represent the American Independent Party, dial 4. - // if You represent the American Nazi Party, dial 5. - // if You represent the Pot Party, dial 6. - // if You represent the American Reform Party, dial 7. - // if You represent the Christian Falenqist Party of America, dial 8. - // all others, please dial 9. - } - 1 => goto telemarket-poli-Am1st|s|begin; - 2 => goto telemarket-poli-American|s|begin; - 3 => goto telemarket-poli-AmHer|s|begin; - 4 => goto telemarket-poli-AmInd|s|begin; - 5 => goto telemarket-poli-AmNaz|s|begin; - 6 => goto telemarket-poli-Pot|s|begin; - 7 => goto telemarket-poli-AmRef|s|begin; - 8 => goto telemarket-poli-CFP|s|begin; - 9 => goto telemarket-political2|s|begin; - t => goto telemarket|s|begin; - i => goto telemarket|s|begin; - o => goto telemarket|s|begin; -} - -context telemarket-political2 { - s => { - begin: - Playback(telemark-politx-intro); - // Thank you for your patience, and I congratulate you for your persistence. - // Just a few more options! - // - Playback(telemark-polit2-choices); - // if You represent the Communist Party USA, dial 1. - // if You represent the Constitution Party, dial 2. - // if You represent the Family Values Party, dial 3. - // if You represent the Freedom Socialist Party, dial 4. - // if You represent the Grass Roots Party, dial 5. - // if You represent the Green Party, dial 6. - // if You represent the Greens Party, dial 7. - // if You represent the Independence Party, dial 8. - // all others, goto 9. - } - 1 => goto telemarket-poli-Communist|s|begin; - 2 => goto telemarket-poli-Constit|s|begin; - 3 => goto telemarket-poli-FamVal|s|begin; - 4 => goto telemarket-poli-FreedSoc|s|begin; - 5 => goto telemarket-poli-Grassroot|s|begin; - 6 => goto telemarket-poli-Green|s|begin; - 7 => goto telemarket-poli-Greens|s|begin; - 8 => goto telemarket-poli-Independence|s|begin; - 9 => goto telemarket-political3|s|begin; - t => goto telemarket|s|begin; - i => goto telemarket|s|begin; - o => goto telemarket|s|begin; -} - -context telemarket-political3 { - s => { - begin: - Playback(telemark-politx-intro); - Playback(telemark-polit3-choices); - // if You represent the Independant American Party, dial 1. - // if You represent the Labor Party, dial 2. - // if You represent the Libertarian Party, dial 3. - // if You represent the Light Party, dial 4. - // if You represent the Natural Law Party, dial 5. - // if You represent the New Party, dial 6. - // if You represent the New Union Party, dial 7. - // if You represent the Peace and Freedom Party, dial 8. - // all others, hang on, dial 9. - } - 1 => goto telemarket-poli-IndAm|s|begin; - 2 => goto telemarket-poli-Labor|s|begin; - 3 => goto telemarket-poli-Liber|s|begin; - 4 => goto telemarket-poli-Light|s|begin; - 5 => goto telemarket-poli-NatLaw|s|begin; - 6 => goto telemarket-poli-New|s|begin; - 7 => goto telemarket-poli-NewUn|s|begin; - 8 => goto telemarket-poli-PeaceFree|s|begin; - 9 => goto telemarket-political4|s|begin; - t => goto telemarket|s|begin; - i => goto telemarket|s|begin; - o => goto telemarket|s|begin; -} - - -context telemarket-political4 { - s => { - begin: - Playback(telemark-politx-intro); - Playback(telemark-polit4-choices); - // if You represent the Prohibition Party, dial 1. - // if You represent the Reform Party, dial 2. - // if You represent the Revolution , dial 3. - // if You represent the Socialist Party USA, dial 4. - // if You represent the Socialist Action Party, dial 5. - // if You represent the Socialist Equality Party, dial 6. - // if You represent the Socialist Labor Party, dial 7. - // if You represent the Socialist Workers Party, dial 8. - // all others, hang on, and dial 9. - } - 1 => goto telemarket-poli-Prohib|s|begin; - 2 => goto telemarket-poli-Ref|s|begin; - 3 => goto telemarket-poli-Revol|s|begin; - 4 => goto telemarket-poli-SocPart|s|begin; - 5 => goto telemarket-poli-SocAct|s|begin; - 6 => goto telemarket-poli-SocEq|s|begin; - 7 => goto telemarket-poli-SocLab|s|begin; - 8 => goto telemarket-poli-SocWork|s|begin; - 9 => goto telemarket-political5|s|begin; - t => goto telemarket|s|begin; - i => goto telemarket|s|begin; - o => goto telemarket|s|begin; -} - - -context telemarket-political5 { - s => { - begin: - Playback(telemark-politx-intro); - Playback(telemark-polit5-choices); - // if You represent the Southern Party, dial 1. - // if You represent the Southern Independence Party, dial 2. - // if You represent the US Pacifist Party, dial 3. - // if You represent the We the People Party, dial 4. - // if You represent the Workers World Party, dial 5. - // if You represent the Democratic Party, dial 6. - // if You represent the Republican Party, dial 7. - // all others, may dial 8. - } - 1 => goto telemarket-poli-South|s|begin; - 2 => goto telemarket-poli-SoInd|s|begin; - 3 => goto telemarket-poli-USPac|s|begin; - 4 => goto telemarket-poli-WTP|s|begin; - 5 => goto telemarket-poli-WWP|s|begin; - 6 => goto telemarket-poli-Democrat|s|begin; - 7 => goto telemarket-poli-Repub|s|begin; - 8 => goto telemarket-poli-other|s|begin; - t => goto telemarket|s|begin; - i => goto telemarket|s|begin; - o => goto telemarket|s|begin; -} - - -context telemarket-poli-other { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-Repub { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-Democrat { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-WWP { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-WTP { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-USPac { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-SoInd { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-South { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-SocWork { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-SocLab { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-SocEq { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-SocAct { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-SocPart { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-Revol { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-Ref { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-Prohib { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-PeaceFree { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-NewUn { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-New { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-NatLaw { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-Light { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-Liber { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-Labor { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-IndAm { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-Independence { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-Greens { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-Green { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-Grassroot { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-FreedSoc { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-FamVal { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-Constit { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-Communist { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-CFP { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-AmRef { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -// BAD DESIGN: Putting in infinite loops in the menus, whether by design or mistake is not nice! -context telemarket-poli-Pot { - s => { - begin: - goto telemarket-political|s|begin; // will the Pot Party Guys even notice an infinite loop? - } -} - -context telemarket-poli-AmNaz { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-AmInd { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-AmHer { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-American { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-Am1st { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - - -context telemarket-pollster { - s => { - begin: - Playback(telemark-poll-intro); - // I'm sorry-- We are just not available for doing any polling at the moment. So, - // please remove us from your list. - goto telemarket-sorry|s|begin; - } - t => goto telemarket|s|begin; - i => goto telemarket|s|begin; - o => goto telemarket|s|begin; -} - - -context telemarket-research { - s => { - begin: - Playback(telemark-research-intro); - // I'd like to say I'd love to help you with your market survey, but that would be a complete - // and total lie. I am not interested in helping you with Market Surveys. - // - // Please remove me from your call list. It just doesn't pay enough. But Thank you. - goto telemarket-sorry|s|begin; - } - t => goto telemarket|s|begin; - i => goto telemarket|s|begin; - o => goto telemarket|s|begin; -} - - -context telemarket-magazine { - s => { - begin: - Playback(telemark-mag-choices); - // If you are calling to see if I would like a NEW free subscription - // to your magazine or newsletter, please dial 1. - // If you are calling to see if I want to Renew an existing subscription, please dial 2. - // If you are representing some publisher, and want my opinion about something, or are doing - // some kind of survey, please dial 3. - // If you are calling to verify that some previous caller actually called me, and the - // verification information is correct, please dial 4. - // and if your call purpose doesn't match any of the above, please dial 5. - } - 1 => goto telemark-mag-new|s|begin; - 2 => goto telemark-mag-renew|s|begin; - 3 => goto telemark-mag-survey|s|begin; - 4 => goto telemark-mag-verify|s|begin; - 5 => goto telemark-mag-other|s|begin; - t => goto telemarket|s|begin; - i => goto telemarket|s|begin; - o => goto telemarket|s|begin; -} - - -context telemark-mag-new { - s => { - begin: - Playback(telemark-mag-new); - // I'm sorry, I'm maxed out, and the answer is NO. - // If you really think I'd LOVE to add your publication to the pile I already get, - // Send something via the post. Don't call me. - // Thank you. bye. - Hangup(); - } - t => goto telemarket|s|begin; - i => goto telemarket|s|begin; - o => goto telemarket|s|begin; -} - - -context telemark-mag-renew { - s => { - begin: - Playback(telemark-mag-renew); - // So, you want to see if I want to Renew, do you? The answer is most likely "YES". - // - // But, I will not answer a long list of questions over the phone. Send such - // categorization info via the post, and stop bothering me over the phone, - // if this is what you want. - // Do you need verification information? Normally I opt out of such nonsense, if possible. - // If not, use whatever of the following you can: - // My birth month is October. - // My birthplace is Kigali, in Rwanda, in Afica. - // My eye color is orange. - // All of these are wonderfully false, but I use them regularly for such purposes. Thank you. - Hangup(); - } - t => goto telemarket|s|begin; - i => goto telemarket|s|begin; - o => goto telemarket|s|begin; -} - - -context telemark-mag-survey { - s => { - begin: - Playback(telemark-mag-survey); - // Sorry, I don't have time to answer survey or opinion questions. Find someone - // else to help build your marketing database, I guess. Good Luck. - Hangup(); - } - t => goto telemarket|s|begin; - i => goto telemarket|s|begin; - o => goto telemarket|s|begin; -} - - -context telemark-mag-verify { - s => { - begin: - Playback(telemark-mag-verify); - // If you are calling to verify that your own agents aren't ripping you off, - // sorry, I can't help you. I opt out whenever I can, mainly because I'm not - // paid enough for this kind of thing. I always lie, and I can't remember - // what I might have said. Sorry. Goodbye. - Hangup(); - } - t => goto telemarket|s|begin; - i => goto telemarket|s|begin; - o => goto telemarket|s|begin; -} - - -context telemark-mag-other { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - - - -// BAD DESIGN: Is it entrapment, when you lure telemarketers to reveal their contact information, -// Just so you can report them to the FTC/FCC? If it is, isn't it unethical for them -// to hide their CID (via Anonymous, usually), to hide their identities from the public? - -// BTW -- What telemarketer would be stupid enough to fall for this? I'll bet not a single one! -// For that matter, what telemarketer will be stupid enough to even enter any of this? I'll bet not a single one! -// (but it was fun messing around). - -context telemarket-commercial { - s => { - begin: - Playback(telemark-comm-intro); // Script: Please leave your name, organization, and phone number, plus - // a short description of the purpose of your call, at the prompt. - // We will do our best to respond to your call! And, in the mean time, - // do not forget to add us to your no-call list! - Voicemail(u82); - goto telemarket-sorry|s|begin; - } - t => goto telemarket|s|begin; - i => goto telemarket|s|begin; - o => goto telemarket|s|begin; -} - - -context telemarket-other { - s => { - begin: - Playback(telemark-other-intro); - // Please review the previous menu options, and see if you really don't - // fit in one of the previous categories. - // If you do not, go ahead, and call me again, and let me know what category - // I should have included in the above list. I appreciate this. Thank you much! - Hangup(); - } - t => goto telemarket|s|begin; - i => goto telemarket|s|begin; - o => goto telemarket|s|begin; -} diff --git a/pbx/ael/ael-test/ael-test4/apptest.ael2 b/pbx/ael/ael-test/ael-test4/apptest.ael2 deleted file mode 100644 index c477d8531..000000000 --- a/pbx/ael/ael-test/ael-test4/apptest.ael2 +++ /dev/null @@ -1,146 +0,0 @@ -// this is a quick test to see how many of the apps we can spot j options in -// include this in a macro or extension -// at this moment, there are 18 apps that accept the j option. - - AddQueueMember(zork,iface,20,j); - ADSIProg(sfile); - AgentCallbackLogin(agent,s,30@cont); - AgentLogin(agent,s); - AgentMonitorOutgoing(dcn); - AGI(whatever); - AlarmReceiver(); - Answer(2); - AppendCDRUserField(value); - Authenticate(pword,adjmr); - BackGround(filename,snm,eng); - BackgroundDetect(filename,20,2,10); - Busy(10); - ChangeMonitor(fnamebase); - ChanIsAvail(Zap/5,sj); - ChanSpy(prefix,bg()qrv); - Congestion(5); - ControlPlayback(filename,10,6,4,0,5,7,j); - DateTime(unixtime,tz,fmt); - DBdel(fam/key); - DBdeltree(fam); - DeadAGI(command); - Dial(zap/1,45,A()CdD()fgG()hHjL()m()M()nNoprS()tTwW); - Dictate(basedir); - Directory(cont,dcont,f); - DISA(68986869876,context); - DumpChan(verblev); - DUNDiLookup(90709780978,context,bj); - EAGI(command); - Echo(); - EndWhile(); - Exec(appname,args); - ExecIf(expr,app,data); - ExecIfTime(*,*,*,*,appname); - ExternalIVR(command,arg1); - Festival(text); - Flash(); - ForkCDR(v); - GetCPEID(); - Gosub(cont,exten,priority); - GosubIf(cond?label); - Goto(cont,exten,prior); - GotoIf(cond?t:f); - GotoIfTime(*,*,*,*?cont,ext,prior); - Hangup(); - HasNewVoicemail(vmbox,var,j); - HasVoicemail(vmbox,var,j); - IAX2Provision(template); - ICES(xmlconfig); - ImportVar(nevar@chann,var); - Log(NOTICE,message); - LookupBlacklist(j); - LookupCIDName(); - Macro(macro,arg1); - MacroExit(); - MacroIf(expr?etc); - MailboxExists(mbox@cont,j); - Math(v,2+2); - MeetMe(5555,aAbcdDeimMpPqrstTovwxX); - MeetMeAdmin(5555,e,user); - MeetMeCount(5555,var); - Milliwatt(); - MixMonitor(filename,abv()V()W(),command); - Monitor(file.fmt,base,mb); - MP3Player(location); - MusicOnHold(class); - NBScat(); - NoCDR(); - NoOp(ignored); - Page(Zap/1,dq); - Park(exten); - ParkAndAnnounce(template,5,238,retcont); - ParkedCall(exten); - PauseQueueMember(queue,zap,j); - Pickup(ext@cont); - Playback(file,j); - PlayTones(arg); - PrivacyManager(3,4,j); - Progress(); - Queue(queuename,dhHnrtTwW,http://www.where.what,over,5); - Random(30,cont,ext,pri); - Read(var,fname,10,skip,2,5); - ReadFile(var=file,10); - RealTime(fam,2,val,prefix); - RealTimeUpdate(fam,2,val,2,newval); - Record(file,2,10,anqst); - RemoveQueueMember(queuename,iface,j); - ResetCDR(wav); - RetryDial(annound,4,2); - Return(); - Ringing(); - RxFAX(fname,caller); - SayAlpha(string); - SayDigits(string); - SayNumber(digits); - SayPhonetic(string); - SayUnixTime(unixtime,tz,fmt); - SendDTMF(digits,10); - SendImage(filename); - SendText(text,j); - SendURL(URL); - Set(a=b); - SetAMAFlags(); - SetCallerID(clid,a); - SetCallerPres(allowed_passed_screen); - SetCDRUserField(value); - SetGlobalVar(var=val); - SetMusicOnHold(class); - SetTransferCapability(SPEECH); - SIPAddHeader(header); - SIPDtmfMode(inband,info,rfc); - SIPGetHeader(var@headername); - SMS(name); - SoftHangup(zap/1,a); - StackPop(); - StartMusicOnHold(class); - StopMonitor(); - StopMusicOnHold(); - StopPlayTones(); - System(command); - TestClient(testid); - TestServer(); - Transfer(zap/1,j); - TrySystem(command); - TxFAX(filename,caller,debug); - UnpauseQueueMember(queuename,iface,j); - UserEvent(eventanme,body); - Verbose(5,message); - VMAuthenticate(mailbox@cont,s); - VoiceMail(mailbox@cont,bg()suj); - VoiceMailMain(mailbox@cont,pg()s); - Wait(2); - WaitExten(3,m()); - WaitForRing(2); - WaitForSilence(2,y); - WaitMusicOnHold(2); - While(expr); - Zapateller(answer,5); - ZapBarge(channel); - ZapRAS(arg); - ZapScan(group); - ZapSendKeypadFacility(); diff --git a/pbx/ael/ael-test/ael-test4/extensions.ael b/pbx/ael/ael-test/ael-test4/extensions.ael deleted file mode 100644 index 838aa2489..000000000 --- a/pbx/ael/ael-test/ael-test4/extensions.ael +++ /dev/null @@ -1,8 +0,0 @@ -context test1 -{ - test2 => - { - #include "apptest.ael2"; - } -} - diff --git a/pbx/ael/ael-test/ael-test5/extensions.ael b/pbx/ael/ael-test/ael-test5/extensions.ael deleted file mode 100644 index 304275a00..000000000 --- a/pbx/ael/ael-test/ael-test5/extensions.ael +++ /dev/null @@ -1,833 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Helpdesk Queue - -context hd-queue { - s => { - NoOp(Add a background sound to tell the user their options); - Queue(helpdesk|t); - NoOp(Put in options to apologize and send user to voicemail); - }; - - 0 => goto default|0|1; - 1 => { - Dial(u41950@svm1.shsu.edu); - Congestion(10); - Hangup; - }; -}; - - -context l903-calling { - _9903NXXXXXX => { - Realtime(l903_ext,exchange,${EXTEN:4:3},l903_); - if ("${l903_exchange}foo" = "foo") { - Playback(num-outside-area); - SayDigits(1); - Playback(and-area-code); - Playback(before-the-number); - Hangup; - }; - &dialout(${EXTEN}); - Congestion(10); - Hangup; - }; -}; -/////////////////////////////////////////////////////////////////////////////// -// Extensions pulled from houston.conf -// Converted the extension list to the database - -context houston-calling { - _9713NXXXXXX => { - Realtime(hou_713_ext,exchange,${EXTEN:4:3},hou_713_); - if ("${hou_713_exchange}foo" = "foo") { - Playback(num-outside-area); - SayDigits(1); - Playback(and-area-code); - Playback(before-the-number); - Hangup; - }; - &dialout(${EXTEN}); - Congestion(10); - Hangup; - }; - - _9281NXXXXXX => { - Realtime(hou_281_ext,exchange,${EXTEN:4:3},hou_281_); - if ("${hou_281_exchange}foo" = "foo") { - Playback(num-outside-area); - SayDigits(1); - Playback(and-area-code); - Playback(before-the-number); - Hangup; - }; - &dialout(${EXTEN}); - Congestion(10); - Hangup; - }; - - _9832NXXXXXX => { - Realtime(hou_832_ext,exchange,${EXTEN:4:3},hou_832_); - if ("${hou_832_exchange}foo" = "foo") { - Playback(num-outside-area); - SayDigits(1); - Playback(and-area-code); - Playback(before-the-number); - Hangup; - }; - &dialout(${EXTEN}); - Congestion(10); - Hangup; - }; -}; - - -/////////////////////////////////////////////////////////////////////////////// -// Extensions pulled from huntsville.conf -// Converted the extension list to the database - -context huntsville-calling { - _9NXXXXXX => { - Realtime(hv_ext,exchange,${EXTEN:1:3},hv_); - if ("${hv_exchange}foo" = "foo") { - Playback(num-outside-area); - SayDigits(1); - Playback(and-area-code); - Playback(before-the-number); - Hangup; - }; - &dialout(${EXTEN}); - Congestion(10); - Hangup; - }; - - _NXXXXXX => { - NoOp(Stripping last four to see what extension we're dialing); - Set(LAST4=${EXTEN:3}); - StripLSD(4); - }; - - i => Playback(pbx-invalid); - h => Hangup; -}; - -/////////////////////////////////////////////////////////////////////////////// -// Extensions pulled from macros.conf - -macro dialout( number ) { - Realtime(call_info,exten,${CALLERIDNUM:5},mon_); - if ("${mon_monitor}" = "YES") { - Dial(SIP/${number}@sgw1.shsu.edu,,wW); - Dial(SIP/${number}@sgw2.shsu.edu,,wW); - } else { - Dial(SIP/${number}@sgw1.shsu.edu); - Dial(SIP/${number}@sgw2.shsu.edu); - }; -}; - -// Standard extension macro: -// ${ext} - Extension -macro stdexten( ext ) { - Realtime(sipusers,name,${ext},sip_user_); - Realtime(call_info,exten|${ext},info_); - if ("${sip_user_name}foo" = "foo") { - Wait(1); - &dialout(${ext}); - Congestion(10); - Hangup; - }; - NoOp(${CALLERIDNUM}); - RealtimeUpdate(call_info,exten,${ext},calltrace,${CALLERIDNUM}); - System(/usr/local/bin/db_update.sh call_info calltrace ${CALLERIDNUM} exten ${ext} &); - &checkdnd(${ext}); - &checkcf(${ext}); - Realtime(call_info,exten,${CALLERIDNUM:5},mon_); - if ("${mon_monitor}" = "YES") { - Dial(SIP/${info_forwardto},25,wW); - } else { - Dial(SIP/${info_forwardto},25); - }; - switch ("${DIALSTATUS}") { - case "BUSY": - &checkcfb(${ext}); - break; - case "CHANUNAVAIL": - Dial(IAX2/asterisk:password@scm2.shsu.edu/${info_forwardto},25,wW); - MailboxExists(${ext}); -// if ("${VMBOXEXISTSSTATUS}" = "FAILED") { -// Congestion(10); -// Hangup; -// }; - &uvm(${ext}); - Hangup; - break; - case "CONGESTION": - MailboxExists(${ext}); - if ("${VMBOXEXISTSSTATUS}" = "FAILED") { - Congestion(10); - Hangup; - }; - &bvm(${ext}); - Hangup; - break; - default: - MailboxExists(${ext}); - if ("${VMBOXEXISTSSTATUS}" = "FAILED") { - Congestion(10); - Hangup; - }; - &uvm(${ext}); - Hangup; - }; - Hangup; -}; - -macro uvm( ext ) { - Dial(SIP/u${ext}@svm1.shsu.edu); - Playback(im-sorry); - Playback(voice-mail-system); - Playback(down); - Congestion(10); - Hangup; -}; - -macro bvm( ext ) { - Dial(SIP/b${ext}@svm1.shsu.edu); - Playback(im-sorry); - Playback(voice-mail-system); - Playback(down); - Congestion(10); - Hangup; -}; - -macro checkdnd( ext ) { - if ("${info_donotdisturb}foo" = "foo") { - NoOp(Do Not Disturb is not active); - } else - &uvm(${ext}); -}; - -macro checkcf( ext ) { - if ("${info_forwardto}foo" = "foo") - if ("${ext}" = "43974") { - Set(info_forwardto=${ext}&SCCP/${ext}); - } else { - Set(info_forwardto=${ext}&SIP/${ext}w); - }; -}; - -macro checkcfb( ext ) { - if ("${info_forwardbusy}foo" = "foo") { - Wait(1); - MailboxExists(${ext}); - if ("${VMBOXEXISTSSTATUS}" = "FAILED") { - &dialout(${ext}); - Hangup; - }; - &bvm(${ext}); - Hangup; - }; - &stdexten(${info_forwardbusy}); -}; - -/////////////////////////////////////////////////////////////////////////////// -// Extensions pulled from test.conf - -context test-include { - includes { - test-digium; - test-sounds; - test-phinfo; - }; -}; - -context test-digium { - *500 => { - Dial(IAX2/guest@misery.digium.com/s@default); - Playback(demo-nogo); - Hangup; - }; -}; - -context test-sounds { - *501 => { - Answer; - Musiconhold; - Wait(1); - Hangup; - }; -}; - -context test-phinfo { - *505 => { - Answer; - NoOp(${CALLERIDNUM:5}); - SayDigits(${CALLERIDNUM:5}); - Hangup; - }; -}; - -/////////////////////////////////////////////////////////////////////////////// -// Extensions pulled from external.conf - -context long-distance { - includes { - local; - }; - - _91XXXXXXXXXX => &dialout(${EXTEN}); - _9011. => &dialout(${EXTEN}); -}; - -context local { - includes { - default; - }; - - 911 => &dialout(911); - 9911 => &dialout(9911); - - _9NXXXXXX => goto huntsville-calling|${EXTEN}|1; - _936NXXXXXX => { - goto 9${EXTEN:3}|1; - Congestion(10); - Hangup; - }; - - _832NXXXXXX => { - goto 9${EXTEN}|1; - Congestion(10); - Hangup; - }; - - _713NXXXXXX => { - goto 9${EXTEN}|1 ; - Congestion(10); - Hangup; - }; - - _281NXXXXXX => { - goto 9${EXTEN}|1; - Congestion(10); - Hangup; - - }; - - _NXXNXXXXXX => { - goto 9${EXTEN}|1; - goto 91${EXTEN}|1; - Congestion(10); - Hangup; - }; - - _91800NXXXXXX => &dialout(${EXTEN}); - _91866NXXXXXX => &dialout(${EXTEN}); - _91877NXXXXXX => &dialout(${EXTEN}); - _91888NXXXXXX => &dialout(${EXTEN}); - _91900NXXXXXX => &dialout(${EXTEN}); - _91976NXXXXXX => &dialout(${EXTEN}); - _9713NXXXXXX => goto houston-calling|${EXTEN}|1; - _9281NXXXXXX => goto houston-calling|${EXTEN}|1; - _9832NXXXXXX => goto houston-calling|${EXTEN}|1; - _9903NXXXXXX => goto l903-calling|${EXTEN}|1; - - _31NXXNXXXXXX => &dialout(${EXTEN}); - - h => Hangup; -}; - -/////////////////////////////////////////////////////////////////////////////// -// Extensions pulled from internal.conf - -context from-scm2 { - _4XXXX => { - NoOp(DIALING SIP EXTENSION ${EXTEN} - FROM ${CALLERIDNUM}); - Dial(SIP/${EXTEN},20,wW); - Hangup; - }; - - _6XXXX => { - NoOp(DIALING SIP EXTENSION ${EXTEN} - FROM ${CALLERIDNUM}); - Dial(SIP/${EXTEN},20,wW); - Hangup; - }; -}; - -/////////////////////////////////////////////////////////// -// All internal extensions work through the default context -// Phones that can only make internal calls should be in -// this context. -/////////////////////////////////////////////////////////// - -context default { -// Include the contexts in the files that allow us to make these phone calls - includes { - vm-include; - apps-include; - test-include; - }; - -// ALWAYS have an 'h' extension - h => { - NoOp(Hangup cause was: ${HANGUPCAUSE}); - Hangup; - }; - -// We like to hear that we dialed an invalid extension - i => Playback(pbx-invalid); - -// Dial the operator - 0 => &dialout(0); - -// Send voicemail calls to the vm-* contexts to be handled - voicemail => goto vm-direct|s|1; - 5555 => goto vm-direct|s|1; - 62100 => goto vm-extension|s|1; - -// These are our campus extensions, send them to the macro - _6XXXX => &stdexten(${EXTEN}); - _4XXXX => &stdexten(${EXTEN}); -// These are campus extensions as well, might need to take this out though. - _9294XXXX => goto _4XXXX|1; - _9496XXXX => goto _6XXXX|1; - -// These allows us to dial from the directory in our phone without worrying about dialing 9 - _936294XXXX => { - goto ${EXTEN:5}|1; - goto 9${EXTEN:3}|1; - Congestion(10); - Hangup; - }; - - _936496XXXX => { - goto ${EXTEN:5}|1; - goto 9${EXTEN:3}|1; - Congestion(10); - Hangup; - }; -}; - -/////////////////////////////////////////////////////////////////////////////// -// Extensions pulled from apps.conf - -context apps-include { - includes { - app-agents; - app-dnd; - app-callforward; - app-calltrace; - app-conferences; - app-ssd; - app-psd; - app-idblock; - app-helpdesk; - app-dictate; - app-set-monitor; - }; -}; - -context app-agents { - *54 => { - Answer; - Wait(1); - Read(agent_no|agent-user); - AgentCallbackLogin(${agent_no}|s${CALLERIDNUM:5}); - Playback(agent-loginok); - Hangup; - }; - - *55 => { - Answer; - Wait(1); - AgentCallbackLogin(${agent_no}); - Hangup; - }; -}; - -context app-calltrace { -// caller dials this to find out the last call missed and possibly call back - *69 => goto app-calltrace-perform|s|1; -}; - -context app-calltrace-perform { - s => { - Answer; - Wait(1); - Background(info-about-last-call); - Background(telephone-number); - RealTime(call_info|exten|${CALLERIDNUM:5}|ct_); - if ("${ct_calltrace}foo" = "foo") { - Playback(loligo/from-unknown-caller); - Hangup; - } else { - SayDigits("${ct_calltrace}"); - Set(TIMEOUT(digit)=3); - Set(TIMEOUT(response)=7); - Background(loligo/to-call-this-number); - Background(press-1); - Background(loligo/silence/5); - }; - }; - - 1 => goto local|${ct_calltrace}|1; - - i => { - Playback(vm-goodbye); - Hangup; - }; - - t => { - Playback(vm-goodbye); - Hangup; - }; -}; - -context app-set-monitor { - *50 => { - Realtime(call_info,exten,${CALLERIDNUM:5},mon_set_); - if ("${mon_set_monitor}" = "YES") { - RealtimeUpdate(call_info,exten,${CALLERIDNUM:5},monitor|); - System(/usr/local/bin/db_update.sh call_info monitor '' exten ${CALLERIDNUM:5} &); - } else { - RealtimeUpdate(call_info,exten,${CALLERIDNUM:5},monitor,YES); - System(/usr/local/bin/db_update.sh call_info monitor YES exten ${CALLERIDNUM:5} &); - }; - NoOp(${mon_set_monitor}); - Hangup; - }; -}; - -context app-dnd { - *78 => { - Answer; - Wait(1); - RealtimeUpdate(call_info,exten,${CALLERIDNUM:5},donotdisturb,YES); - System(/usr/local/bin/db_update.sh call_info donotdisturb YES exten ${CALLERIDNUM:5} &); - Playback(do-not-disturb); - Playback(loligo/activated); - Hangup; - }; - - *79 => { - Answer; - Wait(1); - RealtimeUpdate(call_info,exten,${CALLERIDNUM:5},donotdisturb|); - System(/usr/local/bin/db_update.sh call_info donotdisturb '' exten ${CALLERIDNUM:5} &); - Playback(do-not-disturb); - Playback(loligo/de-activated); - Hangup; - }; -}; - -context app-callforward { - // forwards calling extension to input number *72{EXTEN} - _*72. => { - RealtimeUpdate(call_info,exten,${CALLERIDNUM:5},forwardto,${EXTEN:3}); - System(/usr/local/bin/db_update.sh call_info forwardto ${EXTEN:3} exten ${CALLERIDNUM:5} &); - Answer; - Wait(1); - Playback(loligo/call-fwd-unconditional); - Playback(loligo/for); - Playback(loligo/extension); - SayDigits(${CALLERIDNUM:5}); - Playback(loligo/is-set-to); - SayDigits(${EXTEN:3}); - Hangup; - }; - - // prompts for extension to forward to - *72 => { - Answer; - Wait(1); - Playback(please-enter-your); - Playback(extension); - Background(then-press-pound); - VMAuthenticate(|s); - Background(loligo/ent-target-attendant); - Read(toext,loligo/then-press-pound); - Wait(1); - RealtimeUpdate(call_info,exten,${AUTH_MAILBOX},forwardto,${toext}); - System(/usr/local/bin/db_update.sh call_info forwardto ${toext} exten ${AUTH_MAILBOX} &); - Playback(loligo/call-fwd-unconditional); - Playback(loligo/for); - Playback(loligo/extension); - SayDigits(${AUTH_MAILBOX}); - Playback(loligo/is-set-to); - SayDigits(${toext}); - Hangup; - }; - - // cancels dialed extension call forward - _*73. => { - Realtime(voicemail,mailbox,${EXTEN:3},auth_); - Answer; - Wait(1); - Authenticate(${auth_password}); - RealtimeUpdate(call_info,exten,${EXTEN:3},forwardto,); - System(/usr/local/bin/db_update.sh call_info forwardto '' exten ${EXTEN:3} &); - Wait(1); - SayDigits(${EXTEN:3}); - Playback(loligo/call-fwd-cancelled); - Hangup; - }; - - // cancels call forward for calling extension - *73 => { - RealtimeUpdate(call_info,exten,${CALLERIDNUM:5},forwardto,); - System(/usr/local/bin/db_update.sh call_info forwardto '' exten ${CALLERIDNUM:5} &); - Answer; - Wait(1); - Playback(loligo/call-fwd-cancelled); - Hangup; - }; - - // dialed call forward on busy - _*90. => { - RealtimeUpdate(call_info,exten,${CALLERIDNUM:5},forwardbusy,${EXTEN:3}); - System(/usr/local/bin/db_update.sh call_info forwardbusy ${EXTEN:3} exten ${CALLERIDNUM:5} &); - Answer; - Wait(1); - Playback(loligo/call-fwd-on-busy); - Playback(loligo/for); - Playback(loligo/extension); - SayDigits(${CALLERIDNUM:5}); - Playback(loligo/is-set-to); - SayDigits(${EXTEN:3}); - Hangup; - }; - - // cancels call forward on busy for calling extension - *91 => { - RealtimeUpdate(call_info,exten,${CALLERIDNUM:5},forwardbusy|); - System(/usr/local/bin/db_update.sh call_info forwardbusy '' exten ${CALLERIDNUM:5} &); - Answer; - Wait(1); - Playback(loligo/call-fwd-on-busy); - Playback(loligo/de-activated); - Hangup; - }; - - h => Hangup; -}; - -context app-idblock { - _*67. => { - Set(CALLERID(name)=Anonymous); - &stdexten(${EXTEN:3}); - }; -}; - -context app-dictate { - *1 => { - Dictate(); - Hangup; - }; -}; - -context app-ssd { -// *59 <xx> <y.> - Set system speed dial <xx> to digits <y.> -// *59 <xx> 0 - Delete system speed dial <xx> -// *59 <xx> - Review system speed dial <xx> -// *1xx - Dial speed dial <xx> - _*59XXX. => { - Answer; - RealtimeUpdate(ssd,sd,${EXTEN:3:2},extension,${EXTEN:5}); - System(/usr/local/bin/db_update.sh systemsd extension ${EXTEN:5} sd ${EXTEN:3:2} &); - Wait(1); - Playback(loligo/speed-dial); - SayDigits(${EXTEN:3:2}); - Playback(loligo/has-been-set-to); - SayDigits(${EXTEN:5}); - Hangup; - }; - - _*59XX0 => { - Answer; - RealtimeUpdate(ssd,sd,${EXTEN:3:2},extension,); - System(/usr/local/bin/db_update.sh systemsd extension '' sd ${EXTEN:3:2} &); - Wait(1); - Playback(loligo/speed-dial); - SayDigits(${EXTEN:3:2}); - Playback(loligo/has-been-cleared); - Hangup; - }; - - _*59XX => { - Answer; - Realtime(ssd,sd,${EXTEN:3},ssd_); - if ("${ssd_extension}foo" = "foo") { - Playback(loligo/speed-dial); - SayDigits(${EXTEN:3:2}); - Playback(loligo/is-not-set); - Hangup; - }; - Wait(1); - Playback(loligo/speed-dial); - SayDigits(${EXTEN:3:2}); - Playback(loligo/is-set-to); - SayDigits(${ssd_extension}); - Hangup; - }; - - // NTC = number to call - _*1XX => { - Realtime(ssd,sd,${EXTEN:2},ssd_); - if ("${ssd_extension}foo" = "foo") { - Answer; - Wait(1); - Playback(loligo/speed-dial); - SayDigits(${EXTEN:2}); - Playback(loligo/is-not-set); - Hangup; - }; - &stdexten(${ssd_extension}); - Congestion(10); - Hangup; - }; -}; - -macro check-psd-exists ( ext ) { - Realtime(psd,extension,${ext},psd_); - if ("${psd_extension}foo" = "foo") { - System(/usr/local/bin/create_psd.sh ${ext}); - } else - NoOp(PSD set for ${ext}); -}; - -context app-psd { -// *89 <xx> <y.> - Set personal speed dial <xx> to digits <y.> -// *89 <xx> 0 - Delete personal speed dial <xx> -// *89 <xx> - Review personal speed dial <xx> -// *2xx - Dial personal speed dial <xx> - _*89XXX. => { - &check-psd-exists(${CALLERIDNUM:5}); - Answer; - RealtimeUpdate(psd,extension,${CALLERIDNUM:5},s${EXTEN:3:2},${EXTEN:5}); - System(/usr/local/bin/db_update.sh personalsd s${EXTEN:3:2} ${EXTEN:5} extension ${CALLERIDNUM:5} &); - Wait(1); - Playback(loligo/speed-dial); - SayDigits(${EXTEN:3:2}); - Playback(loligo/has-been-set-to); - SayDigits(${EXTEN:5}); - Hangup; - }; - - _*89XX0 => { - &check-psd-exists(${CALLERIDNUM:5}); - Answer; - RealtimeUpdate(psd|extension|${CALLERIDNUM:5}|s${EXTEN:3:2}|); - System(/usr/local/bin/db_update.sh personalsd s${EXTEN:3:2} '' extension ${CALLERIDNUM:5} &); - Wait(1); - Playback(loligo/speed-dial); - SayDigits(${EXTEN:3:2}); - Playback(loligo/has-been-cleared); - Hangup; - }; - - _*89XX => { - &check-psd-exists(${CALLERIDNUM:5}); - Answer; - Realtime(psd|extension|${CALLERIDNUM:5}|psd_); - Wait(1); - if ("${psd_s${EXTEN:3:2}}foo" = "foo") { - Playback(loligo/speed-dial); - SayDigits(${EXTEN:3:2}); - Playback(loligo/is-not-set); - Hangup; - }; - Playback(loligo/speed-dial); - SayDigits(${EXTEN:3:2}); - Playback(loligo/is-set-to); - SayDigits(${psd_s${EXTEN:3:2}}); - Hangup; - }; - - // NTC = number to call - _*2XX => { - &check-psd-exists(${CALLERIDNUM:5}); - Realtime(psd|extension|${CALLERIDNUM:5}|psd_); - if ("${psd_s${EXTEN:2}}foo" = "foo") { - Answer; - Wait(1); - Playback(loligo/speed-dial); - SayDigits(${EXTEN:2}); - Playback(loligo/is-not-set); - Hangup; - }; - &stdexten(${psd_s${EXTEN:2}}); - Congestion(10); - Hangup; - }; -}; - -context app-helpdesk { - *4357 => { - &stdexten(41950); - Congestion; - }; -}; - -context app-conferences { -// waiting for room number announcement - *86 => goto app-conf-hidden|s|1; -}; - -context app-conf-hidden { - s => { - Wait(1); - Playback(loligo/please-enter-the); - Playback(loligo/extension); - read(roomtoenter,loligo/then-press-pound); - Meetme(${roomtoenter}); - Waitexten(8); - Hangup; - }; - - _1. => Meetme(${EXTEN}); -}; - -/////////////////////////////////////////////////////////////////////////////// -// Extensions pulled from vm.conf: - -context vm-include { - includes { - vm-direct; - vm-extension; - vm-directory; - }; -}; - -context vm-direct { - s => { - Dial(SIP/5555@svm1.shsu.edu,20); - Playback(im-sorry); - Playback(voice-mail-system); - Playback(down); - Playback(extra/pls-try-call-later); - Congestion(10); - Hangup; - }; -}; - -context vm-extension { - s => { - Dial(SIP/62100@svm1.shsu.edu,20); - Playback(im-sorry); - Playback(voice-mail-system); - Playback(down); - Playback(extra/pls-try-call-later); - Congestion(10); - Hangup; - }; -}; - -context vm-directory { - 5556 => { - Dial(SIP/5556@svm1.shsu.edu); - Playback(im-sorry); - Playback(voice-mail-system); - Playback(down); - Playback(extra/pls-try-call-later); - Congestion(10); - Hangup; - }; -}; diff --git a/pbx/ael/ael-test/ael-test6/extensions.ael b/pbx/ael/ael-test/ael-test6/extensions.ael deleted file mode 100644 index 890c7111c..000000000 --- a/pbx/ael/ael-test/ael-test6/extensions.ael +++ /dev/null @@ -1,833 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// Helpdesk Queue - -context hd-queue { - s => { - NoOp(Add a background sound to tell the user their options); - Queue(helpdesk|t); - NoOp(Put in options to apologize and send user to voicemail); - }; - - 0 => goto default|0|1; - 1 => { - Dial(u41950@svm1.shsu.edu); - Congestion(10); - Hangup; - }; -}; - - -context l903-calling { - _9903NXXXXXX => { - Realtime(l903_ext|exchange|${EXTEN:4:3}|l903_); - if ("${l903_exchange}foo" = "foo") { - Playback(num-outside-area); - SayDigits(1); - Playback(and-area-code); - Playback(before-the-number); - Hangup; - }; - &dialout(${EXTEN}); - Congestion(10); - Hangup; - }; -}; -/////////////////////////////////////////////////////////////////////////////// -// Extensions pulled from houston.conf -// Converted the extension list to the database - -context houston-calling { - _9713NXXXXXX => { - Realtime(hou_713_ext|exchange|${EXTEN:4:3}|hou_713_); - if ("${hou_713_exchange}foo" = "foo") { - Playback(num-outside-area); - SayDigits(1); - Playback(and-area-code); - Playback(before-the-number); - Hangup; - }; - &dialout(${EXTEN}); - Congestion(10); - Hangup; - }; - - _9281NXXXXXX => { - Realtime(hou_281_ext|exchange|${EXTEN:4:3}|hou_281_); - if ("${hou_281_exchange}foo" = "foo") { - Playback(num-outside-area); - SayDigits(1); - Playback(and-area-code); - Playback(before-the-number); - Hangup; - }; - &dialout(${EXTEN}); - Congestion(10); - Hangup; - }; - - _9832NXXXXXX => { - Realtime(hou_832_ext|exchange|${EXTEN:4:3}|hou_832_); - if ("${hou_832_exchange}foo" = "foo") { - Playback(num-outside-area); - SayDigits(1); - Playback(and-area-code); - Playback(before-the-number); - Hangup; - }; - &dialout(${EXTEN}); - Congestion(10); - Hangup; - }; -}; - - -/////////////////////////////////////////////////////////////////////////////// -// Extensions pulled from huntsville.conf -// Converted the extension list to the database - -context huntsville-calling { - _9NXXXXXX => { - Realtime(hv_ext|exchange|${EXTEN:1:3}|hv_); - if ("${hv_exchange}foo" = "foo") { - Playback(num-outside-area); - SayDigits(1); - Playback(and-area-code); - Playback(before-the-number); - Hangup; - }; - &dialout(${EXTEN}); - Congestion(10); - Hangup; - }; - - _NXXXXXX => { - NoOp(Stripping last four to see what extension we're dialing); - Set(LAST4=${EXTEN:3}); - StripLSD(4); - }; - - i => Playback(pbx-invalid); - h => Hangup; -}; - -/////////////////////////////////////////////////////////////////////////////// -// Extensions pulled from macros.conf - -macro dialout( number ) { - Realtime(call_info|exten|${CALLERIDNUM:5}|mon_); - if ("${mon_monitor}" = "YES") { - Dial(SIP/${number}@sgw1.shsu.edu,,wW); - Dial(SIP/${number}@sgw2.shsu.edu,,wW); - } else { - Dial(SIP/${number}@sgw1.shsu.edu); - Dial(SIP/${number}@sgw2.shsu.edu); - }; -}; - -// Standard extension macro: -// ${ext} - Extension -macro stdexten( ext ) { - Realtime(sipusers|name|${ext}|sip_user_); - Realtime(call_info|exten|${ext}|info_); - if ("${sip_user_name}foo" = "foo") { - Wait(1); - &dialout(${ext}); - Congestion(10); - Hangup; - }; - NoOp(${CALLERIDNUM}); - RealtimeUpdate(call_info|exten|${ext}|calltrace|${CALLERIDNUM}); - System(/usr/local/bin/db_update.sh call_info calltrace ${CALLERIDNUM} exten ${ext} &); - &checkdnd(${ext}); - &checkcf(${ext}); - Realtime(call_info|exten|${CALLERIDNUM:5}|mon_); - if ("${mon_monitor}" = "YES") { - Dial(SIP/${info_forwardto},25,wW); - } else { - Dial(SIP/${info_forwardto},25); - }; - switch ("${DIALSTATUS}") { - case "BUSY": - &checkcfb(${ext}); - break; - case "CHANUNAVAIL": - Dial(IAX2/asterisk:password@scm2.shsu.edu/${info_forwardto},25,wW); - MailboxExists(${ext}); -// if ("${VMBOXEXISTSSTATUS}" = "FAILED") { -// Congestion(10); -// Hangup; -// }; - &uvm(${ext}); - Hangup; - break; - case "CONGESTION": - MailboxExists(${ext}); - if ("$(VMBOXEXISTSSTATUS}" = "FAILED") { - Congestion(10); - Hangup; - }; - &bvm(${ext}); - Hangup; - break; - default: - MailboxExists(${ext}); - if ("$(VMBOXEXISTSSTATUS}" = "FAILED") { - Congestion(10); - Hangup; - }; - &uvm(${ext}); - Hangup; - }; - Hangup; -}; - -macro uvm( ext ) { - Dial(SIP/u${ext}@svm1.shsu.edu); - Playback(im-sorry); - Playback(voice-mail-system); - Playback(down); - Congestion(10); - Hangup; -}; - -macro bvm( ext ) { - Dial(SIP/b${ext}@svm1.shsu.edu); - Playback(im-sorry); - Playback(voice-mail-system); - Playback(down); - Congestion(10); - Hangup; -}; - -macro checkdnd( ext ) { - if ("${info_donotdisturb}foo" = "foo") { - NoOp(Do Not Disturb is not active); - } else - &uvm(${ext}); -}; - -macro checkcf( ext ) { - if ("${info_forwardto}foo" = "foo") - if ("${ext}" = "43974") { - Set(info_forwardto=${ext}&SCCP/${ext}); - } else { - Set(info_forwardto=${ext}&SIP/${ext}w); - }; -}; - -macro checkcfb( ext ) { - if ("${info_forwardbusy}foo" = "foo") { - Wait(1); - MailboxExists(${ext}); - if ("$(VMBOXEXISTSSTATUS}" = "FAILED") { - &dialout(${ext}); - Hangup; - }; - &bvm(${ext}); - Hangup; - }; - &stdexten(${info_forwardbusy}); -}; - -/////////////////////////////////////////////////////////////////////////////// -// Extensions pulled from test.conf - -context test-include { - includes { - test-digium; - test-sounds; - test-phinfo; - }; -}; - -context test-digium { - *500 => { - Dial(IAX2/guest@misery.digium.com/s@default); - Playback(demo-nogo); - Hangup; - }; -}; - -context test-sounds { - *501 => { - Answer; - Musiconhold; - Wait(1); - Hangup; - }; -}; - -context test-phinfo { - *505 => { - Answer; - NoOp(${CALLERIDNUM:5}); - SayDigits(${CALLERIDNUM:5}); - Hangup; - }; -}; - -/////////////////////////////////////////////////////////////////////////////// -// Extensions pulled from external.conf - -context long-distance { - includes { - local; - }; - - _91XXXXXXXXXX => &dialout(${EXTEN}); - _9011. => &dialout(${EXTEN}); -}; - -context local { - includes { - default; - }; - - 911 => &dialout(911); - 9911 => &dialout(9911); - - _9NXXXXXX => goto huntsville-calling|${EXTEN}|1; - _936NXXXXXX => { - Goto 9${EXTEN:3}|1; - Congestion(10); - Hangup; - }; - - _832NXXXXXX => { - goto 9${EXTEN}|1; - Congestion(10); - Hangup; - }; - - _713NXXXXXX => { - goto 9${EXTEN}|1 ; - Congestion(10); - Hangup; - }; - - _281NXXXXXX => { - goto 9${EXTEN}|1; - Congestion(10); - Hangup; - - }; - - _NXXNXXXXXX => { - goto 9${EXTEN}|1; - goto 91${EXTEN}|1; - Congestion(10); - Hangup; - }; - - _91800NXXXXXX => &dialout(${EXTEN}); - _91866NXXXXXX => &dialout(${EXTEN}); - _91877NXXXXXX => &dialout(${EXTEN}); - _91888NXXXXXX => &dialout(${EXTEN}); - _91900NXXXXXX => &dialout(${EXTEN}); - _91976NXXXXXX => &dialout(${EXTEN}); - _9713NXXXXXX => goto houston-calling|${EXTEN}|1; - _9281NXXXXXX => goto houston-calling|${EXTEN}|1; - _9832NXXXXXX => goto houston-calling|${EXTEN}|1; - _9903NXXXXXX => goto l903-calling|${EXTEN}|1; - - _31NXXNXXXXXX => &dialout(${EXTEN}); - - h => Hangup; -}; - -/////////////////////////////////////////////////////////////////////////////// -// Extensions pulled from internal.conf - -context from-scm2 { - _4XXXX => { - NoOp(DIALING SIP EXTENSION ${EXTEN} - FROM ${CALLERIDNUM}); - Dial(SIP/${EXTEN},20,wW); - Hangup; - }; - - _6XXXX => { - NoOp(DIALING SIP EXTENSION ${EXTEN} - FROM ${CALLERIDNUM}); - Dial(SIP/${EXTEN},20,wW); - Hangup; - }; -}; - -/////////////////////////////////////////////////////////// -// All internal extensions work through the default context -// Phones that can only make internal calls should be in -// this context. -/////////////////////////////////////////////////////////// - -context default { -// Include the contexts in the files that allow us to make these phone calls - includes { - vm-include; - apps-include; - test-include; - }; - -// ALWAYS have an 'h' extension - h => { - NoOp(Hangup cause was: ${HANGUPCAUSE}); - Hangup; - }; - -// We like to hear that we dialed an invalid extension - i => Playback(pbx-invalid); - -// Dial the operator - 0 => &dialout(0); - -// Send voicemail calls to the vm-* contexts to be handled - voicemail => goto vm-direct|s|1; - 5555 => goto vm-direct|s|1; - 62100 => goto vm-extension|s|1; - -// These are our campus extensions, send them to the macro - _6XXXX => &stdexten(${EXTEN}); - _4XXXX => &stdexten(${EXTEN}); -// These are campus extensions as well, might need to take this out though. - _9294XXXX => goto _4XXXX|1; - _9496XXXX => goto _6XXXX|1; - -// These allows us to dial from the directory in our phone without worrying about dialing 9 - _936294XXXX => { - goto ${EXTEN:5}|1; - goto 9${EXTEN:3}|1; - Congestion(10); - Hangup; - }; - - _936496XXXX => { - goto ${EXTEN:5}|1; - goto 9${EXTEN:3}|1; - Congestion(10); - Hangup; - }; -}; - -/////////////////////////////////////////////////////////////////////////////// -// Extensions pulled from apps.conf - -context apps-include { - includes { - app-agents; - app-dnd; - app-callforward; - app-calltrace; - app-conferences; - app-ssd; - app-psd; - app-idblock; - app-helpdesk; - app-dictate; - app-set-monitor; - }; -}; - -context app-agents { - *54 => { - Answer; - Wait(1); - Read(agent_no|agent-user); - AgentCallbackLogin(${agent_no}|s${CALLERIDNUM:5}); - Playback(agent-loginok); - Hangup; - }; - - *55 => { - Answer; - Wait(1); - AgentCallbackLogin(${agent_no}); - Hangup; - }; -}; - -context app-calltrace { -// caller dials this to find out the last call missed and possibly call back - *69 => goto app-calltrace-perform|s|1; -}; - -context app-calltrace-perform { - s => { - Answer; - Wait(1); - Background(info-about-last-call); - Background(telephone-number); - RealTime(call_info|exten|${CALLERIDNUM:5}|ct_); - if ("${ct_calltrace}foo" = "foo") { - Playback(loligo/from-unknown-caller); - Hangup; - } else { - SayDigits("${ct_calltrace}"); - Set(TIMEOUT(digit)=3); - Set(TIMEOUT(response)=7); - Background(loligo/to-call-this-number); - Background(press-1); - Background(loligo/silence/5); - }; - }; - - 1 => goto local|${ct_calltrace}|1; - - i => { - Playback(vm-goodbye); - Hangup; - }; - - t => { - Playback(vm-goodbye); - Hangup; - }; -}; - -context app-set-monitor { - *50 => { - Realtime(call_info|exten|${CALLERIDNUM:5}|mon_set_); - if ("${mon_set_monitor}" = "YES") { - RealtimeUpdate(call_info|exten|${CALLERIDNUM:5}|monitor|); - System(/usr/local/bin/db_update.sh call_info monitor '' exten ${CALLERIDNUM:5} &); - } else { - RealtimeUpdate(call_info|exten|${CALLERIDNUM:5}|monitor|YES); - System(/usr/local/bin/db_update.sh call_info monitor YES exten ${CALLERIDNUM:5} &); - }; - NoOp(${mon_set_monitor}); - Hangup; - }; -}; - -context app-dnd { - *78 => { - Answer; - Wait(1); - RealtimeUpdate(call_info|exten|${CALLERIDNUM:5}|donotdisturb|YES); - System(/usr/local/bin/db_update.sh call_info donotdisturb YES exten ${CALLERIDNUM:5} &); - Playback(do-not-disturb); - Playback(loligo/activated); - Hangup; - }; - - *79 => { - Answer; - Wait(1); - RealtimeUpdate(call_info|exten|${CALLERIDNUM:5}|donotdisturb|); - System(/usr/local/bin/db_update.sh call_info donotdisturb '' exten ${CALLERIDNUM:5} &); - Playback(do-not-disturb); - Playback(loligo/de-activated); - Hangup; - }; -}; - -context app-callforward { - // forwards calling extension to input number *72{EXTEN} - _*72. => { - RealtimeUpdate(call_info|exten|${CALLERIDNUM:5}|forwardto|${EXTEN:3}); - System(/usr/local/bin/db_update.sh call_info forwardto ${EXTEN:3} exten ${CALLERIDNUM:5} &); - Answer; - Wait(1); - Playback(loligo/call-fwd-unconditional); - Playback(loligo/for); - Playback(loligo/extension); - SayDigits(${CALLERIDNUM:5}); - Playback(loligo/is-set-to); - SayDigits(${EXTEN:3}); - Hangup; - }; - - // prompts for extension to forward to - *72 => { - Answer; - Wait(1); - Playback(please-enter-your); - Playback(extension); - Background(then-press-pound); - VMAuthenticate(|s); - Background(loligo/ent-target-attendant); - Read(toext,loligo/then-press-pound); - Wait(1); - RealtimeUpdate(call_info|exten|${AUTH_MAILBOX}|forwardto|${toext}); - System(/usr/local/bin/db_update.sh call_info forwardto ${toext} exten ${AUTH_MAILBOX} &); - Playback(loligo/call-fwd-unconditional); - Playback(loligo/for); - Playback(loligo/extension); - SayDigits(${AUTH_MAILBOX}); - Playback(loligo/is-set-to); - SayDigits(${toext}); - Hangup; - }; - - // cancels dialed extension call forward - _*73. => { - Realtime(voicemail|mailbox|${EXTEN:3}|auth_); - Answer; - Wait(1); - Authenticate(${auth_password}); - RealtimeUpdate(call_info|exten|${EXTEN:3}|forwardto|); - System(/usr/local/bin/db_update.sh call_info forwardto '' exten ${EXTEN:3} &); - Wait(1); - SayDigits(${EXTEN:3}); - Playback(loligo/call-fwd-cancelled); - Hangup; - }; - - // cancels call forward for calling extension - *73 => { - RealtimeUpdate(call_info|exten|${CALLERIDNUM:5}|forwardto|); - System(/usr/local/bin/db_update.sh call_info forwardto '' exten ${CALLERIDNUM:5} &); - Answer; - Wait(1); - Playback(loligo/call-fwd-cancelled); - Hangup; - }; - - // dialed call forward on busy - _*90. => { - RealtimeUpdate(call_info|exten|${CALLERIDNUM:5}|forwardbusy|${EXTEN:3}); - System(/usr/local/bin/db_update.sh call_info forwardbusy ${EXTEN:3} exten ${CALLERIDNUM:5} &); - Answer; - Wait(1); - Playback(loligo/call-fwd-on-busy); - Playback(loligo/for); - Playback(loligo/extension); - SayDigits(${CALLERIDNUM:5}); - Playback(loligo/is-set-to); - SayDigits(${EXTEN:3}); - Hangup; - }; - - // cancels call forward on busy for calling extension - *91 => { - RealtimeUpdate(call_info|exten|${CALLERIDNUM:5}|forwardbusy|); - System(/usr/local/bin/db_update.sh call_info forwardbusy '' exten ${CALLERIDNUM:5} &); - Answer; - Wait(1); - Playback(loligo/call-fwd-on-busy); - Playback(loligo/de-activated); - Hangup; - }; - - h => Hangup; -}; - -context app-idblock { - _*67. => { - Set(CALLERID(name)=Anonymous); - &stdexten(${EXTEN:3}); - }; -}; - -context app-dictate { - *1 => { - Dictate(); - Hangup; - }; -}; - -context app-ssd { -// *59 <xx> <y.> - Set system speed dial <xx> to digits <y.> -// *59 <xx> 0 - Delete system speed dial <xx> -// *59 <xx> - Review system speed dial <xx> -// *1xx - Dial speed dial <xx> - _*59XXX. => { - Answer; - RealtimeUpdate(ssd|sd|${EXTEN:3:2}|extension|${EXTEN:5}); - System(/usr/local/bin/db_update.sh systemsd extension ${EXTEN:5} sd ${EXTEN:3:2} &); - Wait(1); - Playback(loligo/speed-dial); - SayDigits(${EXTEN:3:2}); - Playback(loligo/has-been-set-to); - SayDigits(${EXTEN:5}); - Hangup; - }; - - _*59XX0 => { - Answer; - RealtimeUpdate(ssd|sd|${EXTEN:3:2}|extension|); - System(/usr/local/bin/db_update.sh systemsd extension '' sd ${EXTEN:3:2} &); - Wait(1); - Playback(loligo/speed-dial); - SayDigits(${EXTEN:3:2}); - Playback(loligo/has-been-cleared); - Hangup; - }; - - _*59XX => { - Answer; - Realtime(ssd|sd|${EXTEN:3}|ssd_); - if ("${ssd_extension}foo" = "foo") { - Playback(loligo/speed-dial); - SayDigits(${EXTEN:3:2}); - Playback(loligo/is-not-set); - Hangup; - }; - Wait(1); - Playback(loligo/speed-dial); - SayDigits(${EXTEN:3:2}); - Playback(loligo/is-set-to); - SayDigits(${ssd_extension}); - Hangup; - }; - - // NTC = number to call - _*1XX => { - Realtime(ssd|sd|${EXTEN:2}|ssd_); - if ("${ssd_extension}foo" = "foo") { - Answer; - Wait(1); - Playback(loligo/speed-dial); - SayDigits(${EXTEN:2}); - Playback(loligo/is-not-set); - Hangup; - }; - &stdexten(${ssd_extension}); - Congestion(10); - Hangup; - }; -}; - -macro check-psd-exists ( ext ) { - Realtime(psd|extension|${ext}|psd_); - if ("${psd_extension}foo" = "foo") { - System(/usr/local/bin/create_psd.sh ${ext}); - } else - NoOp(PSD set for ${ext}); -}; - -context app-psd { -// *89 <xx> <y.> - Set personal speed dial <xx> to digits <y.> -// *89 <xx> 0 - Delete personal speed dial <xx> -// *89 <xx> - Review personal speed dial <xx> -// *2xx - Dial personal speed dial <xx> - _*89XXX. => { - &check-psd-exists(${CALLERIDNUM:5}); - Answer; - RealtimeUpdate(psd|extension|${CALLERIDNUM:5}|s${EXTEN:3:2}|${EXTEN:5}); - System(/usr/local/bin/db_update.sh personalsd s${EXTEN:3:2} ${EXTEN:5} extension ${CALLERIDNUM:5} &); - Wait(1); - Playback(loligo/speed-dial); - SayDigits(${EXTEN:3:2}); - Playback(loligo/has-been-set-to); - SayDigits(${EXTEN:5}); - Hangup; - }; - - _*89XX0 => { - &check-psd-exists(${CALLERIDNUM:5}); - Answer; - RealtimeUpdate(psd|extension|${CALLERIDNUM:5}|s${EXTEN:3:2}|); - System(/usr/local/bin/db_update.sh personalsd s${EXTEN:3:2} '' extension ${CALLERIDNUM:5} &); - Wait(1); - Playback(loligo/speed-dial); - SayDigits(${EXTEN:3:2}); - Playback(loligo/has-been-cleared); - Hangup; - }; - - _*89XX => { - &check-psd-exists(${CALLERIDNUM:5}); - Answer; - Realtime(psd|extension|${CALLERIDNUM:5}|psd_); - Wait(1); - if ("${psd_s${EXTEN:3:2}}foo" = "foo") { - Playback(loligo/speed-dial); - SayDigits(${EXTEN:3:2}); - Playback(loligo/is-not-set); - Hangup; - }; - Playback(loligo/speed-dial); - SayDigits(${EXTEN:3:2}); - Playback(loligo/is-set-to); - SayDigits(${psd_s${EXTEN:3:2}}); - Hangup; - }; - - // NTC = number to call - _*2XX => { - &check-psd-exists(${CALLERIDNUM:5}); - Realtime(psd|extension|${CALLERIDNUM:5}|psd_); - if ("${psd_s${EXTEN:2}}foo" = "foo") { - Answer; - Wait(1); - Playback(loligo/speed-dial); - SayDigits(${EXTEN:2}); - Playback(loligo/is-not-set); - Hangup; - }; - &stdexten(${psd_s${EXTEN:2}}); - Congestion(10); - Hangup; - }; -}; - -context app-helpdesk { - *4357 => { - &stdexten(41950); - Congestion; - }; -}; - -context app-conferences { -// waiting for room number announcement - *86 => goto app-conf-hidden|s|1; -}; - -context app-conf-hidden { - s => { - Wait(1); - Playback(loligo/please-enter-the); - Playback(loligo/extension); - read(roomtoenter,loligo/then-press-pound); - Meetme(${roomtoenter}); - Waitexten(8); - Hangup; - }; - - _1. => Meetme(${EXTEN}); -}; - -/////////////////////////////////////////////////////////////////////////////// -// Extensions pulled from vm.conf: - -context vm-include { - includes { - vm-direct; - vm-extension; - vm-directory; - }; -}; - -context vm-direct { - s => { - Dial(SIP/5555@svm1.shsu.edu,20); - Playback(im-sorry); - Playback(voice-mail-system); - Playback(down); - Playback(extra/pls-try-call-later); - Congestion(10); - Hangup; - }; -}; - -context vm-extension { - s => { - Dial(SIP/62100@svm1.shsu.edu,20); - Playback(im-sorry); - Playback(voice-mail-system); - Playback(down); - Playback(extra/pls-try-call-later); - Congestion(10); - Hangup; - }; -}; - -context vm-directory { - 5556 => { - Dial(SIP/5556@svm1.shsu.edu); - Playback(im-sorry); - Playback(voice-mail-system); - Playback(down); - Playback(extra/pls-try-call-later); - Congestion(10); - Hangup; - }; -}; diff --git a/pbx/ael/ael-test/ael-test7/extensions.ael b/pbx/ael/ael-test/ael-test7/extensions.ael deleted file mode 100644 index 52f9a077a..000000000 --- a/pbx/ael/ael-test/ael-test7/extensions.ael +++ /dev/null @@ -1,460 +0,0 @@ -// -// Example AEL config file -// - -globals { - CONSOLE=Console/dsp; - TRUNKMSD=0; //MSD digits to strip (usually 1 or 0) - TRUNCPROTO=SIP; - TRUNK=sunrocket; - PSTN=pstn-spa3k; - PSTNPROTO=SIP; - TARIOPROTO=SIP; - TARIO=tario; - CPPROTO=SIP; - CPACKET1=callpacket1; - CPACKET2=callpacket2; - SELLVOIP=1577040314; - SVPROTO=IAX2; -}; - - -macro stdexten (ext , dev ) { - PrivacyManager(3,10); - if("${PRIVACYMGRSTATUS}" = "FAILED") { - Playback(vm-goodbye); - Hangup(); - }; - - AGI(calleridnamelookup.agi); - Dial(${dev}/${ext},30,t); - switch(${DIALSTATUS}) { - case BUSY: - Voicemail(b${ext}); - break; - default: - Voicemail(u${ext}); - }; - catch a { - VoiceMailMain(${ext}); - return; - }; -}; - -macro announce_minutes(minutes) { - Playback(vm-youhave); - SayNumber(${minutes}); - Playback(vm-minutes); - Wait(1); -}; - -// Check if given provider allows only some free minutes per month -// and announce number of free minutes remaining. -// The limit will be reset monthly by cron job. -// The macro sets the following variables: -// MINUTES_LIMIT - number of free minutes per month -// MINUTES_USED - number of free minutes used in the current month -// PROVIDER - provider name - -macro checkanddial(prov,proto,ext,arg1,arg2,arg3,arg4) { - Set(MINUTES_LIMIT=0); - Set(MINUTES_USED=0); - Set(PROVIDER=${prov}); - - if(${DB_EXISTS(Provider/${prov}/used)}) - Set(MINUTES_USED=${DB_RESULT}); - - country_c = 0; - switch(${LEN(${ext})}) { //assuming all international numbers are 11 digits long. - case 10: //NXXNXXXXXX - country_c=1; - break; - case 11: //XNXXNXXXXXX - country_c = ${ext:0:1}; - break; - default: //011XNXXNXXXXXX - country_c = ${ext:3:1}; - break; - }; - - if("${prov}" = "${TRUNK}" & ${country_c} != 1) { // SunRocket international calls - Set(MINUTES_LIMIT=${DB(Provider/${prov}/limit)}); - &announce_minutes($[${MINUTES_LIMIT} - ${MINUTES_USED}]); - }; - if("${prov}" = "${CPACKET1}" | "${prov}" = "${CPACKET2}") { // Callpacket has a limit on domestic calls - Set(MINUTES_LIMIT=${DB(Provider/${prov}/limit)}); - &announce_minutes($[${MINUTES_LIMIT} - ${MINUTES_USED}]); - }; - DeadAGI(dial.agi,${proto}/${ext}@${prov},${arg1},${arg2},${arg3},${arg4}); -}; - -macro trunkdial(ext) { // Dial sunrocket and set correct collerid - if("${CALLERID(number)}" = "1") { - Set(CALLERID(number)=7322271653); - } else { - Set(CALLERID(number)=7326260100); - }; - Set(CALLERID(name)=Sergey Okhapkin); - &checkanddial(${TRUNK},${TRUNCPROTO},${ext},60,T); - Hangup; -}; - -macro checklocal(ext) { // lookup the number in DB and call the number via pstn or sunrocket - Set(AREACODE=${ext:0:3}); - Set(EXCHANGE=${ext:3:3}); - Set(IS_LOCAL=${DB_EXISTS(localnum/${AREACODE}/${EXCHANGE})}); - if(${IS_LOCAL}) { - &checkanddial(${PSTN},${PSTNPROTO},${ext},60,T); - if ("${DIALSTATUS}" = "BUSY") - &trunkdial(${ext}); - } else - &trunkdial(${ext}); -}; - -macro autodial(ext) { // Find Least Cost Route - LCDial(${ext},60,T); - if("${DIALSTATUS}" = "NOPROVIDER") - Playback(invalid); - Hangup(); -}; - -context default { // Calls to us - s => { - Wait(1); - Answer; -start: - Set(TIMEOUT(digit)=3); - Set(TIMEOUT(response)=10); -repeat: - for (x=0; ${x} < 5; x=${x} + 1) { - Background(home/greeting); - WaitExten(); - }; - }; - t => jump *; - i => { // invalid extension - Playback(invalid); - goto s|repeat; - }; - _* => { - Playback(vm-goodbye); - Wait(1); - Hangup; - }; - 1 => &stdexten(1,SIP/1); - 2 => &stdexten(2,SIP/2); - 3 => &stdexten(3,SIP/3); - - 2271653 => jump 1; - 7322271653 => jump 1; - 17322271653 => jump 1; - - 6260100 => jump 2; - 7326260100 => jump 2; - 17326260100 => jump 2; - 8058701100 => jump 2; - 3103622835 => jump 2; - sos => jump 2; - 1400898 => jump 2; - - 6260101 => jump s; - 7326260101 => jump s; - 17326260101 => jump s; - - 2271677 => jump 3; - 7322271677 => jump 3; - 17322271677 => jump 3; - galka => jump 3; - 911 => Dial(${PSTNPROTO}/911@${PSTN},60,); - 380 => Dial(SIP/topspeen@212.40.38.70,60,T); - - // Fun stuff - 100 => { - SayUnixTime(); - goto s|start; - }; - 101 => { // Voicemail - VoicemailMain(${CALLERID(number)}); - Hangup; - }; - 102 => MusicOnHold(); -// 103 => { -// Wait(1); -//start: -// Read(NUMBER,vm-enter-num-to-call); -// LCDial(${NUMBER},T); -// goto start; -// }; - 105 => jump s@phrase-menu; - 7312 => { - ForkCDR; - Set(CALLERID(name)=Sergey Okhapkin); - Set(CALLERID(number)=7326260100); - DISA(1111|home); - }; -}; - -context goiax { - s => { - Answer(); - Ringing(); - Wait(1); -start: - Read(NUMBER,vm-enter-num-to-call); - Set(CALLERID(name)=Central NJ); - Dial(IAX2/14301@fwdOUT/q${NUMBER},60,T); - goto start; - }; - -}; - -context phrase-menu { - - s => { - Answer; // Answer the line - TIMEOUT(digit)=2; // Set Digit Timeout to 5 seconds - TIMEOUT(response)=10; // Set Response Timeout to 10 seconds - BackGround(custom/phrase-menu); // Play main menu. - }; - 1 => { // Phrase Recording - Wait(1); - Read(PHRASEID|custom/enter-phrase-num); - Wait(2); // give yourself 2 secs to take a breath and wait for beep - Record(custom/${PHRASEID}:gsm); - Wait(2); - Playback(custom/${PHRASEID}); - Wait(1); - jump s; - }; - 2 => { // Phrase review - Wait(1); - Read(PHRASEID|custom/enter-phrase-num); - Wait(1); - Playback(custom/${PHRASEID}); - Wait(1); - jump s; - }; - t => Hangup; - i => { - Playback(custom/invalid-option); - jump s; - }; -}; - -context outbound { - // North America seven-, ten- and eleven digits - _NXXXXXX => &autodial(1732${EXTEN}); - _NXXNXXXXXX => &autodial(1${EXTEN}); - _ZNXXNXXXXX. => &autodial(${EXTEN}); - // Toll free numbers via PSTN -// _1800NXXXXXX => &checkanddial(${PSTN},${PSTNPROTO},${EXTEN},60,T); -// _1888NXXXXXX => &checkanddial(${PSTN},${PSTNPROTO},${EXTEN},60,T); -// _1877NXXXXXX => &checkanddial(${PSTN},${PSTNPROTO},${EXTEN},60,T); -// _1866NXXXXXX => &checkanddial(${PSTN},${PSTNPROTO},${EXTEN},60,T); - - _011. => { //International context accessed through trunk - &trunkdial(${EXTEN}); - }; - _012. => { //fwdOUT - Set(CALLERID(name)=Central NJ); - Dial(IAX2/14301@fwdOUT/q${EXTEN:3},60,T); - }; - _013X. => { //NECC - Dial(${PSTNPROTO}/011${EXTEN:3}@${PSTN},60,T); - }; - _0131. => { //NECC to US - Dial(${PSTNPROTO}/${EXTEN:3}@${PSTN},60,T); - }; - _014. => { //TARIO by SIP ID - Set(CALLERID(name)=Sergey Okhapkin); - Set(CALLERID(number)=1400898); - Dial(${TARIOPROTO}/${EXTEN:3}@${TARIO},60,T); - }; - _0157. => { //TARIO outbound Russia - Set(CALLERID(name)=Sergey Okhapkin); - Set(CALLERID(number)=1400898); - Dial(${TARIOPROTO}/8${EXTEN:4}@${TARIO},60,T); - }; -// _015. => { //TARIO outbound international -// CALLERID(name)="Sergey Okhapkin"; -// CALLERID(number)=1400898; -// Dial(${TARIOPROTO}/810${EXTEN:3}@${TARIO},60,T); -// }; - _0161NXXNXXXXXX => { //Callpacket outbound USA/Canada - &checkanddial(${CPACKET1},${CPPROTO},${EXTEN:3},60,T); - }; - _0171NXXNXXXXXX => { //Callpacket outbound USA/Canada - &checkanddial(${CPACKET2},${CPPROTO},${EXTEN:3},60,T); - }; - _0181NXXNXXXXXX => { //sellvoip outbound USA/Canada - Dial(${SVPROTO}/${SELLVOIP}@${SELLVOIP}/${EXTEN:3},60,T); - }; - _019. => { //Voipbuster - Dial(IAX2/sokhapkin@voipbuster/00${EXTEN:3},60,T); - }; -}; - -context home { //calls from us - includes { - default; - outbound; - }; -}; - -context sunrocket-in { - 7322271653 => jump s; - 7326260100 => jump 2@default; - s => { - if("${CALLERID(number)}" = "sunrocketcom") - Set(CALLERID(number)=); - switch(${CALLERID(RDNIS)}) { - case 7326260100: - jump 2@default; - break; - case 7326260101: - jump s@default; - break; - default: - jump 1@default; - break; - }; - }; -}; - -context pstn-in { - 3 => { - if ("${CALLERID(number)}" = "7322271677") - Set(CALLERID(number)=); - jump 3@default; - }; -}; - -context tario.net-in { - _X. => { - Set(CALLERID(name)=); - if("${CALLERID(number):-11:1}" = "8") - Set(CALLERID(number)=7${CALLERID(number):1}); - if("${SIP_HEADER(To)}" = "<sip:2271677@sipnet.ru>") { - jump 3@default; - } else if("${SIP_HEADER(To)}" = "<sip:2271653@sipnet.ru>") { - jump 1@default; - } else - jump 2@default; - }; -}; - -context from-callpacket { - 8058701100 => jump 2@default; - 3103622835 => { - Answer; - Ringing; - Wait(10); - Voicemail(b3103622835); - Hangup; - }; - a => Hangup; -}; - -context fromfwdOUT { // make sure we only accept US and Canada calls, limit to 30 minutes - includes { - fromfwdOUT-catchbad; - fromfwdOUT-isgood; - fromfwdOUT-catchall; - }; -}; - -context fromfwdOUT-isgood { - _17326260100 => jump 2@default; - _17326260101 => jump s@default; - _17322271653 => jump 1@default; - _17322271677 => jump 3@default; - _1NXXNXXXXXX => { - Set(CALLERID(name)=Sergey Okhapkin); -// Set(CALLERID(number)=7326260100); -// Dial(${TRUNCPROTO}/*67${EXTEN:${TRUNKMSD}}@${TRUNK},60,,L(1800000:60000)); - Dial(${CPPROTO}/${EXTEN}@${CPACKET2},60,,L(1800000:60000)); - }; -}; - -context fromfwdOUT-catchbad { //block bahamas, etc - _1900. => congestion ; //N11 - _1XXX976. => congestion ; //N11 - _1XXX555. => congestion ; //N11 - _1X11. => congestion ; //N11 - _1867. => congestion ; //Yukon (sorry mike) - - // exten => _1NPA Country - _1242. => congestion; //BAHAMAS - _1246. => congestion; //BARBADOS - _1264. => congestion; //ANGUILLA - _1268. => congestion; //ANTIGUA/BARBUDA - _1284. => congestion; //BRITISH VIRGIN ISLANDS - _1345. => congestion; //CAYMAN ISLANDS - _1441. => congestion; //BERMUDA - _1473. => congestion; //GRENADA - _1649. => congestion; //TURKS & CAICOS ISLANDS - _1664. => congestion; //MONTSERRAT - _1758. => congestion; //ST. LUCIA - _1767. => congestion; //DOMINICA - _1784. => congestion; //ST. VINCENT & GRENADINES - _1809. => congestion; //DOMINICAN REPUBLIC - _1829. => congestion; //DOMINICAN REPUBLIC - _1868. => congestion; //TRINIDAD AND TOBAGO - _1869. => congestion; //ST. KITTS AND NEVIS - _1876. => congestion; //JAMAICA - _1787. => congestion; //Puerto Rico 787, 939 $0.07 - _1939. => congestion; //Puerto Rico 787, 939 $0.07 - _1671. => congestion; //Guam 671 $0.08 - _1340. => congestion; //U.S. Virgin Islands 340 $0.06 -}; - -context fromfwdOUT-catchall { - _X. => Congestion; - h => Hangup ; //hangup event - i => Hangup ; //invalid event - t => Hangup ; //timeout event -}; - -context ael-demo { - s => { - Wait(1); - Answer(); - TIMEOUT(digit)=5; - TIMEOUT(response)=10; -restart: - Background(demo-congrats); -instructions: - for (x=0; ${x} < 3; x=${x} + 1) { - Background(demo-instruct); - WaitExten(); - }; - }; - 2 => { - Background(demo-moreinfo); - goto s|instructions; - }; - 3 => { - LANGUAGE()=fr; - goto s|restart; - }; - 500 => { - Playback(demo-abouttotry); - Dial(IAX2/guest@misery.digium.com); - Playback(demo-nogo); - goto s|instructions; - }; - 600 => { - Playback(demo-echotest); - Echo(); - Playback(demo-echodone); - goto s|instructions; - }; - _1234 => &std-exten-ael(${EXTEN}, "IAX2"); - # => { - Playback(demo-thanks); - Hangup(); - }; - t => jump #; - i => Playback(invalid); -}; - diff --git a/pbx/ael/ael-test/ael-test8/extensions.ael b/pbx/ael/ael-test/ael-test8/extensions.ael deleted file mode 100644 index 17bc74e6f..000000000 --- a/pbx/ael/ael-test/ael-test8/extensions.ael +++ /dev/null @@ -1,27 +0,0 @@ -context default -{ - -706/3077610011 => { - JabberStatus(asterisk|jmls@mike,StatusCode); - - switch(${StatusCode}) { - case 1: - Dial(SIP/706,12); - switch(${DIALSTATUS}) { - case BUSY: - Voicemail(b706); - break; - default: - Voicemail(u706); - }; - BackGround(hello); - break; - default: - Voicemail(u706); - }; - - Hangup(); - }; - -} - diff --git a/pbx/ael/ael-test/ael-vtest13/extensions.ael b/pbx/ael/ael-test/ael-vtest13/extensions.ael deleted file mode 100755 index dd77c0531..000000000 --- a/pbx/ael/ael-test/ael-vtest13/extensions.ael +++ /dev/null @@ -1,3183 +0,0 @@ -globals -{ - static=yes; - writeprotect=yes; - CONSOLE=Console/dsp; // Console interface for demo - IAXINFO=murf:tlhfckoct; // IAXtel username/password - FWDNUMBER=544788 ; // your calling number - FWDCIDNAME="Joe-Worker"; // your caller id - FWDPASSWORD=zingledoodle ; // your password - FWDRINGS=Zap/6 ; // the phone to ring - FWDVMBOX=1 ; // the VM box for this user -} - -macro std-exten( ext , dev ) -{ - Dial(${dev}/${ext},20); - switch(${DIALSTATUS}) - { - case BUSY: - Voicemail(b${ext}); - break; - case NOANSWER: - Voicemail(u${ext}); - break; - case ANSWER: - break; - default: - Voicemail(u${ext}); - } - catch a { - VoiceMailMain(${ext}); - } -} - -macro std-priv-exten_1( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_2( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_3( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_4( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_5( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_6( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_7( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_8( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_9( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_10( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_11( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_12( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_13( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_14( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_15( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_16( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_17( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_18( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_19( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_20( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_21( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_22( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_23( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_24( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_25( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_26( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_27( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_28( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_29( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_30( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_31( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_32( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_33( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_34( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_35( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_36( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_37( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_38( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_39( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_40( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_41( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_42( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_43( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_44( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_45( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_46( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_47( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_48( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_49( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_50( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_51( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_52( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_53( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_54( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_55( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_56( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_57( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_58( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_59( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_60( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_61( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_62( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_63( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_64( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_65( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_66( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_67( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_68( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_69( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_70( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_71( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_72( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten_73( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - - -macro std-priv-exten( dev, ext , timeout, opts, torcont, dontcont ) -{ - Dial(${dev},${timeout},${opts}); - NoOp(${DIALSTATUS} was chosen); - switch(${DIALSTATUS}) - { - case TORTURE: - goto ${torcont}|s|begin; - break; - case DONTCALL: - goto ${dontcont}|s|begin; - break; - case BUSY: - Voicemail(b${ext}); - break; - case ANSWER: - break; - case NOANSWER: - Voicemail(u${ext}); - break; - default: - Voicemail(u${ext}); - } -} - -macro fillcidname() -{ - if( "${CALLERID(number)}" = "" ) // nothing to work with, quit!!! - return; - Set(cidn=${DB(cidname/${CALLERID(num)})}); - if( "${CALLERID(name)}" != "" ) - { - if( ("${cidn}" = "Privacy Manager" & "${CALLERID(name)}" != "Privacy Manager") | "${cidn}" = "" ) // if the entry isn't in the database, - // or if an entry exists, and it's "Privacy Manager", empty, (or add other useless possibilities). - { - Set(DB(cidname/${CALLERID(number)})=${CALLERID(name)}); // then set or override what's in the DB - } - } - // Now, we fill in the callerid info from the incoming entry, if it's stuff worth using - // Ignore fundamentally semi-anonymous information from local cell phones - // if the db has an entry for this number, and it's not a canned string from a cell phone company - if( ( "${cidn}" != "" ) & ( "${CALLERID(name)}" = "" - | "${CALLERID(name)}" = "CODY,WY " - | "${CALLERID(name)}" = "POWELL,WY " - | "${CALLERID(name)}" = "WIRELESS CALLER" - | "${CALLERID(name)}" = "SUBSCRIBER,WIRE" - | "${CALLERID(name)}" = "CELLULAR ONE" - | "${CALLERID(name)}" = "Cellular One Customer" - | "${CALLERID(name)}" = "CELLULAR ONE " - | "${CALLERID(name)}" = "Privacy Manager" - | "${CALLERID(name)}" = "RIVERTON,WY " - | "${CALLERID(name)}" = "BASIN,WY " - | "${CALLERID(name)}" = "BILLINGS,MT " - | "${CALLERID(name)}" = "PROVO,UT " - | "${CALLERID(name)}" = "TOLL FREE " ) ) // put stuff in the above, that the phone company tends to put in your callerid, - // that you would rather override with DB info - // there's no way to guess them all, but you can get the most popular ones... - // why cell phones can't do CID like everybody else, ....? - { - Set(CALLERID(name)=${cidn}); // Override what the phone company provides with what's in the DB for this number. - } -} - -macro ciddial(dialnum, lookup, waittime, dialopts, ddev) -{ - Set(cidnu=${CALLERID(num)}); - Set(cidn=${DB(cidname/${lookup})}); - Set(CALLERID(name)=${cidn}); - Dial(${ddev}/${dialnum}|${waittime}|${dialopts}); - if( "${DIALSTATUS}" = "CHANUNAVAIL" ) - { - BackGround(try_voip); - CALLERID(num)=7075679201; - Dial(SIP/1${lookup}@tctwest,${waittime},${dialopts}); - if( "${DIALSTATUS}" = "CHANUNAVAIL" ) - { - BackGround(try_cell); - CALLERID(num)=${cidnu}; // put the original number back - Dial(Zap/2/${lookup},${waittime},${dialopts}); - } - } -} - -macro ciddial3(dialnum, lookup, waittime, dialopts, ddev) -{ - Set(cidnu=${CALLERID(num)}); - Set(cidn=${DB(cidname/${lookup})}); - Set(CALLERID(name)=${cidn}); - Dial(${ddev}/${dialnum}|${waittime}|${dialopts}); - if( "${DIALSTATUS}" = "CHANUNAVAIL" ) - { - BackGround(try_cell); - Dial(Zap/2/${lookup},${waittime},${dialopts}); - } -} - -macro ciddial2(dialnum, lookup, waittime, dialopts, ddev) // give priority to tctwest, then the ZAP in emergencies -{ - Set(cidn=${DB(cidname/${lookup})}); - Set(cidnu=${CALLERID(num)}); - Set(CALLERID(name)=${cidn}); - Set(CALLERID(num)=7075679201); - Dial(SIP/1${lookup}@tctwest,${waittime},${dialopts}); - if( "${DIALSTATUS}" = "CHANUNAVAIL" ) - { - Set(CALLERID(num)=${cidnu}); // put the original number back - BackGround(try_zap); - Dial(${ddev}/${dialnum},${waittime}|${dialopts}); - if( "${DIALSTATUS}" = "CHANUNAVAIL" ) - { - BackGround(try_cell); - Dial(Zap/2/${lookup},${waittime},${dialopts}); - } - } -} - -macro callerid-liar() -{ - TrySystem(/usr/bin/play /var/lib/asterisk/sounds/priv-callerintros/LIAR.gsm&); - Background(priv-liar); // Script: OOOps! Sorry! I don't allow men with ski masks pulled over their - // faces to get in the front door, and unidentified callers won't fair - // any better. You entered *MY* phone number. That won't work. - // If you are telemarketing, cross me off the list, and don't call again. - // If you did this by mistake, forgive my defenses, and call again. - // Alternate: (priv-liar2) - // Script: You have chosen to try to deceive my system and withold your CallerID, - // by entering my own phone number as YOUR CallerID. I find this - // offensive because you are being dishonest. I will not do business nor - // waste my time talking to anyone who is less than honest and forthcoming. - // Take me off your call list and do not call me again. - Hangup(); -} - -macro callerid-bad() -{ - mycid=${CALLERID(num)}:"1([0-9]+)"; - Set(CALLERID(num)=${mycid}); - Wait(0); -} - -context privacyManagerFailed { - s => { - begin: - Background(PrivManInstructions); // Script: OOps, that didn't go well. You need to enter *your* area code, and *your* 7 digit - // phone number, for a total of 10 digits, or you'll be handed over to the monkeys. Let's - // try this again, and hopefully you can get past our front-line defenses! - PrivacyManager(); - if( "${PRIVACYMGRSTATUS}" = "FAILED" ) - { - Background(tt-allbusy); - Background(tt-somethingwrong); - Background(tt-monkeysintro); - Background(tt-monkeys); - Background(tt-weasels); - Hangup(); - } - else - { - goto homeline|s|postPriv; - } - } -} - -// Some comments -// Some more comments - -context homeline { - s => { - begin: - Answer(); - Set(repeatcount=0); - Zapateller(nocallerid); - PrivacyManager(); - if( "${PRIVACYMGRSTATUS}" = "FAILED" ) - { - TrySystem(/usr/bin/play /var/lib/asterisk/sounds/privmanfailed.gsm); - &std-priv-exten(Zap/3r1&Zap/5r1,2,25,mtw,telemarket,telemarket); - Hangup(); - return; -// goto privacyManagerFailed|s|begin; - } - postPriv: - &fillcidname(); - Set(CONFCIDNA=${CALLERID(name)}); - Set(CONFCIDNU=${CALLERID(num)}); - AGI(callall); - AGI(submit-announce.agi); - if( "${CALLERID(num)}" : "1" ) - { - &callerid-bad(); - } - if( "${CALLERID(num)}" = "7077577685" & "${CALLERID(name)}" : "Privacy Manager" ) - { - &callerid-liar(); - } - TrySystem(/usr/local/bin/who-is-it ${CALLERID(num)} "${CALLERID(name)}"&); - Set(lds=${DB(playlds/${CALLERID(num)})}); - if( "${lds}" = "1" ) - { - SetMusicOnHold(mohlds); - } - direct=${DB(DirectCall/${CALLERID(num)})}; - if( "${direct}" != "" & ${direct} != 0 ) - { - verbose(direct is XXX#${direct}XXXX); - Playback(greetings/direct); // Welcome to the Murphy residence. This system will automatically try to connect you to... - Playback(/var/spool/asterisk/voicemail/default/${direct}/greet); - TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm); - TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/${direct}/greet.wav&); - switch(${direct}) - { - case 1: //Steve - &std-priv-exten(Zap/6r3&Sip/murf,1,25,mpA(beep)tw,telemarket,telemarket); - goto s|loopback; - case 2: //Sonya - &std-priv-exten(Zap/3r1&Zap/5r1,2,25,mtw,telemarket,telemarket); - goto s|loopback; - default: // all the kids - Set(z=${direct}-2); - goto homeline-kids|${z}|1; - } - } - loopback: - ifTime(*|*|20-25|dec) - { - Playback(greetings/christmas); - } - else ifTime(*|*|31|dec) - { - Playback(greetings/newyear); - } - else ifTime(*|*|1|jan) - { - Playback(greetings/newyear); - } - else ifTime(*|*|14|feb) - { - Playback(greetings/valentines); - } - else ifTime(*|*|17|mar) - { - Playback(greetings/stPat); - } - else ifTime(*|*|31|oct) - { - Playback(greetings/halloween); - } - else ifTime(*|mon|15-21|jan) - { - Playback(greetings/mlkDay); - } - else ifTime(*|thu|22-28|nov) - { - Playback(greetings/thanksgiving); - } - else ifTime(*|mon|25-31|may) - { - Playback(greetings/memorial); - } - else ifTime(*|mon|1-7|sep) - { - Playback(greetings/labor); - } - else ifTime(*|mon|15-21|feb) - { - Playback(greetings/president); - } - else ifTime(*|sun|8-14|may) - { - Playback(greetings/mothers); - } - else ifTime(*|sun|15-21|jun) - { - Playback(greetings/fathers); - } - else - { - Playback(greetings/hello); // None of the above? Just a plain hello will do - } - Background(murphy-homeline-intro1); // Script: Hello-- Welcome to the Murphy's! If you already know what - // option you want, you don't have to wait for this entire spiel-- just - // have at it. - // If you are calling because this number is on a list of some sort, dial 6. - // If you want Sonya, dial 1. - // If you want one of the kids, dial 2. - // If you want Steve, dial 3. - // to play with your introduction, dial 5. - // If we don't seem to be giving you the time of day, try 7. - // Have a good day! - - } - 1 => { // Sonya - TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm); - TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/2/greet.wav&); - &std-priv-exten(Zap/3r1&Zap/5r1,2,25,mtw,telemarket,telemarket); - goto s|loopback; - } - 2 => { // Kids - goto homeline-kids|s|begin; - } - 21 => { - Dial(IAX2/seaniax,20,T); - } - 3 => { // Steve - &std-priv-exten(Zap/6r3&Sip/murf,1,25,mpA(beep)tw,telemarket,telemarket); - goto s|loopback; - } - 4 => { // Voicemail - VoicemailMain(); - goto s|loopback; - } - 5 => { // play with intro - goto home-introduction|s|begin; - } - 6 => { // Telemarketers - goto telemarket|s|begin; - } - 7 => { // time of day, riddle - agi(tts-riddle.agi); - Background(gsm/what-time-it-is2); - SayUnixTime(); - goto s|loopback; - } - 792 => { // Page All - goto pageall|s|begin; - } - 793 => { // check the tone recognition - Read(zz,,0,,1,0); - SayDigits(${zz}); - } - t => { - Set(repeatcount=${repeatcount} + 1); - if( ${repeatcount} < 3 ) - { - goto s|loopback; // just loopback isn't enough - } - Hangup(); - } - i => { - Background(invalid); - goto s|loopback; - } - o => { - Congestion(); - } - fax => { - Dial(Zap/4); - } -} - -// Some comments -// Some more comments - -context pageall { - s => { - begin: - AGI(callall); - MeetMe(5555,dtqp); - MeetMeAdmin(5555,K); - Hangup(); - } - - h => { - begin: - MeetMeAdmin(5555,K); - Background(conf-muted); - Hangup(); - } -} - -// Some comments -// Some more comments - -context add-to-conference { - start => { - NoCDR(); - MeetMe(5555,dmqp); - } - h => { - Hangup(); - } -} - -context home-introduction { - s => { - begin: - Background(intro-options); // Script: To hear your Introduction, dial 1. - // to record a new introduction, dial 2. - // to return to the main menu, dial 3. - // to hear what this is all about, dial 4. - } - 1 => { - Playback(priv-callerintros/${CALLERID(num)}); - goto s|begin; - } - 2 => { - goto home-introduction-record|s|begin; - } - 3 => { - goto homeline|s|loopback; - } - 4 => { - Playback(intro-intro); // Script: - // This may seem a little strange, but it really is a neat - // thing, both for you and for us. I've taped a short introduction - // for many of the folks who normally call us. Using the Caller ID - // from each incoming call, the system plays the introduction - // for that phone number over a speaker, just as the call comes in. - // This helps the folks - // here in the house more quickly determine who is calling. - // and gets the right ones to gravitate to the phone. - // You can listen to, and record a new intro for your phone number - // using this menu. - goto s|begin; - } - t => { - goto s|begin; - } - i => { - Background(invalid); - goto s|begin; - } - o => { - goto s|begin; - } -} - -context home-introduction-record { - s => { - begin: - Background(intro-record-choices); // Script: - // If you want some advice about recording your - // introduction, dial 1. - // otherwise, dial 2, and introduce yourself after - // the beep. - } - 1 => { - Playback(intro-record); - // Your introduction should be short and sweet and crisp. - // Your introduction will be limited to 10 seconds. - // This is NOT meant to be a voice mail message, so - // please, don't say anything about why you are calling. - // After we are done making the recording, your introduction - // will be saved for playback. - // If you are the only person that would call from this number, - // please state your name. Otherwise, state your business - // or residence name instead. For instance, if you are - // friend of the family, say, Olie McPherson, and both - // you and your kids might call here a lot, you might - // say: "This is the distinguished Olie McPherson Residence!" - // If you are the only person calling, you might say this: - // "This is the illustrious Kermit McFrog! Pick up the Phone, someone!!" - // If you are calling from a business, you might pronounce a more sedate introduction,like, - // "Fritz from McDonalds calling.", or perhaps the more original introduction: - // "John, from the Park County Morgue. You stab 'em, we slab 'em!". - // Just one caution: the kids will hear what you record every time - // you call. So watch your language! - // I will begin recording after the tone. - // When you are done, hit the # key. Gather your thoughts and get - // ready. Remember, the # key will end the recording, and play back - // your intro. Good Luck, and Thank you!" - goto 2|begin; - } - 2 => { - begin: - Background(intro-start); - // OK, here we go! After the beep, please give your introduction. - Background(beep); - Record(priv-callerintros/${CALLERID(num)}:gsm,3); - Background(priv-callerintros/${CALLERID(num)}); - goto home-introduction|s|begin; - } - t => { - goto s|begin; - } - i => { - Background(invalid); - goto s|begin; - } - o => { - goto s|begin; - } -} - -context homeline-kids { - s => { - begin: - Background(murphy-homeline-kids); // Which Kid? 1=Sean, 2:Eric, 3:Ryan, 4:Kyle, 5:Amber, 6:Alex, 7:Neal - } - 1 => { // SEAN - TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm); - TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/3/greet.wav&); - // &std-priv-exten(Zap/3r2&Zap/5r2,3,35,mtw,telemarket,telemarket); - &std-priv-exten(IAX2/seaniax&Zap/5r2,3,35,mtw,telemarket,telemarket); - goto homeline|s|loopback; - } - 2 => { // ERIC - TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm); - TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/4/greet.wav&); - Voicemail(u4); - goto homeline|s|loopback; - - // SetMusicOnHold(erics); - // TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm); - // TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/4/greet.wav&); - // &std-priv-exten(Zap/3r2&Zap/5r2,4,35,mtw,telemarket,telemarket); - // goto homeline|s|loopback; - } - 3 => { // RYAN - TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm); - TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/5/greet.wav&); - &std-priv-exten(Zap/3r2&Zap/5r2,5,35,mtw,telemarket,telemarket); - goto homeline|s|loopback; - } - 4 => { // KYLE - TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm); - TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/6/greet.wav&); - &std-priv-exten(Zap/3r2&Zap/5r2,6,35,mtw,telemarket,telemarket); - goto homeline|s|loopback; - } - 5 => { - TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm); - TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/7/greet.wav&); - &std-priv-exten(Zap/3r2&Zap/5r2,7,35,mtw,telemarket,telemarket); - goto homeline|s|loopback; - - } - 6 => { - TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm); - TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/8/greet.wav&); - &std-priv-exten(Zap/3r2&Zap/5r2,8,35,mtw,telemarket,telemarket); - goto homeline|s|loopback; - } - 7 => { - TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm); - TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/9/greet.wav&); - &std-priv-exten(Zap/3r2&Zap/5r2,9,35,mtw,telemarket,telemarket); - goto homeline|s|loopback; - } - t => { - goto s|begin; - } - i => { - Background(invalid); - goto s|begin; - } - o => { - goto s|begin; - } -} - -context voipworkline { - s => { - begin: - Answer(); - TrySystem(/usr/local/bin/who-is-it ${CALLERID(num)} "${CALLERID(name)}"&); - goto workline|s|loopback; - } - 7075679201 => { - Answer(); - TrySystem(/usr/local/bin/who-is-it ${CALLERID(num)} "${CALLERID(name)}"&); - goto workline|s|loopback; - } -} - -context workline { - s => { - begin: - Answer(); - Wait(1); - Set(repeatcount=0); - Zapateller(nocallerid); -// PrivacyManager(); -// if( "${PRIVACYMGRSTATUS}" = "FAILED" ) -// { -// goto privacyManagerFailed|s|begin; -// } - &fillcidname(); - TrySystem(/usr/local/bin/who-is-it ${CALLERID(num)} "${CALLERID(name)}"&); - loopback: - Background(greetings/greeting); //script: Hello - Background(murphy-office-intro1); //script: welcome to Steve Murphy's office. If you are dialing - // this number because it was on a calling list of any sort, dial 6. - // Otherwise, dial 1, and hopefully, you will reach Steve. - } - 1 => { - TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm); - TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/1/greet.wav&); - - &std-priv-exten(Zap/6&Sip/murf,1,30,mtw,telemarket,telemarket); - goto s|loopback; - } - 4 => { - VoicemailMain(); - goto s|loopback; - } - 6 => { - goto telemarket|s|begin; - } - 793 => { // check the tone recognition - Read(zz,,0,,1,0); - SayDigits(${zz}); - } - t => { - repeatcount=${repeatcount} + 1; - if( ${repeatcount} < 3 ) - { - goto s|loopback; // just loopback isn't enough - } - Hangup(); - } - i => { - Background(invalid); - goto s|loopback; - } - o => { - Congestion(); - } - fax => { - Answer(); - Dial(Zap/4); - } -} - -context dialFWD { - ignorepat => 8; - ignorepat => 9; - _83. => { - Set(CALLERID(name)=${FWDCIDNAME}); - Dial(IAX2/${FWDNUMBER}:${FWDPASSWORD}@iax2.fwdnet.net/${EXTEN:2},60,r); - Congestion(); - } - _82NXX => { - Set(CALLERID(name)=${FWDCIDNAME}); - Dial(IAX2/${FWDNUMBER}:${FWDPASSWORD}@iax2.fwdnet.net/${EXTEN:2},60,r); - Congestion(); - } - _92NXX => { - Set(CALLERID(name)=${FWDCIDNAME}); - Dial(IAX2/${FWDNUMBER}:${FWDPASSWORD}@iax2.fwdnet.net/${EXTEN:2},60,r); - Congestion(); - } -} - -context dialiaxtel { - ignorepat => 8; - ignorepat => 9; - _81700NXXXXXX => { - Dial(IAX2/zorch:zilchnoodle@iaxtel.com/${EXTEN:1}@iaxtel); - } - _81800NXXXXXX => { - Dial(IAX2/zorch:zilchnoodle@iaxtel.com/${EXTEN:1}@iaxtel); - } - _91700NXXXXXX => { - Dial(IAX2/zorch:zilchnoodle@iaxtel.com/${EXTEN:1}@iaxtel); - } - _91800NXXXXXX => { - Dial(IAX2/zorch:zilchnoodle@iaxtel.com/${EXTEN:1}@iaxtel); - } - -} - -context dialgoiax { - ignorepat => 9; - _93. => { - Set(CALLERID(name)="Joe Worker"); - Dial(IAX2/878201007658:stickyfinger295@server1.goiax.com/${EXTEN:2},60,r); - Congestion(); - } - -} - -context homefirst { - ignorepat => 9; - _91NXXNXXXXXX => { - &ciddial(${EXTEN:1},${EXTEN:2},30,TW,Zap/1); - } - _9754XXXX => { - &ciddial(${EXTEN:1},707${EXTEN:1},30,TW,Zap/1); - } - _9574XXXX => { - &ciddial(${EXTEN:1},707${EXTEN:1},30,TW,Zap/1); - } - _9202XXXX => { - &ciddial(${EXTEN:1},707${EXTEN:1},30,TW,Zap/1); - } - _9219XXXX => { - &ciddial(${EXTEN:1},707${EXTEN:1},30,TW,Zap/1); - } - _9254XXXX => { - &ciddial(${EXTEN:1},707${EXTEN:1},30,TW,Zap/1); - } - _9716XXXX => { - &ciddial(${EXTEN:1},707${EXTEN:1},30,TW,Zap/1); - } - _9NXXXXXX => { - &ciddial(1707${EXTEN:1},707${EXTEN:1},30,TW,Zap/1); - } - _9011. => { - &ciddial(${EXTEN:1},${EXTEN:1},30,TW,Zap/1); - } - _9911 => { - Dial(Zap/1/911,30,T); - } - _9411 => { - Dial(Zap/1/411,30,T); - } -} - -context workfirst { - ignorepat => 9; - _91NXXNXXXXXX => { - &ciddial2(${EXTEN:1},${EXTEN:2},30,TW,Zap/1); - } - _9754XXXX => { - &ciddial2(${EXTEN:1},707${EXTEN:1},30,TW,Zap/1); - } - _9574XXXX => { - &ciddial2(${EXTEN:1},707${EXTEN:1},30,TW,Zap/1); - } - _9202XXXX => { - &ciddial2(${EXTEN:1},707${EXTEN:1},30,TW,Zap/1); - } - _9219XXXX => { - &ciddial2(${EXTEN:1},707${EXTEN:1},30,TW,Zap/1); - } - _9254XXXX => { - &ciddial2(${EXTEN:1},707${EXTEN:1},30,TW,Zap/1); - } - _9716XXXX => { - &ciddial2(${EXTEN:1},707${EXTEN:1},30,TW,Zap/1); - } - _9NXXXXXX => { - &ciddial2(1707${EXTEN:1},707${EXTEN:1},30,TW,Zap/1); - } - _9911 => { - Dial(Zap/1/911,30,T); - } - _9411 => { - Dial(Zap/1/411,30,T); - } -} - -context force_cell { - ignorepat => 8; - _81NXXNXXXXXX => { - &ciddial(${EXTEN:1}#,${EXTEN:2},30,TW,Zap/2); - } - _8754XXXX => { - &ciddial(${EXTEN:1}#,707${EXTEN:1},30,TW,Zap/2); - } - _8574XXXX => { - &ciddial(${EXTEN:1}#,707${EXTEN:1},30,TW,Zap/2); - } - _8202XXXX => { - &ciddial(${EXTEN:1}#,707${EXTEN:1},30,TW,Zap/2); - } - _8219XXXX => { - &ciddial(${EXTEN:1}#,707${EXTEN:1},30,TW,Zap/2); - } - _8254XXXX => { - &ciddial(${EXTEN:1}#,707${EXTEN:1},30,TW,Zap/2); - } - _8716XXXX => { - &ciddial(${EXTEN:1}#,707${EXTEN:1},30,TW,Zap/2); - } - _8NXXXXXX => { - &ciddial(${EXTEN:1}#,707${EXTEN:1},30,TW,Zap/2); - } - _8911 => { - Dial(Zap/1/911|30|T); - } - _8411 => { - Dial(Zap/1/411|30|T); - } -} - -context force_home { - ignorepat => 8; - _81NXXNXXXXXX => { - &ciddial3(${EXTEN:1}#,${EXTEN:2},30,TW,Zap/1); - } - _8754XXXX => { - &ciddial3(${EXTEN:1}#,707${EXTEN:1},30,TW,Zap/1); - } - _8574XXXX => { - &ciddial3(${EXTEN:1}#,707${EXTEN:1},30,TW,Zap/1); - } - _8202XXXX => { - &ciddial3(${EXTEN:1}#,707${EXTEN:1},30,TW,Zap/1); - } - _8219XXXX => { - &ciddial3(${EXTEN:1}#,707${EXTEN:1},30,TW,Zap/1); - } - _8254XXXX => { - &ciddial3(${EXTEN:1}#,707${EXTEN:1},30,TW,Zap/1); - } - _8716XXXX => { - &ciddial3(${EXTEN:1}#,707${EXTEN:1},30,TW,Zap/1); - } - _8NXXXXXX => { - &ciddial3(1707${EXTEN:1}#,707${EXTEN:1},30,TW,Zap/1); - } - _8911 => { - Dial(Zap/1/911|30|T); - } - _8411 => { - Dial(Zap/1/411|30|T); - } -} - -context homeext { - ignorepat => 8; - ignorepat => 9; - includes { - parkedcalls; - homefirst; - force_cell; - } - s => { - loopback: - Wait(0); - } - 1 => { - &std-priv-exten(Zap/3&Zap/5,2,35,mtw,telemarket,telemarket); - goto s|loopback; - } - 2 => { - &std-priv-exten(Zap/6&Zap/5,1,35,mpA(beep3)Tt,telemarket,telemarket); - goto s|loopback; - } - 4 => { - VoicemailMain(); - } - 5 => { - Record(recording:gsm); - Background(recording); - } - 6 => { - Background(recording); - } - 760 => { - DateTime(); - goto s|loopback; - } - 761 => { - Record(announcement:gsm); - TrySystem(/usr/bin/play /var/lib/asterisk/sounds/announcement.gsm&); - goto s|loopback; - } - 762 => { - agi(tts-riddle.agi); - Background(gsm/what-time-it-is2); - SayUnixTime(); - goto s|loopback; - } - 763 => { - Set(CALLERID(num)=); - Dial(Zap/6r3,35,mptA(beep3)); //results: it should ALWAYS ask for an intro; the intro should not be left behind - Hangup(); - } - 764 => { - Set(CALLERID(num)=); - Dial(Zap/6r3,35,mptnA(beep3)); //results: Don't save the intro; shouldn't anyway if no callerid - Hangup(); - } - 765 => { - Set(CALLERID(num)=); - Dial(Zap/6r3,35,mptNA(beep3)); //results: Don't screen if there's CALLERID; it should screen the call. - Hangup(); - } - 766 => { - Dial(Zap/6r3,35,mptNA(beep3)); //results: Don't screen if there's CALLERID; it should screen the call. - Hangup(); - } - 767 => { - Dial(Zap/6r3,35,mptnA(beep3)); //results: Don't save the intro; the interesting case, because callerID should be present. - Hangup(); - } - 769 => { - Playtones(dial); - Wait(2); - Playtones(busy); - Wait(2); - Playtones(ring); - Wait(2); - Playtones(congestion); - Wait(2); - Playtones(callwaiting); - Wait(2); - Playtones(dialrecall); - Wait(2); - Playtones(record); - Wait(2); - Playtones(info); - Wait(5); - Hangup(); - } - 790 => { - MeetMe(790,p); - } - 792 => { - goto pageall|s|begin; - } - 795 => { - AGI(wakeup.agi);Congestion(); - } - 544716 => { // Incoming call from FWD - TrySystem(/usr/local/bin/who-is-it ${CALLERID(num)} "${CALLERID(name)}"&); - goto s|loopback; - } - - i => { - Background(invalid); - goto s|loopback; - } - o => { - goto s|loopback; - } - t => { - Congestion(); - } -} - -context fromvmhome { - 1 => { - Dial(Zap/6&Sip/murf|20|Tt); - } - 2 => { - Dial(Zap/3&Zap/5|20|Tt); - } - _707202XXXX => { - &ciddial(1${EXTEN:3},${EXTEN},30,TW,Zap/1); - } - _707219XXXX => { - &ciddial(1${EXTEN:3},${EXTEN},30,TW,Zap/1); - } - _707254XXXX => { - &ciddial(1${EXTEN:3},${EXTEN},30,TW,Zap/1); - } - _707716XXXX => { - &ciddial(1${EXTEN:3},${EXTEN},30,TW,Zap/1); - } - _707754XXXX => { - &ciddial(${EXTEN:3},${EXTEN},30,TW,Zap/1); - } - _707574XXXX => { - &ciddial(${EXTEN:3},${EXTEN},30,TW,Zap/1); - } - _NXXNXXXXXX => { - &ciddial(1${EXTEN},${EXTEN},30,TW,Zap/1); - } - _1NXXNXXXXXX => { // HAND DIALING - &ciddial(${EXTEN},${EXTEN:1},30,TW,Zap/1); - } - _754XXXX => { - &ciddial(${EXTEN},707${EXTEN},30,TW,Zap/1); - } - _574XXXX => { - &ciddial(${EXTEN},707${EXTEN},30,TW,Zap/1); - } - _NXXXXXX => { - &ciddial(1707${EXTEN},707${EXTEN},30,TW,Zap/1); - } - _911 => { - &ciddial(911,911,30,TW,Zap/1); - } - _411 => { - &ciddial(411,411,30,TW,Zap/1); - } -} - -context fromvmwork { - 1 => { - Dial(Zap/6&Sip/murf|20|Tt); - } - 2 => { - Dial(Zap/3&Zap/5|20|Tt); - } - _707202XXXX => { - &ciddial(1${EXTEN:3},${EXTEN},30,TW,Zap/1); - } - _707219XXXX => { - &ciddial(1${EXTEN:3},${EXTEN},30,TW,Zap/1); - } - _707254XXXX => { - &ciddial(1${EXTEN:3},${EXTEN},30,TW,Zap/1); - } - _707716XXXX => { - &ciddial(1${EXTEN:3},${EXTEN},30,TW,Zap/1); - } - _707754XXXX => { - &ciddial(${EXTEN:3},${EXTEN},30,TW,Zap/1); - } - _707574XXXX => { - &ciddial(${EXTEN:3},${EXTEN},30,TW,Zap/1); - } - _NXXNXXXXXX => { - &ciddial(1${EXTEN},${EXTEN},30,TW,Zap/1); - } - _1NXXNXXXXXX => { // HAND DIALING - &ciddial(${EXTEN},${EXTEN:1},30,TW,Zap/1); - } - _754XXXX => { - &ciddial(${EXTEN},707${EXTEN},30,TW,Zap/1); - } - _574XXXX => { - &ciddial(${EXTEN},707${EXTEN},30,TW,Zap/1); - } - _NXXXXXX => { - &ciddial(1707${EXTEN},707${EXTEN},30,TW,Zap/1); - } - 911 => { - &ciddial(911,911,30,TW,Zap/1); - } - 411 => { - &ciddial(411,411,30,TW,Zap/1); - } -} - -context fromSeanUniden { - includes - { - parkedcalls; - } - 21 => { - Dial(IAX2/seaniax,20,T); - } - _707202XXXX => { - &ciddial(${EXTEN:3},${EXTEN},30,TW,Zap/1); - } - _707219XXXX => { - &ciddial(${EXTEN:3},${EXTEN},30,TW,Zap/1); - } - _707254XXXX => { - &ciddial(${EXTEN:3},${EXTEN},30,TW,Zap/1); - } - _707716XXXX => { - &ciddial(${EXTEN:3},${EXTEN},30,TW,Zap/1); - } - _707754XXXX => { - &ciddial(${EXTEN:3},${EXTEN},30,TW,Zap/1); - } - _707574XXXX => { - &ciddial(${EXTEN:3},${EXTEN},30,TW,Zap/1); - } - _NXXNXXXXXX => { - &ciddial(1${EXTEN},${EXTEN},30,TW,Zap/1); - } - _1NXXNXXXXXX => { - &ciddial(${EXTEN},${EXTEN:1},30,TW,Zap/1); - } - _754XXXX => { - &ciddial(${EXTEN},707${EXTEN},30,TW,Zap/1); - } - _574XXXX => { - &ciddial(${EXTEN},707${EXTEN},30,TW,Zap/1); - } - _NXXXXXX => { - &ciddial(1707${EXTEN},707${EXTEN},30,TW,Zap/1); - } - 911 => { - &ciddial(911,911,30,TW,Zap/1); - } - 411 => { - &ciddial(411,411,30,TW,Zap/1); - } -} - -context workext { - ignorepat => 8; - ignorepat => 9; - includes { - parkedcalls; - workfirst; - force_home; - dialFWD; - dialiaxtel; - dialgoiax; - } - s => { - loopback: - Wait(0); - } - 1 => { - Dial(Zap/3&Zap/5,20,tT); - } - 2 => { - Dial(Zap/5&Zap/6,20,tT); - } - 21 => { - Dial(IAX2/seaniax,20,T); - } - 22 => { - Set(CALLERID(num)=1234567890); - Set(CALLERID(name)=TestCaller); - Dial(Zap/5,20,mP()A(beep)tw); - NoOp(here is dialstatus: ${DIALSTATUS}...); - goto s|loopback; - } - 4 => { - VoicemailMain(); - goto s|loopback; - } - 5 => { - Record(recording:gsm); - Background(recording); - } - 6 => { - ZapBarge(); - } - 760 => { - DateTime(); - goto s|loopback; - } - 761 => { - ZapBarge(); - goto s|loopback; - } - 765 => { - Playback(demo-echotest); - Echo(); - Playback(demo-echodone); - goto s|loopback; - } - 766 => { - Festival(The other thing to watch is neuro-electronics: the ability to interface technology with our neural system: My wife: Sigrid: has had a cochlear implant since 1996. This once profoundly deaf person now uses the phone: recognizes accents: and listens to movies and recorded books.); - goto s|loopback; - } - 767 => { - agi(tts-riddle.agi); - Background(gsm/what-time-it-is2); - SayUnixTime(); - goto s|loopback; - } - 768 => { - agi(tts-computer.agi); - } - 771 => { - eagi(eagi-test); - agi(my-agi-test); - } - 772 => { - agi(wakeup.agi); - } - 775 => { - if( ${EXTEN}=${EXTEN} ) - { - BackGround(digits/1); - } - else - { - BackGround(digits/0); - } - if( ${EXTEN}=${LANGUAGE} ) - { - BackGround(digits/1); - } - else - { - BackGround(digits/0); - } - BackGround(digits/2); - } - 776 => { - Set(TEST=00359889811777); - if( ${TEST}= 00359889811777 ) - { - BackGround(digits/1); - } - else - { - BackGround(digits/0); - } - if( ${TEST}= 00359889811888 ) - { - BackGround(digits/1); - } - else - { - BackGround(digits/0); - } - Hangup(); - } - 790 => { - MeetMe(790,p); - } - 792 => { - goto pageall|s|begin; - } - 793 => { - #include "include1.ael2" - } - 795 => { - AGI(wakeup.agi); - Congestion(); - } - 797 => { - Set(CONFCIDNA=${CALLERID(name)}); - Set(CONFCIDNU=${CALLERID(num)}); - AGI(callall); - AGI(submit-announce.agi); - Hangup(); - } -} - -context wakeup { - 3 => { - Dial(Zap/3|30); - } - 4 => { - Dial(Zap/4|30); - - } - 5 => { - Dial(Zap/5|30); - - } - 6 => { - Dial(Zap/6|30); - - } - 99 => { - Dial(IAX2/murfiaxphone|30); - } - 97 => { - Dial(IAX2/ryaniax|30); - } - 94 => { - Dial(IAX2/seaniax|30); - } -} - -context announce-all { - s => { - begin: - MeetMe(5555,dtqp); - MeetMeAdmin(5555,K); - Hangup(); - } - h => { - MeetMeAdmin(5555,K); - Hangup(); - } -} - -// now include the telemarketer torture scripts! - -#include "telemarket_torture.ael2" - - diff --git a/pbx/ael/ael-test/ael-vtest13/include1.ael2 b/pbx/ael/ael-test/ael-vtest13/include1.ael2 deleted file mode 100644 index 80c562cb2..000000000 --- a/pbx/ael/ael-test/ael-vtest13/include1.ael2 +++ /dev/null @@ -1,3 +0,0 @@ - NoOp(Hello, this is included from include1.ael2); - #include "include2.ael2" - diff --git a/pbx/ael/ael-test/ael-vtest13/include2.ael2 b/pbx/ael/ael-test/ael-vtest13/include2.ael2 deleted file mode 100644 index 8d892fb0c..000000000 --- a/pbx/ael/ael-test/ael-vtest13/include2.ael2 +++ /dev/null @@ -1,4 +0,0 @@ - NoOp(This was included from include2.ael2); - #include "include3.ael2" - #include "include4.ael2" - diff --git a/pbx/ael/ael-test/ael-vtest13/include3.ael2 b/pbx/ael/ael-test/ael-vtest13/include3.ael2 deleted file mode 100644 index 3c6c1e3dd..000000000 --- a/pbx/ael/ael-test/ael-vtest13/include3.ael2 +++ /dev/null @@ -1,2 +0,0 @@ - NoOp(This is include3.ael2!); - #include "include5.ael2" diff --git a/pbx/ael/ael-test/ael-vtest13/include4.ael2 b/pbx/ael/ael-test/ael-vtest13/include4.ael2 deleted file mode 100644 index 7d3703a5e..000000000 --- a/pbx/ael/ael-test/ael-vtest13/include4.ael2 +++ /dev/null @@ -1,2 +0,0 @@ - NoOp(This is include4.ael2! Isn't it cool!?!?!?!); - NoOp(4 doesn't include anything); diff --git a/pbx/ael/ael-test/ael-vtest13/include5.ael2 b/pbx/ael/ael-test/ael-vtest13/include5.ael2 deleted file mode 100644 index 0e18983ef..000000000 --- a/pbx/ael/ael-test/ael-vtest13/include5.ael2 +++ /dev/null @@ -1 +0,0 @@ - NoOp(Include5.ael2 doesn't include anything, either!); diff --git a/pbx/ael/ael-test/ael-vtest13/telemarket_torture.ael2 b/pbx/ael/ael-test/ael-vtest13/telemarket_torture.ael2 deleted file mode 100755 index ebd8e9f2f..000000000 --- a/pbx/ael/ael-test/ael-vtest13/telemarket_torture.ael2 +++ /dev/null @@ -1,812 +0,0 @@ -// -// AN EXCERSIZE IN BAD DIALPLAN DESIGN -// (What better testing ground than on telemarketers?) -// - - -// BAD DESIGN: long, boring introductions followed by long, drawn out menus of choices. -// if they survive to the last option, how will they remember the choices? -// - -// BAD DESIGN: Amateur Recording. Poor voice quality, too quiet. -// Also, the announcer is definitely not vocally gifted. -// Also, the long pauses and clicks between the intro -// and menu choices might lead some to think that -// the announcements are over, and hang up. Too bad! - -// WORSE DESIGN: Instead of using the Background application, the Playback -// application is used. After taking so much time and trouble -// to record this material, the caller must listen and enjoy -// every syllable before they can make an option choice. None -// of that interrupting with a choice. We want them to savour -// every word! - -// GOOD/BAD, ER INSIDIOUS -- DANGLE A CARROT-- GIVE THE LISTENER A GOOD REASON TO -// HANG ON AND VOLUNTARILY LISTEN TO THE TORTURE. -// BUT, DON'T MAKE PROMISES YOU WON'T KEEP! - - -context telemarket { - s => { - begin: - Playback(telemarketer-intro); // ; Script: - // Due to the extremely high volume of calls from everything from telemarketers - // to Septic System Bacteria vendors, we are asking all such organizations - // to remove this number from their call list, or as need be, to add this - // number to their No-Call list, whichever is relevent. - - // [THE CARROT:] - // We HAVE made some exceptions, and if you wish to see if your organization - // has been exempted, please listen to and follow the following prompts. - // - // Otherwise, please Cease calling this number! - // - Playback(telemarketer-choices); - // if you represent a charitable organization, please dial 1, - // if you represent a political organization, please dial 2. - // if you represent a polling company, please dial 3, - // if you represent a market research organization, please dial 4. - // if you represent a magazine or newsletter, please dial 5. - // if you represent a commercial organization, please dial 6. - } - 1 => goto telemarket-charity|s|begin; - 2 => goto telemarket-political|s|begin; - 3 => goto telemarket-pollster|s|begin; - 4 => goto telemarket-research|s|begin; - 5 => goto telemarket-magazine|s|begin; - 6 => goto telemarket-commercial|s|begin; - 7 => goto telemarket-other|s|begin; - t => goto telemarket|s|begin; - i => goto telemarket|s|begin; - o => goto telemarket|s|begin; -} - -context telemarket-charity { - s => { - begin: - Playback(telemark-charity-intro); - // We have contributed generously to many worthy causes in the past, and will - // continue to do so in the future. But we suspect that such organizatons - // have sold our name and phone number to each other until we are now hounded - // day and night by literally hundreds of such organizations. - // Enough is Enough! - // - // If we have contributed to your cause in the past, we may, perhaps, be disposed to - // do so in the future, at our option, - // we give no pledges nor make any commitments here. - // Send us material via the post if you feel this necessary - // but do not even consider email. Any email or further phone calls from your organization - // in the future, will be considered an act of aggression, and we will - // blacklist your organization for the rest of our natural lives. - // - // To see if your organization is exempt from these prohibitions, please - // comply with the following options. - Playback(telemark-charity-choices); - // If your organization is disease or genetic defect related, dial 1, - // If your organization is handicap related, dial 2. - // If your organization is a police or fireman or other similar support entity, please dial 3. - // If your organization is a grade school to high school related - // fund raiser or other type of activity, please dial 4. - // If your organization is a college or univerity or alumnis organization, please dial 5. - // If your organization is animal rights or ecology related organization, please dial 6. - // If your organization is a political action or candidate support related, please dial 7. - // If your organization is a substance abuse related organization or cause, please dial 8. - // And any other charity or tax exempt organization should dial 9. - } - 1 => goto telemarket-char-disease|s|begin; - 2 => goto telemarket-char-handicap|s|begin; - 3 => goto telemarket-char-police|s|begin; - 4 => goto telemarket-char-school|s|begin; - 5 => goto telemarket-char-college|s|begin; - 6 => goto telemarket-char-animal|s|begin; - 7 => goto telemarket-char-candidate|s|begin; - 8 => goto telemarket-char-abuse|s|begin; - 9 => goto telemarket-char-other|s|begin; -// BAD DESIGN: referring all timeouts,invalid choices, etc, back to the root of the menu tree will frustrate users no end! -// WORSE DESIGN: How about having the user have to push a button to repeat the current menu? When a time out could just -// automatically do it for the user? - t => goto telemarket|s|begin; - i => goto telemarket|s|begin; - o => goto telemarket|s|begin; -} - -context telemarket-char-disease { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-char-handicap { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-char-police { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-char-school { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-char-college { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-char-animal { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-char-candidate { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-char-abuse { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-char-other { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-sorry { - s => { - begin: - Playback(telemarket-sorry); - // Sorry -- your organization is not exempt. Please stop calling us. - // Thank you. goodbye. - Hangup(); - } -} - - -// BAD DESIGN: Hanging up on your audience, no matter what the outcome, is not a nice thing to do! - -context telemarket-exception { - s => { - begin: - Playback(telemarket-success); - // Congratulations. Your organization IS exempt. Please call us back, - // but this time, just act like a normal caller. Thank you. Goodbye. - Hangup(); - } -} - - -// BAD DESIGN: Making long cascading menu choices is a nasty thing to do to callers! -// BAD DESIGN: Putting the most frequently encountered items at the end of a list is also a nasty thing to do! - - -// GOOD DESIGN: All rejection notices use a single context. All Acceptance also. To change a rejection to an -// acceptance, just change the reference from telemarket-sorry to telemarket-exception - - -context telemarket-political { - s => { - begin: - Playback(telemark-polit-intro); - // To see if your organization is exempt from our prohibitions, - // please follow the following prompts. - // please note that they are not in alphabetical order, and you will have to - // give them your full attention. - Playback(telemark-polit-choices); - // if You represent the America First Party, dial 1. - // if You represent the American Party, dial 2. - // if You represent the American Heritage Party, dial 3. - // if You represent the American Independent Party, dial 4. - // if You represent the American Nazi Party, dial 5. - // if You represent the Pot Party, dial 6. - // if You represent the American Reform Party, dial 7. - // if You represent the Christian Falenqist Party of America, dial 8. - // all others, please dial 9. - } - 1 => goto telemarket-poli-Am1st|s|begin; - 2 => goto telemarket-poli-American|s|begin; - 3 => goto telemarket-poli-AmHer|s|begin; - 4 => goto telemarket-poli-AmInd|s|begin; - 5 => goto telemarket-poli-AmNaz|s|begin; - 6 => goto telemarket-poli-Pot|s|begin; - 7 => goto telemarket-poli-AmRef|s|begin; - 8 => goto telemarket-poli-CFP|s|begin; - 9 => goto telemarket-political2|s|begin; - t => goto telemarket|s|begin; - i => goto telemarket|s|begin; - o => goto telemarket|s|begin; -} - -context telemarket-political2 { - s => { - begin: - Playback(telemark-politx-intro); - // Thank you for your patience, and I congratulate you for your persistence. - // Just a few more options! - // - Playback(telemark-polit2-choices); - // if You represent the Communist Party USA, dial 1. - // if You represent the Constitution Party, dial 2. - // if You represent the Family Values Party, dial 3. - // if You represent the Freedom Socialist Party, dial 4. - // if You represent the Grass Roots Party, dial 5. - // if You represent the Green Party, dial 6. - // if You represent the Greens Party, dial 7. - // if You represent the Independence Party, dial 8. - // all others, goto 9. - } - 1 => goto telemarket-poli-Communist|s|begin; - 2 => goto telemarket-poli-Constit|s|begin; - 3 => goto telemarket-poli-FamVal|s|begin; - 4 => goto telemarket-poli-FreedSoc|s|begin; - 5 => goto telemarket-poli-Grassroot|s|begin; - 6 => goto telemarket-poli-Green|s|begin; - 7 => goto telemarket-poli-Greens|s|begin; - 8 => goto telemarket-poli-Independence|s|begin; - 9 => goto telemarket-political3|s|begin; - t => goto telemarket|s|begin; - i => goto telemarket|s|begin; - o => goto telemarket|s|begin; -} - -context telemarket-political3 { - s => { - begin: - Playback(telemark-politx-intro); - Playback(telemark-polit3-choices); - // if You represent the Independant American Party, dial 1. - // if You represent the Labor Party, dial 2. - // if You represent the Libertarian Party, dial 3. - // if You represent the Light Party, dial 4. - // if You represent the Natural Law Party, dial 5. - // if You represent the New Party, dial 6. - // if You represent the New Union Party, dial 7. - // if You represent the Peace and Freedom Party, dial 8. - // all others, hang on, dial 9. - } - 1 => goto telemarket-poli-IndAm|s|begin; - 2 => goto telemarket-poli-Labor|s|begin; - 3 => goto telemarket-poli-Liber|s|begin; - 4 => goto telemarket-poli-Light|s|begin; - 5 => goto telemarket-poli-NatLaw|s|begin; - 6 => goto telemarket-poli-New|s|begin; - 7 => goto telemarket-poli-NewUn|s|begin; - 8 => goto telemarket-poli-PeaceFree|s|begin; - 9 => goto telemarket-political4|s|begin; - t => goto telemarket|s|begin; - i => goto telemarket|s|begin; - o => goto telemarket|s|begin; -} - - -context telemarket-political4 { - s => { - begin: - Playback(telemark-politx-intro); - Playback(telemark-polit4-choices); - // if You represent the Prohibition Party, dial 1. - // if You represent the Reform Party, dial 2. - // if You represent the Revolution , dial 3. - // if You represent the Socialist Party USA, dial 4. - // if You represent the Socialist Action Party, dial 5. - // if You represent the Socialist Equality Party, dial 6. - // if You represent the Socialist Labor Party, dial 7. - // if You represent the Socialist Workers Party, dial 8. - // all others, hang on, and dial 9. - } - 1 => goto telemarket-poli-Prohib|s|begin; - 2 => goto telemarket-poli-Ref|s|begin; - 3 => goto telemarket-poli-Revol|s|begin; - 4 => goto telemarket-poli-SocPart|s|begin; - 5 => goto telemarket-poli-SocAct|s|begin; - 6 => goto telemarket-poli-SocEq|s|begin; - 7 => goto telemarket-poli-SocLab|s|begin; - 8 => goto telemarket-poli-SocWork|s|begin; - 9 => goto telemarket-political5|s|begin; - t => goto telemarket|s|begin; - i => goto telemarket|s|begin; - o => goto telemarket|s|begin; -} - - -context telemarket-political5 { - s => { - begin: - Playback(telemark-politx-intro); - Playback(telemark-polit5-choices); - // if You represent the Southern Party, dial 1. - // if You represent the Southern Independence Party, dial 2. - // if You represent the US Pacifist Party, dial 3. - // if You represent the We the People Party, dial 4. - // if You represent the Workers World Party, dial 5. - // if You represent the Democratic Party, dial 6. - // if You represent the Republican Party, dial 7. - // all others, may dial 8. - } - 1 => goto telemarket-poli-South|s|begin; - 2 => goto telemarket-poli-SoInd|s|begin; - 3 => goto telemarket-poli-USPac|s|begin; - 4 => goto telemarket-poli-WTP|s|begin; - 5 => goto telemarket-poli-WWP|s|begin; - 6 => goto telemarket-poli-Democrat|s|begin; - 7 => goto telemarket-poli-Repub|s|begin; - 8 => goto telemarket-poli-other|s|begin; - t => goto telemarket|s|begin; - i => goto telemarket|s|begin; - o => goto telemarket|s|begin; -} - - -context telemarket-poli-other { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-Repub { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-Democrat { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-WWP { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-WTP { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-USPac { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-SoInd { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-South { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-SocWork { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-SocLab { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-SocEq { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-SocAct { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-SocPart { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-Revol { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-Ref { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-Prohib { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-PeaceFree { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-NewUn { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-New { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-NatLaw { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-Light { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-Liber { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-Labor { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-IndAm { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-Independence { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-Greens { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-Green { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-Grassroot { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-FreedSoc { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-FamVal { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-Constit { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-Communist { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-CFP { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-AmRef { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -// BAD DESIGN: Putting in infinite loops in the menus, whether by design or mistake is not nice! -context telemarket-poli-Pot { - s => { - begin: - goto telemarket-political|s|begin; // will the Pot Party Guys even notice an infinite loop? - } -} - -context telemarket-poli-AmNaz { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-AmInd { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-AmHer { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-American { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - -context telemarket-poli-Am1st { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - - -context telemarket-pollster { - s => { - begin: - Playback(telemark-poll-intro); - // I'm sorry-- We are just not available for doing any polling at the moment. So, - // please remove us from your list. - goto telemarket-sorry|s|begin; - } - t => goto telemarket|s|begin; - i => goto telemarket|s|begin; - o => goto telemarket|s|begin; -} - - -context telemarket-research { - s => { - begin: - Playback(telemark-research-intro); - // I'd like to say I'd love to help you with your market survey, but that would be a complete - // and total lie. I am not interested in helping you with Market Surveys. - // - // Please remove me from your call list. It just doesn't pay enough. But Thank you. - goto telemarket-sorry|s|begin; - } - t => goto telemarket|s|begin; - i => goto telemarket|s|begin; - o => goto telemarket|s|begin; -} - - -context telemarket-magazine { - s => { - begin: - Playback(telemark-mag-choices); - // If you are calling to see if I would like a NEW free subscription - // to your magazine or newsletter, please dial 1. - // If you are calling to see if I want to Renew an existing subscription, please dial 2. - // If you are representing some publisher, and want my opinion about something, or are doing - // some kind of survey, please dial 3. - // If you are calling to verify that some previous caller actually called me, and the - // verification information is correct, please dial 4. - // and if your call purpose doesn't match any of the above, please dial 5. - } - 1 => goto telemark-mag-new|s|begin; - 2 => goto telemark-mag-renew|s|begin; - 3 => goto telemark-mag-survey|s|begin; - 4 => goto telemark-mag-verify|s|begin; - 5 => goto telemark-mag-other|s|begin; - t => goto telemarket|s|begin; - i => goto telemarket|s|begin; - o => goto telemarket|s|begin; -} - - -context telemark-mag-new { - s => { - begin: - Playback(telemark-mag-new); - // I'm sorry, I'm maxed out, and the answer is NO. - // If you really think I'd LOVE to add your publication to the pile I already get, - // Send something via the post. Don't call me. - // Thank you. bye. - Hangup(); - } - t => goto telemarket|s|begin; - i => goto telemarket|s|begin; - o => goto telemarket|s|begin; -} - - -context telemark-mag-renew { - s => { - begin: - Playback(telemark-mag-renew); - // So, you want to see if I want to Renew, do you? The answer is most likely "YES". - // - // But, I will not answer a long list of questions over the phone. Send such - // categorization info via the post, and stop bothering me over the phone, - // if this is what you want. - // Do you need verification information? Normally I opt out of such nonsense, if possible. - // If not, use whatever of the following you can: - // My birth month is October. - // My birthplace is Kigali, in Rwanda, in Afica. - // My eye color is orange. - // All of these are wonderfully false, but I use them regularly for such purposes. Thank you. - Hangup(); - } - t => goto telemarket|s|begin; - i => goto telemarket|s|begin; - o => goto telemarket|s|begin; -} - - -context telemark-mag-survey { - s => { - begin: - Playback(telemark-mag-survey); - // Sorry, I don't have time to answer survey or opinion questions. Find someone - // else to help build your marketing database, I guess. Good Luck. - Hangup(); - } - t => goto telemarket|s|begin; - i => goto telemarket|s|begin; - o => goto telemarket|s|begin; -} - - -context telemark-mag-verify { - s => { - begin: - Playback(telemark-mag-verify); - // If you are calling to verify that your own agents aren't ripping you off, - // sorry, I can't help you. I opt out whenever I can, mainly because I'm not - // paid enough for this kind of thing. I always lie, and I can't remember - // what I might have said. Sorry. Goodbye. - Hangup(); - } - t => goto telemarket|s|begin; - i => goto telemarket|s|begin; - o => goto telemarket|s|begin; -} - - -context telemark-mag-other { - s => { - begin: - goto telemarket-sorry|s|begin; - } -} - - - -// BAD DESIGN: Is it entrapment, when you lure telemarketers to reveal their contact information, -// Just so you can report them to the FTC/FCC? If it is, isn't it unethical for them -// to hide their CID (via Anonymous, usually), to hide their identities from the public? - -// BTW -- What telemarketer would be stupid enough to fall for this? I'll bet not a single one! -// For that matter, what telemarketer will be stupid enough to even enter any of this? I'll bet not a single one! -// (but it was fun messing around). - -context telemarket-commercial { - s => { - begin: - Playback(telemark-comm-intro); // Script: Please leave your name, organization, and phone number, plus - // a short description of the purpose of your call, at the prompt. - // We will do our best to respond to your call! And, in the mean time, - // do not forget to add us to your no-call list! - Voicemail(u82); - goto telemarket-sorry|s|begin; - } - t => goto telemarket|s|begin; - i => goto telemarket|s|begin; - o => goto telemarket|s|begin; -} - - -context telemarket-other { - s => { - begin: - Playback(telemark-other-intro); - // Please review the previous menu options, and see if you really don't - // fit in one of the previous categories. - // If you do not, go ahead, and call me again, and let me know what category - // I should have included in the above list. I appreciate this. Thank you much! - Hangup(); - } - t => goto telemarket|s|begin; - i => goto telemarket|s|begin; - o => goto telemarket|s|begin; -} diff --git a/pbx/ael/ael-test/ael-vtest17/extensions.ael b/pbx/ael/ael-test/ael-vtest17/extensions.ael deleted file mode 100644 index d13fe99d7..000000000 --- a/pbx/ael/ael-test/ael-vtest17/extensions.ael +++ /dev/null @@ -1,116 +0,0 @@ -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; -} diff --git a/pbx/ael/ael-test/ael-vtest21/extensions.ael b/pbx/ael/ael-test/ael-vtest21/extensions.ael deleted file mode 100644 index 95f25302a..000000000 --- a/pbx/ael/ael-test/ael-vtest21/extensions.ael +++ /dev/null @@ -1,14 +0,0 @@ -globals { - AXLHAFT=wow-to-the-tenth-power; - JibberWorthy=zinger3; - OFFICE_CODE=503; -} - -context from-enum { - - _${OFFICE_CODE}XXXX => { - Answer(); - goto ${EXTEN:3}|1; - } -} - diff --git a/pbx/ael/ael-test/ael-vtest25/extensions.ael b/pbx/ael/ael-test/ael-vtest25/extensions.ael deleted file mode 100644 index f6d19d7b3..000000000 --- a/pbx/ael/ael-test/ael-vtest25/extensions.ael +++ /dev/null @@ -1,8 +0,0 @@ -context test11 { - 841 => { - &test234("testing", ${CUT(EXTEN,,3)}); - jump ${DB(uri/${uri_string})}; - Set(line=${DB(uri/${uri_string})}); - jump ${line}; - } -} diff --git a/pbx/ael/ael-test/ref.ael-ntest10 b/pbx/ael/ael-test/ref.ael-ntest10 deleted file mode 100644 index a3ffbb801..000000000 --- a/pbx/ael/ael-test/ref.ael-ntest10 +++ /dev/null @@ -1,163 +0,0 @@ - -(If you find progress and other non-error messages irritating, you can use -q to suppress them) - -(You can use the -n option if you aren't interested in seeing all the instructions generated by the compiler) - - -(You can use the -w option to dump extensions.conf format to extensions.conf.aeldump) -LOG: lev:2 file:pbx_ael.c line:4468 func: pbx_load_module Starting AEL load process. -LOG: lev:2 file:pbx_ael.c line:4475 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:4483 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'. -LOG: lev:3 file:pbx_ael.c line:2248 func: check_switch_expr Warning: file ./extensions.ael, line 13-13: A default case was automatically added to the switch. -LOG: lev:3 file:pbx_ael.c line:2248 func: check_switch_expr Warning: file ./extensions.ael, line 36-36: A default case was automatically added to the switch. -LOG: lev:3 file:pbx_ael.c line:2248 func: check_switch_expr Warning: file ./extensions.ael, line 48-48: A default case was automatically added to the switch. -LOG: lev:3 file:pbx_ael.c line:2248 func: check_switch_expr Warning: file ./extensions.ael, line 60-60: A default case was automatically added to the switch. -LOG: lev:3 file:pbx_ael.c line:2248 func: check_switch_expr Warning: file ./extensions.ael, line 72-72: A default case was automatically added to the switch. -LOG: lev:3 file:pbx_ael.c line:2248 func: check_switch_expr Warning: file ./extensions.ael, line 84-84: A default case was automatically added to the switch. -LOG: lev:3 file:pbx_ael.c line:2248 func: check_switch_expr Warning: file ./extensions.ael, line 87-87: A default case was automatically added to the switch. -LOG: lev:3 file:pbx_ael.c line:2248 func: check_switch_expr Warning: file ./extensions.ael, line 106-106: A default case was automatically added to the switch. -LOG: lev:3 file:pbx_ael.c line:2248 func: check_switch_expr Warning: file ./extensions.ael, line 119-119: A default case was automatically added to the switch. -LOG: lev:3 file:pbx_ael.c line:2248 func: check_switch_expr Warning: file ./extensions.ael, line 122-122: A default case was automatically added to the switch. -LOG: lev:2 file:pbx_ael.c line:4486 func: pbx_load_module AEL load process: checked config file name './extensions.ael'. -Executed ast_context_create(conts, name=macro-endsess, registrar=pbx_ael); -Executed ast_context_create(conts, name=macro-nullchk, registrar=pbx_ael); -Executed ast_context_create(conts, name=macro-endcall, registrar=pbx_ael); -Executed ast_context_create(conts, name=macro-endcall2, registrar=pbx_ael); -Executed ast_context_create(conts, name=macro-endcall3, registrar=pbx_ael); -Executed ast_context_create(conts, name=macro-endcall4, registrar=pbx_ael); -Executed ast_context_create(conts, name=macro-endcall5, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endsess, rep=0, exten=s, priority=1, label=(null), callerid=(null), appl=NoOp, data=hithere, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-nullchk, rep=0, exten=s, priority=1, label=(null), callerid=(null), appl=Set, data=type=${ARG1}, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-nullchk, rep=0, exten=s, priority=2, label=(null), callerid=(null), appl=NoOp, data=${type} is this, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall, rep=0, exten=s, priority=1, label=(null), callerid=(null), appl=Set, data=type=${ARG1}, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall, rep=0, exten=s, priority=2, label=(null), callerid=(null), appl=Set, data=~~EXTEN~~=${EXTEN}, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall, rep=0, exten=s, priority=3, label=(null), callerid=(null), appl=Goto, data=sw-1-${type}|10, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall, rep=0, exten=s, priority=4, label=(null), callerid=(null), appl=NoOp, data=Finish switch-endcall-1, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall, rep=0, exten=_sw-1-., priority=10, label=(null), callerid=(null), appl=Goto, data=s|4, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall, rep=0, exten=sw-1-, priority=10, label=(null), callerid=(null), appl=Goto, data=sw-1-.|10, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall, rep=0, exten=sw-1-out, priority=10, label=(null), callerid=(null), appl=Macro, data=nullchk|callid, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall, rep=0, exten=sw-1-out, priority=11, label=(null), callerid=(null), appl=GotoIf, data=$[${testnotnull}]?12:15, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall, rep=0, exten=sw-1-out, priority=12, label=(null), callerid=(null), appl=Macro, data=endsess, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall, rep=0, exten=sw-1-out, priority=13, label=(null), callerid=(null), appl=Goto, data=sw-1-out|ptr1, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall, rep=0, exten=sw-1-out, priority=14, label=(null), callerid=(null), appl=Goto, data=17, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall, rep=0, exten=sw-1-out, priority=15, label=ptr1, callerid=(null), appl=Softhangup, data=${CHANNEL}, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall, rep=0, exten=sw-1-out, priority=16, label=(null), callerid=(null), appl=Goto, data=s|4, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall, rep=0, exten=sw-1-out, priority=17, label=(null), callerid=(null), appl=NoOp, data=Finish if-sw-endcall-out-1-2, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall, rep=0, exten=sw-1-out, priority=18, label=(null), callerid=(null), appl=Noop, data=esac, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall, rep=0, exten=sw-1-out, priority=19, label=(null), callerid=(null), appl=Goto, data=sw-1-.|10, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall2, rep=0, exten=s, priority=1, label=(null), callerid=(null), appl=Set, data=type=${ARG1}, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall2, rep=0, exten=s, priority=2, label=(null), callerid=(null), appl=Set, data=~~EXTEN~~=${EXTEN}, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall2, rep=0, exten=s, priority=3, label=(null), callerid=(null), appl=Goto, data=sw-3-${type}|10, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall2, rep=0, exten=s, priority=4, label=(null), callerid=(null), appl=NoOp, data=Finish switch-endcall2-3, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall2, rep=0, exten=_sw-3-., priority=10, label=(null), callerid=(null), appl=Goto, data=s|4, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall2, rep=0, exten=sw-3-, priority=10, label=(null), callerid=(null), appl=Goto, data=sw-3-.|10, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall2, rep=0, exten=sw-3-out2, priority=10, label=ptr1, callerid=(null), appl=Softhangup, data=${CHANNEL}, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall2, rep=0, exten=sw-3-out2, priority=11, label=(null), callerid=(null), appl=Goto, data=s|4, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall2, rep=0, exten=sw-3-out2, priority=12, label=(null), callerid=(null), appl=Noop, data=esac, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall2, rep=0, exten=sw-3-out2, priority=13, label=(null), callerid=(null), appl=Goto, data=sw-3-.|10, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall2, rep=0, exten=sw-3-out, priority=10, label=(null), callerid=(null), appl=Macro, data=nullchk|callid, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall2, rep=0, exten=sw-3-out, priority=11, label=(null), callerid=(null), appl=GotoIf, data=$[${testnotnull}]?12:14, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall2, rep=0, exten=sw-3-out, priority=12, label=(null), callerid=(null), appl=Macro, data=endsess, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall2, rep=0, exten=sw-3-out, priority=13, label=(null), callerid=(null), appl=Goto, data=sw-3-out2|ptr1, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall2, rep=0, exten=sw-3-out, priority=14, label=(null), callerid=(null), appl=NoOp, data=Finish if-sw-endcall2-out-3-4, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall2, rep=0, exten=sw-3-out, priority=15, label=(null), callerid=(null), appl=Goto, data=sw-3-out2|10, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall3, rep=0, exten=s, priority=1, label=(null), callerid=(null), appl=Set, data=type=${ARG1}, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall3, rep=0, exten=s, priority=2, label=(null), callerid=(null), appl=Set, data=~~EXTEN~~=${EXTEN}, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall3, rep=0, exten=s, priority=3, label=(null), callerid=(null), appl=Goto, data=sw-5-${type}|10, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall3, rep=0, exten=s, priority=4, label=(null), callerid=(null), appl=NoOp, data=Finish switch-endcall3-5, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall3, rep=0, exten=s, priority=5, label=(null), callerid=(null), appl=GotoIf, data=$[${testnotnull}]?6:7, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall3, rep=0, exten=s, priority=6, label=(null), callerid=(null), appl=Goto, data=sw-8-out|ptr1, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall3, rep=0, exten=s, priority=7, label=(null), callerid=(null), appl=NoOp, data=Finish if-endcall3-7, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall3, rep=0, exten=s, priority=8, label=(null), callerid=(null), appl=Goto, data=sw-8-${type}|10, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall3, rep=0, exten=s, priority=9, label=(null), callerid=(null), appl=NoOp, data=Finish switch-endcall3-8, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall3, rep=0, exten=_sw-8-., priority=10, label=(null), callerid=(null), appl=Goto, data=s|9, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall3, rep=0, exten=sw-8-, priority=10, label=(null), callerid=(null), appl=Goto, data=sw-8-.|10, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall3, rep=0, exten=sw-8-out, priority=10, label=(null), callerid=(null), appl=GotoIf, data=$[${testnotnull}]?11:13, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall3, rep=0, exten=sw-8-out, priority=11, label=ptr1, callerid=(null), appl=Softhangup, data=${CHANNEL}, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall3, rep=0, exten=sw-8-out, priority=12, label=(null), callerid=(null), appl=Goto, data=s|9, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall3, rep=0, exten=sw-8-out, priority=13, label=(null), callerid=(null), appl=NoOp, data=Finish if-sw-endcall3-out-8-9, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall3, rep=0, exten=sw-8-out, priority=14, label=(null), callerid=(null), appl=Noop, data=esac, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall3, rep=0, exten=sw-8-out, priority=15, label=(null), callerid=(null), appl=Goto, data=sw-8-.|10, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall3, rep=0, exten=_sw-5-., priority=10, label=(null), callerid=(null), appl=Goto, data=s|4, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall3, rep=0, exten=sw-5-, priority=10, label=(null), callerid=(null), appl=Goto, data=sw-5-.|10, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall3, rep=0, exten=sw-5-out, priority=10, label=(null), callerid=(null), appl=Macro, data=nullchk|callid, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall3, rep=0, exten=sw-5-out, priority=11, label=(null), callerid=(null), appl=GotoIf, data=$[${testnotnull}]?12:14, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall3, rep=0, exten=sw-5-out, priority=12, label=(null), callerid=(null), appl=Macro, data=endsess, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall3, rep=0, exten=sw-5-out, priority=13, label=(null), callerid=(null), appl=Goto, data=sw-8-out|ptr1, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall3, rep=0, exten=sw-5-out, priority=14, label=(null), callerid=(null), appl=NoOp, data=Finish if-sw-endcall3-out-5-6, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall3, rep=0, exten=sw-5-out, priority=15, label=(null), callerid=(null), appl=Noop, data=esac, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall3, rep=0, exten=sw-5-out, priority=16, label=(null), callerid=(null), appl=Goto, data=sw-5-.|10, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall4, rep=0, exten=s, priority=1, label=(null), callerid=(null), appl=Set, data=type=${ARG1}, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall4, rep=0, exten=s, priority=2, label=(null), callerid=(null), appl=Set, data=~~EXTEN~~=${EXTEN}, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall4, rep=0, exten=s, priority=3, label=(null), callerid=(null), appl=Goto, data=sw-10-${type}|10, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall4, rep=0, exten=s, priority=4, label=(null), callerid=(null), appl=NoOp, data=Finish switch-endcall4-10, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall4, rep=0, exten=s, priority=5, label=(null), callerid=(null), appl=GotoIf, data=$[${testnotnull}]?6:7, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall4, rep=0, exten=s, priority=6, label=(null), callerid=(null), appl=Goto, data=sw-14-in|ptr1, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall4, rep=0, exten=s, priority=7, label=(null), callerid=(null), appl=NoOp, data=Finish if-endcall4-12, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall4, rep=0, exten=s, priority=8, label=(null), callerid=(null), appl=Goto, data=sw-13-${type}|10, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall4, rep=0, exten=s, priority=9, label=(null), callerid=(null), appl=NoOp, data=Finish switch-endcall4-13, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall4, rep=0, exten=_sw-13-., priority=10, label=(null), callerid=(null), appl=Goto, data=s|9, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall4, rep=0, exten=sw-13-, priority=10, label=(null), callerid=(null), appl=Goto, data=sw-13-.|10, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall4, rep=0, exten=sw-13-out, priority=10, label=(null), callerid=(null), appl=Goto, data=sw-14-${type}|10, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall4, rep=0, exten=sw-13-out, priority=11, label=(null), callerid=(null), appl=NoOp, data=Finish switch-sw-endcall4-out-13-14, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall4, rep=0, exten=sw-13-out, priority=12, label=(null), callerid=(null), appl=Goto, data=sw-13-.|10, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall4, rep=0, exten=_sw-14-., priority=10, label=(null), callerid=(null), appl=Goto, data=sw-13-out|11, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall4, rep=0, exten=sw-14-, priority=10, label=(null), callerid=(null), appl=Goto, data=sw-14-.|10, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall4, rep=0, exten=sw-14-in, priority=10, label=(null), callerid=(null), appl=GotoIf, data=$[${testnotnull}]?11:13, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall4, rep=0, exten=sw-14-in, priority=11, label=ptr1, callerid=(null), appl=Softhangup, data=${CHANNEL}, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall4, rep=0, exten=sw-14-in, priority=12, label=(null), callerid=(null), appl=Goto, data=sw-13-out|11, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall4, rep=0, exten=sw-14-in, priority=13, label=(null), callerid=(null), appl=NoOp, data=Finish if-sw-sw-endcall4-out-13-in-14-15, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall4, rep=0, exten=sw-14-in, priority=14, label=(null), callerid=(null), appl=Noop, data=esac, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall4, rep=0, exten=sw-14-in, priority=15, label=(null), callerid=(null), appl=Goto, data=sw-14-.|10, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall4, rep=0, exten=_sw-10-., priority=10, label=(null), callerid=(null), appl=Goto, data=s|4, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall4, rep=0, exten=sw-10-, priority=10, label=(null), callerid=(null), appl=Goto, data=sw-10-.|10, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall4, rep=0, exten=sw-10-out, priority=10, label=(null), callerid=(null), appl=Macro, data=nullchk|callid, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall4, rep=0, exten=sw-10-out, priority=11, label=(null), callerid=(null), appl=GotoIf, data=$[${testnotnull}]?12:14, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall4, rep=0, exten=sw-10-out, priority=12, label=(null), callerid=(null), appl=Macro, data=endsess, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall4, rep=0, exten=sw-10-out, priority=13, label=(null), callerid=(null), appl=Goto, data=sw-14-in|ptr1, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall4, rep=0, exten=sw-10-out, priority=14, label=(null), callerid=(null), appl=NoOp, data=Finish if-sw-endcall4-out-10-11, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall4, rep=0, exten=sw-10-out, priority=15, label=(null), callerid=(null), appl=Noop, data=esac, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall4, rep=0, exten=sw-10-out, priority=16, label=(null), callerid=(null), appl=Goto, data=sw-10-.|10, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall5, rep=0, exten=s, priority=1, label=(null), callerid=(null), appl=Set, data=type=${ARG1}, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall5, rep=0, exten=s, priority=2, label=(null), callerid=(null), appl=Set, data=~~EXTEN~~=${EXTEN}, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall5, rep=0, exten=s, priority=3, label=(null), callerid=(null), appl=Goto, data=sw-16-${type}|10, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall5, rep=0, exten=s, priority=4, label=(null), callerid=(null), appl=NoOp, data=Finish switch-endcall5-16, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall5, rep=0, exten=s, priority=5, label=(null), callerid=(null), appl=GotoIf, data=$[${testnotnull}]?6:7, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall5, rep=0, exten=s, priority=6, label=(null), callerid=(null), appl=Goto, data=sw-21-in|ptr1, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall5, rep=0, exten=s, priority=7, label=(null), callerid=(null), appl=NoOp, data=Finish if-endcall5-19, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall5, rep=0, exten=s, priority=8, label=(null), callerid=(null), appl=Goto, data=sw-20-${type}|10, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall5, rep=0, exten=s, priority=9, label=(null), callerid=(null), appl=NoOp, data=Finish switch-endcall5-20, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall5, rep=0, exten=_sw-20-., priority=10, label=(null), callerid=(null), appl=Goto, data=s|9, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall5, rep=0, exten=sw-20-, priority=10, label=(null), callerid=(null), appl=Goto, data=sw-20-.|10, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall5, rep=0, exten=sw-20-out, priority=10, label=(null), callerid=(null), appl=Goto, data=sw-21-${type}|10, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall5, rep=0, exten=sw-20-out, priority=11, label=(null), callerid=(null), appl=NoOp, data=Finish switch-sw-endcall5-out-20-21, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall5, rep=0, exten=sw-20-out, priority=12, label=(null), callerid=(null), appl=Goto, data=sw-20-.|10, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall5, rep=0, exten=_sw-21-., priority=10, label=(null), callerid=(null), appl=Goto, data=sw-20-out|11, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall5, rep=0, exten=sw-21-, priority=10, label=(null), callerid=(null), appl=Goto, data=sw-21-.|10, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall5, rep=0, exten=sw-21-in, priority=10, label=(null), callerid=(null), appl=GotoIf, data=$[${testnotnull}]?11:13, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall5, rep=0, exten=sw-21-in, priority=11, label=ptr1, callerid=(null), appl=Softhangup, data=${CHANNEL}, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall5, rep=0, exten=sw-21-in, priority=12, label=(null), callerid=(null), appl=Goto, data=sw-20-out|11, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall5, rep=0, exten=sw-21-in, priority=13, label=(null), callerid=(null), appl=NoOp, data=Finish if-sw-sw-endcall5-out-20-in-21-22, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall5, rep=0, exten=sw-21-in, priority=14, label=(null), callerid=(null), appl=Noop, data=esac, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall5, rep=0, exten=sw-21-in, priority=15, label=(null), callerid=(null), appl=Goto, data=sw-21-.|10, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall5, rep=0, exten=_sw-16-., priority=10, label=(null), callerid=(null), appl=Goto, data=s|4, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall5, rep=0, exten=sw-16-, priority=10, label=(null), callerid=(null), appl=Goto, data=sw-16-.|10, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall5, rep=0, exten=sw-16-in, priority=10, label=(null), callerid=(null), appl=Macro, data=nullchk|callid, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall5, rep=0, exten=sw-16-in, priority=11, label=ptr2, callerid=(null), appl=GotoIf, data=$[${testnotnull}]?12:14, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall5, rep=0, exten=sw-16-in, priority=12, label=(null), callerid=(null), appl=Macro, data=endsess, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall5, rep=0, exten=sw-16-in, priority=13, label=(null), callerid=(null), appl=Goto, data=sw-21-in|ptr1, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall5, rep=0, exten=sw-16-in, priority=14, label=(null), callerid=(null), appl=NoOp, data=Finish if-sw-endcall5-in-16-18, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall5, rep=0, exten=sw-16-in, priority=15, label=(null), callerid=(null), appl=Noop, data=esac, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall5, rep=0, exten=sw-16-in, priority=16, label=(null), callerid=(null), appl=Goto, data=sw-16-.|10, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall5, rep=0, exten=sw-16-out, priority=10, label=(null), callerid=(null), appl=Macro, data=nullchk|callid, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall5, rep=0, exten=sw-16-out, priority=11, label=(null), callerid=(null), appl=GotoIf, data=$[${testnotnull}]?12:14, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall5, rep=0, exten=sw-16-out, priority=12, label=(null), callerid=(null), appl=Macro, data=endsess, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall5, rep=0, exten=sw-16-out, priority=13, label=(null), callerid=(null), appl=Goto, data=sw-21-in|ptr1, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall5, rep=0, exten=sw-16-out, priority=14, label=(null), callerid=(null), appl=NoOp, data=Finish if-sw-endcall5-out-16-17, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=macro-endcall5, rep=0, exten=sw-16-out, priority=15, label=(null), callerid=(null), appl=Goto, data=sw-16-in|10, FREE, registrar=pbx_ael); -LOG: lev:2 file:pbx_ael.c line:4488 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'. -Executed ast_merge_contexts_and_delete(); -LOG: lev:2 file:pbx_ael.c line:4491 func: pbx_load_module AEL load process: merged config file name './extensions.ael'. -Executed ast_walk_contexts(); -LOG: lev:2 file:pbx_ael.c line:4494 func: pbx_load_module AEL load process: verified config file name './extensions.ael'. -LOG: lev:4 file:ael2_parse line:543 func: main 7 contexts, 37 extensions, 129 priorities diff --git a/pbx/ael/ael-test/ref.ael-ntest12 b/pbx/ael/ael-test/ref.ael-ntest12 deleted file mode 100644 index 2c7c1ddfc..000000000 --- a/pbx/ael/ael-test/ref.ael-ntest12 +++ /dev/null @@ -1,31 +0,0 @@ - -(If you find progress and other non-error messages irritating, you can use -q to suppress them) - -(You can use the -n option if you aren't interested in seeing all the instructions generated by the compiler) - - -(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: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'. -Executed ast_context_create(conts, name=test1, registrar=pbx_ael); -Executed ast_add_extension2(context=test1, rep=0, exten=771, priority=1, label=(null), callerid=(null), appl=Set, data=i=$[0], FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=test1, rep=0, exten=771, priority=2, label=(null), callerid=(null), appl=GotoIf, data=$[ - ${i} <= 3]?3:6, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=test1, rep=0, exten=771, priority=3, label=(null), callerid=(null), appl=NoOp, data=i is '${i}', FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=test1, rep=0, exten=771, priority=4, label=(null), callerid=(null), appl=Set, data=i=$[ ${i} + 1 ], FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=test1, rep=0, exten=771, priority=5, label=(null), callerid=(null), appl=Goto, data=2, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=test1, rep=0, exten=771, priority=6, label=(null), callerid=(null), appl=NoOp, data=Finish for-test1-1, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=test1, rep=0, exten=772, priority=1, label=(null), callerid=(null), appl=Set, data=i=$[0], FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=test1, rep=0, exten=772, priority=2, label=(null), callerid=(null), appl=GotoIf, data=$[ ${i} <= 3]?3:6, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=test1, rep=0, exten=772, priority=3, label=(null), callerid=(null), appl=NoOp, data=i is '${i}', FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=test1, rep=0, exten=772, priority=4, label=(null), callerid=(null), appl=Set, data=i=$[ ${i} + 1 ], FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=test1, rep=0, exten=772, priority=5, label=(null), callerid=(null), appl=Goto, data=2, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=test1, rep=0, exten=772, priority=6, label=(null), callerid=(null), appl=NoOp, data=Finish for-test1-2, FREE, registrar=pbx_ael); -LOG: lev:2 file:pbx_ael.c line:3823 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'. -Executed ast_merge_contexts_and_delete(); -LOG: lev:2 file:pbx_ael.c line:3826 func: pbx_load_module AEL load process: merged config file name './extensions.ael'. -Executed ast_walk_contexts(); -LOG: lev:2 file:pbx_ael.c line:3829 func: pbx_load_module AEL load process: verified config file name './extensions.ael'. -LOG: lev:4 file:ael2_parse line:479 func: main 1 contexts, 2 extensions, 12 priorities diff --git a/pbx/ael/ael-test/ref.ael-ntest22 b/pbx/ael/ael-test/ref.ael-ntest22 deleted file mode 100644 index 9d2a10717..000000000 --- a/pbx/ael/ael-test/ref.ael-ntest22 +++ /dev/null @@ -1,55 +0,0 @@ - -(If you find progress and other non-error messages irritating, you can use -q to suppress them) - -(You can use the -n option if you aren't interested in seeing all the instructions generated by the compiler) - - -(You can use the -w option to dump extensions.conf format to extensions.conf.aeldump) -LOG: lev:2 file:pbx_ael.c line:4048 func: pbx_load_module Starting AEL load process. -LOG: lev:2 file:pbx_ael.c line:4055 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'. -LOG: lev:2 file:ael.flex line:654 func: setup_filestack --Read in included file ./t1/a.ael, 41 chars -LOG: lev:2 file:ael.flex line:654 func: setup_filestack --Read in included file ./t1/b.ael, 42 chars -LOG: lev:2 file:ael.flex line:654 func: setup_filestack --Read in included file ./t1/c.ael, 106 chars -LOG: lev:2 file:ael.flex line:654 func: setup_filestack --Read in included file ./t2/d.ael, 41 chars -LOG: lev:2 file:ael.flex line:654 func: setup_filestack --Read in included file ./t2/e.ael, 42 chars -LOG: lev:2 file:ael.flex line:654 func: setup_filestack --Read in included file ./t2/f.ael, 82 chars -LOG: lev:2 file:ael.flex line:654 func: setup_filestack --Read in included file ./qq.ael, 45 chars -LOG: lev:2 file:ael.flex line:654 func: setup_filestack --Read in included file ./t3/g.ael, 41 chars -LOG: lev:2 file:ael.flex line:654 func: setup_filestack --Read in included file ./t3/h.ael, 42 chars -LOG: lev:2 file:ael.flex line:654 func: setup_filestack --Read in included file ./t3/i.ael, 41 chars -LOG: lev:2 file:ael.flex line:654 func: setup_filestack --Read in included file ./t3/j.ael, 43 chars -LOG: lev:2 file:pbx_ael.c line:4063 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:4066 func: pbx_load_module AEL load process: checked config file name './extensions.ael'. -Executed ast_context_create(conts, name=a, registrar=pbx_ael); -Executed ast_context_create(conts, name=b, registrar=pbx_ael); -Executed ast_context_create(conts, name=c, registrar=pbx_ael); -Executed ast_context_create(conts, name=d, registrar=pbx_ael); -Executed ast_context_create(conts, name=e, registrar=pbx_ael); -Executed ast_context_create(conts, name=qq, registrar=pbx_ael); -Executed ast_context_create(conts, name=f, registrar=pbx_ael); -Executed ast_context_create(conts, name=g, registrar=pbx_ael); -Executed ast_context_create(conts, name=h, registrar=pbx_ael); -Executed ast_context_create(conts, name=i, registrar=pbx_ael); -Executed ast_context_create(conts, name=j, registrar=pbx_ael); -Executed ast_context_create(conts, name=w, registrar=pbx_ael); -Executed ast_context_create(conts, name=z, registrar=pbx_ael); -Executed ast_add_extension2(context=a, rep=0, exten=134, priority=1, label=(null), callerid=(null), appl=NoOp, data=hi there| a, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=b, rep=0, exten=456, priority=1, label=(null), callerid=(null), appl=NoOp, data=hithere| b, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=c, rep=0, exten=567, priority=1, label=(null), callerid=(null), appl=NoOp, data=hi there| c, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=d, rep=0, exten=134, priority=1, label=(null), callerid=(null), appl=NoOp, data=hi there| d, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=e, rep=0, exten=456, priority=1, label=(null), callerid=(null), appl=NoOp, data=hithere| e, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=qq, rep=0, exten=567, priority=1, label=(null), callerid=(null), appl=NoOp, data=hi there| qq, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=f, rep=0, exten=567, priority=1, label=(null), callerid=(null), appl=NoOp, data=hi there| f, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=g, rep=0, exten=134, priority=1, label=(null), callerid=(null), appl=NoOp, data=hi there| g, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=h, rep=0, exten=456, priority=1, label=(null), callerid=(null), appl=NoOp, data=hithere| h, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=i, rep=0, exten=134, priority=1, label=(null), callerid=(null), appl=NoOp, data=hi there| i, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=j, rep=0, exten=567, priority=1, label=(null), callerid=(null), appl=NoOp, data=hi there| j, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=w, rep=0, exten=890, priority=1, label=(null), callerid=(null), appl=NoOp, data=hi there| w, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=z, rep=0, exten=123, priority=1, label=(null), callerid=(null), appl=NoOp, data=hi there| z, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=z, rep=0, exten=124, priority=1, label=(null), callerid=(null), appl=NoOp, data=hi there| z, FREE, registrar=pbx_ael); -LOG: lev:2 file:pbx_ael.c line:4068 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'. -Executed ast_merge_contexts_and_delete(); -LOG: lev:2 file:pbx_ael.c line:4071 func: pbx_load_module AEL load process: merged config file name './extensions.ael'. -Executed ast_walk_contexts(); -LOG: lev:2 file:pbx_ael.c line:4074 func: pbx_load_module AEL load process: verified config file name './extensions.ael'. -LOG: lev:4 file:ael2_parse line:527 func: main 13 contexts, 13 extensions, 14 priorities diff --git a/pbx/ael/ael-test/ref.ael-ntest23 b/pbx/ael/ael-test/ref.ael-ntest23 deleted file mode 100644 index 5f8f2a872..000000000 --- a/pbx/ael/ael-test/ref.ael-ntest23 +++ /dev/null @@ -1,25 +0,0 @@ - -(If you find progress and other non-error messages irritating, you can use -q to suppress them) - -(You can use the -n option if you aren't interested in seeing all the instructions generated by the compiler) - - -(You can use the -w option to dump extensions.conf format to extensions.conf.aeldump) -LOG: lev:2 file:pbx_ael.c line:4094 func: pbx_load_module Starting AEL load process. -LOG: lev:2 file:pbx_ael.c line:4101 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'. -LOG: lev:2 file:ael.flex line:663 func: setup_filestack --Read in included file ./t1/a.ael, 41 chars -LOG: lev:2 file:ael.flex line:663 func: setup_filestack --Read in included file ./t1/b.ael, 42 chars -LOG: lev:2 file:ael.flex line:663 func: setup_filestack --Read in included file ./t1/c.ael, 110 chars -LOG: lev:4 file:ael.y line:756 func: ael_yyerror ==== File: ./t1/c.ael, Line 3, Cols: 10-10: Error: syntax error, unexpected '(', expecting '{' -LOG: lev:2 file:ael.flex line:663 func: setup_filestack --Read in included file ./t2/d.ael, 41 chars -LOG: lev:2 file:ael.flex line:663 func: setup_filestack --Read in included file ./t2/e.ael, 42 chars -LOG: lev:2 file:ael.flex line:663 func: setup_filestack --Read in included file ./t2/f.ael, 82 chars -LOG: lev:2 file:ael.flex line:663 func: setup_filestack --Read in included file ./qq.ael, 45 chars -LOG: lev:2 file:ael.flex line:663 func: setup_filestack --Read in included file ./t3/g.ael, 41 chars -LOG: lev:2 file:ael.flex line:663 func: setup_filestack --Read in included file ./t3/h.ael, 42 chars -LOG: lev:2 file:ael.flex line:663 func: setup_filestack --Read in included file ./t3/i.ael, 41 chars -LOG: lev:2 file:ael.flex line:663 func: setup_filestack --Read in included file ./t3/j.ael, 43 chars -LOG: lev:4 file:ael.y line:756 func: ael_yyerror ==== File: ./t1/c.ael, Line 10, Cols: 10-10: Error: syntax error, unexpected '(', expecting '{' -LOG: lev:2 file:pbx_ael.c line:4109 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'. -LOG: lev:4 file:pbx_ael.c line:4122 func: pbx_load_module Sorry, but 2 syntax errors and 0 semantic errors were detected. It doesn't make sense to compile. -LOG: lev:4 file:ael2_parse line:543 func: main 0 contexts, 0 extensions, 0 priorities diff --git a/pbx/ael/ael-test/ref.ael-ntest9 b/pbx/ael/ael-test/ref.ael-ntest9 deleted file mode 100644 index 82f1d4220..000000000 --- a/pbx/ael/ael-test/ref.ael-ntest9 +++ /dev/null @@ -1,24 +0,0 @@ - -(If you find progress and other non-error messages irritating, you can use -q to suppress them) - -(You can use the -n option if you aren't interested in seeing all the instructions generated by the compiler) - - -(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: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'. -Executed ast_context_create(conts, name=workext, registrar=pbx_ael); -Executed ast_context_add_ignorepat2(con, value=8, registrar=pbx_ael); -Executed ast_context_add_ignorepat2(con, value=9, registrar=pbx_ael); -Executed ast_add_extension2(context=workext, rep=0, exten=793, priority=1, label=(null), callerid=(null), appl=Set, data=QUERYSTRING=SELECT\ foo\,\ bar\ FROM\ foobar, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=workext, rep=0, exten=793, priority=2, label=(null), callerid=(null), appl=Verbose, data=2|${QUERYSTRING}, FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=workext, rep=0, exten=793, priority=3, label=(null), callerid=(null), appl=Set, data=query=$["SELECT foo\, bar FROM foobar" ], FREE, registrar=pbx_ael); -Executed ast_add_extension2(context=workext, rep=0, exten=793, priority=4, label=(null), callerid=(null), appl=Verbose, data=2|${query}, FREE, registrar=pbx_ael); -LOG: lev:2 file:pbx_ael.c line:3823 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'. -Executed ast_merge_contexts_and_delete(); -LOG: lev:2 file:pbx_ael.c line:3826 func: pbx_load_module AEL load process: merged config file name './extensions.ael'. -Executed ast_walk_contexts(); -LOG: lev:2 file:pbx_ael.c line:3829 func: pbx_load_module AEL load process: verified config file name './extensions.ael'. -LOG: lev:4 file:ael2_parse line:479 func: main 1 contexts, 1 extensions, 4 priorities diff --git a/pbx/ael/ael-test/ref.ael-test1 b/pbx/ael/ael-test/ref.ael-test1 deleted file mode 100644 index 97f8436bb..000000000 --- a/pbx/ael/ael-test/ref.ael-test1 +++ /dev/null @@ -1,15 +0,0 @@ - -(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:4131 func: pbx_load_module Starting AEL load process. -LOG: lev:2 file:pbx_ael.c line:4138 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:4146 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'. -LOG: lev:3 file:pbx_ael.c line:2235 func: check_switch_expr Warning: file ./extensions.ael, line 58-58: A default case was automatically added to the switch. -LOG: lev:3 file:pbx_ael.c line:938 func: check_dow Warning: file ./extensions.ael, line 67-67: The day (m0n) must be one of 'sun', 'mon', 'tue', 'wed', 'thu', 'fri', or 'sat'! -LOG: lev:3 file:pbx_ael.c line:896 func: check_timerange Warning: file ./extensions.ael, line 78-78: The end time (25:00) is out of range! -LOG: lev:2 file:pbx_ael.c line:4149 func: pbx_load_module AEL load process: checked config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:4151 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:4154 func: pbx_load_module AEL load process: merged config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:4157 func: pbx_load_module AEL load process: verified config file name './extensions.ael'. -LOG: lev:4 file:ael2_parse line:543 func: main 5 contexts, 16 extensions, 161 priorities diff --git a/pbx/ael/ael-test/ref.ael-test11 b/pbx/ael/ael-test/ref.ael-test11 deleted file mode 100644 index afccf9775..000000000 --- a/pbx/ael/ael-test/ref.ael-test11 +++ /dev/null @@ -1,14 +0,0 @@ - -(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:3978 func: pbx_load_module Starting AEL load process. -LOG: lev:2 file:pbx_ael.c line:3985 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:3993 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'. -LOG: lev:4 file:pbx_ael.c line:1114 func: check_label Error: file ./extensions.ael, line 13-13: Duplicate label lab1! Previously defined at file ./extensions.ael, line 8. -LOG: lev:3 file:pbx_ael.c line:2234 func: check_switch_expr Warning: file ./extensions.ael, line 32-32: A default case was automatically added to the switch. -LOG: lev:3 file:pbx_ael.c line:2234 func: check_switch_expr Warning: file ./extensions.ael, line 44-44: A default case was automatically added to the switch. -LOG: lev:3 file:pbx_ael.c line:2234 func: check_switch_expr Warning: file ./extensions.ael, line 47-47: A default case was automatically added to the switch. -LOG: lev:4 file:pbx_ael.c line:1114 func: check_label Error: file ./extensions.ael, line 49-49: Duplicate label ptr1! Previously defined at file ./extensions.ael, line 33. -LOG: lev:4 file:pbx_ael.c line:4006 func: pbx_load_module Sorry, but 0 syntax errors and 2 semantic errors were detected. It doesn't make sense to compile. -LOG: lev:4 file:ael2_parse line:523 func: main 0 contexts, 0 extensions, 0 priorities diff --git a/pbx/ael/ael-test/ref.ael-test14 b/pbx/ael/ael-test/ref.ael-test14 deleted file mode 100644 index 0850ecc7c..000000000 --- a/pbx/ael/ael-test/ref.ael-test14 +++ /dev/null @@ -1,12 +0,0 @@ - -(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:3978 func: pbx_load_module Starting AEL load process. -LOG: lev:2 file:pbx_ael.c line:3985 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:3993 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'. -LOG: lev:3 file:pbx_ael.c line:2234 func: check_switch_expr Warning: file ./extensions.ael, line 13-13: A default case was automatically added to the switch. -LOG: lev:4 file:pbx_ael.c line:1086 func: check_continue Error: file ./extensions.ael, line 15-15: 'continue' not in 'for' or 'while' statement! -LOG: lev:4 file:pbx_ael.c line:1067 func: check_break Error: file ./extensions.ael, line 17-17: 'break' not in switch, for, or while statement! -LOG: lev:4 file:pbx_ael.c line:4006 func: pbx_load_module Sorry, but 0 syntax errors and 2 semantic errors were detected. It doesn't make sense to compile. -LOG: lev:4 file:ael2_parse line:523 func: main 0 contexts, 0 extensions, 0 priorities diff --git a/pbx/ael/ael-test/ref.ael-test15 b/pbx/ael/ael-test/ref.ael-test15 deleted file mode 100644 index f56b37b21..000000000 --- a/pbx/ael/ael-test/ref.ael-test15 +++ /dev/null @@ -1,12 +0,0 @@ - -(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:4131 func: pbx_load_module Starting AEL load process. -LOG: lev:2 file:pbx_ael.c line:4138 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:4146 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:4149 func: pbx_load_module AEL load process: checked config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:4151 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:4154 func: pbx_load_module AEL load process: merged config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:4157 func: pbx_load_module AEL load process: verified config file name './extensions.ael'. -LOG: lev:4 file:ael2_parse line:543 func: main 1 contexts, 0 extensions, 0 priorities diff --git a/pbx/ael/ael-test/ref.ael-test16 b/pbx/ael/ael-test/ref.ael-test16 deleted file mode 100644 index 3113b0d6c..000000000 --- a/pbx/ael/ael-test/ref.ael-test16 +++ /dev/null @@ -1,13 +0,0 @@ - -(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:4090 func: pbx_load_module Starting AEL load process. -LOG: lev:2 file:pbx_ael.c line:4097 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:4105 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:4108 func: pbx_load_module AEL load process: checked config file name './extensions.ael'. -LOG: lev:3 file:pbx_ael.c line:3685 func: add_extensions This file is Empty! -LOG: lev:2 file:pbx_ael.c line:4110 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:4113 func: pbx_load_module AEL load process: merged config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:4116 func: pbx_load_module AEL load process: verified config file name './extensions.ael'. -LOG: lev:4 file:ael2_parse line:543 func: main 1 contexts, 0 extensions, 0 priorities diff --git a/pbx/ael/ael-test/ref.ael-test18 b/pbx/ael/ael-test/ref.ael-test18 deleted file mode 100644 index dc5bc31fc..000000000 --- a/pbx/ael/ael-test/ref.ael-test18 +++ /dev/null @@ -1,12 +0,0 @@ - -(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:4468 func: pbx_load_module Starting AEL load process. -LOG: lev:2 file:pbx_ael.c line:4475 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:4483 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:4486 func: pbx_load_module AEL load process: checked config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:4488 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:4491 func: pbx_load_module AEL load process: merged config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:4494 func: pbx_load_module AEL load process: verified config file name './extensions.ael'. -LOG: lev:4 file:ael2_parse line:543 func: main 1 contexts, 7 extensions, 28 priorities diff --git a/pbx/ael/ael-test/ref.ael-test19 b/pbx/ael/ael-test/ref.ael-test19 deleted file mode 100644 index c67dbe7c1..000000000 --- a/pbx/ael/ael-test/ref.ael-test19 +++ /dev/null @@ -1,14 +0,0 @@ - -(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:4090 func: pbx_load_module Starting AEL load process. -LOG: lev:2 file:pbx_ael.c line:4097 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:4105 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'. -LOG: lev:4 file:pbx_ael.c line:2250 func: check_context_names Error: file ./extensions.ael, line 49-62: The context name (incoming) is also declared in file ./extensions.ael, line 62-69! (and neither is marked 'extend') -LOG: lev:3 file:pbx_ael.c line:2234 func: check_switch_expr Warning: file ./extensions.ael, line 245-246: A default case was automatically added to the switch. -LOG: lev:3 file:pbx_ael.c line:2347 func: check_pval_item Warning: file ./extensions.ael, line 312-312: macro call to non-existent funcA ! Hopefully it is present in extensions.conf! -LOG: lev:3 file:pbx_ael.c line:2347 func: check_pval_item Warning: file ./extensions.ael, line 313-313: macro call to non-existent funcD ! Hopefully it is present in extensions.conf! -LOG: lev:3 file:pbx_ael.c line:1287 func: check_goto Warning: file ./extensions.ael, line 319-319: goto: no context test5 could be found that matches the goto target! -LOG: lev:4 file:pbx_ael.c line:4118 func: pbx_load_module Sorry, but 0 syntax errors and 1 semantic errors were detected. It doesn't make sense to compile. -LOG: lev:4 file:ael2_parse line:543 func: main 0 contexts, 0 extensions, 0 priorities diff --git a/pbx/ael/ael-test/ref.ael-test2 b/pbx/ael/ael-test/ref.ael-test2 deleted file mode 100644 index e539f1dc9..000000000 --- a/pbx/ael/ael-test/ref.ael-test2 +++ /dev/null @@ -1,21 +0,0 @@ - -(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:4048 func: pbx_load_module Starting AEL load process. -LOG: lev:2 file:pbx_ael.c line:4055 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'. -LOG: lev:2 file:ael.flex line:654 func: setup_filestack --Read in included file ./apptest.ael2, 3474 chars -LOG: lev:3 file:ael.y line:529 func: ael_yyparse ==== File: ./apptest.ael2, Line 46, Cols: 8-11: Suggestion: Use the goto statement instead of the Goto() application call in AEL. -LOG: lev:2 file:pbx_ael.c line:4063 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'. -LOG: lev:3 file:pbx_ael.c line:2392 func: check_pval_item Warning: file ./apptest.ael2, line 35-35: application call to EndWhile needs to be re-written using AEL if, while, goto, etc. keywords instead! -LOG: lev:3 file:pbx_ael.c line:2392 func: check_pval_item Warning: file ./apptest.ael2, line 37-37: application call to ExecIf needs to be re-written using AEL if, while, goto, etc. keywords instead! -LOG: lev:3 file:pbx_ael.c line:1287 func: check_goto Warning: file ./apptest.ael2, line 46-46: goto: no context cont could be found that matches the goto target! -LOG: lev:3 file:pbx_ael.c line:2392 func: check_pval_item Warning: file ./apptest.ael2, line 47-47: application call to GotoIf needs to be re-written using AEL if, while, goto, etc. keywords instead! -LOG: lev:3 file:pbx_ael.c line:2392 func: check_pval_item Warning: file ./apptest.ael2, line 48-48: application call to GotoIfTime needs to be re-written using AEL if, while, goto, etc. keywords instead! -LOG: lev:3 file:pbx_ael.c line:2392 func: check_pval_item Warning: file ./apptest.ael2, line 85-85: application call to Random needs to be re-written using AEL if, while, goto, etc. keywords instead! -LOG: lev:3 file:pbx_ael.c line:2392 func: check_pval_item Warning: file ./apptest.ael2, line 141-141: application call to While needs to be re-written using AEL if, while, goto, etc. keywords instead! -LOG: lev:2 file:pbx_ael.c line:4066 func: pbx_load_module AEL load process: checked config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:4068 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:4071 func: pbx_load_module AEL load process: merged config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:4074 func: pbx_load_module AEL load process: verified config file name './extensions.ael'. -LOG: lev:4 file:ael2_parse line:527 func: main 1 contexts, 1 extensions, 142 priorities diff --git a/pbx/ael/ael-test/ref.ael-test20 b/pbx/ael/ael-test/ref.ael-test20 deleted file mode 100644 index 5b424e8ae..000000000 --- a/pbx/ael/ael-test/ref.ael-test20 +++ /dev/null @@ -1,12 +0,0 @@ - -(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:3915 func: pbx_load_module Starting AEL load process. -LOG: lev:2 file:pbx_ael.c line:3922 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:3930 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:3933 func: pbx_load_module AEL load process: checked config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:3935 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:3938 func: pbx_load_module AEL load process: merged config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:3941 func: pbx_load_module AEL load process: verified config file name './extensions.ael'. -LOG: lev:4 file:ael2_parse line:512 func: main 1 contexts, 1 extensions, 1 priorities diff --git a/pbx/ael/ael-test/ref.ael-test3 b/pbx/ael/ael-test/ref.ael-test3 deleted file mode 100644 index 86fcc3478..000000000 --- a/pbx/ael/ael-test/ref.ael-test3 +++ /dev/null @@ -1,18 +0,0 @@ - -(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:4131 func: pbx_load_module Starting AEL load process. -LOG: lev:2 file:pbx_ael.c line:4138 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'. -LOG: lev:2 file:ael.flex line:663 func: setup_filestack --Read in included file ./include1.ael2, 78 chars -LOG: lev:2 file:ael.flex line:663 func: setup_filestack --Read in included file ./include2.ael2, 98 chars -LOG: lev:2 file:ael.flex line:663 func: setup_filestack --Read in included file ./include3.ael2, 57 chars -LOG: lev:2 file:ael.flex line:663 func: setup_filestack --Read in included file ./include5.ael2, 56 chars -LOG: lev:2 file:ael.flex line:663 func: setup_filestack --Read in included file ./include4.ael2, 87 chars -LOG: lev:2 file:ael.flex line:663 func: setup_filestack --Read in included file ./telemarket_torture.ael2, 28036 chars -LOG: lev:2 file:pbx_ael.c line:4146 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:4149 func: pbx_load_module AEL load process: checked config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:4151 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:4154 func: pbx_load_module AEL load process: merged config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:4157 func: pbx_load_module AEL load process: verified config file name './extensions.ael'. -LOG: lev:4 file:ael2_parse line:543 func: main 172 contexts, 934 extensions, 2478 priorities diff --git a/pbx/ael/ael-test/ref.ael-test4 b/pbx/ael/ael-test/ref.ael-test4 deleted file mode 100644 index e539f1dc9..000000000 --- a/pbx/ael/ael-test/ref.ael-test4 +++ /dev/null @@ -1,21 +0,0 @@ - -(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:4048 func: pbx_load_module Starting AEL load process. -LOG: lev:2 file:pbx_ael.c line:4055 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'. -LOG: lev:2 file:ael.flex line:654 func: setup_filestack --Read in included file ./apptest.ael2, 3474 chars -LOG: lev:3 file:ael.y line:529 func: ael_yyparse ==== File: ./apptest.ael2, Line 46, Cols: 8-11: Suggestion: Use the goto statement instead of the Goto() application call in AEL. -LOG: lev:2 file:pbx_ael.c line:4063 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'. -LOG: lev:3 file:pbx_ael.c line:2392 func: check_pval_item Warning: file ./apptest.ael2, line 35-35: application call to EndWhile needs to be re-written using AEL if, while, goto, etc. keywords instead! -LOG: lev:3 file:pbx_ael.c line:2392 func: check_pval_item Warning: file ./apptest.ael2, line 37-37: application call to ExecIf needs to be re-written using AEL if, while, goto, etc. keywords instead! -LOG: lev:3 file:pbx_ael.c line:1287 func: check_goto Warning: file ./apptest.ael2, line 46-46: goto: no context cont could be found that matches the goto target! -LOG: lev:3 file:pbx_ael.c line:2392 func: check_pval_item Warning: file ./apptest.ael2, line 47-47: application call to GotoIf needs to be re-written using AEL if, while, goto, etc. keywords instead! -LOG: lev:3 file:pbx_ael.c line:2392 func: check_pval_item Warning: file ./apptest.ael2, line 48-48: application call to GotoIfTime needs to be re-written using AEL if, while, goto, etc. keywords instead! -LOG: lev:3 file:pbx_ael.c line:2392 func: check_pval_item Warning: file ./apptest.ael2, line 85-85: application call to Random needs to be re-written using AEL if, while, goto, etc. keywords instead! -LOG: lev:3 file:pbx_ael.c line:2392 func: check_pval_item Warning: file ./apptest.ael2, line 141-141: application call to While needs to be re-written using AEL if, while, goto, etc. keywords instead! -LOG: lev:2 file:pbx_ael.c line:4066 func: pbx_load_module AEL load process: checked config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:4068 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:4071 func: pbx_load_module AEL load process: merged config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:4074 func: pbx_load_module AEL load process: verified config file name './extensions.ael'. -LOG: lev:4 file:ael2_parse line:527 func: main 1 contexts, 1 extensions, 142 priorities diff --git a/pbx/ael/ael-test/ref.ael-test5 b/pbx/ael/ael-test/ref.ael-test5 deleted file mode 100644 index 2ddb29c2b..000000000 --- a/pbx/ael/ael-test/ref.ael-test5 +++ /dev/null @@ -1,12 +0,0 @@ - -(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:4131 func: pbx_load_module Starting AEL load process. -LOG: lev:2 file:pbx_ael.c line:4138 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:4146 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:4149 func: pbx_load_module AEL load process: checked config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:4151 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:4154 func: pbx_load_module AEL load process: merged config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:4157 func: pbx_load_module AEL load process: verified config file name './extensions.ael'. -LOG: lev:4 file:ael2_parse line:543 func: main 38 contexts, 91 extensions, 486 priorities diff --git a/pbx/ael/ael-test/ref.ael-test6 b/pbx/ael/ael-test/ref.ael-test6 deleted file mode 100644 index 3965fa4da..000000000 --- a/pbx/ael/ael-test/ref.ael-test6 +++ /dev/null @@ -1,16 +0,0 @@ - -(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:4468 func: pbx_load_module Starting AEL load process. -LOG: lev:2 file:pbx_ael.c line:4475 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'. -LOG: lev:4 file:ael.flex line:429 func: ael_yylex File=./extensions.ael, line=165, column=49: Mismatched '}' in expression! -LOG: lev:4 file:ael.y line:756 func: ael_yyerror ==== File: ./extensions.ael, Line 165, Cols: 52-52: Error: syntax error, unexpected '=', expecting ')' -LOG: lev:4 file:ael.flex line:429 func: ael_yylex File=./extensions.ael, line=174, column=49: Mismatched '}' in expression! -LOG: lev:4 file:ael.y line:756 func: ael_yyerror ==== File: ./extensions.ael, Line 174, Cols: 52-52: Error: syntax error, unexpected '=', expecting ')' -LOG: lev:4 file:ael.flex line:429 func: ael_yylex File=./extensions.ael, line=222, column=41: Mismatched '}' in expression! -LOG: lev:4 file:ael.y line:756 func: ael_yyerror ==== File: ./extensions.ael, Line 222, Cols: 44-44: Error: syntax error, unexpected '=', expecting ')' -LOG: lev:4 file:ael.y line:756 func: ael_yyerror ==== File: ./extensions.ael, Line 291, Cols: 22-33: Error: syntax error, unexpected word, expecting '(' or ';' or '=' or ':' -LOG: lev:2 file:pbx_ael.c line:4483 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'. -LOG: lev:4 file:pbx_ael.c line:4496 func: pbx_load_module Sorry, but 4 syntax errors and 0 semantic errors were detected. It doesn't make sense to compile. -LOG: lev:4 file:ael2_parse line:543 func: main 0 contexts, 0 extensions, 0 priorities diff --git a/pbx/ael/ael-test/ref.ael-test7 b/pbx/ael/ael-test/ref.ael-test7 deleted file mode 100644 index 0508b69ae..000000000 --- a/pbx/ael/ael-test/ref.ael-test7 +++ /dev/null @@ -1,14 +0,0 @@ - -(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:3915 func: pbx_load_module Starting AEL load process. -LOG: lev:2 file:pbx_ael.c line:3922 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:3930 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'. -LOG: lev:4 file:pbx_ael.c line:2339 func: check_pval_item Error: file ./extensions.ael, line 98-98: The macro call to checkanddial has 5 arguments, but the macro definition has 7 arguments -LOG: lev:4 file:pbx_ael.c line:2339 func: check_pval_item Error: file ./extensions.ael, line 107-107: The macro call to checkanddial has 5 arguments, but the macro definition has 7 arguments -LOG: lev:4 file:pbx_ael.c line:2339 func: check_pval_item Error: file ./extensions.ael, line 284-284: The macro call to checkanddial has 5 arguments, but the macro definition has 7 arguments -LOG: lev:4 file:pbx_ael.c line:2339 func: check_pval_item Error: file ./extensions.ael, line 287-287: The macro call to checkanddial has 5 arguments, but the macro definition has 7 arguments -LOG: lev:3 file:pbx_ael.c line:2320 func: check_pval_item Warning: file ./extensions.ael, line 452-452: macro call to non-existent std-exten-ael ! Hopefully it is present in extensions.conf! -LOG: lev:4 file:pbx_ael.c line:3943 func: pbx_load_module Sorry, but 0 syntax errors and 4 semantic errors were detected. It doesn't make sense to compile. -LOG: lev:4 file:ael2_parse line:512 func: main 0 contexts, 0 extensions, 0 priorities diff --git a/pbx/ael/ael-test/ref.ael-test8 b/pbx/ael/ael-test/ref.ael-test8 deleted file mode 100644 index fba8ed155..000000000 --- a/pbx/ael/ael-test/ref.ael-test8 +++ /dev/null @@ -1,12 +0,0 @@ - -(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:4468 func: pbx_load_module Starting AEL load process. -LOG: lev:2 file:pbx_ael.c line:4475 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:4483 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:4486 func: pbx_load_module AEL load process: checked config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:4488 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:4491 func: pbx_load_module AEL load process: merged config file name './extensions.ael'. -LOG: lev:2 file:pbx_ael.c line:4494 func: pbx_load_module AEL load process: verified config file name './extensions.ael'. -LOG: lev:4 file:ael2_parse line:543 func: main 1 contexts, 7 extensions, 18 priorities diff --git a/pbx/ael/ael-test/ref.ael-vtest13 b/pbx/ael/ael-test/ref.ael-vtest13 deleted file mode 100644 index e3adb8a43..000000000 --- a/pbx/ael/ael-test/ref.ael-vtest13 +++ /dev/null @@ -1,3027 +0,0 @@ -[globals] -static=yes -writeprotect=yes -CONSOLE=Console/dsp -IAXINFO=murf:tlhfckoct -FWDNUMBER=544788 -FWDCIDNAME="Joe-Worker" -FWDPASSWORD=zingledoodle -FWDRINGS=Zap/6 -FWDVMBOX=1 - - -[macro-std-exten] -exten => s,1,Set(ext=${ARG1}) -exten => s,2,Set(dev=${ARG2}) -exten => s,3,Set(~~EXTEN~~=${EXTEN}) -exten => s,4,Dial(${dev}/${ext}|20) -exten => s,5,Goto(sw-1-${DIALSTATUS}|10) -exten => s,6,NoOp(Finish switch-std-exten-1) -exten => a,1,VoiceMailMain(${ext}) -exten => _sw-1-.,10,Voicemail(u${ext}) -exten => _sw-1-.,11,Goto(s|6) -exten => sw-1-,10,Goto(sw-1-.|10) -exten => sw-1-ANSWER,10,Goto(s|6) -exten => sw-1-NOANSWER,10,Voicemail(u${ext}) -exten => sw-1-NOANSWER,11,Goto(s|6) -exten => sw-1-BUSY,10,Voicemail(b${ext}) -exten => sw-1-BUSY,11,Goto(s|6) - - -[macro-std-priv-exten_1] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-3-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_1-3) -exten => _sw-3-.,10,Voicemail(u${ext}) -exten => _sw-3-.,11,Goto(s|11) -exten => sw-3-,10,Goto(sw-3-.|10) -exten => sw-3-NOANSWER,10,Voicemail(u${ext}) -exten => sw-3-NOANSWER,11,Goto(s|11) -exten => sw-3-ANSWER,10,Goto(s|11) -exten => sw-3-BUSY,10,Voicemail(b${ext}) -exten => sw-3-BUSY,11,Goto(s|11) -exten => sw-3-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-3-DONTCALL,11,Goto(s|11) -exten => sw-3-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-3-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_2] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-4-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_2-4) -exten => _sw-4-.,10,Voicemail(u${ext}) -exten => _sw-4-.,11,Goto(s|11) -exten => sw-4-,10,Goto(sw-4-.|10) -exten => sw-4-NOANSWER,10,Voicemail(u${ext}) -exten => sw-4-NOANSWER,11,Goto(s|11) -exten => sw-4-ANSWER,10,Goto(s|11) -exten => sw-4-BUSY,10,Voicemail(b${ext}) -exten => sw-4-BUSY,11,Goto(s|11) -exten => sw-4-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-4-DONTCALL,11,Goto(s|11) -exten => sw-4-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-4-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_3] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-5-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_3-5) -exten => _sw-5-.,10,Voicemail(u${ext}) -exten => _sw-5-.,11,Goto(s|11) -exten => sw-5-,10,Goto(sw-5-.|10) -exten => sw-5-NOANSWER,10,Voicemail(u${ext}) -exten => sw-5-NOANSWER,11,Goto(s|11) -exten => sw-5-ANSWER,10,Goto(s|11) -exten => sw-5-BUSY,10,Voicemail(b${ext}) -exten => sw-5-BUSY,11,Goto(s|11) -exten => sw-5-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-5-DONTCALL,11,Goto(s|11) -exten => sw-5-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-5-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_4] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-6-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_4-6) -exten => _sw-6-.,10,Voicemail(u${ext}) -exten => _sw-6-.,11,Goto(s|11) -exten => sw-6-,10,Goto(sw-6-.|10) -exten => sw-6-NOANSWER,10,Voicemail(u${ext}) -exten => sw-6-NOANSWER,11,Goto(s|11) -exten => sw-6-ANSWER,10,Goto(s|11) -exten => sw-6-BUSY,10,Voicemail(b${ext}) -exten => sw-6-BUSY,11,Goto(s|11) -exten => sw-6-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-6-DONTCALL,11,Goto(s|11) -exten => sw-6-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-6-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_5] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-7-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_5-7) -exten => _sw-7-.,10,Voicemail(u${ext}) -exten => _sw-7-.,11,Goto(s|11) -exten => sw-7-,10,Goto(sw-7-.|10) -exten => sw-7-NOANSWER,10,Voicemail(u${ext}) -exten => sw-7-NOANSWER,11,Goto(s|11) -exten => sw-7-ANSWER,10,Goto(s|11) -exten => sw-7-BUSY,10,Voicemail(b${ext}) -exten => sw-7-BUSY,11,Goto(s|11) -exten => sw-7-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-7-DONTCALL,11,Goto(s|11) -exten => sw-7-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-7-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_6] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-8-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_6-8) -exten => _sw-8-.,10,Voicemail(u${ext}) -exten => _sw-8-.,11,Goto(s|11) -exten => sw-8-,10,Goto(sw-8-.|10) -exten => sw-8-NOANSWER,10,Voicemail(u${ext}) -exten => sw-8-NOANSWER,11,Goto(s|11) -exten => sw-8-ANSWER,10,Goto(s|11) -exten => sw-8-BUSY,10,Voicemail(b${ext}) -exten => sw-8-BUSY,11,Goto(s|11) -exten => sw-8-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-8-DONTCALL,11,Goto(s|11) -exten => sw-8-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-8-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_7] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-9-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_7-9) -exten => _sw-9-.,10,Voicemail(u${ext}) -exten => _sw-9-.,11,Goto(s|11) -exten => sw-9-,10,Goto(sw-9-.|10) -exten => sw-9-NOANSWER,10,Voicemail(u${ext}) -exten => sw-9-NOANSWER,11,Goto(s|11) -exten => sw-9-ANSWER,10,Goto(s|11) -exten => sw-9-BUSY,10,Voicemail(b${ext}) -exten => sw-9-BUSY,11,Goto(s|11) -exten => sw-9-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-9-DONTCALL,11,Goto(s|11) -exten => sw-9-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-9-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_8] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-10-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_8-10) -exten => _sw-10-.,10,Voicemail(u${ext}) -exten => _sw-10-.,11,Goto(s|11) -exten => sw-10-,10,Goto(sw-10-.|10) -exten => sw-10-NOANSWER,10,Voicemail(u${ext}) -exten => sw-10-NOANSWER,11,Goto(s|11) -exten => sw-10-ANSWER,10,Goto(s|11) -exten => sw-10-BUSY,10,Voicemail(b${ext}) -exten => sw-10-BUSY,11,Goto(s|11) -exten => sw-10-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-10-DONTCALL,11,Goto(s|11) -exten => sw-10-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-10-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_9] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-11-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_9-11) -exten => _sw-11-.,10,Voicemail(u${ext}) -exten => _sw-11-.,11,Goto(s|11) -exten => sw-11-,10,Goto(sw-11-.|10) -exten => sw-11-NOANSWER,10,Voicemail(u${ext}) -exten => sw-11-NOANSWER,11,Goto(s|11) -exten => sw-11-ANSWER,10,Goto(s|11) -exten => sw-11-BUSY,10,Voicemail(b${ext}) -exten => sw-11-BUSY,11,Goto(s|11) -exten => sw-11-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-11-DONTCALL,11,Goto(s|11) -exten => sw-11-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-11-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_10] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-12-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_10-12) -exten => _sw-12-.,10,Voicemail(u${ext}) -exten => _sw-12-.,11,Goto(s|11) -exten => sw-12-,10,Goto(sw-12-.|10) -exten => sw-12-NOANSWER,10,Voicemail(u${ext}) -exten => sw-12-NOANSWER,11,Goto(s|11) -exten => sw-12-ANSWER,10,Goto(s|11) -exten => sw-12-BUSY,10,Voicemail(b${ext}) -exten => sw-12-BUSY,11,Goto(s|11) -exten => sw-12-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-12-DONTCALL,11,Goto(s|11) -exten => sw-12-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-12-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_11] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-13-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_11-13) -exten => _sw-13-.,10,Voicemail(u${ext}) -exten => _sw-13-.,11,Goto(s|11) -exten => sw-13-,10,Goto(sw-13-.|10) -exten => sw-13-NOANSWER,10,Voicemail(u${ext}) -exten => sw-13-NOANSWER,11,Goto(s|11) -exten => sw-13-ANSWER,10,Goto(s|11) -exten => sw-13-BUSY,10,Voicemail(b${ext}) -exten => sw-13-BUSY,11,Goto(s|11) -exten => sw-13-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-13-DONTCALL,11,Goto(s|11) -exten => sw-13-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-13-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_12] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-14-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_12-14) -exten => _sw-14-.,10,Voicemail(u${ext}) -exten => _sw-14-.,11,Goto(s|11) -exten => sw-14-,10,Goto(sw-14-.|10) -exten => sw-14-NOANSWER,10,Voicemail(u${ext}) -exten => sw-14-NOANSWER,11,Goto(s|11) -exten => sw-14-ANSWER,10,Goto(s|11) -exten => sw-14-BUSY,10,Voicemail(b${ext}) -exten => sw-14-BUSY,11,Goto(s|11) -exten => sw-14-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-14-DONTCALL,11,Goto(s|11) -exten => sw-14-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-14-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_13] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-15-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_13-15) -exten => _sw-15-.,10,Voicemail(u${ext}) -exten => _sw-15-.,11,Goto(s|11) -exten => sw-15-,10,Goto(sw-15-.|10) -exten => sw-15-NOANSWER,10,Voicemail(u${ext}) -exten => sw-15-NOANSWER,11,Goto(s|11) -exten => sw-15-ANSWER,10,Goto(s|11) -exten => sw-15-BUSY,10,Voicemail(b${ext}) -exten => sw-15-BUSY,11,Goto(s|11) -exten => sw-15-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-15-DONTCALL,11,Goto(s|11) -exten => sw-15-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-15-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_14] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-16-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_14-16) -exten => _sw-16-.,10,Voicemail(u${ext}) -exten => _sw-16-.,11,Goto(s|11) -exten => sw-16-,10,Goto(sw-16-.|10) -exten => sw-16-NOANSWER,10,Voicemail(u${ext}) -exten => sw-16-NOANSWER,11,Goto(s|11) -exten => sw-16-ANSWER,10,Goto(s|11) -exten => sw-16-BUSY,10,Voicemail(b${ext}) -exten => sw-16-BUSY,11,Goto(s|11) -exten => sw-16-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-16-DONTCALL,11,Goto(s|11) -exten => sw-16-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-16-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_15] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-17-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_15-17) -exten => _sw-17-.,10,Voicemail(u${ext}) -exten => _sw-17-.,11,Goto(s|11) -exten => sw-17-,10,Goto(sw-17-.|10) -exten => sw-17-NOANSWER,10,Voicemail(u${ext}) -exten => sw-17-NOANSWER,11,Goto(s|11) -exten => sw-17-ANSWER,10,Goto(s|11) -exten => sw-17-BUSY,10,Voicemail(b${ext}) -exten => sw-17-BUSY,11,Goto(s|11) -exten => sw-17-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-17-DONTCALL,11,Goto(s|11) -exten => sw-17-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-17-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_16] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-18-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_16-18) -exten => _sw-18-.,10,Voicemail(u${ext}) -exten => _sw-18-.,11,Goto(s|11) -exten => sw-18-,10,Goto(sw-18-.|10) -exten => sw-18-NOANSWER,10,Voicemail(u${ext}) -exten => sw-18-NOANSWER,11,Goto(s|11) -exten => sw-18-ANSWER,10,Goto(s|11) -exten => sw-18-BUSY,10,Voicemail(b${ext}) -exten => sw-18-BUSY,11,Goto(s|11) -exten => sw-18-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-18-DONTCALL,11,Goto(s|11) -exten => sw-18-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-18-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_17] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-19-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_17-19) -exten => _sw-19-.,10,Voicemail(u${ext}) -exten => _sw-19-.,11,Goto(s|11) -exten => sw-19-,10,Goto(sw-19-.|10) -exten => sw-19-NOANSWER,10,Voicemail(u${ext}) -exten => sw-19-NOANSWER,11,Goto(s|11) -exten => sw-19-ANSWER,10,Goto(s|11) -exten => sw-19-BUSY,10,Voicemail(b${ext}) -exten => sw-19-BUSY,11,Goto(s|11) -exten => sw-19-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-19-DONTCALL,11,Goto(s|11) -exten => sw-19-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-19-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_18] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-20-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_18-20) -exten => _sw-20-.,10,Voicemail(u${ext}) -exten => _sw-20-.,11,Goto(s|11) -exten => sw-20-,10,Goto(sw-20-.|10) -exten => sw-20-NOANSWER,10,Voicemail(u${ext}) -exten => sw-20-NOANSWER,11,Goto(s|11) -exten => sw-20-ANSWER,10,Goto(s|11) -exten => sw-20-BUSY,10,Voicemail(b${ext}) -exten => sw-20-BUSY,11,Goto(s|11) -exten => sw-20-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-20-DONTCALL,11,Goto(s|11) -exten => sw-20-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-20-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_19] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-21-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_19-21) -exten => _sw-21-.,10,Voicemail(u${ext}) -exten => _sw-21-.,11,Goto(s|11) -exten => sw-21-,10,Goto(sw-21-.|10) -exten => sw-21-NOANSWER,10,Voicemail(u${ext}) -exten => sw-21-NOANSWER,11,Goto(s|11) -exten => sw-21-ANSWER,10,Goto(s|11) -exten => sw-21-BUSY,10,Voicemail(b${ext}) -exten => sw-21-BUSY,11,Goto(s|11) -exten => sw-21-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-21-DONTCALL,11,Goto(s|11) -exten => sw-21-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-21-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_20] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-22-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_20-22) -exten => _sw-22-.,10,Voicemail(u${ext}) -exten => _sw-22-.,11,Goto(s|11) -exten => sw-22-,10,Goto(sw-22-.|10) -exten => sw-22-NOANSWER,10,Voicemail(u${ext}) -exten => sw-22-NOANSWER,11,Goto(s|11) -exten => sw-22-ANSWER,10,Goto(s|11) -exten => sw-22-BUSY,10,Voicemail(b${ext}) -exten => sw-22-BUSY,11,Goto(s|11) -exten => sw-22-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-22-DONTCALL,11,Goto(s|11) -exten => sw-22-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-22-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_21] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-23-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_21-23) -exten => _sw-23-.,10,Voicemail(u${ext}) -exten => _sw-23-.,11,Goto(s|11) -exten => sw-23-,10,Goto(sw-23-.|10) -exten => sw-23-NOANSWER,10,Voicemail(u${ext}) -exten => sw-23-NOANSWER,11,Goto(s|11) -exten => sw-23-ANSWER,10,Goto(s|11) -exten => sw-23-BUSY,10,Voicemail(b${ext}) -exten => sw-23-BUSY,11,Goto(s|11) -exten => sw-23-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-23-DONTCALL,11,Goto(s|11) -exten => sw-23-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-23-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_22] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-24-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_22-24) -exten => _sw-24-.,10,Voicemail(u${ext}) -exten => _sw-24-.,11,Goto(s|11) -exten => sw-24-,10,Goto(sw-24-.|10) -exten => sw-24-NOANSWER,10,Voicemail(u${ext}) -exten => sw-24-NOANSWER,11,Goto(s|11) -exten => sw-24-ANSWER,10,Goto(s|11) -exten => sw-24-BUSY,10,Voicemail(b${ext}) -exten => sw-24-BUSY,11,Goto(s|11) -exten => sw-24-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-24-DONTCALL,11,Goto(s|11) -exten => sw-24-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-24-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_23] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-25-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_23-25) -exten => _sw-25-.,10,Voicemail(u${ext}) -exten => _sw-25-.,11,Goto(s|11) -exten => sw-25-,10,Goto(sw-25-.|10) -exten => sw-25-NOANSWER,10,Voicemail(u${ext}) -exten => sw-25-NOANSWER,11,Goto(s|11) -exten => sw-25-ANSWER,10,Goto(s|11) -exten => sw-25-BUSY,10,Voicemail(b${ext}) -exten => sw-25-BUSY,11,Goto(s|11) -exten => sw-25-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-25-DONTCALL,11,Goto(s|11) -exten => sw-25-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-25-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_24] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-26-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_24-26) -exten => _sw-26-.,10,Voicemail(u${ext}) -exten => _sw-26-.,11,Goto(s|11) -exten => sw-26-,10,Goto(sw-26-.|10) -exten => sw-26-NOANSWER,10,Voicemail(u${ext}) -exten => sw-26-NOANSWER,11,Goto(s|11) -exten => sw-26-ANSWER,10,Goto(s|11) -exten => sw-26-BUSY,10,Voicemail(b${ext}) -exten => sw-26-BUSY,11,Goto(s|11) -exten => sw-26-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-26-DONTCALL,11,Goto(s|11) -exten => sw-26-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-26-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_25] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-27-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_25-27) -exten => _sw-27-.,10,Voicemail(u${ext}) -exten => _sw-27-.,11,Goto(s|11) -exten => sw-27-,10,Goto(sw-27-.|10) -exten => sw-27-NOANSWER,10,Voicemail(u${ext}) -exten => sw-27-NOANSWER,11,Goto(s|11) -exten => sw-27-ANSWER,10,Goto(s|11) -exten => sw-27-BUSY,10,Voicemail(b${ext}) -exten => sw-27-BUSY,11,Goto(s|11) -exten => sw-27-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-27-DONTCALL,11,Goto(s|11) -exten => sw-27-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-27-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_26] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-28-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_26-28) -exten => _sw-28-.,10,Voicemail(u${ext}) -exten => _sw-28-.,11,Goto(s|11) -exten => sw-28-,10,Goto(sw-28-.|10) -exten => sw-28-NOANSWER,10,Voicemail(u${ext}) -exten => sw-28-NOANSWER,11,Goto(s|11) -exten => sw-28-ANSWER,10,Goto(s|11) -exten => sw-28-BUSY,10,Voicemail(b${ext}) -exten => sw-28-BUSY,11,Goto(s|11) -exten => sw-28-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-28-DONTCALL,11,Goto(s|11) -exten => sw-28-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-28-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_27] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-29-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_27-29) -exten => _sw-29-.,10,Voicemail(u${ext}) -exten => _sw-29-.,11,Goto(s|11) -exten => sw-29-,10,Goto(sw-29-.|10) -exten => sw-29-NOANSWER,10,Voicemail(u${ext}) -exten => sw-29-NOANSWER,11,Goto(s|11) -exten => sw-29-ANSWER,10,Goto(s|11) -exten => sw-29-BUSY,10,Voicemail(b${ext}) -exten => sw-29-BUSY,11,Goto(s|11) -exten => sw-29-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-29-DONTCALL,11,Goto(s|11) -exten => sw-29-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-29-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_28] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-30-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_28-30) -exten => _sw-30-.,10,Voicemail(u${ext}) -exten => _sw-30-.,11,Goto(s|11) -exten => sw-30-,10,Goto(sw-30-.|10) -exten => sw-30-NOANSWER,10,Voicemail(u${ext}) -exten => sw-30-NOANSWER,11,Goto(s|11) -exten => sw-30-ANSWER,10,Goto(s|11) -exten => sw-30-BUSY,10,Voicemail(b${ext}) -exten => sw-30-BUSY,11,Goto(s|11) -exten => sw-30-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-30-DONTCALL,11,Goto(s|11) -exten => sw-30-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-30-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_29] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-31-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_29-31) -exten => _sw-31-.,10,Voicemail(u${ext}) -exten => _sw-31-.,11,Goto(s|11) -exten => sw-31-,10,Goto(sw-31-.|10) -exten => sw-31-NOANSWER,10,Voicemail(u${ext}) -exten => sw-31-NOANSWER,11,Goto(s|11) -exten => sw-31-ANSWER,10,Goto(s|11) -exten => sw-31-BUSY,10,Voicemail(b${ext}) -exten => sw-31-BUSY,11,Goto(s|11) -exten => sw-31-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-31-DONTCALL,11,Goto(s|11) -exten => sw-31-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-31-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_30] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-32-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_30-32) -exten => _sw-32-.,10,Voicemail(u${ext}) -exten => _sw-32-.,11,Goto(s|11) -exten => sw-32-,10,Goto(sw-32-.|10) -exten => sw-32-NOANSWER,10,Voicemail(u${ext}) -exten => sw-32-NOANSWER,11,Goto(s|11) -exten => sw-32-ANSWER,10,Goto(s|11) -exten => sw-32-BUSY,10,Voicemail(b${ext}) -exten => sw-32-BUSY,11,Goto(s|11) -exten => sw-32-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-32-DONTCALL,11,Goto(s|11) -exten => sw-32-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-32-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_31] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-33-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_31-33) -exten => _sw-33-.,10,Voicemail(u${ext}) -exten => _sw-33-.,11,Goto(s|11) -exten => sw-33-,10,Goto(sw-33-.|10) -exten => sw-33-NOANSWER,10,Voicemail(u${ext}) -exten => sw-33-NOANSWER,11,Goto(s|11) -exten => sw-33-ANSWER,10,Goto(s|11) -exten => sw-33-BUSY,10,Voicemail(b${ext}) -exten => sw-33-BUSY,11,Goto(s|11) -exten => sw-33-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-33-DONTCALL,11,Goto(s|11) -exten => sw-33-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-33-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_32] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-34-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_32-34) -exten => _sw-34-.,10,Voicemail(u${ext}) -exten => _sw-34-.,11,Goto(s|11) -exten => sw-34-,10,Goto(sw-34-.|10) -exten => sw-34-NOANSWER,10,Voicemail(u${ext}) -exten => sw-34-NOANSWER,11,Goto(s|11) -exten => sw-34-ANSWER,10,Goto(s|11) -exten => sw-34-BUSY,10,Voicemail(b${ext}) -exten => sw-34-BUSY,11,Goto(s|11) -exten => sw-34-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-34-DONTCALL,11,Goto(s|11) -exten => sw-34-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-34-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_33] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-35-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_33-35) -exten => _sw-35-.,10,Voicemail(u${ext}) -exten => _sw-35-.,11,Goto(s|11) -exten => sw-35-,10,Goto(sw-35-.|10) -exten => sw-35-NOANSWER,10,Voicemail(u${ext}) -exten => sw-35-NOANSWER,11,Goto(s|11) -exten => sw-35-ANSWER,10,Goto(s|11) -exten => sw-35-BUSY,10,Voicemail(b${ext}) -exten => sw-35-BUSY,11,Goto(s|11) -exten => sw-35-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-35-DONTCALL,11,Goto(s|11) -exten => sw-35-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-35-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_34] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-36-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_34-36) -exten => _sw-36-.,10,Voicemail(u${ext}) -exten => _sw-36-.,11,Goto(s|11) -exten => sw-36-,10,Goto(sw-36-.|10) -exten => sw-36-NOANSWER,10,Voicemail(u${ext}) -exten => sw-36-NOANSWER,11,Goto(s|11) -exten => sw-36-ANSWER,10,Goto(s|11) -exten => sw-36-BUSY,10,Voicemail(b${ext}) -exten => sw-36-BUSY,11,Goto(s|11) -exten => sw-36-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-36-DONTCALL,11,Goto(s|11) -exten => sw-36-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-36-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_35] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-37-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_35-37) -exten => _sw-37-.,10,Voicemail(u${ext}) -exten => _sw-37-.,11,Goto(s|11) -exten => sw-37-,10,Goto(sw-37-.|10) -exten => sw-37-NOANSWER,10,Voicemail(u${ext}) -exten => sw-37-NOANSWER,11,Goto(s|11) -exten => sw-37-ANSWER,10,Goto(s|11) -exten => sw-37-BUSY,10,Voicemail(b${ext}) -exten => sw-37-BUSY,11,Goto(s|11) -exten => sw-37-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-37-DONTCALL,11,Goto(s|11) -exten => sw-37-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-37-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_36] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-38-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_36-38) -exten => _sw-38-.,10,Voicemail(u${ext}) -exten => _sw-38-.,11,Goto(s|11) -exten => sw-38-,10,Goto(sw-38-.|10) -exten => sw-38-NOANSWER,10,Voicemail(u${ext}) -exten => sw-38-NOANSWER,11,Goto(s|11) -exten => sw-38-ANSWER,10,Goto(s|11) -exten => sw-38-BUSY,10,Voicemail(b${ext}) -exten => sw-38-BUSY,11,Goto(s|11) -exten => sw-38-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-38-DONTCALL,11,Goto(s|11) -exten => sw-38-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-38-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_37] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-39-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_37-39) -exten => _sw-39-.,10,Voicemail(u${ext}) -exten => _sw-39-.,11,Goto(s|11) -exten => sw-39-,10,Goto(sw-39-.|10) -exten => sw-39-NOANSWER,10,Voicemail(u${ext}) -exten => sw-39-NOANSWER,11,Goto(s|11) -exten => sw-39-ANSWER,10,Goto(s|11) -exten => sw-39-BUSY,10,Voicemail(b${ext}) -exten => sw-39-BUSY,11,Goto(s|11) -exten => sw-39-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-39-DONTCALL,11,Goto(s|11) -exten => sw-39-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-39-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_38] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-40-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_38-40) -exten => _sw-40-.,10,Voicemail(u${ext}) -exten => _sw-40-.,11,Goto(s|11) -exten => sw-40-,10,Goto(sw-40-.|10) -exten => sw-40-NOANSWER,10,Voicemail(u${ext}) -exten => sw-40-NOANSWER,11,Goto(s|11) -exten => sw-40-ANSWER,10,Goto(s|11) -exten => sw-40-BUSY,10,Voicemail(b${ext}) -exten => sw-40-BUSY,11,Goto(s|11) -exten => sw-40-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-40-DONTCALL,11,Goto(s|11) -exten => sw-40-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-40-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_39] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-41-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_39-41) -exten => _sw-41-.,10,Voicemail(u${ext}) -exten => _sw-41-.,11,Goto(s|11) -exten => sw-41-,10,Goto(sw-41-.|10) -exten => sw-41-NOANSWER,10,Voicemail(u${ext}) -exten => sw-41-NOANSWER,11,Goto(s|11) -exten => sw-41-ANSWER,10,Goto(s|11) -exten => sw-41-BUSY,10,Voicemail(b${ext}) -exten => sw-41-BUSY,11,Goto(s|11) -exten => sw-41-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-41-DONTCALL,11,Goto(s|11) -exten => sw-41-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-41-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_40] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-42-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_40-42) -exten => _sw-42-.,10,Voicemail(u${ext}) -exten => _sw-42-.,11,Goto(s|11) -exten => sw-42-,10,Goto(sw-42-.|10) -exten => sw-42-NOANSWER,10,Voicemail(u${ext}) -exten => sw-42-NOANSWER,11,Goto(s|11) -exten => sw-42-ANSWER,10,Goto(s|11) -exten => sw-42-BUSY,10,Voicemail(b${ext}) -exten => sw-42-BUSY,11,Goto(s|11) -exten => sw-42-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-42-DONTCALL,11,Goto(s|11) -exten => sw-42-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-42-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_41] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-43-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_41-43) -exten => _sw-43-.,10,Voicemail(u${ext}) -exten => _sw-43-.,11,Goto(s|11) -exten => sw-43-,10,Goto(sw-43-.|10) -exten => sw-43-NOANSWER,10,Voicemail(u${ext}) -exten => sw-43-NOANSWER,11,Goto(s|11) -exten => sw-43-ANSWER,10,Goto(s|11) -exten => sw-43-BUSY,10,Voicemail(b${ext}) -exten => sw-43-BUSY,11,Goto(s|11) -exten => sw-43-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-43-DONTCALL,11,Goto(s|11) -exten => sw-43-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-43-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_42] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-44-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_42-44) -exten => _sw-44-.,10,Voicemail(u${ext}) -exten => _sw-44-.,11,Goto(s|11) -exten => sw-44-,10,Goto(sw-44-.|10) -exten => sw-44-NOANSWER,10,Voicemail(u${ext}) -exten => sw-44-NOANSWER,11,Goto(s|11) -exten => sw-44-ANSWER,10,Goto(s|11) -exten => sw-44-BUSY,10,Voicemail(b${ext}) -exten => sw-44-BUSY,11,Goto(s|11) -exten => sw-44-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-44-DONTCALL,11,Goto(s|11) -exten => sw-44-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-44-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_43] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-45-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_43-45) -exten => _sw-45-.,10,Voicemail(u${ext}) -exten => _sw-45-.,11,Goto(s|11) -exten => sw-45-,10,Goto(sw-45-.|10) -exten => sw-45-NOANSWER,10,Voicemail(u${ext}) -exten => sw-45-NOANSWER,11,Goto(s|11) -exten => sw-45-ANSWER,10,Goto(s|11) -exten => sw-45-BUSY,10,Voicemail(b${ext}) -exten => sw-45-BUSY,11,Goto(s|11) -exten => sw-45-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-45-DONTCALL,11,Goto(s|11) -exten => sw-45-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-45-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_44] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-46-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_44-46) -exten => _sw-46-.,10,Voicemail(u${ext}) -exten => _sw-46-.,11,Goto(s|11) -exten => sw-46-,10,Goto(sw-46-.|10) -exten => sw-46-NOANSWER,10,Voicemail(u${ext}) -exten => sw-46-NOANSWER,11,Goto(s|11) -exten => sw-46-ANSWER,10,Goto(s|11) -exten => sw-46-BUSY,10,Voicemail(b${ext}) -exten => sw-46-BUSY,11,Goto(s|11) -exten => sw-46-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-46-DONTCALL,11,Goto(s|11) -exten => sw-46-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-46-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_45] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-47-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_45-47) -exten => _sw-47-.,10,Voicemail(u${ext}) -exten => _sw-47-.,11,Goto(s|11) -exten => sw-47-,10,Goto(sw-47-.|10) -exten => sw-47-NOANSWER,10,Voicemail(u${ext}) -exten => sw-47-NOANSWER,11,Goto(s|11) -exten => sw-47-ANSWER,10,Goto(s|11) -exten => sw-47-BUSY,10,Voicemail(b${ext}) -exten => sw-47-BUSY,11,Goto(s|11) -exten => sw-47-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-47-DONTCALL,11,Goto(s|11) -exten => sw-47-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-47-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_46] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-48-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_46-48) -exten => _sw-48-.,10,Voicemail(u${ext}) -exten => _sw-48-.,11,Goto(s|11) -exten => sw-48-,10,Goto(sw-48-.|10) -exten => sw-48-NOANSWER,10,Voicemail(u${ext}) -exten => sw-48-NOANSWER,11,Goto(s|11) -exten => sw-48-ANSWER,10,Goto(s|11) -exten => sw-48-BUSY,10,Voicemail(b${ext}) -exten => sw-48-BUSY,11,Goto(s|11) -exten => sw-48-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-48-DONTCALL,11,Goto(s|11) -exten => sw-48-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-48-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_47] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-49-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_47-49) -exten => _sw-49-.,10,Voicemail(u${ext}) -exten => _sw-49-.,11,Goto(s|11) -exten => sw-49-,10,Goto(sw-49-.|10) -exten => sw-49-NOANSWER,10,Voicemail(u${ext}) -exten => sw-49-NOANSWER,11,Goto(s|11) -exten => sw-49-ANSWER,10,Goto(s|11) -exten => sw-49-BUSY,10,Voicemail(b${ext}) -exten => sw-49-BUSY,11,Goto(s|11) -exten => sw-49-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-49-DONTCALL,11,Goto(s|11) -exten => sw-49-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-49-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_48] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-50-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_48-50) -exten => _sw-50-.,10,Voicemail(u${ext}) -exten => _sw-50-.,11,Goto(s|11) -exten => sw-50-,10,Goto(sw-50-.|10) -exten => sw-50-NOANSWER,10,Voicemail(u${ext}) -exten => sw-50-NOANSWER,11,Goto(s|11) -exten => sw-50-ANSWER,10,Goto(s|11) -exten => sw-50-BUSY,10,Voicemail(b${ext}) -exten => sw-50-BUSY,11,Goto(s|11) -exten => sw-50-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-50-DONTCALL,11,Goto(s|11) -exten => sw-50-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-50-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_49] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-51-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_49-51) -exten => _sw-51-.,10,Voicemail(u${ext}) -exten => _sw-51-.,11,Goto(s|11) -exten => sw-51-,10,Goto(sw-51-.|10) -exten => sw-51-NOANSWER,10,Voicemail(u${ext}) -exten => sw-51-NOANSWER,11,Goto(s|11) -exten => sw-51-ANSWER,10,Goto(s|11) -exten => sw-51-BUSY,10,Voicemail(b${ext}) -exten => sw-51-BUSY,11,Goto(s|11) -exten => sw-51-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-51-DONTCALL,11,Goto(s|11) -exten => sw-51-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-51-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_50] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-52-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_50-52) -exten => _sw-52-.,10,Voicemail(u${ext}) -exten => _sw-52-.,11,Goto(s|11) -exten => sw-52-,10,Goto(sw-52-.|10) -exten => sw-52-NOANSWER,10,Voicemail(u${ext}) -exten => sw-52-NOANSWER,11,Goto(s|11) -exten => sw-52-ANSWER,10,Goto(s|11) -exten => sw-52-BUSY,10,Voicemail(b${ext}) -exten => sw-52-BUSY,11,Goto(s|11) -exten => sw-52-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-52-DONTCALL,11,Goto(s|11) -exten => sw-52-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-52-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_51] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-53-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_51-53) -exten => _sw-53-.,10,Voicemail(u${ext}) -exten => _sw-53-.,11,Goto(s|11) -exten => sw-53-,10,Goto(sw-53-.|10) -exten => sw-53-NOANSWER,10,Voicemail(u${ext}) -exten => sw-53-NOANSWER,11,Goto(s|11) -exten => sw-53-ANSWER,10,Goto(s|11) -exten => sw-53-BUSY,10,Voicemail(b${ext}) -exten => sw-53-BUSY,11,Goto(s|11) -exten => sw-53-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-53-DONTCALL,11,Goto(s|11) -exten => sw-53-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-53-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_52] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-54-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_52-54) -exten => _sw-54-.,10,Voicemail(u${ext}) -exten => _sw-54-.,11,Goto(s|11) -exten => sw-54-,10,Goto(sw-54-.|10) -exten => sw-54-NOANSWER,10,Voicemail(u${ext}) -exten => sw-54-NOANSWER,11,Goto(s|11) -exten => sw-54-ANSWER,10,Goto(s|11) -exten => sw-54-BUSY,10,Voicemail(b${ext}) -exten => sw-54-BUSY,11,Goto(s|11) -exten => sw-54-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-54-DONTCALL,11,Goto(s|11) -exten => sw-54-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-54-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_53] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-55-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_53-55) -exten => _sw-55-.,10,Voicemail(u${ext}) -exten => _sw-55-.,11,Goto(s|11) -exten => sw-55-,10,Goto(sw-55-.|10) -exten => sw-55-NOANSWER,10,Voicemail(u${ext}) -exten => sw-55-NOANSWER,11,Goto(s|11) -exten => sw-55-ANSWER,10,Goto(s|11) -exten => sw-55-BUSY,10,Voicemail(b${ext}) -exten => sw-55-BUSY,11,Goto(s|11) -exten => sw-55-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-55-DONTCALL,11,Goto(s|11) -exten => sw-55-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-55-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_54] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-56-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_54-56) -exten => _sw-56-.,10,Voicemail(u${ext}) -exten => _sw-56-.,11,Goto(s|11) -exten => sw-56-,10,Goto(sw-56-.|10) -exten => sw-56-NOANSWER,10,Voicemail(u${ext}) -exten => sw-56-NOANSWER,11,Goto(s|11) -exten => sw-56-ANSWER,10,Goto(s|11) -exten => sw-56-BUSY,10,Voicemail(b${ext}) -exten => sw-56-BUSY,11,Goto(s|11) -exten => sw-56-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-56-DONTCALL,11,Goto(s|11) -exten => sw-56-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-56-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_55] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-57-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_55-57) -exten => _sw-57-.,10,Voicemail(u${ext}) -exten => _sw-57-.,11,Goto(s|11) -exten => sw-57-,10,Goto(sw-57-.|10) -exten => sw-57-NOANSWER,10,Voicemail(u${ext}) -exten => sw-57-NOANSWER,11,Goto(s|11) -exten => sw-57-ANSWER,10,Goto(s|11) -exten => sw-57-BUSY,10,Voicemail(b${ext}) -exten => sw-57-BUSY,11,Goto(s|11) -exten => sw-57-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-57-DONTCALL,11,Goto(s|11) -exten => sw-57-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-57-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_56] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-58-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_56-58) -exten => _sw-58-.,10,Voicemail(u${ext}) -exten => _sw-58-.,11,Goto(s|11) -exten => sw-58-,10,Goto(sw-58-.|10) -exten => sw-58-NOANSWER,10,Voicemail(u${ext}) -exten => sw-58-NOANSWER,11,Goto(s|11) -exten => sw-58-ANSWER,10,Goto(s|11) -exten => sw-58-BUSY,10,Voicemail(b${ext}) -exten => sw-58-BUSY,11,Goto(s|11) -exten => sw-58-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-58-DONTCALL,11,Goto(s|11) -exten => sw-58-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-58-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_57] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-59-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_57-59) -exten => _sw-59-.,10,Voicemail(u${ext}) -exten => _sw-59-.,11,Goto(s|11) -exten => sw-59-,10,Goto(sw-59-.|10) -exten => sw-59-NOANSWER,10,Voicemail(u${ext}) -exten => sw-59-NOANSWER,11,Goto(s|11) -exten => sw-59-ANSWER,10,Goto(s|11) -exten => sw-59-BUSY,10,Voicemail(b${ext}) -exten => sw-59-BUSY,11,Goto(s|11) -exten => sw-59-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-59-DONTCALL,11,Goto(s|11) -exten => sw-59-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-59-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_58] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-60-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_58-60) -exten => _sw-60-.,10,Voicemail(u${ext}) -exten => _sw-60-.,11,Goto(s|11) -exten => sw-60-,10,Goto(sw-60-.|10) -exten => sw-60-NOANSWER,10,Voicemail(u${ext}) -exten => sw-60-NOANSWER,11,Goto(s|11) -exten => sw-60-ANSWER,10,Goto(s|11) -exten => sw-60-BUSY,10,Voicemail(b${ext}) -exten => sw-60-BUSY,11,Goto(s|11) -exten => sw-60-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-60-DONTCALL,11,Goto(s|11) -exten => sw-60-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-60-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_59] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-61-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_59-61) -exten => _sw-61-.,10,Voicemail(u${ext}) -exten => _sw-61-.,11,Goto(s|11) -exten => sw-61-,10,Goto(sw-61-.|10) -exten => sw-61-NOANSWER,10,Voicemail(u${ext}) -exten => sw-61-NOANSWER,11,Goto(s|11) -exten => sw-61-ANSWER,10,Goto(s|11) -exten => sw-61-BUSY,10,Voicemail(b${ext}) -exten => sw-61-BUSY,11,Goto(s|11) -exten => sw-61-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-61-DONTCALL,11,Goto(s|11) -exten => sw-61-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-61-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_60] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-62-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_60-62) -exten => _sw-62-.,10,Voicemail(u${ext}) -exten => _sw-62-.,11,Goto(s|11) -exten => sw-62-,10,Goto(sw-62-.|10) -exten => sw-62-NOANSWER,10,Voicemail(u${ext}) -exten => sw-62-NOANSWER,11,Goto(s|11) -exten => sw-62-ANSWER,10,Goto(s|11) -exten => sw-62-BUSY,10,Voicemail(b${ext}) -exten => sw-62-BUSY,11,Goto(s|11) -exten => sw-62-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-62-DONTCALL,11,Goto(s|11) -exten => sw-62-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-62-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_61] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-63-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_61-63) -exten => _sw-63-.,10,Voicemail(u${ext}) -exten => _sw-63-.,11,Goto(s|11) -exten => sw-63-,10,Goto(sw-63-.|10) -exten => sw-63-NOANSWER,10,Voicemail(u${ext}) -exten => sw-63-NOANSWER,11,Goto(s|11) -exten => sw-63-ANSWER,10,Goto(s|11) -exten => sw-63-BUSY,10,Voicemail(b${ext}) -exten => sw-63-BUSY,11,Goto(s|11) -exten => sw-63-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-63-DONTCALL,11,Goto(s|11) -exten => sw-63-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-63-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_62] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-64-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_62-64) -exten => _sw-64-.,10,Voicemail(u${ext}) -exten => _sw-64-.,11,Goto(s|11) -exten => sw-64-,10,Goto(sw-64-.|10) -exten => sw-64-NOANSWER,10,Voicemail(u${ext}) -exten => sw-64-NOANSWER,11,Goto(s|11) -exten => sw-64-ANSWER,10,Goto(s|11) -exten => sw-64-BUSY,10,Voicemail(b${ext}) -exten => sw-64-BUSY,11,Goto(s|11) -exten => sw-64-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-64-DONTCALL,11,Goto(s|11) -exten => sw-64-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-64-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_63] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-65-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_63-65) -exten => _sw-65-.,10,Voicemail(u${ext}) -exten => _sw-65-.,11,Goto(s|11) -exten => sw-65-,10,Goto(sw-65-.|10) -exten => sw-65-NOANSWER,10,Voicemail(u${ext}) -exten => sw-65-NOANSWER,11,Goto(s|11) -exten => sw-65-ANSWER,10,Goto(s|11) -exten => sw-65-BUSY,10,Voicemail(b${ext}) -exten => sw-65-BUSY,11,Goto(s|11) -exten => sw-65-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-65-DONTCALL,11,Goto(s|11) -exten => sw-65-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-65-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_64] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-66-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_64-66) -exten => _sw-66-.,10,Voicemail(u${ext}) -exten => _sw-66-.,11,Goto(s|11) -exten => sw-66-,10,Goto(sw-66-.|10) -exten => sw-66-NOANSWER,10,Voicemail(u${ext}) -exten => sw-66-NOANSWER,11,Goto(s|11) -exten => sw-66-ANSWER,10,Goto(s|11) -exten => sw-66-BUSY,10,Voicemail(b${ext}) -exten => sw-66-BUSY,11,Goto(s|11) -exten => sw-66-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-66-DONTCALL,11,Goto(s|11) -exten => sw-66-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-66-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_65] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-67-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_65-67) -exten => _sw-67-.,10,Voicemail(u${ext}) -exten => _sw-67-.,11,Goto(s|11) -exten => sw-67-,10,Goto(sw-67-.|10) -exten => sw-67-NOANSWER,10,Voicemail(u${ext}) -exten => sw-67-NOANSWER,11,Goto(s|11) -exten => sw-67-ANSWER,10,Goto(s|11) -exten => sw-67-BUSY,10,Voicemail(b${ext}) -exten => sw-67-BUSY,11,Goto(s|11) -exten => sw-67-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-67-DONTCALL,11,Goto(s|11) -exten => sw-67-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-67-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_66] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-68-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_66-68) -exten => _sw-68-.,10,Voicemail(u${ext}) -exten => _sw-68-.,11,Goto(s|11) -exten => sw-68-,10,Goto(sw-68-.|10) -exten => sw-68-NOANSWER,10,Voicemail(u${ext}) -exten => sw-68-NOANSWER,11,Goto(s|11) -exten => sw-68-ANSWER,10,Goto(s|11) -exten => sw-68-BUSY,10,Voicemail(b${ext}) -exten => sw-68-BUSY,11,Goto(s|11) -exten => sw-68-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-68-DONTCALL,11,Goto(s|11) -exten => sw-68-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-68-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_67] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-69-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_67-69) -exten => _sw-69-.,10,Voicemail(u${ext}) -exten => _sw-69-.,11,Goto(s|11) -exten => sw-69-,10,Goto(sw-69-.|10) -exten => sw-69-NOANSWER,10,Voicemail(u${ext}) -exten => sw-69-NOANSWER,11,Goto(s|11) -exten => sw-69-ANSWER,10,Goto(s|11) -exten => sw-69-BUSY,10,Voicemail(b${ext}) -exten => sw-69-BUSY,11,Goto(s|11) -exten => sw-69-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-69-DONTCALL,11,Goto(s|11) -exten => sw-69-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-69-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_68] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-70-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_68-70) -exten => _sw-70-.,10,Voicemail(u${ext}) -exten => _sw-70-.,11,Goto(s|11) -exten => sw-70-,10,Goto(sw-70-.|10) -exten => sw-70-NOANSWER,10,Voicemail(u${ext}) -exten => sw-70-NOANSWER,11,Goto(s|11) -exten => sw-70-ANSWER,10,Goto(s|11) -exten => sw-70-BUSY,10,Voicemail(b${ext}) -exten => sw-70-BUSY,11,Goto(s|11) -exten => sw-70-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-70-DONTCALL,11,Goto(s|11) -exten => sw-70-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-70-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_69] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-71-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_69-71) -exten => _sw-71-.,10,Voicemail(u${ext}) -exten => _sw-71-.,11,Goto(s|11) -exten => sw-71-,10,Goto(sw-71-.|10) -exten => sw-71-NOANSWER,10,Voicemail(u${ext}) -exten => sw-71-NOANSWER,11,Goto(s|11) -exten => sw-71-ANSWER,10,Goto(s|11) -exten => sw-71-BUSY,10,Voicemail(b${ext}) -exten => sw-71-BUSY,11,Goto(s|11) -exten => sw-71-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-71-DONTCALL,11,Goto(s|11) -exten => sw-71-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-71-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_70] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-72-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_70-72) -exten => _sw-72-.,10,Voicemail(u${ext}) -exten => _sw-72-.,11,Goto(s|11) -exten => sw-72-,10,Goto(sw-72-.|10) -exten => sw-72-NOANSWER,10,Voicemail(u${ext}) -exten => sw-72-NOANSWER,11,Goto(s|11) -exten => sw-72-ANSWER,10,Goto(s|11) -exten => sw-72-BUSY,10,Voicemail(b${ext}) -exten => sw-72-BUSY,11,Goto(s|11) -exten => sw-72-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-72-DONTCALL,11,Goto(s|11) -exten => sw-72-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-72-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_71] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-73-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_71-73) -exten => _sw-73-.,10,Voicemail(u${ext}) -exten => _sw-73-.,11,Goto(s|11) -exten => sw-73-,10,Goto(sw-73-.|10) -exten => sw-73-NOANSWER,10,Voicemail(u${ext}) -exten => sw-73-NOANSWER,11,Goto(s|11) -exten => sw-73-ANSWER,10,Goto(s|11) -exten => sw-73-BUSY,10,Voicemail(b${ext}) -exten => sw-73-BUSY,11,Goto(s|11) -exten => sw-73-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-73-DONTCALL,11,Goto(s|11) -exten => sw-73-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-73-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_72] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-74-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_72-74) -exten => _sw-74-.,10,Voicemail(u${ext}) -exten => _sw-74-.,11,Goto(s|11) -exten => sw-74-,10,Goto(sw-74-.|10) -exten => sw-74-NOANSWER,10,Voicemail(u${ext}) -exten => sw-74-NOANSWER,11,Goto(s|11) -exten => sw-74-ANSWER,10,Goto(s|11) -exten => sw-74-BUSY,10,Voicemail(b${ext}) -exten => sw-74-BUSY,11,Goto(s|11) -exten => sw-74-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-74-DONTCALL,11,Goto(s|11) -exten => sw-74-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-74-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten_73] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-75-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten_73-75) -exten => _sw-75-.,10,Voicemail(u${ext}) -exten => _sw-75-.,11,Goto(s|11) -exten => sw-75-,10,Goto(sw-75-.|10) -exten => sw-75-NOANSWER,10,Voicemail(u${ext}) -exten => sw-75-NOANSWER,11,Goto(s|11) -exten => sw-75-ANSWER,10,Goto(s|11) -exten => sw-75-BUSY,10,Voicemail(b${ext}) -exten => sw-75-BUSY,11,Goto(s|11) -exten => sw-75-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-75-DONTCALL,11,Goto(s|11) -exten => sw-75-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-75-TORTURE,11,Goto(s|11) - - -[macro-std-priv-exten] -exten => s,1,Set(dev=${ARG1}) -exten => s,2,Set(ext=${ARG2}) -exten => s,3,Set(timeout=${ARG3}) -exten => s,4,Set(opts=${ARG4}) -exten => s,5,Set(torcont=${ARG5}) -exten => s,6,Set(dontcont=${ARG6}) -exten => s,7,Set(~~EXTEN~~=${EXTEN}) -exten => s,8,Dial(${dev}|${timeout}|${opts}) -exten => s,9,NoOp(${DIALSTATUS} was chosen) -exten => s,10,Goto(sw-76-${DIALSTATUS}|10) -exten => s,11,NoOp(Finish switch-std-priv-exten-76) -exten => _sw-76-.,10,Voicemail(u${ext}) -exten => _sw-76-.,11,Goto(s|11) -exten => sw-76-,10,Goto(sw-76-.|10) -exten => sw-76-NOANSWER,10,Voicemail(u${ext}) -exten => sw-76-NOANSWER,11,Goto(s|11) -exten => sw-76-ANSWER,10,Goto(s|11) -exten => sw-76-BUSY,10,Voicemail(b${ext}) -exten => sw-76-BUSY,11,Goto(s|11) -exten => sw-76-DONTCALL,10,Goto(${dontcont}|s|begin) -exten => sw-76-DONTCALL,11,Goto(s|11) -exten => sw-76-TORTURE,10,Goto(${torcont}|s|begin) -exten => sw-76-TORTURE,11,Goto(s|11) - - -[macro-fillcidname] -exten => s,1,GotoIf($["${CALLERID(number)}" = "" ]?2:3) -exten => s,2,Goto(13) -exten => s,3,NoOp(Finish if-fillcidname-77) -exten => s,4,Set(cidn=${DB(cidname/${CALLERID(num)})}) -exten => s,5,GotoIf($["${CALLERID(name)}" != "" ]?6:9) -exten => s,6,GotoIf($[("${cidn}" = "Privacy Manager" & "${CALLERID(name)}" != "Privacy Manager") | "${cidn}" = "" ]?7:8) -exten => s,7,Set(DB(cidname/${CALLERID(number)})=${CALLERID(name)}) -exten => s,8,NoOp(Finish if-if-fillcidname-78-79) -exten => s,9,NoOp(Finish if-fillcidname-78) -exten => s,10,GotoIf($[( "${cidn}" != "" ) & ( "${CALLERID(name)}" = "" | "${CALLERID(name)}" = "CODY|WY " | "${CALLERID(name)}" = "POWELL|WY " | "${CALLERID(name)}" = "WIRELESS CALLER" | "${CALLERID(name)}" = "SUBSCRIBER|WIRE" | "${CALLERID(name)}" = "CELLULAR ONE" | "${CALLERID(name)}" = "Cellular One Customer" | "${CALLERID(name)}" = "CELLULAR ONE " | "${CALLERID(name)}" = "Privacy Manager" | "${CALLERID(name)}" = "RIVERTON|WY " | "${CALLERID(name)}" = "BASIN|WY " | "${CALLERID(name)}" = "BILLINGS|MT " | "${CALLERID(name)}" = "PROVO|UT " | "${CALLERID(name)}" = "TOLL FREE " ) ]?11:12) -exten => s,11,Set(CALLERID(name)=${cidn}) -exten => s,12,NoOp(Finish if-fillcidname-80) -exten => s,13,NoOp(End of Macro fillcidname-s) - - -[macro-ciddial] -exten => s,1,Set(dialnum=${ARG1}) -exten => s,2,Set(lookup=${ARG2}) -exten => s,3,Set(waittime=${ARG3}) -exten => s,4,Set(dialopts=${ARG4}) -exten => s,5,Set(ddev=${ARG5}) -exten => s,6,Set(cidnu=${CALLERID(num)}) -exten => s,7,Set(cidn=${DB(cidname/${lookup})}) -exten => s,8,Set(CALLERID(name)=${cidn}) -exten => s,9,Dial(${ddev}/${dialnum}|${waittime}|${dialopts}) -exten => s,10,GotoIf($["${DIALSTATUS}" = "CHANUNAVAIL" ]?11:19) -exten => s,11,BackGround(try_voip) -exten => s,12,Set(CALLERID(num)=$[7075679201]) -exten => s,13,Dial(SIP/1${lookup}@tctwest|${waittime}|${dialopts}) -exten => s,14,GotoIf($["${DIALSTATUS}" = "CHANUNAVAIL" ]?15:18) -exten => s,15,BackGround(try_cell) -exten => s,16,Set(CALLERID(num)=$[${cidnu}]) -exten => s,17,Dial(Zap/2/${lookup}|${waittime}|${dialopts}) -exten => s,18,NoOp(Finish if-if-ciddial-81-82) -exten => s,19,NoOp(Finish if-ciddial-81) - - -[macro-ciddial3] -exten => s,1,Set(dialnum=${ARG1}) -exten => s,2,Set(lookup=${ARG2}) -exten => s,3,Set(waittime=${ARG3}) -exten => s,4,Set(dialopts=${ARG4}) -exten => s,5,Set(ddev=${ARG5}) -exten => s,6,Set(cidnu=${CALLERID(num)}) -exten => s,7,Set(cidn=${DB(cidname/${lookup})}) -exten => s,8,Set(CALLERID(name)=${cidn}) -exten => s,9,Dial(${ddev}/${dialnum}|${waittime}|${dialopts}) -exten => s,10,GotoIf($["${DIALSTATUS}" = "CHANUNAVAIL" ]?11:13) -exten => s,11,BackGround(try_cell) -exten => s,12,Dial(Zap/2/${lookup}|${waittime}|${dialopts}) -exten => s,13,NoOp(Finish if-ciddial3-83) - - -[macro-ciddial2] -exten => s,1,Set(dialnum=${ARG1}) -exten => s,2,Set(lookup=${ARG2}) -exten => s,3,Set(waittime=${ARG3}) -exten => s,4,Set(dialopts=${ARG4}) -exten => s,5,Set(ddev=${ARG5}) -exten => s,6,Set(cidn=${DB(cidname/${lookup})}) -exten => s,7,Set(cidnu=${CALLERID(num)}) -exten => s,8,Set(CALLERID(name)=${cidn}) -exten => s,9,Set(CALLERID(num)=7075679201) -exten => s,10,Dial(SIP/1${lookup}@tctwest|${waittime}|${dialopts}) -exten => s,11,GotoIf($["${DIALSTATUS}" = "CHANUNAVAIL" ]?12:19) -exten => s,12,Set(CALLERID(num)=${cidnu}) -exten => s,13,BackGround(try_zap) -exten => s,14,Dial(${ddev}/${dialnum}|${waittime}|${dialopts}) -exten => s,15,GotoIf($["${DIALSTATUS}" = "CHANUNAVAIL" ]?16:18) -exten => s,16,BackGround(try_cell) -exten => s,17,Dial(Zap/2/${lookup}|${waittime}|${dialopts}) -exten => s,18,NoOp(Finish if-if-ciddial2-84-85) -exten => s,19,NoOp(Finish if-ciddial2-84) - - -[macro-callerid-liar] -exten => s,1,TrySystem(/usr/bin/play /var/lib/asterisk/sounds/priv-callerintros/LIAR.gsm&) -exten => s,2,Background(priv-liar) -exten => s,3,Hangup() - - -[macro-callerid-bad] -exten => s,1,Set(mycid=$[${CALLERID(num)}:"1([0-9]+)"]) -exten => s,2,Set(CALLERID(num)=${mycid}) -exten => s,3,Wait(0) - - -[privacyManagerFailed] -exten => s,1(begin),Background(PrivManInstructions) -exten => s,2,PrivacyManager() -exten => s,3,GotoIf($["${PRIVACYMGRSTATUS}" = "FAILED" ]?4:11) -exten => s,4,Background(tt-allbusy) -exten => s,5,Background(tt-somethingwrong) -exten => s,6,Background(tt-monkeysintro) -exten => s,7,Background(tt-monkeys) -exten => s,8,Background(tt-weasels) -exten => s,9,Hangup() -exten => s,10,Goto(12) -exten => s,11,Goto(homeline|s|postPriv) -exten => s,12,NoOp(Finish if-privacyManagerFailed-86) - - -[homeline] -exten => s,1,Set(~~EXTEN~~=${EXTEN}) -exten => s,2(begin),Answer() -exten => s,3,Set(repeatcount=0) -exten => s,4,Zapateller(nocallerid) -exten => s,5,PrivacyManager() -exten => s,6,GotoIf($["${PRIVACYMGRSTATUS}" = "FAILED" ]?7:11) -exten => s,7,TrySystem(/usr/bin/play /var/lib/asterisk/sounds/privmanfailed.gsm) -exten => s,8,Macro(std-priv-exten|Zap/3r1&Zap/5r1|2|25|mtw|telemarket|telemarket) -exten => s,9,Hangup() -exten => s,10,Goto(105) -exten => s,11,NoOp(Finish if-homeline-87) -exten => s,12(postPriv),Macro(fillcidname) -exten => s,13,Set(CONFCIDNA=${CALLERID(name)}) -exten => s,14,Set(CONFCIDNU=${CALLERID(num)}) -exten => s,15,AGI(callall) -exten => s,16,AGI(submit-announce.agi) -exten => s,17,GotoIf($["${CALLERID(num)}" : "1" ]?18:19) -exten => s,18,Macro(callerid-bad) -exten => s,19,NoOp(Finish if-homeline-88) -exten => s,20,GotoIf($["${CALLERID(num)}" = "7077577685" & "${CALLERID(name)}" : "Privacy Manager" ]?21:22) -exten => s,21,Macro(callerid-liar) -exten => s,22,NoOp(Finish if-homeline-89) -exten => s,23,TrySystem(/usr/local/bin/who-is-it ${CALLERID(num)} "${CALLERID(name)}"&) -exten => s,24,Set(lds=${DB(playlds/${CALLERID(num)})}) -exten => s,25,GotoIf($["${lds}" = "1" ]?26:27) -exten => s,26,SetMusicOnHold(mohlds) -exten => s,27,NoOp(Finish if-homeline-90) -exten => s,28,Set(direct=$[${DB(DirectCall/${CALLERID(num)})}]) -exten => s,29,GotoIf($["${direct}" != "" & ${direct} != 0 ]?30:37) -exten => s,30,verbose(direct is XXX#${direct}XXXX) -exten => s,31,Playback(greetings/direct) -exten => s,32,Playback(/var/spool/asterisk/voicemail/default/${direct}/greet) -exten => s,33,TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm) -exten => s,34,TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/${direct}/greet.wav&) -exten => s,35,Goto(sw-92-${direct}|10) -exten => s,36,NoOp(Finish switch-if-homeline-91-92) -exten => s,37,NoOp(Finish if-homeline-91) -exten => s,38(loopback),GotoIfTime(*|*|20-25|dec?40) -exten => s,39,Goto(42) -exten => s,40,Playback(greetings/christmas) -exten => s,41,Goto(103) -exten => s,42,GotoIfTime(*|*|31|dec?44) -exten => s,43,Goto(46) -exten => s,44,Playback(greetings/newyear) -exten => s,45,Goto(102) -exten => s,46,GotoIfTime(*|*|1|jan?48) -exten => s,47,Goto(50) -exten => s,48,Playback(greetings/newyear) -exten => s,49,Goto(101) -exten => s,50,GotoIfTime(*|*|14|feb?52) -exten => s,51,Goto(54) -exten => s,52,Playback(greetings/valentines) -exten => s,53,Goto(100) -exten => s,54,GotoIfTime(*|*|17|mar?56) -exten => s,55,Goto(58) -exten => s,56,Playback(greetings/stPat) -exten => s,57,Goto(99) -exten => s,58,GotoIfTime(*|*|31|oct?60) -exten => s,59,Goto(62) -exten => s,60,Playback(greetings/halloween) -exten => s,61,Goto(98) -exten => s,62,GotoIfTime(*|mon|15-21|jan?64) -exten => s,63,Goto(66) -exten => s,64,Playback(greetings/mlkDay) -exten => s,65,Goto(97) -exten => s,66,GotoIfTime(*|thu|22-28|nov?68) -exten => s,67,Goto(70) -exten => s,68,Playback(greetings/thanksgiving) -exten => s,69,Goto(96) -exten => s,70,GotoIfTime(*|mon|25-31|may?72) -exten => s,71,Goto(74) -exten => s,72,Playback(greetings/memorial) -exten => s,73,Goto(95) -exten => s,74,GotoIfTime(*|mon|1-7|sep?76) -exten => s,75,Goto(78) -exten => s,76,Playback(greetings/labor) -exten => s,77,Goto(94) -exten => s,78,GotoIfTime(*|mon|15-21|feb?80) -exten => s,79,Goto(82) -exten => s,80,Playback(greetings/president) -exten => s,81,Goto(93) -exten => s,82,GotoIfTime(*|sun|8-14|may?84) -exten => s,83,Goto(86) -exten => s,84,Playback(greetings/mothers) -exten => s,85,Goto(92) -exten => s,86,GotoIfTime(*|sun|15-21|jun?88) -exten => s,87,Goto(90) -exten => s,88,Playback(greetings/fathers) -exten => s,89,Goto(91) -exten => s,90,Playback(greetings/hello) -exten => s,91,NoOp(Finish iftime-iftime-iftime-iftime-iftime-iftime-iftime-iftime-iftime-iftime-iftime-iftime-iftime-homeline-93-94-95-96-97-98-99-100-101-102-103-104-105) -exten => s,92,NoOp(Finish iftime-iftime-iftime-iftime-iftime-iftime-iftime-iftime-iftime-iftime-iftime-iftime-homeline-93-94-95-96-97-98-99-100-101-102-103-104) -exten => s,93,NoOp(Finish iftime-iftime-iftime-iftime-iftime-iftime-iftime-iftime-iftime-iftime-iftime-homeline-93-94-95-96-97-98-99-100-101-102-103) -exten => s,94,NoOp(Finish iftime-iftime-iftime-iftime-iftime-iftime-iftime-iftime-iftime-iftime-homeline-93-94-95-96-97-98-99-100-101-102) -exten => s,95,NoOp(Finish iftime-iftime-iftime-iftime-iftime-iftime-iftime-iftime-iftime-homeline-93-94-95-96-97-98-99-100-101) -exten => s,96,NoOp(Finish iftime-iftime-iftime-iftime-iftime-iftime-iftime-iftime-homeline-93-94-95-96-97-98-99-100) -exten => s,97,NoOp(Finish iftime-iftime-iftime-iftime-iftime-iftime-iftime-homeline-93-94-95-96-97-98-99) -exten => s,98,NoOp(Finish iftime-iftime-iftime-iftime-iftime-iftime-homeline-93-94-95-96-97-98) -exten => s,99,NoOp(Finish iftime-iftime-iftime-iftime-iftime-homeline-93-94-95-96-97) -exten => s,100,NoOp(Finish iftime-iftime-iftime-iftime-homeline-93-94-95-96) -exten => s,101,NoOp(Finish iftime-iftime-iftime-homeline-93-94-95) -exten => s,102,NoOp(Finish iftime-iftime-homeline-93-94) -exten => s,103,NoOp(Finish iftime-homeline-93) -exten => s,104,Background(murphy-homeline-intro1) -exten => s,105,NoOp(End of Extension s) -exten => _sw-92-.,10,Set(z=${direct}-2) -exten => _sw-92-.,11,Goto(homeline-kids|${z}|1) -exten => sw-92-,10,Goto(sw-92-.|10) -exten => sw-92-2,10,Macro(std-priv-exten|Zap/3r1&Zap/5r1|2|25|mtw|telemarket|telemarket) -exten => sw-92-2,11,Goto(s|loopback) -exten => sw-92-1,10,Macro(std-priv-exten|Zap/6r3&Sip/murf|1|25|mpA(beep)tw|telemarket|telemarket) -exten => sw-92-1,11,Goto(s|loopback) -exten => 1,1,TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm) -exten => 1,2,TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/2/greet.wav&) -exten => 1,3,Macro(std-priv-exten|Zap/3r1&Zap/5r1|2|25|mtw|telemarket|telemarket) -exten => 1,4,Goto(s|loopback) -exten => 2,1,Goto(homeline-kids|s|begin) -exten => 21,1,Dial(IAX2/seaniax|20|T) -exten => 3,1,Macro(std-priv-exten|Zap/6r3&Sip/murf|1|25|mpA(beep)tw|telemarket|telemarket) -exten => 3,2,Goto(s|loopback) -exten => 4,1,VoicemailMain() -exten => 4,2,Goto(s|loopback) -exten => 5,1,Goto(home-introduction|s|begin) -exten => 6,1,Goto(telemarket|s|begin) -exten => 7,1,agi(tts-riddle.agi) -exten => 7,2,Background(gsm/what-time-it-is2) -exten => 7,3,SayUnixTime() -exten => 7,4,Goto(s|loopback) -exten => 792,1,Goto(pageall|s|begin) -exten => 793,1,Read(zz||0||1|0) -exten => 793,2,SayDigits(${zz}) -exten => t,1,Set(repeatcount=${repeatcount} + 1) -exten => t,2,GotoIf($[${repeatcount} < 3 ]?3:4) -exten => t,3,Goto(s|loopback) -exten => t,4,NoOp(Finish if-homeline-106) -exten => t,5,Hangup() -exten => i,1,Background(invalid) -exten => i,2,Goto(s|loopback) -exten => o,1,Congestion() -exten => fax,1,Dial(Zap/4) - - -[pageall] -exten => s,1(begin),AGI(callall) -exten => s,2,MeetMe(5555|dtqp) -exten => s,3,MeetMeAdmin(5555|K) -exten => s,4,Hangup() -exten => h,1(begin),MeetMeAdmin(5555|K) -exten => h,2,Background(conf-muted) -exten => h,3,Hangup() - - -[add-to-conference] -exten => start,1,NoCDR() -exten => start,2,MeetMe(5555|dmqp) -exten => h,1,Hangup() - - -[home-introduction] -exten => s,1(begin),Background(intro-options) -exten => 1,1,Playback(priv-callerintros/${CALLERID(num)}) -exten => 1,2,Goto(s|begin) -exten => 2,1,Goto(home-introduction-record|s|begin) -exten => 3,1,Goto(homeline|s|loopback) -exten => 4,1,Playback(intro-intro) -exten => 4,2,Goto(s|begin) -exten => t,1,Goto(s|begin) -exten => i,1,Background(invalid) -exten => i,2,Goto(s|begin) -exten => o,1,Goto(s|begin) - - -[home-introduction-record] -exten => s,1(begin),Background(intro-record-choices) -exten => 1,1,Playback(intro-record) -exten => 1,2,Goto(2|begin) -exten => 2,1(begin),Background(intro-start) -exten => 2,2,Background(beep) -exten => 2,3,Record(priv-callerintros/${CALLERID(num)}:gsm|3) -exten => 2,4,Background(priv-callerintros/${CALLERID(num)}) -exten => 2,5,Goto(home-introduction|s|begin) -exten => t,1,Goto(s|begin) -exten => i,1,Background(invalid) -exten => i,2,Goto(s|begin) -exten => o,1,Goto(s|begin) - - -[homeline-kids] -exten => s,1(begin),Background(murphy-homeline-kids) -exten => 1,1,TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm) -exten => 1,2,TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/3/greet.wav&) -exten => 1,3,Macro(std-priv-exten|IAX2/seaniax&Zap/5r2|3|35|mtw|telemarket|telemarket) -exten => 1,4,Goto(homeline|s|loopback) -exten => 2,1,TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm) -exten => 2,2,TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/4/greet.wav&) -exten => 2,3,Voicemail(u4) -exten => 2,4,Goto(homeline|s|loopback) -exten => 3,1,TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm) -exten => 3,2,TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/5/greet.wav&) -exten => 3,3,Macro(std-priv-exten|Zap/3r2&Zap/5r2|5|35|mtw|telemarket|telemarket) -exten => 3,4,Goto(homeline|s|loopback) -exten => 4,1,TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm) -exten => 4,2,TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/6/greet.wav&) -exten => 4,3,Macro(std-priv-exten|Zap/3r2&Zap/5r2|6|35|mtw|telemarket|telemarket) -exten => 4,4,Goto(homeline|s|loopback) -exten => 5,1,TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm) -exten => 5,2,TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/7/greet.wav&) -exten => 5,3,Macro(std-priv-exten|Zap/3r2&Zap/5r2|7|35|mtw|telemarket|telemarket) -exten => 5,4,Goto(homeline|s|loopback) -exten => 6,1,TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm) -exten => 6,2,TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/8/greet.wav&) -exten => 6,3,Macro(std-priv-exten|Zap/3r2&Zap/5r2|8|35|mtw|telemarket|telemarket) -exten => 6,4,Goto(homeline|s|loopback) -exten => 7,1,TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm) -exten => 7,2,TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/9/greet.wav&) -exten => 7,3,Macro(std-priv-exten|Zap/3r2&Zap/5r2|9|35|mtw|telemarket|telemarket) -exten => 7,4,Goto(homeline|s|loopback) -exten => t,1,Goto(s|begin) -exten => i,1,Background(invalid) -exten => i,2,Goto(s|begin) -exten => o,1,Goto(s|begin) - - -[voipworkline] -exten => s,1(begin),Answer() -exten => s,2,TrySystem(/usr/local/bin/who-is-it ${CALLERID(num)} "${CALLERID(name)}"&) -exten => s,3,Goto(workline|s|loopback) -exten => 7075679201,1,Answer() -exten => 7075679201,2,TrySystem(/usr/local/bin/who-is-it ${CALLERID(num)} "${CALLERID(name)}"&) -exten => 7075679201,3,Goto(workline|s|loopback) - - -[workline] -exten => s,1(begin),Answer() -exten => s,2,Wait(1) -exten => s,3,Set(repeatcount=0) -exten => s,4,Zapateller(nocallerid) -exten => s,5,Macro(fillcidname) -exten => s,6,TrySystem(/usr/local/bin/who-is-it ${CALLERID(num)} "${CALLERID(name)}"&) -exten => s,7(loopback),Background(greetings/greeting) -exten => s,8,Background(murphy-office-intro1) -exten => 1,1,TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm) -exten => 1,2,TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/1/greet.wav&) -exten => 1,3,Macro(std-priv-exten|Zap/6&Sip/murf|1|30|mtw|telemarket|telemarket) -exten => 1,4,Goto(s|loopback) -exten => 4,1,VoicemailMain() -exten => 4,2,Goto(s|loopback) -exten => 6,1,Goto(telemarket|s|begin) -exten => 793,1,Read(zz||0||1|0) -exten => 793,2,SayDigits(${zz}) -exten => t,1,Set(repeatcount=$[${repeatcount} + 1]) -exten => t,2,GotoIf($[${repeatcount} < 3 ]?3:4) -exten => t,3,Goto(s|loopback) -exten => t,4,NoOp(Finish if-workline-107) -exten => t,5,Hangup() -exten => i,1,Background(invalid) -exten => i,2,Goto(s|loopback) -exten => o,1,Congestion() -exten => fax,1,Answer() -exten => fax,2,Dial(Zap/4) - - -[dialFWD] -ignorepat => 8 -ignorepat => 9 -exten => _83.,1,Set(CALLERID(name)=${FWDCIDNAME}) -exten => _83.,2,Dial(IAX2/${FWDNUMBER}:${FWDPASSWORD}@iax2.fwdnet.net/${EXTEN:2}|60|r) -exten => _83.,3,Congestion() -exten => _82NXX,1,Set(CALLERID(name)=${FWDCIDNAME}) -exten => _82NXX,2,Dial(IAX2/${FWDNUMBER}:${FWDPASSWORD}@iax2.fwdnet.net/${EXTEN:2}|60|r) -exten => _82NXX,3,Congestion() -exten => _92NXX,1,Set(CALLERID(name)=${FWDCIDNAME}) -exten => _92NXX,2,Dial(IAX2/${FWDNUMBER}:${FWDPASSWORD}@iax2.fwdnet.net/${EXTEN:2}|60|r) -exten => _92NXX,3,Congestion() - - -[dialiaxtel] -ignorepat => 8 -ignorepat => 9 -exten => _81700NXXXXXX,1,Dial(IAX2/zorch:zilchnoodle@iaxtel.com/${EXTEN:1}@iaxtel) -exten => _81800NXXXXXX,1,Dial(IAX2/zorch:zilchnoodle@iaxtel.com/${EXTEN:1}@iaxtel) -exten => _91700NXXXXXX,1,Dial(IAX2/zorch:zilchnoodle@iaxtel.com/${EXTEN:1}@iaxtel) -exten => _91800NXXXXXX,1,Dial(IAX2/zorch:zilchnoodle@iaxtel.com/${EXTEN:1}@iaxtel) - - -[dialgoiax] -ignorepat => 9 -exten => _93.,1,Set(CALLERID(name)="Joe Worker") -exten => _93.,2,Dial(IAX2/878201007658:stickyfinger295@server1.goiax.com/${EXTEN:2}|60|r) -exten => _93.,3,Congestion() - - -[homefirst] -ignorepat => 9 -exten => _91NXXNXXXXXX,1,Macro(ciddial|${EXTEN:1}|${EXTEN:2}|30|TW|Zap/1) -exten => _9754XXXX,1,Macro(ciddial|${EXTEN:1}|707${EXTEN:1}|30|TW|Zap/1) -exten => _9574XXXX,1,Macro(ciddial|${EXTEN:1}|707${EXTEN:1}|30|TW|Zap/1) -exten => _9202XXXX,1,Macro(ciddial|${EXTEN:1}|707${EXTEN:1}|30|TW|Zap/1) -exten => _9219XXXX,1,Macro(ciddial|${EXTEN:1}|707${EXTEN:1}|30|TW|Zap/1) -exten => _9254XXXX,1,Macro(ciddial|${EXTEN:1}|707${EXTEN:1}|30|TW|Zap/1) -exten => _9716XXXX,1,Macro(ciddial|${EXTEN:1}|707${EXTEN:1}|30|TW|Zap/1) -exten => _9NXXXXXX,1,Macro(ciddial|1707${EXTEN:1}|707${EXTEN:1}|30|TW|Zap/1) -exten => _9011.,1,Macro(ciddial|${EXTEN:1}|${EXTEN:1}|30|TW|Zap/1) -exten => _9911,1,Dial(Zap/1/911|30|T) -exten => _9411,1,Dial(Zap/1/411|30|T) - - -[workfirst] -ignorepat => 9 -exten => _91NXXNXXXXXX,1,Macro(ciddial2|${EXTEN:1}|${EXTEN:2}|30|TW|Zap/1) -exten => _9754XXXX,1,Macro(ciddial2|${EXTEN:1}|707${EXTEN:1}|30|TW|Zap/1) -exten => _9574XXXX,1,Macro(ciddial2|${EXTEN:1}|707${EXTEN:1}|30|TW|Zap/1) -exten => _9202XXXX,1,Macro(ciddial2|${EXTEN:1}|707${EXTEN:1}|30|TW|Zap/1) -exten => _9219XXXX,1,Macro(ciddial2|${EXTEN:1}|707${EXTEN:1}|30|TW|Zap/1) -exten => _9254XXXX,1,Macro(ciddial2|${EXTEN:1}|707${EXTEN:1}|30|TW|Zap/1) -exten => _9716XXXX,1,Macro(ciddial2|${EXTEN:1}|707${EXTEN:1}|30|TW|Zap/1) -exten => _9NXXXXXX,1,Macro(ciddial2|1707${EXTEN:1}|707${EXTEN:1}|30|TW|Zap/1) -exten => _9911,1,Dial(Zap/1/911|30|T) -exten => _9411,1,Dial(Zap/1/411|30|T) - - -[force_cell] -ignorepat => 8 -exten => _81NXXNXXXXXX,1,Macro(ciddial|${EXTEN:1}#|${EXTEN:2}|30|TW|Zap/2) -exten => _8754XXXX,1,Macro(ciddial|${EXTEN:1}#|707${EXTEN:1}|30|TW|Zap/2) -exten => _8574XXXX,1,Macro(ciddial|${EXTEN:1}#|707${EXTEN:1}|30|TW|Zap/2) -exten => _8202XXXX,1,Macro(ciddial|${EXTEN:1}#|707${EXTEN:1}|30|TW|Zap/2) -exten => _8219XXXX,1,Macro(ciddial|${EXTEN:1}#|707${EXTEN:1}|30|TW|Zap/2) -exten => _8254XXXX,1,Macro(ciddial|${EXTEN:1}#|707${EXTEN:1}|30|TW|Zap/2) -exten => _8716XXXX,1,Macro(ciddial|${EXTEN:1}#|707${EXTEN:1}|30|TW|Zap/2) -exten => _8NXXXXXX,1,Macro(ciddial|${EXTEN:1}#|707${EXTEN:1}|30|TW|Zap/2) -exten => _8911,1,Dial(Zap/1/911|30|T) -exten => _8411,1,Dial(Zap/1/411|30|T) - - -[force_home] -ignorepat => 8 -exten => _81NXXNXXXXXX,1,Macro(ciddial3|${EXTEN:1}#|${EXTEN:2}|30|TW|Zap/1) -exten => _8754XXXX,1,Macro(ciddial3|${EXTEN:1}#|707${EXTEN:1}|30|TW|Zap/1) -exten => _8574XXXX,1,Macro(ciddial3|${EXTEN:1}#|707${EXTEN:1}|30|TW|Zap/1) -exten => _8202XXXX,1,Macro(ciddial3|${EXTEN:1}#|707${EXTEN:1}|30|TW|Zap/1) -exten => _8219XXXX,1,Macro(ciddial3|${EXTEN:1}#|707${EXTEN:1}|30|TW|Zap/1) -exten => _8254XXXX,1,Macro(ciddial3|${EXTEN:1}#|707${EXTEN:1}|30|TW|Zap/1) -exten => _8716XXXX,1,Macro(ciddial3|${EXTEN:1}#|707${EXTEN:1}|30|TW|Zap/1) -exten => _8NXXXXXX,1,Macro(ciddial3|1707${EXTEN:1}#|707${EXTEN:1}|30|TW|Zap/1) -exten => _8911,1,Dial(Zap/1/911|30|T) -exten => _8411,1,Dial(Zap/1/411|30|T) - - -[homeext] -ignorepat => 8 -ignorepat => 9 -include => parkedcalls -include => homefirst -include => force_cell -exten => s,1(loopback),Wait(0) -exten => 1,1,Macro(std-priv-exten|Zap/3&Zap/5|2|35|mtw|telemarket|telemarket) -exten => 1,2,Goto(s|loopback) -exten => 2,1,Macro(std-priv-exten|Zap/6&Zap/5|1|35|mpA(beep3)Tt|telemarket|telemarket) -exten => 2,2,Goto(s|loopback) -exten => 4,1,VoicemailMain() -exten => 5,1,Record(recording:gsm) -exten => 5,2,Background(recording) -exten => 6,1,Background(recording) -exten => 760,1,DateTime() -exten => 760,2,Goto(s|loopback) -exten => 761,1,Record(announcement:gsm) -exten => 761,2,TrySystem(/usr/bin/play /var/lib/asterisk/sounds/announcement.gsm&) -exten => 761,3,Goto(s|loopback) -exten => 762,1,agi(tts-riddle.agi) -exten => 762,2,Background(gsm/what-time-it-is2) -exten => 762,3,SayUnixTime() -exten => 762,4,Goto(s|loopback) -exten => 763,1,Set(CALLERID(num)=) -exten => 763,2,Dial(Zap/6r3|35|mptA(beep3)) -exten => 763,3,Hangup() -exten => 764,1,Set(CALLERID(num)=) -exten => 764,2,Dial(Zap/6r3|35|mptnA(beep3)) -exten => 764,3,Hangup() -exten => 765,1,Set(CALLERID(num)=) -exten => 765,2,Dial(Zap/6r3|35|mptNA(beep3)) -exten => 765,3,Hangup() -exten => 766,1,Dial(Zap/6r3|35|mptNA(beep3)) -exten => 766,2,Hangup() -exten => 767,1,Dial(Zap/6r3|35|mptnA(beep3)) -exten => 767,2,Hangup() -exten => 769,1,Playtones(dial) -exten => 769,2,Wait(2) -exten => 769,3,Playtones(busy) -exten => 769,4,Wait(2) -exten => 769,5,Playtones(ring) -exten => 769,6,Wait(2) -exten => 769,7,Playtones(congestion) -exten => 769,8,Wait(2) -exten => 769,9,Playtones(callwaiting) -exten => 769,10,Wait(2) -exten => 769,11,Playtones(dialrecall) -exten => 769,12,Wait(2) -exten => 769,13,Playtones(record) -exten => 769,14,Wait(2) -exten => 769,15,Playtones(info) -exten => 769,16,Wait(5) -exten => 769,17,Hangup() -exten => 790,1,MeetMe(790|p) -exten => 792,1,Goto(pageall|s|begin) -exten => 795,1,AGI(wakeup.agi) -exten => 795,2,Congestion() -exten => 544716,1,TrySystem(/usr/local/bin/who-is-it ${CALLERID(num)} "${CALLERID(name)}"&) -exten => 544716,2,Goto(s|loopback) -exten => i,1,Background(invalid) -exten => i,2,Goto(s|loopback) -exten => o,1,Goto(s|loopback) -exten => t,1,Congestion() - - -[fromvmhome] -exten => 1,1,Dial(Zap/6&Sip/murf|20|Tt) -exten => 2,1,Dial(Zap/3&Zap/5|20|Tt) -exten => _707202XXXX,1,Macro(ciddial|1${EXTEN:3}|${EXTEN}|30|TW|Zap/1) -exten => _707219XXXX,1,Macro(ciddial|1${EXTEN:3}|${EXTEN}|30|TW|Zap/1) -exten => _707254XXXX,1,Macro(ciddial|1${EXTEN:3}|${EXTEN}|30|TW|Zap/1) -exten => _707716XXXX,1,Macro(ciddial|1${EXTEN:3}|${EXTEN}|30|TW|Zap/1) -exten => _707754XXXX,1,Macro(ciddial|${EXTEN:3}|${EXTEN}|30|TW|Zap/1) -exten => _707574XXXX,1,Macro(ciddial|${EXTEN:3}|${EXTEN}|30|TW|Zap/1) -exten => _NXXNXXXXXX,1,Macro(ciddial|1${EXTEN}|${EXTEN}|30|TW|Zap/1) -exten => _1NXXNXXXXXX,1,Macro(ciddial|${EXTEN}|${EXTEN:1}|30|TW|Zap/1) -exten => _754XXXX,1,Macro(ciddial|${EXTEN}|707${EXTEN}|30|TW|Zap/1) -exten => _574XXXX,1,Macro(ciddial|${EXTEN}|707${EXTEN}|30|TW|Zap/1) -exten => _NXXXXXX,1,Macro(ciddial|1707${EXTEN}|707${EXTEN}|30|TW|Zap/1) -exten => _911,1,Macro(ciddial|911|911|30|TW|Zap/1) -exten => _411,1,Macro(ciddial|411|411|30|TW|Zap/1) - - -[fromvmwork] -exten => 1,1,Dial(Zap/6&Sip/murf|20|Tt) -exten => 2,1,Dial(Zap/3&Zap/5|20|Tt) -exten => _707202XXXX,1,Macro(ciddial|1${EXTEN:3}|${EXTEN}|30|TW|Zap/1) -exten => _707219XXXX,1,Macro(ciddial|1${EXTEN:3}|${EXTEN}|30|TW|Zap/1) -exten => _707254XXXX,1,Macro(ciddial|1${EXTEN:3}|${EXTEN}|30|TW|Zap/1) -exten => _707716XXXX,1,Macro(ciddial|1${EXTEN:3}|${EXTEN}|30|TW|Zap/1) -exten => _707754XXXX,1,Macro(ciddial|${EXTEN:3}|${EXTEN}|30|TW|Zap/1) -exten => _707574XXXX,1,Macro(ciddial|${EXTEN:3}|${EXTEN}|30|TW|Zap/1) -exten => _NXXNXXXXXX,1,Macro(ciddial|1${EXTEN}|${EXTEN}|30|TW|Zap/1) -exten => _1NXXNXXXXXX,1,Macro(ciddial|${EXTEN}|${EXTEN:1}|30|TW|Zap/1) -exten => _754XXXX,1,Macro(ciddial|${EXTEN}|707${EXTEN}|30|TW|Zap/1) -exten => _574XXXX,1,Macro(ciddial|${EXTEN}|707${EXTEN}|30|TW|Zap/1) -exten => _NXXXXXX,1,Macro(ciddial|1707${EXTEN}|707${EXTEN}|30|TW|Zap/1) -exten => 911,1,Macro(ciddial|911|911|30|TW|Zap/1) -exten => 411,1,Macro(ciddial|411|411|30|TW|Zap/1) - - -[fromSeanUniden] -include => parkedcalls -exten => 21,1,Dial(IAX2/seaniax|20|T) -exten => _707202XXXX,1,Macro(ciddial|${EXTEN:3}|${EXTEN}|30|TW|Zap/1) -exten => _707219XXXX,1,Macro(ciddial|${EXTEN:3}|${EXTEN}|30|TW|Zap/1) -exten => _707254XXXX,1,Macro(ciddial|${EXTEN:3}|${EXTEN}|30|TW|Zap/1) -exten => _707716XXXX,1,Macro(ciddial|${EXTEN:3}|${EXTEN}|30|TW|Zap/1) -exten => _707754XXXX,1,Macro(ciddial|${EXTEN:3}|${EXTEN}|30|TW|Zap/1) -exten => _707574XXXX,1,Macro(ciddial|${EXTEN:3}|${EXTEN}|30|TW|Zap/1) -exten => _NXXNXXXXXX,1,Macro(ciddial|1${EXTEN}|${EXTEN}|30|TW|Zap/1) -exten => _1NXXNXXXXXX,1,Macro(ciddial|${EXTEN}|${EXTEN:1}|30|TW|Zap/1) -exten => _754XXXX,1,Macro(ciddial|${EXTEN}|707${EXTEN}|30|TW|Zap/1) -exten => _574XXXX,1,Macro(ciddial|${EXTEN}|707${EXTEN}|30|TW|Zap/1) -exten => _NXXXXXX,1,Macro(ciddial|1707${EXTEN}|707${EXTEN}|30|TW|Zap/1) -exten => 911,1,Macro(ciddial|911|911|30|TW|Zap/1) -exten => 411,1,Macro(ciddial|411|411|30|TW|Zap/1) - - -[workext] -ignorepat => 8 -ignorepat => 9 -include => parkedcalls -include => workfirst -include => force_home -include => dialFWD -include => dialiaxtel -include => dialgoiax -exten => s,1(loopback),Wait(0) -exten => 1,1,Dial(Zap/3&Zap/5|20|tT) -exten => 2,1,Dial(Zap/5&Zap/6|20|tT) -exten => 21,1,Dial(IAX2/seaniax|20|T) -exten => 22,1,Set(CALLERID(num)=1234567890) -exten => 22,2,Set(CALLERID(name)=TestCaller) -exten => 22,3,Dial(Zap/5|20|mP()A(beep)tw) -exten => 22,4,NoOp(here is dialstatus: ${DIALSTATUS}...) -exten => 22,5,Goto(s|loopback) -exten => 4,1,VoicemailMain() -exten => 4,2,Goto(s|loopback) -exten => 5,1,Record(recording:gsm) -exten => 5,2,Background(recording) -exten => 6,1,ZapBarge() -exten => 760,1,DateTime() -exten => 760,2,Goto(s|loopback) -exten => 761,1,ZapBarge() -exten => 761,2,Goto(s|loopback) -exten => 765,1,Playback(demo-echotest) -exten => 765,2,Echo() -exten => 765,3,Playback(demo-echodone) -exten => 765,4,Goto(s|loopback) -exten => 766,1,Festival(The other thing to watch is neuro-electronics: the ability to interface technology with our neural system: My wife: Sigrid: has had a cochlear implant since 1996. This once profoundly deaf person now uses the phone: recognizes accents: and listens to movies and recorded books.) -exten => 766,2,Goto(s|loopback) -exten => 767,1,agi(tts-riddle.agi) -exten => 767,2,Background(gsm/what-time-it-is2) -exten => 767,3,SayUnixTime() -exten => 767,4,Goto(s|loopback) -exten => 768,1,agi(tts-computer.agi) -exten => 771,1,eagi(eagi-test) -exten => 771,2,agi(my-agi-test) -exten => 772,1,agi(wakeup.agi) -exten => 775,1,GotoIf($[${EXTEN}=${EXTEN} ]?2:4) -exten => 775,2,BackGround(digits/1) -exten => 775,3,Goto(5) -exten => 775,4,BackGround(digits/0) -exten => 775,5,NoOp(Finish if-workext-108) -exten => 775,6,GotoIf($[${EXTEN}=${LANGUAGE} ]?7:9) -exten => 775,7,BackGround(digits/1) -exten => 775,8,Goto(10) -exten => 775,9,BackGround(digits/0) -exten => 775,10,NoOp(Finish if-workext-109) -exten => 775,11,BackGround(digits/2) -exten => 776,1,Set(TEST=00359889811777) -exten => 776,2,GotoIf($[${TEST}= 00359889811777 ]?3:5) -exten => 776,3,BackGround(digits/1) -exten => 776,4,Goto(6) -exten => 776,5,BackGround(digits/0) -exten => 776,6,NoOp(Finish if-workext-110) -exten => 776,7,GotoIf($[${TEST}= 00359889811888 ]?8:10) -exten => 776,8,BackGround(digits/1) -exten => 776,9,Goto(11) -exten => 776,10,BackGround(digits/0) -exten => 776,11,NoOp(Finish if-workext-111) -exten => 776,12,Hangup() -exten => 790,1,MeetMe(790|p) -exten => 792,1,Goto(pageall|s|begin) -exten => 793,1,NoOp(Hello| this is included from include1.ael2) -exten => 793,2,NoOp(This was included from include2.ael2) -exten => 793,3,NoOp(This is include3.ael2!) -exten => 793,4,NoOp(Include5.ael2 doesn't include anything| either!) -exten => 793,5,NoOp(This is include4.ael2! Isn't it cool!?!?!?!) -exten => 793,6,NoOp(4 doesn't include anything) -exten => 795,1,AGI(wakeup.agi) -exten => 795,2,Congestion() -exten => 797,1,Set(CONFCIDNA=${CALLERID(name)}) -exten => 797,2,Set(CONFCIDNU=${CALLERID(num)}) -exten => 797,3,AGI(callall) -exten => 797,4,AGI(submit-announce.agi) -exten => 797,5,Hangup() - - -[wakeup] -exten => 3,1,Dial(Zap/3|30) -exten => 4,1,Dial(Zap/4|30) -exten => 5,1,Dial(Zap/5|30) -exten => 6,1,Dial(Zap/6|30) -exten => 99,1,Dial(IAX2/murfiaxphone|30) -exten => 97,1,Dial(IAX2/ryaniax|30) -exten => 94,1,Dial(IAX2/seaniax|30) - - -[announce-all] -exten => s,1(begin),MeetMe(5555|dtqp) -exten => s,2,MeetMeAdmin(5555|K) -exten => s,3,Hangup() -exten => h,1,MeetMeAdmin(5555|K) -exten => h,2,Hangup() - - -[telemarket] -exten => s,1(begin),Playback(telemarketer-intro) -exten => s,2,Playback(telemarketer-choices) -exten => 1,1,Goto(telemarket-charity|s|begin) -exten => 2,1,Goto(telemarket-political|s|begin) -exten => 3,1,Goto(telemarket-pollster|s|begin) -exten => 4,1,Goto(telemarket-research|s|begin) -exten => 5,1,Goto(telemarket-magazine|s|begin) -exten => 6,1,Goto(telemarket-commercial|s|begin) -exten => 7,1,Goto(telemarket-other|s|begin) -exten => t,1,Goto(telemarket|s|begin) -exten => i,1,Goto(telemarket|s|begin) -exten => o,1,Goto(telemarket|s|begin) - - -[telemarket-charity] -exten => s,1(begin),Playback(telemark-charity-intro) -exten => s,2,Playback(telemark-charity-choices) -exten => 1,1,Goto(telemarket-char-disease|s|begin) -exten => 2,1,Goto(telemarket-char-handicap|s|begin) -exten => 3,1,Goto(telemarket-char-police|s|begin) -exten => 4,1,Goto(telemarket-char-school|s|begin) -exten => 5,1,Goto(telemarket-char-college|s|begin) -exten => 6,1,Goto(telemarket-char-animal|s|begin) -exten => 7,1,Goto(telemarket-char-candidate|s|begin) -exten => 8,1,Goto(telemarket-char-abuse|s|begin) -exten => 9,1,Goto(telemarket-char-other|s|begin) -exten => t,1,Goto(telemarket|s|begin) -exten => i,1,Goto(telemarket|s|begin) -exten => o,1,Goto(telemarket|s|begin) - - -[telemarket-char-disease] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-char-handicap] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-char-police] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-char-school] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-char-college] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-char-animal] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-char-candidate] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-char-abuse] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-char-other] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-sorry] -exten => s,1(begin),Playback(telemarket-sorry) -exten => s,2,Hangup() - - -[telemarket-exception] -exten => s,1(begin),Playback(telemarket-success) -exten => s,2,Hangup() - - -[telemarket-political] -exten => s,1(begin),Playback(telemark-polit-intro) -exten => s,2,Playback(telemark-polit-choices) -exten => 1,1,Goto(telemarket-poli-Am1st|s|begin) -exten => 2,1,Goto(telemarket-poli-American|s|begin) -exten => 3,1,Goto(telemarket-poli-AmHer|s|begin) -exten => 4,1,Goto(telemarket-poli-AmInd|s|begin) -exten => 5,1,Goto(telemarket-poli-AmNaz|s|begin) -exten => 6,1,Goto(telemarket-poli-Pot|s|begin) -exten => 7,1,Goto(telemarket-poli-AmRef|s|begin) -exten => 8,1,Goto(telemarket-poli-CFP|s|begin) -exten => 9,1,Goto(telemarket-political2|s|begin) -exten => t,1,Goto(telemarket|s|begin) -exten => i,1,Goto(telemarket|s|begin) -exten => o,1,Goto(telemarket|s|begin) - - -[telemarket-political2] -exten => s,1(begin),Playback(telemark-politx-intro) -exten => s,2,Playback(telemark-polit2-choices) -exten => 1,1,Goto(telemarket-poli-Communist|s|begin) -exten => 2,1,Goto(telemarket-poli-Constit|s|begin) -exten => 3,1,Goto(telemarket-poli-FamVal|s|begin) -exten => 4,1,Goto(telemarket-poli-FreedSoc|s|begin) -exten => 5,1,Goto(telemarket-poli-Grassroot|s|begin) -exten => 6,1,Goto(telemarket-poli-Green|s|begin) -exten => 7,1,Goto(telemarket-poli-Greens|s|begin) -exten => 8,1,Goto(telemarket-poli-Independence|s|begin) -exten => 9,1,Goto(telemarket-political3|s|begin) -exten => t,1,Goto(telemarket|s|begin) -exten => i,1,Goto(telemarket|s|begin) -exten => o,1,Goto(telemarket|s|begin) - - -[telemarket-political3] -exten => s,1(begin),Playback(telemark-politx-intro) -exten => s,2,Playback(telemark-polit3-choices) -exten => 1,1,Goto(telemarket-poli-IndAm|s|begin) -exten => 2,1,Goto(telemarket-poli-Labor|s|begin) -exten => 3,1,Goto(telemarket-poli-Liber|s|begin) -exten => 4,1,Goto(telemarket-poli-Light|s|begin) -exten => 5,1,Goto(telemarket-poli-NatLaw|s|begin) -exten => 6,1,Goto(telemarket-poli-New|s|begin) -exten => 7,1,Goto(telemarket-poli-NewUn|s|begin) -exten => 8,1,Goto(telemarket-poli-PeaceFree|s|begin) -exten => 9,1,Goto(telemarket-political4|s|begin) -exten => t,1,Goto(telemarket|s|begin) -exten => i,1,Goto(telemarket|s|begin) -exten => o,1,Goto(telemarket|s|begin) - - -[telemarket-political4] -exten => s,1(begin),Playback(telemark-politx-intro) -exten => s,2,Playback(telemark-polit4-choices) -exten => 1,1,Goto(telemarket-poli-Prohib|s|begin) -exten => 2,1,Goto(telemarket-poli-Ref|s|begin) -exten => 3,1,Goto(telemarket-poli-Revol|s|begin) -exten => 4,1,Goto(telemarket-poli-SocPart|s|begin) -exten => 5,1,Goto(telemarket-poli-SocAct|s|begin) -exten => 6,1,Goto(telemarket-poli-SocEq|s|begin) -exten => 7,1,Goto(telemarket-poli-SocLab|s|begin) -exten => 8,1,Goto(telemarket-poli-SocWork|s|begin) -exten => 9,1,Goto(telemarket-political5|s|begin) -exten => t,1,Goto(telemarket|s|begin) -exten => i,1,Goto(telemarket|s|begin) -exten => o,1,Goto(telemarket|s|begin) - - -[telemarket-political5] -exten => s,1(begin),Playback(telemark-politx-intro) -exten => s,2,Playback(telemark-polit5-choices) -exten => 1,1,Goto(telemarket-poli-South|s|begin) -exten => 2,1,Goto(telemarket-poli-SoInd|s|begin) -exten => 3,1,Goto(telemarket-poli-USPac|s|begin) -exten => 4,1,Goto(telemarket-poli-WTP|s|begin) -exten => 5,1,Goto(telemarket-poli-WWP|s|begin) -exten => 6,1,Goto(telemarket-poli-Democrat|s|begin) -exten => 7,1,Goto(telemarket-poli-Repub|s|begin) -exten => 8,1,Goto(telemarket-poli-other|s|begin) -exten => t,1,Goto(telemarket|s|begin) -exten => i,1,Goto(telemarket|s|begin) -exten => o,1,Goto(telemarket|s|begin) - - -[telemarket-poli-other] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-poli-Repub] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-poli-Democrat] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-poli-WWP] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-poli-WTP] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-poli-USPac] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-poli-SoInd] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-poli-South] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-poli-SocWork] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-poli-SocLab] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-poli-SocEq] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-poli-SocAct] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-poli-SocPart] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-poli-Revol] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-poli-Ref] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-poli-Prohib] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-poli-PeaceFree] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-poli-NewUn] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-poli-New] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-poli-NatLaw] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-poli-Light] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-poli-Liber] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-poli-Labor] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-poli-IndAm] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-poli-Independence] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-poli-Greens] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-poli-Green] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-poli-Grassroot] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-poli-FreedSoc] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-poli-FamVal] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-poli-Constit] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-poli-Communist] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-poli-CFP] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-poli-AmRef] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-poli-Pot] -exten => s,1(begin),Goto(telemarket-political|s|begin) - - -[telemarket-poli-AmNaz] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-poli-AmInd] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-poli-AmHer] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-poli-American] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-poli-Am1st] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-pollster] -exten => s,1(begin),Playback(telemark-poll-intro) -exten => s,2,Goto(telemarket-sorry|s|begin) -exten => t,1,Goto(telemarket|s|begin) -exten => i,1,Goto(telemarket|s|begin) -exten => o,1,Goto(telemarket|s|begin) - - -[telemarket-research] -exten => s,1(begin),Playback(telemark-research-intro) -exten => s,2,Goto(telemarket-sorry|s|begin) -exten => t,1,Goto(telemarket|s|begin) -exten => i,1,Goto(telemarket|s|begin) -exten => o,1,Goto(telemarket|s|begin) - - -[telemarket-magazine] -exten => s,1(begin),Playback(telemark-mag-choices) -exten => 1,1,Goto(telemark-mag-new|s|begin) -exten => 2,1,Goto(telemark-mag-renew|s|begin) -exten => 3,1,Goto(telemark-mag-survey|s|begin) -exten => 4,1,Goto(telemark-mag-verify|s|begin) -exten => 5,1,Goto(telemark-mag-other|s|begin) -exten => t,1,Goto(telemarket|s|begin) -exten => i,1,Goto(telemarket|s|begin) -exten => o,1,Goto(telemarket|s|begin) - - -[telemark-mag-new] -exten => s,1(begin),Playback(telemark-mag-new) -exten => s,2,Hangup() -exten => t,1,Goto(telemarket|s|begin) -exten => i,1,Goto(telemarket|s|begin) -exten => o,1,Goto(telemarket|s|begin) - - -[telemark-mag-renew] -exten => s,1(begin),Playback(telemark-mag-renew) -exten => s,2,Hangup() -exten => t,1,Goto(telemarket|s|begin) -exten => i,1,Goto(telemarket|s|begin) -exten => o,1,Goto(telemarket|s|begin) - - -[telemark-mag-survey] -exten => s,1(begin),Playback(telemark-mag-survey) -exten => s,2,Hangup() -exten => t,1,Goto(telemarket|s|begin) -exten => i,1,Goto(telemarket|s|begin) -exten => o,1,Goto(telemarket|s|begin) - - -[telemark-mag-verify] -exten => s,1(begin),Playback(telemark-mag-verify) -exten => s,2,Hangup() -exten => t,1,Goto(telemarket|s|begin) -exten => i,1,Goto(telemarket|s|begin) -exten => o,1,Goto(telemarket|s|begin) - - -[telemark-mag-other] -exten => s,1(begin),Goto(telemarket-sorry|s|begin) - - -[telemarket-commercial] -exten => s,1(begin),Playback(telemark-comm-intro) -exten => s,2,Voicemail(u82) -exten => s,3,Goto(telemarket-sorry|s|begin) -exten => t,1,Goto(telemarket|s|begin) -exten => i,1,Goto(telemarket|s|begin) -exten => o,1,Goto(telemarket|s|begin) - - -[telemarket-other] -exten => s,1(begin),Playback(telemark-other-intro) -exten => s,2,Hangup() -exten => t,1,Goto(telemarket|s|begin) -exten => i,1,Goto(telemarket|s|begin) -exten => o,1,Goto(telemarket|s|begin) diff --git a/pbx/ael/ael-test/ref.ael-vtest17 b/pbx/ael/ael-test/ref.ael-vtest17 deleted file mode 100644 index 0a8e30d31..000000000 --- a/pbx/ael/ael-test/ref.ael-vtest17 +++ /dev/null @@ -1,71 +0,0 @@ - - -[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,Set(~~EXTEN~~=${EXTEN}) -exten => 83,2,Goto(sw-2-${~~EXTEN~~}|10) -exten => 83,3,NoOp(Finish switch-extension-2) -exten => _sw-2-.,10,Goto(83|3) -exten => sw-2-,10,Goto(sw-2-.|10) -exten => _sw-2-[4-7]X,10,Verbose(and this too!) -exten => _sw-2-[4-7]X,11,Goto(sw-2-.|10) -exten => _sw-2-9X,10,Verbose(handle both 8x and 9x calls) -exten => _sw-2-9X,11,Goto(sw-2-49|10) -exten => _sw-2-8X,10,Verbose(do something to prepare it) -exten => _sw-2-8X,11,Goto(sw-2-99|10) - - -[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 diff --git a/pbx/ael/ael-test/ref.ael-vtest21 b/pbx/ael/ael-test/ref.ael-vtest21 deleted file mode 100644 index c4310476f..000000000 --- a/pbx/ael/ael-test/ref.ael-vtest21 +++ /dev/null @@ -1,9 +0,0 @@ -[globals] -AXLHAFT=wow-to-the-tenth-power -JibberWorthy=zinger3 -OFFICE_CODE=503 - - -[from-enum] -exten => _${OFFICE_CODE}XXXX,1,Answer() -exten => _${OFFICE_CODE}XXXX,2,Goto(${EXTEN:3}|1) diff --git a/pbx/ael/ael-test/ref.ael-vtest25 b/pbx/ael/ael-test/ref.ael-vtest25 deleted file mode 100644 index e2d4280b0..000000000 --- a/pbx/ael/ael-test/ref.ael-vtest25 +++ /dev/null @@ -1,7 +0,0 @@ - - -[test11] -exten => 841,1,Macro(test234|"testing"| ${CUT(EXTEN\,\,3)}) -exten => 841,2,Goto(${DB(uri/${uri_string})}|1) -exten => 841,3,Set(line=${DB(uri/${uri_string})}) -exten => 841,4,Goto(${line}|1) diff --git a/pbx/ael/ael-test/runtests b/pbx/ael/ael-test/runtests deleted file mode 100755 index 9209f0a54..000000000 --- a/pbx/ael/ael-test/runtests +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/bash -ORIG=`mktemp /tmp/mytest.XXXXXX` -NEW=`mktemp /tmp/mytest.XXXXXX` - -do_filter() { - sed 's/line:[0-9]*//; /^Executed.*/d; s/column=[0-9]*/ /; s/Cols: [0-9]*-[0-9]*/___/' -} - -for i in ael-test*; do - echo -n Test: $i.................. - (cd $i; ../../../../utils/aelparse -n -d | grep -v -i 'seconds' > ../res.$i) - do_filter < res.$i > $NEW - do_filter < ref.$i > $ORIG - if (diff -q $NEW $ORIG > /dev/null 2>&1 ) then - echo PASSED - rm res.$i - else - echo %%%%%%FAILED%%%%%% - # diff -u ref.$i res.$i - diff -u $ORIG $NEW - fi - -done - -for i in ael-ntest*; do - echo -n Test: $i................. - (cd $i; ../../../../utils/aelparse -d | grep -v -i 'seconds' > ../res.$i) - do_filter < res.$i > $NEW - do_filter < ref.$i > $ORIG - if (diff -q $NEW $ORIG > /dev/null 2>&1 ) then - echo PASSED - rm res.$i - else - echo %%%%%%FAILED%%%%%% - # diff -u ref.$i res.$i - diff -u $ORIG $NEW - fi - -done - -for i in ael-vtest*; do - echo -n Test: $i................. - (cd $i; ../../../../utils/aelparse -d -w -n | grep -v -i 'seconds' > ../res2.$i) - - if (diff -q ref.$i $i/extensions.conf.aeldump > /dev/null 2>&1 ) then - echo PASSED - rm res2.$i - rm $i/extensions.conf.aeldump - else - echo %%%%%%FAILED%%%%%% - # diff -u ref.$i res.$i - diff -u ref.$i $i/extensions.conf.aeldump - fi - -done -rm $NEW $ORIG diff --git a/pbx/ael/ael-test/setref b/pbx/ael/ael-test/setref deleted file mode 100755 index b483f05ae..000000000 --- a/pbx/ael/ael-test/setref +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -for i in res.*; do - refname=`echo $i | sed 's/^res/ref/'` - echo $refname - mv $i $refname -done diff --git a/pbx/ael/ael.flex b/pbx/ael/ael.flex deleted file mode 100644 index 41c2a2963..000000000 --- a/pbx/ael/ael.flex +++ /dev/null @@ -1,904 +0,0 @@ -/* - * Asterisk -- An open source telephony toolkit. - * - * Copyright (C) 2006, Digium, Inc. - * - * Steve Murphy <murf@parsetree.com> - * - * See http://www.asterisk.org for more information about - * the Asterisk project. Please do not directly contact - * any of the maintainers of this project for assistance; - * the project provides a web site, mailing lists and IRC - * channels for your use. - * - * This program is free software, distributed under the terms of - * the GNU General Public License Version 2. See the LICENSE file - * at the top of the source tree. - */ -/*! \file - * - * \brief Flex scanner description of tokens used in AEL2 . - * - */ - -/* - * Start with flex options: - * - * %x describes the contexts we have: paren, semic and argg, plus INITIAL - */ -%x paren semic argg comment curlystate wordstate brackstate - -/* prefix used for various globally-visible functions and variables. - * This renames also yywrap, but since we do not use it, we just - * add option noyywrap to remove it. - */ -%option prefix="ael_yy" -%option noyywrap - -/* I specify this option to suppress flex generating code with ECHO - in it. This generates compiler warnings in some systems; We've - seen the fwrite generate Unused variable warnings with 4.1.2 gcc. - Some systems have tweaked flex ECHO macro to keep the compiler - happy. To keep the warning message from getting output, I added - a default rule at the end of the patterns section */ -%option nodefault - -/* yyfree normally just frees its arg. It can be null sometimes, - which some systems will complain about, so, we'll define our own version */ -%option noyyfree - -/* batch gives a bit more performance if we are using it in - * a non-interactive mode. We probably don't care much. - */ -%option batch - -/* outfile is the filename to be used instead of lex.yy.c */ -%option outfile="ael_lex.c" - -/* - * These are not supported in flex 2.5.4, but we need them - * at the moment: - * reentrant produces a thread-safe parser. Not 100% sure that - * we require it, though. - * bison-bridge passes an additional yylval argument to yylex(). - * bison-locations is probably not needed. - */ -%option reentrant -%option bison-bridge -%option bison-locations - -%{ -#if !defined(STANDALONE_AEL) -ASTERISK_FILE_VERSION(__FILE__, "$Revision$") -#endif - -#include <sys/types.h> -#include <sys/stat.h> -#include <unistd.h> - -#if defined(__Darwin__) || defined(__CYGWIN__) -#define GLOB_ABORTED GLOB_ABEND -#endif -# include <glob.h> - -#include "asterisk/logger.h" -#include "asterisk/utils.h" -#include "ael/ael.tab.h" -#include "asterisk/ael_structs.h" - -/* - * A stack to keep track of matching brackets ( [ { } ] ) - */ -static char pbcstack[400]; /* XXX missing size checks */ -static int pbcpos = 0; -static void pbcpush(char x); -static int pbcpop(char x); -static int parencount = 0; - -/* - * A similar stack to keep track of matching brackets ( [ { } ] ) in word tokens surrounded by ${ ... } - */ -static char pbcstack2[400]; /* XXX missing size checks */ -static int pbcpos2 = 0; -static void pbcpush2(char x); -static int pbcpop2(char x); -static int parencount2 = 0; - -/* - * A similar stack to keep track of matching brackets ( [ { } ] ) in word tokens surrounded by $[ ... ] - */ -static char pbcstack3[400]; /* XXX missing size checks */ -static int pbcpos3 = 0; -static void pbcpush3(char x); -static int pbcpop3(char x); -static int parencount3 = 0; - - -/* - * current line, column and filename, updated as we read the input. - */ -static int my_lineno = 1; /* current line in the source */ -static int my_col = 1; /* current column in the source */ -char *my_file = 0; /* used also in the bison code */ -char *prev_word; /* XXX document it */ - -#define MAX_INCLUDE_DEPTH 50 - -/* - * flex is not too smart, and generates global functions - * without prototypes so the compiler may complain. - * To avoid that, we declare the prototypes here, - * even though these functions are not used. - */ -int ael_yyget_column (yyscan_t yyscanner); -void ael_yyset_column (int column_no , yyscan_t yyscanner); - -int ael_yyparse (struct parse_io *); - -/* - * A stack to process include files. - * As we switch into the new file we need to store the previous - * state to restore it later. - */ -struct stackelement { - char *fname; - int lineno; - int colno; - glob_t globbuf; /* the current globbuf */ - int globbuf_pos; /* where we are in the current globbuf */ - YY_BUFFER_STATE bufstate; -}; - -static struct stackelement include_stack[MAX_INCLUDE_DEPTH]; -static int include_stack_index = 0; -static void setup_filestack(char *fnamebuf, int fnamebuf_siz, glob_t *globbuf, int globpos, yyscan_t xscan, int create); - -/* - * if we use the @n feature of bison, we must supply the start/end - * location of tokens in the structure pointed by yylloc. - * Simple tokens are just assumed to be on the same line, so - * the line number is constant, and the column is incremented - * by the length of the token. - */ -#ifdef FLEX_BETA /* set for 2.5.33 */ - -/* compute the total number of lines and columns in the text - * passed as argument. - */ -static void pbcwhere(const char *text, int *line, int *col ) -{ - int loc_line = *line; - int loc_col = *col; - char c; - while ( (c = *text++) ) { - if ( c == '\t' ) { - loc_col += 8 - (loc_col % 8); - } else if ( c == '\n' ) { - loc_line++; - loc_col = 1; - } else - loc_col++; - } - *line = loc_line; - *col = loc_col; -} - -#define STORE_POS do { \ - yylloc->first_line = yylloc->last_line = my_lineno; \ - yylloc->first_column=my_col; \ - yylloc->last_column=my_col+yyleng-1; \ - my_col+=yyleng; \ - } while (0) - -#define STORE_LOC do { \ - yylloc->first_line = my_lineno; \ - yylloc->first_column=my_col; \ - pbcwhere(yytext, &my_lineno, &my_col); \ - yylloc->last_line = my_lineno; \ - yylloc->last_column = my_col - 1; \ - } while (0) -#else -#define STORE_POS -#define STORE_LOC -#endif -%} - -KEYWORD (context|abstract|extend|macro|globals|local|ignorepat|switch|if|ifTime|random|regexten|hint|else|goto|jump|return|break|continue|for|while|case|default|pattern|catch|switches|eswitches|includes) - -NOPARENS ([^()\[\]\{\}]|\\[()\[\]\{\}])* - -NOARGG ([^(),\{\}\[\]]|\\[,()\[\]\{\}])* - -NOSEMIC ([^;()\{\}\[\]]|\\[;()\[\]\{\}])* - -HIBIT [\x80-\xff] - -%% - -\{ { STORE_POS; return LC;} -\} { STORE_POS; return RC;} -\( { STORE_POS; return LP;} -\) { STORE_POS; return RP;} -\; { STORE_POS; return SEMI;} -\= { STORE_POS; return EQ;} -\, { STORE_POS; return COMMA;} -\: { STORE_POS; return COLON;} -\& { STORE_POS; return AMPER;} -\| { STORE_POS; return BAR;} -\=\> { STORE_POS; return EXTENMARK;} -\@ { STORE_POS; return AT;} -\/\/[^\n]* {/*comment*/} -context { STORE_POS; return KW_CONTEXT;} -abstract { STORE_POS; return KW_ABSTRACT;} -extend { STORE_POS; return KW_EXTEND;} -macro { STORE_POS; return KW_MACRO;}; -globals { STORE_POS; return KW_GLOBALS;} -ignorepat { STORE_POS; return KW_IGNOREPAT;} -switch { STORE_POS; return KW_SWITCH;} -if { STORE_POS; return KW_IF;} -ifTime { STORE_POS; return KW_IFTIME;} -random { STORE_POS; return KW_RANDOM;} -regexten { STORE_POS; return KW_REGEXTEN;} -hint { STORE_POS; return KW_HINT;} -else { STORE_POS; return KW_ELSE;} -goto { STORE_POS; return KW_GOTO;} -jump { STORE_POS; return KW_JUMP;} -return { STORE_POS; return KW_RETURN;} -break { STORE_POS; return KW_BREAK;} -continue { STORE_POS; return KW_CONTINUE;} -for { STORE_POS; return KW_FOR;} -while { STORE_POS; return KW_WHILE;} -case { STORE_POS; return KW_CASE;} -default { STORE_POS; return KW_DEFAULT;} -pattern { STORE_POS; return KW_PATTERN;} -catch { STORE_POS; return KW_CATCH;} -switches { STORE_POS; return KW_SWITCHES;} -eswitches { STORE_POS; return KW_ESWITCHES;} -includes { STORE_POS; return KW_INCLUDES;} -"/*" { BEGIN(comment); my_col += 2; } - -<comment>[^*\n]* { my_col += yyleng; } -<comment>[^*\n]*\n { ++my_lineno; my_col=1;} -<comment>"*"+[^*/\n]* { my_col += yyleng; } -<comment>"*"+[^*/\n]*\n { ++my_lineno; my_col=1;} -<comment>"*/" { my_col += 2; BEGIN(INITIAL); } /* the nice thing about comments is that you know exactly what ends them */ - -\n { my_lineno++; my_col = 1; } -[ ]+ { my_col += yyleng; } -[\t]+ { my_col += (yyleng*8)-(my_col%8); } - -({KEYWORD}?[-a-zA-Z0-9'"_/.\<\>\*\+!$#\[\]]|{HIBIT}|(\\.)|(\$\{)|(\$\[)) { - /* boy did I open a can of worms when I changed the lexical token "word". - all the above keywords can be used as a beginning to a "word".- - before, a "word" would match a longer sequence than the above - keywords, and all would be well. But now "word" is a single char - and feeds into a statemachine sort of sequence from there on. So... - I added the {KEYWORD}? to the beginning of the word match sequence */ - - if (!strcmp(yytext,"${")) { - parencount2 = 0; - pbcpos2 = 0; - pbcpush2('{'); /* push '{' so the last pcbpop (parencount2 = -1) will succeed */ - BEGIN(curlystate); - yymore(); - } else if (!strcmp(yytext,"$[")) { - parencount3 = 0; - pbcpos3 = 0; - pbcpush3('['); /* push '[' so the last pcbpop (parencount3 = -1) will succeed */ - BEGIN(brackstate); - yymore(); - } else { - BEGIN(wordstate); - yymore(); - } - } - -<wordstate>[-a-zA-Z0-9'"_/.\<\>\*\+!$#\[\]] { yymore(); /* Keep going */ } -<wordstate>{HIBIT} { yymore(); /* Keep going */ } -<wordstate>(\\.) { yymore(); /* Keep Going */ } -<wordstate>(\$\{) { /* the beginning of a ${} construct. prepare and pop into curlystate */ - parencount2 = 0; - pbcpos2 = 0; - pbcpush2('{'); /* push '{' so the last pcbpop (parencount2 = -1) will succeed */ - BEGIN(curlystate); - yymore(); - } -<wordstate>(\$\[) { /* the beginning of a $[] construct. prepare and pop into brackstate */ - parencount3 = 0; - pbcpos3 = 0; - pbcpush3('['); /* push '[' so the last pcbpop (parencount3 = -1) will succeed */ - BEGIN(brackstate); - yymore(); - } -<wordstate>([^a-zA-Z0-9\x80-\xff\x2d'"_/.\<\>\*\+!$#\[\]]) { - /* a non-word constituent char, like a space, tab, curly, paren, etc */ - char c = yytext[yyleng-1]; - STORE_POS; - yylval->str = malloc(yyleng); - strncpy(yylval->str, yytext, yyleng); - yylval->str[yyleng-1] = 0; - unput(c); /* put this ending char back in the stream */ - BEGIN(0); - prev_word = yylval->str; - return word; - } -<curlystate>{NOPARENS}\} { - if ( pbcpop2('}') ) { /* error */ - STORE_LOC; - ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression: %s !\n", my_file, my_lineno, my_col, yytext); - BEGIN(0); - yylval->str = malloc(yyleng+1); - strncpy(yylval->str, yytext, yyleng); - yylval->str[yyleng] = 0; - return word; - } - parencount2--; - if ( parencount2 >= 0) { - yymore(); - } else { - BEGIN(wordstate); /* Finished with the current ${} construct. Return to word gathering state */ - yymore(); - } - } - -<curlystate>{NOPARENS}[\(\[\{] { - char c = yytext[yyleng-1]; - if (c == '{') - parencount2++; - pbcpush2(c); - yymore(); - } - -<curlystate>{NOPARENS}[\]\)] { - char c = yytext[yyleng-1]; - if ( pbcpop2(c)) { /* error */ - STORE_LOC; - ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", - my_file, my_lineno, my_col, c); - BEGIN(0); - yylval->str = malloc(yyleng+1); - strncpy(yylval->str, yytext, yyleng); - yylval->str[yyleng] = 0; - return word; - } - yymore(); - } - - -<brackstate>{NOPARENS}\] { - if ( pbcpop3(']') ) { /* error */ - STORE_LOC; - ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression: %s !\n", my_file, my_lineno, my_col, yytext); - BEGIN(0); - yylval->str = malloc(yyleng+1); - strncpy(yylval->str, yytext, yyleng); - yylval->str[yyleng] = 0; - return word; - } - parencount3--; - if ( parencount3 >= 0) { - yymore(); - } else { - BEGIN(wordstate); /* Finished with the current ${} construct. Return to word gathering state */ - yymore(); - } - } - -<brackstate>{NOPARENS}[\(\[\{] { - char c = yytext[yyleng-1]; - if (c == '[') - parencount3++; - pbcpush3(c); - yymore(); - } - -<brackstate>{NOPARENS}[\}\)] { - char c = yytext[yyleng-1]; - if ( pbcpop3(c)) { /* error */ - STORE_LOC; - ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", - my_file, my_lineno, my_col, c); - BEGIN(0); - yylval->str = malloc(yyleng+1); - strncpy(yylval->str, yytext, yyleng); - yylval->str[yyleng] = 0; - return word; - } - yymore(); - } - - - /* - * context used for arguments of if_head, random_head, switch_head, - * for (last statement), while (XXX why not iftime_head ?). - * End with the matching parentheses. - * A comma at the top level is valid here, unlike in argg where it - * is an argument separator so it must be returned as a token. - */ -<paren>{NOPARENS}\) { - if ( pbcpop(')') ) { /* error */ - STORE_LOC; - ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression: %s !\n", my_file, my_lineno, my_col, yytext); - BEGIN(0); - yylval->str = malloc(yyleng+1); - strncpy(yylval->str, yytext, yyleng); - yylval->str[yyleng] = 0; - prev_word = 0; - return word; - } - parencount--; - if ( parencount >= 0) { - yymore(); - } else { - STORE_LOC; - yylval->str = malloc(yyleng); - strncpy(yylval->str, yytext, yyleng); - yylval->str[yyleng-1] = 0; - unput(')'); - BEGIN(0); - return word; - } - } - -<paren>{NOPARENS}[\(\[\{] { - char c = yytext[yyleng-1]; - if (c == '(') - parencount++; - pbcpush(c); - yymore(); - } - -<paren>{NOPARENS}[\]\}] { - char c = yytext[yyleng-1]; - if ( pbcpop(c)) { /* error */ - STORE_LOC; - ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", - my_file, my_lineno, my_col, c); - BEGIN(0); - yylval->str = malloc(yyleng+1); - strncpy(yylval->str, yytext, yyleng); - yylval->str[yyleng] = 0; - return word; - } - yymore(); - } - - - /* - * handlers for arguments to a macro or application calls. - * We enter this context when we find the initial '(' and - * stay here until we close all matching parentheses, - * and find the comma (argument separator) or the closing ')' - * of the (external) call, which happens when parencount == 0 - * before the decrement. - */ -<argg>{NOARGG}[\(\[\{] { - char c = yytext[yyleng-1]; - if (c == '(') - parencount++; - pbcpush(c); - yymore(); - } - -<argg>{NOARGG}\) { - if ( pbcpop(')') ) { /* error */ - STORE_LOC; - ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression!\n", my_file, my_lineno, my_col); - BEGIN(0); - yylval->str = malloc(yyleng+1); - strncpy(yylval->str, yytext, yyleng); - yylval->str[yyleng] = 0; - return word; - } - - parencount--; - if( parencount >= 0){ - yymore(); - } else { - STORE_LOC; - BEGIN(0); - if ( !strcmp(yytext, ")") ) - return RP; - yylval->str = malloc(yyleng); - strncpy(yylval->str, yytext, yyleng); - yylval->str[yyleng-1] = '\0'; /* trim trailing ')' */ - unput(')'); - return word; - } - } - -<argg>{NOARGG}\, { - if( parencount != 0) { /* ast_log(LOG_NOTICE,"Folding in a comma!\n"); */ - yymore(); - } else { - STORE_LOC; - if( !strcmp(yytext,"," ) ) - return COMMA; - yylval->str = malloc(yyleng); - strncpy(yylval->str, yytext, yyleng); - yylval->str[yyleng-1] = '\0'; /* trim trailing ',' */ - unput(','); - return word; - } - } - -<argg>{NOARGG}[\]\}] { - char c = yytext[yyleng-1]; - if ( pbcpop(c) ) { /* error */ - STORE_LOC; - ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", my_file, my_lineno, my_col, c); - BEGIN(0); - yylval->str = malloc(yyleng+1); - strncpy(yylval->str, yytext, yyleng); - yylval->str[yyleng] = '\0'; - return word; - } - yymore(); - } - - /* - * context used to find tokens in the right hand side of assignments, - * or in the first and second operand of a 'for'. As above, match - * commas and use ';' as a separator (hence return it as a separate token). - */ -<semic>{NOSEMIC}[\(\[\{] { - char c = yytext[yyleng-1]; - yymore(); - pbcpush(c); - } - -<semic>{NOSEMIC}[\)\]\}] { - char c = yytext[yyleng-1]; - if ( pbcpop(c) ) { /* error */ - STORE_LOC; - ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", my_file, my_lineno, my_col, c); - BEGIN(0); - yylval->str = malloc(yyleng+1); - strncpy(yylval->str, yytext, yyleng); - yylval->str[yyleng] = '\0'; - return word; - } - yymore(); - } - -<semic>{NOSEMIC}; { - STORE_LOC; - yylval->str = malloc(yyleng); - strncpy(yylval->str, yytext, yyleng); - yylval->str[yyleng-1] = '\0'; /* trim trailing ';' */ - unput(';'); - BEGIN(0); - return word; - } - -\#include[ \t]+\"[^\"]+\" { - char fnamebuf[1024],*p1,*p2; - int glob_ret; - glob_t globbuf; /* the current globbuf */ - int globbuf_pos = -1; /* where we are in the current globbuf */ - globbuf.gl_offs = 0; /* initialize it to silence gcc */ - - p1 = strchr(yytext,'"'); - p2 = strrchr(yytext,'"'); - if ( include_stack_index >= MAX_INCLUDE_DEPTH ) { - ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Includes nested too deeply! Wow!!! How did you do that?\n", my_file, my_lineno, my_col); - } else if ( (int)(p2-p1) > sizeof(fnamebuf) - 1 ) { - ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Filename is incredibly way too long (%d chars!). Inclusion ignored!\n", my_file, my_lineno, my_col, yyleng - 10); - } else { - strncpy(fnamebuf, p1+1, p2-p1-1); - fnamebuf[p2-p1-1] = 0; - -#ifdef SOLARIS - glob_ret = glob(fnamebuf, GLOB_NOCHECK, NULL, &globbuf); -#else - glob_ret = glob(fnamebuf, GLOB_NOMAGIC|GLOB_BRACE, NULL, &globbuf); -#endif - if (glob_ret == GLOB_NOSPACE) { - ast_log(LOG_WARNING, - "Glob Expansion of pattern '%s' failed: Not enough memory\n", fnamebuf); - } else if (glob_ret == GLOB_ABORTED) { - ast_log(LOG_WARNING, - "Glob Expansion of pattern '%s' failed: Read error\n", fnamebuf); - } else if (glob_ret == GLOB_NOMATCH) { - ast_log(LOG_WARNING, - "Glob Expansion of pattern '%s' failed: No matches!\n", fnamebuf); - } else { - globbuf_pos = 0; - } - } - if (globbuf_pos > -1) { - setup_filestack(fnamebuf, sizeof(fnamebuf), &globbuf, 0, yyscanner, 1); - } - } - - -<<EOF>> { - char fnamebuf[2048]; - if (include_stack_index > 0 && include_stack[include_stack_index-1].globbuf_pos < include_stack[include_stack_index-1].globbuf.gl_pathc-1) { - yy_delete_buffer( YY_CURRENT_BUFFER, yyscanner ); - include_stack[include_stack_index-1].globbuf_pos++; - setup_filestack(fnamebuf, sizeof(fnamebuf), &include_stack[include_stack_index-1].globbuf, include_stack[include_stack_index-1].globbuf_pos, yyscanner, 0); - /* finish this */ - - } else { - if (include_stack[include_stack_index].fname) { - free(include_stack[include_stack_index].fname); - include_stack[include_stack_index].fname = 0; - } - if (my_file) { - free(my_file); - my_file = 0; - } - if ( --include_stack_index < 0 ) { - yyterminate(); - } else { - globfree(&include_stack[include_stack_index].globbuf); - include_stack[include_stack_index].globbuf_pos = -1; - - yy_delete_buffer( YY_CURRENT_BUFFER, yyscanner ); - yy_switch_to_buffer(include_stack[include_stack_index].bufstate, yyscanner ); - my_lineno = include_stack[include_stack_index].lineno; - my_col = include_stack[include_stack_index].colno; - my_file = strdup(include_stack[include_stack_index].fname); - } - } - } - -<*>.|\n { /* default rule */ ast_log(LOG_ERROR,"Unhandled char(s): %s\n", yytext); } - -%% - -static void pbcpush(char x) -{ - pbcstack[pbcpos++] = x; -} - -void ael_yyfree(void *ptr, yyscan_t yyscanner) -{ - if (ptr) - free( (char*) ptr ); -} - -static int pbcpop(char x) -{ - if ( ( x == ')' && pbcstack[pbcpos-1] == '(' ) - || ( x == ']' && pbcstack[pbcpos-1] == '[' ) - || ( x == '}' && pbcstack[pbcpos-1] == '{' )) { - pbcpos--; - return 0; - } - return 1; /* error */ -} - -static void pbcpush2(char x) -{ - pbcstack2[pbcpos2++] = x; -} - -static int pbcpop2(char x) -{ - if ( ( x == ')' && pbcstack2[pbcpos2-1] == '(' ) - || ( x == ']' && pbcstack2[pbcpos2-1] == '[' ) - || ( x == '}' && pbcstack2[pbcpos2-1] == '{' )) { - pbcpos2--; - return 0; - } - return 1; /* error */ -} - -static void pbcpush3(char x) -{ - pbcstack3[pbcpos3++] = x; -} - -static int pbcpop3(char x) -{ - if ( ( x == ')' && pbcstack3[pbcpos3-1] == '(' ) - || ( x == ']' && pbcstack3[pbcpos3-1] == '[' ) - || ( x == '}' && pbcstack3[pbcpos3-1] == '{' )) { - pbcpos3--; - return 0; - } - return 1; /* error */ -} - -static int c_prevword(void) -{ - char *c = prev_word; - if (c == NULL) - return 0; - while ( *c ) { - switch (*c) { - case '{': - case '[': - case '(': - pbcpush(*c); - break; - case '}': - case ']': - case ')': - if (pbcpop(*c)) - return 1; - break; - } - c++; - } - return 0; -} - - -/* - * The following three functions, reset_*, are used in the bison - * code to switch context. As a consequence, we need to - * declare them global and add a prototype so that the - * compiler does not complain. - * - * NOTE: yyg is declared because it is used in the BEGIN macros, - * though that should be hidden as the macro changes - * depending on the flex options that we use - in particular, - * %reentrant changes the way the macro is declared; - * without %reentrant, BEGIN uses yystart instead of yyg - */ - -void reset_parencount(yyscan_t yyscanner ); -void reset_parencount(yyscan_t yyscanner ) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - parencount = 0; - pbcpos = 0; - pbcpush('('); /* push '(' so the last pcbpop (parencount= -1) will succeed */ - c_prevword(); - BEGIN(paren); -} - -void reset_semicount(yyscan_t yyscanner ); -void reset_semicount(yyscan_t yyscanner ) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - pbcpos = 0; - BEGIN(semic); -} - -void reset_argcount(yyscan_t yyscanner ); -void reset_argcount(yyscan_t yyscanner ) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - parencount = 0; - pbcpos = 0; - pbcpush('('); /* push '(' so the last pcbpop (parencount= -1) will succeed */ - c_prevword(); - BEGIN(argg); -} - -/* used elsewhere, but some local vars */ -struct pval *ael2_parse(char *filename, int *errors) -{ - struct pval *pval; - struct parse_io *io; - char *buffer; - struct stat stats; - FILE *fin; - - /* extern int ael_yydebug; */ - - io = calloc(sizeof(struct parse_io),1); - /* reset the global counters */ - prev_word = 0; - my_lineno = 1; - include_stack_index=0; - my_col = 0; - /* ael_yydebug = 1; */ - ael_yylex_init(&io->scanner); - fin = fopen(filename,"r"); - if ( !fin ) { - ast_log(LOG_ERROR,"File %s could not be opened\n", filename); - *errors = 1; - return 0; - } - if (my_file) - free(my_file); - my_file = strdup(filename); - stat(filename, &stats); - buffer = (char*)malloc(stats.st_size+2); - if (fread(buffer, 1, stats.st_size, fin) != stats.st_size) { - ast_log(LOG_ERROR, "fread() failed: %s\n", strerror(errno)); - } - buffer[stats.st_size]=0; - fclose(fin); - - ael_yy_scan_string (buffer ,io->scanner); - ael_yyset_lineno(1 , io->scanner); - - /* ael_yyset_in (fin , io->scanner); OLD WAY */ - - ael_yyparse(io); - - - pval = io->pval; - *errors = io->syntax_error_count; - - ael_yylex_destroy(io->scanner); - free(buffer); - free(io); - - return pval; -} - -static void setup_filestack(char *fnamebuf2, int fnamebuf_siz, glob_t *globbuf, int globpos, yyscan_t yyscanner, int create) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - int error, i; - FILE *in1; - char fnamebuf[2048]; - - if (globbuf && globbuf->gl_pathv && globbuf->gl_pathc > 0) -#if defined(STANDALONE) || defined(LOW_MEMORY) || defined(STANDALONE_AEL) - strncpy(fnamebuf, globbuf->gl_pathv[globpos], fnamebuf_siz); -#else - ast_copy_string(fnamebuf, globbuf->gl_pathv[globpos], fnamebuf_siz); -#endif - else { - ast_log(LOG_ERROR,"Include file name not present!\n"); - return; - } - for (i=0; i<include_stack_index; i++) { - if ( !strcmp(fnamebuf,include_stack[i].fname )) { - ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Nice Try!!! But %s has already been included (perhaps by another file), and would cause an infinite loop of file inclusions!!! Include directive ignored\n", - my_file, my_lineno, my_col, fnamebuf); - break; - } - } - error = 1; - if (i == include_stack_index) - error = 0; /* we can use this file */ - if ( !error ) { /* valid file name */ - /* relative vs. absolute */ - if (fnamebuf[0] != '/') - snprintf(fnamebuf2, fnamebuf_siz, "%s/%s", ast_config_AST_CONFIG_DIR, fnamebuf); - else -#if defined(STANDALONE) || defined(LOW_MEMORY) || defined(STANDALONE_AEL) - strncpy(fnamebuf2, fnamebuf, fnamebuf_siz); -#else - ast_copy_string(fnamebuf2, fnamebuf, fnamebuf_siz); -#endif - in1 = fopen( fnamebuf2, "r" ); - - if ( ! in1 ) { - ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Couldn't find the include file: %s; ignoring the Include directive!\n", my_file, my_lineno, my_col, fnamebuf2); - } else { - char *buffer; - struct stat stats; - stat(fnamebuf2, &stats); - buffer = (char*)malloc(stats.st_size+1); - if (fread(buffer, 1, stats.st_size, in1) != stats.st_size) { - ast_log(LOG_ERROR, "fread() failed: %s\n", strerror(errno)); - } - buffer[stats.st_size] = 0; - ast_log(LOG_NOTICE," --Read in included file %s, %d chars\n",fnamebuf2, (int)stats.st_size); - fclose(in1); - if (include_stack[include_stack_index].fname) { - free(include_stack[include_stack_index].fname); - include_stack[include_stack_index].fname = 0; - } - include_stack[include_stack_index].fname = strdup(my_file); - include_stack[include_stack_index].lineno = my_lineno; - include_stack[include_stack_index].colno = my_col+yyleng; - if (my_file) - free(my_file); - my_file = strdup(fnamebuf2); - if (create) - include_stack[include_stack_index].globbuf = *globbuf; - - include_stack[include_stack_index].globbuf_pos = 0; - - include_stack[include_stack_index].bufstate = YY_CURRENT_BUFFER; - if (create) - include_stack_index++; - yy_switch_to_buffer(ael_yy_scan_string (buffer ,yyscanner),yyscanner); - free(buffer); - my_lineno = 1; - my_col = 1; - BEGIN(INITIAL); - } - } -} diff --git a/pbx/ael/ael.tab.c b/pbx/ael/ael.tab.c deleted file mode 100644 index 189537017..000000000 --- a/pbx/ael/ael.tab.c +++ /dev/null @@ -1,3443 +0,0 @@ -/* A Bison parser, made by GNU Bison 2.3. */ - -/* Skeleton implementation for Bison's Yacc-like parsers in C - - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 - Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -/* C LALR(1) parser skeleton written by Richard Stallman, by - simplifying the original so-called "semantic" parser. */ - -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - define necessary library symbols; they are noted "INFRINGES ON - USER NAME SPACE" below. */ - -/* Identify Bison output. */ -#define YYBISON 1 - -/* Bison version. */ -#define YYBISON_VERSION "2.3" - -/* Skeleton name. */ -#define YYSKELETON_NAME "yacc.c" - -/* Pure parsers. */ -#define YYPURE 1 - -/* Using locations. */ -#define YYLSP_NEEDED 1 - -/* Substitute the variable and function names. */ -#define yyparse ael_yyparse -#define yylex ael_yylex -#define yyerror ael_yyerror -#define yylval ael_yylval -#define yychar ael_yychar -#define yydebug ael_yydebug -#define yynerrs ael_yynerrs -#define yylloc ael_yylloc - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - KW_CONTEXT = 258, - LC = 259, - RC = 260, - LP = 261, - RP = 262, - SEMI = 263, - EQ = 264, - COMMA = 265, - COLON = 266, - AMPER = 267, - BAR = 268, - AT = 269, - KW_MACRO = 270, - KW_GLOBALS = 271, - KW_IGNOREPAT = 272, - KW_SWITCH = 273, - KW_IF = 274, - KW_IFTIME = 275, - KW_ELSE = 276, - KW_RANDOM = 277, - KW_ABSTRACT = 278, - KW_EXTEND = 279, - EXTENMARK = 280, - KW_GOTO = 281, - KW_JUMP = 282, - KW_RETURN = 283, - KW_BREAK = 284, - KW_CONTINUE = 285, - KW_REGEXTEN = 286, - KW_HINT = 287, - KW_FOR = 288, - KW_WHILE = 289, - KW_CASE = 290, - KW_PATTERN = 291, - KW_DEFAULT = 292, - KW_CATCH = 293, - KW_SWITCHES = 294, - KW_ESWITCHES = 295, - KW_INCLUDES = 296, - word = 297 - }; -#endif -/* Tokens. */ -#define KW_CONTEXT 258 -#define LC 259 -#define RC 260 -#define LP 261 -#define RP 262 -#define SEMI 263 -#define EQ 264 -#define COMMA 265 -#define COLON 266 -#define AMPER 267 -#define BAR 268 -#define AT 269 -#define KW_MACRO 270 -#define KW_GLOBALS 271 -#define KW_IGNOREPAT 272 -#define KW_SWITCH 273 -#define KW_IF 274 -#define KW_IFTIME 275 -#define KW_ELSE 276 -#define KW_RANDOM 277 -#define KW_ABSTRACT 278 -#define KW_EXTEND 279 -#define EXTENMARK 280 -#define KW_GOTO 281 -#define KW_JUMP 282 -#define KW_RETURN 283 -#define KW_BREAK 284 -#define KW_CONTINUE 285 -#define KW_REGEXTEN 286 -#define KW_HINT 287 -#define KW_FOR 288 -#define KW_WHILE 289 -#define KW_CASE 290 -#define KW_PATTERN 291 -#define KW_DEFAULT 292 -#define KW_CATCH 293 -#define KW_SWITCHES 294 -#define KW_ESWITCHES 295 -#define KW_INCLUDES 296 -#define word 297 - - - - -/* Copy the first part of user declarations. */ -#line 1 "ael.y" - -/* - * Asterisk -- An open source telephony toolkit. - * - * Copyright (C) 2006, Digium, Inc. - * - * Steve Murphy <murf@parsetree.com> - * - * See http://www.asterisk.org for more information about - * the Asterisk project. Please do not directly contact - * any of the maintainers of this project for assistance; - * the project provides a web site, mailing lists and IRC - * channels for your use. - * - * This program is free software, distributed under the terms of - * the GNU General Public License Version 2. See the LICENSE file - * at the top of the source tree. - */ -/*! \file - * - * \brief Bison Grammar description of AEL2. - * - */ - -#include "asterisk.h" - -#if !defined(STANDALONE_AEL) -ASTERISK_FILE_VERSION(__FILE__, "$Revision$") -#endif - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "asterisk/logger.h" -#include "asterisk/ael_structs.h" - -static pval * linku1(pval *head, pval *tail); -static void set_dads(pval *dad, pval *child_list); -void reset_parencount(yyscan_t yyscanner); -void reset_semicount(yyscan_t yyscanner); -void reset_argcount(yyscan_t yyscanner ); - -#define YYLEX_PARAM ((struct parse_io *)parseio)->scanner -#define YYERROR_VERBOSE 1 - -extern char *my_file; -#ifdef AAL_ARGCHECK -int ael_is_funcname(char *name); -#endif -static char *ael_token_subst(const char *mess); - - - -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 1 -#endif - -/* Enabling the token table. */ -#ifndef YYTOKEN_TABLE -# define YYTOKEN_TABLE 0 -#endif - -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE -#line 56 "ael.y" -{ - int intval; /* integer value, typically flags */ - char *str; /* strings */ - struct pval *pval; /* full objects */ -} -/* Line 187 of yacc.c. */ -#line 248 "ael.tab.c" - YYSTYPE; -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 -#endif - -#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED -typedef struct YYLTYPE -{ - int first_line; - int first_column; - int last_line; - int last_column; -} YYLTYPE; -# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ -# define YYLTYPE_IS_DECLARED 1 -# define YYLTYPE_IS_TRIVIAL 1 -#endif - - -/* Copy the second part of user declarations. */ -#line 62 "ael.y" - - /* declaring these AFTER the union makes things a lot simpler! */ -void yyerror(YYLTYPE *locp, struct parse_io *parseio, char const *s); -int ael_yylex (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , void * yyscanner); - -/* create a new object with start-end marker */ -static pval *npval(pvaltype type, int first_line, int last_line, - int first_column, int last_column); - -/* create a new object with start-end marker, simplified interface. - * Must be declared here because YYLTYPE is not known before - */ -static pval *npval2(pvaltype type, YYLTYPE *first, YYLTYPE *last); - -/* another frontend for npval, this time for a string */ -static pval *nword(char *string, YYLTYPE *pos); - -/* update end position of an object, return the object */ -static pval *update_last(pval *, YYLTYPE *); - - -/* Line 216 of yacc.c. */ -#line 293 "ael.tab.c" - -#ifdef short -# undef short -#endif - -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; -#endif - -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; -#else -typedef short int yytype_int8; -#endif - -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; -#else -typedef unsigned short int yytype_uint16; -#endif - -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; -#else -typedef short int yytype_int16; -#endif - -#ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned int -# endif -#endif - -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) - -#ifndef YY_ -# if YYENABLE_NLS -# if ENABLE_NLS -# include <libintl.h> /* INFRINGES ON USER NAME SPACE */ -# define YY_(msgid) dgettext ("bison-runtime", msgid) -# endif -# endif -# ifndef YY_ -# define YY_(msgid) msgid -# endif -#endif - -/* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YYUSE(e) ((void) (e)) -#else -# define YYUSE(e) /* empty */ -#endif - -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(n) (n) -#else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int i) -#else -static int -YYID (i) - int i; -#endif -{ - return i; -} -#endif - -#if ! defined yyoverflow || YYERROR_VERBOSE - -/* The parser invokes alloca or malloc; define the necessary symbols. */ - -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include <alloca.h> /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include <malloc.h> /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 -# endif -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined _STDLIB_H \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - - -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ - && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) - -/* A type that is properly aligned for any stack member. */ -union yyalloc -{ - yytype_int16 yyss; - YYSTYPE yyvs; - YYLTYPE yyls; -}; - -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) - -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ - + 2 * YYSTACK_GAP_MAXIMUM) - -/* Copy COUNT objects from FROM to TO. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) -# else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (YYID (0)) -# endif -# endif - -/* Relocate STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack, Stack, yysize); \ - Stack = &yyptr->Stack; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (YYID (0)) - -#endif - -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL 17 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 311 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 43 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 54 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 137 -/* YYNRULES -- Number of states. */ -#define YYNSTATES 276 - -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ -#define YYUNDEFTOK 2 -#define YYMAXUTOK 297 - -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const yytype_uint8 yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 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 -}; - -#if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const yytype_uint16 yyprhs[] = -{ - 0, 0, 3, 5, 7, 10, 13, 15, 17, 19, - 21, 23, 25, 32, 34, 35, 37, 40, 43, 52, - 57, 58, 61, 64, 65, 71, 72, 74, 78, 81, - 82, 85, 88, 90, 92, 94, 96, 98, 100, 103, - 105, 110, 114, 119, 127, 136, 137, 140, 143, 149, - 151, 159, 160, 165, 168, 171, 176, 178, 181, 183, - 186, 190, 194, 196, 199, 203, 205, 208, 212, 218, - 222, 224, 228, 232, 235, 236, 237, 238, 251, 255, - 257, 261, 264, 267, 268, 274, 277, 280, 283, 287, - 289, 292, 293, 295, 299, 303, 309, 315, 321, 327, - 328, 331, 334, 339, 340, 346, 350, 351, 355, 359, - 362, 364, 365, 367, 368, 372, 373, 376, 381, 385, - 390, 391, 394, 396, 398, 404, 409, 414, 415, 419, - 425, 428, 430, 434, 437, 441, 444, 449 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int8 yyrhs[] = -{ - 44, 0, -1, 45, -1, 46, -1, 45, 46, -1, - 45, 1, -1, 48, -1, 50, -1, 51, -1, 8, - -1, 42, -1, 37, -1, 49, 3, 47, 4, 56, - 5, -1, 23, -1, -1, 24, -1, 24, 23, -1, - 23, 24, -1, 15, 42, 6, 55, 7, 4, 89, - 5, -1, 16, 4, 52, 5, -1, -1, 53, 52, - -1, 1, 52, -1, -1, 42, 9, 54, 42, 8, - -1, -1, 42, -1, 55, 10, 42, -1, 55, 1, - -1, -1, 57, 56, -1, 1, 56, -1, 59, -1, - 96, -1, 91, -1, 92, -1, 58, -1, 53, -1, - 42, 1, -1, 8, -1, 17, 25, 42, 8, -1, - 42, 25, 71, -1, 31, 42, 25, 71, -1, 32, - 6, 67, 7, 42, 25, 71, -1, 31, 32, 6, - 67, 7, 42, 25, 71, -1, -1, 71, 60, -1, - 1, 60, -1, 68, 11, 68, 11, 68, -1, 42, - -1, 61, 13, 68, 13, 68, 13, 68, -1, -1, - 6, 64, 66, 7, -1, 19, 63, -1, 22, 63, - -1, 20, 6, 62, 7, -1, 42, -1, 42, 42, - -1, 42, -1, 67, 42, -1, 67, 11, 42, -1, - 67, 12, 42, -1, 42, -1, 42, 42, -1, 42, - 42, 42, -1, 42, -1, 42, 42, -1, 69, 11, - 42, -1, 18, 63, 4, 87, 5, -1, 4, 60, - 5, -1, 53, -1, 26, 77, 8, -1, 27, 79, - 8, -1, 42, 11, -1, -1, -1, -1, 33, 6, - 72, 42, 8, 73, 42, 8, 74, 42, 7, 71, - -1, 34, 63, 71, -1, 70, -1, 12, 80, 8, - -1, 84, 8, -1, 42, 8, -1, -1, 84, 9, - 75, 42, 8, -1, 29, 8, -1, 28, 8, -1, - 30, 8, -1, 65, 71, 76, -1, 8, -1, 21, - 71, -1, -1, 69, -1, 69, 13, 69, -1, 69, - 10, 69, -1, 69, 13, 69, 13, 69, -1, 69, - 10, 69, 10, 69, -1, 37, 13, 69, 13, 69, - -1, 37, 10, 69, 10, 69, -1, -1, 10, 42, - -1, 69, 78, -1, 69, 78, 14, 47, -1, -1, - 42, 6, 81, 86, 7, -1, 42, 6, 7, -1, - -1, 42, 6, 83, -1, 82, 86, 7, -1, 82, - 7, -1, 42, -1, -1, 66, -1, -1, 86, 10, - 85, -1, -1, 88, 87, -1, 35, 42, 11, 60, - -1, 37, 11, 60, -1, 36, 42, 11, 60, -1, - -1, 90, 89, -1, 71, -1, 96, -1, 38, 42, - 4, 60, 5, -1, 39, 4, 93, 5, -1, 40, - 4, 93, 5, -1, -1, 42, 8, 93, -1, 42, - 14, 42, 8, 93, -1, 1, 93, -1, 47, -1, - 47, 13, 62, -1, 94, 8, -1, 95, 94, 8, - -1, 95, 1, -1, 41, 4, 95, 5, -1, 41, - 4, 5, -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const yytype_uint16 yyrline[] = -{ - 0, 187, 187, 190, 191, 192, 195, 196, 197, 198, - 201, 202, 205, 214, 215, 216, 217, 218, 221, 227, - 233, 234, 235, 238, 238, 245, 246, 247, 248, 251, - 252, 253, 256, 257, 258, 259, 260, 261, 262, 263, - 266, 271, 275, 280, 285, 295, 296, 297, 303, 313, - 317, 325, 325, 329, 332, 335, 346, 347, 359, 360, - 369, 378, 389, 390, 400, 413, 414, 423, 434, 443, - 446, 447, 450, 453, 456, 457, 458, 456, 464, 468, - 469, 470, 471, 474, 474, 507, 508, 509, 510, 514, - 517, 518, 521, 522, 525, 528, 532, 536, 540, 546, - 547, 551, 554, 560, 560, 565, 573, 573, 584, 591, - 594, 595, 598, 599, 602, 605, 606, 609, 613, 617, - 623, 624, 627, 628, 629, 635, 640, 645, 646, 647, - 658, 661, 662, 669, 670, 671, 674, 677 -}; -#endif - -#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "$end", "error", "$undefined", "KW_CONTEXT", "LC", "RC", "LP", "RP", - "SEMI", "EQ", "COMMA", "COLON", "AMPER", "BAR", "AT", "KW_MACRO", - "KW_GLOBALS", "KW_IGNOREPAT", "KW_SWITCH", "KW_IF", "KW_IFTIME", - "KW_ELSE", "KW_RANDOM", "KW_ABSTRACT", "KW_EXTEND", "EXTENMARK", - "KW_GOTO", "KW_JUMP", "KW_RETURN", "KW_BREAK", "KW_CONTINUE", - "KW_REGEXTEN", "KW_HINT", "KW_FOR", "KW_WHILE", "KW_CASE", "KW_PATTERN", - "KW_DEFAULT", "KW_CATCH", "KW_SWITCHES", "KW_ESWITCHES", "KW_INCLUDES", - "word", "$accept", "file", "objects", "object", "context_name", - "context", "opt_abstract", "macro", "globals", "global_statements", - "assignment", "@1", "arglist", "elements", "element", "ignorepat", - "extension", "statements", "timerange", "timespec", "test_expr", "@2", - "if_like_head", "word_list", "hint_word", "word3_list", "goto_word", - "switch_statement", "statement", "@3", "@4", "@5", "@6", "opt_else", - "target", "opt_pri", "jumptarget", "macro_call", "@7", - "application_call_head", "@8", "application_call", "opt_word", - "eval_arglist", "case_statements", "case_statement", "macro_statements", - "macro_statement", "switches", "eswitches", "switchlist", - "included_entry", "includeslist", "includes", 0 -}; -#endif - -# ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ -static const yytype_uint16 yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297 -}; -# endif - -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 43, 44, 45, 45, 45, 46, 46, 46, 46, - 47, 47, 48, 49, 49, 49, 49, 49, 50, 51, - 52, 52, 52, 54, 53, 55, 55, 55, 55, 56, - 56, 56, 57, 57, 57, 57, 57, 57, 57, 57, - 58, 59, 59, 59, 59, 60, 60, 60, 61, 61, - 62, 64, 63, 65, 65, 65, 66, 66, 67, 67, - 67, 67, 68, 68, 68, 69, 69, 69, 70, 71, - 71, 71, 71, 71, 72, 73, 74, 71, 71, 71, - 71, 71, 71, 75, 71, 71, 71, 71, 71, 71, - 76, 76, 77, 77, 77, 77, 77, 77, 77, 78, - 78, 79, 79, 81, 80, 80, 83, 82, 84, 84, - 85, 85, 86, 86, 86, 87, 87, 88, 88, 88, - 89, 89, 90, 90, 90, 91, 92, 93, 93, 93, - 93, 94, 94, 95, 95, 95, 96, 96 -}; - -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 1, 1, 2, 2, 1, 1, 1, 1, - 1, 1, 6, 1, 0, 1, 2, 2, 8, 4, - 0, 2, 2, 0, 5, 0, 1, 3, 2, 0, - 2, 2, 1, 1, 1, 1, 1, 1, 2, 1, - 4, 3, 4, 7, 8, 0, 2, 2, 5, 1, - 7, 0, 4, 2, 2, 4, 1, 2, 1, 2, - 3, 3, 1, 2, 3, 1, 2, 3, 5, 3, - 1, 3, 3, 2, 0, 0, 0, 12, 3, 1, - 3, 2, 2, 0, 5, 2, 2, 2, 3, 1, - 2, 0, 1, 3, 3, 5, 5, 5, 5, 0, - 2, 2, 4, 0, 5, 3, 0, 3, 3, 2, - 1, 0, 1, 0, 3, 0, 2, 4, 3, 4, - 0, 2, 1, 1, 5, 4, 4, 0, 3, 5, - 2, 1, 3, 2, 3, 2, 4, 3 -}; - -/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state - STATE-NUM when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const yytype_uint8 yydefact[] = -{ - 14, 9, 0, 0, 13, 15, 0, 0, 3, 6, - 0, 7, 8, 0, 0, 17, 16, 1, 5, 4, - 0, 25, 0, 0, 0, 0, 11, 10, 0, 26, - 0, 22, 23, 19, 21, 0, 28, 0, 0, 0, - 0, 39, 0, 0, 0, 0, 0, 0, 0, 37, - 0, 0, 36, 32, 34, 35, 33, 120, 27, 0, - 31, 0, 0, 0, 0, 0, 0, 0, 38, 0, - 12, 30, 0, 89, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 70, 0, - 79, 122, 113, 0, 0, 120, 123, 24, 0, 0, - 0, 58, 0, 0, 0, 0, 0, 137, 131, 0, - 0, 41, 0, 0, 0, 0, 0, 51, 0, 53, - 0, 54, 0, 65, 92, 0, 99, 0, 86, 85, - 87, 74, 0, 0, 106, 82, 73, 91, 109, 56, - 112, 0, 81, 83, 18, 121, 40, 0, 42, 0, - 0, 0, 59, 130, 0, 0, 125, 126, 0, 133, - 135, 136, 0, 47, 69, 46, 103, 80, 0, 115, - 49, 0, 0, 0, 0, 0, 66, 0, 0, 0, - 71, 0, 101, 72, 0, 78, 0, 107, 0, 88, - 57, 108, 111, 0, 0, 0, 60, 61, 128, 0, - 132, 134, 105, 113, 0, 0, 0, 0, 0, 115, - 63, 0, 55, 0, 0, 0, 94, 67, 93, 100, - 0, 0, 0, 90, 110, 114, 0, 0, 0, 0, - 0, 52, 0, 0, 0, 68, 116, 64, 62, 0, - 0, 0, 0, 0, 0, 102, 75, 124, 84, 0, - 43, 129, 104, 0, 0, 118, 0, 0, 98, 97, - 96, 95, 0, 44, 117, 119, 0, 48, 0, 0, - 76, 50, 0, 0, 0, 77 -}; - -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int16 yydefgoto[] = -{ - -1, 6, 7, 8, 108, 9, 10, 11, 12, 24, - 88, 39, 30, 50, 51, 52, 53, 113, 171, 172, - 118, 168, 89, 140, 102, 173, 124, 90, 114, 184, - 262, 272, 193, 189, 125, 182, 127, 116, 203, 92, - 187, 93, 225, 141, 208, 209, 94, 95, 54, 55, - 105, 109, 110, 56 -}; - -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -206 -static const yytype_int16 yypact[] = -{ - 65, -206, 2, 64, -1, 70, 84, 231, -206, -206, - 108, -206, -206, 120, 13, -206, -206, -206, -206, -206, - 29, 88, 13, 130, 163, 13, -206, -206, 165, -206, - 75, -206, -206, -206, -206, 8, -206, 171, 134, 136, - 8, -206, 154, -22, 178, 182, 186, 189, 61, -206, - 200, 8, -206, -206, -206, -206, -206, 169, -206, 198, - -206, 152, 203, 187, 177, 14, 14, 23, -206, 196, - -206, -206, 128, -206, 179, 207, 207, 214, 207, 58, - 185, 220, 225, 227, 230, 207, 195, 174, -206, 196, - -206, -206, 17, 94, 235, 169, -206, -206, 233, 177, - 196, -206, 19, 14, 55, 237, 238, -206, 232, 236, - 16, -206, 86, 243, 86, 244, 241, -206, 247, -206, - 210, -206, 97, 211, 24, 248, 107, 249, -206, -206, - -206, -206, 196, 254, -206, -206, -206, 239, -206, 217, - -206, 117, -206, -206, -206, -206, -206, 67, -206, 219, - 221, 222, -206, -206, 14, 223, -206, -206, 210, -206, - -206, -206, 258, -206, -206, -206, 255, -206, 226, 106, - 0, 256, 260, 259, 185, 185, -206, 185, 229, 185, - -206, 234, 261, -206, 240, -206, 128, -206, 196, -206, - -206, -206, 242, 245, 246, 252, -206, -206, -206, 264, - -206, -206, -206, 226, 266, 250, 251, 263, 273, 106, - 253, 257, -206, 257, 142, 138, 149, -206, 161, -206, - 29, 271, 275, -206, -206, -206, 277, 265, 196, 14, - 127, -206, 270, 272, 86, -206, -206, -206, 262, 276, - 280, 185, 185, 185, 185, -206, -206, -206, -206, 196, - -206, -206, -206, 86, 86, -206, 257, 257, 283, 283, - 283, 283, 267, -206, -206, -206, 284, -206, 278, 257, - -206, -206, 268, 289, 196, -206 -}; - -/* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = -{ - -206, -206, -206, 291, -19, -206, -206, -206, -206, 113, - 32, -206, -206, -18, -206, -206, -206, -109, -206, 143, - -49, -206, -206, 132, 204, -205, -78, -206, -57, -206, - -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, - -206, -206, -206, 99, 96, -206, 212, -206, -206, -206, - -62, 201, -206, -50 -}; - -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If zero, do what YYDEFACT says. - If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -128 -static const yytype_int16 yytable[] = -{ - 91, 28, 126, 163, 106, 165, 239, 96, 240, 40, - 62, -62, 111, -29, 22, 103, 41, 160, -20, -127, - 63, 161, 60, 15, 138, 42, 149, 119, 107, 121, - 150, 151, 137, 71, 177, 178, 132, 179, 91, 43, - 44, 153, 210, 148, 13, 96, 25, 45, 46, 47, - 48, 266, 267, 26, 25, 23, 104, 25, 27, 139, - 26, 152, 68, 154, 271, 27, 26, 49, 14, 155, - 32, 27, 49, 1, 194, 185, 36, 222, 150, 151, - 2, 3, 37, 49, 17, 38, 69, 112, 4, 5, - 72, -45, 198, 16, 73, 122, 214, 215, 74, 216, - 123, 218, 142, 143, 75, 76, 77, 174, 78, 152, - 175, 20, 79, 80, 81, 82, 83, 181, 178, 84, - 85, -45, -45, -45, 191, 255, 21, 192, 87, 112, - 29, 223, 72, -45, 252, 31, 73, 192, 34, 32, - 74, 205, 206, 207, 264, 265, 75, 76, 77, 178, - 78, 242, 241, 178, 79, 80, 81, 82, 83, 243, - 178, 84, 85, 258, 259, 260, 261, 251, 33, 35, - 87, 250, 178, 72, 244, 57, 58, 73, 59, 61, - 134, 74, 135, 32, 64, 136, 65, 75, 76, 77, - 66, 78, 263, 67, 98, 79, 80, 81, 82, 83, - 72, 245, 84, 85, 73, 70, 97, 86, 74, 99, - 47, 87, 100, 117, 75, 76, 77, 275, 78, 101, - 120, 115, 79, 80, 81, 82, 83, 123, 128, 84, - 85, -2, 18, 129, -14, 130, 131, 133, 87, 1, - 144, 146, 156, 157, 159, 158, 2, 3, 164, 167, - 166, 169, 170, 176, 4, 5, 180, 183, 186, 190, - 188, 195, 202, 196, 197, 199, 201, 212, 139, 211, - 213, 217, 229, 231, 234, 220, 219, 228, 235, 246, - 247, 253, 221, 254, 224, 248, 270, 226, 227, 256, - 249, 257, 232, 233, 178, 237, 274, 269, 19, 238, - 204, 200, 230, 147, 210, 236, 0, 145, 0, 268, - 273, 162 -}; - -static const yytype_int16 yycheck[] = -{ - 57, 20, 80, 112, 66, 114, 211, 57, 213, 1, - 32, 11, 69, 5, 1, 1, 8, 1, 5, 5, - 42, 5, 40, 24, 7, 17, 7, 76, 5, 78, - 11, 12, 89, 51, 10, 11, 85, 13, 95, 31, - 32, 103, 42, 100, 42, 95, 14, 39, 40, 41, - 42, 256, 257, 37, 22, 42, 42, 25, 42, 42, - 37, 42, 1, 8, 269, 42, 37, 35, 4, 14, - 9, 42, 40, 8, 7, 132, 1, 186, 11, 12, - 15, 16, 7, 51, 0, 10, 25, 1, 23, 24, - 4, 5, 154, 23, 8, 37, 174, 175, 12, 177, - 42, 179, 8, 9, 18, 19, 20, 10, 22, 42, - 13, 3, 26, 27, 28, 29, 30, 10, 11, 33, - 34, 35, 36, 37, 7, 234, 6, 10, 42, 1, - 42, 188, 4, 5, 7, 22, 8, 10, 25, 9, - 12, 35, 36, 37, 253, 254, 18, 19, 20, 11, - 22, 13, 10, 11, 26, 27, 28, 29, 30, 10, - 11, 33, 34, 241, 242, 243, 244, 229, 5, 4, - 42, 228, 11, 4, 13, 4, 42, 8, 42, 25, - 6, 12, 8, 9, 6, 11, 4, 18, 19, 20, - 4, 22, 249, 4, 42, 26, 27, 28, 29, 30, - 4, 220, 33, 34, 8, 5, 8, 38, 12, 6, - 41, 42, 25, 6, 18, 19, 20, 274, 22, 42, - 6, 42, 26, 27, 28, 29, 30, 42, 8, 33, - 34, 0, 1, 8, 3, 8, 6, 42, 42, 8, - 5, 8, 5, 5, 8, 13, 15, 16, 5, 8, - 6, 4, 42, 42, 23, 24, 8, 8, 4, 42, - 21, 42, 7, 42, 42, 42, 8, 7, 42, 13, - 11, 42, 8, 7, 11, 14, 42, 25, 5, 8, - 5, 11, 42, 11, 42, 8, 8, 42, 42, 13, - 25, 11, 42, 42, 11, 42, 7, 13, 7, 42, - 168, 158, 203, 99, 42, 209, -1, 95, -1, 42, - 42, 110 -}; - -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = -{ - 0, 8, 15, 16, 23, 24, 44, 45, 46, 48, - 49, 50, 51, 42, 4, 24, 23, 0, 1, 46, - 3, 6, 1, 42, 52, 53, 37, 42, 47, 42, - 55, 52, 9, 5, 52, 4, 1, 7, 10, 54, - 1, 8, 17, 31, 32, 39, 40, 41, 42, 53, - 56, 57, 58, 59, 91, 92, 96, 4, 42, 42, - 56, 25, 32, 42, 6, 4, 4, 4, 1, 25, - 5, 56, 4, 8, 12, 18, 19, 20, 22, 26, - 27, 28, 29, 30, 33, 34, 38, 42, 53, 65, - 70, 71, 82, 84, 89, 90, 96, 8, 42, 6, - 25, 42, 67, 1, 42, 93, 93, 5, 47, 94, - 95, 71, 1, 60, 71, 42, 80, 6, 63, 63, - 6, 63, 37, 42, 69, 77, 69, 79, 8, 8, - 8, 6, 63, 42, 6, 8, 11, 71, 7, 42, - 66, 86, 8, 9, 5, 89, 8, 67, 71, 7, - 11, 12, 42, 93, 8, 14, 5, 5, 13, 8, - 1, 5, 94, 60, 5, 60, 6, 8, 64, 4, - 42, 61, 62, 68, 10, 13, 42, 10, 11, 13, - 8, 10, 78, 8, 72, 71, 4, 83, 21, 76, - 42, 7, 10, 75, 7, 42, 42, 42, 93, 42, - 62, 8, 7, 81, 66, 35, 36, 37, 87, 88, - 42, 13, 7, 11, 69, 69, 69, 42, 69, 42, - 14, 42, 60, 71, 42, 85, 42, 42, 25, 8, - 86, 7, 42, 42, 11, 5, 87, 42, 42, 68, - 68, 10, 13, 10, 13, 47, 8, 5, 8, 25, - 71, 93, 7, 11, 11, 60, 13, 11, 69, 69, - 69, 69, 73, 71, 60, 60, 68, 68, 42, 13, - 8, 68, 74, 42, 7, 71 -}; - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. */ - -#define YYFAIL goto yyerrlab - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - yytoken = YYTRANSLATE (yychar); \ - YYPOPSTACK (1); \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (&yylloc, parseio, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (YYID (0)) - - -#define YYTERROR 1 -#define YYERRCODE 256 - - -/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. - If N is 0, then set CURRENT to the empty location which ends - the previous symbol: RHS[0] (always defined). */ - -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (YYID (N)) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (YYID (0)) -#endif - - -/* YY_LOCATION_PRINT -- Print the location on the stream. - This macro was not mandated originally: define only if we know - we won't break user code: when these are the locations we know. */ - -#ifndef YY_LOCATION_PRINT -# if YYLTYPE_IS_TRIVIAL -# define YY_LOCATION_PRINT(File, Loc) \ - fprintf (File, "%d.%d-%d.%d", \ - (Loc).first_line, (Loc).first_column, \ - (Loc).last_line, (Loc).last_column) -# else -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif -#endif - - -/* YYLEX -- calling `yylex' with the right arguments. */ - -#ifdef YYLEX_PARAM -# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) -#else -# define YYLEX yylex (&yylval, &yylloc) -#endif - -/* Enable debugging if requested. */ -#if YYDEBUG - -# ifndef YYFPRINTF -# include <stdio.h> /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value, Location, parseio); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parse_io *parseio) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, parseio) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - YYLTYPE const * const yylocationp; - struct parse_io *parseio; -#endif -{ - if (!yyvaluep) - return; - YYUSE (yylocationp); - YYUSE (parseio); -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); -# endif - switch (yytype) - { - default: - break; - } -} - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parse_io *parseio) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, parseio) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - YYLTYPE const * const yylocationp; - struct parse_io *parseio; -#endif -{ - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - - YY_LOCATION_PRINT (yyoutput, *yylocationp); - YYFPRINTF (yyoutput, ": "); - yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, parseio); - YYFPRINTF (yyoutput, ")"); -} - -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (included). | -`------------------------------------------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) -#else -static void -yy_stack_print (bottom, top) - yytype_int16 *bottom; - yytype_int16 *top; -#endif -{ - YYFPRINTF (stderr, "Stack now"); - for (; bottom <= top; ++bottom) - YYFPRINTF (stderr, " %d", *bottom); - YYFPRINTF (stderr, "\n"); -} - -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) - - -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, struct parse_io *parseio) -#else -static void -yy_reduce_print (yyvsp, yylsp, yyrule, parseio) - YYSTYPE *yyvsp; - YYLTYPE *yylsp; - int yyrule; - struct parse_io *parseio; -#endif -{ - int yynrhs = yyr2[yyrule]; - int yyi; - unsigned long int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); - /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - fprintf (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - , &(yylsp[(yyi + 1) - (yynrhs)]) , parseio); - fprintf (stderr, "\n"); - } -} - -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, yylsp, Rule, parseio); \ -} while (YYID (0)) - -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) -#endif /* !YYDEBUG */ - - -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ - -#ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 -#endif - - - -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static YYSIZE_T -yystrlen (const char *yystr) -#else -static YYSIZE_T -yystrlen (yystr) - const char *yystr; -#endif -{ - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -# endif - -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static char * -yystpcpy (char *yydest, const char *yysrc) -#else -static char * -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYSIZE_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif - -/* Copy into YYRESULT an error message about the unexpected token - YYCHAR while in state YYSTATE. Return the number of bytes copied, - including the terminating null byte. If YYRESULT is null, do not - copy anything; just return the number of bytes that would be - copied. As a special case, return 0 if an ordinary "syntax error" - message will do. Return YYSIZE_MAXIMUM if overflow occurs during - size calculation. */ -static YYSIZE_T -yysyntax_error (char *yyresult, int yystate, int yychar) -{ - int yyn = yypact[yystate]; - - if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) - return 0; - else - { - int yytype = YYTRANSLATE (yychar); - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); - YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; - int yysize_overflow = 0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - int yyx; - -# if 0 - /* This is so xgettext sees the translatable formats that are - constructed on the fly. */ - YY_("syntax error, unexpected %s"); - YY_("syntax error, unexpected %s, expecting %s"); - YY_("syntax error, unexpected %s, expecting %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); -# endif - char *yyfmt; - char const *yyf; - static char const yyunexpected[] = "syntax error, unexpected %s"; - static char const yyexpecting[] = ", expecting %s"; - static char const yyor[] = " or %s"; - char yyformat[sizeof yyunexpected - + sizeof yyexpecting - 1 - + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) - * (sizeof yyor - 1))]; - char const *yyprefix = yyexpecting; - - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yycount = 1; - - yyarg[0] = yytname[yytype]; - yyfmt = yystpcpy (yyformat, yyunexpected); - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - yyformat[sizeof yyunexpected - 1] = '\0'; - break; - } - yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - yyfmt = yystpcpy (yyfmt, yyprefix); - yyprefix = yyor; - } - - yyf = YY_(yyformat); - yysize1 = yysize + yystrlen (yyf); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - - if (yysize_overflow) - return YYSIZE_MAXIMUM; - - if (yyresult) - { - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - char *yyp = yyresult; - int yyi = 0; - while ((*yyp = *yyf) != '\0') - { - if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyf += 2; - } - else - { - yyp++; - yyf++; - } - } - } - return yysize; - } -} -#endif /* YYERROR_VERBOSE */ - - -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, struct parse_io *parseio) -#else -static void -yydestruct (yymsg, yytype, yyvaluep, yylocationp, parseio) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; - YYLTYPE *yylocationp; - struct parse_io *parseio; -#endif -{ - YYUSE (yyvaluep); - YYUSE (yylocationp); - YYUSE (parseio); - - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - - switch (yytype) - { - case 42: /* "word" */ -#line 179 "ael.y" - { free((yyvaluep->str));}; -#line 1457 "ael.tab.c" - break; - case 45: /* "objects" */ -#line 166 "ael.y" - { - destroy_pval((yyvaluep->pval)); - prev_word=0; - }; -#line 1465 "ael.tab.c" - break; - case 46: /* "object" */ -#line 166 "ael.y" - { - destroy_pval((yyvaluep->pval)); - prev_word=0; - }; -#line 1473 "ael.tab.c" - break; - case 47: /* "context_name" */ -#line 179 "ael.y" - { free((yyvaluep->str));}; -#line 1478 "ael.tab.c" - break; - case 48: /* "context" */ -#line 166 "ael.y" - { - destroy_pval((yyvaluep->pval)); - prev_word=0; - }; -#line 1486 "ael.tab.c" - break; - case 50: /* "macro" */ -#line 166 "ael.y" - { - destroy_pval((yyvaluep->pval)); - prev_word=0; - }; -#line 1494 "ael.tab.c" - break; - case 51: /* "globals" */ -#line 166 "ael.y" - { - destroy_pval((yyvaluep->pval)); - prev_word=0; - }; -#line 1502 "ael.tab.c" - break; - case 52: /* "global_statements" */ -#line 166 "ael.y" - { - destroy_pval((yyvaluep->pval)); - prev_word=0; - }; -#line 1510 "ael.tab.c" - break; - case 53: /* "assignment" */ -#line 166 "ael.y" - { - destroy_pval((yyvaluep->pval)); - prev_word=0; - }; -#line 1518 "ael.tab.c" - break; - case 55: /* "arglist" */ -#line 166 "ael.y" - { - destroy_pval((yyvaluep->pval)); - prev_word=0; - }; -#line 1526 "ael.tab.c" - break; - case 56: /* "elements" */ -#line 166 "ael.y" - { - destroy_pval((yyvaluep->pval)); - prev_word=0; - }; -#line 1534 "ael.tab.c" - break; - case 57: /* "element" */ -#line 166 "ael.y" - { - destroy_pval((yyvaluep->pval)); - prev_word=0; - }; -#line 1542 "ael.tab.c" - break; - case 58: /* "ignorepat" */ -#line 166 "ael.y" - { - destroy_pval((yyvaluep->pval)); - prev_word=0; - }; -#line 1550 "ael.tab.c" - break; - case 59: /* "extension" */ -#line 166 "ael.y" - { - destroy_pval((yyvaluep->pval)); - prev_word=0; - }; -#line 1558 "ael.tab.c" - break; - case 60: /* "statements" */ -#line 166 "ael.y" - { - destroy_pval((yyvaluep->pval)); - prev_word=0; - }; -#line 1566 "ael.tab.c" - break; - case 61: /* "timerange" */ -#line 179 "ael.y" - { free((yyvaluep->str));}; -#line 1571 "ael.tab.c" - break; - case 62: /* "timespec" */ -#line 166 "ael.y" - { - destroy_pval((yyvaluep->pval)); - prev_word=0; - }; -#line 1579 "ael.tab.c" - break; - case 63: /* "test_expr" */ -#line 179 "ael.y" - { free((yyvaluep->str));}; -#line 1584 "ael.tab.c" - break; - case 65: /* "if_like_head" */ -#line 166 "ael.y" - { - destroy_pval((yyvaluep->pval)); - prev_word=0; - }; -#line 1592 "ael.tab.c" - break; - case 66: /* "word_list" */ -#line 179 "ael.y" - { free((yyvaluep->str));}; -#line 1597 "ael.tab.c" - break; - case 68: /* "word3_list" */ -#line 179 "ael.y" - { free((yyvaluep->str));}; -#line 1602 "ael.tab.c" - break; - case 69: /* "goto_word" */ -#line 179 "ael.y" - { free((yyvaluep->str));}; -#line 1607 "ael.tab.c" - break; - case 70: /* "switch_statement" */ -#line 166 "ael.y" - { - destroy_pval((yyvaluep->pval)); - prev_word=0; - }; -#line 1615 "ael.tab.c" - break; - case 71: /* "statement" */ -#line 166 "ael.y" - { - destroy_pval((yyvaluep->pval)); - prev_word=0; - }; -#line 1623 "ael.tab.c" - break; - case 76: /* "opt_else" */ -#line 166 "ael.y" - { - destroy_pval((yyvaluep->pval)); - prev_word=0; - }; -#line 1631 "ael.tab.c" - break; - case 77: /* "target" */ -#line 166 "ael.y" - { - destroy_pval((yyvaluep->pval)); - prev_word=0; - }; -#line 1639 "ael.tab.c" - break; - case 78: /* "opt_pri" */ -#line 179 "ael.y" - { free((yyvaluep->str));}; -#line 1644 "ael.tab.c" - break; - case 79: /* "jumptarget" */ -#line 166 "ael.y" - { - destroy_pval((yyvaluep->pval)); - prev_word=0; - }; -#line 1652 "ael.tab.c" - break; - case 80: /* "macro_call" */ -#line 166 "ael.y" - { - destroy_pval((yyvaluep->pval)); - prev_word=0; - }; -#line 1660 "ael.tab.c" - break; - case 82: /* "application_call_head" */ -#line 166 "ael.y" - { - destroy_pval((yyvaluep->pval)); - prev_word=0; - }; -#line 1668 "ael.tab.c" - break; - case 84: /* "application_call" */ -#line 166 "ael.y" - { - destroy_pval((yyvaluep->pval)); - prev_word=0; - }; -#line 1676 "ael.tab.c" - break; - case 85: /* "opt_word" */ -#line 179 "ael.y" - { free((yyvaluep->str));}; -#line 1681 "ael.tab.c" - break; - case 86: /* "eval_arglist" */ -#line 166 "ael.y" - { - destroy_pval((yyvaluep->pval)); - prev_word=0; - }; -#line 1689 "ael.tab.c" - break; - case 87: /* "case_statements" */ -#line 166 "ael.y" - { - destroy_pval((yyvaluep->pval)); - prev_word=0; - }; -#line 1697 "ael.tab.c" - break; - case 88: /* "case_statement" */ -#line 166 "ael.y" - { - destroy_pval((yyvaluep->pval)); - prev_word=0; - }; -#line 1705 "ael.tab.c" - break; - case 89: /* "macro_statements" */ -#line 166 "ael.y" - { - destroy_pval((yyvaluep->pval)); - prev_word=0; - }; -#line 1713 "ael.tab.c" - break; - case 90: /* "macro_statement" */ -#line 166 "ael.y" - { - destroy_pval((yyvaluep->pval)); - prev_word=0; - }; -#line 1721 "ael.tab.c" - break; - case 91: /* "switches" */ -#line 166 "ael.y" - { - destroy_pval((yyvaluep->pval)); - prev_word=0; - }; -#line 1729 "ael.tab.c" - break; - case 92: /* "eswitches" */ -#line 166 "ael.y" - { - destroy_pval((yyvaluep->pval)); - prev_word=0; - }; -#line 1737 "ael.tab.c" - break; - case 93: /* "switchlist" */ -#line 166 "ael.y" - { - destroy_pval((yyvaluep->pval)); - prev_word=0; - }; -#line 1745 "ael.tab.c" - break; - case 94: /* "included_entry" */ -#line 166 "ael.y" - { - destroy_pval((yyvaluep->pval)); - prev_word=0; - }; -#line 1753 "ael.tab.c" - break; - case 95: /* "includeslist" */ -#line 166 "ael.y" - { - destroy_pval((yyvaluep->pval)); - prev_word=0; - }; -#line 1761 "ael.tab.c" - break; - case 96: /* "includes" */ -#line 166 "ael.y" - { - destroy_pval((yyvaluep->pval)); - prev_word=0; - }; -#line 1769 "ael.tab.c" - break; - - default: - break; - } -} - - -/* Prevent warnings from -Wmissing-prototypes. */ - -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (struct parse_io *parseio); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ - - - - - - -/*----------. -| yyparse. | -`----------*/ - -#ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -#endif -#else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (struct parse_io *parseio) -#else -int -yyparse (parseio) - struct parse_io *parseio; -#endif -#endif -{ - /* The look-ahead symbol. */ -int yychar; - -/* The semantic value of the look-ahead symbol. */ -YYSTYPE yylval; - -/* Number of syntax errors so far. */ -int yynerrs; -/* Location data for the look-ahead symbol. */ -YYLTYPE yylloc; - - int yystate; - int yyn; - int yyresult; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - /* Look-ahead token as an internal (translated) token number. */ - int yytoken = 0; -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif - - /* Three stacks and their tools: - `yyss': related to states, - `yyvs': related to semantic values, - `yyls': related to locations. - - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss = yyssa; - yytype_int16 *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp; - - /* The location stack. */ - YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls = yylsa; - YYLTYPE *yylsp; - /* The locations where the error started and ended. */ - YYLTYPE yyerror_range[2]; - -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) - - YYSIZE_T yystacksize = YYINITDEPTH; - - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - YYLTYPE yyloc; - - /* The number of symbols on the RHS of the reduced rule. - Keep to zero when no symbol should be popped. */ - int yylen = 0; - - YYDPRINTF ((stderr, "Starting parse\n")); - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - - yyssp = yyss; - yyvsp = yyvs; - yylsp = yyls; -#if YYLTYPE_IS_TRIVIAL - /* Initialize the default location before parsing starts. */ - yylloc.first_line = yylloc.last_line = 1; - yylloc.first_column = yylloc.last_column = 0; -#endif - - goto yysetstate; - -/*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | -`------------------------------------------------------------*/ - yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. So pushing a state here evens the stacks. */ - yyssp++; - - yysetstate: - *yyssp = yystate; - - if (yyss + yystacksize - 1 <= yyssp) - { - /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; - -#ifdef yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - YYLTYPE *yyls1 = yyls; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yyls1, yysize * sizeof (*yylsp), - &yystacksize); - yyls = yyls1; - yyss = yyss1; - yyvs = yyvs1; - } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss); - YYSTACK_RELOCATE (yyvs); - YYSTACK_RELOCATE (yyls); -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif -#endif /* no yyoverflow */ - - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - yylsp = yyls + yysize - 1; - - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); - - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } - - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - - goto yybackup; - -/*-----------. -| yybackup. | -`-----------*/ -yybackup: - - /* Do appropriate processing given the current state. Read a - look-ahead token if we need one and don't already have one. */ - - /* First try to decide what to do without reference to look-ahead token. */ - yyn = yypact[yystate]; - if (yyn == YYPACT_NINF) - goto yydefault; - - /* Not known => get a look-ahead token if don't already have one. */ - - /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; - } - - if (yychar <= YYEOF) - { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) - goto yydefault; - yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yyn == 0 || yyn == YYTABLE_NINF) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - - if (yyn == YYFINAL) - YYACCEPT; - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - /* Shift the look-ahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; - - yystate = yyn; - *++yyvsp = yylval; - *++yylsp = yylloc; - goto yynewstate; - - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ -yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; - - -/*-----------------------------. -| yyreduce -- Do a reduction. | -`-----------------------------*/ -yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; - - /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; - - /* Default location. */ - YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 2: -#line 187 "ael.y" - { (yyval.pval) = parseio->pval = (yyvsp[(1) - (1)].pval); ;} - break; - - case 3: -#line 190 "ael.y" - {(yyval.pval)=(yyvsp[(1) - (1)].pval);;} - break; - - case 4: -#line 191 "ael.y" - { (yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); ;} - break; - - case 5: -#line 192 "ael.y" - {(yyval.pval)=(yyvsp[(1) - (2)].pval);;} - break; - - case 6: -#line 195 "ael.y" - {(yyval.pval)=(yyvsp[(1) - (1)].pval);;} - break; - - case 7: -#line 196 "ael.y" - {(yyval.pval)=(yyvsp[(1) - (1)].pval);;} - break; - - case 8: -#line 197 "ael.y" - {(yyval.pval)=(yyvsp[(1) - (1)].pval);;} - break; - - case 9: -#line 198 "ael.y" - {(yyval.pval)=0;/* allow older docs to be read */;} - break; - - case 10: -#line 201 "ael.y" - { (yyval.str) = (yyvsp[(1) - (1)].str); ;} - break; - - case 11: -#line 202 "ael.y" - { (yyval.str) = strdup("default"); ;} - break; - - case 12: -#line 205 "ael.y" - { - (yyval.pval) = npval2(PV_CONTEXT, &(yylsp[(1) - (6)]), &(yylsp[(6) - (6)])); - (yyval.pval)->u1.str = (yyvsp[(3) - (6)].str); - (yyval.pval)->u2.statements = (yyvsp[(5) - (6)].pval); - set_dads((yyval.pval),(yyvsp[(5) - (6)].pval)); - (yyval.pval)->u3.abstract = (yyvsp[(1) - (6)].intval);;} - break; - - case 13: -#line 214 "ael.y" - { (yyval.intval) = 1; ;} - break; - - case 14: -#line 215 "ael.y" - { (yyval.intval) = 0; ;} - break; - - case 15: -#line 216 "ael.y" - { (yyval.intval) = 2; ;} - break; - - case 16: -#line 217 "ael.y" - { (yyval.intval)=3; ;} - break; - - case 17: -#line 218 "ael.y" - { (yyval.intval)=3; ;} - break; - - case 18: -#line 221 "ael.y" - { - (yyval.pval) = npval2(PV_MACRO, &(yylsp[(1) - (8)]), &(yylsp[(8) - (8)])); - (yyval.pval)->u1.str = (yyvsp[(2) - (8)].str); (yyval.pval)->u2.arglist = (yyvsp[(4) - (8)].pval); (yyval.pval)->u3.macro_statements = (yyvsp[(7) - (8)].pval); - set_dads((yyval.pval),(yyvsp[(7) - (8)].pval));;} - break; - - case 19: -#line 227 "ael.y" - { - (yyval.pval) = npval2(PV_GLOBALS, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)])); - (yyval.pval)->u1.statements = (yyvsp[(3) - (4)].pval); - set_dads((yyval.pval),(yyvsp[(3) - (4)].pval));;} - break; - - case 20: -#line 233 "ael.y" - { (yyval.pval) = NULL; ;} - break; - - case 21: -#line 234 "ael.y" - {(yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); ;} - break; - - case 22: -#line 235 "ael.y" - {(yyval.pval)=(yyvsp[(2) - (2)].pval);;} - break; - - case 23: -#line 238 "ael.y" - { reset_semicount(parseio->scanner); ;} - break; - - case 24: -#line 238 "ael.y" - { - (yyval.pval) = npval2(PV_VARDEC, &(yylsp[(1) - (5)]), &(yylsp[(5) - (5)])); - (yyval.pval)->u1.str = (yyvsp[(1) - (5)].str); - (yyval.pval)->u2.val = (yyvsp[(4) - (5)].str); ;} - break; - - case 25: -#line 245 "ael.y" - { (yyval.pval) = NULL; ;} - break; - - case 26: -#line 246 "ael.y" - { (yyval.pval) = nword((yyvsp[(1) - (1)].str), &(yylsp[(1) - (1)])); ;} - break; - - case 27: -#line 247 "ael.y" - { (yyval.pval) = linku1((yyvsp[(1) - (3)].pval), nword((yyvsp[(3) - (3)].str), &(yylsp[(3) - (3)]))); ;} - break; - - case 28: -#line 248 "ael.y" - {(yyval.pval)=(yyvsp[(1) - (2)].pval);;} - break; - - case 29: -#line 251 "ael.y" - {(yyval.pval)=0;;} - break; - - case 30: -#line 252 "ael.y" - { (yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); ;} - break; - - case 31: -#line 253 "ael.y" - { (yyval.pval)=(yyvsp[(2) - (2)].pval);;} - break; - - case 32: -#line 256 "ael.y" - {(yyval.pval)=(yyvsp[(1) - (1)].pval);;} - break; - - case 33: -#line 257 "ael.y" - {(yyval.pval)=(yyvsp[(1) - (1)].pval);;} - break; - - case 34: -#line 258 "ael.y" - {(yyval.pval)=(yyvsp[(1) - (1)].pval);;} - break; - - case 35: -#line 259 "ael.y" - {(yyval.pval)=(yyvsp[(1) - (1)].pval);;} - break; - - case 36: -#line 260 "ael.y" - {(yyval.pval)=(yyvsp[(1) - (1)].pval);;} - break; - - case 37: -#line 261 "ael.y" - {(yyval.pval)=(yyvsp[(1) - (1)].pval);;} - break; - - case 38: -#line 262 "ael.y" - {free((yyvsp[(1) - (2)].str)); (yyval.pval)=0;;} - break; - - case 39: -#line 263 "ael.y" - {(yyval.pval)=0;/* allow older docs to be read */;} - break; - - case 40: -#line 266 "ael.y" - { - (yyval.pval) = npval2(PV_IGNOREPAT, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)])); - (yyval.pval)->u1.str = (yyvsp[(3) - (4)].str);;} - break; - - case 41: -#line 271 "ael.y" - { - (yyval.pval) = npval2(PV_EXTENSION, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)])); - (yyval.pval)->u1.str = (yyvsp[(1) - (3)].str); - (yyval.pval)->u2.statements = (yyvsp[(3) - (3)].pval); set_dads((yyval.pval),(yyvsp[(3) - (3)].pval));;} - break; - - case 42: -#line 275 "ael.y" - { - (yyval.pval) = npval2(PV_EXTENSION, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)])); - (yyval.pval)->u1.str = (yyvsp[(2) - (4)].str); - (yyval.pval)->u2.statements = (yyvsp[(4) - (4)].pval); set_dads((yyval.pval),(yyvsp[(4) - (4)].pval)); - (yyval.pval)->u4.regexten=1;;} - break; - - case 43: -#line 280 "ael.y" - { - (yyval.pval) = npval2(PV_EXTENSION, &(yylsp[(1) - (7)]), &(yylsp[(7) - (7)])); - (yyval.pval)->u1.str = (yyvsp[(5) - (7)].str); - (yyval.pval)->u2.statements = (yyvsp[(7) - (7)].pval); set_dads((yyval.pval),(yyvsp[(7) - (7)].pval)); - (yyval.pval)->u3.hints = (yyvsp[(3) - (7)].str);;} - break; - - case 44: -#line 285 "ael.y" - { - (yyval.pval) = npval2(PV_EXTENSION, &(yylsp[(1) - (8)]), &(yylsp[(8) - (8)])); - (yyval.pval)->u1.str = (yyvsp[(6) - (8)].str); - (yyval.pval)->u2.statements = (yyvsp[(8) - (8)].pval); set_dads((yyval.pval),(yyvsp[(8) - (8)].pval)); - (yyval.pval)->u4.regexten=1; - (yyval.pval)->u3.hints = (yyvsp[(4) - (8)].str);;} - break; - - case 45: -#line 295 "ael.y" - { (yyval.pval) = NULL; ;} - break; - - case 46: -#line 296 "ael.y" - { (yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); ;} - break; - - case 47: -#line 297 "ael.y" - {(yyval.pval)=(yyvsp[(2) - (2)].pval);;} - break; - - case 48: -#line 303 "ael.y" - { - if (asprintf(&(yyval.str), "%s:%s:%s", (yyvsp[(1) - (5)].str), (yyvsp[(3) - (5)].str), (yyvsp[(5) - (5)].str)) < 0) { - ast_log(LOG_WARNING, "asprintf() failed\n"); - (yyval.str) = NULL; - } else { - free((yyvsp[(1) - (5)].str)); - free((yyvsp[(3) - (5)].str)); - free((yyvsp[(5) - (5)].str)); - } - ;} - break; - - case 49: -#line 313 "ael.y" - { (yyval.str) = (yyvsp[(1) - (1)].str); ;} - break; - - case 50: -#line 317 "ael.y" - { - (yyval.pval) = nword((yyvsp[(1) - (7)].str), &(yylsp[(1) - (7)])); - (yyval.pval)->next = nword((yyvsp[(3) - (7)].str), &(yylsp[(3) - (7)])); - (yyval.pval)->next->next = nword((yyvsp[(5) - (7)].str), &(yylsp[(5) - (7)])); - (yyval.pval)->next->next->next = nword((yyvsp[(7) - (7)].str), &(yylsp[(7) - (7)])); ;} - break; - - case 51: -#line 325 "ael.y" - { reset_parencount(parseio->scanner); ;} - break; - - case 52: -#line 325 "ael.y" - { (yyval.str) = (yyvsp[(3) - (4)].str); ;} - break; - - case 53: -#line 329 "ael.y" - { - (yyval.pval)= npval2(PV_IF, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)])); - (yyval.pval)->u1.str = (yyvsp[(2) - (2)].str); ;} - break; - - case 54: -#line 332 "ael.y" - { - (yyval.pval) = npval2(PV_RANDOM, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)])); - (yyval.pval)->u1.str=(yyvsp[(2) - (2)].str);;} - break; - - case 55: -#line 335 "ael.y" - { - (yyval.pval) = npval2(PV_IFTIME, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)])); - (yyval.pval)->u1.list = (yyvsp[(3) - (4)].pval); - prev_word = 0; ;} - break; - - case 56: -#line 346 "ael.y" - { (yyval.str) = (yyvsp[(1) - (1)].str);;} - break; - - case 57: -#line 347 "ael.y" - { - if (asprintf(&((yyval.str)), "%s%s", (yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str)) < 0) { - ast_log(LOG_WARNING, "asprintf() failed\n"); - (yyval.str) = NULL; - } else { - free((yyvsp[(1) - (2)].str)); - free((yyvsp[(2) - (2)].str)); - prev_word = (yyval.str); - } - ;} - break; - - case 58: -#line 359 "ael.y" - { (yyval.str) = (yyvsp[(1) - (1)].str); ;} - break; - - case 59: -#line 360 "ael.y" - { - if (asprintf(&((yyval.str)), "%s %s", (yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str)) < 0) { - ast_log(LOG_WARNING, "asprintf() failed\n"); - (yyval.str) = NULL; - } else { - free((yyvsp[(1) - (2)].str)); - free((yyvsp[(2) - (2)].str)); - } - ;} - break; - - case 60: -#line 369 "ael.y" - { - if (asprintf(&((yyval.str)), "%s:%s", (yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].str)) < 0) { - ast_log(LOG_WARNING, "asprintf() failed\n"); - (yyval.str) = NULL; - } else { - free((yyvsp[(1) - (3)].str)); - free((yyvsp[(3) - (3)].str)); - } - ;} - break; - - case 61: -#line 378 "ael.y" - { /* there are often '&' in hints */ - if (asprintf(&((yyval.str)), "%s&%s", (yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].str)) < 0) { - ast_log(LOG_WARNING, "asprintf() failed\n"); - (yyval.str) = NULL; - } else { - free((yyvsp[(1) - (3)].str)); - free((yyvsp[(3) - (3)].str)); - } - ;} - break; - - case 62: -#line 389 "ael.y" - { (yyval.str) = (yyvsp[(1) - (1)].str);;} - break; - - case 63: -#line 390 "ael.y" - { - if (asprintf(&((yyval.str)), "%s%s", (yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str)) < 0) { - ast_log(LOG_WARNING, "asprintf() failed\n"); - (yyval.str) = NULL; - } else { - free((yyvsp[(1) - (2)].str)); - free((yyvsp[(2) - (2)].str)); - prev_word = (yyval.str); - } - ;} - break; - - case 64: -#line 400 "ael.y" - { - if (asprintf(&((yyval.str)), "%s%s%s", (yyvsp[(1) - (3)].str), (yyvsp[(2) - (3)].str), (yyvsp[(3) - (3)].str)) < 0) { - ast_log(LOG_WARNING, "asprintf() failed\n"); - (yyval.str) = NULL; - } else { - free((yyvsp[(1) - (3)].str)); - free((yyvsp[(2) - (3)].str)); - free((yyvsp[(3) - (3)].str)); - prev_word=(yyval.str); - } - ;} - break; - - case 65: -#line 413 "ael.y" - { (yyval.str) = (yyvsp[(1) - (1)].str);;} - break; - - case 66: -#line 414 "ael.y" - { - if (asprintf(&((yyval.str)), "%s%s", (yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str)) < 0) { - ast_log(LOG_WARNING, "asprintf() failed\n"); - (yyval.str) = NULL; - } else { - free((yyvsp[(1) - (2)].str)); - free((yyvsp[(2) - (2)].str)); - } - ;} - break; - - case 67: -#line 423 "ael.y" - { - if (asprintf(&((yyval.str)), "%s:%s", (yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].str)) < 0) { - ast_log(LOG_WARNING, "asprintf() failed\n"); - (yyval.str) = NULL; - } else { - free((yyvsp[(1) - (3)].str)); - free((yyvsp[(3) - (3)].str)); - } - ;} - break; - - case 68: -#line 434 "ael.y" - { - (yyval.pval) = npval2(PV_SWITCH, &(yylsp[(1) - (5)]), &(yylsp[(5) - (5)])); - (yyval.pval)->u1.str = (yyvsp[(2) - (5)].str); - (yyval.pval)->u2.statements = (yyvsp[(4) - (5)].pval); set_dads((yyval.pval),(yyvsp[(4) - (5)].pval));;} - break; - - case 69: -#line 443 "ael.y" - { - (yyval.pval) = npval2(PV_STATEMENTBLOCK, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)])); - (yyval.pval)->u1.list = (yyvsp[(2) - (3)].pval); set_dads((yyval.pval),(yyvsp[(2) - (3)].pval));;} - break; - - case 70: -#line 446 "ael.y" - { (yyval.pval) = (yyvsp[(1) - (1)].pval); ;} - break; - - case 71: -#line 447 "ael.y" - { - (yyval.pval) = npval2(PV_GOTO, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)])); - (yyval.pval)->u1.list = (yyvsp[(2) - (3)].pval);;} - break; - - case 72: -#line 450 "ael.y" - { - (yyval.pval) = npval2(PV_GOTO, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)])); - (yyval.pval)->u1.list = (yyvsp[(2) - (3)].pval);;} - break; - - case 73: -#line 453 "ael.y" - { - (yyval.pval) = npval2(PV_LABEL, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)])); - (yyval.pval)->u1.str = (yyvsp[(1) - (2)].str); ;} - break; - - case 74: -#line 456 "ael.y" - {reset_semicount(parseio->scanner);;} - break; - - case 75: -#line 457 "ael.y" - {reset_semicount(parseio->scanner);;} - break; - - case 76: -#line 458 "ael.y" - {reset_parencount(parseio->scanner);;} - break; - - case 77: -#line 458 "ael.y" - { /* XXX word_list maybe ? */ - (yyval.pval) = npval2(PV_FOR, &(yylsp[(1) - (12)]), &(yylsp[(12) - (12)])); - (yyval.pval)->u1.for_init = (yyvsp[(4) - (12)].str); - (yyval.pval)->u2.for_test=(yyvsp[(7) - (12)].str); - (yyval.pval)->u3.for_inc = (yyvsp[(10) - (12)].str); - (yyval.pval)->u4.for_statements = (yyvsp[(12) - (12)].pval); set_dads((yyval.pval),(yyvsp[(12) - (12)].pval));;} - break; - - case 78: -#line 464 "ael.y" - { - (yyval.pval) = npval2(PV_WHILE, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)])); - (yyval.pval)->u1.str = (yyvsp[(2) - (3)].str); - (yyval.pval)->u2.statements = (yyvsp[(3) - (3)].pval); set_dads((yyval.pval),(yyvsp[(3) - (3)].pval));;} - break; - - case 79: -#line 468 "ael.y" - { (yyval.pval) = (yyvsp[(1) - (1)].pval); ;} - break; - - case 80: -#line 469 "ael.y" - { (yyval.pval) = update_last((yyvsp[(2) - (3)].pval), &(yylsp[(2) - (3)])); ;} - break; - - case 81: -#line 470 "ael.y" - { (yyval.pval) = update_last((yyvsp[(1) - (2)].pval), &(yylsp[(2) - (2)])); ;} - break; - - case 82: -#line 471 "ael.y" - { - (yyval.pval)= npval2(PV_APPLICATION_CALL, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)])); - (yyval.pval)->u1.str = (yyvsp[(1) - (2)].str);;} - break; - - case 83: -#line 474 "ael.y" - {reset_semicount(parseio->scanner);;} - break; - - case 84: -#line 474 "ael.y" - { - char *bufx; - int tot=0; - pval *pptr; - (yyval.pval) = npval2(PV_VARDEC, &(yylsp[(1) - (5)]), &(yylsp[(5) - (5)])); - (yyval.pval)->u2.val=(yyvsp[(4) - (5)].str); - /* rebuild the original string-- this is not an app call, it's an unwrapped vardec, with a func call on the LHS */ - /* string to big to fit in the buffer? */ - tot+=strlen((yyvsp[(1) - (5)].pval)->u1.str); - for(pptr=(yyvsp[(1) - (5)].pval)->u2.arglist;pptr;pptr=pptr->next) { - tot+=strlen(pptr->u1.str); - tot++; /* for a sep like a comma */ - } - tot+=4; /* for safety */ - bufx = calloc(1, tot); - strcpy(bufx,(yyvsp[(1) - (5)].pval)->u1.str); - strcat(bufx,"("); - /* XXX need to advance the pointer or the loop is very inefficient */ - for (pptr=(yyvsp[(1) - (5)].pval)->u2.arglist;pptr;pptr=pptr->next) { - if ( pptr != (yyvsp[(1) - (5)].pval)->u2.arglist ) - strcat(bufx,","); - strcat(bufx,pptr->u1.str); - } - strcat(bufx,")"); -#ifdef AAL_ARGCHECK - if ( !ael_is_funcname((yyvsp[(1) - (5)].pval)->u1.str) ) - ast_log(LOG_WARNING, "==== File: %s, Line %d, Cols: %d-%d: Function call? The name %s is not in my internal list of function names\n", - my_file, (yylsp[(1) - (5)]).first_line, (yylsp[(1) - (5)]).first_column, (yylsp[(1) - (5)]).last_column, (yyvsp[(1) - (5)].pval)->u1.str); -#endif - (yyval.pval)->u1.str = bufx; - destroy_pval((yyvsp[(1) - (5)].pval)); /* the app call it is not, get rid of that chain */ - prev_word = 0; - ;} - break; - - case 85: -#line 507 "ael.y" - { (yyval.pval) = npval2(PV_BREAK, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)])); ;} - break; - - case 86: -#line 508 "ael.y" - { (yyval.pval) = npval2(PV_RETURN, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)])); ;} - break; - - case 87: -#line 509 "ael.y" - { (yyval.pval) = npval2(PV_CONTINUE, &(yylsp[(1) - (2)]), &(yylsp[(2) - (2)])); ;} - break; - - case 88: -#line 510 "ael.y" - { - (yyval.pval) = update_last((yyvsp[(1) - (3)].pval), &(yylsp[(2) - (3)])); - (yyval.pval)->u2.statements = (yyvsp[(2) - (3)].pval); set_dads((yyval.pval),(yyvsp[(2) - (3)].pval)); - (yyval.pval)->u3.else_statements = (yyvsp[(3) - (3)].pval);set_dads((yyval.pval),(yyvsp[(3) - (3)].pval));;} - break; - - case 89: -#line 514 "ael.y" - { (yyval.pval)=0; ;} - break; - - case 90: -#line 517 "ael.y" - { (yyval.pval) = (yyvsp[(2) - (2)].pval); ;} - break; - - case 91: -#line 518 "ael.y" - { (yyval.pval) = NULL ; ;} - break; - - case 92: -#line 521 "ael.y" - { (yyval.pval) = nword((yyvsp[(1) - (1)].str), &(yylsp[(1) - (1)])); ;} - break; - - case 93: -#line 522 "ael.y" - { - (yyval.pval) = nword((yyvsp[(1) - (3)].str), &(yylsp[(1) - (3)])); - (yyval.pval)->next = nword((yyvsp[(3) - (3)].str), &(yylsp[(3) - (3)])); ;} - break; - - case 94: -#line 525 "ael.y" - { - (yyval.pval) = nword((yyvsp[(1) - (3)].str), &(yylsp[(1) - (3)])); - (yyval.pval)->next = nword((yyvsp[(3) - (3)].str), &(yylsp[(3) - (3)])); ;} - break; - - case 95: -#line 528 "ael.y" - { - (yyval.pval) = nword((yyvsp[(1) - (5)].str), &(yylsp[(1) - (5)])); - (yyval.pval)->next = nword((yyvsp[(3) - (5)].str), &(yylsp[(3) - (5)])); - (yyval.pval)->next->next = nword((yyvsp[(5) - (5)].str), &(yylsp[(5) - (5)])); ;} - break; - - case 96: -#line 532 "ael.y" - { - (yyval.pval) = nword((yyvsp[(1) - (5)].str), &(yylsp[(1) - (5)])); - (yyval.pval)->next = nword((yyvsp[(3) - (5)].str), &(yylsp[(3) - (5)])); - (yyval.pval)->next->next = nword((yyvsp[(5) - (5)].str), &(yylsp[(5) - (5)])); ;} - break; - - case 97: -#line 536 "ael.y" - { - (yyval.pval) = nword(strdup("default"), &(yylsp[(1) - (5)])); - (yyval.pval)->next = nword((yyvsp[(3) - (5)].str), &(yylsp[(3) - (5)])); - (yyval.pval)->next->next = nword((yyvsp[(5) - (5)].str), &(yylsp[(5) - (5)])); ;} - break; - - case 98: -#line 540 "ael.y" - { - (yyval.pval) = nword(strdup("default"), &(yylsp[(1) - (5)])); - (yyval.pval)->next = nword((yyvsp[(3) - (5)].str), &(yylsp[(3) - (5)])); - (yyval.pval)->next->next = nword((yyvsp[(5) - (5)].str), &(yylsp[(5) - (5)])); ;} - break; - - case 99: -#line 546 "ael.y" - { (yyval.str) = strdup("1"); ;} - break; - - case 100: -#line 547 "ael.y" - { (yyval.str) = (yyvsp[(2) - (2)].str); ;} - break; - - case 101: -#line 551 "ael.y" - { /* ext[, pri] default 1 */ - (yyval.pval) = nword((yyvsp[(1) - (2)].str), &(yylsp[(1) - (2)])); - (yyval.pval)->next = nword((yyvsp[(2) - (2)].str), &(yylsp[(2) - (2)])); ;} - break; - - case 102: -#line 554 "ael.y" - { /* context, ext, pri */ - (yyval.pval) = nword((yyvsp[(4) - (4)].str), &(yylsp[(4) - (4)])); - (yyval.pval)->next = nword((yyvsp[(1) - (4)].str), &(yylsp[(1) - (4)])); - (yyval.pval)->next->next = nword((yyvsp[(2) - (4)].str), &(yylsp[(2) - (4)])); ;} - break; - - case 103: -#line 560 "ael.y" - {reset_argcount(parseio->scanner);;} - break; - - case 104: -#line 560 "ael.y" - { - /* XXX original code had @2 but i think we need @5 */ - (yyval.pval) = npval2(PV_MACRO_CALL, &(yylsp[(1) - (5)]), &(yylsp[(5) - (5)])); - (yyval.pval)->u1.str = (yyvsp[(1) - (5)].str); - (yyval.pval)->u2.arglist = (yyvsp[(4) - (5)].pval);;} - break; - - case 105: -#line 565 "ael.y" - { - (yyval.pval)= npval2(PV_MACRO_CALL, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)])); - (yyval.pval)->u1.str = (yyvsp[(1) - (3)].str); ;} - break; - - case 106: -#line 573 "ael.y" - {reset_argcount(parseio->scanner);;} - break; - - case 107: -#line 573 "ael.y" - { - if (strcasecmp((yyvsp[(1) - (3)].str),"goto") == 0) { - (yyval.pval) = npval2(PV_GOTO, &(yylsp[(1) - (3)]), &(yylsp[(2) - (3)])); - free((yyvsp[(1) - (3)].str)); /* won't be using this */ - ast_log(LOG_WARNING, "==== File: %s, Line %d, Cols: %d-%d: Suggestion: Use the goto statement instead of the Goto() application call in AEL.\n", my_file, (yylsp[(1) - (3)]).first_line, (yylsp[(1) - (3)]).first_column, (yylsp[(1) - (3)]).last_column ); - } else { - (yyval.pval)= npval2(PV_APPLICATION_CALL, &(yylsp[(1) - (3)]), &(yylsp[(2) - (3)])); - (yyval.pval)->u1.str = (yyvsp[(1) - (3)].str); - } ;} - break; - - case 108: -#line 584 "ael.y" - { - (yyval.pval) = update_last((yyvsp[(1) - (3)].pval), &(yylsp[(3) - (3)])); - if( (yyval.pval)->type == PV_GOTO ) - (yyval.pval)->u1.list = (yyvsp[(2) - (3)].pval); - else - (yyval.pval)->u2.arglist = (yyvsp[(2) - (3)].pval); - ;} - break; - - case 109: -#line 591 "ael.y" - { (yyval.pval) = update_last((yyvsp[(1) - (2)].pval), &(yylsp[(2) - (2)])); ;} - break; - - case 110: -#line 594 "ael.y" - { (yyval.str) = (yyvsp[(1) - (1)].str) ;} - break; - - case 111: -#line 595 "ael.y" - { (yyval.str) = strdup(""); ;} - break; - - case 112: -#line 598 "ael.y" - { (yyval.pval) = nword((yyvsp[(1) - (1)].str), &(yylsp[(1) - (1)])); ;} - break; - - case 113: -#line 599 "ael.y" - { - (yyval.pval)= npval(PV_WORD,0/*@1.first_line*/,0/*@1.last_line*/,0/* @1.first_column*/, 0/*@1.last_column*/); - (yyval.pval)->u1.str = strdup(""); ;} - break; - - case 114: -#line 602 "ael.y" - { (yyval.pval) = linku1((yyvsp[(1) - (3)].pval), nword((yyvsp[(3) - (3)].str), &(yylsp[(3) - (3)]))); ;} - break; - - case 115: -#line 605 "ael.y" - { (yyval.pval) = NULL; ;} - break; - - case 116: -#line 606 "ael.y" - { (yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); ;} - break; - - case 117: -#line 609 "ael.y" - { - (yyval.pval) = npval2(PV_CASE, &(yylsp[(1) - (4)]), &(yylsp[(3) - (4)])); /* XXX 3 or 4 ? */ - (yyval.pval)->u1.str = (yyvsp[(2) - (4)].str); - (yyval.pval)->u2.statements = (yyvsp[(4) - (4)].pval); set_dads((yyval.pval),(yyvsp[(4) - (4)].pval));;} - break; - - case 118: -#line 613 "ael.y" - { - (yyval.pval) = npval2(PV_DEFAULT, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)])); - (yyval.pval)->u1.str = NULL; - (yyval.pval)->u2.statements = (yyvsp[(3) - (3)].pval);set_dads((yyval.pval),(yyvsp[(3) - (3)].pval));;} - break; - - case 119: -#line 617 "ael.y" - { - (yyval.pval) = npval2(PV_PATTERN, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)])); /* XXX@3 or @4 ? */ - (yyval.pval)->u1.str = (yyvsp[(2) - (4)].str); - (yyval.pval)->u2.statements = (yyvsp[(4) - (4)].pval);set_dads((yyval.pval),(yyvsp[(4) - (4)].pval));;} - break; - - case 120: -#line 623 "ael.y" - { (yyval.pval) = NULL; ;} - break; - - case 121: -#line 624 "ael.y" - { (yyval.pval) = linku1((yyvsp[(1) - (2)].pval), (yyvsp[(2) - (2)].pval)); ;} - break; - - case 122: -#line 627 "ael.y" - {(yyval.pval)=(yyvsp[(1) - (1)].pval);;} - break; - - case 123: -#line 628 "ael.y" - { (yyval.pval)=(yyvsp[(1) - (1)].pval);;} - break; - - case 124: -#line 629 "ael.y" - { - (yyval.pval) = npval2(PV_CATCH, &(yylsp[(1) - (5)]), &(yylsp[(5) - (5)])); - (yyval.pval)->u1.str = (yyvsp[(2) - (5)].str); - (yyval.pval)->u2.statements = (yyvsp[(4) - (5)].pval); set_dads((yyval.pval),(yyvsp[(4) - (5)].pval));;} - break; - - case 125: -#line 635 "ael.y" - { - (yyval.pval) = npval2(PV_SWITCHES, &(yylsp[(1) - (4)]), &(yylsp[(2) - (4)])); - (yyval.pval)->u1.list = (yyvsp[(3) - (4)].pval); set_dads((yyval.pval),(yyvsp[(3) - (4)].pval));;} - break; - - case 126: -#line 640 "ael.y" - { - (yyval.pval) = npval2(PV_ESWITCHES, &(yylsp[(1) - (4)]), &(yylsp[(2) - (4)])); - (yyval.pval)->u1.list = (yyvsp[(3) - (4)].pval); set_dads((yyval.pval),(yyvsp[(3) - (4)].pval));;} - break; - - case 127: -#line 645 "ael.y" - { (yyval.pval) = NULL; ;} - break; - - case 128: -#line 646 "ael.y" - { (yyval.pval) = linku1(nword((yyvsp[(1) - (3)].str), &(yylsp[(1) - (3)])), (yyvsp[(3) - (3)].pval)); ;} - break; - - case 129: -#line 647 "ael.y" - { - char *x; - if (asprintf(&x,"%s@%s", (yyvsp[(1) - (5)].str), (yyvsp[(3) - (5)].str)) < 0) { - ast_log(LOG_WARNING, "asprintf() failed\n"); - (yyval.pval) = NULL; - } else { - free((yyvsp[(1) - (5)].str)); - free((yyvsp[(3) - (5)].str)); - (yyval.pval) = linku1(nword(x, &(yylsp[(1) - (5)])), (yyvsp[(5) - (5)].pval)); - } - ;} - break; - - case 130: -#line 658 "ael.y" - {(yyval.pval)=(yyvsp[(2) - (2)].pval);;} - break; - - case 131: -#line 661 "ael.y" - { (yyval.pval) = nword((yyvsp[(1) - (1)].str), &(yylsp[(1) - (1)])); ;} - break; - - case 132: -#line 662 "ael.y" - { - (yyval.pval) = nword((yyvsp[(1) - (3)].str), &(yylsp[(1) - (3)])); - (yyval.pval)->u2.arglist = (yyvsp[(3) - (3)].pval); - prev_word=0; /* XXX sure ? */ ;} - break; - - case 133: -#line 669 "ael.y" - { (yyval.pval) = (yyvsp[(1) - (2)].pval); ;} - break; - - case 134: -#line 670 "ael.y" - { (yyval.pval) = linku1((yyvsp[(1) - (3)].pval), (yyvsp[(2) - (3)].pval)); ;} - break; - - case 135: -#line 671 "ael.y" - {(yyval.pval)=(yyvsp[(1) - (2)].pval);;} - break; - - case 136: -#line 674 "ael.y" - { - (yyval.pval) = npval2(PV_INCLUDES, &(yylsp[(1) - (4)]), &(yylsp[(4) - (4)])); - (yyval.pval)->u1.list = (yyvsp[(3) - (4)].pval);set_dads((yyval.pval),(yyvsp[(3) - (4)].pval));;} - break; - - case 137: -#line 677 "ael.y" - { - (yyval.pval) = npval2(PV_INCLUDES, &(yylsp[(1) - (3)]), &(yylsp[(3) - (3)]));;} - break; - - -/* Line 1267 of yacc.c. */ -#line 3024 "ael.tab.c" - default: break; - } - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); - - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - - *++yyvsp = yyval; - *++yylsp = yyloc; - - /* Now `shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; - - goto yynewstate; - - -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ -yyerrlab: - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; -#if ! YYERROR_VERBOSE - yyerror (&yylloc, parseio, YY_("syntax error")); -#else - { - YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); - if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) - { - YYSIZE_T yyalloc = 2 * yysize; - if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) - yyalloc = YYSTACK_ALLOC_MAXIMUM; - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yyalloc); - if (yymsg) - yymsg_alloc = yyalloc; - else - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - } - } - - if (0 < yysize && yysize <= yymsg_alloc) - { - (void) yysyntax_error (yymsg, yystate, yychar); - yyerror (&yylloc, parseio, yymsg); - } - else - { - yyerror (&yylloc, parseio, YY_("syntax error")); - if (yysize != 0) - goto yyexhaustedlab; - } - } -#endif - } - - yyerror_range[0] = yylloc; - - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse look-ahead token after an - error, discard it. */ - - if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval, &yylloc, parseio); - yychar = YYEMPTY; - } - } - - /* Else will try to reuse look-ahead token after shifting the error - token. */ - goto yyerrlab1; - - -/*---------------------------------------------------. -| yyerrorlab -- error raised explicitly by YYERROR. | -`---------------------------------------------------*/ -yyerrorlab: - - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ - if (/*CONSTCOND*/ 0) - goto yyerrorlab; - - yyerror_range[0] = yylsp[1-yylen]; - /* Do not reclaim the symbols of the rule which action triggered - this YYERROR. */ - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - yystate = *yyssp; - goto yyerrlab1; - - -/*-------------------------------------------------------------. -| yyerrlab1 -- common code for both syntax error and YYERROR. | -`-------------------------------------------------------------*/ -yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact[yystate]; - if (yyn != YYPACT_NINF) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; - - yyerror_range[0] = *yylsp; - yydestruct ("Error: popping", - yystos[yystate], yyvsp, yylsp, parseio); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } - - if (yyn == YYFINAL) - YYACCEPT; - - *++yyvsp = yylval; - - yyerror_range[1] = yylloc; - /* Using YYLLOC is tempting, but would change the location of - the look-ahead. YYLOC is available though. */ - YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2); - *++yylsp = yyloc; - - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); - - yystate = yyn; - goto yynewstate; - - -/*-------------------------------------. -| yyacceptlab -- YYACCEPT comes here. | -`-------------------------------------*/ -yyacceptlab: - yyresult = 0; - goto yyreturn; - -/*-----------------------------------. -| yyabortlab -- YYABORT comes here. | -`-----------------------------------*/ -yyabortlab: - yyresult = 1; - goto yyreturn; - -#ifndef yyoverflow -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ -yyexhaustedlab: - yyerror (&yylloc, parseio, YY_("memory exhausted")); - yyresult = 2; - /* Fall through. */ -#endif - -yyreturn: - if (yychar != YYEOF && yychar != YYEMPTY) - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval, &yylloc, parseio); - /* Do not reclaim the symbols of the rule which action triggered - this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp, yylsp, parseio); - YYPOPSTACK (1); - } -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); -#endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif - /* Make sure YYID is used. */ - return YYID (yyresult); -} - - -#line 682 "ael.y" - - -static char *token_equivs1[] = -{ - "AMPER", - "AT", - "BAR", - "COLON", - "COMMA", - "EQ", - "EXTENMARK", - "KW_BREAK", - "KW_CASE", - "KW_CATCH", - "KW_CONTEXT", - "KW_CONTINUE", - "KW_DEFAULT", - "KW_ELSE", - "KW_ESWITCHES", - "KW_FOR", - "KW_GLOBALS", - "KW_GOTO", - "KW_HINT", - "KW_IFTIME", - "KW_IF", - "KW_IGNOREPAT", - "KW_INCLUDES" - "KW_JUMP", - "KW_MACRO", - "KW_PATTERN", - "KW_REGEXTEN", - "KW_RETURN", - "KW_SWITCHES", - "KW_SWITCH", - "KW_WHILE", - "LC", - "LP", - "RC", - "RP", - "SEMI", -}; - -static char *token_equivs2[] = -{ - "&", - "@", - "|", - ":", - ",", - "=", - "=>", - "break", - "case", - "catch", - "context", - "continue", - "default", - "else", - "eswitches", - "for", - "globals", - "goto", - "hint", - "ifTime", - "if", - "ignorepat", - "includes" - "jump", - "macro", - "pattern", - "regexten", - "return", - "switches", - "switch", - "while", - "{", - "(", - "}", - ")", - ";", -}; - - -static char *ael_token_subst(const char *mess) -{ - /* calc a length, malloc, fill, and return; yyerror had better free it! */ - int len=0,i; - const char *p; - char *res, *s,*t; - int token_equivs_entries = sizeof(token_equivs1)/sizeof(char*); - - for (p=mess; *p; p++) { - for (i=0; i<token_equivs_entries; i++) { - if ( strncmp(p,token_equivs1[i],strlen(token_equivs1[i])) == 0 ) - { - len+=strlen(token_equivs2[i])+2; - p += strlen(token_equivs1[i])-1; - break; - } - } - len++; - } - res = calloc(1, len+1); - res[0] = 0; - s = res; - for (p=mess; *p;) { - int found = 0; - for (i=0; i<token_equivs_entries; i++) { - if ( strncmp(p,token_equivs1[i],strlen(token_equivs1[i])) == 0 ) { - *s++ = '\''; - for (t=token_equivs2[i]; *t;) { - *s++ = *t++; - } - *s++ = '\''; - p += strlen(token_equivs1[i]); - found = 1; - break; - } - } - if( !found ) - *s++ = *p++; - } - *s++ = 0; - return res; -} - -void yyerror(YYLTYPE *locp, struct parse_io *parseio, char const *s) -{ - char *s2 = ael_token_subst(s); - if (locp->first_line == locp->last_line) { - ast_log(LOG_ERROR, "==== File: %s, Line %d, Cols: %d-%d: Error: %s\n", my_file, locp->first_line, locp->first_column, locp->last_column, s2); - } else { - ast_log(LOG_ERROR, "==== File: %s, Line %d Col %d to Line %d Col %d: Error: %s\n", my_file, locp->first_line, locp->first_column, locp->last_line, locp->last_column, s2); - } - free(s2); - parseio->syntax_error_count++; -} - -static struct pval *npval(pvaltype type, int first_line, int last_line, - int first_column, int last_column) -{ - pval *z = calloc(1, sizeof(struct pval)); - z->type = type; - z->startline = first_line; - z->endline = last_line; - z->startcol = first_column; - z->endcol = last_column; - z->filename = strdup(my_file); - return z; -} - -static struct pval *npval2(pvaltype type, YYLTYPE *first, YYLTYPE *last) -{ - return npval(type, first->first_line, last->last_line, - first->first_column, last->last_column); -} - -static struct pval *update_last(pval *obj, YYLTYPE *last) -{ - obj->endline = last->last_line; - obj->endcol = last->last_column; - return obj; -} - -/* frontend for npval to create a PV_WORD string from the given token */ -static pval *nword(char *string, YYLTYPE *pos) -{ - pval *p = npval2(PV_WORD, pos, pos); - if (p) - p->u1.str = string; - return p; -} - -/* append second element to the list in the first one */ -static pval * linku1(pval *head, pval *tail) -{ - if (!head) - return tail; - if (tail) { - if (!head->next) { - head->next = tail; - } else { - head->u1_last->next = tail; - } - head->u1_last = tail; - tail->prev = head; /* the dad link only points to containers */ - } - return head; -} - -/* this routine adds a dad ptr to each element in the list */ -static void set_dads(struct pval *dad, struct pval *child_list) -{ - struct pval *t; - - for(t=child_list;t;t=t->next) /* simple stuff */ - t->dad = dad; -} - - diff --git a/pbx/ael/ael.tab.h b/pbx/ael/ael.tab.h deleted file mode 100644 index 926a6f07f..000000000 --- a/pbx/ael/ael.tab.h +++ /dev/null @@ -1,160 +0,0 @@ -/* A Bison parser, made by GNU Bison 2.3. */ - -/* Skeleton interface for Bison's Yacc-like parsers in C - - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 - Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - KW_CONTEXT = 258, - LC = 259, - RC = 260, - LP = 261, - RP = 262, - SEMI = 263, - EQ = 264, - COMMA = 265, - COLON = 266, - AMPER = 267, - BAR = 268, - AT = 269, - KW_MACRO = 270, - KW_GLOBALS = 271, - KW_IGNOREPAT = 272, - KW_SWITCH = 273, - KW_IF = 274, - KW_IFTIME = 275, - KW_ELSE = 276, - KW_RANDOM = 277, - KW_ABSTRACT = 278, - KW_EXTEND = 279, - EXTENMARK = 280, - KW_GOTO = 281, - KW_JUMP = 282, - KW_RETURN = 283, - KW_BREAK = 284, - KW_CONTINUE = 285, - KW_REGEXTEN = 286, - KW_HINT = 287, - KW_FOR = 288, - KW_WHILE = 289, - KW_CASE = 290, - KW_PATTERN = 291, - KW_DEFAULT = 292, - KW_CATCH = 293, - KW_SWITCHES = 294, - KW_ESWITCHES = 295, - KW_INCLUDES = 296, - word = 297 - }; -#endif -/* Tokens. */ -#define KW_CONTEXT 258 -#define LC 259 -#define RC 260 -#define LP 261 -#define RP 262 -#define SEMI 263 -#define EQ 264 -#define COMMA 265 -#define COLON 266 -#define AMPER 267 -#define BAR 268 -#define AT 269 -#define KW_MACRO 270 -#define KW_GLOBALS 271 -#define KW_IGNOREPAT 272 -#define KW_SWITCH 273 -#define KW_IF 274 -#define KW_IFTIME 275 -#define KW_ELSE 276 -#define KW_RANDOM 277 -#define KW_ABSTRACT 278 -#define KW_EXTEND 279 -#define EXTENMARK 280 -#define KW_GOTO 281 -#define KW_JUMP 282 -#define KW_RETURN 283 -#define KW_BREAK 284 -#define KW_CONTINUE 285 -#define KW_REGEXTEN 286 -#define KW_HINT 287 -#define KW_FOR 288 -#define KW_WHILE 289 -#define KW_CASE 290 -#define KW_PATTERN 291 -#define KW_DEFAULT 292 -#define KW_CATCH 293 -#define KW_SWITCHES 294 -#define KW_ESWITCHES 295 -#define KW_INCLUDES 296 -#define word 297 - - - - -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE -#line 56 "ael.y" -{ - int intval; /* integer value, typically flags */ - char *str; /* strings */ - struct pval *pval; /* full objects */ -} -/* Line 1489 of yacc.c. */ -#line 139 "ael.tab.h" - YYSTYPE; -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 -#endif - - - -#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED -typedef struct YYLTYPE -{ - int first_line; - int first_column; - int last_line; - int last_column; -} YYLTYPE; -# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ -# define YYLTYPE_IS_DECLARED 1 -# define YYLTYPE_IS_TRIVIAL 1 -#endif - - diff --git a/pbx/ael/ael.y b/pbx/ael/ael.y deleted file mode 100644 index 7ff058b91..000000000 --- a/pbx/ael/ael.y +++ /dev/null @@ -1,880 +0,0 @@ -%{ -/* - * Asterisk -- An open source telephony toolkit. - * - * Copyright (C) 2006, Digium, Inc. - * - * Steve Murphy <murf@parsetree.com> - * - * See http://www.asterisk.org for more information about - * the Asterisk project. Please do not directly contact - * any of the maintainers of this project for assistance; - * the project provides a web site, mailing lists and IRC - * channels for your use. - * - * This program is free software, distributed under the terms of - * the GNU General Public License Version 2. See the LICENSE file - * at the top of the source tree. - */ -/*! \file - * - * \brief Bison Grammar description of AEL2. - * - */ - -#include "asterisk.h" - -#if !defined(STANDALONE_AEL) -ASTERISK_FILE_VERSION(__FILE__, "$Revision$") -#endif - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "asterisk/logger.h" -#include "asterisk/ael_structs.h" - -static pval * linku1(pval *head, pval *tail); -static void set_dads(pval *dad, pval *child_list); -void reset_parencount(yyscan_t yyscanner); -void reset_semicount(yyscan_t yyscanner); -void reset_argcount(yyscan_t yyscanner ); - -#define YYLEX_PARAM ((struct parse_io *)parseio)->scanner -#define YYERROR_VERBOSE 1 - -extern char *my_file; -#ifdef AAL_ARGCHECK -int ael_is_funcname(char *name); -#endif -static char *ael_token_subst(const char *mess); - -%} - - -%union { - int intval; /* integer value, typically flags */ - char *str; /* strings */ - struct pval *pval; /* full objects */ -} - -%{ - /* declaring these AFTER the union makes things a lot simpler! */ -void yyerror(YYLTYPE *locp, struct parse_io *parseio, char const *s); -int ael_yylex (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , void * yyscanner); - -/* create a new object with start-end marker */ -static pval *npval(pvaltype type, int first_line, int last_line, - int first_column, int last_column); - -/* create a new object with start-end marker, simplified interface. - * Must be declared here because YYLTYPE is not known before - */ -static pval *npval2(pvaltype type, YYLTYPE *first, YYLTYPE *last); - -/* another frontend for npval, this time for a string */ -static pval *nword(char *string, YYLTYPE *pos); - -/* update end position of an object, return the object */ -static pval *update_last(pval *, YYLTYPE *); -%} - - -%token KW_CONTEXT LC RC LP RP SEMI EQ COMMA COLON AMPER BAR AT -%token KW_MACRO KW_GLOBALS KW_IGNOREPAT KW_SWITCH KW_IF KW_IFTIME KW_ELSE KW_RANDOM KW_ABSTRACT KW_EXTEND -%token EXTENMARK KW_GOTO KW_JUMP KW_RETURN KW_BREAK KW_CONTINUE KW_REGEXTEN KW_HINT -%token KW_FOR KW_WHILE KW_CASE KW_PATTERN KW_DEFAULT KW_CATCH KW_SWITCHES KW_ESWITCHES -%token KW_INCLUDES - -%right BAR COMMA - -%token <str> word - -%type <pval>includes -%type <pval>includeslist -%type <pval>switchlist -%type <pval>eswitches -%type <pval>switches -%type <pval>macro_statement -%type <pval>macro_statements -%type <pval>case_statement -%type <pval>case_statements -%type <pval>eval_arglist -%type <pval>application_call -%type <pval>application_call_head -%type <pval>macro_call -%type <pval>target jumptarget -%type <pval>statement -%type <pval>switch_statement - -%type <pval>if_like_head -%type <pval>statements -%type <pval>extension -%type <pval>ignorepat -%type <pval>element -%type <pval>elements -%type <pval>arglist -%type <pval>assignment -%type <pval>global_statements -%type <pval>globals -%type <pval>macro -%type <pval>context -%type <pval>object -%type <pval>objects -%type <pval>file -/* XXX lr changes */ -%type <pval>opt_else -%type <pval>timespec -%type <pval>included_entry - -%type <str>opt_word -%type <str>context_name -%type <str>timerange - -%type <str>goto_word -%type <str>word_list -%type <str>word3_list hint_word -%type <str>test_expr -%type <str>opt_pri - -%type <intval>opt_abstract - -/* - * OPTIONS - */ - -%locations /* track source location using @n variables (yylloc in flex) */ -%pure-parser /* pass yylval and yylloc as arguments to yylex(). */ -%name-prefix="ael_yy" -/* - * add an additional argument, parseio, to yyparse(), - * which is then accessible in the grammar actions - */ -%parse-param {struct parse_io *parseio} - -/* there will be two shift/reduce conflicts, they involve the if statement, where a single statement occurs not wrapped in curlies in the "true" section - the default action to shift will attach the else to the preceeding if. */ -%expect 3 -%error-verbose - -/* - * declare destructors for objects. - * The former is for pval, the latter for strings. - * NOTE: we must not have a destructor for a 'file' object. - */ -%destructor { - destroy_pval($$); - prev_word=0; - } includes includeslist switchlist eswitches switches - macro_statement macro_statements case_statement case_statements - eval_arglist application_call application_call_head - macro_call target jumptarget statement switch_statement - if_like_head statements extension - ignorepat element elements arglist assignment - global_statements globals macro context object objects - opt_else - timespec included_entry - -%destructor { free($$);} word word_list goto_word word3_list opt_word context_name - timerange - test_expr - opt_pri - - -%% - -file : objects { $$ = parseio->pval = $1; } - ; - -objects : object {$$=$1;} - | objects object { $$ = linku1($1, $2); } - | objects error {$$=$1;} - ; - -object : context {$$=$1;} - | macro {$$=$1;} - | globals {$$=$1;} - | SEMI {$$=0;/* allow older docs to be read */} - ; - -context_name : word { $$ = $1; } - | KW_DEFAULT { $$ = strdup("default"); } - ; - -context : opt_abstract KW_CONTEXT context_name LC elements RC { - $$ = npval2(PV_CONTEXT, &@1, &@6); - $$->u1.str = $3; - $$->u2.statements = $5; - set_dads($$,$5); - $$->u3.abstract = $1;} - ; - -/* optional "abstract" keyword XXX there is no regression test for this */ -opt_abstract: KW_ABSTRACT { $$ = 1; } - | /* nothing */ { $$ = 0; } - | KW_EXTEND { $$ = 2; } - | KW_EXTEND KW_ABSTRACT { $$=3; } - | KW_ABSTRACT KW_EXTEND { $$=3; } - ; - -macro : KW_MACRO word LP arglist RP LC macro_statements RC { - $$ = npval2(PV_MACRO, &@1, &@8); - $$->u1.str = $2; $$->u2.arglist = $4; $$->u3.macro_statements = $7; - set_dads($$,$7);} - ; - -globals : KW_GLOBALS LC global_statements RC { - $$ = npval2(PV_GLOBALS, &@1, &@4); - $$->u1.statements = $3; - set_dads($$,$3);} - ; - -global_statements : { $$ = NULL; } - | assignment global_statements {$$ = linku1($1, $2); } - | error global_statements {$$=$2;} - ; - -assignment : word EQ { reset_semicount(parseio->scanner); } word SEMI { - $$ = npval2(PV_VARDEC, &@1, &@5); - $$->u1.str = $1; - $$->u2.val = $4; } - ; - -/* XXX this matches missing arguments, is this desired ? */ -arglist : /* empty */ { $$ = NULL; } - | word { $$ = nword($1, &@1); } - | arglist COMMA word { $$ = linku1($1, nword($3, &@3)); } - | arglist error {$$=$1;} - ; - -elements : {$$=0;} - | element elements { $$ = linku1($1, $2); } - | error elements { $$=$2;} - ; - -element : extension {$$=$1;} - | includes {$$=$1;} - | switches {$$=$1;} - | eswitches {$$=$1;} - | ignorepat {$$=$1;} - | assignment {$$=$1;} - | word error {free($1); $$=0;} - | SEMI {$$=0;/* allow older docs to be read */} - ; - -ignorepat : KW_IGNOREPAT EXTENMARK word SEMI { - $$ = npval2(PV_IGNOREPAT, &@1, &@4); - $$->u1.str = $3;} - ; - -extension : word EXTENMARK statement { - $$ = npval2(PV_EXTENSION, &@1, &@3); - $$->u1.str = $1; - $$->u2.statements = $3; set_dads($$,$3);} - | KW_REGEXTEN word EXTENMARK statement { - $$ = npval2(PV_EXTENSION, &@1, &@4); - $$->u1.str = $2; - $$->u2.statements = $4; set_dads($$,$4); - $$->u4.regexten=1;} - | KW_HINT LP hint_word RP word EXTENMARK statement { - $$ = npval2(PV_EXTENSION, &@1, &@7); - $$->u1.str = $5; - $$->u2.statements = $7; set_dads($$,$7); - $$->u3.hints = $3;} - | KW_REGEXTEN KW_HINT LP hint_word RP word EXTENMARK statement { - $$ = npval2(PV_EXTENSION, &@1, &@8); - $$->u1.str = $6; - $$->u2.statements = $8; set_dads($$,$8); - $$->u4.regexten=1; - $$->u3.hints = $4;} - - ; - -/* list of statements in a block or after a case label - can be empty */ -statements : /* empty */ { $$ = NULL; } - | statement statements { $$ = linku1($1, $2); } - | error statements {$$=$2;} - ; - -/* hh:mm-hh:mm, due to the way the parser works we do not - * detect the '-' but only the ':' as separator - */ -timerange: word3_list COLON word3_list COLON word3_list { - if (asprintf(&$$, "%s:%s:%s", $1, $3, $5) < 0) { - ast_log(LOG_WARNING, "asprintf() failed\n"); - $$ = NULL; - } else { - free($1); - free($3); - free($5); - } - } - | word { $$ = $1; } - ; - -/* full time specification range|dow|*|* */ -timespec : timerange BAR word3_list BAR word3_list BAR word3_list { - $$ = nword($1, &@1); - $$->next = nword($3, &@3); - $$->next->next = nword($5, &@5); - $$->next->next->next = nword($7, &@7); } - ; - -/* expression used in if, random, while, switch */ -test_expr : LP { reset_parencount(parseio->scanner); } word_list RP { $$ = $3; } - ; - -/* 'if' like statements: if, iftime, random */ -if_like_head : KW_IF test_expr { - $$= npval2(PV_IF, &@1, &@2); - $$->u1.str = $2; } - | KW_RANDOM test_expr { - $$ = npval2(PV_RANDOM, &@1, &@2); - $$->u1.str=$2;} - | KW_IFTIME LP timespec RP { - $$ = npval2(PV_IFTIME, &@1, &@4); - $$->u1.list = $3; - prev_word = 0; } - ; - -/* word_list is a hack to fix a problem with context switching between bison and flex; - by the time you register a new context with flex, you've already got a look-ahead token - from the old context, with no way to put it back and start afresh. So, we kludge this - and merge the words back together. */ - -word_list : word { $$ = $1;} - | word word { - if (asprintf(&($$), "%s%s", $1, $2) < 0) { - ast_log(LOG_WARNING, "asprintf() failed\n"); - $$ = NULL; - } else { - free($1); - free($2); - prev_word = $$; - } - } - ; - -hint_word : word { $$ = $1; } - | hint_word word { - if (asprintf(&($$), "%s %s", $1, $2) < 0) { - ast_log(LOG_WARNING, "asprintf() failed\n"); - $$ = NULL; - } else { - free($1); - free($2); - } - } - | hint_word COLON word { - if (asprintf(&($$), "%s:%s", $1, $3) < 0) { - ast_log(LOG_WARNING, "asprintf() failed\n"); - $$ = NULL; - } else { - free($1); - free($3); - } - } - | hint_word AMPER word { /* there are often '&' in hints */ - if (asprintf(&($$), "%s&%s", $1, $3) < 0) { - ast_log(LOG_WARNING, "asprintf() failed\n"); - $$ = NULL; - } else { - free($1); - free($3); - } - } - ; - -word3_list : word { $$ = $1;} - | word word { - if (asprintf(&($$), "%s%s", $1, $2) < 0) { - ast_log(LOG_WARNING, "asprintf() failed\n"); - $$ = NULL; - } else { - free($1); - free($2); - prev_word = $$; - } - } - | word word word { - if (asprintf(&($$), "%s%s%s", $1, $2, $3) < 0) { - ast_log(LOG_WARNING, "asprintf() failed\n"); - $$ = NULL; - } else { - free($1); - free($2); - free($3); - prev_word=$$; - } - } - ; - -goto_word : word { $$ = $1;} - | word word { - if (asprintf(&($$), "%s%s", $1, $2) < 0) { - ast_log(LOG_WARNING, "asprintf() failed\n"); - $$ = NULL; - } else { - free($1); - free($2); - } - } - | goto_word COLON word { - if (asprintf(&($$), "%s:%s", $1, $3) < 0) { - ast_log(LOG_WARNING, "asprintf() failed\n"); - $$ = NULL; - } else { - free($1); - free($3); - } - } - ; - -switch_statement : KW_SWITCH test_expr LC case_statements RC { - $$ = npval2(PV_SWITCH, &@1, &@5); - $$->u1.str = $2; - $$->u2.statements = $4; set_dads($$,$4);} - ; - -/* - * Definition of a statememt in our language - */ -statement : LC statements RC { - $$ = npval2(PV_STATEMENTBLOCK, &@1, &@3); - $$->u1.list = $2; set_dads($$,$2);} - | assignment { $$ = $1; } - | KW_GOTO target SEMI { - $$ = npval2(PV_GOTO, &@1, &@3); - $$->u1.list = $2;} - | KW_JUMP jumptarget SEMI { - $$ = npval2(PV_GOTO, &@1, &@3); - $$->u1.list = $2;} - | word COLON { - $$ = npval2(PV_LABEL, &@1, &@2); - $$->u1.str = $1; } - | KW_FOR LP {reset_semicount(parseio->scanner);} word SEMI - {reset_semicount(parseio->scanner);} word SEMI - {reset_parencount(parseio->scanner);} word RP statement { /* XXX word_list maybe ? */ - $$ = npval2(PV_FOR, &@1, &@12); - $$->u1.for_init = $4; - $$->u2.for_test=$7; - $$->u3.for_inc = $10; - $$->u4.for_statements = $12; set_dads($$,$12);} - | KW_WHILE test_expr statement { - $$ = npval2(PV_WHILE, &@1, &@3); - $$->u1.str = $2; - $$->u2.statements = $3; set_dads($$,$3);} - | switch_statement { $$ = $1; } - | AMPER macro_call SEMI { $$ = update_last($2, &@2); } - | application_call SEMI { $$ = update_last($1, &@2); } - | word SEMI { - $$= npval2(PV_APPLICATION_CALL, &@1, &@2); - $$->u1.str = $1;} - | application_call EQ {reset_semicount(parseio->scanner);} word SEMI { - char *bufx; - int tot=0; - pval *pptr; - $$ = npval2(PV_VARDEC, &@1, &@5); - $$->u2.val=$4; - /* rebuild the original string-- this is not an app call, it's an unwrapped vardec, with a func call on the LHS */ - /* string to big to fit in the buffer? */ - tot+=strlen($1->u1.str); - for(pptr=$1->u2.arglist;pptr;pptr=pptr->next) { - tot+=strlen(pptr->u1.str); - tot++; /* for a sep like a comma */ - } - tot+=4; /* for safety */ - bufx = calloc(1, tot); - strcpy(bufx,$1->u1.str); - strcat(bufx,"("); - /* XXX need to advance the pointer or the loop is very inefficient */ - for (pptr=$1->u2.arglist;pptr;pptr=pptr->next) { - if ( pptr != $1->u2.arglist ) - strcat(bufx,","); - strcat(bufx,pptr->u1.str); - } - strcat(bufx,")"); -#ifdef AAL_ARGCHECK - if ( !ael_is_funcname($1->u1.str) ) - ast_log(LOG_WARNING, "==== File: %s, Line %d, Cols: %d-%d: Function call? The name %s is not in my internal list of function names\n", - my_file, @1.first_line, @1.first_column, @1.last_column, $1->u1.str); -#endif - $$->u1.str = bufx; - destroy_pval($1); /* the app call it is not, get rid of that chain */ - prev_word = 0; - } - | KW_BREAK SEMI { $$ = npval2(PV_BREAK, &@1, &@2); } - | KW_RETURN SEMI { $$ = npval2(PV_RETURN, &@1, &@2); } - | KW_CONTINUE SEMI { $$ = npval2(PV_CONTINUE, &@1, &@2); } - | if_like_head statement opt_else { - $$ = update_last($1, &@2); - $$->u2.statements = $2; set_dads($$,$2); - $$->u3.else_statements = $3;set_dads($$,$3);} - | SEMI { $$=0; } - ; - -opt_else : KW_ELSE statement { $$ = $2; } - | { $$ = NULL ; } - - -target : goto_word { $$ = nword($1, &@1); } - | goto_word BAR goto_word { - $$ = nword($1, &@1); - $$->next = nword($3, &@3); } - | goto_word COMMA goto_word { - $$ = nword($1, &@1); - $$->next = nword($3, &@3); } - | goto_word BAR goto_word BAR goto_word { - $$ = nword($1, &@1); - $$->next = nword($3, &@3); - $$->next->next = nword($5, &@5); } - | goto_word COMMA goto_word COMMA goto_word { - $$ = nword($1, &@1); - $$->next = nword($3, &@3); - $$->next->next = nword($5, &@5); } - | KW_DEFAULT BAR goto_word BAR goto_word { - $$ = nword(strdup("default"), &@1); - $$->next = nword($3, &@3); - $$->next->next = nword($5, &@5); } - | KW_DEFAULT COMMA goto_word COMMA goto_word { - $$ = nword(strdup("default"), &@1); - $$->next = nword($3, &@3); - $$->next->next = nword($5, &@5); } - ; - -opt_pri : /* empty */ { $$ = strdup("1"); } - | COMMA word { $$ = $2; } - ; - -/* XXX please document the form of jumptarget */ -jumptarget : goto_word opt_pri { /* ext[, pri] default 1 */ - $$ = nword($1, &@1); - $$->next = nword($2, &@2); } /* jump extension[,priority][@context] */ - | goto_word opt_pri AT context_name { /* context, ext, pri */ - $$ = nword($4, &@4); - $$->next = nword($1, &@1); - $$->next->next = nword($2, &@2); } - ; - -macro_call : word LP {reset_argcount(parseio->scanner);} eval_arglist RP { - /* XXX original code had @2 but i think we need @5 */ - $$ = npval2(PV_MACRO_CALL, &@1, &@5); - $$->u1.str = $1; - $$->u2.arglist = $4;} - | word LP RP { - $$= npval2(PV_MACRO_CALL, &@1, &@3); - $$->u1.str = $1; } - ; - -/* XXX application_call_head must be revised. Having 'word LP { ...' - * just as above should work fine, however it gives a different result. - */ -application_call_head: word LP {reset_argcount(parseio->scanner);} { - if (strcasecmp($1,"goto") == 0) { - $$ = npval2(PV_GOTO, &@1, &@2); - free($1); /* won't be using this */ - ast_log(LOG_WARNING, "==== File: %s, Line %d, Cols: %d-%d: Suggestion: Use the goto statement instead of the Goto() application call in AEL.\n", my_file, @1.first_line, @1.first_column, @1.last_column ); - } else { - $$= npval2(PV_APPLICATION_CALL, &@1, &@2); - $$->u1.str = $1; - } } - ; - -application_call : application_call_head eval_arglist RP { - $$ = update_last($1, &@3); - if( $$->type == PV_GOTO ) - $$->u1.list = $2; - else - $$->u2.arglist = $2; - } - | application_call_head RP { $$ = update_last($1, &@2); } - ; - -opt_word : word { $$ = $1 } - | { $$ = strdup(""); } - ; - -eval_arglist : word_list { $$ = nword($1, &@1); } - | /*nothing! */ { - $$= npval(PV_WORD,0/*@1.first_line*/,0/*@1.last_line*/,0/* @1.first_column*/, 0/*@1.last_column*/); - $$->u1.str = strdup(""); } - | eval_arglist COMMA opt_word { $$ = linku1($1, nword($3, &@3)); } - ; - -case_statements: /* empty */ { $$ = NULL; } - | case_statement case_statements { $$ = linku1($1, $2); } - ; - -case_statement: KW_CASE word COLON statements { - $$ = npval2(PV_CASE, &@1, &@3); /* XXX 3 or 4 ? */ - $$->u1.str = $2; - $$->u2.statements = $4; set_dads($$,$4);} - | KW_DEFAULT COLON statements { - $$ = npval2(PV_DEFAULT, &@1, &@3); - $$->u1.str = NULL; - $$->u2.statements = $3;set_dads($$,$3);} - | KW_PATTERN word COLON statements { - $$ = npval2(PV_PATTERN, &@1, &@4); /* XXX@3 or @4 ? */ - $$->u1.str = $2; - $$->u2.statements = $4;set_dads($$,$4);} - ; - -macro_statements: /* empty */ { $$ = NULL; } - | macro_statement macro_statements { $$ = linku1($1, $2); } - ; - -macro_statement : statement {$$=$1;} - | includes { $$=$1;} - | KW_CATCH word LC statements RC { - $$ = npval2(PV_CATCH, &@1, &@5); - $$->u1.str = $2; - $$->u2.statements = $4; set_dads($$,$4);} - ; - -switches : KW_SWITCHES LC switchlist RC { - $$ = npval2(PV_SWITCHES, &@1, &@2); - $$->u1.list = $3; set_dads($$,$3);} - ; - -eswitches : KW_ESWITCHES LC switchlist RC { - $$ = npval2(PV_ESWITCHES, &@1, &@2); - $$->u1.list = $3; set_dads($$,$3);} - ; - -switchlist : /* empty */ { $$ = NULL; } - | word SEMI switchlist { $$ = linku1(nword($1, &@1), $3); } - | word AT word SEMI switchlist { - char *x; - if (asprintf(&x,"%s@%s", $1, $3) < 0) { - ast_log(LOG_WARNING, "asprintf() failed\n"); - $$ = NULL; - } else { - free($1); - free($3); - $$ = linku1(nword(x, &@1), $5); - } - } - | error switchlist {$$=$2;} - ; - -included_entry : context_name { $$ = nword($1, &@1); } - | context_name BAR timespec { - $$ = nword($1, &@1); - $$->u2.arglist = $3; - prev_word=0; /* XXX sure ? */ } - ; - -/* list of ';' separated context names followed by optional timespec */ -includeslist : included_entry SEMI { $$ = $1; } - | includeslist included_entry SEMI { $$ = linku1($1, $2); } - | includeslist error {$$=$1;} - ; - -includes : KW_INCLUDES LC includeslist RC { - $$ = npval2(PV_INCLUDES, &@1, &@4); - $$->u1.list = $3;set_dads($$,$3);} - | KW_INCLUDES LC RC { - $$ = npval2(PV_INCLUDES, &@1, &@3);} - ; - - -%% - -static char *token_equivs1[] = -{ - "AMPER", - "AT", - "BAR", - "COLON", - "COMMA", - "EQ", - "EXTENMARK", - "KW_BREAK", - "KW_CASE", - "KW_CATCH", - "KW_CONTEXT", - "KW_CONTINUE", - "KW_DEFAULT", - "KW_ELSE", - "KW_ESWITCHES", - "KW_FOR", - "KW_GLOBALS", - "KW_GOTO", - "KW_HINT", - "KW_IFTIME", - "KW_IF", - "KW_IGNOREPAT", - "KW_INCLUDES" - "KW_JUMP", - "KW_MACRO", - "KW_PATTERN", - "KW_REGEXTEN", - "KW_RETURN", - "KW_SWITCHES", - "KW_SWITCH", - "KW_WHILE", - "LC", - "LP", - "RC", - "RP", - "SEMI", -}; - -static char *token_equivs2[] = -{ - "&", - "@", - "|", - ":", - ",", - "=", - "=>", - "break", - "case", - "catch", - "context", - "continue", - "default", - "else", - "eswitches", - "for", - "globals", - "goto", - "hint", - "ifTime", - "if", - "ignorepat", - "includes" - "jump", - "macro", - "pattern", - "regexten", - "return", - "switches", - "switch", - "while", - "{", - "(", - "}", - ")", - ";", -}; - - -static char *ael_token_subst(const char *mess) -{ - /* calc a length, malloc, fill, and return; yyerror had better free it! */ - int len=0,i; - const char *p; - char *res, *s,*t; - int token_equivs_entries = sizeof(token_equivs1)/sizeof(char*); - - for (p=mess; *p; p++) { - for (i=0; i<token_equivs_entries; i++) { - if ( strncmp(p,token_equivs1[i],strlen(token_equivs1[i])) == 0 ) - { - len+=strlen(token_equivs2[i])+2; - p += strlen(token_equivs1[i])-1; - break; - } - } - len++; - } - res = calloc(1, len+1); - res[0] = 0; - s = res; - for (p=mess; *p;) { - int found = 0; - for (i=0; i<token_equivs_entries; i++) { - if ( strncmp(p,token_equivs1[i],strlen(token_equivs1[i])) == 0 ) { - *s++ = '\''; - for (t=token_equivs2[i]; *t;) { - *s++ = *t++; - } - *s++ = '\''; - p += strlen(token_equivs1[i]); - found = 1; - break; - } - } - if( !found ) - *s++ = *p++; - } - *s++ = 0; - return res; -} - -void yyerror(YYLTYPE *locp, struct parse_io *parseio, char const *s) -{ - char *s2 = ael_token_subst(s); - if (locp->first_line == locp->last_line) { - ast_log(LOG_ERROR, "==== File: %s, Line %d, Cols: %d-%d: Error: %s\n", my_file, locp->first_line, locp->first_column, locp->last_column, s2); - } else { - ast_log(LOG_ERROR, "==== File: %s, Line %d Col %d to Line %d Col %d: Error: %s\n", my_file, locp->first_line, locp->first_column, locp->last_line, locp->last_column, s2); - } - free(s2); - parseio->syntax_error_count++; -} - -static struct pval *npval(pvaltype type, int first_line, int last_line, - int first_column, int last_column) -{ - pval *z = calloc(1, sizeof(struct pval)); - z->type = type; - z->startline = first_line; - z->endline = last_line; - z->startcol = first_column; - z->endcol = last_column; - z->filename = strdup(my_file); - return z; -} - -static struct pval *npval2(pvaltype type, YYLTYPE *first, YYLTYPE *last) -{ - return npval(type, first->first_line, last->last_line, - first->first_column, last->last_column); -} - -static struct pval *update_last(pval *obj, YYLTYPE *last) -{ - obj->endline = last->last_line; - obj->endcol = last->last_column; - return obj; -} - -/* frontend for npval to create a PV_WORD string from the given token */ -static pval *nword(char *string, YYLTYPE *pos) -{ - pval *p = npval2(PV_WORD, pos, pos); - if (p) - p->u1.str = string; - return p; -} - -/* append second element to the list in the first one */ -static pval * linku1(pval *head, pval *tail) -{ - if (!head) - return tail; - if (tail) { - if (!head->next) { - head->next = tail; - } else { - head->u1_last->next = tail; - } - head->u1_last = tail; - tail->prev = head; /* the dad link only points to containers */ - } - return head; -} - -/* this routine adds a dad ptr to each element in the list */ -static void set_dads(struct pval *dad, struct pval *child_list) -{ - struct pval *t; - - for(t=child_list;t;t=t->next) /* simple stuff */ - t->dad = dad; -} - diff --git a/pbx/ael/ael_lex.c b/pbx/ael/ael_lex.c deleted file mode 100644 index c02a0d2d5..000000000 --- a/pbx/ael/ael_lex.c +++ /dev/null @@ -1,3462 +0,0 @@ -#line 2 "ael_lex.c" - -#line 4 "ael_lex.c" - -#define YY_INT_ALIGNED short int - -/* A lexical scanner generated by flex */ - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 35 -#if YY_FLEX_SUBMINOR_VERSION > 0 -#define FLEX_BETA -#endif - -/* First, we deal with platform-specific or compiler-specific issues. */ - -#include "asterisk.h" -/* begin standard C headers. */ -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <stdlib.h> - -/* end standard C headers. */ - -/* flex integer type definitions */ - -#ifndef FLEXINT_H -#define FLEXINT_H - -/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ - -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. - */ -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS 1 -#endif - -#include <inttypes.h> -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; -typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; -typedef uint32_t flex_uint32_t; -#else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; -typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; - -/* Limits of integral types. */ -#ifndef INT8_MIN -#define INT8_MIN (-128) -#endif -#ifndef INT16_MIN -#define INT16_MIN (-32767-1) -#endif -#ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) -#endif -#ifndef INT8_MAX -#define INT8_MAX (127) -#endif -#ifndef INT16_MAX -#define INT16_MAX (32767) -#endif -#ifndef INT32_MAX -#define INT32_MAX (2147483647) -#endif -#ifndef UINT8_MAX -#define UINT8_MAX (255U) -#endif -#ifndef UINT16_MAX -#define UINT16_MAX (65535U) -#endif -#ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) -#endif - -#endif /* ! C99 */ - -#endif /* ! FLEXINT_H */ - -#ifdef __cplusplus - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -/* C99 requires __STDC__ to be defined as 1. */ -#if defined (__STDC__) - -#define YY_USE_CONST - -#endif /* defined (__STDC__) */ -#endif /* ! __cplusplus */ - -#ifdef YY_USE_CONST -#define yyconst const -#else -#define yyconst -#endif - -/* Returned upon end-of-file. */ -#define YY_NULL 0 - -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. - */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) - -/* An opaque pointer. */ -#ifndef YY_TYPEDEF_YY_SCANNER_T -#define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; -#endif - -/* For convenience, these vars (plus the bison vars far below) - are macros in the reentrant scanner. */ -#define yyin yyg->yyin_r -#define yyout yyg->yyout_r -#define yyextra yyg->yyextra_r -#define yyleng yyg->yyleng_r -#define yytext yyg->yytext_r -#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) -#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) -#define yy_flex_debug yyg->yy_flex_debug_r - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN yyg->yy_start = 1 + 2 * - -/* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The YYSTATE alias is for lex - * compatibility. - */ -#define YY_START ((yyg->yy_start - 1) / 2) -#define YYSTATE YY_START - -/* Action number for EOF rule of a given start state. */ -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - -/* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE ael_yyrestart(yyin ,yyscanner ) - -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#ifndef YY_BUF_SIZE -#define YY_BUF_SIZE 16384 -#endif - -/* The state buf must be large enough to hold one state per character in the main buffer. - */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) - -#ifndef YY_TYPEDEF_YY_BUFFER_STATE -#define YY_TYPEDEF_YY_BUFFER_STATE -typedef struct yy_buffer_state *YY_BUFFER_STATE; -#endif - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - - #define YY_LESS_LINENO(n) - -/* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = yyg->yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) - -#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) - -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - -#ifndef YY_STRUCT_YY_BUFFER_STATE -#define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - yy_size_t yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - -#define YY_BUFFER_NEW 0 -#define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via ael_yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ -#define YY_BUFFER_EOF_PENDING 2 - - }; -#endif /* !YY_STRUCT_YY_BUFFER_STATE */ - -/* We provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state". - * - * Returns the top of the stack, or NULL. - */ -#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ - ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ - : NULL) - -/* Same as previous macro, but useful when we know that the buffer stack is not - * NULL or when we need an lvalue. For internal use only. - */ -#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] - -void ael_yyrestart (FILE *input_file ,yyscan_t yyscanner ); -void ael_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -YY_BUFFER_STATE ael_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); -void ael_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void ael_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void ael_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -void ael_yypop_buffer_state (yyscan_t yyscanner ); - -static void ael_yyensure_buffer_stack (yyscan_t yyscanner ); -static void ael_yy_load_buffer_state (yyscan_t yyscanner ); -static void ael_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); - -#define YY_FLUSH_BUFFER ael_yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner) - -YY_BUFFER_STATE ael_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); -YY_BUFFER_STATE ael_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); -YY_BUFFER_STATE ael_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); - -void *ael_yyalloc (yy_size_t ,yyscan_t yyscanner ); -void *ael_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); -void ael_yyfree (void * ,yyscan_t yyscanner ); - -#define yy_new_buffer ael_yy_create_buffer - -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - ael_yyensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - ael_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } - -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - ael_yyensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - ael_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } - -#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) - -/* Begin user sect3 */ - -#define ael_yywrap(n) 1 -#define YY_SKIP_YYWRAP - -typedef unsigned char YY_CHAR; - -typedef int yy_state_type; - -#define yytext_ptr yytext_r - -static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); -static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); -static int yy_get_next_buffer (yyscan_t yyscanner ); -static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up yytext. - */ -#define YY_DO_BEFORE_ACTION \ - yyg->yytext_ptr = yy_bp; \ - yyg->yytext_ptr -= yyg->yy_more_len; \ - yyleng = (size_t) (yy_cp - yyg->yytext_ptr); \ - yyg->yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yyg->yy_c_buf_p = yy_cp; - -#define YY_NUM_RULES 75 -#define YY_END_OF_BUFFER 76 -/* This struct is not used in this scanner, - but its presence is necessary. */ -struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static yyconst flex_int16_t yy_accept[285] = - { 0, - 0, 0, 0, 0, 0, 0, 0, 0, 42, 42, - 0, 0, 0, 0, 0, 0, 76, 74, 49, 47, - 48, 50, 50, 50, 9, 3, 4, 7, 50, 8, - 5, 6, 12, 74, 50, 50, 50, 50, 50, 50, - 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, - 1, 10, 2, 74, 64, 63, 74, 65, 74, 70, - 71, 72, 74, 74, 66, 67, 68, 74, 69, 42, - 43, 44, 74, 58, 59, 74, 57, 56, 51, 51, - 56, 52, 74, 61, 62, 74, 60, 49, 48, 0, - 50, 41, 13, 11, 0, 0, 0, 0, 0, 0, - - 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 64, 63, - 0, 65, 64, 63, 65, 0, 70, 71, 72, 0, - 70, 71, 72, 0, 66, 67, 68, 0, 69, 66, - 67, 68, 69, 42, 43, 44, 45, 44, 46, 0, - 58, 59, 0, 57, 58, 59, 57, 55, 54, 53, - 0, 61, 62, 0, 60, 61, 62, 60, 0, 13, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, - 0, 0, 0, 50, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 34, 0, - - 0, 0, 26, 0, 0, 0, 27, 25, 0, 0, - 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 30, 37, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, - 33, 0, 0, 0, 0, 0, 0, 16, 0, 22, - 0, 0, 0, 23, 0, 29, 20, 0, 0, 14, - 0, 35, 0, 18, 0, 0, 36, 0, 50, 0, - 15, 31, 0, 0, 40, 24, 38, 0, 39, 19, - 0, 0, 73, 0 - } ; - -static yyconst flex_int32_t yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 4, 5, 6, 7, 8, 1, 9, 5, 10, - 11, 12, 5, 13, 5, 5, 14, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 15, 16, 5, - 17, 18, 1, 19, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 20, 5, 5, 5, 5, 5, 5, - 21, 22, 23, 1, 5, 1, 24, 25, 26, 27, - - 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 5, 40, 41, 42, 43, 5, 44, 45, - 5, 5, 46, 47, 48, 1, 1, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49 - } ; - -static yyconst flex_int32_t yy_meta[50] = - { 0, - 1, 1, 2, 1, 3, 4, 3, 3, 1, 1, - 1, 5, 1, 3, 1, 1, 1, 3, 1, 3, - 3, 1, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 1, 1, 1, 1 - } ; - -static yyconst flex_int16_t yy_base[304] = - { 0, - 0, 0, 40, 43, 82, 121, 160, 199, 55, 56, - 60, 74, 247, 296, 90, 104, 432, 1023, 429, 1023, - 426, 1023, 397, 31, 1023, 1023, 1023, 1023, 43, 1023, - 1023, 410, 1023, 0, 401, 382, 36, 389, 34, 378, - 38, 380, 80, 368, 372, 385, 381, 66, 357, 369, - 1023, 1023, 1023, 138, 1023, 1023, 143, 1023, 336, 1023, - 1023, 1023, 375, 414, 1023, 1023, 1023, 453, 1023, 396, - 1023, 104, 177, 1023, 1023, 182, 1023, 1023, 1023, 78, - 0, 1023, 231, 1023, 1023, 262, 1023, 393, 390, 356, - 1023, 1023, 0, 1023, 348, 360, 92, 350, 354, 337, - - 333, 333, 333, 334, 329, 333, 344, 326, 335, 320, - 327, 322, 299, 303, 93, 302, 301, 280, 1023, 1023, - 314, 1023, 328, 344, 358, 492, 1023, 1023, 1023, 531, - 570, 609, 648, 687, 1023, 1023, 1023, 726, 1023, 765, - 804, 843, 882, 329, 1023, 143, 1023, 144, 1023, 392, - 1023, 1023, 397, 1023, 431, 436, 470, 1023, 1023, 1023, - 475, 1023, 1023, 484, 1023, 514, 523, 553, 305, 0, - 288, 305, 299, 297, 280, 297, 292, 287, 289, 0, - 291, 276, 250, 257, 250, 252, 247, 258, 241, 238, - 251, 248, 232, 232, 236, 235, 228, 233, 0, 234, - - 113, 218, 0, 217, 209, 220, 0, 0, 207, 200, - 196, 0, 203, 199, 208, 197, 189, 193, 206, 203, - 186, 203, 0, 0, 181, 187, 184, 192, 190, 181, - 187, 186, 186, 0, 0, 171, 171, 160, 164, 166, - 0, 169, 169, 152, 147, 143, 149, 0, 138, 0, - 139, 149, 138, 0, 140, 0, 135, 134, 109, 0, - 112, 0, 111, 0, 105, 80, 0, 82, 61, 76, - 0, 0, 46, 30, 0, 0, 0, 170, 0, 0, - 0, 50, 1023, 1023, 930, 935, 940, 945, 950, 955, - 960, 965, 970, 975, 980, 985, 989, 994, 999, 1004, - - 1009, 1012, 1017 - } ; - -static yyconst flex_int16_t yy_def[304] = - { 0, - 284, 1, 285, 285, 286, 286, 287, 287, 288, 288, - 289, 289, 290, 290, 291, 291, 284, 284, 284, 284, - 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, - 284, 284, 284, 292, 284, 284, 284, 284, 284, 284, - 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, - 284, 284, 284, 293, 284, 284, 293, 284, 294, 284, - 284, 284, 294, 295, 284, 284, 284, 295, 284, 296, - 284, 297, 298, 284, 284, 298, 284, 284, 284, 284, - 299, 284, 300, 284, 284, 300, 284, 284, 284, 284, - 284, 284, 301, 284, 284, 284, 284, 284, 284, 284, - - 284, 284, 284, 284, 284, 284, 302, 284, 284, 284, - 284, 284, 284, 284, 284, 284, 284, 293, 284, 284, - 293, 284, 293, 293, 293, 294, 284, 284, 284, 294, - 294, 294, 294, 295, 284, 284, 284, 295, 284, 295, - 295, 295, 295, 296, 284, 297, 284, 297, 284, 298, - 284, 284, 298, 284, 298, 298, 298, 284, 284, 284, - 300, 284, 284, 300, 284, 300, 300, 300, 284, 301, - 284, 284, 284, 284, 284, 284, 284, 284, 284, 302, - 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, - 284, 284, 284, 284, 284, 284, 284, 284, 302, 284, - - 284, 284, 302, 284, 284, 284, 302, 302, 284, 284, - 284, 302, 284, 284, 284, 284, 284, 284, 284, 284, - 284, 284, 302, 302, 284, 284, 284, 284, 284, 284, - 284, 284, 284, 302, 302, 284, 284, 284, 284, 284, - 302, 284, 284, 284, 284, 284, 284, 302, 284, 302, - 284, 284, 284, 302, 284, 302, 302, 284, 284, 302, - 284, 302, 284, 302, 284, 284, 302, 284, 284, 284, - 302, 302, 284, 284, 302, 302, 302, 284, 302, 302, - 303, 303, 284, 0, 284, 284, 284, 284, 284, 284, - 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, - - 284, 284, 284 - } ; - -static yyconst flex_int16_t yy_nxt[1073] = - { 0, - 18, 19, 20, 21, 22, 22, 23, 24, 25, 26, - 27, 22, 28, 29, 30, 31, 32, 22, 33, 22, - 22, 34, 22, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 22, 45, 46, 22, 22, 47, 48, - 49, 22, 22, 50, 22, 51, 52, 53, 22, 55, - 56, 91, 55, 56, 92, 283, 93, 71, 71, 97, - 55, 57, 58, 55, 57, 58, 72, 72, 100, 74, - 75, 280, 104, 98, 101, 105, 91, 278, 102, 278, - 74, 76, 75, 74, 75, 55, 279, 58, 55, 114, - 58, 60, 61, 115, 74, 76, 75, 62, 158, 84, - - 85, 277, 60, 63, 61, 74, 147, 77, 107, 108, - 84, 86, 87, 84, 85, 148, 109, 149, 276, 74, - 275, 77, 192, 159, 84, 86, 87, 60, 274, 61, - 60, 61, 173, 174, 193, 84, 62, 85, 273, 272, - 225, 60, 63, 61, 226, 147, 147, 119, 120, 84, - 271, 85, 123, 124, 284, 148, 284, 284, 119, 121, - 122, 270, 269, 123, 121, 125, 60, 268, 61, 65, - 66, 278, 67, 278, 267, 281, 266, 265, 264, 263, - 65, 68, 69, 119, 262, 122, 151, 152, 123, 261, - 125, 155, 156, 260, 259, 258, 257, 151, 153, 152, - - 256, 255, 155, 153, 156, 65, 254, 69, 65, 66, - 253, 67, 252, 251, 250, 249, 248, 247, 246, 65, - 68, 69, 151, 245, 154, 244, 243, 155, 242, 157, - 241, 240, 239, 238, 237, 236, 235, 234, 233, 232, - 162, 163, 231, 230, 65, 229, 69, 78, 78, 78, - 78, 162, 164, 165, 80, 78, 78, 78, 228, 78, - 227, 78, 78, 78, 224, 78, 223, 222, 81, 221, - 220, 166, 167, 219, 218, 217, 162, 216, 163, 215, - 214, 213, 166, 164, 168, 212, 211, 210, 209, 119, - 120, 208, 78, 78, 78, 82, 78, 78, 78, 78, - - 119, 121, 122, 80, 78, 78, 78, 166, 78, 167, - 78, 78, 78, 207, 78, 206, 205, 81, 204, 203, - 202, 201, 200, 123, 124, 119, 199, 122, 198, 197, - 196, 145, 195, 194, 123, 121, 125, 119, 120, 191, - 190, 78, 78, 78, 82, 127, 128, 189, 119, 121, - 122, 129, 188, 119, 120, 187, 127, 130, 128, 123, - 186, 125, 185, 184, 119, 121, 122, 119, 120, 183, - 182, 181, 180, 119, 179, 122, 178, 177, 119, 121, - 122, 127, 176, 128, 131, 132, 175, 172, 171, 119, - 133, 122, 169, 89, 88, 131, 130, 132, 145, 117, - - 116, 151, 152, 119, 113, 122, 155, 156, 112, 111, - 110, 106, 151, 153, 152, 103, 99, 155, 153, 156, - 131, 96, 132, 135, 136, 95, 137, 94, 90, 89, - 88, 284, 284, 284, 135, 138, 139, 151, 284, 154, - 151, 152, 155, 284, 157, 151, 152, 284, 284, 284, - 284, 151, 153, 152, 284, 284, 151, 153, 152, 135, - 284, 139, 140, 141, 284, 142, 284, 284, 284, 284, - 284, 284, 284, 140, 138, 143, 151, 284, 154, 151, - 152, 151, 284, 154, 162, 163, 284, 284, 284, 284, - 151, 153, 152, 166, 167, 162, 164, 165, 140, 284, - - 143, 127, 128, 284, 166, 164, 168, 129, 284, 284, - 284, 284, 127, 130, 128, 151, 284, 154, 284, 284, - 162, 284, 163, 162, 163, 284, 284, 284, 284, 166, - 284, 167, 162, 163, 162, 164, 165, 127, 284, 128, - 131, 132, 284, 162, 164, 165, 133, 284, 284, 284, - 284, 131, 130, 132, 284, 284, 284, 284, 284, 162, - 284, 163, 162, 163, 284, 284, 284, 284, 162, 284, - 163, 284, 284, 162, 164, 165, 131, 284, 132, 127, - 128, 284, 284, 284, 284, 129, 284, 284, 284, 284, - 127, 130, 128, 284, 284, 284, 284, 284, 162, 284, - - 163, 284, 284, 284, 284, 284, 284, 284, 284, 284, - 284, 284, 284, 284, 284, 127, 284, 128, 127, 128, - 284, 284, 284, 284, 129, 284, 284, 284, 284, 127, - 130, 128, 284, 284, 284, 284, 284, 284, 284, 284, - 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, - 284, 284, 284, 284, 127, 284, 128, 127, 128, 284, - 284, 284, 284, 129, 284, 284, 284, 284, 127, 130, - 128, 284, 284, 284, 284, 284, 284, 284, 284, 284, - 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, - 284, 284, 284, 127, 284, 128, 135, 136, 284, 137, - - 284, 284, 284, 284, 284, 284, 284, 135, 138, 139, - 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, - 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, - 284, 284, 135, 284, 139, 140, 141, 284, 142, 284, - 284, 284, 284, 284, 284, 284, 140, 138, 143, 284, - 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, - 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, - 284, 140, 284, 143, 135, 136, 284, 137, 284, 284, - 284, 284, 284, 284, 284, 135, 138, 139, 284, 284, - 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, - - 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, - 135, 284, 139, 135, 136, 284, 137, 284, 284, 284, - 284, 284, 284, 284, 135, 138, 139, 284, 284, 284, - 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, - 284, 284, 284, 284, 284, 284, 284, 284, 284, 135, - 284, 139, 135, 136, 284, 137, 284, 284, 284, 284, - 284, 284, 284, 135, 138, 139, 284, 284, 284, 284, - 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, - 284, 284, 284, 284, 284, 284, 284, 284, 135, 284, - 139, 135, 136, 284, 137, 284, 284, 284, 284, 284, - - 284, 284, 135, 138, 139, 284, 284, 284, 284, 284, - 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, - 284, 284, 284, 284, 284, 284, 284, 135, 284, 139, - 54, 54, 54, 54, 54, 59, 59, 59, 59, 59, - 64, 64, 64, 64, 64, 70, 70, 70, 70, 70, - 73, 73, 73, 73, 73, 79, 79, 79, 79, 79, - 83, 83, 83, 83, 83, 91, 284, 91, 91, 91, - 118, 118, 118, 118, 118, 126, 126, 126, 126, 126, - 134, 134, 134, 134, 134, 144, 144, 144, 144, 146, - 146, 146, 146, 146, 150, 150, 150, 150, 150, 160, - - 284, 160, 160, 160, 161, 161, 161, 161, 161, 170, - 284, 170, 170, 170, 91, 91, 91, 282, 282, 282, - 284, 282, 17, 284, 284, 284, 284, 284, 284, 284, - 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, - 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, - 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, - 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, - 284, 284 - } ; - -static yyconst flex_int16_t yy_chk[1073] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, - 3, 24, 4, 4, 29, 282, 29, 9, 10, 37, - 3, 3, 3, 4, 4, 4, 9, 10, 39, 11, - 11, 274, 41, 37, 39, 41, 24, 270, 39, 270, - 11, 11, 11, 12, 12, 3, 273, 3, 4, 48, - 4, 5, 5, 48, 12, 12, 12, 5, 80, 15, - - 15, 269, 5, 5, 5, 11, 72, 11, 43, 43, - 15, 15, 15, 16, 16, 72, 43, 72, 268, 12, - 266, 12, 115, 80, 16, 16, 16, 5, 265, 5, - 6, 6, 97, 97, 115, 15, 6, 15, 263, 261, - 201, 6, 6, 6, 201, 146, 148, 54, 54, 16, - 259, 16, 57, 57, 146, 148, 146, 148, 54, 54, - 54, 258, 257, 57, 57, 57, 6, 255, 6, 7, - 7, 278, 7, 278, 253, 278, 252, 251, 249, 247, - 7, 7, 7, 54, 246, 54, 73, 73, 57, 245, - 57, 76, 76, 244, 243, 242, 240, 73, 73, 73, - - 239, 238, 76, 76, 76, 7, 237, 7, 8, 8, - 236, 8, 233, 232, 231, 230, 229, 228, 227, 8, - 8, 8, 73, 226, 73, 225, 222, 76, 221, 76, - 220, 219, 218, 217, 216, 215, 214, 213, 211, 210, - 83, 83, 209, 206, 8, 205, 8, 13, 13, 13, - 13, 83, 83, 83, 13, 13, 13, 13, 204, 13, - 202, 13, 13, 13, 200, 13, 198, 197, 13, 196, - 195, 86, 86, 194, 193, 192, 83, 191, 83, 190, - 189, 188, 86, 86, 86, 187, 186, 185, 184, 118, - 118, 183, 13, 13, 13, 13, 14, 14, 14, 14, - - 118, 118, 118, 14, 14, 14, 14, 86, 14, 86, - 14, 14, 14, 182, 14, 181, 179, 14, 178, 177, - 176, 175, 174, 121, 121, 118, 173, 118, 172, 171, - 169, 144, 117, 116, 121, 121, 121, 123, 123, 114, - 113, 14, 14, 14, 14, 59, 59, 112, 123, 123, - 123, 59, 111, 124, 124, 110, 59, 59, 59, 121, - 109, 121, 108, 107, 124, 124, 124, 125, 125, 106, - 105, 104, 103, 123, 102, 123, 101, 100, 125, 125, - 125, 59, 99, 59, 63, 63, 98, 96, 95, 124, - 63, 124, 90, 89, 88, 63, 63, 63, 70, 50, - - 49, 150, 150, 125, 47, 125, 153, 153, 46, 45, - 44, 42, 150, 150, 150, 40, 38, 153, 153, 153, - 63, 36, 63, 64, 64, 35, 64, 32, 23, 21, - 19, 17, 0, 0, 64, 64, 64, 150, 0, 150, - 155, 155, 153, 0, 153, 156, 156, 0, 0, 0, - 0, 155, 155, 155, 0, 0, 156, 156, 156, 64, - 0, 64, 68, 68, 0, 68, 0, 0, 0, 0, - 0, 0, 0, 68, 68, 68, 155, 0, 155, 157, - 157, 156, 0, 156, 161, 161, 0, 0, 0, 0, - 157, 157, 157, 164, 164, 161, 161, 161, 68, 0, - - 68, 126, 126, 0, 164, 164, 164, 126, 0, 0, - 0, 0, 126, 126, 126, 157, 0, 157, 0, 0, - 161, 0, 161, 166, 166, 0, 0, 0, 0, 164, - 0, 164, 167, 167, 166, 166, 166, 126, 0, 126, - 130, 130, 0, 167, 167, 167, 130, 0, 0, 0, - 0, 130, 130, 130, 0, 0, 0, 0, 0, 166, - 0, 166, 168, 168, 0, 0, 0, 0, 167, 0, - 167, 0, 0, 168, 168, 168, 130, 0, 130, 131, - 131, 0, 0, 0, 0, 131, 0, 0, 0, 0, - 131, 131, 131, 0, 0, 0, 0, 0, 168, 0, - - 168, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 131, 0, 131, 132, 132, - 0, 0, 0, 0, 132, 0, 0, 0, 0, 132, - 132, 132, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 132, 0, 132, 133, 133, 0, - 0, 0, 0, 133, 0, 0, 0, 0, 133, 133, - 133, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 133, 0, 133, 134, 134, 0, 134, - - 0, 0, 0, 0, 0, 0, 0, 134, 134, 134, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 134, 0, 134, 138, 138, 0, 138, 0, - 0, 0, 0, 0, 0, 0, 138, 138, 138, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 138, 0, 138, 140, 140, 0, 140, 0, 0, - 0, 0, 0, 0, 0, 140, 140, 140, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 140, 0, 140, 141, 141, 0, 141, 0, 0, 0, - 0, 0, 0, 0, 141, 141, 141, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 141, - 0, 141, 142, 142, 0, 142, 0, 0, 0, 0, - 0, 0, 0, 142, 142, 142, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 142, 0, - 142, 143, 143, 0, 143, 0, 0, 0, 0, 0, - - 0, 0, 143, 143, 143, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 143, 0, 143, - 285, 285, 285, 285, 285, 286, 286, 286, 286, 286, - 287, 287, 287, 287, 287, 288, 288, 288, 288, 288, - 289, 289, 289, 289, 289, 290, 290, 290, 290, 290, - 291, 291, 291, 291, 291, 292, 0, 292, 292, 292, - 293, 293, 293, 293, 293, 294, 294, 294, 294, 294, - 295, 295, 295, 295, 295, 296, 296, 296, 296, 297, - 297, 297, 297, 297, 298, 298, 298, 298, 298, 299, - - 0, 299, 299, 299, 300, 300, 300, 300, 300, 301, - 0, 301, 301, 301, 302, 302, 302, 303, 303, 303, - 0, 303, 284, 284, 284, 284, 284, 284, 284, 284, - 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, - 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, - 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, - 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, - 284, 284 - } ; - -/* The intent behind this definition is that it'll catch - * any uses of REJECT which flex missed. - */ -#define REJECT reject_used_but_not_detected -#define yymore() (yyg->yy_more_flag = 1) -#define YY_MORE_ADJ yyg->yy_more_len -#define YY_RESTORE_YY_MORE_OFFSET -#line 1 "ael.flex" -/* - * Asterisk -- An open source telephony toolkit. - * - * Copyright (C) 2006, Digium, Inc. - * - * Steve Murphy <murf@parsetree.com> - * - * See http://www.asterisk.org for more information about - * the Asterisk project. Please do not directly contact - * any of the maintainers of this project for assistance; - * the project provides a web site, mailing lists and IRC - * channels for your use. - * - * This program is free software, distributed under the terms of - * the GNU General Public License Version 2. See the LICENSE file - * at the top of the source tree. - */ -/*! \file - * - * \brief Flex scanner description of tokens used in AEL2 . - * - */ -/* - * Start with flex options: - * - * %x describes the contexts we have: paren, semic and argg, plus INITIAL - */ - -/* prefix used for various globally-visible functions and variables. - * This renames also ael_yywrap, but since we do not use it, we just - * add option noyywrap to remove it. - */ -/* I specify this option to suppress flex generating code with ECHO - in it. This generates compiler warnings in some systems; We've - seen the fwrite generate Unused variable warnings with 4.1.2 gcc. - Some systems have tweaked flex ECHO macro to keep the compiler - happy. To keep the warning message from getting output, I added - a default rule at the end of the patterns section */ -/* ael_yyfree normally just frees its arg. It can be null sometimes, - which some systems will complain about, so, we'll define our own version */ -/* batch gives a bit more performance if we are using it in - * a non-interactive mode. We probably don't care much. - */ -/* outfile is the filename to be used instead of lex.yy.c */ -/* - * These are not supported in flex 2.5.4, but we need them - * at the moment: - * reentrant produces a thread-safe parser. Not 100% sure that - * we require it, though. - * bison-bridge passes an additional yylval argument to ael_yylex(). - * bison-locations is probably not needed. - */ -#line 71 "ael.flex" -#if !defined(STANDALONE_AEL) -ASTERISK_FILE_VERSION(__FILE__, "$Revision$") -#endif - -#include <sys/types.h> -#include <sys/stat.h> -#include <unistd.h> - -#if defined(__Darwin__) || defined(__CYGWIN__) -#define GLOB_ABORTED GLOB_ABEND -#endif -# include <glob.h> - -#include "asterisk/logger.h" -#include "asterisk/utils.h" -#include "ael/ael.tab.h" -#include "asterisk/ael_structs.h" - -/* - * A stack to keep track of matching brackets ( [ { } ] ) - */ -static char pbcstack[400]; /* XXX missing size checks */ -static int pbcpos = 0; -static void pbcpush(char x); -static int pbcpop(char x); -static int parencount = 0; - -/* - * A similar stack to keep track of matching brackets ( [ { } ] ) in word tokens surrounded by ${ ... } - */ -static char pbcstack2[400]; /* XXX missing size checks */ -static int pbcpos2 = 0; -static void pbcpush2(char x); -static int pbcpop2(char x); -static int parencount2 = 0; - -/* - * A similar stack to keep track of matching brackets ( [ { } ] ) in word tokens surrounded by $[ ... ] - */ -static char pbcstack3[400]; /* XXX missing size checks */ -static int pbcpos3 = 0; -static void pbcpush3(char x); -static int pbcpop3(char x); -static int parencount3 = 0; - - -/* - * current line, column and filename, updated as we read the input. - */ -static int my_lineno = 1; /* current line in the source */ -static int my_col = 1; /* current column in the source */ -char *my_file = 0; /* used also in the bison code */ -char *prev_word; /* XXX document it */ - -#define MAX_INCLUDE_DEPTH 50 - -/* - * flex is not too smart, and generates global functions - * without prototypes so the compiler may complain. - * To avoid that, we declare the prototypes here, - * even though these functions are not used. - */ -int ael_yyget_column (yyscan_t yyscanner); -void ael_yyset_column (int column_no , yyscan_t yyscanner); - -int ael_yyparse (struct parse_io *); - -/* - * A stack to process include files. - * As we switch into the new file we need to store the previous - * state to restore it later. - */ -struct stackelement { - char *fname; - int lineno; - int colno; - glob_t globbuf; /* the current globbuf */ - int globbuf_pos; /* where we are in the current globbuf */ - YY_BUFFER_STATE bufstate; -}; - -static struct stackelement include_stack[MAX_INCLUDE_DEPTH]; -static int include_stack_index = 0; -static void setup_filestack(char *fnamebuf, int fnamebuf_siz, glob_t *globbuf, int globpos, yyscan_t xscan, int create); - -/* - * if we use the @n feature of bison, we must supply the start/end - * location of tokens in the structure pointed by yylloc. - * Simple tokens are just assumed to be on the same line, so - * the line number is constant, and the column is incremented - * by the length of the token. - */ -#ifdef FLEX_BETA /* set for 2.5.33 */ - -/* compute the total number of lines and columns in the text - * passed as argument. - */ -static void pbcwhere(const char *text, int *line, int *col ) -{ - int loc_line = *line; - int loc_col = *col; - char c; - while ( (c = *text++) ) { - if ( c == '\t' ) { - loc_col += 8 - (loc_col % 8); - } else if ( c == '\n' ) { - loc_line++; - loc_col = 1; - } else - loc_col++; - } - *line = loc_line; - *col = loc_col; -} - -#define STORE_POS do { \ - yylloc->first_line = yylloc->last_line = my_lineno; \ - yylloc->first_column=my_col; \ - yylloc->last_column=my_col+yyleng-1; \ - my_col+=yyleng; \ - } while (0) - -#define STORE_LOC do { \ - yylloc->first_line = my_lineno; \ - yylloc->first_column=my_col; \ - pbcwhere(yytext, &my_lineno, &my_col); \ - yylloc->last_line = my_lineno; \ - yylloc->last_column = my_col - 1; \ - } while (0) -#else -#define STORE_POS -#define STORE_LOC -#endif -#line 954 "ael_lex.c" - -#define INITIAL 0 -#define paren 1 -#define semic 2 -#define argg 3 -#define comment 4 -#define curlystate 5 -#define wordstate 6 -#define brackstate 7 - -#ifndef YY_NO_UNISTD_H -/* Special case for "unistd.h", since it is non-ANSI. We include it way - * down here because we want the user's section 1 to have been scanned first. - * The user has a chance to override it with an option. - */ -#include <unistd.h> -#endif - -#ifndef YY_EXTRA_TYPE -#define YY_EXTRA_TYPE void * -#endif - -/* Holds the entire state of the reentrant scanner. */ -struct yyguts_t - { - - /* User-defined. Not touched by flex. */ - YY_EXTRA_TYPE yyextra_r; - - /* The rest are the same as the globals declared in the non-reentrant scanner. */ - FILE *yyin_r, *yyout_r; - size_t yy_buffer_stack_top; /**< index of top of stack. */ - size_t yy_buffer_stack_max; /**< capacity of stack. */ - YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ - char yy_hold_char; - int yy_n_chars; - int yyleng_r; - char *yy_c_buf_p; - int yy_init; - int yy_start; - int yy_did_buffer_switch_on_eof; - int yy_start_stack_ptr; - int yy_start_stack_depth; - int *yy_start_stack; - yy_state_type yy_last_accepting_state; - char* yy_last_accepting_cpos; - - int yylineno_r; - int yy_flex_debug_r; - - char *yytext_r; - int yy_more_flag; - int yy_more_len; - - YYSTYPE * yylval_r; - - YYLTYPE * yylloc_r; - - }; /* end struct yyguts_t */ - -static int yy_init_globals (yyscan_t yyscanner ); - - /* This must go here because YYSTYPE and YYLTYPE are included - * from bison output in section 1.*/ - # define yylval yyg->yylval_r - - # define yylloc yyg->yylloc_r - -int ael_yylex_init (yyscan_t* scanner); - -int ael_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); - -/* Accessor methods to globals. - These are made visible to non-reentrant scanners for convenience. */ - -int ael_yylex_destroy (yyscan_t yyscanner ); - -int ael_yyget_debug (yyscan_t yyscanner ); - -void ael_yyset_debug (int debug_flag ,yyscan_t yyscanner ); - -YY_EXTRA_TYPE ael_yyget_extra (yyscan_t yyscanner ); - -void ael_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); - -FILE *ael_yyget_in (yyscan_t yyscanner ); - -void ael_yyset_in (FILE * in_str ,yyscan_t yyscanner ); - -FILE *ael_yyget_out (yyscan_t yyscanner ); - -void ael_yyset_out (FILE * out_str ,yyscan_t yyscanner ); - -int ael_yyget_leng (yyscan_t yyscanner ); - -char *ael_yyget_text (yyscan_t yyscanner ); - -int ael_yyget_lineno (yyscan_t yyscanner ); - -void ael_yyset_lineno (int line_number ,yyscan_t yyscanner ); - -YYSTYPE * ael_yyget_lval (yyscan_t yyscanner ); - -void ael_yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); - - YYLTYPE *ael_yyget_lloc (yyscan_t yyscanner ); - - void ael_yyset_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner ); - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int ael_yywrap (yyscan_t yyscanner ); -#else -extern int ael_yywrap (yyscan_t yyscanner ); -#endif -#endif - - static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner); - -#ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); -#endif - -#ifndef YY_NO_INPUT - -#ifdef __cplusplus -static int yyinput (yyscan_t yyscanner ); -#else -static int input (yyscan_t yyscanner ); -#endif - -#endif - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#define YY_READ_BUF_SIZE 8192 -#endif - -/* Copy whatever the last rule matched to the standard output. */ -#ifndef ECHO -/* This used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ -#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) -#endif - -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, - * is returned in "result". - */ -#ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ - { \ - int c = '*'; \ - size_t n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(yyin); \ - } \ - }\ -\ - -#endif - -/* No semi-colon after return; correct usage is to write "yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#ifndef yyterminate -#define yyterminate() return YY_NULL -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Report a fatal error. */ -#ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) -#endif - -/* end tables serialization structures and prototypes */ - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL_IS_OURS 1 - -extern int ael_yylex \ - (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner); - -#define YY_DECL int ael_yylex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) -#endif /* !YY_DECL */ - -/* Code executed at the beginning of each rule, after yytext and yyleng - * have been set up. - */ -#ifndef YY_USER_ACTION -#define YY_USER_ACTION -#endif - -/* Code executed at the end of each rule. */ -#ifndef YY_BREAK -#define YY_BREAK break; -#endif - -#define YY_RULE_SETUP \ - YY_USER_ACTION - -/** The main scanner function which does all the work. - */ -YY_DECL -{ - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - -#line 216 "ael.flex" - - -#line 1205 "ael_lex.c" - - yylval = yylval_param; - - yylloc = yylloc_param; - - if ( !yyg->yy_init ) - { - yyg->yy_init = 1; - -#ifdef YY_USER_INIT - YY_USER_INIT; -#endif - - if ( ! yyg->yy_start ) - yyg->yy_start = 1; /* first start state */ - - if ( ! yyin ) - yyin = stdin; - - if ( ! yyout ) - yyout = stdout; - - if ( ! YY_CURRENT_BUFFER ) { - ael_yyensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - ael_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); - } - - ael_yy_load_buffer_state(yyscanner ); - } - - while ( 1 ) /* loops until end-of-file is reached */ - { - yyg->yy_more_len = 0; - if ( yyg->yy_more_flag ) - { - yyg->yy_more_len = yyg->yy_c_buf_p - yyg->yytext_ptr; - yyg->yy_more_flag = 0; - } - yy_cp = yyg->yy_c_buf_p; - - /* Support of yytext. */ - *yy_cp = yyg->yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = yyg->yy_start; -yy_match: - do - { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 285 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - ++yy_cp; - } - while ( yy_current_state != 284 ); - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - - YY_DO_BEFORE_ACTION; - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yyg->yy_hold_char; - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; - -case 1: -YY_RULE_SETUP -#line 218 "ael.flex" -{ STORE_POS; return LC;} - YY_BREAK -case 2: -YY_RULE_SETUP -#line 219 "ael.flex" -{ STORE_POS; return RC;} - YY_BREAK -case 3: -YY_RULE_SETUP -#line 220 "ael.flex" -{ STORE_POS; return LP;} - YY_BREAK -case 4: -YY_RULE_SETUP -#line 221 "ael.flex" -{ STORE_POS; return RP;} - YY_BREAK -case 5: -YY_RULE_SETUP -#line 222 "ael.flex" -{ STORE_POS; return SEMI;} - YY_BREAK -case 6: -YY_RULE_SETUP -#line 223 "ael.flex" -{ STORE_POS; return EQ;} - YY_BREAK -case 7: -YY_RULE_SETUP -#line 224 "ael.flex" -{ STORE_POS; return COMMA;} - YY_BREAK -case 8: -YY_RULE_SETUP -#line 225 "ael.flex" -{ STORE_POS; return COLON;} - YY_BREAK -case 9: -YY_RULE_SETUP -#line 226 "ael.flex" -{ STORE_POS; return AMPER;} - YY_BREAK -case 10: -YY_RULE_SETUP -#line 227 "ael.flex" -{ STORE_POS; return BAR;} - YY_BREAK -case 11: -YY_RULE_SETUP -#line 228 "ael.flex" -{ STORE_POS; return EXTENMARK;} - YY_BREAK -case 12: -YY_RULE_SETUP -#line 229 "ael.flex" -{ STORE_POS; return AT;} - YY_BREAK -case 13: -YY_RULE_SETUP -#line 230 "ael.flex" -{/*comment*/} - YY_BREAK -case 14: -YY_RULE_SETUP -#line 231 "ael.flex" -{ STORE_POS; return KW_CONTEXT;} - YY_BREAK -case 15: -YY_RULE_SETUP -#line 232 "ael.flex" -{ STORE_POS; return KW_ABSTRACT;} - YY_BREAK -case 16: -YY_RULE_SETUP -#line 233 "ael.flex" -{ STORE_POS; return KW_EXTEND;} - YY_BREAK -case 17: -YY_RULE_SETUP -#line 234 "ael.flex" -{ STORE_POS; return KW_MACRO;}; - YY_BREAK -case 18: -YY_RULE_SETUP -#line 235 "ael.flex" -{ STORE_POS; return KW_GLOBALS;} - YY_BREAK -case 19: -YY_RULE_SETUP -#line 236 "ael.flex" -{ STORE_POS; return KW_IGNOREPAT;} - YY_BREAK -case 20: -YY_RULE_SETUP -#line 237 "ael.flex" -{ STORE_POS; return KW_SWITCH;} - YY_BREAK -case 21: -YY_RULE_SETUP -#line 238 "ael.flex" -{ STORE_POS; return KW_IF;} - YY_BREAK -case 22: -YY_RULE_SETUP -#line 239 "ael.flex" -{ STORE_POS; return KW_IFTIME;} - YY_BREAK -case 23: -YY_RULE_SETUP -#line 240 "ael.flex" -{ STORE_POS; return KW_RANDOM;} - YY_BREAK -case 24: -YY_RULE_SETUP -#line 241 "ael.flex" -{ STORE_POS; return KW_REGEXTEN;} - YY_BREAK -case 25: -YY_RULE_SETUP -#line 242 "ael.flex" -{ STORE_POS; return KW_HINT;} - YY_BREAK -case 26: -YY_RULE_SETUP -#line 243 "ael.flex" -{ STORE_POS; return KW_ELSE;} - YY_BREAK -case 27: -YY_RULE_SETUP -#line 244 "ael.flex" -{ STORE_POS; return KW_GOTO;} - YY_BREAK -case 28: -YY_RULE_SETUP -#line 245 "ael.flex" -{ STORE_POS; return KW_JUMP;} - YY_BREAK -case 29: -YY_RULE_SETUP -#line 246 "ael.flex" -{ STORE_POS; return KW_RETURN;} - YY_BREAK -case 30: -YY_RULE_SETUP -#line 247 "ael.flex" -{ STORE_POS; return KW_BREAK;} - YY_BREAK -case 31: -YY_RULE_SETUP -#line 248 "ael.flex" -{ STORE_POS; return KW_CONTINUE;} - YY_BREAK -case 32: -YY_RULE_SETUP -#line 249 "ael.flex" -{ STORE_POS; return KW_FOR;} - YY_BREAK -case 33: -YY_RULE_SETUP -#line 250 "ael.flex" -{ STORE_POS; return KW_WHILE;} - YY_BREAK -case 34: -YY_RULE_SETUP -#line 251 "ael.flex" -{ STORE_POS; return KW_CASE;} - YY_BREAK -case 35: -YY_RULE_SETUP -#line 252 "ael.flex" -{ STORE_POS; return KW_DEFAULT;} - YY_BREAK -case 36: -YY_RULE_SETUP -#line 253 "ael.flex" -{ STORE_POS; return KW_PATTERN;} - YY_BREAK -case 37: -YY_RULE_SETUP -#line 254 "ael.flex" -{ STORE_POS; return KW_CATCH;} - YY_BREAK -case 38: -YY_RULE_SETUP -#line 255 "ael.flex" -{ STORE_POS; return KW_SWITCHES;} - YY_BREAK -case 39: -YY_RULE_SETUP -#line 256 "ael.flex" -{ STORE_POS; return KW_ESWITCHES;} - YY_BREAK -case 40: -YY_RULE_SETUP -#line 257 "ael.flex" -{ STORE_POS; return KW_INCLUDES;} - YY_BREAK -case 41: -YY_RULE_SETUP -#line 258 "ael.flex" -{ BEGIN(comment); my_col += 2; } - YY_BREAK -case 42: -YY_RULE_SETUP -#line 260 "ael.flex" -{ my_col += yyleng; } - YY_BREAK -case 43: -/* rule 43 can match eol */ -YY_RULE_SETUP -#line 261 "ael.flex" -{ ++my_lineno; my_col=1;} - YY_BREAK -case 44: -YY_RULE_SETUP -#line 262 "ael.flex" -{ my_col += yyleng; } - YY_BREAK -case 45: -/* rule 45 can match eol */ -YY_RULE_SETUP -#line 263 "ael.flex" -{ ++my_lineno; my_col=1;} - YY_BREAK -case 46: -YY_RULE_SETUP -#line 264 "ael.flex" -{ my_col += 2; BEGIN(INITIAL); } /* the nice thing about comments is that you know exactly what ends them */ - YY_BREAK -case 47: -/* rule 47 can match eol */ -YY_RULE_SETUP -#line 266 "ael.flex" -{ my_lineno++; my_col = 1; } - YY_BREAK -case 48: -YY_RULE_SETUP -#line 267 "ael.flex" -{ my_col += yyleng; } - YY_BREAK -case 49: -YY_RULE_SETUP -#line 268 "ael.flex" -{ my_col += (yyleng*8)-(my_col%8); } - YY_BREAK -case 50: -YY_RULE_SETUP -#line 270 "ael.flex" -{ - /* boy did I open a can of worms when I changed the lexical token "word". - all the above keywords can be used as a beginning to a "word".- - before, a "word" would match a longer sequence than the above - keywords, and all would be well. But now "word" is a single char - and feeds into a statemachine sort of sequence from there on. So... - I added the {KEYWORD}? to the beginning of the word match sequence */ - - if (!strcmp(yytext,"${")) { - parencount2 = 0; - pbcpos2 = 0; - pbcpush2('{'); /* push '{' so the last pcbpop (parencount2 = -1) will succeed */ - BEGIN(curlystate); - yymore(); - } else if (!strcmp(yytext,"$[")) { - parencount3 = 0; - pbcpos3 = 0; - pbcpush3('['); /* push '[' so the last pcbpop (parencount3 = -1) will succeed */ - BEGIN(brackstate); - yymore(); - } else { - BEGIN(wordstate); - yymore(); - } - } - YY_BREAK -case 51: -YY_RULE_SETUP -#line 296 "ael.flex" -{ yymore(); /* Keep going */ } - YY_BREAK -case 52: -YY_RULE_SETUP -#line 297 "ael.flex" -{ yymore(); /* Keep going */ } - YY_BREAK -case 53: -YY_RULE_SETUP -#line 298 "ael.flex" -{ yymore(); /* Keep Going */ } - YY_BREAK -case 54: -YY_RULE_SETUP -#line 299 "ael.flex" -{ /* the beginning of a ${} construct. prepare and pop into curlystate */ - parencount2 = 0; - pbcpos2 = 0; - pbcpush2('{'); /* push '{' so the last pcbpop (parencount2 = -1) will succeed */ - BEGIN(curlystate); - yymore(); - } - YY_BREAK -case 55: -YY_RULE_SETUP -#line 306 "ael.flex" -{ /* the beginning of a $[] construct. prepare and pop into brackstate */ - parencount3 = 0; - pbcpos3 = 0; - pbcpush3('['); /* push '[' so the last pcbpop (parencount3 = -1) will succeed */ - BEGIN(brackstate); - yymore(); - } - YY_BREAK -case 56: -/* rule 56 can match eol */ -YY_RULE_SETUP -#line 313 "ael.flex" -{ - /* a non-word constituent char, like a space, tab, curly, paren, etc */ - char c = yytext[yyleng-1]; - STORE_POS; - yylval->str = malloc(yyleng); - strncpy(yylval->str, yytext, yyleng); - yylval->str[yyleng-1] = 0; - unput(c); /* put this ending char back in the stream */ - BEGIN(0); - prev_word = yylval->str; - return word; - } - YY_BREAK -case 57: -/* rule 57 can match eol */ -YY_RULE_SETUP -#line 325 "ael.flex" -{ - if ( pbcpop2('}') ) { /* error */ - STORE_LOC; - ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression: %s !\n", my_file, my_lineno, my_col, yytext); - BEGIN(0); - yylval->str = malloc(yyleng+1); - strncpy(yylval->str, yytext, yyleng); - yylval->str[yyleng] = 0; - return word; - } - parencount2--; - if ( parencount2 >= 0) { - yymore(); - } else { - BEGIN(wordstate); /* Finished with the current ${} construct. Return to word gathering state */ - yymore(); - } - } - YY_BREAK -case 58: -/* rule 58 can match eol */ -YY_RULE_SETUP -#line 344 "ael.flex" -{ - char c = yytext[yyleng-1]; - if (c == '{') - parencount2++; - pbcpush2(c); - yymore(); - } - YY_BREAK -case 59: -/* rule 59 can match eol */ -YY_RULE_SETUP -#line 352 "ael.flex" -{ - char c = yytext[yyleng-1]; - if ( pbcpop2(c)) { /* error */ - STORE_LOC; - ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", - my_file, my_lineno, my_col, c); - BEGIN(0); - yylval->str = malloc(yyleng+1); - strncpy(yylval->str, yytext, yyleng); - yylval->str[yyleng] = 0; - return word; - } - yymore(); - } - YY_BREAK -case 60: -/* rule 60 can match eol */ -YY_RULE_SETUP -#line 368 "ael.flex" -{ - if ( pbcpop3(']') ) { /* error */ - STORE_LOC; - ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression: %s !\n", my_file, my_lineno, my_col, yytext); - BEGIN(0); - yylval->str = malloc(yyleng+1); - strncpy(yylval->str, yytext, yyleng); - yylval->str[yyleng] = 0; - return word; - } - parencount3--; - if ( parencount3 >= 0) { - yymore(); - } else { - BEGIN(wordstate); /* Finished with the current ${} construct. Return to word gathering state */ - yymore(); - } - } - YY_BREAK -case 61: -/* rule 61 can match eol */ -YY_RULE_SETUP -#line 387 "ael.flex" -{ - char c = yytext[yyleng-1]; - if (c == '[') - parencount3++; - pbcpush3(c); - yymore(); - } - YY_BREAK -case 62: -/* rule 62 can match eol */ -YY_RULE_SETUP -#line 395 "ael.flex" -{ - char c = yytext[yyleng-1]; - if ( pbcpop3(c)) { /* error */ - STORE_LOC; - ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", - my_file, my_lineno, my_col, c); - BEGIN(0); - yylval->str = malloc(yyleng+1); - strncpy(yylval->str, yytext, yyleng); - yylval->str[yyleng] = 0; - return word; - } - yymore(); - } - YY_BREAK -/* - * context used for arguments of if_head, random_head, switch_head, - * for (last statement), while (XXX why not iftime_head ?). - * End with the matching parentheses. - * A comma at the top level is valid here, unlike in argg where it - * is an argument separator so it must be returned as a token. - */ -case 63: -/* rule 63 can match eol */ -YY_RULE_SETUP -#line 418 "ael.flex" -{ - if ( pbcpop(')') ) { /* error */ - STORE_LOC; - ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression: %s !\n", my_file, my_lineno, my_col, yytext); - BEGIN(0); - yylval->str = malloc(yyleng+1); - strncpy(yylval->str, yytext, yyleng); - yylval->str[yyleng] = 0; - prev_word = 0; - return word; - } - parencount--; - if ( parencount >= 0) { - yymore(); - } else { - STORE_LOC; - yylval->str = malloc(yyleng); - strncpy(yylval->str, yytext, yyleng); - yylval->str[yyleng-1] = 0; - unput(')'); - BEGIN(0); - return word; - } - } - YY_BREAK -case 64: -/* rule 64 can match eol */ -YY_RULE_SETUP -#line 443 "ael.flex" -{ - char c = yytext[yyleng-1]; - if (c == '(') - parencount++; - pbcpush(c); - yymore(); - } - YY_BREAK -case 65: -/* rule 65 can match eol */ -YY_RULE_SETUP -#line 451 "ael.flex" -{ - char c = yytext[yyleng-1]; - if ( pbcpop(c)) { /* error */ - STORE_LOC; - ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", - my_file, my_lineno, my_col, c); - BEGIN(0); - yylval->str = malloc(yyleng+1); - strncpy(yylval->str, yytext, yyleng); - yylval->str[yyleng] = 0; - return word; - } - yymore(); - } - YY_BREAK -/* - * handlers for arguments to a macro or application calls. - * We enter this context when we find the initial '(' and - * stay here until we close all matching parentheses, - * and find the comma (argument separator) or the closing ')' - * of the (external) call, which happens when parencount == 0 - * before the decrement. - */ -case 66: -/* rule 66 can match eol */ -YY_RULE_SETUP -#line 475 "ael.flex" -{ - char c = yytext[yyleng-1]; - if (c == '(') - parencount++; - pbcpush(c); - yymore(); - } - YY_BREAK -case 67: -/* rule 67 can match eol */ -YY_RULE_SETUP -#line 483 "ael.flex" -{ - if ( pbcpop(')') ) { /* error */ - STORE_LOC; - ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression!\n", my_file, my_lineno, my_col); - BEGIN(0); - yylval->str = malloc(yyleng+1); - strncpy(yylval->str, yytext, yyleng); - yylval->str[yyleng] = 0; - return word; - } - - parencount--; - if( parencount >= 0){ - yymore(); - } else { - STORE_LOC; - BEGIN(0); - if ( !strcmp(yytext, ")") ) - return RP; - yylval->str = malloc(yyleng); - strncpy(yylval->str, yytext, yyleng); - yylval->str[yyleng-1] = '\0'; /* trim trailing ')' */ - unput(')'); - return word; - } - } - YY_BREAK -case 68: -/* rule 68 can match eol */ -YY_RULE_SETUP -#line 510 "ael.flex" -{ - if( parencount != 0) { /* ast_log(LOG_NOTICE,"Folding in a comma!\n"); */ - yymore(); - } else { - STORE_LOC; - if( !strcmp(yytext,"," ) ) - return COMMA; - yylval->str = malloc(yyleng); - strncpy(yylval->str, yytext, yyleng); - yylval->str[yyleng-1] = '\0'; /* trim trailing ',' */ - unput(','); - return word; - } - } - YY_BREAK -case 69: -/* rule 69 can match eol */ -YY_RULE_SETUP -#line 525 "ael.flex" -{ - char c = yytext[yyleng-1]; - if ( pbcpop(c) ) { /* error */ - STORE_LOC; - ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", my_file, my_lineno, my_col, c); - BEGIN(0); - yylval->str = malloc(yyleng+1); - strncpy(yylval->str, yytext, yyleng); - yylval->str[yyleng] = '\0'; - return word; - } - yymore(); - } - YY_BREAK -/* - * context used to find tokens in the right hand side of assignments, - * or in the first and second operand of a 'for'. As above, match - * commas and use ';' as a separator (hence return it as a separate token). - */ -case 70: -/* rule 70 can match eol */ -YY_RULE_SETUP -#line 544 "ael.flex" -{ - char c = yytext[yyleng-1]; - yymore(); - pbcpush(c); - } - YY_BREAK -case 71: -/* rule 71 can match eol */ -YY_RULE_SETUP -#line 550 "ael.flex" -{ - char c = yytext[yyleng-1]; - if ( pbcpop(c) ) { /* error */ - STORE_LOC; - ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", my_file, my_lineno, my_col, c); - BEGIN(0); - yylval->str = malloc(yyleng+1); - strncpy(yylval->str, yytext, yyleng); - yylval->str[yyleng] = '\0'; - return word; - } - yymore(); - } - YY_BREAK -case 72: -/* rule 72 can match eol */ -YY_RULE_SETUP -#line 564 "ael.flex" -{ - STORE_LOC; - yylval->str = malloc(yyleng); - strncpy(yylval->str, yytext, yyleng); - yylval->str[yyleng-1] = '\0'; /* trim trailing ';' */ - unput(';'); - BEGIN(0); - return word; - } - YY_BREAK -case 73: -/* rule 73 can match eol */ -YY_RULE_SETUP -#line 574 "ael.flex" -{ - char fnamebuf[1024],*p1,*p2; - int glob_ret; - glob_t globbuf; /* the current globbuf */ - int globbuf_pos = -1; /* where we are in the current globbuf */ - globbuf.gl_offs = 0; /* initialize it to silence gcc */ - - p1 = strchr(yytext,'"'); - p2 = strrchr(yytext,'"'); - if ( include_stack_index >= MAX_INCLUDE_DEPTH ) { - ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Includes nested too deeply! Wow!!! How did you do that?\n", my_file, my_lineno, my_col); - } else if ( (int)(p2-p1) > sizeof(fnamebuf) - 1 ) { - ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Filename is incredibly way too long (%d chars!). Inclusion ignored!\n", my_file, my_lineno, my_col, yyleng - 10); - } else { - strncpy(fnamebuf, p1+1, p2-p1-1); - fnamebuf[p2-p1-1] = 0; - -#ifdef SOLARIS - glob_ret = glob(fnamebuf, GLOB_NOCHECK, NULL, &globbuf); -#else - glob_ret = glob(fnamebuf, GLOB_NOMAGIC|GLOB_BRACE, NULL, &globbuf); -#endif - if (glob_ret == GLOB_NOSPACE) { - ast_log(LOG_WARNING, - "Glob Expansion of pattern '%s' failed: Not enough memory\n", fnamebuf); - } else if (glob_ret == GLOB_ABORTED) { - ast_log(LOG_WARNING, - "Glob Expansion of pattern '%s' failed: Read error\n", fnamebuf); - } else if (glob_ret == GLOB_NOMATCH) { - ast_log(LOG_WARNING, - "Glob Expansion of pattern '%s' failed: No matches!\n", fnamebuf); - } else { - globbuf_pos = 0; - } - } - if (globbuf_pos > -1) { - setup_filestack(fnamebuf, sizeof(fnamebuf), &globbuf, 0, yyscanner, 1); - } - } - YY_BREAK -case YY_STATE_EOF(INITIAL): -case YY_STATE_EOF(paren): -case YY_STATE_EOF(semic): -case YY_STATE_EOF(argg): -case YY_STATE_EOF(comment): -case YY_STATE_EOF(curlystate): -case YY_STATE_EOF(wordstate): -case YY_STATE_EOF(brackstate): -#line 615 "ael.flex" -{ - char fnamebuf[2048]; - if (include_stack_index > 0 && include_stack[include_stack_index-1].globbuf_pos < include_stack[include_stack_index-1].globbuf.gl_pathc-1) { - ael_yy_delete_buffer(YY_CURRENT_BUFFER,yyscanner ); - include_stack[include_stack_index-1].globbuf_pos++; - setup_filestack(fnamebuf, sizeof(fnamebuf), &include_stack[include_stack_index-1].globbuf, include_stack[include_stack_index-1].globbuf_pos, yyscanner, 0); - /* finish this */ - - } else { - if (include_stack[include_stack_index].fname) { - free(include_stack[include_stack_index].fname); - include_stack[include_stack_index].fname = 0; - } - if (my_file) { - free(my_file); - my_file = 0; - } - if ( --include_stack_index < 0 ) { - yyterminate(); - } else { - globfree(&include_stack[include_stack_index].globbuf); - include_stack[include_stack_index].globbuf_pos = -1; - - ael_yy_delete_buffer(YY_CURRENT_BUFFER,yyscanner ); - ael_yy_switch_to_buffer(include_stack[include_stack_index].bufstate,yyscanner ); - my_lineno = include_stack[include_stack_index].lineno; - my_col = include_stack[include_stack_index].colno; - my_file = strdup(include_stack[include_stack_index].fname); - } - } - } - YY_BREAK -case 74: -/* rule 74 can match eol */ -YY_RULE_SETUP -#line 647 "ael.flex" -{ /* default rule */ ast_log(LOG_ERROR,"Unhandled char(s): %s\n", yytext); } - YY_BREAK -case 75: -YY_RULE_SETUP -#line 649 "ael.flex" -YY_FATAL_ERROR( "flex scanner jammed" ); - YY_BREAK -#line 2031 "ael_lex.c" - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yyg->yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * ael_yylex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); - - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++yyg->yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_END_OF_FILE: - { - yyg->yy_did_buffer_switch_on_eof = 0; - - if ( ael_yywrap(yyscanner ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = - yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yyg->yy_c_buf_p = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ -} /* end of ael_yylex */ - -/* yy_get_next_buffer - try to read in a new buffer - * - * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file - */ -static int yy_get_next_buffer (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - register char *source = yyg->yytext_ptr; - register int number_to_move, i; - int ret_val; - - if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; - - else - { - int num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER; - - int yy_c_buf_p_offset = - (int) (yyg->yy_c_buf_p - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - int new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - ael_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1; - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - yyg->yy_n_chars, (size_t) num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - if ( yyg->yy_n_chars == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - ael_yyrestart(yyin ,yyscanner); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) ael_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - } - - yyg->yy_n_chars += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; -} - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - - static yy_state_type yy_get_previous_state (yyscan_t yyscanner) -{ - register yy_state_type yy_current_state; - register char *yy_cp; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - yy_current_state = yyg->yy_start; - - for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) - { - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 285 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - } - - return yy_current_state; -} - -/* yy_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = yy_try_NUL_trans( current_state ); - */ - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) -{ - register int yy_is_jam; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ - register char *yy_cp = yyg->yy_c_buf_p; - - register YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 285 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 284); - - return yy_is_jam ? 0 : yy_current_state; -} - - static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner) -{ - register char *yy_cp; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - yy_cp = yyg->yy_c_buf_p; - - /* undo effects of setting up yytext */ - *yy_cp = yyg->yy_hold_char; - - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - { /* need to shift things up to make room */ - /* +2 for EOB chars. */ - register int number_to_move = yyg->yy_n_chars + 2; - register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; - register char *source = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; - - while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - *--dest = *--source; - - yy_cp += (int) (dest - source); - yy_bp += (int) (dest - source); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; - - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - YY_FATAL_ERROR( "flex scanner push-back overflow" ); - } - - *--yy_cp = (char) c; - - yyg->yytext_ptr = yy_bp; - yyg->yy_hold_char = *yy_cp; - yyg->yy_c_buf_p = yy_cp; -} - -#ifndef YY_NO_INPUT -#ifdef __cplusplus - static int yyinput (yyscan_t yyscanner) -#else - static int input (yyscan_t yyscanner) -#endif - -{ - int c; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - *yyg->yy_c_buf_p = yyg->yy_hold_char; - - if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - /* This was really a NUL. */ - *yyg->yy_c_buf_p = '\0'; - - else - { /* need more input */ - int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; - ++yyg->yy_c_buf_p; - - switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - ael_yyrestart(yyin ,yyscanner); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( ael_yywrap(yyscanner ) ) - return EOF; - - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; -#ifdef __cplusplus - return yyinput(yyscanner); -#else - return input(yyscanner); -#endif - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = yyg->yytext_ptr + offset; - break; - } - } - } - - c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ - *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ - yyg->yy_hold_char = *++yyg->yy_c_buf_p; - - return c; -} -#endif /* ifndef YY_NO_INPUT */ - -/** Immediately switch to a different input stream. - * @param input_file A readable stream. - * @param yyscanner The scanner object. - * @note This function does not reset the start condition to @c INITIAL . - */ - void ael_yyrestart (FILE * input_file , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if ( ! YY_CURRENT_BUFFER ){ - ael_yyensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - ael_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); - } - - ael_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); - ael_yy_load_buffer_state(yyscanner ); -} - -/** Switch to a different input buffer. - * @param new_buffer The new input buffer. - * @param yyscanner The scanner object. - */ - void ael_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* TODO. We should be able to replace this entire function body - * with - * ael_yypop_buffer_state(); - * ael_yypush_buffer_state(new_buffer); - */ - ael_yyensure_buffer_stack (yyscanner); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - ael_yy_load_buffer_state(yyscanner ); - - /* We don't actually know whether we did this switch during - * EOF (ael_yywrap()) processing, but the only time this flag - * is looked at is after ael_yywrap() is called, so it's safe - * to go ahead and always set it. - */ - yyg->yy_did_buffer_switch_on_eof = 1; -} - -static void ael_yy_load_buffer_state (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - yyg->yy_hold_char = *yyg->yy_c_buf_p; -} - -/** Allocate and initialize an input buffer state. - * @param file A readable stream. - * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * @param yyscanner The scanner object. - * @return the allocated buffer state. - */ - YY_BUFFER_STATE ael_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) ael_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in ael_yy_create_buffer()" ); - - b->yy_buf_size = size; - - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) ael_yyalloc(b->yy_buf_size + 2 ,yyscanner ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in ael_yy_create_buffer()" ); - - b->yy_is_our_buffer = 1; - - ael_yy_init_buffer(b,file ,yyscanner); - - return b; -} - -/** Destroy the buffer. - * @param b a buffer created with ael_yy_create_buffer() - * @param yyscanner The scanner object. - */ - void ael_yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if ( ! b ) - return; - - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - - if ( b->yy_is_our_buffer ) - ael_yyfree((void *) b->yy_ch_buf ,yyscanner ); - - ael_yyfree((void *) b ,yyscanner ); -} - -#ifndef __cplusplus -extern int isatty (int ); -#endif /* __cplusplus */ - -/* Initializes or reinitializes a buffer. - * This function is sometimes called more than once on the same buffer, - * such as during a ael_yyrestart() or at EOF. - */ - static void ael_yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) - -{ - int oerrno = errno; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - ael_yy_flush_buffer(b ,yyscanner); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - - /* If b is the current buffer, then ael_yy_init_buffer was _probably_ - * called from ael_yyrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } - - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; - - errno = oerrno; -} - -/** Discard all buffered characters. On the next scan, YY_INPUT will be called. - * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * @param yyscanner The scanner object. - */ - void ael_yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if ( ! b ) - return; - - b->yy_n_chars = 0; - - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - - b->yy_buf_pos = &b->yy_ch_buf[0]; - - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; - - if ( b == YY_CURRENT_BUFFER ) - ael_yy_load_buffer_state(yyscanner ); -} - -/** Pushes the new state onto the stack. The new state becomes - * the current state. This function will allocate the stack - * if necessary. - * @param new_buffer The new state. - * @param yyscanner The scanner object. - */ -void ael_yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (new_buffer == NULL) - return; - - ael_yyensure_buffer_stack(yyscanner); - - /* This block is copied from ael_yy_switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - yyg->yy_buffer_stack_top++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from ael_yy_switch_to_buffer. */ - ael_yy_load_buffer_state(yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; -} - -/** Removes and deletes the top of the stack, if present. - * The next element becomes the new top. - * @param yyscanner The scanner object. - */ -void ael_yypop_buffer_state (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) - return; - - ael_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - if (yyg->yy_buffer_stack_top > 0) - --yyg->yy_buffer_stack_top; - - if (YY_CURRENT_BUFFER) { - ael_yy_load_buffer_state(yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; - } -} - -/* Allocates the stack if it does not exist. - * Guarantees space for at least one push. - */ -static void ael_yyensure_buffer_stack (yyscan_t yyscanner) -{ - int num_to_alloc; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (!yyg->yy_buffer_stack) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; - yyg->yy_buffer_stack = (struct yy_buffer_state**)ael_yyalloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in ael_yyensure_buffer_stack()" ); - - memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - yyg->yy_buffer_stack_max = num_to_alloc; - yyg->yy_buffer_stack_top = 0; - return; - } - - if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - int grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = yyg->yy_buffer_stack_max + grow_size; - yyg->yy_buffer_stack = (struct yy_buffer_state**)ael_yyrealloc - (yyg->yy_buffer_stack, - num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in ael_yyensure_buffer_stack()" ); - - /* zero only the new slots.*/ - memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); - yyg->yy_buffer_stack_max = num_to_alloc; - } -} - -/** Setup the input buffer state to scan directly from a user-specified character buffer. - * @param base the character buffer - * @param size the size in bytes of the character buffer - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE ael_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return 0; - - b = (YY_BUFFER_STATE) ael_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in ael_yy_scan_buffer()" ); - - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = 0; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - ael_yy_switch_to_buffer(b ,yyscanner ); - - return b; -} - -/** Setup the input buffer state to scan a string. The next call to ael_yylex() will - * scan from a @e copy of @a str. - * @param yystr a NUL-terminated string to scan - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - * @note If you want to scan bytes that may contain NUL values, then use - * ael_yy_scan_bytes() instead. - */ -YY_BUFFER_STATE ael_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner) -{ - - return ael_yy_scan_bytes(yystr,strlen(yystr) ,yyscanner); -} - -/** Setup the input buffer state to scan the given bytes. The next call to ael_yylex() will - * scan from a @e copy of @a bytes. - * @param bytes the byte buffer to scan - * @param len the number of bytes in the buffer pointed to by @a bytes. - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE ael_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - int i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; - buf = (char *) ael_yyalloc(n ,yyscanner ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in ael_yy_scan_bytes()" ); - - for ( i = 0; i < _yybytes_len; ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - - b = ael_yy_scan_buffer(buf,n ,yyscanner); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in ael_yy_scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; -} - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif - -static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) -{ - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); -} - -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - yytext[yyleng] = yyg->yy_hold_char; \ - yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ - yyg->yy_hold_char = *yyg->yy_c_buf_p; \ - *yyg->yy_c_buf_p = '\0'; \ - yyleng = yyless_macro_arg; \ - } \ - while ( 0 ) - -/* Accessor methods (get/set functions) to struct members. */ - -/** Get the user-defined data for this scanner. - * @param yyscanner The scanner object. - */ -YY_EXTRA_TYPE ael_yyget_extra (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyextra; -} - -/** Get the current line number. - * @param yyscanner The scanner object. - */ -int ael_yyget_lineno (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (! YY_CURRENT_BUFFER) - return 0; - - return yylineno; -} - -/** Get the current column number. - * @param yyscanner The scanner object. - */ -int ael_yyget_column (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (! YY_CURRENT_BUFFER) - return 0; - - return yycolumn; -} - -/** Get the input stream. - * @param yyscanner The scanner object. - */ -FILE *ael_yyget_in (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyin; -} - -/** Get the output stream. - * @param yyscanner The scanner object. - */ -FILE *ael_yyget_out (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyout; -} - -/** Get the length of the current token. - * @param yyscanner The scanner object. - */ -int ael_yyget_leng (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyleng; -} - -/** Get the current token. - * @param yyscanner The scanner object. - */ - -char *ael_yyget_text (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yytext; -} - -/** Set the user-defined data. This data is never touched by the scanner. - * @param user_defined The data to be associated with this scanner. - * @param yyscanner The scanner object. - */ -void ael_yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyextra = user_defined ; -} - -/** Set the current line number. - * @param line_number - * @param yyscanner The scanner object. - */ -void ael_yyset_lineno (int line_number , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* lineno is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - yy_fatal_error( "ael_yyset_lineno called with no buffer" , yyscanner); - - yylineno = line_number; -} - -/** Set the current column. - * @param line_number - * @param yyscanner The scanner object. - */ -void ael_yyset_column (int column_no , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* column is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - yy_fatal_error( "ael_yyset_column called with no buffer" , yyscanner); - - yycolumn = column_no; -} - -/** Set the input stream. This does not discard the current - * input buffer. - * @param in_str A readable stream. - * @param yyscanner The scanner object. - * @see ael_yy_switch_to_buffer - */ -void ael_yyset_in (FILE * in_str , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyin = in_str ; -} - -void ael_yyset_out (FILE * out_str , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyout = out_str ; -} - -int ael_yyget_debug (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yy_flex_debug; -} - -void ael_yyset_debug (int bdebug , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flex_debug = bdebug ; -} - -/* Accessor methods for yylval and yylloc */ - -YYSTYPE * ael_yyget_lval (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yylval; -} - -void ael_yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylval = yylval_param; -} - -YYLTYPE *ael_yyget_lloc (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yylloc; -} - -void ael_yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylloc = yylloc_param; -} - -/* User-visible API */ - -/* ael_yylex_init is special because it creates the scanner itself, so it is - * the ONLY reentrant function that doesn't take the scanner as the last argument. - * That's why we explicitly handle the declaration, instead of using our macros. - */ - -int ael_yylex_init(yyscan_t* ptr_yy_globals) - -{ - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } - - *ptr_yy_globals = (yyscan_t) ael_yyalloc ( sizeof( struct yyguts_t ), NULL ); - - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } - - /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - - return yy_init_globals ( *ptr_yy_globals ); -} - -/* ael_yylex_init_extra has the same functionality as ael_yylex_init, but follows the - * convention of taking the scanner as the last argument. Note however, that - * this is a *pointer* to a scanner, as it will be allocated by this call (and - * is the reason, too, why this function also must handle its own declaration). - * The user defined value in the first argument will be available to ael_yyalloc in - * the yyextra field. - */ - -int ael_yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) - -{ - struct yyguts_t dummy_yyguts; - - ael_yyset_extra (yy_user_defined, &dummy_yyguts); - - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } - - *ptr_yy_globals = (yyscan_t) ael_yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); - - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } - - /* By setting to 0xAA, we expose bugs in - yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - - ael_yyset_extra (yy_user_defined, *ptr_yy_globals); - - return yy_init_globals ( *ptr_yy_globals ); -} - -static int yy_init_globals (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from ael_yylex_destroy(), so don't allocate here. - */ - - yyg->yy_buffer_stack = 0; - yyg->yy_buffer_stack_top = 0; - yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = (char *) 0; - yyg->yy_init = 0; - yyg->yy_start = 0; - - yyg->yy_start_stack_ptr = 0; - yyg->yy_start_stack_depth = 0; - yyg->yy_start_stack = NULL; - -/* Defined in main.c */ -#ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; -#else - yyin = (FILE *) 0; - yyout = (FILE *) 0; -#endif - - /* For future reference: Set errno on error, since we are called by - * ael_yylex_init() - */ - return 0; -} - -/* ael_yylex_destroy is for both reentrant and non-reentrant scanners. */ -int ael_yylex_destroy (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - ael_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); - YY_CURRENT_BUFFER_LVALUE = NULL; - ael_yypop_buffer_state(yyscanner); - } - - /* Destroy the stack itself. */ - ael_yyfree(yyg->yy_buffer_stack ,yyscanner); - yyg->yy_buffer_stack = NULL; - - /* Destroy the start condition stack. */ - ael_yyfree(yyg->yy_start_stack ,yyscanner ); - yyg->yy_start_stack = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * ael_yylex() is called, initialization will occur. */ - yy_init_globals( yyscanner); - - /* Destroy the main struct (reentrant only). */ - ael_yyfree ( yyscanner , yyscanner ); - yyscanner = NULL; - return 0; -} - -/* - * Internal utility routines. - */ - -#ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) -{ - register int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; -} -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) -{ - register int n; - for ( n = 0; s[n]; ++n ) - ; - - return n; -} -#endif - -void *ael_yyalloc (yy_size_t size , yyscan_t yyscanner) -{ - return (void *) malloc( size ); -} - -void *ael_yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) -{ - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return (void *) realloc( (char *) ptr, size ); -} - -#define YYTABLES_NAME "yytables" - -#line 649 "ael.flex" - - - -static void pbcpush(char x) -{ - pbcstack[pbcpos++] = x; -} - -void ael_yyfree(void *ptr, yyscan_t yyscanner) -{ - if (ptr) - free( (char*) ptr ); -} - -static int pbcpop(char x) -{ - if ( ( x == ')' && pbcstack[pbcpos-1] == '(' ) - || ( x == ']' && pbcstack[pbcpos-1] == '[' ) - || ( x == '}' && pbcstack[pbcpos-1] == '{' )) { - pbcpos--; - return 0; - } - return 1; /* error */ -} - -static void pbcpush2(char x) -{ - pbcstack2[pbcpos2++] = x; -} - -static int pbcpop2(char x) -{ - if ( ( x == ')' && pbcstack2[pbcpos2-1] == '(' ) - || ( x == ']' && pbcstack2[pbcpos2-1] == '[' ) - || ( x == '}' && pbcstack2[pbcpos2-1] == '{' )) { - pbcpos2--; - return 0; - } - return 1; /* error */ -} - -static void pbcpush3(char x) -{ - pbcstack3[pbcpos3++] = x; -} - -static int pbcpop3(char x) -{ - if ( ( x == ')' && pbcstack3[pbcpos3-1] == '(' ) - || ( x == ']' && pbcstack3[pbcpos3-1] == '[' ) - || ( x == '}' && pbcstack3[pbcpos3-1] == '{' )) { - pbcpos3--; - return 0; - } - return 1; /* error */ -} - -static int c_prevword(void) -{ - char *c = prev_word; - if (c == NULL) - return 0; - while ( *c ) { - switch (*c) { - case '{': - case '[': - case '(': - pbcpush(*c); - break; - case '}': - case ']': - case ')': - if (pbcpop(*c)) - return 1; - break; - } - c++; - } - return 0; -} - - -/* - * The following three functions, reset_*, are used in the bison - * code to switch context. As a consequence, we need to - * declare them global and add a prototype so that the - * compiler does not complain. - * - * NOTE: yyg is declared because it is used in the BEGIN macros, - * though that should be hidden as the macro changes - * depending on the flex options that we use - in particular, - * %reentrant changes the way the macro is declared; - * without %reentrant, BEGIN uses yystart instead of yyg - */ - -void reset_parencount(yyscan_t yyscanner ); -void reset_parencount(yyscan_t yyscanner ) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - parencount = 0; - pbcpos = 0; - pbcpush('('); /* push '(' so the last pcbpop (parencount= -1) will succeed */ - c_prevword(); - BEGIN(paren); -} - -void reset_semicount(yyscan_t yyscanner ); -void reset_semicount(yyscan_t yyscanner ) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - pbcpos = 0; - BEGIN(semic); -} - -void reset_argcount(yyscan_t yyscanner ); -void reset_argcount(yyscan_t yyscanner ) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - parencount = 0; - pbcpos = 0; - pbcpush('('); /* push '(' so the last pcbpop (parencount= -1) will succeed */ - c_prevword(); - BEGIN(argg); -} - -/* used elsewhere, but some local vars */ -struct pval *ael2_parse(char *filename, int *errors) -{ - struct pval *pval; - struct parse_io *io; - char *buffer; - struct stat stats; - FILE *fin; - - /* extern int ael_yydebug; */ - - io = calloc(sizeof(struct parse_io),1); - /* reset the global counters */ - prev_word = 0; - my_lineno = 1; - include_stack_index=0; - my_col = 0; - /* ael_yydebug = 1; */ - ael_yylex_init(&io->scanner); - fin = fopen(filename,"r"); - if ( !fin ) { - ast_log(LOG_ERROR,"File %s could not be opened\n", filename); - *errors = 1; - return 0; - } - if (my_file) - free(my_file); - my_file = strdup(filename); - stat(filename, &stats); - buffer = (char*)malloc(stats.st_size+2); - if (fread(buffer, 1, stats.st_size, fin) != stats.st_size) { - ast_log(LOG_ERROR, "fread() failed: %s\n", strerror(errno)); - } - buffer[stats.st_size]=0; - fclose(fin); - - ael_yy_scan_string (buffer ,io->scanner); - ael_yyset_lineno(1 , io->scanner); - - /* ael_yyset_in (fin , io->scanner); OLD WAY */ - - ael_yyparse(io); - - - pval = io->pval; - *errors = io->syntax_error_count; - - ael_yylex_destroy(io->scanner); - free(buffer); - free(io); - - return pval; -} - -static void setup_filestack(char *fnamebuf2, int fnamebuf_siz, glob_t *globbuf, int globpos, yyscan_t yyscanner, int create) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - int error, i; - FILE *in1; - char fnamebuf[2048]; - - if (globbuf && globbuf->gl_pathv && globbuf->gl_pathc > 0) -#if defined(STANDALONE) || defined(LOW_MEMORY) || defined(STANDALONE_AEL) - strncpy(fnamebuf, globbuf->gl_pathv[globpos], fnamebuf_siz); -#else - ast_copy_string(fnamebuf, globbuf->gl_pathv[globpos], fnamebuf_siz); -#endif - else { - ast_log(LOG_ERROR,"Include file name not present!\n"); - return; - } - for (i=0; i<include_stack_index; i++) { - if ( !strcmp(fnamebuf,include_stack[i].fname )) { - ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Nice Try!!! But %s has already been included (perhaps by another file), and would cause an infinite loop of file inclusions!!! Include directive ignored\n", - my_file, my_lineno, my_col, fnamebuf); - break; - } - } - error = 1; - if (i == include_stack_index) - error = 0; /* we can use this file */ - if ( !error ) { /* valid file name */ - /* relative vs. absolute */ - if (fnamebuf[0] != '/') - snprintf(fnamebuf2, fnamebuf_siz, "%s/%s", ast_config_AST_CONFIG_DIR, fnamebuf); - else -#if defined(STANDALONE) || defined(LOW_MEMORY) || defined(STANDALONE_AEL) - strncpy(fnamebuf2, fnamebuf, fnamebuf_siz); -#else - ast_copy_string(fnamebuf2, fnamebuf, fnamebuf_siz); -#endif - in1 = fopen( fnamebuf2, "r" ); - - if ( ! in1 ) { - ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Couldn't find the include file: %s; ignoring the Include directive!\n", my_file, my_lineno, my_col, fnamebuf2); - } else { - char *buffer; - struct stat stats; - stat(fnamebuf2, &stats); - buffer = (char*)malloc(stats.st_size+1); - if (fread(buffer, 1, stats.st_size, in1) != stats.st_size) { - ast_log(LOG_ERROR, "fread() failed: %s\n", strerror(errno)); - } - buffer[stats.st_size] = 0; - ast_log(LOG_NOTICE," --Read in included file %s, %d chars\n",fnamebuf2, (int)stats.st_size); - fclose(in1); - if (include_stack[include_stack_index].fname) { - free(include_stack[include_stack_index].fname); - include_stack[include_stack_index].fname = 0; - } - include_stack[include_stack_index].fname = strdup(my_file); - include_stack[include_stack_index].lineno = my_lineno; - include_stack[include_stack_index].colno = my_col+yyleng; - if (my_file) - free(my_file); - my_file = strdup(fnamebuf2); - if (create) - include_stack[include_stack_index].globbuf = *globbuf; - - include_stack[include_stack_index].globbuf_pos = 0; - - include_stack[include_stack_index].bufstate = YY_CURRENT_BUFFER; - if (create) - include_stack_index++; - ael_yy_switch_to_buffer(ael_yy_scan_string (buffer ,yyscanner),yyscanner); - free(buffer); - my_lineno = 1; - my_col = 1; - BEGIN(INITIAL); - } - } -} - |