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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Feb 17 09:39:55 CST 2014


Author: mmichelson
Date: Mon Feb 17 09:39:52 2014
New Revision: 4715

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4715
Log:
Add a test for storage of User-Agent in res_pjsip_registrar.


Added:
    asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/user_agent/
    asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/user_agent/configs/
    asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/user_agent/configs/ast1/
    asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/user_agent/configs/ast1/pjsip.conf   (with props)
    asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/user_agent/sipp/
    asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/user_agent/sipp/alice-register.xml   (with props)
    asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/user_agent/test-config.yaml   (with props)
Modified:
    asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/tests.yaml

Modified: asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/tests.yaml?view=diff&rev=4715&r1=4714&r2=4715
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/tests.yaml (original)
+++ asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/tests.yaml Mon Feb 17 09:39:52 2014
@@ -6,3 +6,4 @@
     - dir: 'single_contact'
     - dir: 'unregister'
     - test: 'path'
+    - test: 'user_agent'

Added: asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/user_agent/configs/ast1/pjsip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/user_agent/configs/ast1/pjsip.conf?view=auto&rev=4715
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/user_agent/configs/ast1/pjsip.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/user_agent/configs/ast1/pjsip.conf Mon Feb 17 09:39:52 2014
@@ -1,0 +1,11 @@
+[local-transport]
+type=transport
+bind=127.0.0.1:5060
+
+[alice]
+type=endpoint
+aors=alice
+
+[alice]
+type=aor
+max_contacts=10

Propchange: asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/user_agent/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/user_agent/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/user_agent/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/user_agent/sipp/alice-register.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/user_agent/sipp/alice-register.xml?view=auto&rev=4715
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/user_agent/sipp/alice-register.xml (added)
+++ asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/user_agent/sipp/alice-register.xml Mon Feb 17 09:39:52 2014
@@ -1,0 +1,75 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Basic Sipstone UAC">
+    <send retrans="500">
+        <![CDATA[
+
+        REGISTER sip:[remote_ip]:[remote_port] SIP/2.0
+        Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+        From: "[service]" <sip:[service]@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number]
+        To: "[service]" <sip:[service]@[remote_ip]:[remote_port]>
+        Call-ID: [call_id]
+        CSeq: 1 REGISTER
+        Max-Forwards: 70
+        Contact: <sip:[service]@[local_ip]:[local_port]>;transport=[transport]
+        Subject: Performance Test
+        User-Agent: Type A
+        Expires: 60
+        Content-Length: 0
+
+        ]]>
+    </send>
+
+    <recv response="200" rtd="true">
+    </recv>
+
+    <pause/>
+
+    <send retrans="500">
+        <![CDATA[
+
+        REGISTER sip:[remote_ip]:[remote_port] SIP/2.0
+        Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+        From: "[service]" <sip:[service]@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number]
+        To: "[service]" <sip:[service]@[remote_ip]:[remote_port]>
+        Call-ID: [call_id]
+        CSeq: 2 REGISTER
+        Max-Forwards: 70
+        Contact: <sip:[service]@[local_ip]:[local_port]>;transport=[transport]
+        Subject: Performance Test
+        User-Agent: Type B
+        Expires: 60
+        Content-Length: 0
+
+        ]]>
+    </send>
+
+    <recv response="200" rtd="true">
+    </recv>
+
+    <pause/>
+
+    <send retrans="500">
+        <![CDATA[
+
+        REGISTER sip:[remote_ip]:[remote_port] SIP/2.0
+        Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+        From: "[service]" <sip:[service]@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number]
+        To: "[service]" <sip:[service]@[remote_ip]:[remote_port]>
+        Call-ID: [call_id]
+        CSeq: 3 REGISTER
+        Max-Forwards: 70
+        Contact: <sip:[service]@[local_ip]:[local_port]>;transport=[transport]
+        Subject: Performance Test
+        User-Agent: Type C
+        Expires: 0
+        Content-Length: 0
+
+        ]]>
+    </send>
+
+    <recv response="200" rtd="true">
+    </recv>
+
+</scenario>

Propchange: asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/user_agent/sipp/alice-register.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/user_agent/sipp/alice-register.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/user_agent/sipp/alice-register.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/user_agent/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/user_agent/test-config.yaml?view=auto&rev=4715
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/user_agent/test-config.yaml (added)
+++ asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/user_agent/test-config.yaml Mon Feb 17 09:39:52 2014
@@ -1,0 +1,78 @@
+testinfo:
+    summary:     'Register a contact to an AOR and ensure the User-Agent header is properly read.'
+    description: |
+        'Alice sends a REGISTER that binds sip:alice at 127.0.0.1:5061 to sip:alice at 127.0.0.1.
+         The User-Agent header of this first REGISTER is set to "Type A". Alice later re-registers
+         the same contact but using User-Agent "Type B". We ensure after both REGISTERs that
+         the stored user agent matches our expecations. Alice then unregisters the contact with
+         User-Agent "Type C". Since this is removing a previously-established contact, we expect
+         that the contact being removed still has "Type B" set as the User-Agent.'
+
+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:
+                - { 'key-args': {'scenario': 'alice-register.xml', '-i': '127.0.0.1', '-p': '5061', '-s': 'alice', '-d': '3000'} }
+
+ami-config:
+    -
+        type: 'headermatch'
+        id: '0'
+        conditions:
+            match:
+                Event: 'TestEvent'
+                State: 'AOR_CONTACT_ADDED'
+                AOR: 'alice'
+        requirements:
+            match:
+                Contact: 'sip:alice at 127.0.0.1:5061'
+                Expiration: '60'
+                UserAgent: 'Type A'
+        count: '1'
+    -
+        type: 'headermatch'
+        id: '0'
+        conditions:
+            match:
+                Event: 'TestEvent'
+                State: 'AOR_CONTACT_REFRESHED'
+                AOR: 'alice'
+        requirements:
+            match:
+                Contact: 'sip:alice at 127.0.0.1:5061'
+                Expiration: '60'
+                UserAgent: 'Type B'
+        count: '1'
+    -
+        type: 'headermatch'
+        id: '0'
+        conditions:
+            match:
+                Event: 'TestEvent'
+                State: 'AOR_CONTACT_REMOVED'
+                AOR: 'alice'
+        requirements:
+            match:
+                Contact: 'sip:alice at 127.0.0.1:5061'
+                UserAgent: 'Type B'
+        count: '1'
+
+properties:
+    minversion: '12.2.0'
+    dependencies:
+        - buildoption: 'TEST_FRAMEWORK'
+        - python: 'twisted'
+        - python: 'starpy'
+        - asterisk: 'res_pjsip'
+    tags:
+        - pjsip
+

Propchange: asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/user_agent/test-config.yaml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/user_agent/test-config.yaml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/user_agent/test-config.yaml
------------------------------------------------------------------------------
    svn:mime-type = text/plain




More information about the asterisk-commits mailing list