[svn-commits] jbigelow: branch group/pimp_my_sip r3771 - in /asterisk/team/group/pimp_my_si...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu May 9 15:40:47 CDT 2013


Author: jbigelow
Date: Thu May  9 15:40:44 2013
New Revision: 3771

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=3771
Log:
Add chan_gulp test for authentication failures of off nominal incoming calls

This test sends various calls to res_sip for which authentication is expected
to fail. This tests using the wrong username, password (including md5), and
realm with IPv4/IPv6 and UDP/TCP.

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


Added:
    asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/
    asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/
    asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/configs/
    asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/configs/ast1/
    asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/configs/ast1/extensions.conf   (with props)
    asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/configs/ast1/res_sip.conf   (with props)
    asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/sipp/
    asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/sipp/credentials-wrong_pass.csv   (with props)
    asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/sipp/credentials-wrong_realm.csv   (with props)
    asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/sipp/credentials-wrong_user.csv   (with props)
    asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/sipp/playback_with_initial_sdp.xml   (with props)
    asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/test-config.yaml   (with props)
    asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/tests.yaml   (with props)
    asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/
    asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/configs/
    asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/configs/ast1/
    asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/configs/ast1/extensions.conf   (with props)
    asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/configs/ast1/res_sip.conf   (with props)
    asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/sipp/
    asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/sipp/credentials-wrong_pass.csv   (with props)
    asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/sipp/credentials-wrong_realm.csv   (with props)
    asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/sipp/credentials-wrong_user.csv   (with props)
    asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/sipp/playback_with_initial_sdp.xml   (with props)
    asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/test-config.yaml   (with props)
Modified:
    asterisk/team/group/pimp_my_sip/lib/python/asterisk/sipp.py
    asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/tests.yaml

Modified: asterisk/team/group/pimp_my_sip/lib/python/asterisk/sipp.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/pimp_my_sip/lib/python/asterisk/sipp.py?view=diff&rev=3771&r1=3770&r2=3771
==============================================================================
--- asterisk/team/group/pimp_my_sip/lib/python/asterisk/sipp.py (original)
+++ asterisk/team/group/pimp_my_sip/lib/python/asterisk/sipp.py Thu May  9 15:40:44 2013
@@ -498,6 +498,9 @@
         # correct the path specified by -slave_cfg
         if '-slave_cfg' in default_args:
             default_args['-slave_cfg'] = '%s/sipp/%s' % (self.test_dir, default_args['-slave_cfg'])
+
+        if '-inf' in default_args:
+            default_args['-inf'] = '%s/sipp/%s' % (self.test_dir, default_args['-inf'])
 
         for (key, val) in default_args.items():
             sipp_args.extend([ key, val ])

Added: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/configs/ast1/extensions.conf?view=auto&rev=3771
==============================================================================
--- asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/configs/ast1/extensions.conf (added)
+++ asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/configs/ast1/extensions.conf Thu May  9 15:40:44 2013
@@ -1,0 +1,4 @@
+[default]
+exten => playback,1,Answer()
+same  =>          n,Playback(hello-world)
+same  =>          n,Hangup()

Propchange: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/configs/ast1/res_sip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/configs/ast1/res_sip.conf?view=auto&rev=3771
==============================================================================
--- asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/configs/ast1/res_sip.conf (added)
+++ asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/configs/ast1/res_sip.conf Thu May  9 15:40:44 2013
@@ -1,0 +1,51 @@
+[local-transport-template](!)
+type=transport
+bind=127.0.0.1
+
+[local-transport6-template](!)
+type=transport
+bind=[::1]
+
+[local-transport-udp](local-transport-template)
+protocol=udp
+
+[local-transport-udp6](local-transport6-template)
+protocol=udp
+
+[local-transport-tcp](local-transport-template)
+protocol=tcp
+
+[local-transport-tcp6](local-transport6-template)
+protocol=tcp
+
+[endpoint-template](!)
+type=endpoint
+context=default
+allow=!all,ulaw,alaw
+
+; alice is the caller
+[alice](endpoint-template)
+; Place alice-specific options here
+auth=alice-auth
+
+; bob is the recipient of outbound calls
+[bob](endpoint-template)
+host=127.0.0.1:5062
+; Place bob-specific options here
+
+[auth-template](!)
+type=auth
+
+[alice-auth](auth-template)
+username=alice
+auth_type=md5
+md5_cred=c9b9e23e2160fd69b19f99116da19711
+; Place alice-specific auth options here
+
+[bob-auth](auth-template)
+username=bob
+; Place bob-specific auth options here
+; Note: in the first iteration of tests on
+; this page, there will never be any bob-specific
+; auth options because we do not respond properly
+; to auth challenges.

Propchange: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/configs/ast1/res_sip.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/configs/ast1/res_sip.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/configs/ast1/res_sip.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/sipp/credentials-wrong_pass.csv
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/sipp/credentials-wrong_pass.csv?view=auto&rev=3771
==============================================================================
--- asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/sipp/credentials-wrong_pass.csv (added)
+++ asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/sipp/credentials-wrong_pass.csv Thu May  9 15:40:44 2013
@@ -1,0 +1,2 @@
+SEQUENTIAL
+password

Propchange: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/sipp/credentials-wrong_pass.csv
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/sipp/credentials-wrong_pass.csv
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/sipp/credentials-wrong_pass.csv
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/sipp/credentials-wrong_realm.csv
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/sipp/credentials-wrong_realm.csv?view=auto&rev=3771
==============================================================================
--- asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/sipp/credentials-wrong_realm.csv (added)
+++ asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/sipp/credentials-wrong_realm.csv Thu May  9 15:40:44 2013
@@ -1,0 +1,2 @@
+SEQUENTIAL
+realm;ampersand

Propchange: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/sipp/credentials-wrong_realm.csv
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/sipp/credentials-wrong_realm.csv
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/sipp/credentials-wrong_realm.csv
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/sipp/credentials-wrong_user.csv
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/sipp/credentials-wrong_user.csv?view=auto&rev=3771
==============================================================================
--- asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/sipp/credentials-wrong_user.csv (added)
+++ asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/sipp/credentials-wrong_user.csv Thu May  9 15:40:44 2013
@@ -1,0 +1,2 @@
+SEQUENTIAL
+username

Propchange: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/sipp/credentials-wrong_user.csv
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/sipp/credentials-wrong_user.csv
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/sipp/credentials-wrong_user.csv
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/sipp/playback_with_initial_sdp.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/sipp/playback_with_initial_sdp.xml?view=auto&rev=3771
==============================================================================
--- asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/sipp/playback_with_initial_sdp.xml (added)
+++ asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/sipp/playback_with_initial_sdp.xml Thu May  9 15:40:44 2013
@@ -1,0 +1,179 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Call using wrong username, password, and realm">
+  <!--
+  Get and store what we are testing for this call in a variable and test
+  the variable. The $wrongauthresult will be set to either true or false.
+  -->
+  <nop>
+     <action>
+       <assignstr assign_to="wrongauthtype" value="[field0]" />
+       <strcmp variable="wrongauthtype" value="realm" assign_to="res" />
+       <test variable="res" compare="equal" value="0" assign_to="wrongauthtyperesult" />
+     </action>
+  </nop>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INVITE sip:playback@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:alice@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 1 INVITE
+      Contact: <sip:alice@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Test
+      User-Agent: Test
+      Content-Type: application/sdp
+      Content-Length: [len]
+
+      v=0
+      o=phoneA 53655765 2353687637 IN IP[local_ip_type] [local_ip]
+      s=-
+      c=IN IP[media_ip_type] [media_ip]
+      t=0 0
+      m=audio 6000 RTP/AVP 0
+      a=rtpmap:0 PCMU/8000
+
+    ]]>
+  </send>
+
+  <recv response="401" auth="true">
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      ACK sip:playback@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:alice@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 1 ACK
+      Contact: <sip:alice@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <!-- If $wrongauthtyperesult is true then go to label ID "1". Otherwise continue below -->
+  <nop next="1" test="wrongauthtyperesult">
+     <action>
+     </action>
+  </nop>
+
+  <!-- Go to label ID "100" since we're not using a wrong realm for this execution. -->
+  <nop next="100">
+     <action>
+     </action>
+  </nop>
+
+  <label id="1"/>
+
+  <!-- Store the Authentication header in a variable -->
+  <nop>
+     <action>
+       <assignstr assign_to="origauthrsphdr" value="[authentication]" />
+     </action>
+  </nop>
+
+  <!-- ====================================================== -->
+  <!-- START: Change realm in the authorization that we send. -->
+  <!--        This does NOT re-calculate the response digest  -->
+  <!--	      for the new realm we specify due to SIPp        -->
+  <!--	      limitations!                                    -->
+  <!-- ====================================================== -->
+
+  <!-- Store the Authorization line starting at the beginning of the line to the realm -->
+  <nop>
+     <action>
+       <!--
+            SIPp does not like XML escapes such as '&quot;' or surrounding
+            things in single quotes. However it will accept and properly
+            process things escaped with a '\'. So to match a double quote in
+            the regex a '.' is used.
+       -->
+       <ereg regexp="Authorization:.*realm=." search_in="var" variable="origauthrsphdr" assign_to="beforerealm" />
+     </action>
+  </nop>
+
+  <!-- Store the Authorization line starting at the end of the realm to the end of the line -->
+  <nop>
+     <action>
+       <ereg regexp=".,cnonce=.*" search_in="var" variable="origauthrsphdr" assign_to="afterrealm" />
+     </action>
+  </nop>
+
+  <!-- Construct our new Authorization header containing the wrong realm read in from the injection file -->
+  <nop>
+     <action>
+       <assignstr assign_to="ourauthrsphdr" value="[$beforerealm][field1][$afterrealm]" />
+     </action>
+  </nop>
+
+  <!-- Send INVITE using the wrong realm. Then go to label ID "2". -->
+  <send retrans="500" next="2">
+    <![CDATA[
+
+      INVITE sip:playback@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:alice@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 2 INVITE
+      Contact: <sip:alice@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      [$ourauthrsphdr]
+      Subject: Test
+      User-Agent: Test
+      Content-Length: 0
+      X-Test-Original-Auth: [$origauthrsphdr]
+      X-Test-Credential-Info: Using the wrong [$wrongauthtype]
+    ]]>
+  </send>
+
+  <!-- =================================================== -->
+  <!-- END: Change realm in the authorization that we send -->
+  <!-- =================================================== -->
+
+  <!-- If either the username or password were wrong then execution continues here -->
+  <label id="100"/>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INVITE sip:playback@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:alice@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 2 INVITE
+      Contact: <sip:alice@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      [authentication]
+      Subject: Test
+      User-Agent: Test
+      Content-Length: 0
+      X-Test-Credential-Info: Using the wrong [$wrongauthtype]
+    ]]>
+  </send>
+
+  <!-- If the realm was changed then we continue here. -->
+  <label id="2"/>
+
+  <recv response="401">
+  </recv>
+
+  <!-- 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/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/sipp/playback_with_initial_sdp.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/sipp/playback_with_initial_sdp.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/sipp/playback_with_initial_sdp.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/test-config.yaml?view=auto&rev=3771
==============================================================================
--- asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/test-config.yaml (added)
+++ asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/test-config.yaml Thu May  9 15:40:44 2013
@@ -1,0 +1,54 @@
+testinfo:
+    summary:     'Tests authentication failures for incoming calls'
+    description: |
+        'Run SIPp scenarios that send various calls to res_sip for which
+         authentication should fail. This tests using the wrong username,
+         password, and realm with IPv4/IPv6 and UDP/TCP. Note: the realm
+         test simply changes the realm and does not recalculate the response
+         digest due to SIPp limitations.'
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: 'sipp.SIPpTestCase'
+
+test-object-config:
+    fail-on-any: False
+    test-iterations:
+        -
+            scenarios:
+                # IPv4 & UDP - wrong password
+                - { 'key-args': {'scenario': 'playback_with_initial_sdp.xml', '-i': '127.0.0.1', '-p': '5061', '-au': 'alice', '-ap': 'halibut', '-inf': 'credentials-wrong_pass.csv'} }
+                # IPv4 & UDP - wrong username
+                - { 'key-args': {'scenario': 'playback_with_initial_sdp.xml', '-i': '127.0.0.1', '-p': '5062', '-au': 'carol', '-ap': 'swordfish', '-inf': 'credentials-wrong_user.csv'} }
+                # IPv4 & UDP - wrong realm
+                - { 'key-args': {'scenario': 'playback_with_initial_sdp.xml', '-i': '127.0.0.1', '-p': '5063', '-au': 'alice', '-ap': 'swordfish', '-inf': 'credentials-wrong_realm.csv'} }
+
+                # IPv4 & TCP - wrong password
+                - { 'key-args': {'scenario': 'playback_with_initial_sdp.xml', '-i': '127.0.0.1', '-p': '5064', '-au': 'alice', '-ap': 'halibut', '-inf': 'credentials-wrong_pass.csv', '-t': 't1'} }
+                # IPv4 & TCP - wrong username
+                - { 'key-args': {'scenario': 'playback_with_initial_sdp.xml', '-i': '127.0.0.1', '-p': '5065', '-au': 'carol', '-ap': 'swordfish', '-inf': 'credentials-wrong_user.csv', '-t': 't1'} }
+                # IPv4 & TCP - wrong realm
+                - { 'key-args': {'scenario': 'playback_with_initial_sdp.xml', '-i': '127.0.0.1', '-p': '5066', '-au': 'alice', '-ap': 'swordfish', '-inf': 'credentials-wrong_realm.csv', '-t': 't1'} }
+
+                # IPv6 & UDP - wrong password
+                - { 'key-args': {'scenario': 'playback_with_initial_sdp.xml', 'target': '[::1]', '-i': '[::1]', '-p': '5067', '-au': 'alice', '-ap': 'halibut', '-inf': 'credentials-wrong_pass.csv'} }
+                # IPv6 & UDP - wrong username
+                - { 'key-args': {'scenario': 'playback_with_initial_sdp.xml', 'target': '[::1]', '-i': '[::1]', '-p': '5068', '-au': 'carol', '-ap': 'swordfish', '-inf': 'credentials-wrong_user.csv'} }
+                # IPv6 & UDP - wrong realm
+                - { 'key-args': {'scenario': 'playback_with_initial_sdp.xml', 'target': '[::1]', '-i': '[::1]', '-p': '5069', '-au': 'alice', '-ap': 'swordfish', '-inf': 'credentials-wrong_realm.csv'} }
+
+                # IPv6 & TCP - wrong password
+                - { 'key-args': {'scenario': 'playback_with_initial_sdp.xml', 'target': '[::1]', '-i': '[::1]', '-p': '5070', '-au': 'alice', '-ap': 'halibut', '-inf': 'credentials-wrong_pass.csv', '-t': 't1'} }
+                # IPv6 & TCP - wrong username
+                - { 'key-args': {'scenario': 'playback_with_initial_sdp.xml', 'target': '[::1]', '-i': '[::1]', '-p': '5071', '-au': 'carol', '-ap': 'swordfish', '-inf': 'credentials-wrong_user.csv', '-t': 't1'} }
+                # IPv6 & TCP - wrong realm
+                - { 'key-args': {'scenario': 'playback_with_initial_sdp.xml', 'target': '[::1]', '-i': '[::1]', '-p': '5072', '-au': 'alice', '-ap': 'swordfish', '-inf': 'credentials-wrong_realm.csv', '-t': 't1'} }
+
+properties:
+    minversion: '12.0.0'
+    dependencies:
+        - sipp :
+            version : 'v3.3'
+    tags:
+        - gulp

Propchange: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/test-config.yaml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/test-config.yaml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/md5/test-config.yaml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/tests.yaml?view=auto&rev=3771
==============================================================================
--- asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/tests.yaml (added)
+++ asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/tests.yaml Thu May  9 15:40:44 2013
@@ -1,0 +1,3 @@
+tests:
+    - test: 'userpass'
+    - test: 'md5'

Propchange: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/tests.yaml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/tests.yaml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/tests.yaml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/configs/ast1/extensions.conf?view=auto&rev=3771
==============================================================================
--- asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/configs/ast1/extensions.conf (added)
+++ asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/configs/ast1/extensions.conf Thu May  9 15:40:44 2013
@@ -1,0 +1,4 @@
+[default]
+exten => playback,1,Answer()
+same  =>          n,Playback(hello-world)
+same  =>          n,Hangup()

Propchange: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/configs/ast1/res_sip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/configs/ast1/res_sip.conf?view=auto&rev=3771
==============================================================================
--- asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/configs/ast1/res_sip.conf (added)
+++ asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/configs/ast1/res_sip.conf Thu May  9 15:40:44 2013
@@ -1,0 +1,50 @@
+[local-transport-template](!)
+type=transport
+bind=127.0.0.1
+
+[local-transport6-template](!)
+type=transport
+bind=[::1]
+
+[local-transport-udp](local-transport-template)
+protocol=udp
+
+[local-transport-udp6](local-transport6-template)
+protocol=udp
+
+[local-transport-tcp](local-transport-template)
+protocol=tcp
+
+[local-transport-tcp6](local-transport6-template)
+protocol=tcp
+
+[endpoint-template](!)
+type=endpoint
+context=default
+allow=!all,ulaw,alaw
+
+; alice is the caller
+[alice](endpoint-template)
+; Place alice-specific options here
+auth=alice-auth
+
+; bob is the recipient of outbound calls
+[bob](endpoint-template)
+host=127.0.0.1:5062
+; Place bob-specific options here
+
+[auth-template](!)
+type=auth
+
+[alice-auth](auth-template)
+username=alice
+password=swordfish
+; Place alice-specific auth options here
+
+[bob-auth](auth-template)
+username=bob
+; Place bob-specific auth options here
+; Note: in the first iteration of tests on
+; this page, there will never be any bob-specific
+; auth options because we do not respond properly
+; to auth challenges.

Propchange: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/configs/ast1/res_sip.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/configs/ast1/res_sip.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/configs/ast1/res_sip.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/sipp/credentials-wrong_pass.csv
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/sipp/credentials-wrong_pass.csv?view=auto&rev=3771
==============================================================================
--- asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/sipp/credentials-wrong_pass.csv (added)
+++ asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/sipp/credentials-wrong_pass.csv Thu May  9 15:40:44 2013
@@ -1,0 +1,2 @@
+SEQUENTIAL
+password

Propchange: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/sipp/credentials-wrong_pass.csv
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/sipp/credentials-wrong_pass.csv
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/sipp/credentials-wrong_pass.csv
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/sipp/credentials-wrong_realm.csv
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/sipp/credentials-wrong_realm.csv?view=auto&rev=3771
==============================================================================
--- asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/sipp/credentials-wrong_realm.csv (added)
+++ asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/sipp/credentials-wrong_realm.csv Thu May  9 15:40:44 2013
@@ -1,0 +1,2 @@
+SEQUENTIAL
+realm;ampersand

Propchange: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/sipp/credentials-wrong_realm.csv
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/sipp/credentials-wrong_realm.csv
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/sipp/credentials-wrong_realm.csv
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/sipp/credentials-wrong_user.csv
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/sipp/credentials-wrong_user.csv?view=auto&rev=3771
==============================================================================
--- asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/sipp/credentials-wrong_user.csv (added)
+++ asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/sipp/credentials-wrong_user.csv Thu May  9 15:40:44 2013
@@ -1,0 +1,2 @@
+SEQUENTIAL
+username

Propchange: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/sipp/credentials-wrong_user.csv
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/sipp/credentials-wrong_user.csv
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/sipp/credentials-wrong_user.csv
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/sipp/playback_with_initial_sdp.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/sipp/playback_with_initial_sdp.xml?view=auto&rev=3771
==============================================================================
--- asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/sipp/playback_with_initial_sdp.xml (added)
+++ asterisk/team/group/pimp_my_sip/tests/channels/gulp/basic_calls/incoming/off-nominal/userpass/sipp/playback_with_initial_sdp.xml Thu May  9 15:40:44 2013
@@ -1,0 +1,179 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Call using wrong username, password, and realm">
+  <!--
+  Get and store what we are testing for this call in a variable and test
+  the variable. The $wrongauthresult will be set to either true or false.
+  -->
+  <nop>
+     <action>
+       <assignstr assign_to="wrongauthtype" value="[field0]" />
+       <strcmp variable="wrongauthtype" value="realm" assign_to="res" />
+       <test variable="res" compare="equal" value="0" assign_to="wrongauthtyperesult" />
+     </action>
+  </nop>
+
+  <send retrans="500">
+    <![CDATA[
+
+      INVITE sip:playback@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:alice@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 1 INVITE
+      Contact: <sip:alice@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Test
+      User-Agent: Test
+      Content-Type: application/sdp
+      Content-Length: [len]
+
+      v=0
+      o=phoneA 53655765 2353687637 IN IP[local_ip_type] [local_ip]
+      s=-
+      c=IN IP[media_ip_type] [media_ip]
+      t=0 0
+      m=audio 6000 RTP/AVP 0
+      a=rtpmap:0 PCMU/8000
+
+    ]]>
+  </send>
+
+  <recv response="401" auth="true">
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      ACK sip:playback@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:alice@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 1 ACK
+      Contact: <sip:alice@[local_ip]:[local_port];transport=[transport]>
+      Max-Forwards: 70
+      Subject: Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <!-- If $wrongauthtyperesult is true then go to label ID "1". Otherwise continue below -->
+  <nop next="1" test="wrongauthtyperesult">
+     <action>
+     </action>
+  </nop>
+
+  <!-- Go to label ID "100" since we're not using a wrong realm for this execution. -->
+  <nop next="100">
+     <action>
+     </action>
+  </nop>
+
+  <label id="1"/>
+
+  <!-- Store the Authentication header in a variable -->
+  <nop>
+     <action>
+       <assignstr assign_to="origauthrsphdr" value="[authentication]" />
+     </action>
+  </nop>
+
+  <!-- ====================================================== -->
+  <!-- START: Change realm in the authorization that we send. -->
+  <!--        This does NOT re-calculate the response digest  -->
+  <!--	      for the new realm we specify due to SIPp        -->
+  <!--	      limitations!                                    -->
+  <!-- ====================================================== -->
+
+  <!-- Store the Authorization line starting at the beginning of the line to the realm -->
+  <nop>
+     <action>
+       <!--
+	    SIPp does not like XML escapes such as '&quot;' or surrounding
+	    things in single quotes. However it will accept and properly
+	    process things escaped with a '\'. So to match a double quote in
+	    the regex a '.' is used.
+       -->
+       <ereg regexp="Authorization:.*realm=." search_in="var" variable="origauthrsphdr" assign_to="beforerealm" />
+     </action>
+  </nop>
+
+  <!-- Store the Authorization line starting at the end of the realm to the end of the line -->
+  <nop>
+     <action>
+       <ereg regexp=".,cnonce=.*" search_in="var" variable="origauthrsphdr" assign_to="afterrealm" />
+     </action>
+  </nop>
+
+  <!-- Construct our new Authorization header containing the wrong realm read in from the injection file -->
+  <nop>
+     <action>

[... 161 lines stripped ...]



More information about the svn-commits mailing list