[asterisk-commits] mmichelson: testsuite/asterisk/trunk r5596 - in /asterisk/trunk/tests/channel...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Sep 18 13:24:28 CDT 2014


Author: mmichelson
Date: Thu Sep 18 13:24:25 2014
New Revision: 5596

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=5596
Log:
Add test that verifies Asterisk rejects subscriptions with mismatched Events and Accept types.


Added:
    asterisk/trunk/tests/channels/pjsip/subscriptions/mismatch/
    asterisk/trunk/tests/channels/pjsip/subscriptions/mismatch/configs/
    asterisk/trunk/tests/channels/pjsip/subscriptions/mismatch/configs/ast1/
    asterisk/trunk/tests/channels/pjsip/subscriptions/mismatch/configs/ast1/pjsip.conf   (with props)
    asterisk/trunk/tests/channels/pjsip/subscriptions/mismatch/sipp/
    asterisk/trunk/tests/channels/pjsip/subscriptions/mismatch/sipp/subscribe.xml   (with props)
    asterisk/trunk/tests/channels/pjsip/subscriptions/mismatch/test-config.yaml   (with props)

Added: asterisk/trunk/tests/channels/pjsip/subscriptions/mismatch/configs/ast1/pjsip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/subscriptions/mismatch/configs/ast1/pjsip.conf?view=auto&rev=5596
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/subscriptions/mismatch/configs/ast1/pjsip.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/subscriptions/mismatch/configs/ast1/pjsip.conf Thu Sep 18 13:24:25 2014
@@ -1,0 +1,6 @@
+[main-transport]
+type=transport
+bind = 127.0.0.1
+
+[alice]
+type=endpoint

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

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

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

Added: asterisk/trunk/tests/channels/pjsip/subscriptions/mismatch/sipp/subscribe.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/subscriptions/mismatch/sipp/subscribe.xml?view=auto&rev=5596
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/subscriptions/mismatch/sipp/subscribe.xml (added)
+++ asterisk/trunk/tests/channels/pjsip/subscriptions/mismatch/sipp/subscribe.xml Thu Sep 18 13:24:25 2014
@@ -1,0 +1,103 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Subscribe">
+  <send retrans="500">
+    <![CDATA[
+      SUBSCRIBE sip:resource@[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=[pid]SIPpTag00[call_number]
+      To: <sip:resource@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 1 SUBSCRIBE
+      Contact: "alice" <sip:alice@[local_ip]:[local_port]>
+      Expires: 3600
+      Max-Forwards: 70
+      Event: message-summary
+      Accept: application/pidf+xml
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <recv response="489" rtd="true" />
+
+  <send retrans="500">
+    <![CDATA[
+      SUBSCRIBE sip:resource@[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=[pid]SIPpTag00[call_number]
+      To: <sip:resource@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 1 SUBSCRIBE
+      Contact: "alice" <sip:alice@[local_ip]:[local_port]>
+      Expires: 3600
+      Max-Forwards: 70
+      Event: message-summary
+      Accept: application/xpidf+xml
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <recv response="489" rtd="true" />
+
+  <send retrans="500">
+    <![CDATA[
+      SUBSCRIBE sip:resource@[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=[pid]SIPpTag00[call_number]
+      To: <sip:resource@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 1 SUBSCRIBE
+      Contact: "alice" <sip:alice@[local_ip]:[local_port]>
+      Expires: 3600
+      Max-Forwards: 70
+      Event: message-summary
+      Accept: application/dialog-info+xml
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <recv response="489" rtd="true" />
+  <send retrans="500">
+    <![CDATA[
+      SUBSCRIBE sip:resource@[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=[pid]SIPpTag00[call_number]
+      To: <sip:resource@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 1 SUBSCRIBE
+      Contact: "alice" <sip:alice@[local_ip]:[local_port]>
+      Expires: 3600
+      Max-Forwards: 70
+      Event: presence
+      Accept: application/simple-message-summary
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <recv response="489" rtd="true" />
+  <send retrans="500">
+    <![CDATA[
+      SUBSCRIBE sip:resource@[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=[pid]SIPpTag00[call_number]
+      To: <sip:resource@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 1 SUBSCRIBE
+      Contact: "alice" <sip:alice@[local_ip]:[local_port]>
+      Expires: 3600
+      Max-Forwards: 70
+      Event: dialog
+      Accept: application/simple-message-summary
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <recv response="489" rtd="true" />
+
+</scenario>

Propchange: asterisk/trunk/tests/channels/pjsip/subscriptions/mismatch/sipp/subscribe.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/pjsip/subscriptions/mismatch/sipp/subscribe.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/channels/pjsip/subscriptions/mismatch/sipp/subscribe.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/pjsip/subscriptions/mismatch/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/subscriptions/mismatch/test-config.yaml?view=auto&rev=5596
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/subscriptions/mismatch/test-config.yaml (added)
+++ asterisk/trunk/tests/channels/pjsip/subscriptions/mismatch/test-config.yaml Thu Sep 18 13:24:25 2014
@@ -1,0 +1,42 @@
+testinfo:
+    summary: 'Ensure that subscriptions with mismatched event and accept headers are rejected.'
+    description: |
+        'A SIPp test attempts multiple subscriptions where the Event and Accept headers do not
+        mesh properly. Each of these attempts should be rejected by Asterisk. The following
+        combinations are attempted:
+            * Event: message-summary, Accept: application/pidf+xml
+            * Event: message-summary, Accept: application/xpidf+xml
+            * Event: message-summary, Accept: application/dialog-info+xml
+            * Event: presence, Accept: application/simple-message-summary
+            * Event: dialog, Accept: application/simple-message-summary'
+
+properties:
+    minversion: '12.5.0'
+    dependencies:
+        - sipp:
+            version: 'v3.0'
+        - python: 'twisted'
+        - python: 'starpy'
+        - asterisk: 'res_pjsip'
+        - asterisk: 'res_pjsip_pubsub'
+        - asterisk: 'res_pjsip_exten_state'
+        - asterisk: 'res_pjsip_mwi'
+        - asterisk: 'res_pjsip_pidf_body_generator'
+        - asterisk: 'res_pjsip_xpidf_body_generator'
+        - asterisk: 'res_pjsip_dialog_info_body_generator'
+        - asterisk: 'res_pjsip_mwi_body_generator'
+    tags:
+        - pjsip
+
+test-modules:
+    test-object:
+        config-section: sipp-config
+        typename: 'sipp.SIPpTestCase'
+
+sipp-config:
+    reactor-timeout: 30
+    fail-on-any: True
+    test-iterations:
+        -
+            scenarios:
+                - { 'key-args': {'scenario': 'subscribe.xml', '-p': '5061'} }

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

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

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




More information about the asterisk-commits mailing list