[asterisk-commits] kmoore: testsuite/asterisk/trunk r4237 - in /asterisk/trunk/tests/channels: S...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Sep 30 11:02:26 CDT 2013


Author: kmoore
Date: Mon Sep 30 11:02:06 2013
New Revision: 4237

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4237
Log:
Add tests for new registration options

This adds four tests comprising:
* chan_sip with 403 retry enabled
* chan_sip with 403 retry disabled
* chan_pjsip with 403 retry enabled
* chan_pjsip with 403 retry disabled

(closes issue ASTERISK-17138)
Review: https://reviewboard.asterisk.org/r/2875/

Added:
    asterisk/trunk/tests/channels/SIP/register_forbidden_retry/
    asterisk/trunk/tests/channels/SIP/register_forbidden_retry/no_retry/
    asterisk/trunk/tests/channels/SIP/register_forbidden_retry/no_retry/configs/
    asterisk/trunk/tests/channels/SIP/register_forbidden_retry/no_retry/configs/ast1/
    asterisk/trunk/tests/channels/SIP/register_forbidden_retry/no_retry/configs/ast1/sip.conf   (with props)
    asterisk/trunk/tests/channels/SIP/register_forbidden_retry/no_retry/sipp/
    asterisk/trunk/tests/channels/SIP/register_forbidden_retry/no_retry/sipp/register.xml   (with props)
    asterisk/trunk/tests/channels/SIP/register_forbidden_retry/no_retry/test-config.yaml   (with props)
    asterisk/trunk/tests/channels/SIP/register_forbidden_retry/retry/
    asterisk/trunk/tests/channels/SIP/register_forbidden_retry/retry/configs/
    asterisk/trunk/tests/channels/SIP/register_forbidden_retry/retry/configs/ast1/
    asterisk/trunk/tests/channels/SIP/register_forbidden_retry/retry/configs/ast1/sip.conf   (with props)
    asterisk/trunk/tests/channels/SIP/register_forbidden_retry/retry/sipp/
    asterisk/trunk/tests/channels/SIP/register_forbidden_retry/retry/sipp/register.xml   (with props)
    asterisk/trunk/tests/channels/SIP/register_forbidden_retry/retry/test-config.yaml   (with props)
    asterisk/trunk/tests/channels/SIP/register_forbidden_retry/tests.yaml   (with props)
    asterisk/trunk/tests/channels/pjsip/registration/outbound/
    asterisk/trunk/tests/channels/pjsip/registration/outbound/forbidden_retry/
    asterisk/trunk/tests/channels/pjsip/registration/outbound/forbidden_retry/configs/
    asterisk/trunk/tests/channels/pjsip/registration/outbound/forbidden_retry/configs/ast1/
    asterisk/trunk/tests/channels/pjsip/registration/outbound/forbidden_retry/configs/ast1/pjsip.conf   (with props)
    asterisk/trunk/tests/channels/pjsip/registration/outbound/forbidden_retry/sipp/
    asterisk/trunk/tests/channels/pjsip/registration/outbound/forbidden_retry/sipp/register-no-retry.xml   (with props)
    asterisk/trunk/tests/channels/pjsip/registration/outbound/forbidden_retry/sipp/register-retry.xml   (with props)
    asterisk/trunk/tests/channels/pjsip/registration/outbound/forbidden_retry/test-config.yaml   (with props)
    asterisk/trunk/tests/channels/pjsip/registration/outbound/tests.yaml   (with props)
Modified:
    asterisk/trunk/tests/channels/SIP/tests.yaml
    asterisk/trunk/tests/channels/pjsip/registration/tests.yaml

Added: asterisk/trunk/tests/channels/SIP/register_forbidden_retry/no_retry/configs/ast1/sip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/register_forbidden_retry/no_retry/configs/ast1/sip.conf?view=auto&rev=4237
==============================================================================
--- asterisk/trunk/tests/channels/SIP/register_forbidden_retry/no_retry/configs/ast1/sip.conf (added)
+++ asterisk/trunk/tests/channels/SIP/register_forbidden_retry/no_retry/configs/ast1/sip.conf Mon Sep 30 11:02:06 2013
@@ -1,0 +1,6 @@
+[general]
+bindaddr=[::]:5060
+
+register=>alice:blah at 127.0.0.1:5065
+register_retry_403=no
+registertimeout=10

Propchange: asterisk/trunk/tests/channels/SIP/register_forbidden_retry/no_retry/configs/ast1/sip.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/SIP/register_forbidden_retry/no_retry/configs/ast1/sip.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/channels/SIP/register_forbidden_retry/no_retry/configs/ast1/sip.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/SIP/register_forbidden_retry/no_retry/sipp/register.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/register_forbidden_retry/no_retry/sipp/register.xml?view=auto&rev=4237
==============================================================================
--- asterisk/trunk/tests/channels/SIP/register_forbidden_retry/no_retry/sipp/register.xml (added)
+++ asterisk/trunk/tests/channels/SIP/register_forbidden_retry/no_retry/sipp/register.xml Mon Sep 30 11:02:06 2013
@@ -1,0 +1,52 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Authenticating registrar">
+  <recv request="REGISTER" />
+  <send><![CDATA[
+
+      SIP/2.0 401 Authorization Required
+      [last_Via:]
+      [last_From:]
+      [last_To:];tag=[pid]SIPpTag01[call_number]
+      [last_Call-ID:]
+      [last_CSeq:]
+      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+      WWW-Authenticate: Digest realm="test.example.com", nonce="47ebe028cda119c35d4877b383027d28da013815"
+      Content-Length: [len]
+
+    ]]>
+  </send>
+  <recv request="REGISTER" >
+        <action>
+                <ereg regexp="Digest .*username=.alice" search_in="hdr" header="Authorization:" check_it="true" assign_to="1" />
+                <ereg regexp="Digest .*response=.a61abc77793124a8186a867399e5fb21" search_in="hdr" header="Authorization:" check_it="true" assign_to="2" />
+                <ereg regexp="Digest .*nonce=.47ebe028cda119c35d4877b383027d28da013815" search_in="hdr" header="Authorization:" check_it="true" assign_to="3" />
+        </action>
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      SIP/2.0 403 Forbidden
+      [last_Via:]
+      [last_From:]
+      [last_To:];tag=[pid]SIPpTag01[call_number]
+      [last_Call-ID:]
+      [last_CSeq:]
+      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+      Content-Length: [len]
+
+    ]]>
+  </send>
+
+  <pause milliseconds="20000" />
+
+  <Reference variables="1,2,3" />
+
+  <!-- definition of the response time repartition table (unit is ms)   -->
+  <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
+
+  <!-- definition of the call length repartition table (unit is ms)     -->
+  <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
+</scenario>

Propchange: asterisk/trunk/tests/channels/SIP/register_forbidden_retry/no_retry/sipp/register.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/SIP/register_forbidden_retry/no_retry/sipp/register.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/channels/SIP/register_forbidden_retry/no_retry/sipp/register.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: asterisk/trunk/tests/channels/SIP/register_forbidden_retry/no_retry/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/register_forbidden_retry/no_retry/test-config.yaml?view=auto&rev=4237
==============================================================================
--- asterisk/trunk/tests/channels/SIP/register_forbidden_retry/no_retry/test-config.yaml (added)
+++ asterisk/trunk/tests/channels/SIP/register_forbidden_retry/no_retry/test-config.yaml Mon Sep 30 11:02:06 2013
@@ -1,0 +1,28 @@
+testinfo:
+    summary:     'Test outbound registration with auth and 403 response retry enabled'
+    description: |
+        "This tests whether Asterisk will treat a 403 as a non-fatal response
+        when the register_retry_403 option is enabled and continue retrying
+        without using the old nonce."
+
+test-modules:
+    add-test-to-search-path: 'True'
+    test-object:
+        config-section: test-object-config
+        typename: 'sipp.SIPpTestCase'
+
+test-object-config:
+    test-iterations:
+        -
+            scenarios:
+                - { 'key-args': { 'scenario': 'register.xml', '-p': '5065' } }
+
+properties:
+    minversion: '13'
+    dependencies:
+        - python: 'starpy'
+        - sipp :
+            version : 'v3.1'
+        - asterisk: 'chan_sip'
+    tags:
+        - SIP

Propchange: asterisk/trunk/tests/channels/SIP/register_forbidden_retry/no_retry/test-config.yaml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/SIP/register_forbidden_retry/no_retry/test-config.yaml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/channels/SIP/register_forbidden_retry/no_retry/test-config.yaml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/SIP/register_forbidden_retry/retry/configs/ast1/sip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/register_forbidden_retry/retry/configs/ast1/sip.conf?view=auto&rev=4237
==============================================================================
--- asterisk/trunk/tests/channels/SIP/register_forbidden_retry/retry/configs/ast1/sip.conf (added)
+++ asterisk/trunk/tests/channels/SIP/register_forbidden_retry/retry/configs/ast1/sip.conf Mon Sep 30 11:02:06 2013
@@ -1,0 +1,6 @@
+[general]
+bindaddr=[::]:5060
+
+register=>alice:blah at 127.0.0.1:5065
+register_retry_403=yes
+registertimeout=10

Propchange: asterisk/trunk/tests/channels/SIP/register_forbidden_retry/retry/configs/ast1/sip.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/SIP/register_forbidden_retry/retry/configs/ast1/sip.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/channels/SIP/register_forbidden_retry/retry/configs/ast1/sip.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/SIP/register_forbidden_retry/retry/sipp/register.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/register_forbidden_retry/retry/sipp/register.xml?view=auto&rev=4237
==============================================================================
--- asterisk/trunk/tests/channels/SIP/register_forbidden_retry/retry/sipp/register.xml (added)
+++ asterisk/trunk/tests/channels/SIP/register_forbidden_retry/retry/sipp/register.xml Mon Sep 30 11:02:06 2013
@@ -1,0 +1,73 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Authenticating registrar">
+  <recv request="REGISTER" />
+  <send><![CDATA[
+
+      SIP/2.0 401 Authorization Required
+      [last_Via:]
+      [last_From:]
+      [last_To:];tag=[pid]SIPpTag01[call_number]
+      [last_Call-ID:]
+      [last_CSeq:]
+      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+      WWW-Authenticate: Digest realm="test.example.com", nonce="47ebe028cda119c35d4877b383027d28da013815"
+      Content-Length: [len]
+
+    ]]>
+  </send>
+  <recv request="REGISTER" >
+        <action>
+                <ereg regexp="Digest .*username=.alice" search_in="hdr" header="Authorization:" check_it="true" assign_to="1" />
+                <ereg regexp="Digest .*response=.a61abc77793124a8186a867399e5fb21" search_in="hdr" header="Authorization:" check_it="true" assign_to="2" />
+                <ereg regexp="Digest .*nonce=.47ebe028cda119c35d4877b383027d28da013815" search_in="hdr" header="Authorization:" check_it="true" assign_to="3" />
+        </action>
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      SIP/2.0 403 Forbidden
+      [last_Via:]
+      [last_From:]
+      [last_To:];tag=[pid]SIPpTag01[call_number]
+      [last_Call-ID:]
+      [last_CSeq:]
+      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+      Content-Length: [len]
+
+    ]]>
+  </send>
+
+  <pause milliseconds="6000" />
+
+  <recv request="REGISTER">
+        <action>
+                <ereg regexp="Authorization:" search_in="msg" check_it_inverse="true" assign_to="4" />
+        </action>
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      SIP/2.0 200 OK
+      [last_Via:]
+      [last_From:]
+      [last_To:];tag=[pid]SIPpTag01[call_number]
+      [last_Call-ID:]
+      [last_CSeq:]
+      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+      Content-Length: [len]
+
+    ]]>
+  </send>
+
+  <Reference variables="1,2,3,4" />
+
+  <!-- definition of the response time repartition table (unit is ms)   -->
+  <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
+
+  <!-- definition of the call length repartition table (unit is ms)     -->
+  <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
+</scenario>

Propchange: asterisk/trunk/tests/channels/SIP/register_forbidden_retry/retry/sipp/register.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/SIP/register_forbidden_retry/retry/sipp/register.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/channels/SIP/register_forbidden_retry/retry/sipp/register.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: asterisk/trunk/tests/channels/SIP/register_forbidden_retry/retry/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/register_forbidden_retry/retry/test-config.yaml?view=auto&rev=4237
==============================================================================
--- asterisk/trunk/tests/channels/SIP/register_forbidden_retry/retry/test-config.yaml (added)
+++ asterisk/trunk/tests/channels/SIP/register_forbidden_retry/retry/test-config.yaml Mon Sep 30 11:02:06 2013
@@ -1,0 +1,28 @@
+testinfo:
+    summary:     'Test outbound registration with auth and 403 response retry enabled'
+    description: |
+        "This tests whether Asterisk will treat a 403 as a non-fatal response
+        when the register_retry_403 option is enabled and continue retrying
+        without using the old nonce."
+
+test-modules:
+    add-test-to-search-path: 'True'
+    test-object:
+        config-section: test-object-config
+        typename: 'sipp.SIPpTestCase'
+
+test-object-config:
+    test-iterations:
+        -
+            scenarios:
+                - { 'key-args': { 'scenario': 'register.xml', '-p': '5065' } }
+
+properties:
+    minversion: '13'
+    dependencies:
+        - python: 'starpy'
+        - sipp :
+            version : 'v3.1'
+        - asterisk: 'chan_sip'
+    tags:
+        - SIP

Propchange: asterisk/trunk/tests/channels/SIP/register_forbidden_retry/retry/test-config.yaml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/SIP/register_forbidden_retry/retry/test-config.yaml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/channels/SIP/register_forbidden_retry/retry/test-config.yaml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/channels/SIP/register_forbidden_retry/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/register_forbidden_retry/tests.yaml?view=auto&rev=4237
==============================================================================
--- asterisk/trunk/tests/channels/SIP/register_forbidden_retry/tests.yaml (added)
+++ asterisk/trunk/tests/channels/SIP/register_forbidden_retry/tests.yaml Mon Sep 30 11:02:06 2013
@@ -1,0 +1,4 @@
+# Enter tests here in the order they should be considered for execution:
+tests:
+    - test: 'retry'
+    - test: 'no_retry'

Propchange: asterisk/trunk/tests/channels/SIP/register_forbidden_retry/tests.yaml
------------------------------------------------------------------------------
    svn:eol-style = native

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

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

Modified: asterisk/trunk/tests/channels/SIP/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/tests.yaml?view=diff&rev=4237&r1=4236&r2=4237
==============================================================================
--- asterisk/trunk/tests/channels/SIP/tests.yaml (original)
+++ asterisk/trunk/tests/channels/SIP/tests.yaml Mon Sep 30 11:02:06 2013
@@ -60,3 +60,4 @@
     - dir: 'session_timers'
     - test: 'path'
     - test: 'alwaysauthreject'
+    - dir: 'register_forbidden_retry'

Added: asterisk/trunk/tests/channels/pjsip/registration/outbound/forbidden_retry/configs/ast1/pjsip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/registration/outbound/forbidden_retry/configs/ast1/pjsip.conf?view=auto&rev=4237
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/registration/outbound/forbidden_retry/configs/ast1/pjsip.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/registration/outbound/forbidden_retry/configs/ast1/pjsip.conf Mon Sep 30 11:02:06 2013
@@ -1,0 +1,31 @@
+[local-transport-template](!)
+type=transport
+bind=127.0.0.1
+
+[local-transport-udp](local-transport-template)
+protocol=udp
+
+[alice-auth]
+type=auth
+auth_type=userpass
+username=alice
+password=blah
+realm=test.example.com
+
+[alice-template](!)
+type=registration
+transport=local-transport-udp
+outbound_auth=alice-auth
+retry_interval=10
+
+[alice-retry](alice-template)
+server_uri=sip:alice at 127.0.0.1:5065
+client_uri=sip:alice at 127.0.0.1
+forbidden_retry_interval=20
+
+[alice-no-retry](alice-template)
+server_uri=sip:alice at 127.0.0.1:5066
+client_uri=sip:alice at 127.0.0.1
+forbidden_retry_interval=0
+
+

Propchange: asterisk/trunk/tests/channels/pjsip/registration/outbound/forbidden_retry/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
    svn:eol-style = native

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

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

Added: asterisk/trunk/tests/channels/pjsip/registration/outbound/forbidden_retry/sipp/register-no-retry.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/registration/outbound/forbidden_retry/sipp/register-no-retry.xml?view=auto&rev=4237
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/registration/outbound/forbidden_retry/sipp/register-no-retry.xml (added)
+++ asterisk/trunk/tests/channels/pjsip/registration/outbound/forbidden_retry/sipp/register-no-retry.xml Mon Sep 30 11:02:06 2013
@@ -1,0 +1,52 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Authenticating registrar">
+  <recv request="REGISTER" />
+  <send><![CDATA[
+
+      SIP/2.0 401 Authorization Required
+      [last_Via:]
+      [last_From:]
+      [last_To:];tag=[pid]SIPpTag01[call_number]
+      [last_Call-ID:]
+      [last_CSeq:]
+      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+      WWW-Authenticate: Digest realm="test.example.com", nonce="47ebe028cda119c35d4877b383027d28da013815"
+      Content-Length: [len]
+
+    ]]>
+  </send>
+  <recv request="REGISTER" >
+        <action>
+                <ereg regexp="Digest .*username=.alice" search_in="hdr" header="Authorization:" check_it="true" assign_to="1" />
+                <ereg regexp="Digest .*response=.f2e4537a79a463484cbdf47c9688ecaa" search_in="hdr" header="Authorization:" check_it="true" assign_to="2" />
+                <ereg regexp="Digest .*nonce=.47ebe028cda119c35d4877b383027d28da013815" search_in="hdr" header="Authorization:" check_it="true" assign_to="3" />
+        </action>
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      SIP/2.0 403 Forbidden
+      [last_Via:]
+      [last_From:]
+      [last_To:];tag=[pid]SIPpTag01[call_number]
+      [last_Call-ID:]
+      [last_CSeq:]
+      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+      Content-Length: [len]
+
+    ]]>
+  </send>
+
+  <pause milliseconds="25000" />
+
+  <Reference variables="1,2,3" />
+
+  <!-- definition of the response time repartition table (unit is ms)   -->
+  <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
+
+  <!-- definition of the call length repartition table (unit is ms)     -->
+  <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
+</scenario>

Propchange: asterisk/trunk/tests/channels/pjsip/registration/outbound/forbidden_retry/sipp/register-no-retry.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/pjsip/registration/outbound/forbidden_retry/sipp/register-no-retry.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/channels/pjsip/registration/outbound/forbidden_retry/sipp/register-no-retry.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: asterisk/trunk/tests/channels/pjsip/registration/outbound/forbidden_retry/sipp/register-retry.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/registration/outbound/forbidden_retry/sipp/register-retry.xml?view=auto&rev=4237
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/registration/outbound/forbidden_retry/sipp/register-retry.xml (added)
+++ asterisk/trunk/tests/channels/pjsip/registration/outbound/forbidden_retry/sipp/register-retry.xml Mon Sep 30 11:02:06 2013
@@ -1,0 +1,73 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Authenticating registrar">
+  <recv request="REGISTER" />
+  <send><![CDATA[
+
+      SIP/2.0 401 Authorization Required
+      [last_Via:]
+      [last_From:]
+      [last_To:];tag=[pid]SIPpTag01[call_number]
+      [last_Call-ID:]
+      [last_CSeq:]
+      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+      WWW-Authenticate: Digest realm="test.example.com", nonce="47ebe028cda119c35d4877b383027d28da013815"
+      Content-Length: [len]
+
+    ]]>
+  </send>
+  <recv request="REGISTER" >
+        <action>
+                <ereg regexp="Digest .*username=.alice" search_in="hdr" header="Authorization:" check_it="true" assign_to="1" />
+                <ereg regexp="Digest .*response=.7a436814111968c5fcf13d393deca1fc" search_in="hdr" header="Authorization:" check_it="true" assign_to="2" />
+                <ereg regexp="Digest .*nonce=.47ebe028cda119c35d4877b383027d28da013815" search_in="hdr" header="Authorization:" check_it="true" assign_to="3" />
+        </action>
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      SIP/2.0 403 Forbidden
+      [last_Via:]
+      [last_From:]
+      [last_To:];tag=[pid]SIPpTag01[call_number]
+      [last_Call-ID:]
+      [last_CSeq:]
+      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+      Content-Length: [len]
+
+    ]]>
+  </send>
+
+  <pause milliseconds="16000" />
+
+  <recv request="REGISTER">
+        <action>
+                <ereg regexp="Authorization:" search_in="msg" check_it_inverse="true" assign_to="4" />
+        </action>
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      SIP/2.0 200 OK
+      [last_Via:]
+      [last_From:]
+      [last_To:];tag=[pid]SIPpTag01[call_number]
+      [last_Call-ID:]
+      [last_CSeq:]
+      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+      Content-Length: [len]
+
+    ]]>
+  </send>
+
+  <Reference variables="1,2,3,4" />
+
+  <!-- definition of the response time repartition table (unit is ms)   -->
+  <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
+
+  <!-- definition of the call length repartition table (unit is ms)     -->
+  <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
+</scenario>

Propchange: asterisk/trunk/tests/channels/pjsip/registration/outbound/forbidden_retry/sipp/register-retry.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/channels/pjsip/registration/outbound/forbidden_retry/sipp/register-retry.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/channels/pjsip/registration/outbound/forbidden_retry/sipp/register-retry.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: asterisk/trunk/tests/channels/pjsip/registration/outbound/forbidden_retry/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/registration/outbound/forbidden_retry/test-config.yaml?view=auto&rev=4237
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/registration/outbound/forbidden_retry/test-config.yaml (added)
+++ asterisk/trunk/tests/channels/pjsip/registration/outbound/forbidden_retry/test-config.yaml Mon Sep 30 11:02:06 2013
@@ -1,0 +1,31 @@
+testinfo:
+    summary:     'Test outbound registration with auth and 403 response retry'
+    description: |
+        "This tests whether Asterisk will treat a 403 as a non-fatal response
+        when the register_retry_403 option is enabled and continue retrying
+        without using the old nonce and that it will not retry with the option
+        disabled."
+
+test-modules:
+    add-test-to-search-path: 'True'
+    test-object:
+        config-section: test-object-config
+        typename: 'sipp.SIPpTestCase'
+
+test-object-config:
+    reactor-timeout: 50
+    test-iterations:
+        -
+            scenarios:
+                - { 'key-args': { 'scenario': 'register-retry.xml', '-p': '5065' } }
+                - { 'key-args': { 'scenario': 'register-no-retry.xml', '-p': '5066' } }
+
+properties:
+    minversion: '13'
+    dependencies:
+        - python: 'starpy'
+        - sipp :
+            version : 'v3.1'
+        - asterisk: 'chan_pjsip'
+    tags:
+        - pjsip

Propchange: asterisk/trunk/tests/channels/pjsip/registration/outbound/forbidden_retry/test-config.yaml
------------------------------------------------------------------------------
    svn:eol-style = native

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

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

Added: asterisk/trunk/tests/channels/pjsip/registration/outbound/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/registration/outbound/tests.yaml?view=auto&rev=4237
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/registration/outbound/tests.yaml (added)
+++ asterisk/trunk/tests/channels/pjsip/registration/outbound/tests.yaml Mon Sep 30 11:02:06 2013
@@ -1,0 +1,3 @@
+# Enter tests here in the order they should be considered for execution:
+tests:
+    - test: 'forbidden_retry'

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

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

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

Modified: asterisk/trunk/tests/channels/pjsip/registration/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/registration/tests.yaml?view=diff&rev=4237&r1=4236&r2=4237
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/registration/tests.yaml (original)
+++ asterisk/trunk/tests/channels/pjsip/registration/tests.yaml Mon Sep 30 11:02:06 2013
@@ -1,3 +1,4 @@
 # Enter tests here in the order they should be considered for execution:
 tests:
     - dir: 'inbound'
+    - dir: 'outbound'




More information about the asterisk-commits mailing list