[asterisk-commits] file: testsuite/asterisk/trunk r3537 - in /asterisk/trunk/tests/channels/SIP:...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Nov 25 16:19:56 CST 2012


Author: file
Date: Sun Nov 25 16:19:50 2012
New Revision: 3537

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=3537
Log:
Add a test which confirms that SIP direct RTP setup works.

(closes issue ASTERISK-20520)

Added:
    asterisk/trunk/tests/channels/SIP/directrtpsetup/
    asterisk/trunk/tests/channels/SIP/directrtpsetup/configs/
    asterisk/trunk/tests/channels/SIP/directrtpsetup/configs/ast1/
    asterisk/trunk/tests/channels/SIP/directrtpsetup/configs/ast1/extensions.conf   (with props)
    asterisk/trunk/tests/channels/SIP/directrtpsetup/configs/ast1/sip.conf   (with props)
    asterisk/trunk/tests/channels/SIP/directrtpsetup/sipp/
    asterisk/trunk/tests/channels/SIP/directrtpsetup/sipp/phone_A.xml   (with props)
    asterisk/trunk/tests/channels/SIP/directrtpsetup/sipp/phone_B.xml   (with props)
    asterisk/trunk/tests/channels/SIP/directrtpsetup/test-config.yaml   (with props)
Modified:
    asterisk/trunk/tests/channels/SIP/tests.yaml

Added: asterisk/trunk/tests/channels/SIP/directrtpsetup/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/directrtpsetup/configs/ast1/extensions.conf?view=auto&rev=3537
==============================================================================
--- asterisk/trunk/tests/channels/SIP/directrtpsetup/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/channels/SIP/directrtpsetup/configs/ast1/extensions.conf Sun Nov 25 16:19:50 2012
@@ -1,0 +1,2 @@
+[default]
+exten => test,1,Dial(SIP/phoneB)

Propchange: asterisk/trunk/tests/channels/SIP/directrtpsetup/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/SIP/directrtpsetup/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/channels/SIP/directrtpsetup/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/SIP/directrtpsetup/configs/ast1/sip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/directrtpsetup/configs/ast1/sip.conf?view=auto&rev=3537
==============================================================================
--- asterisk/trunk/tests/channels/SIP/directrtpsetup/configs/ast1/sip.conf (added)
+++ asterisk/trunk/tests/channels/SIP/directrtpsetup/configs/ast1/sip.conf Sun Nov 25 16:19:50 2012
@@ -1,0 +1,20 @@
+[general]
+udpbindaddr=127.0.0.1
+allowguest=no
+directmedia=yes
+directrtpsetup=yes
+
+[phoneA]
+type=user
+insecure=invite,port
+disallow=all
+allow=ulaw
+host=127.0.0.1
+port=5061
+
+[phoneB]
+type=peer
+host=127.0.0.1
+port=5063
+disallow=all
+allow=ulaw

Propchange: asterisk/trunk/tests/channels/SIP/directrtpsetup/configs/ast1/sip.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/SIP/directrtpsetup/configs/ast1/sip.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/channels/SIP/directrtpsetup/configs/ast1/sip.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/SIP/directrtpsetup/sipp/phone_A.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/directrtpsetup/sipp/phone_A.xml?view=auto&rev=3537
==============================================================================
--- asterisk/trunk/tests/channels/SIP/directrtpsetup/sipp/phone_A.xml (added)
+++ asterisk/trunk/tests/channels/SIP/directrtpsetup/sipp/phone_A.xml Sun Nov 25 16:19:50 2012
@@ -1,0 +1,94 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Channel Test">
+  <send retrans="500">
+    <![CDATA[
+
+      INVITE sip:test at 127.0.0.1:5060 SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:phoneA@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test at 127.0.0.1:5060
+      Call-ID: [call_id]
+      CSeq: 1 INVITE
+      Contact: sip:test@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Subject: Performance Test
+      User-Agent: Channel Param Test
+      Content-Type: application/sdp
+      Content-Length: [len]
+
+      v=0
+      o=phoneA 53655765 2353687637 IN IP[local_ip_type] 42.42.42.42
+      s=-
+      c=IN IP[media_ip_type] 42.42.42.42
+      t=0 0
+      m=audio 6000 RTP/AVP 0
+      a=rtpmap:0 PCMU/8000
+
+    ]]>
+  </send>
+
+  <recv response="100"
+        optional="true">
+  </recv>
+
+  <recv response="180" optional="true">
+  </recv>
+
+  <recv response="183" optional="true">
+  </recv>
+
+  <recv response="200" rtd="true">
+    <action>
+      <ereg regexp="c=IN IP4 42.42.42.42" search_in="body" check_it="true" assign_to="1"/>
+    </action>
+  </recv>
+
+  <Reference variables="1"/>
+
+  <send>
+    <![CDATA[
+
+      ACK sip:test at 127.0.0.1:5060 SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:phoneA@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test at 127.0.0.1:5060>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 1 ACK
+      Contact: sip:kartoffelsalat@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Subject: Performance Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <send retrans="500">
+    <![CDATA[
+
+      BYE sip:test at 127.0.0.1:5060 SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:phoneA@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test at 127.0.0.1:5060>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 2 BYE
+      Contact: sip:kartoffelsalat@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Subject: Performance Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </recv>
+
+  <!-- definition of the response time repartition table (unit is ms)   -->
+  <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
+
+  <!-- definition of the call length repartition table (unit is ms)     -->
+  <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
+
+</scenario>
+

Propchange: asterisk/trunk/tests/channels/SIP/directrtpsetup/sipp/phone_A.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/SIP/directrtpsetup/sipp/phone_A.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/channels/SIP/directrtpsetup/sipp/phone_A.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/SIP/directrtpsetup/sipp/phone_B.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/directrtpsetup/sipp/phone_B.xml?view=auto&rev=3537
==============================================================================
--- asterisk/trunk/tests/channels/SIP/directrtpsetup/sipp/phone_B.xml (added)
+++ asterisk/trunk/tests/channels/SIP/directrtpsetup/sipp/phone_B.xml Sun Nov 25 16:19:50 2012
@@ -1,0 +1,82 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="INVITE with direct IP address of other sipp instance">
+	<recv request="INVITE" crlf="true">
+	  <action>
+	    <ereg regexp="c=IN IP4 42.42.42.42" search_in="body" check_it="true" assign_to="1"/>
+	  </action>
+	</recv>
+
+	<Reference variables="1"/>
+
+	<send>
+		<![CDATA[
+			SIP/2.0 100 Trying
+			[last_Via:]
+			[last_From:]
+			[last_To:];tag=[call_number]
+			[last_Call-ID:]
+			[last_CSeq:]
+			Contact: <sip:bob@[local_ip]:[local_port];transport=[transport]>
+			User-Agent: PolycomSoundPointIP-SPIP_430-UA/3.2.3.1734
+			Accept-Language: en
+			Content-Length: 0
+		]]>
+	</send>
+
+	<pause milliseconds="1000"/>
+
+	<send retrans="500">
+		<![CDATA[
+			SIP/2.0 200 OK
+			[last_Via:]
+			[last_From:]
+			[last_To:];tag=[call_number]
+			[last_Call-ID:]
+			[last_CSeq:]
+			Contact: <sip:bob@[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
+			Content-Type: application/sdp
+			Content-Length: [len]
+
+			v=0
+			o=guest3 53655765 2353687637 IN IP[local_ip_type] 42.42.42.42
+			s=-
+			c=IN IP[media_ip_type] 42.42.42.42
+			t=0 0
+			m=audio 6000 RTP/AVP 0
+			a=rtpmap:0 PCMU/8000
+
+		]]>
+	</send>
+
+	<!-- RECV ACK -->
+	<recv request="ACK"/>
+
+	<recv request="INVITE" optional="true"/>
+
+	<recv request="BYE"/>
+
+        <send retrans="500">
+                <![CDATA[
+                        SIP/2.0 200 OK
+                        [last_Via:]
+                        [last_From:]
+                        [last_To:];tag=[call_number]
+                        [last_Call-ID:]
+                        [last_CSeq:]
+                        Contact: <sip:bob@[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
+                        Content-Type: application/sdp
+                        Content-Length: 0
+                ]]>
+        </send>
+
+</scenario>

Propchange: asterisk/trunk/tests/channels/SIP/directrtpsetup/sipp/phone_B.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/SIP/directrtpsetup/sipp/phone_B.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/channels/SIP/directrtpsetup/sipp/phone_B.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/SIP/directrtpsetup/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/directrtpsetup/test-config.yaml?view=auto&rev=3537
==============================================================================
--- asterisk/trunk/tests/channels/SIP/directrtpsetup/test-config.yaml (added)
+++ asterisk/trunk/tests/channels/SIP/directrtpsetup/test-config.yaml Sun Nov 25 16:19:50 2012
@@ -1,0 +1,26 @@
+testinfo:
+    summary: 'Test the directrtpsetup option'
+    description: |
+        This tests whether the directrtpsetup option works or not.
+
+test-modules:
+    add-test-to-search-path: 'True'
+    test-object:
+        config-section: test-object-config
+        typename: 'sipp.SIPpTestCase'
+
+test-object-config:
+    fail-on-any: False
+    test-iterations:
+        -
+            scenarios:
+                - { 'key-args': {'scenario': 'phone_B.xml', '-i': '127.0.0.1', '-p': '5063'} }
+                - { 'key-args': {'scenario': 'phone_A.xml', '-i': '127.0.0.1', '-p': '5061'} }
+
+properties:
+    minversion: '1.8.0.0'
+    dependencies:
+        - sipp :
+            version : 'v3.0'
+    tags:
+        - SIP

Propchange: asterisk/trunk/tests/channels/SIP/directrtpsetup/test-config.yaml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/SIP/directrtpsetup/test-config.yaml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/channels/SIP/directrtpsetup/test-config.yaml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: asterisk/trunk/tests/channels/SIP/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/tests.yaml?view=diff&rev=3537&r1=3536&r2=3537
==============================================================================
--- asterisk/trunk/tests/channels/SIP/tests.yaml (original)
+++ asterisk/trunk/tests/channels/SIP/tests.yaml Sun Nov 25 16:19:50 2012
@@ -53,4 +53,6 @@
     - test: 'subscribe'
     - test: 'rfc2833_dtmf_detect'
     - test: 'device_state_notification'
+    - test: 'directrtpsetup'
     - test: 'session_timers_require'
+




More information about the asterisk-commits mailing list