[asterisk-commits] kmoore: testsuite/asterisk/trunk r3549 - in /asterisk/trunk/tests/channels/SI...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Nov 29 16:19:22 CST 2012
Author: kmoore
Date: Thu Nov 29 16:19:18 2012
New Revision: 3549
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=3549
Log:
Add test for 422 generation with session timers
This adds a pair of tests that ensure Asterisk enforces a default
Min-SE value and a set Min-SE value.
Review: https://reviewboard.asterisk.org/r/2218/
(closes issue SWP-5056)
Patch-by: Kinsey Moore
Added:
asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/
asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/configs/
asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/configs/ast1/
asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/configs/ast1/extensions.conf (with props)
asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/configs/ast1/sip.conf (with props)
asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/sipp/
asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/sipp/uac-default-minse.xml (with props)
asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/sipp/uac-set-minse.xml (with props)
asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/test-config.yaml (with props)
Modified:
asterisk/trunk/tests/channels/SIP/session_timers/tests.yaml
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=3549&r1=3548&r2=3549
==============================================================================
--- asterisk/trunk/tests/channels/SIP/session_timers/tests.yaml (original)
+++ asterisk/trunk/tests/channels/SIP/session_timers/tests.yaml Thu Nov 29 16:19:18 2012
@@ -4,3 +4,4 @@
- test: 'basic_uac_refresh'
- test: 'basic_uas_refresh'
- test: 'basic_uas_teardown'
+ - test: 'uas_minimum_se'
Added: asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/configs/ast1/extensions.conf?view=auto&rev=3549
==============================================================================
--- asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/configs/ast1/extensions.conf Thu Nov 29 16:19:18 2012
@@ -1,0 +1,8 @@
+[default]
+exten => endpointa,1,NoOp()
+exten => endpointa,n,Answer()
+exten => endpointa,n,Echo()
+
+exten => endpointb,1,NoOp()
+exten => endpointb,n,Answer()
+exten => endpointb,n,Echo()
Propchange: asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/configs/ast1/sip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/configs/ast1/sip.conf?view=auto&rev=3549
==============================================================================
--- asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/configs/ast1/sip.conf (added)
+++ asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/configs/ast1/sip.conf Thu Nov 29 16:19:18 2012
@@ -1,0 +1,24 @@
+[general]
+
+[endpointa]
+context=default
+type=friend
+host=127.0.0.1
+port=5066
+insecure=invite
+disallow=all
+allow=ulaw
+session-timers=accept
+session-refresher=uas
+
+[endpointb]
+context=default
+type=friend
+host=127.0.0.1
+port=5067
+insecure=invite
+disallow=all
+allow=ulaw
+session-timers=accept
+session-refresher=uas
+session-minse=100
Propchange: asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/configs/ast1/sip.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/configs/ast1/sip.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/configs/ast1/sip.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/sipp/uac-default-minse.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/sipp/uac-default-minse.xml?view=auto&rev=3549
==============================================================================
--- asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/sipp/uac-default-minse.xml (added)
+++ asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/sipp/uac-default-minse.xml Thu Nov 29 16:19:18 2012
@@ -1,0 +1,57 @@
+<?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="UAC for timer testing">
+ <send retrans="500">
+ <![CDATA[
+
+ INVITE sip:endpointa@[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]SIPpTag00[call_number]
+ To: sut <sip:[service]@[remote_ip]:[remote_port]>
+ Call-ID: [call_id]
+ CSeq: 1 INVITE
+ Contact: sip:sipp@[local_ip]:[local_port]
+ Max-Forwards: 70
+ Supported: timer
+ Session-Expires: 80;refresher=uac
+ 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 [media_port] RTP/AVP 0
+ a=rtpmap:0 PCMU/8000
+
+ ]]>
+ </send>
+
+ <recv response="422" />
+
+ <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/uas_minimum_se/sipp/uac-default-minse.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/sipp/uac-default-minse.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/sipp/uac-default-minse.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/sipp/uac-set-minse.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/sipp/uac-set-minse.xml?view=auto&rev=3549
==============================================================================
--- asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/sipp/uac-set-minse.xml (added)
+++ asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/sipp/uac-set-minse.xml Thu Nov 29 16:19:18 2012
@@ -1,0 +1,57 @@
+<?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="UAC for timer testing">
+ <send retrans="500">
+ <![CDATA[
+
+ INVITE sip:endpointb@[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]SIPpTag00[call_number]
+ To: sut <sip:[service]@[remote_ip]:[remote_port]>
+ Call-ID: [call_id]
+ CSeq: 1 INVITE
+ Contact: sip:sipp@[local_ip]:[local_port]
+ Max-Forwards: 70
+ Supported: timer
+ Session-Expires: 95;refresher=uac
+ 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 [media_port] RTP/AVP 0
+ a=rtpmap:0 PCMU/8000
+
+ ]]>
+ </send>
+
+ <recv response="422" />
+
+ <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/uas_minimum_se/sipp/uac-set-minse.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/sipp/uac-set-minse.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/sipp/uac-set-minse.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: 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=auto&rev=3549
==============================================================================
--- asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/test-config.yaml (added)
+++ asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/test-config.yaml Thu Nov 29 16:19:18 2012
@@ -1,0 +1,28 @@
+testinfo:
+ summary: '422 response generation test (inbound UAC 422)'
+ description: |
+ "This test verifies that Asterisk will reject an incoming INVITE with a 422 if the Session-Expires value is below the local Min-SE value."
+
+properties:
+ minversion: '1.8.0'
+ dependencies:
+ - python : 'twisted'
+ - python : 'starpy'
+ - app : 'sipp'
+ tags:
+ - SIP
+ - timers
+
+test-modules:
+ add-test-to-search-path: 'True'
+ test-object:
+ config-section: sipp-config
+ typename: 'sipp.SIPpTestCase'
+
+sipp-config:
+ fail-on-any: True
+ test-iterations:
+ -
+ scenarios:
+ - { 'key-args': {'scenario': 'uac-default-minse.xml', '-p': '5066'} }
+ - { 'key-args': {'scenario': 'uac-set-minse.xml', '-p': '5067'} }
Propchange: asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/test-config.yaml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/test-config.yaml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/SIP/session_timers/uas_minimum_se/test-config.yaml
------------------------------------------------------------------------------
svn:mime-type = text/plain
More information about the asterisk-commits
mailing list