[asterisk-commits] mmichelson: branch mmichelson/srv_sip_outbound r212 - in /asterisk/team/mmich...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Apr 6 17:02:38 CDT 2010


Author: mmichelson
Date: Tue Apr  6 17:02:36 2010
New Revision: 212

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=212
Log:
Adjust stuff that needed to be adjusted.

Tests pass after this plus some changes to chan_sip. Expect
code reviews to be uploaded soonly.


Modified:
    asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/configs/extensions.conf
    asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/configs/sip.conf
    asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/sipp/uac1.xml
    asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/sipp/uac2.xml
    asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/sipp/uac3.xml
    asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/sipp/uac4.xml
    asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/sipp/uac5.xml
    asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/sipp/uac6.xml
    asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/test.lua

Modified: asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/configs/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/configs/extensions.conf?view=diff&rev=212&r1=211&r2=212
==============================================================================
--- asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/configs/extensions.conf (original)
+++ asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/configs/extensions.conf Tue Apr  6 17:02:36 2010
@@ -2,32 +2,32 @@
 
 ;Base line.
 ;Result: Use sip.conf info
-exten => test1,1,Dial(SIP/peer,,M(readdtmf),S(1))
+exten => test1,1,Dial(SIP/peer,,M(readdtmf))
 exten => test1,n,Hangup
 
 ;Basic change to outbound. Should dial to explicit host:port
 ;Result: Use host in dialstring
-exten => test2,1,Dial(SIP/peer//127.0.0.1:5062,,M(readdtmf),S(1))
+exten => test2,1,Dial(SIP/peer//127.0.0.1:5062,,M(readdtmf))
 exten => test2,n,Hangup
 
 ;Adding user portion should not affect routing
 ;Result: Use host in dialstring
-exten => test3,1,Dial(SIP/1000 at peer//127.0.0.1:5062,,M(readdtmf),S(1))
+exten => test3,1,Dial(SIP/1000 at peer//127.0.0.1:5062,,M(readdtmf))
 exten => test3,n,Hangup
 
 ;Neither should adding extension between peer and host
 ;Result: Use host in dialstring
-exten => test4,1,Dial(SIP/peer/1000/127.0.0.1:5062,,M(readdtmf),S(1))
+exten => test4,1,Dial(SIP/peer/1000/127.0.0.1:5062,,M(readdtmf))
 exten => test4,n,Hangup
 
 ;Neither should a conflict in which extension to use
 ;Result: Use host in dialstring
-exten => test5,1,Dial(SIP/1000 at peer/1000/127.0.0.1:5062,,M(readdtmf),S(1))
+exten => test5,1,Dial(SIP/1000 at peer/1000/127.0.0.1:5062,,M(readdtmf))
 exten => test5,n,Hangup
 
 ;This one has the wrong number of slashes before the host
 ;Result: Use sip.conf info
-exten => test6,1,Dial(SIP/1000 at peer/127.0.0.1:5062,,M(readdtmf),S(1))
+exten => test6,1,Dial(SIP/1000 at peer/127.0.0.1:5062,,M(readdtmf))
 exten => test6,n,Hangup
 
 [macro-readdtmf]

Modified: asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/configs/sip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/configs/sip.conf?view=diff&rev=212&r1=211&r2=212
==============================================================================
--- asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/configs/sip.conf (original)
+++ asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/configs/sip.conf Tue Apr  6 17:02:36 2010
@@ -4,6 +4,7 @@
 ;This is the peer dialed for
 ;all outbound calls
 [peer]
+type=friend
 dtmfmode=rfc2833
 host=127.0.0.1
 port=5061
@@ -11,5 +12,7 @@
 ;This is the caller who initiates calls to 'peer'
 ;In other words, all inbound calls come from this guy
 [caller]
+type=peer
 host=127.0.0.1
-port=6000
+port=18567
+context=test_context

Modified: asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/sipp/uac1.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/sipp/uac1.xml?view=diff&rev=212&r1=211&r2=212
==============================================================================
--- asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/sipp/uac1.xml (original)
+++ asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/sipp/uac1.xml Tue Apr  6 17:02:36 2010
@@ -85,7 +85,7 @@
 
   <!-- This delay can be customized by the -d command-line option       -->
   <!-- or by adding a 'milliseconds = "value"' option here.             -->
-  <pause milliseconds="5000"/>
+  <pause milliseconds="1000"/>
 
   <!-- The 'crlf' option inserts a blank line in the statistics report. -->
   <send retrans="500">

Modified: asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/sipp/uac2.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/sipp/uac2.xml?view=diff&rev=212&r1=211&r2=212
==============================================================================
--- asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/sipp/uac2.xml (original)
+++ asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/sipp/uac2.xml Tue Apr  6 17:02:36 2010
@@ -85,7 +85,7 @@
 
   <!-- This delay can be customized by the -d command-line option       -->
   <!-- or by adding a 'milliseconds = "value"' option here.             -->
-  <pause milliseconds="5000"/>
+  <pause milliseconds="1000"/>
 
   <!-- The 'crlf' option inserts a blank line in the statistics report. -->
   <send retrans="500">

Modified: asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/sipp/uac3.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/sipp/uac3.xml?view=diff&rev=212&r1=211&r2=212
==============================================================================
--- asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/sipp/uac3.xml (original)
+++ asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/sipp/uac3.xml Tue Apr  6 17:02:36 2010
@@ -85,7 +85,7 @@
 
   <!-- This delay can be customized by the -d command-line option       -->
   <!-- or by adding a 'milliseconds = "value"' option here.             -->
-  <pause milliseconds="5000"/>
+  <pause milliseconds="1000"/>
 
   <!-- The 'crlf' option inserts a blank line in the statistics report. -->
   <send retrans="500">

Modified: asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/sipp/uac4.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/sipp/uac4.xml?view=diff&rev=212&r1=211&r2=212
==============================================================================
--- asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/sipp/uac4.xml (original)
+++ asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/sipp/uac4.xml Tue Apr  6 17:02:36 2010
@@ -85,7 +85,7 @@
 
   <!-- This delay can be customized by the -d command-line option       -->
   <!-- or by adding a 'milliseconds = "value"' option here.             -->
-  <pause milliseconds="5000"/>
+  <pause milliseconds="1000"/>
 
   <!-- The 'crlf' option inserts a blank line in the statistics report. -->
   <send retrans="500">

Modified: asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/sipp/uac5.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/sipp/uac5.xml?view=diff&rev=212&r1=211&r2=212
==============================================================================
--- asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/sipp/uac5.xml (original)
+++ asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/sipp/uac5.xml Tue Apr  6 17:02:36 2010
@@ -85,7 +85,7 @@
 
   <!-- This delay can be customized by the -d command-line option       -->
   <!-- or by adding a 'milliseconds = "value"' option here.             -->
-  <pause milliseconds="5000"/>
+  <pause milliseconds="1000"/>
 
   <!-- The 'crlf' option inserts a blank line in the statistics report. -->
   <send retrans="500">

Modified: asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/sipp/uac6.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/sipp/uac6.xml?view=diff&rev=212&r1=211&r2=212
==============================================================================
--- asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/sipp/uac6.xml (original)
+++ asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/sipp/uac6.xml Tue Apr  6 17:02:36 2010
@@ -85,7 +85,7 @@
 
   <!-- This delay can be customized by the -d command-line option       -->
   <!-- or by adding a 'milliseconds = "value"' option here.             -->
-  <pause milliseconds="5000"/>
+  <pause milliseconds="1000"/>
 
   <!-- The 'crlf' option inserts a blank line in the statistics report. -->
   <send retrans="500">

Modified: asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/test.lua
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/test.lua?view=diff&rev=212&r1=211&r2=212
==============================================================================
--- asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/test.lua (original)
+++ asterisk/team/mmichelson/srv_sip_outbound/tests/sip_outbound_address/test.lua Tue Apr  6 17:02:36 2010
@@ -29,6 +29,8 @@
 	if (event["Variable"] == "READRESULT") then
 		if (event["Value"] ~= "1") then
 			fail("Wrong UAS answered. Expected DTMF '1' but received " .. event["Value"])
+		else
+			print("Yay! Properly read DTMF!")
 		end
 	end
 end
@@ -37,6 +39,8 @@
 	if (event["Variable"] == "READRESULT") then
 		if (event["Value"] ~= "2") then
 			fail("Wrong UAS answered. Expected DTMF '2' but received " .. event["Value"])
+		else
+			print("OH YEAH!")
 		end
 	end
 end
@@ -62,8 +66,8 @@
 end
 
 function setup_uas()
-	local t1 = sipp_exec("uas1.xml", "5061")
-	local t2 = sipp_exec("uas2.xml", "5062")
+	local t1 = sipp_exec("sipp/uas1.xml", "5061")
+	local t2 = sipp_exec("sipp/uas2.xml", "5062")
 	return t1, t2
 end
 
@@ -75,6 +79,7 @@
 function test_call(scenario, handler, local_port)
 	m:register_event("VarSet", handler)
 	local uas1, uas2 = setup_uas()
+	posix.sleep(1)
 	local t1 = sipp_exec(scenario, local_port)
 
 	--wait for everything to finish
@@ -97,11 +102,11 @@
 
 manager_setup(a)
 
-test_call("uac1.xml", varset_event_one, "6000")
-test_call("uac2.xml", varset_event_two, "6000")
-test_call("uac3.xml", varset_event_two, "6000")
-test_call("uac4.xml", varset_event_two, "6000")
-test_call("uac5.xml", varset_event_two, "6000")
-test_call("uac6.xml", varset_event_one, "6000")
+test_call("sipp/uac1.xml", varset_event_one, "18567")
+test_call("sipp/uac2.xml", varset_event_two, "18567")
+test_call("sipp/uac3.xml", varset_event_two, "18567")
+test_call("sipp/uac4.xml", varset_event_two, "18567")
+test_call("sipp/uac5.xml", varset_event_two, "18567")
+test_call("sipp/uac6.xml", varset_event_one, "18567")
 
 a:term_or_kill()




More information about the asterisk-commits mailing list