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

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


Author: russell
Date: Fri Dec  3 16:34:38 2010
New Revision: 1064

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

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

Added: asterisk/team/russell/messaging/tests/sip/message_unauth/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/russell/messaging/tests/sip/message_unauth/configs/ast1/extensions.conf?view=auto&rev=1064
==============================================================================
--- asterisk/team/russell/messaging/tests/sip/message_unauth/configs/ast1/extensions.conf (added)
+++ asterisk/team/russell/messaging/tests/sip/message_unauth/configs/ast1/extensions.conf Fri Dec  3 16:34:38 2010
@@ -1,0 +1,6 @@
+[default]
+
+exten => _.,1,NoOp()
+
+exten => _sip:user at 127[.]0[.]0[.]1.,1,Verbose(1,Got a message from SIPp)
+    same => n,MessageSend(sip:user at 127.0.0.1:5062)

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

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

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

Added: asterisk/team/russell/messaging/tests/sip/message_unauth/configs/ast1/sip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/russell/messaging/tests/sip/message_unauth/configs/ast1/sip.conf?view=auto&rev=1064
==============================================================================
--- asterisk/team/russell/messaging/tests/sip/message_unauth/configs/ast1/sip.conf (added)
+++ asterisk/team/russell/messaging/tests/sip/message_unauth/configs/ast1/sip.conf Fri Dec  3 16:34:38 2010
@@ -1,0 +1,4 @@
+[general]
+
+allow_outofcall_message = yes
+auth_message_requests = no

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

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

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

Added: asterisk/team/russell/messaging/tests/sip/message_unauth/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/russell/messaging/tests/sip/message_unauth/run-test?view=auto&rev=1064
==============================================================================
--- asterisk/team/russell/messaging/tests/sip/message_unauth/run-test (added)
+++ asterisk/team/russell/messaging/tests/sip/message_unauth/run-test Fri Dec  3 16:34:38 2010
@@ -1,0 +1,69 @@
+#!/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
+import subprocess
+
+sys.path.append("lib/python")
+sys.path.append("testsuite/lib/python")
+from asterisk.asterisk import Asterisk
+
+
+WORKING_DIR = "/tmp/asterisk-testsuite/sip/message_unauth"
+TEST_DIR = os.path.dirname(os.path.realpath(__file__))
+
+
+def sipp(scenario, port):
+    return subprocess.Popen(['sipp', '127.0.0.1',
+                             '-sf', '%s/sipp/%s' % (TEST_DIR, scenario),
+                             '-p', port, '-m', '1', '-i', '127.0.0.1',
+                             '-timeout', '20s'],
+                            stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+
+
+def main(argv=None):
+    if argv is None:
+        argv = sys.argv
+
+    ast1 = Asterisk(base=WORKING_DIR)
+    ast1.install_configs('%s/configs/ast1' % TEST_DIR)
+    ast1.start()
+
+    p1 = sipp('message_recv.xml', '5062')
+    p2 = sipp('message.xml', '5061')
+
+    (p1_stdout, p1_stderr) = p1.communicate()
+    p1_res = p1.wait()
+    (p2_stdout, p2_stderr) = p2.communicate()
+    p2_res = p2.wait()
+
+    ast1.stop()
+
+    if p1_res:
+        print "ERROR: SIPp #1 returned %s" % str(p1_res)
+        print p1_stdout
+        print p1_stderr
+
+    if p2_res:
+        print "ERROR: SIPp #2 returned %s" % str(p2_res)
+        print p2_stdout
+        print p2_stderr
+
+    if not p1_res and not p2_res:
+        print "Test Passed."
+
+    return 1 if p1_res or p2_res else 0
+
+
+if __name__ == "__main__":
+    sys.exit(main())
+
+
+# vim:sw=4:ts=4:expandtab:textwidth=79

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

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

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

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

Added: asterisk/team/russell/messaging/tests/sip/message_unauth/sipp/message.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/russell/messaging/tests/sip/message_unauth/sipp/message.xml?view=auto&rev=1064
==============================================================================
--- asterisk/team/russell/messaging/tests/sip/message_unauth/sipp/message.xml (added)
+++ asterisk/team/russell/messaging/tests/sip/message_unauth/sipp/message.xml Fri Dec  3 16:34:38 2010
@@ -1,0 +1,27 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<scenario name="Basic MESSAGE send and receive">
+  <!-- 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: 70
+      Expires: 3600
+      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_unauth/sipp/message.xml
------------------------------------------------------------------------------
    svn:eol-style = native

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

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

Added: asterisk/team/russell/messaging/tests/sip/message_unauth/sipp/message_recv.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/russell/messaging/tests/sip/message_unauth/sipp/message_recv.xml?view=auto&rev=1064
==============================================================================
--- asterisk/team/russell/messaging/tests/sip/message_unauth/sipp/message_recv.xml (added)
+++ asterisk/team/russell/messaging/tests/sip/message_unauth/sipp/message_recv.xml Fri Dec  3 16:34:38 2010
@@ -1,0 +1,21 @@
+<?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 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_unauth/sipp/message_recv.xml
------------------------------------------------------------------------------
    svn:eol-style = native

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

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

Added: asterisk/team/russell/messaging/tests/sip/message_unauth/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/russell/messaging/tests/sip/message_unauth/test-config.yaml?view=auto&rev=1064
==============================================================================
--- asterisk/team/russell/messaging/tests/sip/message_unauth/test-config.yaml (added)
+++ asterisk/team/russell/messaging/tests/sip/message_unauth/test-config.yaml Fri Dec  3 16:34:38 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_unauth/test-config.yaml
------------------------------------------------------------------------------
    svn:eol-style = native

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

Propchange: asterisk/team/russell/messaging/tests/sip/message_unauth/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=1064&r1=1063&r2=1064
==============================================================================
--- asterisk/team/russell/messaging/tests/sip/tests.yaml (original)
+++ asterisk/team/russell/messaging/tests/sip/tests.yaml Fri Dec  3 16:34:38 2010
@@ -4,3 +4,4 @@
     #- test: 'handle_response_refer'
     - test: 'options'
     - test: 'message_auth'
+    - test: 'message_unauth'




More information about the svn-commits mailing list