[svn-commits] russell: branch russell/messaging r1063 - in /asterisk/team/russell/messaging...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Dec 3 16:32:35 CST 2010


Author: russell
Date: Fri Dec  3 16:32:31 2010
New Revision: 1063

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=1063
Log:
Add message_auth test

Added:
    asterisk/team/russell/messaging/tests/sip/message_auth/
    asterisk/team/russell/messaging/tests/sip/message_auth/configs/
    asterisk/team/russell/messaging/tests/sip/message_auth/configs/ast1/
    asterisk/team/russell/messaging/tests/sip/message_auth/configs/ast1/extensions.conf   (with props)
    asterisk/team/russell/messaging/tests/sip/message_auth/configs/ast1/sip.conf   (with props)
    asterisk/team/russell/messaging/tests/sip/message_auth/configs/sip.conf   (with props)
    asterisk/team/russell/messaging/tests/sip/message_auth/run-test   (with props)
    asterisk/team/russell/messaging/tests/sip/message_auth/sipp/
    asterisk/team/russell/messaging/tests/sip/message_auth/sipp/message.xml   (with props)
    asterisk/team/russell/messaging/tests/sip/message_auth/sipp/message_recv.xml   (with props)
    asterisk/team/russell/messaging/tests/sip/message_auth/test-config.yaml   (with props)
Modified:
    asterisk/team/russell/messaging/tests/sip/tests.yaml

Added: asterisk/team/russell/messaging/tests/sip/message_auth/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/russell/messaging/tests/sip/message_auth/configs/ast1/extensions.conf?view=auto&rev=1063
==============================================================================
--- asterisk/team/russell/messaging/tests/sip/message_auth/configs/ast1/extensions.conf (added)
+++ asterisk/team/russell/messaging/tests/sip/message_auth/configs/ast1/extensions.conf Fri Dec  3 16:32:31 2010
@@ -1,0 +1,10 @@
+[default]
+
+exten => _.,1,NoOp(ERROR: THIS SHOULD NOT BE EXECUTED)
+
+[not_default]
+
+exten => _.,1,NoOp()
+
+exten => _sip:user at 127[.]0[.]0[.]1.,1,Verbose(1,Got a message from SIPp)
+    same => n,MessageSend(sip:user2)

Propchange: asterisk/team/russell/messaging/tests/sip/message_auth/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/team/russell/messaging/tests/sip/message_auth/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/team/russell/messaging/tests/sip/message_auth/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/team/russell/messaging/tests/sip/message_auth/configs/ast1/sip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/russell/messaging/tests/sip/message_auth/configs/ast1/sip.conf?view=auto&rev=1063
==============================================================================
--- asterisk/team/russell/messaging/tests/sip/message_auth/configs/ast1/sip.conf (added)
+++ asterisk/team/russell/messaging/tests/sip/message_auth/configs/ast1/sip.conf Fri Dec  3 16:32:31 2010
@@ -1,0 +1,20 @@
+[general]
+
+allow_outofcall_message = yes
+auth_message_requests = yes
+
+[user]
+type=peer
+host=127.0.0.1
+port=5061
+context=not_default
+secret=blah
+
+[user2]
+type=peer
+host=127.0.0.1
+port=5062
+context=not_default
+username=user2
+secret=blah
+

Propchange: asterisk/team/russell/messaging/tests/sip/message_auth/configs/ast1/sip.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/team/russell/messaging/tests/sip/message_auth/configs/ast1/sip.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/team/russell/messaging/tests/sip/message_auth/configs/ast1/sip.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/team/russell/messaging/tests/sip/message_auth/configs/sip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/russell/messaging/tests/sip/message_auth/configs/sip.conf?view=auto&rev=1063
==============================================================================
    (empty)

Propchange: asterisk/team/russell/messaging/tests/sip/message_auth/configs/sip.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/team/russell/messaging/tests/sip/message_auth/configs/sip.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/team/russell/messaging/tests/sip/message_auth/configs/sip.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/team/russell/messaging/tests/sip/message_auth/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/russell/messaging/tests/sip/message_auth/run-test?view=auto&rev=1063
==============================================================================
--- asterisk/team/russell/messaging/tests/sip/message_auth/run-test (added)
+++ asterisk/team/russell/messaging/tests/sip/message_auth/run-test Fri Dec  3 16:32:31 2010
@@ -1,0 +1,45 @@
+#!/usr/bin/env python
+'''
+Copyright (C) 2010, Digium, Inc.
+Russell Bryant <russell at digium.com>
+
+This program is free software, distributed under the terms of
+the GNU General Public License Version 2.
+'''
+
+import sys
+import os
+
+sys.path.append("lib/python")
+sys.path.append("testsuite/lib/python")
+from asterisk.sipp import SIPpTest
+
+
+WORKING_DIR = "/tmp/asterisk-testsuite/sip/message_auth"
+TEST_DIR = os.path.dirname(os.path.realpath(__file__))
+
+SIPP_SCENARIOS = [
+    {
+        'scenario' : 'message_recv.xml',
+        '-p' : '5062'
+    },
+    {
+        'scenario' : 'message.xml',
+        '-p' : '5061'
+    }
+]
+
+
+def main(argv=None):
+    if argv is None:
+        argv = sys.argv
+
+    test = SIPpTest(WORKING_DIR, TEST_DIR, SIPP_SCENARIOS)
+    return test.run()
+
+
+if __name__ == "__main__":
+    sys.exit(main())
+
+
+# vim:sw=4:ts=4:expandtab:textwidth=79

Propchange: asterisk/team/russell/messaging/tests/sip/message_auth/run-test
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/team/russell/messaging/tests/sip/message_auth/run-test
------------------------------------------------------------------------------
    svn:executable = *

Propchange: asterisk/team/russell/messaging/tests/sip/message_auth/run-test
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/team/russell/messaging/tests/sip/message_auth/run-test
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/team/russell/messaging/tests/sip/message_auth/sipp/message.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/russell/messaging/tests/sip/message_auth/sipp/message.xml?view=auto&rev=1063
==============================================================================
--- asterisk/team/russell/messaging/tests/sip/message_auth/sipp/message.xml (added)
+++ asterisk/team/russell/messaging/tests/sip/message_auth/sipp/message.xml Fri Dec  3 16:32:31 2010
@@ -1,0 +1,48 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<scenario name="MESSAGE with auth">
+  <!-- In client mode (sipp placing calls), the Call-ID MUST be         -->
+  <!-- generated by sipp. To do so, use [call_id] keyword.                -->
+  <send retrans="500">
+    <![CDATA[
+      MESSAGE sip:user@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: user <sip:user@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number]
+      To: <sip:user@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 1 MESSAGE
+      Contact: sip:user@[local_ip]:[local_port]
+      Max-Forwards: 20
+      Expires: 3600
+      Content-Type: text/plain
+      Content-Length: 18
+
+      Watson, come here.
+
+    ]]>
+  </send>
+
+  <recv response="401" auth="true" rtd="true"/>
+
+  <send retrans="500">
+    <![CDATA[
+      MESSAGE sip:user@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      Max-Forwards: 20
+      From: user <sip:user@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number]
+      To: <sip:user@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 2 MESSAGE
+      Contact: sip:user@[local_ip]:[local_port]
+      Expires: 3600
+      [authentication username=user password=blah]
+      Content-Type: text/plain
+      Content-Length: 18
+
+      Watson, come here.
+
+    ]]>
+  </send>
+
+  <recv response="202" rtd="true" />
+</scenario>

Propchange: asterisk/team/russell/messaging/tests/sip/message_auth/sipp/message.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/team/russell/messaging/tests/sip/message_auth/sipp/message.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/team/russell/messaging/tests/sip/message_auth/sipp/message.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/team/russell/messaging/tests/sip/message_auth/sipp/message_recv.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/russell/messaging/tests/sip/message_auth/sipp/message_recv.xml?view=auto&rev=1063
==============================================================================
--- asterisk/team/russell/messaging/tests/sip/message_auth/sipp/message_recv.xml (added)
+++ asterisk/team/russell/messaging/tests/sip/message_auth/sipp/message_recv.xml Fri Dec  3 16:32:31 2010
@@ -1,0 +1,37 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<scenario name="Basic MESSAGE send and receive">
+  <recv request="MESSAGE" crlf="true">
+  </recv>
+
+  <send>
+    <![CDATA[
+      SIP/2.0 401 Unauthorized
+      [last_Via:]
+      [last_From:]
+      [last_To:];tag=[call_number]
+      [last_Call-ID:]
+      [last_CSeq:]
+      WWW-Authenticate: digest realm="test",stale=true
+
+    ]]>
+  </send>
+
+  <recv request="MESSAGE" crlf="true">
+  </recv>
+
+  <send>
+    <![CDATA[
+      SIP/2.0 202 Accepted
+      [last_Via:]
+      [last_From:]
+      [last_To:];tag=[call_number]
+      [last_Call-ID:]
+      [last_CSeq:]
+      Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
+      Supported: replaces, timer
+      Content-Length: 0
+
+    ]]>
+  </send>
+</scenario>

Propchange: asterisk/team/russell/messaging/tests/sip/message_auth/sipp/message_recv.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/team/russell/messaging/tests/sip/message_auth/sipp/message_recv.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/team/russell/messaging/tests/sip/message_auth/sipp/message_recv.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/team/russell/messaging/tests/sip/message_auth/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/russell/messaging/tests/sip/message_auth/test-config.yaml?view=auto&rev=1063
==============================================================================
--- asterisk/team/russell/messaging/tests/sip/message_auth/test-config.yaml (added)
+++ asterisk/team/russell/messaging/tests/sip/message_auth/test-config.yaml Fri Dec  3 16:32:31 2010
@@ -1,0 +1,9 @@
+testinfo:
+    summary: 'Test inbound and outbound unauthenticated MESSAGE'
+    description: |
+        'Send Asterisk a MESSAGE and wait for Asterisk to send it back.'
+
+properties:
+    minversion: '1.10'
+    dependencies:
+        - app : 'sipp'

Propchange: asterisk/team/russell/messaging/tests/sip/message_auth/test-config.yaml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/team/russell/messaging/tests/sip/message_auth/test-config.yaml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/team/russell/messaging/tests/sip/message_auth/test-config.yaml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: asterisk/team/russell/messaging/tests/sip/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/russell/messaging/tests/sip/tests.yaml?view=diff&rev=1063&r1=1062&r2=1063
==============================================================================
--- asterisk/team/russell/messaging/tests/sip/tests.yaml (original)
+++ asterisk/team/russell/messaging/tests/sip/tests.yaml Fri Dec  3 16:32:31 2010
@@ -3,3 +3,4 @@
     # Temporarily disabled until random failures are debugged.
     #- test: 'handle_response_refer'
     - test: 'options'
+    - test: 'message_auth'




More information about the svn-commits mailing list