[asterisk-commits] murf: branch 1.4 r62913 - in /branches/1.4/pbx/ael/ael-test: ./ ael-test18/ a...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu May 3 07:41:53 MST 2007


Author: murf
Date: Thu May  3 09:41:53 2007
New Revision: 62913

URL: http://svn.digium.com/view/asterisk?view=rev&rev=62913
Log:
updated the ael regressions to match what's in trunk

Added:
    branches/1.4/pbx/ael/ael-test/ael-test19/
    branches/1.4/pbx/ael/ael-test/ael-test19/extensions.ael   (with props)
    branches/1.4/pbx/ael/ael-test/ael-test20/
    branches/1.4/pbx/ael/ael-test/ael-test20/extensions.ael   (with props)
    branches/1.4/pbx/ael/ael-test/ref.ael-test19   (with props)
    branches/1.4/pbx/ael/ael-test/ref.ael-test20   (with props)
Modified:
    branches/1.4/pbx/ael/ael-test/ael-test18/extensions.ael
    branches/1.4/pbx/ael/ael-test/ref.ael-test18

Modified: branches/1.4/pbx/ael/ael-test/ael-test18/extensions.ael
URL: http://svn.digium.com/view/asterisk/branches/1.4/pbx/ael/ael-test/ael-test18/extensions.ael?view=diff&rev=62913&r1=62912&r2=62913
==============================================================================
--- branches/1.4/pbx/ael/ael-test/ael-test18/extensions.ael (original)
+++ branches/1.4/pbx/ael/ael-test/ael-test18/extensions.ael Thu May  3 09:41:53 2007
@@ -1,8 +1,40 @@
-context interesting {
-        eswitches {
-                Realtime/default at extensions;
-         	IAX2/context@${CURSERVER};
-        }
-	13 => NoOp(LuckyNumber!);
+context default
+{
+
+706/3077610011 => {
+                 JabberStatus(asterisk|jmls at 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();
+         };
+
 }
 

Added: branches/1.4/pbx/ael/ael-test/ael-test19/extensions.ael
URL: http://svn.digium.com/view/asterisk/branches/1.4/pbx/ael/ael-test/ael-test19/extensions.ael?view=auto&rev=62913
==============================================================================
--- branches/1.4/pbx/ael/ael-test/ael-test19/extensions.ael (added)
+++ branches/1.4/pbx/ael/ael-test/ael-test19/extensions.ael Thu May  3 09:41:53 2007
@@ -1,0 +1,377 @@
+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;
+}

Propchange: branches/1.4/pbx/ael/ael-test/ael-test19/extensions.ael
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: branches/1.4/pbx/ael/ael-test/ael-test19/extensions.ael
------------------------------------------------------------------------------
    svn:keywords = Author Id Date Revision

Propchange: branches/1.4/pbx/ael/ael-test/ael-test19/extensions.ael
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: branches/1.4/pbx/ael/ael-test/ael-test20/extensions.ael
URL: http://svn.digium.com/view/asterisk/branches/1.4/pbx/ael/ael-test/ael-test20/extensions.ael?view=auto&rev=62913
==============================================================================
--- branches/1.4/pbx/ael/ael-test/ael-test20/extensions.ael (added)
+++ branches/1.4/pbx/ael/ael-test/ael-test20/extensions.ael Thu May  3 09:41:53 2007
@@ -1,0 +1,8 @@
+context interesting {
+        eswitches {
+                Realtime/default at extensions;
+         	IAX2/context@${CURSERVER};
+        }
+	13 => NoOp(LuckyNumber!);
+}
+

Propchange: branches/1.4/pbx/ael/ael-test/ael-test20/extensions.ael
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: branches/1.4/pbx/ael/ael-test/ael-test20/extensions.ael
------------------------------------------------------------------------------
    svn:keywords = Author Id Date Revision

Propchange: branches/1.4/pbx/ael/ael-test/ael-test20/extensions.ael
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: branches/1.4/pbx/ael/ael-test/ref.ael-test18
URL: http://svn.digium.com/view/asterisk/branches/1.4/pbx/ael/ael-test/ref.ael-test18?view=diff&rev=62913&r1=62912&r2=62913
==============================================================================
--- branches/1.4/pbx/ael/ael-test/ref.ael-test18 (original)
+++ branches/1.4/pbx/ael/ael-test/ref.ael-test18 Thu May  3 09:41:53 2007
@@ -2,11 +2,11 @@
 (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
+LOG: lev:2 file:pbx_ael.c  line:3970 func: pbx_load_module  Starting AEL load process.
+LOG: lev:2 file:pbx_ael.c  line:3977 func: pbx_load_module  AEL load process: calculated config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c  line:3985 func: pbx_load_module  AEL load process: parsed config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c  line:3988 func: pbx_load_module  AEL load process: checked config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c  line:3990 func: pbx_load_module  AEL load process: compiled config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c  line:3993 func: pbx_load_module  AEL load process: merged config file name './extensions.ael'.
+LOG: lev:2 file:pbx_ael.c  line:3996 func: pbx_load_module  AEL load process: verified config file name './extensions.ael'.
+LOG: lev:4 file:ael2_parse  line:483 func: main  1 contexts, 5 extensions, 25 priorities

Added: branches/1.4/pbx/ael/ael-test/ref.ael-test19
URL: http://svn.digium.com/view/asterisk/branches/1.4/pbx/ael/ael-test/ref.ael-test19?view=auto&rev=62913
==============================================================================
--- branches/1.4/pbx/ael/ael-test/ref.ael-test19 (added)
+++ branches/1.4/pbx/ael/ael-test/ref.ael-test19 Thu May  3 09:41:53 2007
@@ -1,0 +1,13 @@
+
+(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:2223 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!
+LOG: lev:3 file:pbx_ael.c  line:2320 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:2320 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:3943 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:512 func: main  0 contexts, 0 extensions, 0 priorities

Propchange: branches/1.4/pbx/ael/ael-test/ref.ael-test19
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: branches/1.4/pbx/ael/ael-test/ref.ael-test19
------------------------------------------------------------------------------
    svn:keywords = Author Id Date Revision

Propchange: branches/1.4/pbx/ael/ael-test/ref.ael-test19
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: branches/1.4/pbx/ael/ael-test/ref.ael-test20
URL: http://svn.digium.com/view/asterisk/branches/1.4/pbx/ael/ael-test/ref.ael-test20?view=auto&rev=62913
==============================================================================
--- branches/1.4/pbx/ael/ael-test/ref.ael-test20 (added)
+++ branches/1.4/pbx/ael/ael-test/ref.ael-test20 Thu May  3 09:41:53 2007
@@ -1,0 +1,12 @@
+
+(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

Propchange: branches/1.4/pbx/ael/ael-test/ref.ael-test20
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: branches/1.4/pbx/ael/ael-test/ref.ael-test20
------------------------------------------------------------------------------
    svn:keywords = Author Id Date Revision

Propchange: branches/1.4/pbx/ael/ael-test/ref.ael-test20
------------------------------------------------------------------------------
    svn:mime-type = text/plain



More information about the asterisk-commits mailing list