[asterisk-commits] mnick: branch mnick/gsoc2010 r595 - in /asterisk/team/mnick/gsoc2010/trunk/te...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jul 27 10:06:03 CDT 2010


Author: mnick
Date: Tue Jul 27 10:05:59 2010
New Revision: 595

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=595
Log:
improved, working version (tested on 1.6.2)

Modified:
    asterisk/team/mnick/gsoc2010/trunk/tests/one-step-parking/configs/extensions.conf
    asterisk/team/mnick/gsoc2010/trunk/tests/one-step-parking/configs/iax.conf
    asterisk/team/mnick/gsoc2010/trunk/tests/one-step-parking/configs2/extensions.conf
    asterisk/team/mnick/gsoc2010/trunk/tests/one-step-parking/configs2/iax.conf
    asterisk/team/mnick/gsoc2010/trunk/tests/one-step-parking/run-test

Modified: asterisk/team/mnick/gsoc2010/trunk/tests/one-step-parking/configs/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/mnick/gsoc2010/trunk/tests/one-step-parking/configs/extensions.conf?view=diff&rev=595&r1=594&r2=595
==============================================================================
--- asterisk/team/mnick/gsoc2010/trunk/tests/one-step-parking/configs/extensions.conf (original)
+++ asterisk/team/mnick/gsoc2010/trunk/tests/one-step-parking/configs/extensions.conf Tue Jul 27 10:05:59 2010
@@ -7,6 +7,7 @@
 exten => a_dials,n,NOOP(calling userA and bridge them to userB!)
 exten => a_dials,n,Dial(IAX2/userA at 127.0.0.1:4570/a_exten,10,kK)
 exten => a_dials,n,NOOP(Okay, userA should be parked now!)
+exten => a_dials,n,Hangup()
 
 exten => a_exten,1,Answer()
 exten => a_exten,n,NOOP(Hey, incoming call from userB)

Modified: asterisk/team/mnick/gsoc2010/trunk/tests/one-step-parking/configs/iax.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/mnick/gsoc2010/trunk/tests/one-step-parking/configs/iax.conf?view=diff&rev=595&r1=594&r2=595
==============================================================================
--- asterisk/team/mnick/gsoc2010/trunk/tests/one-step-parking/configs/iax.conf (original)
+++ asterisk/team/mnick/gsoc2010/trunk/tests/one-step-parking/configs/iax.conf Tue Jul 27 10:05:59 2010
@@ -4,6 +4,7 @@
 
 transfer=yes
 disallow=all
+allow=alaw
 allow=ulaw
 jitterbuffer=no
 forcejitterbuffer=no

Modified: asterisk/team/mnick/gsoc2010/trunk/tests/one-step-parking/configs2/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/mnick/gsoc2010/trunk/tests/one-step-parking/configs2/extensions.conf?view=diff&rev=595&r1=594&r2=595
==============================================================================
--- asterisk/team/mnick/gsoc2010/trunk/tests/one-step-parking/configs2/extensions.conf (original)
+++ asterisk/team/mnick/gsoc2010/trunk/tests/one-step-parking/configs2/extensions.conf Tue Jul 27 10:05:59 2010
@@ -13,31 +13,27 @@
 exten => b_exten,n,SET(GLOBAL(lastaction)=park)
 exten => b_exten,n,SendDTMF(*)
 exten => b_exten,n,Wait(2)
+exten => b_exten,n,Hangup()
 
 
-exten => h,1,NOOP(got Hangup. Reason: '(${GLOBAL(lastaction)})'- what to do now ?!)
-exten => h,n,GotoIF($["${GLOBAL(lastaction)}"="park"]?retrieve)
-exten => h,n,GotoIF($["${GLOBAL(lastaction)}"="success"]?success:failed)
+exten => h,1,GotoIF($["${GLOBAL(lastaction)}"="park"]?retrieve)
+exten => h,n,Hangup()
 exten => h,n(retrieve),NOOP(Got Hangup due to successfull parking -> call 701 in order to retrieve userA)
+exten => h,n,SET(GLOBAL(lastaction)=initCall)
 exten => h,n,AGI(agi://127.0.0.1:4600) ; initiate call to retrieve userA
-exten => h,n,hangup()
-
-exten => h,n(success),NOOP(TEST PASSED)
-exten => h,n,AGI(agi://127.0.0.1:4574) ; test passed
 exten => h,n,Hangup()
 
-exten => h,n(failed),NOOP(hanging up the call -> test failed!)
-exten => h,n,Hangup()
-
-
-exten => retrieve_A,1,NOOP(okay, I should now be connected to userA -> trying to sync)
+exten => retrieve_A,1,Answer()
+exten => retrieve_A,n,NOOP(okay, I should now be connected to userA -> trying to sync)
 exten => retrieve_A,n(sync),Wait(1)
 exten => retrieve_A,n,Read(sync,,3,,,8) ;wait more than 5 but less than 10 seconds
 exten => retrieve_A,n,GotoIf($["${sync}"="999"]?DTMFpass:DTMFfail)
 exten => retrieve_A,n(DTMFpass),NOOP(read '${sync}' and expected '999' - OK)
 exten => retrieve_A,n,NOOP(TEST PASSED!)
 exten => retrieve_A,n,Set(GLOBAL(lastaction)=success)
+exten => retrieve_A,n,AGI(agi://127.0.0.1:4574)
 exten => retrieve_A,n,Hangup()
+
 exten => retrieve_A,n(DTMFfail),NOOP(read '${sync}' and exptected '999' - FAILURE)
 exten => retrieve_A,n,NOOP(trying to sync again!)
 exten => retrieve_A,n,Goto(sync)

Modified: asterisk/team/mnick/gsoc2010/trunk/tests/one-step-parking/configs2/iax.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/mnick/gsoc2010/trunk/tests/one-step-parking/configs2/iax.conf?view=diff&rev=595&r1=594&r2=595
==============================================================================
--- asterisk/team/mnick/gsoc2010/trunk/tests/one-step-parking/configs2/iax.conf (original)
+++ asterisk/team/mnick/gsoc2010/trunk/tests/one-step-parking/configs2/iax.conf Tue Jul 27 10:05:59 2010
@@ -4,6 +4,7 @@
 bindaddr=127.0.0.1
 transfer=yes
 disallow=all
+allow=alaw
 allow=ulaw
 jitterbuffer=no
 forcejitterbuffer=no

Modified: asterisk/team/mnick/gsoc2010/trunk/tests/one-step-parking/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/mnick/gsoc2010/trunk/tests/one-step-parking/run-test?view=diff&rev=595&r1=594&r2=595
==============================================================================
--- asterisk/team/mnick/gsoc2010/trunk/tests/one-step-parking/run-test (original)
+++ asterisk/team/mnick/gsoc2010/trunk/tests/one-step-parking/run-test Tue Jul 27 10:05:59 2010
@@ -60,12 +60,20 @@
             self.asterisk2.cli_exec("originate IAX2/userA at 127.0.0.1:4570/701 extension retrieve_A at parking")
         else:
             self.asterisk2.cli_exec("channel originate IAX2/userA at 127.0.0.1:4570/701 extension retrieve_A at parking")
+        return self.finish_agi(agi)
 
    # This gets invoked by the dialplan when test succeeds.
     def get_result_b(self, agi):
         self.log_last_step("got AGI connection from userB -> test successful")
         self.passed = True
-        self.read_result();
+        reactor.callLater(2,self.read_result)
+        return self.finish_agi(agi)
+
+   # Finish the AGI connection
+    def finish_agi(self, agi):
+        sequence = fastagi.InSequence()
+        sequence.append(agi.finish)
+        return sequence()
 
     def read_result(self):
         self.log_last_step("Reading results")




More information about the asterisk-commits mailing list