[asterisk-commits] tilghman: testsuite/asterisk/trunk r1043 - in /asterisk/trunk: lib/sh/ tests/...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Dec 3 01:57:52 CST 2010


Author: tilghman
Date: Fri Dec  3 01:57:46 2010
New Revision: 1043

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=1043
Log:
Add test to verify AGI exit status values

Added:
    asterisk/trunk/tests/agi/
    asterisk/trunk/tests/agi/exit_status/   (props changed)
      - copied from r1003, asterisk/trunk/tests/pbx/call-files2/
    asterisk/trunk/tests/agi/exit_status/userA/agi-bin/
    asterisk/trunk/tests/agi/exit_status/userA/agi-bin/badinterpreter.agi   (with props)
    asterisk/trunk/tests/agi/exit_status/userA/agi-bin/badinterpreter2.agi   (with props)
    asterisk/trunk/tests/agi/exit_status/userA/agi-bin/badinterpreter3.agi   (with props)
    asterisk/trunk/tests/agi/exit_status/userA/agi-bin/donothing.agi   (with props)
    asterisk/trunk/tests/agi/exit_status/userA/agi-bin/executing.agi   (with props)
    asterisk/trunk/tests/agi/exit_status/userA/agi-bin/waiting.agi   (with props)
Removed:
    asterisk/trunk/tests/agi/exit_status/userA/iax.conf
    asterisk/trunk/tests/agi/exit_status/userB/
Modified:
    asterisk/trunk/lib/sh/library.sh
    asterisk/trunk/tests/agi/exit_status/run-test
    asterisk/trunk/tests/agi/exit_status/test-config.yaml
    asterisk/trunk/tests/agi/exit_status/userA/extensions.conf
    asterisk/trunk/tests/tests.yaml

Modified: asterisk/trunk/lib/sh/library.sh
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/lib/sh/library.sh?view=diff&rev=1043&r1=1042&r2=1043
==============================================================================
--- asterisk/trunk/lib/sh/library.sh (original)
+++ asterisk/trunk/lib/sh/library.sh Fri Dec  3 01:57:46 2010
@@ -5,6 +5,12 @@
 testdir=${0%%run-test}
 ASTERISK=/usr/sbin/asterisk
 debug=0
+gotversion=0
+
+usage() {
+	echo "Usage: $0 -v asterisk-<version> [-d]"
+	exit 1
+}
 
 case `uname -s` in
 	solaris*|sunos*)
@@ -17,24 +23,45 @@
 		;;
 esac
 
-case $2 in
-	*-1.4*)
-		ORIGINATE='originate'
-		CSC_HEADERS=3
-		;;
-	*-1.6.2*|*-1.4*)
-		ORIGINATE='originate'
-		CSC_HEADERS=4
-		;;
-	"")
-		echo "Usage: $0 -v asterisk-<version>"
-		exit 1
-		;;
-	*)
-		ORIGINATE='channel originate'
-		CSC_HEADERS=4
-		;;
-esac
+while test "$1" != ""; do
+	case $1 in
+		-v)
+			shift
+			case $1 in
+				*-1.4*)
+					ORIGINATE='originate'
+					CSC_HEADERS=3
+					AGI_NOTFOUND=FAILURE
+					;;
+				*-1.6.2*)
+					ORIGINATE='originate'
+					CSC_HEADERS=4
+					AGI_NOTFOUND=NOTFOUND
+					;;
+				"")
+					usage
+					;;
+				*)
+					ORIGINATE='channel originate'
+					CSC_HEADERS=4
+					AGI_NOTFOUND=NOTFOUND
+					;;
+			esac
+			gotversion=1
+			;;
+		-d)
+			let debug++
+			;;
+		*)
+			usage
+			;;
+	esac
+	shift
+done
+
+if test "$gotversion" = "0"; then
+	usage
+fi
 
 #
 # initialize():
@@ -71,7 +98,7 @@
 			dst=$conf/`basename $i`
 			install -m 644 $i $dst
 		done
-		( echo "[directories]"; echo "astetcdir => $conf"; echo "astrundir => $conf"; echo "astlogdir => $testdir/$user"; echo "astspooldir => $conf/spool" ; echo "[options]"; echo "verbose = 10"; echo "documentation_language = en_US" ) > $conf/asterisk.conf
+		( echo "[directories]"; echo "astetcdir => $conf"; echo "astrundir => $conf"; echo "astlogdir => $testdir/$user"; echo "astspooldir => $conf/spool" ; echo "astagidir => $testdir/$user/agi-bin" ; echo "[options]"; echo "verbose = 10"; echo "documentation_language = en_US" ) > $conf/asterisk.conf
 		( echo "noload => pbx_lua.so" ; echo "noload => pbx_ael.so" ) >> $conf/modules.conf
 		mkdir -p $conf/spool/outgoing
 
@@ -82,10 +109,12 @@
 			exit 1
 		fi
 		echo " >>> Starting Asterisk for $user"
+		if test $debug -gt 0; then
+			debug_flags="-vvvddd"
+		fi
 		$ASTERISK -g -C $conf/asterisk.conf
-		sleep 1
 		# Asterisk is running, right?
-		if $ASTERISK -C $conf/asterisk.conf -rx "core waitfullybooted" >/dev/null 2>&1; then :; else
+		if $ASTERISK $debug_flags -C $conf/asterisk.conf -rx "core waitfullybooted" >/dev/null 2>&1; then :; else
 			echo " *** Unable to start asterisk for $user"
 			cleanup
 			exit 1
@@ -107,10 +136,13 @@
 	local avals=""
 	local bvals=""
 
+	echo -n "Shutting test instances down"
+
 	for u in $lib_SYSDIRS; do
 		eval "conf=\${${u}_tmpdir}"
 		if test "x$conf" = "x"; then : ; else
 			$ASTERISK -C $conf/asterisk.conf -rx "core stop when convenient" >/dev/null 2>&1 &
+			echo -n " ."
 		fi
 	done
 	sleep 2
@@ -119,6 +151,7 @@
 		if test "x$conf" = "x"; then : ; else
 			$ASTERISK -C $conf/asterisk.conf -rx "core stop now" >/dev/null 2>&1
 			let $u=$?
+			echo -n " ."
 		fi
 	done
 	avals=""
@@ -128,13 +161,31 @@
 		eval "bvals=${bvals}\${$u}"
 	done
 	if test "$avals" != "$bvals"; then
-		$KILLALL asterisk >/dev/null 2>&1
+		sleep 2
 		for u in $lib_SYSDIRS; do
 			eval "conf=\${${u}_tmpdir}"
-			# This is a "nonsense" command.  If Asterisk is not running, it will exit non-zero.
-			$ASTERISK -C $conf/asterisk.conf -rx "core set verbose atleast 1" >/dev/null 2>&1
-			let $u=$?
-		done
+			if test "x$conf" = "x"; then : ; else
+				$ASTERISK -C $conf/asterisk.conf -rx "core stop now" >/dev/null 2>&1
+				let $u=$?
+				echo -n " ."
+			fi
+		done
+		avals=""
+		bvals=""
+		for u in $lib_SYSDIRS; do
+			avals="1$avals"
+			eval "bvals=${bvals}\${$u}"
+		done
+		if test "$avals" != "$bvals"; then
+			$KILLALL asterisk >/dev/null 2>&1
+			for u in $lib_SYSDIRS; do
+				eval "conf=\${${u}_tmpdir}"
+				# This is a "nonsense" command.  If Asterisk is not running, it will exit non-zero.
+				$ASTERISK -C $conf/asterisk.conf -rx "core set verbose atleast 1" >/dev/null 2>&1
+				let $u=$?
+				echo -n " ."
+			done
+		fi
 	fi
 	avals=""
 	bvals=""
@@ -143,12 +194,22 @@
 		eval "bvals=${bvals}\${$u}"
 	done
 	if test "$avals" != "$bvals"; then
+		if test $debug -gt 0; then
+			echo -n " A:'$avals' B:'$bvals'"
+		fi
 		$KILLALL -9 asterisk >/dev/null 2>&1
-	fi
+		echo -n " (forcefully) ."
+	fi
+
+	echo " done!"
+
+	echo -n "Removing temporary directories"
 
 	for u in $lib_SYSDIRS; do
 		eval "rm -rf \${${u}_tmpdir}"
-	done
+		echo -n " ."
+	done
+	echo " done!"
 
 	set -e
 }

Propchange: asterisk/trunk/tests/agi/exit_status/
------------------------------------------------------------------------------
    svn:mergeinfo = 

Modified: asterisk/trunk/tests/agi/exit_status/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/agi/exit_status/run-test?view=diff&rev=1043&r1=1003&r2=1043
==============================================================================
--- asterisk/trunk/tests/agi/exit_status/run-test (original)
+++ asterisk/trunk/tests/agi/exit_status/run-test Fri Dec  3 01:57:46 2010
@@ -2,28 +2,13 @@
 
 . lib/sh/library.sh
 
-echo " >>> Starting spoolfile test"
+echo " >>> Starting AGI exit status test"
 
-create_spool() {
-	( echo "Channel: $1"
-	  echo "Context: spoolfile"
-	  echo "Extension: $2"
-	  echo "Priority: 1"
-	  echo "MaxRetries: 3"
-	  echo "WaitTime: 3"
-	  echo "RetryTime: 5"
-	  echo "Archive: yes"
-	)
-}
+initialize userA
 
-initialize userA userB
+mkdir -p $testdir/userA/cdr-csv
 
-for user in userA userB; do
-	# Clean logger output file, when we're testing
-	if test "$debug" = "1"; then
-		rm -f $testdir/$user/messages
-	fi
-
+for user in userA; do
 	# Shortcut for referral within this loop only
 	eval "conf=\${${user}_tmpdir}"
 	mkdir -p $conf/spool/outgoing
@@ -34,44 +19,148 @@
 	fi
 done
 
-echo " >>> Spooling first file"
-create_spool "Local/noanswer at spoolfile" "donothing" > $userA_tmpdir/spoolfile
-mv -f $userA_tmpdir/spoolfile $userA_tmpdir/spool/outgoing/
-sleep 1
-if test "$debug" = "1"; then
-	for user in userA userB; do
-		echo ">>>>> $user >>>>>"
-		eval "$ASTERISK -C \${${user}_tmpdir}/asterisk.conf -rx \"core show channels\""
-		echo "<<<<< $user <<<<<"
-	done
+failure() {
+	echo " . . . . . FAIL"
+}
+
+success() {
+	echo " . . . . . OK"
+}
+
+echo -n " >>> Non-existent AGI"
+rm -f $testdir/userA/cdr-csv/Master.csv ; touch $testdir/userA/cdr-csv/Master.csv
+
+$ASTERISK -C $userA_tmpdir/asterisk.conf -rx "$ORIGINATE Local/02 at agi_exit_status extension doesnotexist at agi_exit_status"
+
+sleep 3
+
+if test `grep -c $AGI_NOTFOUND $testdir/userA/cdr-csv/Master.csv` = 0; then
+	failure
+	if test $debug -gt 0; then
+		echo " *** Non-existent test failed: did not find $AGI_NOTFOUND in $testdir/userA/cdr-csv/Master.csv"
+	fi
+	cleanup
+	exit 1
+else
+	success
 fi
-verify_call $userA_tmpdir 3
 
-# Enough time for 3 retries
-sleep 18
+echo -n " >>> Non-existent AGI interpreter"
+rm -f $testdir/userA/cdr-csv/Master.csv ; touch $testdir/userA/cdr-csv/Master.csv
 
-echo " >>> Spool files should be expired by now"
-verify_call $userA_tmpdir 0
+$ASTERISK -C $userA_tmpdir/asterisk.conf -rx "$ORIGINATE Local/10 at agi_exit_status extension badinterpreter at agi_exit_status"
 
-echo " >>> Spooling second file"
-create_spool "Local/answer at spoolfile" "donothing" > $userA_tmpdir/spoolfile
-mv -f $userA_tmpdir/spoolfile $userA_tmpdir/spool/outgoing/
-sleep 1
-verify_call $userA_tmpdir 3
+sleep 2
 
-sleep 5
+if test `grep -c FAILURE $testdir/userA/cdr-csv/Master.csv` = 0; then
+	failure
+	echo " *** Non-existent test failed: did not find FAILURE in $testdir/userA/cdr-csv/Master.csv"
+	cleanup
+	exit 1
+else
+	success
+fi
 
-# If grep finds nothing, it exits abnormally.  We therefore need to do this
-# before cleanup, or our actual success will be detected as failure.
-count=`grep -c 'No such file or directory, deleting' $testdir/userA/messages`
+echo -n " >>> Non-executable AGI script"
+rm -f $testdir/userA/cdr-csv/Master.csv ; touch $testdir/userA/cdr-csv/Master.csv
+
+$ASTERISK -C $userA_tmpdir/asterisk.conf -rx "$ORIGINATE Local/10 at agi_exit_status extension badinterpreter2 at agi_exit_status"
+
+sleep 2
+
+if test `grep -c FAILURE $testdir/userA/cdr-csv/Master.csv` = 0; then
+	failure
+	echo " *** Non-existent test failed: did not find FAILURE in $testdir/userA/cdr-csv/Master.csv"
+	cleanup
+	exit 1
+else
+	success
+fi
+
+echo -n " >>> Non-executable AGI interpreter"
+
+# Create a "shell" interpreter which is not executable
+for sh in /bin/true /usr/bin/true /usr/local/bin/true; do
+	if test -f $sh; then
+		cp -f $sh /tmp/bash
+		chmod 600 /tmp/bash
+		break
+	fi
+done
+
+# Did we succeed?
+if test -e /tmp/bash; then :; else
+	failure
+	echo "Unable to create non-executable file for AGI test"
+	cleanup
+	exit 1
+fi
+
+rm -f $testdir/userA/cdr-csv/Master.csv ; touch $testdir/userA/cdr-csv/Master.csv
+
+$ASTERISK -C $userA_tmpdir/asterisk.conf -rx "$ORIGINATE Local/10 at agi_exit_status extension badinterpreter3 at agi_exit_status"
+
+sleep 2
+
+if test `grep -c FAILURE $testdir/userA/cdr-csv/Master.csv` = 0; then
+	failure
+	echo " *** Non-existent test failed: did not find FAILURE in $testdir/userA/cdr-csv/Master.csv"
+	cleanup
+	rm -f /tmp/bash
+	exit 1
+else
+	success
+fi
+
+echo -n " >>> AGI which will receive hangup while waiting for a command"
+rm -f $testdir/userA/cdr-csv/Master.csv ; touch $testdir/userA/cdr-csv/Master.csv
+$ASTERISK -C $userA_tmpdir/asterisk.conf -rx "$ORIGINATE Local/01 at agi_exit_status extension waiting at agi_exit_status"
+
+sleep 2
+
+if test `grep -c HANGUP $testdir/userA/cdr-csv/Master.csv` = 0; then
+	failure
+	echo " *** Command wait test failed: did not find HANGUP in $testdir/userA/cdr-csv/Master.csv"
+	cleanup
+	exit 1
+else
+	success
+fi
+
+echo -n " >>> AGI which will receive hangup while executing a command"
+rm -f $testdir/userA/cdr-csv/Master.csv ; touch $testdir/userA/cdr-csv/Master.csv
+$ASTERISK -C $userA_tmpdir/asterisk.conf -rx "$ORIGINATE Local/01 at agi_exit_status extension executing at agi_exit_status"
+
+sleep 2
+
+# This is the result which is disputed in issue 17393
+if test `grep -c FAILURE $testdir/userA/cdr-csv/Master.csv` = 0; then
+	failure
+	echo " *** Command execute test failed: did not find FAILURE in $testdir/userA/cdr-csv/Master.csv"
+	cleanup
+	exit 1
+else
+	success
+fi
+
+echo -n " >>> AGI which should exit normally"
+rm -f $testdir/userA/cdr-csv/Master.csv ; touch $testdir/userA/cdr-csv/Master.csv
+$ASTERISK -C $userA_tmpdir/asterisk.conf -rx "$ORIGINATE Local/01 at agi_exit_status extension donothing at agi_exit_status"
+
+sleep 2
+
+if test `grep -c SUCCESS $testdir/userA/cdr-csv/Master.csv` = 0; then
+	failure
+	echo " *** Do nothing test failed"
+	cleanup
+	exit 1
+else
+	success
+fi
+
+echo " *** All tests were successful"
 
 cleanup
 
-if test "$count" = "0"; then
-	echo " *** Success!"
-	exit 0
-else
-	echo " *** Failed:  found the error message $count times"
-	exit 1
-fi
+exit 0
 

Modified: asterisk/trunk/tests/agi/exit_status/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/agi/exit_status/test-config.yaml?view=diff&rev=1043&r1=1003&r2=1043
==============================================================================
--- asterisk/trunk/tests/agi/exit_status/test-config.yaml (original)
+++ asterisk/trunk/tests/agi/exit_status/test-config.yaml Fri Dec  3 01:57:46 2010
@@ -1,7 +1,7 @@
 testinfo:
-    summary:     'Test Call Spools'
+    summary:     'Test AGI exit status'
     description: |
-        'This test verifies that calls queued via the spooler do not cause warning messages about a file not existing.'
+        'This test verifies that the AGI application returns the correct exit status for each of several scenarios'
 
 properties:
-    minversion: '1.8'
+    minversion: '1.4'

Added: asterisk/trunk/tests/agi/exit_status/userA/agi-bin/badinterpreter.agi
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/agi/exit_status/userA/agi-bin/badinterpreter.agi?view=auto&rev=1043
==============================================================================
--- asterisk/trunk/tests/agi/exit_status/userA/agi-bin/badinterpreter.agi (added)
+++ asterisk/trunk/tests/agi/exit_status/userA/agi-bin/badinterpreter.agi Fri Dec  3 01:57:46 2010
@@ -1,0 +1,4 @@
+#!/bin/this-path-does-not-exist
+
+exit 0
+

Propchange: asterisk/trunk/tests/agi/exit_status/userA/agi-bin/badinterpreter.agi
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/agi/exit_status/userA/agi-bin/badinterpreter.agi
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision Yoyo

Propchange: asterisk/trunk/tests/agi/exit_status/userA/agi-bin/badinterpreter.agi
------------------------------------------------------------------------------
    svn:mergeinfo = 

Propchange: asterisk/trunk/tests/agi/exit_status/userA/agi-bin/badinterpreter.agi
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/agi/exit_status/userA/agi-bin/badinterpreter2.agi
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/agi/exit_status/userA/agi-bin/badinterpreter2.agi?view=auto&rev=1043
==============================================================================
--- asterisk/trunk/tests/agi/exit_status/userA/agi-bin/badinterpreter2.agi (added)
+++ asterisk/trunk/tests/agi/exit_status/userA/agi-bin/badinterpreter2.agi Fri Dec  3 01:57:46 2010
@@ -1,0 +1,5 @@
+#!/bin/bash
+
+# This script should remain non-executable.
+exit 0
+

Propchange: asterisk/trunk/tests/agi/exit_status/userA/agi-bin/badinterpreter2.agi
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/agi/exit_status/userA/agi-bin/badinterpreter2.agi
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision Yoyo

Propchange: asterisk/trunk/tests/agi/exit_status/userA/agi-bin/badinterpreter2.agi
------------------------------------------------------------------------------
    svn:mergeinfo = 

Propchange: asterisk/trunk/tests/agi/exit_status/userA/agi-bin/badinterpreter2.agi
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/agi/exit_status/userA/agi-bin/badinterpreter3.agi
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/agi/exit_status/userA/agi-bin/badinterpreter3.agi?view=auto&rev=1043
==============================================================================
--- asterisk/trunk/tests/agi/exit_status/userA/agi-bin/badinterpreter3.agi (added)
+++ asterisk/trunk/tests/agi/exit_status/userA/agi-bin/badinterpreter3.agi Fri Dec  3 01:57:46 2010
@@ -1,0 +1,5 @@
+#!/tmp/bash
+
+# The above interpreter should be non-executable.
+exit 0
+

Propchange: asterisk/trunk/tests/agi/exit_status/userA/agi-bin/badinterpreter3.agi
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/agi/exit_status/userA/agi-bin/badinterpreter3.agi
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision Yoyo

Propchange: asterisk/trunk/tests/agi/exit_status/userA/agi-bin/badinterpreter3.agi
------------------------------------------------------------------------------
    svn:mergeinfo = 

Propchange: asterisk/trunk/tests/agi/exit_status/userA/agi-bin/badinterpreter3.agi
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/agi/exit_status/userA/agi-bin/donothing.agi
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/agi/exit_status/userA/agi-bin/donothing.agi?view=auto&rev=1043
==============================================================================
--- asterisk/trunk/tests/agi/exit_status/userA/agi-bin/donothing.agi (added)
+++ asterisk/trunk/tests/agi/exit_status/userA/agi-bin/donothing.agi Fri Dec  3 01:57:46 2010
@@ -1,0 +1,4 @@
+#!/usr/bin/env bash
+
+exit 0
+

Propchange: asterisk/trunk/tests/agi/exit_status/userA/agi-bin/donothing.agi
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/agi/exit_status/userA/agi-bin/donothing.agi
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision Yoyo

Propchange: asterisk/trunk/tests/agi/exit_status/userA/agi-bin/donothing.agi
------------------------------------------------------------------------------
    svn:mergeinfo = 

Propchange: asterisk/trunk/tests/agi/exit_status/userA/agi-bin/donothing.agi
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/agi/exit_status/userA/agi-bin/executing.agi
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/agi/exit_status/userA/agi-bin/executing.agi?view=auto&rev=1043
==============================================================================
--- asterisk/trunk/tests/agi/exit_status/userA/agi-bin/executing.agi (added)
+++ asterisk/trunk/tests/agi/exit_status/userA/agi-bin/executing.agi Fri Dec  3 01:57:46 2010
@@ -1,0 +1,6 @@
+#!/usr/bin/env bash
+
+echo "STREAM FILE tt-weasels"
+
+exit 1
+

Propchange: asterisk/trunk/tests/agi/exit_status/userA/agi-bin/executing.agi
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/agi/exit_status/userA/agi-bin/executing.agi
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision Yoyo

Propchange: asterisk/trunk/tests/agi/exit_status/userA/agi-bin/executing.agi
------------------------------------------------------------------------------
    svn:mergeinfo = 

Propchange: asterisk/trunk/tests/agi/exit_status/userA/agi-bin/executing.agi
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/agi/exit_status/userA/agi-bin/waiting.agi
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/agi/exit_status/userA/agi-bin/waiting.agi?view=auto&rev=1043
==============================================================================
--- asterisk/trunk/tests/agi/exit_status/userA/agi-bin/waiting.agi (added)
+++ asterisk/trunk/tests/agi/exit_status/userA/agi-bin/waiting.agi Fri Dec  3 01:57:46 2010
@@ -1,0 +1,6 @@
+#!/usr/bin/env bash
+
+sleep 30
+
+exit 0
+

Propchange: asterisk/trunk/tests/agi/exit_status/userA/agi-bin/waiting.agi
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/agi/exit_status/userA/agi-bin/waiting.agi
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision Yoyo

Propchange: asterisk/trunk/tests/agi/exit_status/userA/agi-bin/waiting.agi
------------------------------------------------------------------------------
    svn:mergeinfo = 

Propchange: asterisk/trunk/tests/agi/exit_status/userA/agi-bin/waiting.agi
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: asterisk/trunk/tests/agi/exit_status/userA/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/agi/exit_status/userA/extensions.conf?view=diff&rev=1043&r1=1003&r2=1043
==============================================================================
--- asterisk/trunk/tests/agi/exit_status/userA/extensions.conf (original)
+++ asterisk/trunk/tests/agi/exit_status/userA/extensions.conf Fri Dec  3 01:57:46 2010
@@ -3,12 +3,38 @@
 writeprotect=no
 lastaction=""
 
-[spoolfile]
-; User A starts out by calling user B, with inband DTMF activated for transfer
+[agi_exit_status]
+exten => _XX,1,Answer
+exten => _XX,n,Wait(${EXTEN})
+exten => _XX,n,Hangup
+
+exten => doesnotexist,1,Answer
+exten => doesnotexist,n,AGI(blah-blah-blah-this-does-not-exist)
+exten => doesnotexist,n,Set(CDR(userfield)=${AGISTATUS})
+
+exten => badinterpreter,1,Answer
+exten => badinterpreter,n,AGI(${EXTEN}.agi)
+exten => badinterpreter,n,Set(CDR(userfield)=${AGISTATUS})
+
+exten => badinterpreter2,1,Answer
+exten => badinterpreter2,n,AGI(${EXTEN}.agi)
+exten => badinterpreter2,n,Set(CDR(userfield)=${AGISTATUS})
+
+exten => badinterpreter3,1,Answer
+exten => badinterpreter3,n,AGI(${EXTEN}.agi)
+exten => badinterpreter3,n,Set(CDR(userfield)=${AGISTATUS})
+
+exten => waiting,1,Answer
+exten => waiting,n,AGI(${EXTEN}.agi)
+exten => waiting,n,Set(CDR(userfield)=${AGISTATUS})
+
+exten => executing,1,Answer
+exten => executing,n,AGI(${EXTEN}.agi)
+exten => executing,n,Set(CDR(userfield)=${AGISTATUS})
+
 exten => donothing,1,Answer
-exten => donothing,n,Wait(1)
-exten => donothing,n,Hangup
+exten => donothing,n,AGI(${EXTEN}.agi)
+exten => donothing,n,Set(CDR(userfield)=${AGISTATUS})
 
-exten => answer,1,Dial(IAX2/userb/${EXTEN}@spoolfile)
-exten => noanswer,1,Dial(IAX2/userb/${EXTEN}@spoolfile)
+exten => h,1,Set(CDR(userfield)=${AGISTATUS})
 

Modified: asterisk/trunk/tests/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/tests.yaml?view=diff&rev=1043&r1=1042&r2=1043
==============================================================================
--- asterisk/trunk/tests/tests.yaml (original)
+++ asterisk/trunk/tests/tests.yaml Fri Dec  3 01:57:46 2010
@@ -42,5 +42,6 @@
     #- dir: 'chanspy'
     - dir: 'queues'
     - dir: 'fastagi'
+    - dir: 'agi'
     - dir: 'pbx'
     - dir: 'fax'




More information about the asterisk-commits mailing list