[svn-commits] mjordan: testsuite/asterisk/trunk r5182 - in /asterisk/trunk/tests/channels/p...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Jun 26 12:21:55 CDT 2014


Author: mjordan
Date: Thu Jun 26 12:21:51 2014
New Revision: 5182

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=5182
Log:
channels/pjsip/video_calls: Add a test for fast picture update

This test verifies that when two PJSIP endpoints are in a call with video
enabled, fast picture updates can be received when one endpoint requests
an update via an INFO request.

Review: https://reviewboard.asterisk.org/r/3419/

ASTERISK-23562 #close
Reported by: Matt Jordan
patches:
  pjsip_vid_update uploaded by bford (License 6580)

Added:
    asterisk/trunk/tests/channels/pjsip/video_calls/
    asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/
    asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/configs/
    asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/configs/ast1/
    asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/configs/ast1/extensions.conf   (with props)
    asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/configs/ast1/pjsip.conf   (with props)
    asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/sipp/
    asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/sipp/receive-call.xml   (with props)
    asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/sipp/start-call.xml   (with props)
    asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/test-config.yaml   (with props)
    asterisk/trunk/tests/channels/pjsip/video_calls/tests.yaml   (with props)
Modified:
    asterisk/trunk/tests/channels/pjsip/tests.yaml

Modified: asterisk/trunk/tests/channels/pjsip/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/tests.yaml?view=diff&rev=5182&r1=5181&r2=5182
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/tests.yaml (original)
+++ asterisk/trunk/tests/channels/pjsip/tests.yaml Thu Jun 26 12:21:51 2014
@@ -22,4 +22,4 @@
     - dir: 'transfers'
     - test: 'info_dtmf'
     - test: 'call_pickup'
-
+    - dir: 'video_calls'

Added: asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/configs/ast1/extensions.conf?view=auto&rev=5182
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/configs/ast1/extensions.conf Thu Jun 26 12:21:51 2014
@@ -1,0 +1,4 @@
+[default]
+
+exten => bob,1,NoOp()
+    same => n,Dial(PJSIP/bob)

Propchange: asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:eol-style = native

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

Propchange: asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/configs/ast1/pjsip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/configs/ast1/pjsip.conf?view=auto&rev=5182
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/configs/ast1/pjsip.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/configs/ast1/pjsip.conf Thu Jun 26 12:21:51 2014
@@ -1,0 +1,32 @@
+[local]
+type=transport
+protocol=udp
+bind=0.0.0.0
+
+[endpoint_t](!)
+type=endpoint
+context=default
+transport=local
+direct_media=no
+disallow=all
+allow=ulaw,H261,H263
+
+[aor_t](!)
+type=aor
+max_contacts=1
+
+;; alice
+
+[alice](endpoint_t)
+aors=alice
+
+[alice](aor_t)
+contact=sip:alice at localhost:5061
+
+;; bob
+
+[bob](endpoint_t)
+aors=bob
+
+[bob](aor_t)
+contact=sip:bob at localhost:5062

Propchange: asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/sipp/receive-call.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/sipp/receive-call.xml?view=auto&rev=5182
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/sipp/receive-call.xml (added)
+++ asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/sipp/receive-call.xml Thu Jun 26 12:21:51 2014
@@ -1,0 +1,110 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Receive INVITE with video">
+  <Global variables="remote_tag" />
+  <recv request="INVITE" crlf="true">
+      <!-- Save the from tag. We'll need it when we send our BYE -->
+      <action>
+          <ereg regexp=".*(;tag=.*)"
+              search_in="hdr"
+              header="From:"
+              check_it="true"
+              assign_to="1,remote_tag"/>
+      </action>
+  </recv>
+
+  <Reference variables="1" />
+
+  <send>
+    <![CDATA[
+
+      SIP/2.0 180 Ringing
+      [last_Via:]
+      [last_From:]
+      [last_To:];tag=[call_number]
+      [last_Call-ID:]
+      [last_CSeq:]
+      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <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:[local_ip]:[local_port];transport=[transport]>
+      Content-Type: application/sdp
+      Content-Length: [len]
+
+      v=0
+      o=- 1324901698 1324901698 IN IP4 [local_ip]
+      s=-
+      c=IN IP4 [local_ip]
+      t=0 0
+      m=audio 2226 RTP/AVP 0 101
+      a=sendrecv
+      a=rtpmap:0 PCMU/8000
+      a=rtpmap:101 telephone-event/8000
+      m=video 6002 RTP/AVP 31 32 34
+      a=rtpmap:31 H261/90000
+      a=rtpmap:32 MPV/90000
+      a=rtpmap:34 H263/90000
+    ]]>
+  </send>
+
+  <recv request="ACK" rtd="true" crlf="true">
+  </recv>
+
+  <pause milliseconds="1000"/>
+
+  <send retrans="500">
+    <![CDATA[
+      INFO sip:alice@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: <sip:bob@[local_ip]:[local_port]>;tag=[call_number]
+      To: <sip:alice@[remote_ip]:[remote_port]>[$remote_tag]
+      [last_Call-ID:]
+      CSeq: [cseq] INFO
+      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Content-Type: application/media_control+xml
+      Content-Length: [len]
+
+      test
+    ]]>
+  </send>
+
+  <recv response="200">
+  </recv>
+
+  <pause milliseconds="1000"/>
+
+  <send retrans="500">
+    <![CDATA[
+
+      BYE sip:alice@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: <sip:bob@[local_ip]:[local_port]>;tag=[call_number]
+      To: <sip:alice@[remote_ip]:[remote_port]>[$remote_tag]
+      [last_Call-ID:]
+      CSeq: [cseq] BYE
+      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <recv response="200">
+  </recv>
+
+</scenario>

Propchange: asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/sipp/receive-call.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/sipp/receive-call.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/sipp/receive-call.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/sipp/start-call.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/sipp/start-call.xml?view=auto&rev=5182
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/sipp/start-call.xml (added)
+++ asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/sipp/start-call.xml Thu Jun 26 12:21:51 2014
@@ -1,0 +1,103 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Send INVITE with video to another endpoint">
+  <send retrans="500">
+    <![CDATA[
+      INVITE sip:bob@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: alice <sip:alice@[local_ip]:[local_port]>;tag=[call_number]
+      To: bob <sip:bob@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: [cseq] INVITE
+      Contact: sip:alice@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Content-Type: application/sdp
+      Content-Length: [len]
+
+      v=0
+      o=- 1324901698 1324901698 IN IP4 [local_ip]
+      s=-
+      c=IN IP4 [local_ip]
+      t=0 0
+      m=audio 2226 RTP/AVP 0 101
+      a=sendrecv
+      a=rtpmap:0 PCMU/8000
+      a=rtpmap:101 telephone-event/8000
+      m=video 6002 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="200">
+  </recv>
+
+  <send>
+    <![CDATA[
+      ACK sip:bob@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: <sip:alice@[local_ip]:[local_port]>;tag=[call_number]
+      To: <sip:bob@[remote_ip]:[remote_port]>[peer_tag_param]
+      CSeq: [cseq] ACK
+      Call-ID: [call_id]
+      Contact: <sip:alice@[local_ip]:[local_port]>
+      Allow: INVITE, ACK, MESSAGE, BYE
+      Max-Forwards: 70
+      Content-Length: 0
+    ]]>
+  </send>
+
+  <recv request="INFO">
+    <action>
+      <!-- Ensures that the packet is for a fast picture update -->
+      <ereg regexp="application/media_control\+xml"
+          search_in="hdr"
+          header="Content-Type:"
+          check_it="true"
+          assign_to="1"/>
+    </action>
+  </recv>
+
+  <Reference variables="1" />
+
+  <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:alice@[local_ip]:[local_port];transport=[transport]>
+      Allow: INVITE, ACK, MESSAGE, BYE
+      Content-Type: application/sdp
+      Content-Length: 0
+    ]]>
+  </send>
+
+  <recv request="BYE" crlf="true" />
+
+  <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:alice@[local_ip]:[local_port];transport=[transport]>
+      Allow: INVITE, ACK, MESSAGE, BYE
+      Content-Type: application/sdp
+      Content-Length: 0
+    ]]>
+  </send>
+
+</scenario>

Propchange: asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/sipp/start-call.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/sipp/start-call.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/sipp/start-call.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/test-config.yaml?view=auto&rev=5182
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/test-config.yaml (added)
+++ asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/test-config.yaml Thu Jun 26 12:21:51 2014
@@ -1,0 +1,42 @@
+testinfo:
+    summary: 'Tests fast picture updates with video calls using PJSIP.'
+    description:
+        Checks to see if fast picture updates are received during a video call via PJSIP.
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: 'sipp.SIPpTestCase'
+    modules:
+        -
+            config-section: 'ami-config'
+            typename: 'ami.AMIEventModule'
+
+test-object-config:
+    test-iterations:
+        -
+            scenarios:
+                # Initiates the call
+                - { 'key-args': {'scenario': 'start-call.xml', '-i': '127.0.0.1', '-p': '5061'} }
+                # Receives the call
+                - { 'key-args': {'scenario': 'receive-call.xml', '-i': '127.0.0.1', '-p': '5062'} }
+
+ami-config:
+    -
+        type: 'headermatch'
+        conditions:
+            match:
+                Event: 'TestEvent'
+                State: 'AST_CONTROL_VIDUPDATE'
+        requirements:
+            match:
+                Result: 'Success'
+        count: 1
+
+properties:
+    minversion: '12.4.0'
+    dependencies:
+        - app : 'sipp'
+        - asterisk : 'res_pjsip'
+    tags:
+        - pjsip

Propchange: asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/test-config.yaml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/test-config.yaml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/channels/pjsip/video_calls/fast_picture_update/test-config.yaml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/pjsip/video_calls/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/video_calls/tests.yaml?view=auto&rev=5182
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/video_calls/tests.yaml (added)
+++ asterisk/trunk/tests/channels/pjsip/video_calls/tests.yaml Thu Jun 26 12:21:51 2014
@@ -1,0 +1,3 @@
+# Enter tests here in the order they should be considered for execution:
+tests:
+    - test: 'fast_picture_update'

Propchange: asterisk/trunk/tests/channels/pjsip/video_calls/tests.yaml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/pjsip/video_calls/tests.yaml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/channels/pjsip/video_calls/tests.yaml
------------------------------------------------------------------------------
    svn:mime-type = text/plain




More information about the svn-commits mailing list