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

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


Author: russell
Date: Fri Dec  3 16:37:19 2010
New Revision: 1065

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

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

Added: asterisk/team/russell/messaging/tests/sip/message_from_call/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/russell/messaging/tests/sip/message_from_call/configs/ast1/extensions.conf?view=auto&rev=1065
==============================================================================
--- asterisk/team/russell/messaging/tests/sip/message_from_call/configs/ast1/extensions.conf (added)
+++ asterisk/team/russell/messaging/tests/sip/message_from_call/configs/ast1/extensions.conf Fri Dec  3 16:37:19 2010
@@ -1,0 +1,8 @@
+[default]
+
+exten => _.,1,NoOp()
+
+exten => test,1,Answer()
+    same => n,Set(MESSAGE(body)=I like waffles.)
+    same => n,MessageSend(sip:user at 127.0.0.1:5062)
+    same => n,Wait(30) ; SIPp will hang up.

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

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

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

Added: asterisk/team/russell/messaging/tests/sip/message_from_call/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/russell/messaging/tests/sip/message_from_call/run-test?view=auto&rev=1065
==============================================================================
--- asterisk/team/russell/messaging/tests/sip/message_from_call/run-test (added)
+++ asterisk/team/russell/messaging/tests/sip/message_from_call/run-test Fri Dec  3 16:37:19 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_from_call"
+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('call.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_from_call/run-test
------------------------------------------------------------------------------
    svn:eol-style = native

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

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

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

Added: asterisk/team/russell/messaging/tests/sip/message_from_call/sipp/call.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/russell/messaging/tests/sip/message_from_call/sipp/call.xml?view=auto&rev=1065
==============================================================================
--- asterisk/team/russell/messaging/tests/sip/message_from_call/sipp/call.xml (added)
+++ asterisk/team/russell/messaging/tests/sip/message_from_call/sipp/call.xml Fri Dec  3 16:37:19 2010
@@ -1,0 +1,95 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Channel Test">
+  <send retrans="500">
+    <![CDATA[
+
+      INVITE sip:test@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:wienerschnitzel@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>
+      Call-ID: [call_id]
+      CSeq: 1 INVITE
+      Contact: sip:kartoffelsalat@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Subject: Performance Test
+      User-Agent: Channel Param Test
+      Content-Type: application/sdp
+      Content-Length: [len]
+
+      v=0
+      o=user1 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 101
+      a=rtpmap:0 PCMU/8000
+      a=rtpmap:101 telephone-event/8000
+      m=video 6002 RTP/AVP 34
+      a=rtpmap:34 H263/90000
+
+    ]]>
+  </send>
+
+  <recv response="100"
+        optional="true">
+  </recv>
+
+  <recv response="180" optional="true">
+  </recv>
+
+  <recv response="183" optional="true">
+  </recv>
+
+  <recv response="200" rtd="true">
+  </recv>
+
+  <send>
+    <![CDATA[
+
+      ACK sip:test@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:wienerschnitzel@[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:kartoffelsalat@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Subject: Performance Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <!-- Pause long enough for our test to run -->
+  <pause milliseconds="4000" />
+
+  <send retrans="500">
+    <![CDATA[
+
+      BYE sip:test@[remote_ip]:[remote_port] SIP/2.0
+      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+      From: test1 <sip:wienerschnitzel@[local_ip]:[local_port]>;tag=[call_number]
+      To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+      Call-ID: [call_id]
+      CSeq: 2 BYE
+      Contact: sip:kartoffelsalat@[local_ip]:[local_port]
+      Max-Forwards: 70
+      Subject: Performance Test
+      Content-Length: 0
+
+    ]]>
+  </send>
+
+  <recv response="200" crlf="true">
+  </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/russell/messaging/tests/sip/message_from_call/sipp/call.xml
------------------------------------------------------------------------------
    svn:eol-style = native

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

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

Added: asterisk/team/russell/messaging/tests/sip/message_from_call/sipp/message_recv.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/russell/messaging/tests/sip/message_from_call/sipp/message_recv.xml?view=auto&rev=1065
==============================================================================
--- asterisk/team/russell/messaging/tests/sip/message_from_call/sipp/message_recv.xml (added)
+++ asterisk/team/russell/messaging/tests/sip/message_from_call/sipp/message_recv.xml Fri Dec  3 16:37:19 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_from_call/sipp/message_recv.xml
------------------------------------------------------------------------------
    svn:eol-style = native

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

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

Added: asterisk/team/russell/messaging/tests/sip/message_from_call/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/russell/messaging/tests/sip/message_from_call/test-config.yaml?view=auto&rev=1065
==============================================================================
--- asterisk/team/russell/messaging/tests/sip/message_from_call/test-config.yaml (added)
+++ asterisk/team/russell/messaging/tests/sip/message_from_call/test-config.yaml Fri Dec  3 16:37:19 2010
@@ -1,0 +1,10 @@
+testinfo:
+    summary: 'Test sending a MESSAGE while processing a call.'
+    description: |
+        'Set up a call with Asterisk and send an out-of-call SIP MESSAGE
+         from the dialplan processing that call.'
+
+properties:
+    minversion: '1.10'
+    dependencies:
+        - app : 'sipp'

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

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

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




More information about the svn-commits mailing list