[asterisk-commits] testsuite: Cleanup tests/fax/sip/directmedia reinvite t38 (testsuite[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Mar 2 09:47:00 CST 2016


Anonymous Coward #1000019 has submitted this change and it was merged.

Change subject: testsuite: Cleanup tests/fax/sip/directmedia_reinvite_t38
......................................................................


testsuite: Cleanup tests/fax/sip/directmedia_reinvite_t38

Basically this is taking the latest files from
tests/fax/pjsip/directmedia_reinvite_t38 and adapting them back to this
test.

* Fix duplicate To tags on party A and B responses.

* Make A and B party contacts specify the transport.

* Add message tracking headers to quickly locate the messages in the debug
log.

* Removed unnecessary dialplan extensions.

Change-Id: If8daa4e8cba2f7fc8f2b1b3ef33840d2815b5f27
---
M tests/fax/sip/directmedia_reinvite_t38/configs/ast1/extensions.conf
M tests/fax/sip/directmedia_reinvite_t38/sipp/endpoint_A.xml
M tests/fax/sip/directmedia_reinvite_t38/sipp/endpoint_B.xml
M tests/fax/sip/directmedia_reinvite_t38/test-config.yaml
4 files changed, 46 insertions(+), 50 deletions(-)

Approvals:
  Kevin Harwell: Looks good to me, but someone else must approve
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, approved



diff --git a/tests/fax/sip/directmedia_reinvite_t38/configs/ast1/extensions.conf b/tests/fax/sip/directmedia_reinvite_t38/configs/ast1/extensions.conf
index 5405e4b..208ec18 100644
--- a/tests/fax/sip/directmedia_reinvite_t38/configs/ast1/extensions.conf
+++ b/tests/fax/sip/directmedia_reinvite_t38/configs/ast1/extensions.conf
@@ -1,13 +1,4 @@
-[general]
-PHONE_TO_DIAL=SIP/endpoint_B
-
 [default]
-exten => bypassbridge,1,NoOp()
-	same => n,Dial(SIP/endpoint_B,,g)
-	same => n,UserEvent(TestStatus, extension: bypassbridge)
-	same => n,Hangup()
-
-; Dial with no options; use bridge set up based on peer definitions
 exten => basicdial,1,NoOp()
 	same => n,Dial(SIP/endpoint_B,,g)
 	same => n,UserEvent(TestStatus, extension: basicdial)
diff --git a/tests/fax/sip/directmedia_reinvite_t38/sipp/endpoint_A.xml b/tests/fax/sip/directmedia_reinvite_t38/sipp/endpoint_A.xml
index 47db1f8..bab16e1 100644
--- a/tests/fax/sip/directmedia_reinvite_t38/sipp/endpoint_A.xml
+++ b/tests/fax/sip/directmedia_reinvite_t38/sipp/endpoint_A.xml
@@ -1,21 +1,22 @@
 <?xml version="1.0" encoding="ISO-8859-1" ?>
 <!DOCTYPE scenario SYSTEM "sipp.dtd">
 
-<scenario name="Phone A Hold with IP and Media Restrictions">
+<scenario name="Phone A direct media receiving T.38 fax">
 
 	<!-- Initial invite - Call phone B -->
 	<send retrans="500">
 		<![CDATA[
 			INVITE sip:[field2]@[remote_ip]:[remote_port] SIP/2.0
 			Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
-			From: [field0] <sip:[field0]@[local_ip]:[local_port]>;tag=[call_number]
+			From: "[field0]" <sip:[field0]@[local_ip]:[local_port]>;tag=[call_number]
 			To: <sip:[field2]@[remote_ip]:[remote_port];user=phone>
 			CSeq: 1 INVITE
 			Call-ID: [call_id]
-			Contact: <sip:[field0]@[local_ip]:[local_port]>
+			Contact: <sip:[field0]@[local_ip]:[local_port];transport=[transport]>
 			Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER
 			User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734
 			Accept-Language: en
+			X-Testsuite-Track-Phone-A: 1
 			Allow-Events: talk,hold,conference
 			Max-Forwards: 70
 			Content-Type: application/sdp
@@ -44,16 +45,17 @@
 
 	<send>
 		<![CDATA[
-			ACK sip:[field1]@[remote_ip]:[remote_port] SIP/2.0
+			ACK sip:[field2]@[remote_ip]:[remote_port] SIP/2.0
 			Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
-			From: [field0] <sip:[field0]@[remote_ip]>;tag=[call_number]
-			To: <sip:[field1]@[remote_ip];user=phone>[peer_tag_param]
+			From: "[field0]" <sip:[field0]@[local_ip]:[local_port]>;tag=[call_number]
+			To: <sip:[field2]@[remote_ip]:[remote_port];user=phone>[peer_tag_param]
 			CSeq: 1 ACK
 			Call-ID: [call_id]
-			Contact: <sip:[field0]@[local_ip]:[local_port]>
+			Contact: <sip:[field0]@[local_ip]:[local_port];transport=[transport]>
 			Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER
 			User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734
 			Accept-Language: en
+			X-Testsuite-Track-Phone-A: 2
 			Max-Forwards: 70
 			Content-Length: 0
 		]]>
@@ -80,7 +82,7 @@
 			SIP/2.0 200 OK
 			[last_Via:]
 			[last_From:]
-			[last_To:];tag=[call_number]
+			[last_To:]
 			[last_Call-ID:]
 			[last_CSeq:]
 			Contact: <sip:[field0]@[local_ip]:[local_port];transport=[transport]>
@@ -88,7 +90,7 @@
 			Supported: 100rel,replaces
 			User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734
 			Accept-Language: en
-			Testsuite-Track-Phone-A: 1
+			X-Testsuite-Track-Phone-A: 3
 			Content-Type: application/sdp
 			Content-Length: [len]
 
@@ -128,7 +130,7 @@
 			SIP/2.0 200 OK
 			[last_Via:]
 			[last_From:]
-			[last_To:];tag=[call_number]
+			[last_To:]
 			[last_Call-ID:]
 			[last_CSeq:]
 			Contact: <sip:[field0]@[local_ip]:[local_port];transport=[transport]>
@@ -136,7 +138,7 @@
 			Supported: 100rel,replaces
 			User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734
 			Accept-Language: en
-			Testsuite-Track-Phone-A: 2
+			X-Testsuite-Track-Phone-A: 4
 			Content-Type: application/sdp
 			Content-Length: [len]
 
@@ -166,7 +168,7 @@
 			SIP/2.0 200 OK
 			[last_Via:]
 			[last_From:]
-			[last_To:];tag=[call_number]
+			[last_To:]
 			[last_Call-ID:]
 			[last_CSeq:]
 			Contact: <sip:[field0]@[local_ip]:[local_port];transport=[transport]>
@@ -174,20 +176,20 @@
 			Supported: 100rel,replaces
 			User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734
 			Accept-Language: en
-			Testsuite-Track-Phone-A: 3
+			X-Testsuite-Track-Phone-A: 5
 			Content-Type: application/sdp
 			Content-Length: [len]
 
 			v=0
-			o=- 1324901698 1324901700 IN IP4 [local_ip]
+			o=- 1324901698 1324901698 IN IP4 [local_ip]
 			s=Polycom IP Phone
 			c=IN IP4 [local_ip]
 			t=0 0
-			m=image 10972 udptl t38
 			a=sendrecv
-			a=T38FaxVersion:0
-			a=T38MaxBitRate:9600
-			a=T38FaxUdpEC:t38UDPRedundancy
+			m=audio 2226 RTP/AVP 0 101
+			a=sendrecv
+			a=rtpmap:0 PCMU/8000
+			a=rtpmap:101 telephone-event/8000
 		]]>
 	</send>
 
@@ -200,16 +202,14 @@
 			SIP/2.0 200 OK
 			[last_Via:]
 			[last_From:]
-			[last_To:];tag=[call_number]
+			[last_To:]
 			[last_Call-ID:]
 			[last_CSeq:]
 			Contact: <sip:[field0]@[local_ip]:[local_port];transport=[transport]>
 			Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER
-			Supported: 100rel,replaces
 			User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734
 			Accept-Language: en
-			Testsuite-Track-Phone-A: 5
-			Content-Type: application/sdp
+			X-Testsuite-Track-Phone-A: 6
 			Content-Length: 0
 		]]>
 	</send>
diff --git a/tests/fax/sip/directmedia_reinvite_t38/sipp/endpoint_B.xml b/tests/fax/sip/directmedia_reinvite_t38/sipp/endpoint_B.xml
index 4ef7a27..e691f72 100644
--- a/tests/fax/sip/directmedia_reinvite_t38/sipp/endpoint_B.xml
+++ b/tests/fax/sip/directmedia_reinvite_t38/sipp/endpoint_B.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="ISO-8859-1" ?>
 <!DOCTYPE scenario SYSTEM "sipp.dtd">
 
-<scenario name="Phone B Hold with Media Restrictions">
+<scenario name="Phone B direct media sending T.38 fax">
 	<Global variables="remote_tag"/>
 
 	<recv request="INVITE" crlf="true">
@@ -19,12 +19,13 @@
 			SIP/2.0 100 Trying
 			[last_Via:]
 			[last_From:]
-			[last_To:];tag=[call_number]
+			[last_To:]
 			[last_Call-ID:]
 			[last_CSeq:]
 			Contact: <sip:[field1]@[local_ip]:[local_port];transport=[transport]>
 			User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734
 			Accept-Language: en
+			X-Testsuite-Track-Phone-B: 1
 			Content-Length: 0
 		]]>
 	</send>
@@ -41,6 +42,7 @@
 			User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734
 			Allow-Events: talk,hold,conference
 			Accept-Language: en
+			X-Testsuite-Track-Phone-B: 2
 			Content-Length: 0
 		]]>
 	</send>
@@ -60,7 +62,7 @@
 			Supported: 100rel,replaces
 			User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734
 			Accept-Language: en
-			Testsuite-Track-Phone-B-Media-Restrict: 1
+			X-Testsuite-Track-Phone-B: 3
 			Content-Type: application/sdp
 			Content-Length: [len]
 
@@ -108,7 +110,7 @@
 			Supported: 100rel,replaces
 			User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734
 			Accept-Language: en
-			Testsuite-Track-Phone-B-Media-Restrict: 2
+			X-Testsuite-Track-Phone-B: 4
 			Content-Type: application/sdp
 			Content-Length: [len]
 
@@ -133,16 +135,17 @@
 	<!-- Reinvite to set up T38 Fax session -->
 	<send retrans="500">
 		<![CDATA[
-			INVITE sip:[field0]@[remote_ip]:[remote_port] SIP/2.0
+			INVITE sip:endpoint_B@[remote_ip]:[remote_port] SIP/2.0
 			Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
-			From: [field1] <sip:[field1]@[local_ip]:[local_port]>;tag=[call_number]
-			To: [field0] <sip:[field1]@[remote_ip]>
+			From: <sip:127.0.0.3>;tag=[call_number]
+			To: [$remote_tag]
 			CSeq: [cseq] INVITE
 			[last_Call-ID:]
-			Contact: <sip:[field1]@[local_ip]:[local_port]>
+			Contact: <sip:[field1]@[local_ip]:[local_port];transport=[transport]>
 			Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER
 			User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734
 			Accept-Language: en
+			X-Testsuite-Track-Phone-B: 5
 			Supported: 100rel,replaces
 			Allow-Events: talk,hold,conference
 			Max-Forwards: 70
@@ -182,19 +185,19 @@
 		</action>
 	</nop>
 
-
 	<send>
 		<![CDATA[
 			ACK sip:[field1]@[remote_ip]:[remote_port] SIP/2.0
 			Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
-			From: [field1] <sip:[field1]@[local_ip]>;tag=[call_number]
-			To: <sip:[field0]@[remote_ip];user=[field0]>[peer_tag_param]
+			From: <sip:127.0.0.3>;tag=[call_number]
+			To: [$remote_tag]
 			CSeq: [cseq] ACK
 			[last_Call-ID:]
-			Contact: <sip:[field1]@[local_ip]:[local_port]>
+			Contact: <sip:[field1]@[local_ip]:[local_port];transport=[transport]>
 			Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, INFO, MESSAGE, SUBSCRIBE, NOTIFY, PRACK, UPDATE, REFER
 			User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734
 			Accept-Language: en
+			X-Testsuite-Track-Phone-B: 6
 			Max-Forwards: 70
 			Content-Length: 0
 		]]>
@@ -207,18 +210,20 @@
 		<![CDATA[
 			BYE sip:[field1]@1[remote_ip]:[remote_port] SIP/2.0
 			Via: SIP/2.0/UDP [local_ip]:[local_port];branch=[branch]
-			From: [field1] <sip:[field1]@[local_ip]:[local_port]>;tag=[call_number]
-			To: [field0] <sip:[field1]@[remote_ip]>[$remote_tag]
+			From: <sip:127.0.0.3>;tag=[call_number]
+			To: [$remote_tag]
 			CSeq: [cseq] BYE
 			[last_Call-ID:]
-			Contact: <sip:[field1]@[local_ip]:[local_port]>
+			Contact: <sip:[field1]@[local_ip]:[local_port];transport=[transport]>
 			User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734
 			Accept-Language: en
+			X-Testsuite-Track-Phone-B: 7
 			Max-Forwards: 70
 			Content-Length: 0
 		]]>
 	</send>
 
+	<recv response="200" />
 
 </scenario>
 
diff --git a/tests/fax/sip/directmedia_reinvite_t38/test-config.yaml b/tests/fax/sip/directmedia_reinvite_t38/test-config.yaml
index cde33b5..09cb8cd 100644
--- a/tests/fax/sip/directmedia_reinvite_t38/test-config.yaml
+++ b/tests/fax/sip/directmedia_reinvite_t38/test-config.yaml
@@ -23,10 +23,10 @@
 properties:
     minversion: '1.8.0.0'
     dependencies:
-        - sipp :
-            version : 'v3.0'
-        - python : 'twisted'
-        - python : 'starpy'
+        - sipp:
+            version: 'v3.0'
+        - python: 'twisted'
+        - python: 'starpy'
         - asterisk: 'app_dial'
         - asterisk: 'app_userevent'
         - asterisk: 'chan_sip'

-- 
To view, visit https://gerrit.asterisk.org/2292
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If8daa4e8cba2f7fc8f2b1b3ef33840d2815b5f27
Gerrit-PatchSet: 2
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>



More information about the asterisk-commits mailing list