[asterisk-commits] kmoore: testsuite/asterisk/trunk r3313 - in /asterisk/trunk/tests/channels/SI...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jul 12 14:32:03 CDT 2012


Author: kmoore
Date: Thu Jul 12 14:31:59 2012
New Revision: 3313

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=3313
Log:
Add new test for SIP stream declination and clean up test

This adds a new test to the SDP_offer_answer set of SIPp-based tests
for handling multiple streams and cleans up the usage of SIPpTest now
that port numbers are set automatically.

Added:
    asterisk/trunk/tests/channels/SIP/SDP_offer_answer/sipp/decline_multistream.xml   (with props)
Modified:
    asterisk/trunk/tests/channels/SIP/SDP_offer_answer/run-test

Modified: asterisk/trunk/tests/channels/SIP/SDP_offer_answer/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/SDP_offer_answer/run-test?view=diff&rev=3313&r1=3312&r2=3313
==============================================================================
--- asterisk/trunk/tests/channels/SIP/SDP_offer_answer/run-test (original)
+++ asterisk/trunk/tests/channels/SIP/SDP_offer_answer/run-test Thu Jul 12 14:31:59 2012
@@ -14,6 +14,7 @@
 
 from twisted.internet import reactor
 from asterisk.sipp import SIPpTest
+from asterisk.version import AsteriskVersion
 
 
 WORKING_DIR = "SIP/SDP_offer_answer"
@@ -37,16 +38,10 @@
     {'scenario' : 'orderstream.xml',},
 ]
 
-# set port numberings and timeouts
-port = 5061
-def update_entry(entry):
-    global port
-    entry['-p'] = "%d" % port
-    port += 1
-
 # generate SIPP scenarios with appropriate port numbers and the config to go with it
 def main():
-    [update_entry(i) for i in SIPP_SCENARIOS]
+    if AsteriskVersion() > AsteriskVersion("11"):
+        SIPP_SCENARIOS.append({'scenario' : 'decline_multistream.xml'})
     test = SIPpTest(WORKING_DIR, TEST_DIR, SIPP_SCENARIOS)
     reactor.run()
     if not test.passed:

Added: asterisk/trunk/tests/channels/SIP/SDP_offer_answer/sipp/decline_multistream.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/SDP_offer_answer/sipp/decline_multistream.xml?view=auto&rev=3313
==============================================================================
--- asterisk/trunk/tests/channels/SIP/SDP_offer_answer/sipp/decline_multistream.xml (added)
+++ asterisk/trunk/tests/channels/SIP/SDP_offer_answer/sipp/decline_multistream.xml Thu Jul 12 14:31:59 2012
@@ -1,0 +1,142 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Channel Test">
+  <send retrans="500">
+    <![CDATA[
+
+      INVITE sip:test@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:guest0@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 1 INVITE
+      Contact: sip:kartoffelsalat@[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=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
+      s=-
+      c=IN IP[media_ip_type] [media_ip]
+      t=0 0
+      m=audio 6000 RTP/AVP 0 3 4 5 7 8 9 10 18 96 97 100 101 102 107 108 110 111 112 115 116 117
+      a=rtpmap:0 PCMU/8000
+      a=rtpmap:3 GSM/8000
+      a=rtpmap:4 G723/8000
+      a=fmtp:4 annexa=no
+      a=rtpmap:5 DVI4/8000
+      a=rtpmap:7 LPC/8000
+      a=rtpmap:8 PCMA/8000
+      a=rtpmap:9 G722/8000
+      a=rtpmap:10 L16/8000
+      a=rtpmap:18 G729/8000
+      a=fmtp:18 annexb=no
+      a=rtpmap:96 SILK/8000
+      a=fmtp:96 maxaveragebitrate=10000
+      a=fmtp:96 usedtx=0
+      a=fmtp:96 useinbandfec=1
+      a=rtpmap:97 iLBC/8000
+      a=fmtp:97 mode=30
+      a=rtpmap:100 SILK/12000
+      a=fmtp:100 maxaveragebitrate=12000
+      a=fmtp:100 usedtx=0
+      a=fmtp:100 useinbandfec=1
+      a=rtpmap:101 telephone-event/8000
+      a=rtpmap:102 G7221/16000
+      a=fmtp:102 bitrate=32000
+      a=rtpmap:107 SILK/16000
+      a=fmtp:107 maxaveragebitrate=20000
+      a=fmtp:107 usedtx=0
+      a=fmtp:107 useinbandfec=1
+      a=rtpmap:108 SILK/24000
+      a=fmtp:108 maxaveragebitrate=30000
+      a=fmtp:108 usedtx=0
+      a=fmtp:108 useinbandfec=1
+      a=rtpmap:110 speex/8000
+      a=rtpmap:111 G726-32/8000
+      a=rtpmap:112 AAL2-G726-32/8000
+      a=rtpmap:115 G7221/32000
+      a=fmtp:115 bitrate=48000
+      a=rtpmap:116 G719/48000
+      a=fmtp:116 bitrate=64000
+      a=rtpmap:117 speex/16000
+      m=video 6002 RTP/AVP 31 32 34
+      a=rtpmap:31 H261/90000
+      a=rtpmap:32 MPV/90000
+      a=rtpmap:34 H263/90000
+      m=video 6003 RTP/AVP 31 32 34
+      a=rtpmap:31 H261/90000
+      a=rtpmap:32 MPV/90000
+      a=rtpmap:34 H263/90000
+
+    ]]>
+  </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>
+      <!-- ensure that we get back 1 audio stream, 1 declined video stream and 1 video stream -->
+      <ereg regexp="m=audio [0-9]{1,5} RTP/AVP .*m=video [0-9]{1,5} RTP/AVP .*m=video 0 RTP/AVP "
+            search_in="body" check_it="true" assign_to="1"/>
+      <strcmp assign_to="1" variable="1" value=""/>
+    </action>
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      ACK sip:test@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:guest0@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[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@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:guest0@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[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/SDP_offer_answer/sipp/decline_multistream.xml
------------------------------------------------------------------------------
    svn:eol-style = native

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

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




More information about the asterisk-commits mailing list