[Asterisk-code-review] Make tests SILK-ready. (testsuite[master])

Anonymous Coward asteriskteam at digium.com
Thu Jul 14 16:32:00 CDT 2016


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

Change subject: Make tests SILK-ready.
......................................................................


Make tests SILK-ready.

Addition of SILK understanding to the SDP code has made it so that
Asterisk can now respond to SILK offers. This means the old single audio
stream basic test fails since it does not expect for Asterisk to respond
with SILK payloads.

This commit fixes the issue by splitting the existing test based on
version numbers. Once past 13.11.0, an alternate version of the
uac-all-codecs.xml file is used. In this alternate version, we expect
Asterisk to include SILK payloads in the SDP response.

Change-Id: I72fadf35d4385db0195f2ac7a65611c186e1bda3
---
A tests/channels/pjsip/sdp_offer_answer/incoming/nominal/single-media-stream/audio/basic/sipp/uac-all-codecs-13-11.xml
M tests/channels/pjsip/sdp_offer_answer/incoming/nominal/single-media-stream/audio/basic/test-config.yaml
2 files changed, 147 insertions(+), 0 deletions(-)

Approvals:
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, approved



diff --git a/tests/channels/pjsip/sdp_offer_answer/incoming/nominal/single-media-stream/audio/basic/sipp/uac-all-codecs-13-11.xml b/tests/channels/pjsip/sdp_offer_answer/incoming/nominal/single-media-stream/audio/basic/sipp/uac-all-codecs-13-11.xml
new file mode 100644
index 0000000..5a7e9f7
--- /dev/null
+++ b/tests/channels/pjsip/sdp_offer_answer/incoming/nominal/single-media-stream/audio/basic/sipp/uac-all-codecs-13-11.xml
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Basic Sipstone UAC">
+  <send retrans="500">
+    <![CDATA[
+
+      INVITE sip:answer@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: alice-codec-match <sip:[service]@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number]
+      To: sut <sip:test@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 1 INVITE
+      Contact: sip:test@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Subject: Codec 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 97 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:97 iLBC/8000
+      a=fmtp:97 mode=30
+      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
+
+    ]]>
+  </send>
+
+  <recv response="100" optional="true">
+  </recv>
+
+  <recv response="181" optional="true">
+  </recv>
+
+  <recv response="180" optional="true">
+  </recv>
+
+  <recv response="183" optional="true">
+  </recv>
+
+  <recv response="200" rtd="true">
+    <action>
+      <ereg regexp="m=audio [0-9]{1,5} RTP/AVP 4 0 8 3 111 112 5 10 7 18 110 117 97 9 102 115 116 107 108 101+..*"
+            search_in="body" check_it="true" assign_to="1"/>
+      <test assign_to="1" variable="1" compare="equal" value=""/>
+    </action>
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      ACK sip:answer@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: alice-codec-match <sip:[service]@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number]
+      To: sut <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 1 ACK
+      Contact: sip:alice-codec-match@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Subject: Performance Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <recv request="BYE">
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      SIP/2.0 200 OK
+      [last_Via:]
+      [last_From:]
+      [last_To:]
+      [last_Call-ID:]
+      [last_CSeq:]
+      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
+
+  <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
+
+</scenario>
+
diff --git a/tests/channels/pjsip/sdp_offer_answer/incoming/nominal/single-media-stream/audio/basic/test-config.yaml b/tests/channels/pjsip/sdp_offer_answer/incoming/nominal/single-media-stream/audio/basic/test-config.yaml
index 0ca45d8..ecac231 100644
--- a/tests/channels/pjsip/sdp_offer_answer/incoming/nominal/single-media-stream/audio/basic/test-config.yaml
+++ b/tests/channels/pjsip/sdp_offer_answer/incoming/nominal/single-media-stream/audio/basic/test-config.yaml
@@ -25,7 +25,12 @@
 
 test-modules:
     test-object:
+        maxversion: '13.11.0'
         config-section: test-object-config
+        typename: 'sipp.SIPpTestCase'
+    test-object:
+        minversion: '13.11.0'
+        config-section: test-object-config-13-11
         typename: 'sipp.SIPpTestCase'
 
 test-object-config:
@@ -47,6 +52,26 @@
             scenarios:
                 - { 'key-args': {'scenario': 'uac-basic-codecs-delayed.xml', '-i': '127.0.0.1', '-p': '5061', '-s': 'alice-codec-match', } }
 
+test-object-config-13-11:
+    reactor-timeout: 80
+    fail-on-any: False
+    test-iterations:
+        -
+            scenarios:
+                - { 'key-args': {'scenario': 'uac-all-codecs-13-11.xml', '-i': '127.0.0.1', '-p': '5062', '-s': 'alice-codec-all', } }
+                - { 'key-args': {'scenario': 'uac-basic-codecs.xml', '-i': '127.0.0.1', '-p': '5061', '-s': 'alice-codec-match', } }
+                - { 'key-args': {'scenario': 'uac-basic-codecs.xml', '-i': '127.0.0.1', '-p': '5063', '-s': 'alice-codec-extended', } }
+        -
+            scenarios:
+                - { 'key-args': {'scenario': 'uac-basic-codecs-no-rtpmap.xml', '-i': '127.0.0.1', '-p': '5061', '-s': 'alice-codec-match', } }
+        -
+            scenarios:
+                - { 'key-args': {'scenario': 'uac-basic-codecs-odd-rtpmap.xml', '-i': '127.0.0.1', '-p': '5061', '-s': 'alice-codec-match', } }
+        -
+            scenarios:
+                - { 'key-args': {'scenario': 'uac-basic-codecs-delayed.xml', '-i': '127.0.0.1', '-p': '5061', '-s': 'alice-codec-match', } }
+
+
 properties:
     minversion: '13.0.0'
     dependencies:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I72fadf35d4385db0195f2ac7a65611c186e1bda3
Gerrit-PatchSet: 2
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>



More information about the asterisk-code-review mailing list