[asterisk-commits] kmoore: testsuite/asterisk/trunk r3589 - in /asterisk/trunk: lib/python/aster...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Jan 2 09:30:55 CST 2013
Author: kmoore
Date: Wed Jan 2 09:30:51 2013
New Revision: 3589
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=3589
Log:
Add new SIP session timers tests and do cleanup
Add two new session timers tests that ensure Min-SE values from 422
responses are used properly. In creating this test, a new file for
pluggable modules not closely related to other functionality was added
to the testsuite framework and initially contains a configurable
originator module. A sample YAML configuration was also added.
Existing session timers tests that used a local originator module have
been tweaked to use the in-library originator module. Tags on session
timers tests have also been corrected.
(closes issue SWP-5051)
Review: https://reviewboard.asterisk.org/r/2223/
Added:
asterisk/trunk/lib/python/asterisk/PluggableModules.py (with props)
asterisk/trunk/sample-yaml/originator-config.yaml.sample (with props)
asterisk/trunk/tests/channels/SIP/session_timers/check_require/
- copied from r3588, asterisk/trunk/tests/channels/SIP/session_timers_require/
asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_accept/
asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_accept/configs/
asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_accept/configs/ast1/
asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_accept/configs/ast1/extensions.conf (with props)
asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_accept/configs/ast1/sip.conf (with props)
asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_accept/sipp/
asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_accept/sipp/uas-no-hangup.xml (with props)
asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_accept/test-config.yaml (with props)
asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_originate/
asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_originate/configs/
asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_originate/configs/ast1/
asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_originate/configs/ast1/extensions.conf (with props)
asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_originate/configs/ast1/sip.conf (with props)
asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_originate/sipp/
asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_originate/sipp/uas-no-hangup.xml (with props)
asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_originate/test-config.yaml (with props)
Removed:
asterisk/trunk/tests/channels/SIP/session_timers/basic_uac_refresh/originator.py
asterisk/trunk/tests/channels/SIP/session_timers/basic_uac_teardown/originator.py
asterisk/trunk/tests/channels/SIP/session_timers/uac_se_below_minse/originator.py
asterisk/trunk/tests/channels/SIP/session_timers_require/
Modified:
asterisk/trunk/tests/channels/SIP/session_timers/basic_uac_refresh/test-config.yaml
asterisk/trunk/tests/channels/SIP/session_timers/basic_uac_teardown/test-config.yaml
asterisk/trunk/tests/channels/SIP/session_timers/basic_uas_refresh/test-config.yaml
asterisk/trunk/tests/channels/SIP/session_timers/basic_uas_teardown/test-config.yaml
asterisk/trunk/tests/channels/SIP/session_timers/check_require/test-config.yaml
asterisk/trunk/tests/channels/SIP/session_timers/tests.yaml
asterisk/trunk/tests/channels/SIP/session_timers/uac_se_below_minse/test-config.yaml
asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/test-config.yaml
asterisk/trunk/tests/channels/SIP/tests.yaml
Added: asterisk/trunk/lib/python/asterisk/PluggableModules.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/lib/python/asterisk/PluggableModules.py?view=auto&rev=3589
==============================================================================
--- asterisk/trunk/lib/python/asterisk/PluggableModules.py (added)
+++ asterisk/trunk/lib/python/asterisk/PluggableModules.py Wed Jan 2 09:30:51 2013
@@ -1,0 +1,79 @@
+#!/usr/bin/env python
+'''
+Copyright (C) 2012, Digium, Inc.
+Kinsey Moore <kmoore at digium.com>
+
+This program is free software, distributed under the terms of
+the GNU General Public License Version 2.
+'''
+
+import sys
+import logging
+
+sys.path.append("lib/python")
+
+LOGGER = logging.getLogger(__name__)
+
+class Originator(object):
+ def __init__(self, module_config, test_object):
+ '''Initialize config and register test_object callbacks.'''
+ self.ami = None
+ test_object.register_ami_observer(self.ami_connect)
+ test_object.register_scenario_started_observer(self.scenario_started)
+ self.test_object = test_object
+ self.current_destination = 0
+ self.config = {
+ 'channel': 'Local/s at default',
+ 'application': 'Echo',
+ 'data': '',
+ 'context': '',
+ 'exten': '',
+ 'priority': '',
+ 'ignore-originate-failure': 'no',
+ 'trigger': 'scenario_start',
+ 'id': 0
+ }
+
+ # process config
+ if not module_config:
+ return
+ for k in module_config.keys():
+ if k in self.config:
+ self.config[k] = module_config[k]
+ return
+
+ def ami_connect(self, ami):
+ '''Handle new AMI connections.'''
+ LOGGER.info("AMI %s connected" % (str(ami.id)))
+ if ami.id == self.config['id']:
+ self.ami = ami
+ if self.config['trigger'] == 'ami_connect':
+ self.originate_call()
+ return
+
+ def failure(self, result):
+ '''Handle origination failure.'''
+
+ if self.config['ignore-originate-failure'] == 'no':
+ LOGGER.info("Originate failed: %s" % (str(result)))
+ self.test_object.set_passed(False)
+ return None
+
+ def originate_call(self):
+ '''Handle origination of the call based on the options provided in the configuration.'''
+ LOGGER.info("Originating call")
+
+ if len(self.config['context']) > 0:
+ self.ami.originate(channel = self.config['channel'], context = self.config['context'],
+ exten = self.config['exten'], priority = self.config['priority']).addErrback(self.failure)
+ else:
+ self.ami.originate(channel = self.config['channel'], application = self.config['application'],
+ data = self.config['data']).addErrback(self.failure)
+
+ def scenario_started(self, result):
+ '''Handle origination on scenario start if configured to do so.'''
+ LOGGER.info("Scenario started")
+
+ if self.config['trigger'] == 'scenario_start':
+ self.originate_call()
+ return result
Propchange: asterisk/trunk/lib/python/asterisk/PluggableModules.py
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/lib/python/asterisk/PluggableModules.py
------------------------------------------------------------------------------
svn:executable = *
Propchange: asterisk/trunk/lib/python/asterisk/PluggableModules.py
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/lib/python/asterisk/PluggableModules.py
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/sample-yaml/originator-config.yaml.sample
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/sample-yaml/originator-config.yaml.sample?view=auto&rev=3589
==============================================================================
--- asterisk/trunk/sample-yaml/originator-config.yaml.sample (added)
+++ asterisk/trunk/sample-yaml/originator-config.yaml.sample Wed Jan 2 09:30:51 2013
@@ -1,0 +1,26 @@
+# Configuration sample for the pluggable channel origination module
+
+originator-config:
+ # The ID of the AMI instance on which to originate the call. (default: 0)
+ id: 0
+
+ # The channel to originate. (default: 'Local/s at default')
+ channel: 'Local/s at default'
+
+ # The application to start once the channel is answered. (default: 'Echo')
+ application: 'Echo'
+
+ # The data to provide to the application.
+ data: ''
+
+ # Alternatively, a context/exten/priority set can be provided which overrides the application setting.
+ context: 'default'
+ exten: '1234'
+ priority: '1'
+
+ # Whether to ignore failure of the origination. (default: 'no')
+ ignore-originate-failure: 'no'
+
+ # This determines what triggers the origination. The available options are 'scenario_start' (default) and 'ami_connect'.
+ trigger: 'scenario_start'
+
Propchange: asterisk/trunk/sample-yaml/originator-config.yaml.sample
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/sample-yaml/originator-config.yaml.sample
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/sample-yaml/originator-config.yaml.sample
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: asterisk/trunk/tests/channels/SIP/session_timers/basic_uac_refresh/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/session_timers/basic_uac_refresh/test-config.yaml?view=diff&rev=3589&r1=3588&r2=3589
==============================================================================
--- asterisk/trunk/tests/channels/SIP/session_timers/basic_uac_refresh/test-config.yaml (original)
+++ asterisk/trunk/tests/channels/SIP/session_timers/basic_uac_refresh/test-config.yaml Wed Jan 2 09:30:51 2013
@@ -11,16 +11,15 @@
- app : 'sipp'
tags:
- SIP
- - timers
+ - SIP_session_timers
test-modules:
- add-test-to-search-path: 'True'
test-object:
config-section: sipp-config
typename: 'sipp.SIPpTestCase'
modules:
-
- typename: 'originator.Originator'
+ typename: 'PluggableModules.Originator'
sipp-config:
reactor-timeout: 70
Modified: asterisk/trunk/tests/channels/SIP/session_timers/basic_uac_teardown/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/session_timers/basic_uac_teardown/test-config.yaml?view=diff&rev=3589&r1=3588&r2=3589
==============================================================================
--- asterisk/trunk/tests/channels/SIP/session_timers/basic_uac_teardown/test-config.yaml (original)
+++ asterisk/trunk/tests/channels/SIP/session_timers/basic_uac_teardown/test-config.yaml Wed Jan 2 09:30:51 2013
@@ -11,16 +11,15 @@
- app : 'sipp'
tags:
- SIP
- - timers
+ - SIP_session_timers
test-modules:
- add-test-to-search-path: 'True'
test-object:
config-section: sipp-config
typename: 'sipp.SIPpTestCase'
modules:
-
- typename: 'originator.Originator'
+ typename: 'PluggableModules.Originator'
sipp-config:
reactor-timeout: 120
Modified: asterisk/trunk/tests/channels/SIP/session_timers/basic_uas_refresh/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/session_timers/basic_uas_refresh/test-config.yaml?view=diff&rev=3589&r1=3588&r2=3589
==============================================================================
--- asterisk/trunk/tests/channels/SIP/session_timers/basic_uas_refresh/test-config.yaml (original)
+++ asterisk/trunk/tests/channels/SIP/session_timers/basic_uas_refresh/test-config.yaml Wed Jan 2 09:30:51 2013
@@ -11,10 +11,9 @@
- app : 'sipp'
tags:
- SIP
- - timers
+ - SIP_session_timers
test-modules:
- add-test-to-search-path: 'True'
test-object:
config-section: sipp-config
typename: 'sipp.SIPpTestCase'
Modified: asterisk/trunk/tests/channels/SIP/session_timers/basic_uas_teardown/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/session_timers/basic_uas_teardown/test-config.yaml?view=diff&rev=3589&r1=3588&r2=3589
==============================================================================
--- asterisk/trunk/tests/channels/SIP/session_timers/basic_uas_teardown/test-config.yaml (original)
+++ asterisk/trunk/tests/channels/SIP/session_timers/basic_uas_teardown/test-config.yaml Wed Jan 2 09:30:51 2013
@@ -11,10 +11,9 @@
- app : 'sipp'
tags:
- SIP
- - timers
+ - SIP_session_timers
test-modules:
- add-test-to-search-path: 'True'
test-object:
config-section: sipp-config
typename: 'sipp.SIPpTestCase'
Modified: asterisk/trunk/tests/channels/SIP/session_timers/check_require/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/session_timers/check_require/test-config.yaml?view=diff&rev=3589&r1=3588&r2=3589
==============================================================================
--- asterisk/trunk/tests/channels/SIP/session_timers/check_require/test-config.yaml (original)
+++ asterisk/trunk/tests/channels/SIP/session_timers/check_require/test-config.yaml Wed Jan 2 09:30:51 2013
@@ -33,4 +33,5 @@
- sipp:
version: 'v3.1'
tags:
- - sip
+ - SIP
+ - SIP_session_timers
Modified: asterisk/trunk/tests/channels/SIP/session_timers/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/session_timers/tests.yaml?view=diff&rev=3589&r1=3588&r2=3589
==============================================================================
--- asterisk/trunk/tests/channels/SIP/session_timers/tests.yaml (original)
+++ asterisk/trunk/tests/channels/SIP/session_timers/tests.yaml Wed Jan 2 09:30:51 2013
@@ -6,3 +6,6 @@
- test: 'basic_uas_teardown'
- test: 'uas_minimum_se'
- test: 'uac_se_below_minse'
+ - test: 'uac_multiple_422_accept'
+ - test: 'uac_multiple_422_originate'
+ - test: 'check_require'
Added: asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_accept/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_accept/configs/ast1/extensions.conf?view=auto&rev=3589
==============================================================================
--- asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_accept/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_accept/configs/ast1/extensions.conf Wed Jan 2 09:30:51 2013
@@ -1,0 +1,2 @@
+[default]
+exten => s,1,Dial(sip/endpoint)
Propchange: asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_accept/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_accept/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_accept/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_accept/configs/ast1/sip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_accept/configs/ast1/sip.conf?view=auto&rev=3589
==============================================================================
--- asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_accept/configs/ast1/sip.conf (added)
+++ asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_accept/configs/ast1/sip.conf Wed Jan 2 09:30:51 2013
@@ -1,0 +1,12 @@
+[general]
+
+[endpoint]
+context=default
+type=friend
+host=127.0.0.1
+port=5066
+insecure=invite
+disallow=all
+allow=ulaw
+session-timers=accept
+session-refresher=uas
Propchange: asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_accept/configs/ast1/sip.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_accept/configs/ast1/sip.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_accept/configs/ast1/sip.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_accept/sipp/uas-no-hangup.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_accept/sipp/uas-no-hangup.xml?view=auto&rev=3589
==============================================================================
--- asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_accept/sipp/uas-no-hangup.xml (added)
+++ asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_accept/sipp/uas-no-hangup.xml Wed Jan 2 09:30:51 2013
@@ -1,0 +1,173 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<!-- This program is free software; you can redistribute it and/or -->
+<!-- modify it under the terms of the GNU General Public License as -->
+<!-- published by the Free Software Foundation; either version 2 of the -->
+<!-- License, or (at your option) any later version. -->
+<!-- -->
+<!-- This program is distributed in the hope that it will be useful, -->
+<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
+<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -->
+<!-- GNU General Public License for more details. -->
+<!-- -->
+<!-- You should have received a copy of the GNU General Public License -->
+<!-- along with this program; if not, write to the -->
+<!-- Free Software Foundation, Inc., -->
+<!-- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -->
+<!-- -->
+<!-- Sipp default 'uas' scenario. -->
+<!-- -->
+
+<scenario name="UAS for timer testing">
+ <Global variables="remote_tag" />
+ <recv request="INVITE" crlf="true">
+ <!-- Save the from tag. We'll need it when we send our BYE -->
+ <action>
+ <ereg regexp=".*timer.*"
+ header="Supported:"
+ search_in="hdr"
+ check_it="true"
+ assign_to="1"/>
+ <ereg regexp=".*(;tag=.*)"
+ header="From:"
+ search_in="hdr"
+ check_it="true"
+ assign_to="remote_tag"/>
+ </action>
+ </recv>
+ <Reference variables="1" />
+
+ <send>
+ <![CDATA[
+
+ SIP/2.0 422 session-expires too short
+ [last_Via:]
+ [last_From:]
+ [last_To:];tag=[pid]SIPpTag01[call_number]
+ [last_Call-ID:]
+ [last_CSeq:]
+ Min-SE: 128
+ Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+ Content-Length: 0
+
+ ]]>
+ </send>
+
+ <recv request="ACK"
+ rtd="true"
+ crlf="true" />
+
+ <recv request="INVITE" crlf="true">
+ <!-- Save the from tag. We'll need it when we send our BYE -->
+ <action>
+ <ereg regexp=".*timer.*"
+ header="Supported:"
+ search_in="hdr"
+ check_it="true"
+ assign_to="1"/>
+ <ereg regexp=".*128.*"
+ header="Min-SE:"
+ search_in="hdr"
+ check_it="true"
+ assign_to="2"/>
+ <ereg regexp=".*(;tag=.*)"
+ header="From:"
+ search_in="hdr"
+ check_it="true"
+ assign_to="remote_tag"/>
+ </action>
+ </recv>
+ <Reference variables="1,2" />
+
+ <send>
+ <![CDATA[
+
+ SIP/2.0 422 session-expires too short
+ [last_Via:]
+ [last_From:]
+ [last_To:];tag=[pid]SIPpTag01[call_number]
+ [last_Call-ID:]
+ [last_CSeq:]
+ Min-SE: 256
+ Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+ Content-Length: 0
+
+ ]]>
+ </send>
+
+ <recv request="ACK"
+ rtd="true"
+ crlf="true" />
+
+ <recv request="INVITE" crlf="true">
+ <!-- Save the from tag. We'll need it when we send our BYE -->
+ <action>
+ <ereg regexp=".*timer.*"
+ header="Supported:"
+ search_in="hdr"
+ check_it="true"
+ assign_to="1"/>
+ <ereg regexp=".*256.*"
+ header="Min-SE:"
+ search_in="hdr"
+ check_it="true"
+ assign_to="2"/>
+ <ereg regexp=".*(;tag=.*)"
+ header="From:"
+ search_in="hdr"
+ check_it="true"
+ assign_to="remote_tag"/>
+ </action>
+ </recv>
+ <Reference variables="1,2" />
+
+ <send retrans="500">
+ <![CDATA[
+
+ SIP/2.0 200 OK
+ [last_Via:]
+ [last_From:]
+ [last_To:];tag=[pid]SIPpTag01[call_number]
+ [last_Call-ID:]
+ [last_CSeq:]
+ Require: timer
+ Session-Expires: 256;refresher=uas
+ Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+ Content-Type: application/sdp
+ Content-Length: 0
+
+ ]]>
+ </send>
+
+ <recv request="ACK"
+ rtd="true"
+ crlf="true" />
+
+ <send retrans="500">
+ <![CDATA[
+
+ BYE sip:[service]@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[pid]SIPpTag01[call_number]
+ To: sut <sip:[service]@[remote_ip]:[remote_port]>[$remote_tag]
+ [last_Call-ID:]
+ CSeq: [cseq] BYE
+ Contact: sip:sipp@[local_ip]:[local_port]
+ Max-Forwards: 70
+ Subject: Performance Test
+ Content-Length: 0
+
+ ]]>
+ </send>
+
+ <recv response="200"
+ rtd="true"
+ crlf="true" />
+
+ <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
+
+ <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
+
+</scenario>
+
Propchange: asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_accept/sipp/uas-no-hangup.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_accept/sipp/uas-no-hangup.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_accept/sipp/uas-no-hangup.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_accept/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_accept/test-config.yaml?view=auto&rev=3589
==============================================================================
--- asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_accept/test-config.yaml (added)
+++ asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_accept/test-config.yaml Wed Jan 2 09:30:51 2013
@@ -1,0 +1,30 @@
+testinfo:
+ summary: '422 Min-SE accept mode memory test (outbound UAS multiple 422)'
+ description: |
+ "This test verifies that Asterisk remembers the Min-SE values in 422 across transactions within a dialog when in 'accept' mode."
+
+properties:
+ minversion: '1.8.21'
+ dependencies:
+ - python : 'twisted'
+ - python : 'starpy'
+ - app : 'sipp'
+ tags:
+ - SIP
+ - SIP_session_timers
+
+test-modules:
+ test-object:
+ config-section: sipp-config
+ typename: 'sipp.SIPpTestCase'
+ modules:
+ -
+ typename: 'PluggableModules.Originator'
+
+sipp-config:
+ reactor-timeout: 40
+ fail-on-any: True
+ test-iterations:
+ -
+ scenarios:
+ - { 'key-args': {'scenario': 'uas-no-hangup.xml', '-p': '5066'} }
Propchange: asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_accept/test-config.yaml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_accept/test-config.yaml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_accept/test-config.yaml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_originate/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_originate/configs/ast1/extensions.conf?view=auto&rev=3589
==============================================================================
--- asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_originate/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_originate/configs/ast1/extensions.conf Wed Jan 2 09:30:51 2013
@@ -1,0 +1,2 @@
+[default]
+exten => s,1,Dial(sip/endpoint)
Propchange: asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_originate/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_originate/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_originate/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_originate/configs/ast1/sip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_originate/configs/ast1/sip.conf?view=auto&rev=3589
==============================================================================
--- asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_originate/configs/ast1/sip.conf (added)
+++ asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_originate/configs/ast1/sip.conf Wed Jan 2 09:30:51 2013
@@ -1,0 +1,13 @@
+[general]
+
+[endpoint]
+context=default
+type=friend
+host=127.0.0.1
+port=5066
+insecure=invite
+disallow=all
+allow=ulaw
+session-timers=originate
+session-refresher=uas
+session-expires=95
Propchange: asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_originate/configs/ast1/sip.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_originate/configs/ast1/sip.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_originate/configs/ast1/sip.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_originate/sipp/uas-no-hangup.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_originate/sipp/uas-no-hangup.xml?view=auto&rev=3589
==============================================================================
--- asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_originate/sipp/uas-no-hangup.xml (added)
+++ asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_originate/sipp/uas-no-hangup.xml Wed Jan 2 09:30:51 2013
@@ -1,0 +1,188 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<!-- This program is free software; you can redistribute it and/or -->
+<!-- modify it under the terms of the GNU General Public License as -->
+<!-- published by the Free Software Foundation; either version 2 of the -->
+<!-- License, or (at your option) any later version. -->
+<!-- -->
+<!-- This program is distributed in the hope that it will be useful, -->
+<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
+<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -->
+<!-- GNU General Public License for more details. -->
+<!-- -->
+<!-- You should have received a copy of the GNU General Public License -->
+<!-- along with this program; if not, write to the -->
+<!-- Free Software Foundation, Inc., -->
+<!-- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -->
+<!-- -->
+<!-- Sipp default 'uas' scenario. -->
+<!-- -->
+
+<scenario name="UAS for timer testing">
+ <Global variables="remote_tag" />
+ <recv request="INVITE" crlf="true">
+ <!-- Save the from tag. We'll need it when we send our BYE -->
+ <action>
+ <ereg regexp=".*timer.*"
+ header="Supported:"
+ search_in="hdr"
+ check_it="true"
+ assign_to="1"/>
+ <ereg regexp=".*95.*"
+ header="Session-Expires:"
+ search_in="hdr"
+ check_it="true"
+ assign_to="2"/>
+ <ereg regexp=".*(;tag=.*)"
+ header="From:"
+ search_in="hdr"
+ check_it="true"
+ assign_to="remote_tag"/>
+ </action>
+ </recv>
+ <Reference variables="1,2" />
+
+ <send>
+ <![CDATA[
+
+ SIP/2.0 422 session-expires too short
+ [last_Via:]
+ [last_From:]
+ [last_To:];tag=[pid]SIPpTag01[call_number]
+ [last_Call-ID:]
+ [last_CSeq:]
+ Min-SE: 128
+ Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+ Content-Length: 0
+
+ ]]>
+ </send>
+
+ <recv request="ACK"
+ rtd="true"
+ crlf="true" />
+
+ <recv request="INVITE" crlf="true">
+ <!-- Save the from tag. We'll need it when we send our BYE -->
+ <action>
+ <ereg regexp=".*timer.*"
+ header="Supported:"
+ search_in="hdr"
+ check_it="true"
+ assign_to="1"/>
+ <ereg regexp=".*128.*"
+ header="Min-SE:"
+ search_in="hdr"
+ check_it="true"
+ assign_to="2"/>
+ <ereg regexp=".*128.*"
+ header="Session-Expires:"
+ search_in="hdr"
+ check_it="true"
+ assign_to="3"/>
+ <ereg regexp=".*(;tag=.*)"
+ header="From:"
+ search_in="hdr"
+ check_it="true"
+ assign_to="remote_tag"/>
+ </action>
+ </recv>
+ <Reference variables="1,2" />
+
+ <send>
+ <![CDATA[
+
+ SIP/2.0 422 session-expires too short
+ [last_Via:]
+ [last_From:]
+ [last_To:];tag=[pid]SIPpTag01[call_number]
+ [last_Call-ID:]
+ [last_CSeq:]
+ Min-SE: 256
+ Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+ Content-Length: 0
+
+ ]]>
+ </send>
+
+ <recv request="ACK"
+ rtd="true"
+ crlf="true" />
+
+ <recv request="INVITE" crlf="true">
+ <!-- Save the from tag. We'll need it when we send our BYE -->
+ <action>
+ <ereg regexp=".*timer.*"
+ header="Supported:"
+ search_in="hdr"
+ check_it="true"
+ assign_to="1"/>
+ <ereg regexp=".*256.*"
+ header="Min-SE:"
+ search_in="hdr"
+ check_it="true"
+ assign_to="2"/>
+ <ereg regexp=".*256.*"
+ header="Session-Expires:"
+ search_in="hdr"
+ check_it="true"
+ assign_to="3"/>
+ <ereg regexp=".*(;tag=.*)"
+ header="From:"
+ search_in="hdr"
+ check_it="true"
+ assign_to="remote_tag"/>
+ </action>
+ </recv>
+ <Reference variables="1,2" />
+
+ <send retrans="500">
+ <![CDATA[
+
+ SIP/2.0 200 OK
+ [last_Via:]
+ [last_From:]
+ [last_To:];tag=[pid]SIPpTag01[call_number]
+ [last_Call-ID:]
+ [last_CSeq:]
+ Require: timer
+ Session-Expires: 256;refresher=uas
+ Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+ Content-Type: application/sdp
+ Content-Length: 0
+
+ ]]>
+ </send>
+
+ <recv request="ACK"
+ rtd="true"
+ crlf="true" />
+
+ <send retrans="500">
+ <![CDATA[
+
+ BYE sip:[service]@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[pid]SIPpTag01[call_number]
+ To: sut <sip:[service]@[remote_ip]:[remote_port]>[$remote_tag]
+ [last_Call-ID:]
+ CSeq: [cseq] BYE
+ Contact: sip:sipp@[local_ip]:[local_port]
+ Max-Forwards: 70
+ Subject: Performance Test
+ Content-Length: 0
+
+ ]]>
+ </send>
+
+ <recv response="200"
+ rtd="true"
+ crlf="true" />
+
+ <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
+
+ <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
+
+</scenario>
+
Propchange: asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_originate/sipp/uas-no-hangup.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_originate/sipp/uas-no-hangup.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_originate/sipp/uas-no-hangup.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_originate/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_originate/test-config.yaml?view=auto&rev=3589
==============================================================================
--- asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_originate/test-config.yaml (added)
+++ asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_originate/test-config.yaml Wed Jan 2 09:30:51 2013
@@ -1,0 +1,30 @@
+testinfo:
+ summary: '422 Min-SE originate mode memory test (outbound UAS multiple 422)'
+ description: |
+ "This test verifies that Asterisk remembers the Min-SE values in 422 across transactions within a dialog when in 'originate' mode."
+
+properties:
+ minversion: '1.8.21'
+ dependencies:
+ - python : 'twisted'
+ - python : 'starpy'
+ - app : 'sipp'
+ tags:
+ - SIP
+ - SIP_session_timers
+
+test-modules:
+ test-object:
+ config-section: sipp-config
+ typename: 'sipp.SIPpTestCase'
+ modules:
+ -
+ typename: 'PluggableModules.Originator'
+
+sipp-config:
+ reactor-timeout: 40
+ fail-on-any: True
+ test-iterations:
+ -
+ scenarios:
+ - { 'key-args': {'scenario': 'uas-no-hangup.xml', '-p': '5066'} }
Propchange: asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_originate/test-config.yaml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_originate/test-config.yaml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/SIP/session_timers/uac_multiple_422_originate/test-config.yaml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: asterisk/trunk/tests/channels/SIP/session_timers/uac_se_below_minse/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/session_timers/uac_se_below_minse/test-config.yaml?view=diff&rev=3589&r1=3588&r2=3589
==============================================================================
--- asterisk/trunk/tests/channels/SIP/session_timers/uac_se_below_minse/test-config.yaml (original)
+++ asterisk/trunk/tests/channels/SIP/session_timers/uac_se_below_minse/test-config.yaml Wed Jan 2 09:30:51 2013
@@ -11,16 +11,15 @@
- app : 'sipp'
tags:
- SIP
- - timers
+ - SIP_session_timers
test-modules:
- add-test-to-search-path: 'True'
test-object:
config-section: sipp-config
typename: 'sipp.SIPpTestCase'
modules:
-
- typename: 'originator.Originator'
+ typename: 'PluggableModules.Originator'
sipp-config:
reactor-timeout: 20
Modified: asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/test-config.yaml?view=diff&rev=3589&r1=3588&r2=3589
==============================================================================
--- asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/test-config.yaml (original)
+++ asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/test-config.yaml Wed Jan 2 09:30:51 2013
@@ -11,10 +11,9 @@
- app : 'sipp'
tags:
- SIP
- - timers
+ - SIP_session_timers
test-modules:
- add-test-to-search-path: 'True'
test-object:
config-section: sipp-config
typename: 'sipp.SIPpTestCase'
Modified: asterisk/trunk/tests/channels/SIP/tests.yaml
[... 11 lines stripped ...]
More information about the asterisk-commits
mailing list