[Asterisk-code-review] pjsip: Add SDP offer/answer test for bundle. (testsuite[master])

Jenkins2 asteriskteam at digium.com
Mon Jul 17 18:22:13 CDT 2017


Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/5982 )

Change subject: pjsip: Add SDP offer/answer test for bundle.
......................................................................

pjsip: Add SDP offer/answer test for bundle.

This change adds an SDP negotiation test for bundle to ensure
that when bundle is enabled we place the proper attributes in
the messages.

ASTERISK-27118

Change-Id: Ia7fcefcba248d1814b2fcbffb80b3a90cda13dd0
---
A tests/channels/pjsip/sdp_offer_answer/incoming/nominal/multiple-media-stream/audio-video/accept/bundled/configs/ast1/extensions.conf
A tests/channels/pjsip/sdp_offer_answer/incoming/nominal/multiple-media-stream/audio-video/accept/bundled/configs/ast1/pjsip.conf
A tests/channels/pjsip/sdp_offer_answer/incoming/nominal/multiple-media-stream/audio-video/accept/bundled/sipp/uac-multiple-video-with-audio.xml
A tests/channels/pjsip/sdp_offer_answer/incoming/nominal/multiple-media-stream/audio-video/accept/bundled/test-config.yaml
M tests/channels/pjsip/sdp_offer_answer/incoming/nominal/multiple-media-stream/audio-video/accept/tests.yaml
5 files changed, 167 insertions(+), 0 deletions(-)

Approvals:
  Joshua Colp: Looks good to me, approved; Verified
  Kevin Harwell: Looks good to me, but someone else must approve
  Jenkins2: Approved for Submit



diff --git a/tests/channels/pjsip/sdp_offer_answer/incoming/nominal/multiple-media-stream/audio-video/accept/bundled/configs/ast1/extensions.conf b/tests/channels/pjsip/sdp_offer_answer/incoming/nominal/multiple-media-stream/audio-video/accept/bundled/configs/ast1/extensions.conf
new file mode 100644
index 0000000..6955acb
--- /dev/null
+++ b/tests/channels/pjsip/sdp_offer_answer/incoming/nominal/multiple-media-stream/audio-video/accept/bundled/configs/ast1/extensions.conf
@@ -0,0 +1,5 @@
+[default]
+
+exten => answer,1,NoOp()
+ same => n,Answer()
+ same => n,Hangup()
diff --git a/tests/channels/pjsip/sdp_offer_answer/incoming/nominal/multiple-media-stream/audio-video/accept/bundled/configs/ast1/pjsip.conf b/tests/channels/pjsip/sdp_offer_answer/incoming/nominal/multiple-media-stream/audio-video/accept/bundled/configs/ast1/pjsip.conf
new file mode 100644
index 0000000..d328216
--- /dev/null
+++ b/tests/channels/pjsip/sdp_offer_answer/incoming/nominal/multiple-media-stream/audio-video/accept/bundled/configs/ast1/pjsip.conf
@@ -0,0 +1,14 @@
+[local-transport-udp]
+type=transport
+bind=127.0.0.1
+protocol=udp
+
+[endpoint-template](!)
+type=endpoint
+context=default
+media_address=127.0.0.1
+max_video_streams=10
+bundle=yes
+
+[alice](endpoint-template)
+allow=!all,g722,ulaw,alaw,h264,h263
diff --git a/tests/channels/pjsip/sdp_offer_answer/incoming/nominal/multiple-media-stream/audio-video/accept/bundled/sipp/uac-multiple-video-with-audio.xml b/tests/channels/pjsip/sdp_offer_answer/incoming/nominal/multiple-media-stream/audio-video/accept/bundled/sipp/uac-multiple-video-with-audio.xml
new file mode 100644
index 0000000..4d52ad8
--- /dev/null
+++ b/tests/channels/pjsip/sdp_offer_answer/incoming/nominal/multiple-media-stream/audio-video/accept/bundled/sipp/uac-multiple-video-with-audio.xml
@@ -0,0 +1,120 @@
+<?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 <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
+      a=group:BUNDLE audio video
+      m=audio 6000 RTP/AVP 9 0 8 101
+      a=rtpmap:9 G722/8000
+      a=rtpmap:0 PCMU/8000
+      a=rtpmap:8 PCMA/8000
+      a=rtpmap:101 telephone-event/8000
+      a=fmtp:101 0-16
+      a=ptime:20
+      a=maxptime:20
+      a=sendrecv
+      a=mid:audio
+      m=video 6001 RTP/AVP 99 34
+      a=rtpmap:99 H264/90000
+      a=rtpmap:34 H263/90000
+      a=sendrecv
+      a=mid:video
+      m=video 6002 RTP/AVP 99
+      c=IN IP[media_ip_type] [media_ip]
+      a=rtpmap:99 H264/90000
+      a=sendrecv
+      a=mid:video
+      m=video 6003 RTP/AVP 34
+      a=rtpmap:34 H263/90000
+      a=sendrecv
+      a=mid:video
+
+    ]]>
+  </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="a=group:BUNDLE audio video"
+            search_in="body" check_it="true" assign_to="1"/>
+      <test assign_to="1" variable="1" compare="equal" value=""/>
+      <ereg regexp="a=mid:audio"
+            search_in="body" check_it="true" assign_to="2"/>
+      <test assign_to="2" variable="2" compare="equal" value=""/>
+      <ereg regexp="a=mid:video"
+            search_in="body" check_it="true" assign_to="3"/>
+      <test assign_to="3" variable="3" 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 <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@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Subject: Codec 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/multiple-media-stream/audio-video/accept/bundled/test-config.yaml b/tests/channels/pjsip/sdp_offer_answer/incoming/nominal/multiple-media-stream/audio-video/accept/bundled/test-config.yaml
new file mode 100644
index 0000000..d3185f5
--- /dev/null
+++ b/tests/channels/pjsip/sdp_offer_answer/incoming/nominal/multiple-media-stream/audio-video/accept/bundled/test-config.yaml
@@ -0,0 +1,27 @@
+testinfo:
+    summary:     'Test offers with multiple video streams/one audio stream and bundled'
+    description: |
+        This tests inbound offers that contain multiple video
+        media streams and a single audio stream with bundle enabled.
+        Asterisk should accept all the streams in a single bundle group.
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: 'sipp.SIPpTestCase'
+
+test-object-config:
+    fail-on-any: False
+    test-iterations:
+        -
+            scenarios:
+                - { 'key-args': {'scenario': 'uac-multiple-video-with-audio.xml', '-i': '127.0.0.1', '-p': '5061', '-s': 'alice'} }
+
+properties:
+    minversion: '15.0.0'
+    dependencies:
+        - sipp :
+            version : 'v3.0'
+        - asterisk : 'res_pjsip'
+    tags:
+        - pjsip
diff --git a/tests/channels/pjsip/sdp_offer_answer/incoming/nominal/multiple-media-stream/audio-video/accept/tests.yaml b/tests/channels/pjsip/sdp_offer_answer/incoming/nominal/multiple-media-stream/audio-video/accept/tests.yaml
index a2bb275..1a143f3 100644
--- a/tests/channels/pjsip/sdp_offer_answer/incoming/nominal/multiple-media-stream/audio-video/accept/tests.yaml
+++ b/tests/channels/pjsip/sdp_offer_answer/incoming/nominal/multiple-media-stream/audio-video/accept/tests.yaml
@@ -1,5 +1,6 @@
 # Enter tests here in the order they should be considered for execution:
 tests:
+    - test: 'bundled'
     - test: 'multiple-audio'
     - test: 'multiple-video'
 

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

Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia7fcefcba248d1814b2fcbffb80b3a90cda13dd0
Gerrit-Change-Number: 5982
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20170717/1ef77d0e/attachment-0001.html>


More information about the asterisk-code-review mailing list