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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Dec 3 16:52:48 CST 2010


Author: russell
Date: Fri Dec  3 16:52:44 2010
New Revision: 1069

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

This ensures that a MESSAGE request gets denied when support for MESSAGE
outside of a call has been disabled.

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

Modified: 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=diff&rev=1069&r1=1068&r2=1069
==============================================================================
--- asterisk/team/russell/messaging/tests/sip/message_auth/configs/ast1/sip.conf (original)
+++ asterisk/team/russell/messaging/tests/sip/message_auth/configs/ast1/sip.conf Fri Dec  3 16:52:44 2010
@@ -1,6 +1,6 @@
 [general]
 
-allow_outofcall_message = yes
+accept_outofcall_message = yes
 auth_message_requests = yes
 
 [user]

Added: asterisk/team/russell/messaging/tests/sip/message_disabled/configs/ast1/sip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/russell/messaging/tests/sip/message_disabled/configs/ast1/sip.conf?view=auto&rev=1069
==============================================================================
--- asterisk/team/russell/messaging/tests/sip/message_disabled/configs/ast1/sip.conf (added)
+++ asterisk/team/russell/messaging/tests/sip/message_disabled/configs/ast1/sip.conf Fri Dec  3 16:52:44 2010
@@ -1,0 +1,3 @@
+[general]
+
+accept_outofcall_message = no

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

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

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

Added: asterisk/team/russell/messaging/tests/sip/message_disabled/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/russell/messaging/tests/sip/message_disabled/run-test?view=auto&rev=1069
==============================================================================
--- asterisk/team/russell/messaging/tests/sip/message_disabled/run-test (added)
+++ asterisk/team/russell/messaging/tests/sip/message_disabled/run-test Fri Dec  3 16:52:44 2010
@@ -1,0 +1,39 @@
+#!/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")
+from asterisk.sipp import SIPpTest
+
+
+WORKING_DIR = "/tmp/asterisk-testsuite/sip/message_disabled"
+TEST_DIR = os.path.dirname(os.path.realpath(__file__))
+
+SIPP_SCENARIOS = [
+    {
+        'scenario' : 'message.xml',
+    }
+]
+
+
+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_disabled/run-test
------------------------------------------------------------------------------
    svn:eol-style = native

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

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

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

Added: asterisk/team/russell/messaging/tests/sip/message_disabled/sipp/message.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/russell/messaging/tests/sip/message_disabled/sipp/message.xml?view=auto&rev=1069
==============================================================================
--- asterisk/team/russell/messaging/tests/sip/message_disabled/sipp/message.xml (added)
+++ asterisk/team/russell/messaging/tests/sip/message_disabled/sipp/message.xml Fri Dec  3 16:52:44 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="405" rtd="true" />
+</scenario>

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

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

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

Added: asterisk/team/russell/messaging/tests/sip/message_disabled/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/russell/messaging/tests/sip/message_disabled/test-config.yaml?view=auto&rev=1069
==============================================================================
--- asterisk/team/russell/messaging/tests/sip/message_disabled/test-config.yaml (added)
+++ asterisk/team/russell/messaging/tests/sip/message_disabled/test-config.yaml Fri Dec  3 16:52:44 2010
@@ -1,0 +1,9 @@
+testinfo:
+    summary: 'Test response to MESSAGE when out-of-call MESSAGE is disabled (or not supported)'
+    description: |
+        'Send Asterisk a MESSAGE and expect that it gets denied'
+
+properties:
+    minversion: '1.10'
+    dependencies:
+        - app : 'sipp'

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

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

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

Added: asterisk/team/russell/messaging/tests/sip/message_disabled/test-output.txt
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/russell/messaging/tests/sip/message_disabled/test-output.txt?view=auto&rev=1069
==============================================================================
--- asterisk/team/russell/messaging/tests/sip/message_disabled/test-output.txt (added)
+++ asterisk/team/russell/messaging/tests/sip/message_disabled/test-output.txt Fri Dec  3 16:52:44 2010
@@ -1,0 +1,17 @@
+Parsing /tmp/asterisk-testsuite/sip/message_disabled/ast2/etc/asterisk/extconfig.conf
+Couldn't find function MESSAGE in XML documentation
+Couldn't find function MESSAGE in XML documentation
+Couldn't find application MessageSend in XML documentation
+Couldn't find application MessageSend in XML documentation
+Parsing /tmp/asterisk-testsuite/sip/message_disabled/ast2/etc/asterisk/logger.conf
+Parsing /tmp/asterisk-testsuite/sip/message_disabled/ast2/etc/asterisk/logger.general.conf.inc
+Parsing /tmp/asterisk-testsuite/sip/message_disabled/ast2/etc/asterisk/logger.logfiles.conf.inc
+Executing ['/usr/sbin/asterisk', '-C', '/tmp/asterisk-testsuite/sip/message_disabled/ast2/etc/asterisk/asterisk.conf', '-rx', 'core waitfullybooted'] ...
+Asterisk has fully booted.
+Parsing /tmp/asterisk-testsuite/sip/message_disabled/ast2/etc/asterisk/extconfig.conf
+Asterisk ending (0).
+Executing SIPp scenario: message.xml
+SIPp scenario #0 Passed
+Executing ['/usr/sbin/asterisk', '-C', '/tmp/asterisk-testsuite/sip/message_disabled/ast2/etc/asterisk/asterisk.conf', '-rx', 'core stop gracefully'] ...
+Parsing /tmp/asterisk-testsuite/sip/message_disabled/ast2/etc/asterisk/extconfig.conf
+Asterisk ending (0).

Propchange: asterisk/team/russell/messaging/tests/sip/message_disabled/test-output.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/team/russell/messaging/tests/sip/message_disabled/test-output.txt
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/team/russell/messaging/tests/sip/message_disabled/test-output.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: 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=diff&rev=1069&r1=1068&r2=1069
==============================================================================
--- asterisk/team/russell/messaging/tests/sip/message_unauth/configs/ast1/sip.conf (original)
+++ asterisk/team/russell/messaging/tests/sip/message_unauth/configs/ast1/sip.conf Fri Dec  3 16:52:44 2010
@@ -1,4 +1,4 @@
 [general]
 
-allow_outofcall_message = yes
+accept_outofcall_message = yes
 auth_message_requests = no

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=1069&r1=1068&r2=1069
==============================================================================
--- asterisk/team/russell/messaging/tests/sip/tests.yaml (original)
+++ asterisk/team/russell/messaging/tests/sip/tests.yaml Fri Dec  3 16:52:44 2010
@@ -6,3 +6,4 @@
     - test: 'message_auth'
     - test: 'message_unauth'
     - test: 'message_from_call'
+    - test: 'message_disabled'




More information about the asterisk-commits mailing list