[asterisk-commits] file: testsuite/asterisk/trunk r4268 - in /asterisk/trunk/tests/channels: SIP...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Oct 21 10:17:10 CDT 2013
Author: file
Date: Mon Oct 21 10:17:07 2013
New Revision: 4268
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4268
Log:
Fix the IAX2 and SIP acl tests.
These tests did not explicitly send traffic *from* the various IP addresses
they were trying to test from. For IAX2 I solved this by having it bind to
each address and explicitly sending traffic from the addresses. For SIP I
moved over to using sipp scenario files.
(closes issue ASTERISK-22495)
Reported by: Matt Jordan
Added:
asterisk/trunk/tests/channels/SIP/acl_call/sipp/
asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip1-failure.xml (with props)
asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip1-success.xml (with props)
asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip2-failure.xml (with props)
asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip2-success.xml (with props)
asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip3-failure.xml (with props)
asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip3-success.xml (with props)
asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip4-failure.xml (with props)
asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip5-failure.xml (with props)
asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip5-success.xml (with props)
Modified:
asterisk/trunk/tests/channels/SIP/acl_call/run-test
asterisk/trunk/tests/channels/SIP/acl_call/test-config.yaml
asterisk/trunk/tests/channels/iax2/acl_call/configs/ast1/iax.conf
asterisk/trunk/tests/channels/iax2/acl_call/run-test
Modified: asterisk/trunk/tests/channels/SIP/acl_call/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/acl_call/run-test?view=diff&rev=4268&r1=4267&r2=4268
==============================================================================
--- asterisk/trunk/tests/channels/SIP/acl_call/run-test (original)
+++ asterisk/trunk/tests/channels/SIP/acl_call/run-test Mon Oct 21 10:17:07 2013
@@ -9,172 +9,133 @@
sys.path.append("lib/python")
-from asterisk.TestCase import TestCase
+from asterisk.sipp import SIPpTest
-LOGGER = logging.getLogger(__name__)
+SIPP_SCENARIOS = [
+ # test1 - No named ACL, calling available only to 127.0.0.1
+ {
+ 'scenario' : 'testsip1-success.xml',
+ '-i' : '127.0.0.1',
+ '-p' : '5061'
+ },
+ {
+ 'scenario' : 'testsip1-failure.xml',
+ '-i' : '127.0.0.2',
+ '-p' : '5062'
+ },
+ {
+ 'scenario' : 'testsip1-failure.xml',
+ '-i' : '127.0.0.3',
+ '-p' : '5063'
+ },
+ {
+ 'scenario' : 'testsip1-failure.xml',
+ '-i' : '127.0.0.4',
+ '-p' : '5064'
+ },
-class SIPACLTest(TestCase):
+ # test2 - Same permissible addresses as test1, but while using a named ACL from the local configuration
+ {
+ 'scenario' : 'testsip2-success.xml',
+ '-i' : '127.0.0.1',
+ '-p' : '5065'
+ },
+ {
+ 'scenario' : 'testsip2-failure.xml',
+ '-i' : '127.0.0.2',
+ '-p' : '5066'
+ },
+ {
+ 'scenario' : 'testsip2-failure.xml',
+ '-i' : '127.0.0.3',
+ '-p' : '5067'
+ },
+ {
+ 'scenario' : 'testsip2-failure.xml',
+ '-i' : '127.0.0.4',
+ '-p' : '5068'
+ },
- # Preps test objects and configuration additions as well as copies TLS keys to test folder.
- def __init__(self):
- TestCase.__init__(self)
- self.test_components = []
+ # test3 - Multiple named ACL rules from local configuration. Only 127.0.0.2 should be allowed to call
+ {
+ 'scenario' : 'testsip3-failure.xml',
+ '-i' : '127.0.0.1',
+ '-p' : '5069'
+ },
+ {
+ 'scenario' : 'testsip3-success.xml',
+ '-i' : '127.0.0.2',
+ '-p' : '5070'
+ },
+ {
+ 'scenario' : 'testsip3-failure.xml',
+ '-i' : '127.0.0.3',
+ '-p' : '5071'
+ },
+ {
+ 'scenario' : 'testsip3-failure.xml',
+ '-i' : '127.0.0.4',
+ '-p' : '5072'
+ },
- #subtest evaluation
- self.test_index = 0
- self.originate_error = False
- self.phase_evaluation_reached = False
- self.success_conditions = 0
- self.failure_conditions = 0
- self.events = []
+ # test4 - An undefined rule is used. All addresses should be rejected from calling
+ {
+ 'scenario' : 'testsip4-failure.xml',
+ '-i' : '127.0.0.1',
+ '-p' : '5073'
+ },
+ {
+ 'scenario' : 'testsip4-failure.xml',
+ '-i' : '127.0.0.2',
+ '-p' : '5074'
+ },
+ {
+ 'scenario' : 'testsip4-failure.xml',
+ '-i' : '127.0.0.3',
+ '-p' : '5075'
+ },
+ {
+ 'scenario' : 'testsip4-failure.xml',
+ '-i' : '127.0.0.4',
+ '-p' : '5076'
+ },
- #test1 - No named ACL, calling available only to 127.0.0.1
- self.add_test_component("test1_1", "allow") # Phase 0
- self.add_test_component("test1_2", "deny") # Phase 1
- self.add_test_component("test1_3", "deny") # Phase 2
- self.add_test_component("test1_4", "deny") # Phase 3
-
- #test2 - Same permissible addresses as test 1, but while using a named ACL from the local configuration
- self.add_test_component("test2_1", "allow") # Phase 4
- self.add_test_component("test2_2", "deny") # Phase 5
- self.add_test_component("test2_3", "deny") # Phase 6
- self.add_test_component("test2_4", "deny") # Phase 7
-
- #test3 - Multiple named ACL rules from local configuration. Only 127.0.0.2 should be allowed to call.
- self.add_test_component("test3_1", "deny") # Phase 8
- self.add_test_component("test3_2", "allow") # Phase 9
- self.add_test_component("test3_3", "deny") # Phase 10
- self.add_test_component("test3_4", "deny") # Phase 11
-
- #test4 - An undefined rule is used. All addresses should be rejected from calling.
- self.add_test_component("test4_1", "deny") # Phase 12
- self.add_test_component("test4_2", "deny") # Phase 13
- self.add_test_component("test4_3", "deny") # Phase 14
- self.add_test_component("test4_4", "deny") # Phase 15
-
- #test5 - A set of 3 named ACLs stored in realtime is used. Collectively only 127.0.0.3 should be allowed to call.
- self.add_test_component("test5_1", "deny") # Phase 16
- self.add_test_component("test5_2", "deny") # Phase 17
- self.add_test_component("test5_3", "allow") # Phase 18
- self.add_test_component("test5_4", "deny") # Phase 19
-
- self.create_asterisk()
-
- def add_test_component(self, test, expectation):
- this_tuple = test, expectation
- self.test_components.append(this_tuple)
-
- # Once the AMI Factory connects to the AMI, this function fires.
- def ami_connect(self, ami):
- ami.registerEvent('Hangup', self.evaluate_hangup)
- self.test_start(ami)
-
- def test_start(self, ami):
- LOGGER.info("Starting test %d - %s:" % (self.test_index, self.test_components[self.test_index][0]))
-
- # The following variable tracks events that occur as a result of the following originate. We expect two events in all cases.
- # In the case of a successful call, we expect two hangups. If the call is unsuccessful, we expect a hangup and an AMI command error.
- self.events_received = 0
- self.success_conditions = 0
- self.failure_conditions = 0
- self.originate_error = False
- self.phase_evaluation_reached = False
-
- # Storage for the events (failures and AMI hangups) that came in -- stored in case of something going wrong.
- self.events = []
-
- # There are callbacks that would lose the AMI, so we need to hold onto it within the test object.
- self.last_active_ami = ami
-
- ami.originate(channel = "SIP/%s/s" % self.test_components[self.test_index][0], application = "Echo").addErrback(self.evaluate_originate_error)
-
- def evaluate_hangup(self, ami, event):
- self.events_received += 1
- self.events.append(event)
-
- # evaluate if whether the hangup indicates success or failure
- reason = event.get('cause-txt')
- if reason == "Normal Clearing":
- self.success_conditions += 1
- elif reason == "Call Rejected":
- self.failure_conditions += 1
-
- # If we've got two events of any kind, the call is finished and we can move on to the evaluation
- if self.events_received == 2:
- self.evaluate_call()
-
- def evaluate_originate_error(self, reason):
- self.originate_error = True
- self.events.append(reason)
- self.events_received += 1
- self.failure_conditions += 1
- if self.events_received == 2:
- self.evaluate_call()
-
- def evaluate_call(self):
- self.phase_evaluation_reached = True
-
- if self.test_components[self.test_index][1] == "allow" and self.success_conditions == 2:
- LOGGER.info("Phase %d - %s: Call Succeeded as Expected." % (self.test_index, self.test_components[self.test_index][0]))
- elif self.test_components[self.test_index][1] == "deny" and self.failure_conditions == 2:
- LOGGER.info("Phase %d - %s: Call Failed as Expected." % (self.test_index, self.test_components[self.test_index][0]))
- else:
- LOGGER.error("Phase %d - %s: Events received don't follow expectation of %s. Test Failed." % (self.test_index,
- self.test_components[self.test_index][0], self.test_components[self.test_index][0]))
- LOGGER.error("Failure Triggering Events Received: %s" % self.events)
- self.passed = False
- self.stop_reactor()
- return
-
- # Go on to the next test.
- self.test_index += 1
- if self.test_index < len(self.test_components):
- self.test_start(self.last_active_ami)
- else:
- LOGGER.info("All tests evaluated as expected. Test Successful.")
- self.passed = True
- self.stop_reactor()
- return
-
- def report_timeout(self):
- LOGGER.error("Phase %d - Test reached timeout without achieving evaluation conditions for this phase." % self.test_index)
-
- LOGGER.error("Phase %d - Received the following manager events: %s" % (self.test_index, self.events))
-
- if self.test_components[self.test_index][1] == "allow":
- LOGGER.error("Phase %d - Two hangup events with cause-txt = 'Normal Clearing' were expected." % self.test_index)
- if self.originate_error:
- LOGGER.error("Phase %d - expected no error conditions and received originate error." % self.test_index)
-
- elif self.test_components[self.test_index][1] == "deny":
- LOGGER.error("Phase %d - A hangup event with cause-txt = 'Call Rejected' was expected." % self.test_index)
- if not self.originate_error:
- LOGGER.error("Phase %d - an originate error was expected and not received." % self.test_index)
-
- else:
- LOGGER.error("Phase %d - Bad test, expectation is '%s' but should be either 'allow' or 'deny'" % (self.test_index,
- self.test_components[self.test_index][1]))
-
- # Sets up reactor and AMI connection
- def run(self):
- TestCase.run(self)
- self.create_ami_factory()
-
+ # test5 - A set of 3 named ACLs stored in realtime is used. Collectively only 127.0.0.3 should be allowed to call
+ {
+ 'scenario' : 'testsip5-failure.xml',
+ '-i' : '127.0.0.1',
+ '-p' : '5077'
+ },
+ {
+ 'scenario' : 'testsip5-failure.xml',
+ '-i' : '127.0.0.2',
+ '-p' : '5078'
+ },
+ {
+ 'scenario' : 'testsip5-success.xml',
+ '-i' : '127.0.0.3',
+ '-p' : '5079'
+ },
+ {
+ 'scenario' : 'testsip5-failure.xml',
+ '-i' : '127.0.0.4',
+ '-p' : '5080'
+ },
+]
def main():
+ WORKING_DIR = "channels/SIP/acl_call"
TEST_DIR = os.path.dirname(os.path.realpath(__file__))
DB_PATH = TEST_DIR + "/realtime.sqlite3"
TMP_DB_PATH = "/tmp/realtime.sqlite3"
shutil.copyfile(DB_PATH, TMP_DB_PATH)
- test = SIPACLTest()
+ test = SIPpTest(WORKING_DIR, TEST_DIR, SIPP_SCENARIOS)
reactor.run()
os.remove(TMP_DB_PATH)
- if not test.phase_evaluation_reached:
- test.report_timeout()
-
if test.passed:
return 0
+
return 1
if __name__ == "__main__":
Added: asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip1-failure.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip1-failure.xml?view=auto&rev=4268
==============================================================================
--- asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip1-failure.xml (added)
+++ asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip1-failure.xml Mon Oct 21 10:17:07 2013
@@ -1,0 +1,82 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "testsip1.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 -->
+<!-- -->
+<!-- Testsip1 default 'uac' scenario. -->
+<!-- -->
+
+<scenario name="Basic Sipstone UAC">
+ <!-- In client mode (testsip1 placing calls), the Call-ID MUST be -->
+ <!-- generated by testsip1. To do so, use [call_id] keyword. -->
+ <send retrans="500">
+ <![CDATA[
+
+ INVITE sip:s@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: testsip1 <sip:testsip1@[local_ip]:[local_port]>;tag=[call_number]
+ To: sut <sip:s@[remote_ip]:[remote_port]>
+ Call-ID: [call_id]
+ CSeq: 1 INVITE
+ Contact: sip:testsip1@[local_ip]:[local_port]
+ Max-Forwards: 70
+ Subject: Performance 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 [media_port] RTP/AVP 0
+ a=rtpmap:0 PCMU/8000
+
+ ]]>
+ </send>
+
+ <recv response="100"
+ optional="true">
+ </recv>
+
+ <recv response="403">
+ </recv>
+
+ <send>
+ <![CDATA[
+
+ ACK sip:s@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: testsip1 <sip:testsip1@[local_ip]:[local_port]>;tag=[call_number]
+ To: sut <sip:s@[remote_ip]:[remote_port]>[peer_tag_param]
+ Call-ID: [call_id]
+ CSeq: 1 ACK
+ Contact: sip:testsip1@[local_ip]:[local_port]
+ Max-Forwards: 70
+ Subject: Performance Test
+ Content-Length: 0
+
+ ]]>
+ </send>
+
+ <!-- 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/trunk/tests/channels/SIP/acl_call/sipp/testsip1-failure.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip1-failure.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip1-failure.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip1-success.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip1-success.xml?view=auto&rev=4268
==============================================================================
--- asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip1-success.xml (added)
+++ asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip1-success.xml Mon Oct 21 10:17:07 2013
@@ -1,0 +1,115 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "testsip1.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 -->
+<!-- -->
+<!-- Testsip1 default 'uac' scenario. -->
+<!-- -->
+
+<scenario name="Basic Sipstone UAC">
+ <!-- In client mode (testsip1 placing calls), the Call-ID MUST be -->
+ <!-- generated by testsip1. To do so, use [call_id] keyword. -->
+ <send retrans="500">
+ <![CDATA[
+
+ INVITE sip:s@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: testsip1 <sip:testsip1@[local_ip]:[local_port]>;tag=[call_number]
+ To: sut <sip:s@[remote_ip]:[remote_port]>
+ Call-ID: [call_id]
+ CSeq: 1 INVITE
+ Contact: sip:testsip1@[local_ip]:[local_port]
+ Max-Forwards: 70
+ Subject: Performance 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 [media_port] RTP/AVP 0
+ a=rtpmap:0 PCMU/8000
+
+ ]]>
+ </send>
+
+ <recv response="100"
+ optional="true">
+ </recv>
+
+ <recv response="180" optional="true">
+ </recv>
+
+ <!-- By adding rrs="true" (Record Route Sets), the route sets -->
+ <!-- are saved and used for following messages sent. Useful to test -->
+ <!-- against stateful SIP proxies/B2BUAs. -->
+ <recv response="200" rtd="true">
+ </recv>
+
+ <!-- Packet lost can be simulated in any send/recv message by -->
+ <!-- by adding the 'lost = "10"'. Value can be [1-100] percent. -->
+ <send>
+ <![CDATA[
+
+ ACK sip:s@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: testsip1 <sip:testsip1@[local_ip]:[local_port]>;tag=[call_number]
+ To: sut <sip:s@[remote_ip]:[remote_port]>[peer_tag_param]
+ Call-ID: [call_id]
+ CSeq: 1 ACK
+ Contact: sip:testsip1@[local_ip]:[local_port]
+ Max-Forwards: 70
+ Subject: Performance Test
+ Content-Length: 0
+
+ ]]>
+ </send>
+
+ <!-- This delay can be customized by the -d command-line option -->
+ <!-- or by adding a 'milliseconds = "value"' option here. -->
+ <pause/>
+
+ <!-- The 'crlf' option inserts a blank line in the statistics report. -->
+ <send retrans="500">
+ <![CDATA[
+
+ BYE sip:s@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: testsip1 <sip:testsip1@[local_ip]:[local_port]>;tag=[call_number]
+ To: sut <sip:s@[remote_ip]:[remote_port]>[peer_tag_param]
+ Call-ID: [call_id]
+ CSeq: 2 BYE
+ Contact: sip:testsip1@[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/trunk/tests/channels/SIP/acl_call/sipp/testsip1-success.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip1-success.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip1-success.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip2-failure.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip2-failure.xml?view=auto&rev=4268
==============================================================================
--- asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip2-failure.xml (added)
+++ asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip2-failure.xml Mon Oct 21 10:17:07 2013
@@ -1,0 +1,83 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "testsip2.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 -->
+<!-- -->
+<!-- Testsip2 default 'uac' scenario. -->
+<!-- -->
+
+<scenario name="Basic Sipstone UAC">
+ <!-- In client mode (testsip2 placing calls), the Call-ID MUST be -->
+ <!-- generated by testsip2. To do so, use [call_id] keyword. -->
+ <send retrans="500">
+ <![CDATA[
+
+ INVITE sip:s@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: testsip2 <sip:testsip2@[local_ip]:[local_port]>;tag=[call_number]
+ To: sut <sip:s@[remote_ip]:[remote_port]>
+ Call-ID: [call_id]
+ CSeq: 1 INVITE
+ Contact: sip:testsip2@[local_ip]:[local_port]
+ Max-Forwards: 70
+ Subject: Performance 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 [media_port] RTP/AVP 0
+ a=rtpmap:0 PCMU/8000
+
+ ]]>
+ </send>
+
+ <recv response="100"
+ optional="true">
+ </recv>
+
+ <recv response="403">
+ </recv>
+
+ <send>
+ <![CDATA[
+
+ ACK sip:s@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: testsip2 <sip:testsip2@[local_ip]:[local_port]>;tag=[call_number]
+ To: sut <sip:s@[remote_ip]:[remote_port]>[peer_tag_param]
+ Call-ID: [call_id]
+ CSeq: 1 ACK
+ Contact: sip:testsip2@[local_ip]:[local_port]
+ Max-Forwards: 70
+ Subject: Performance Test
+ Content-Length: 0
+
+ ]]>
+ </send>
+
+
+ <!-- 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/trunk/tests/channels/SIP/acl_call/sipp/testsip2-failure.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip2-failure.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip2-failure.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip2-success.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip2-success.xml?view=auto&rev=4268
==============================================================================
--- asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip2-success.xml (added)
+++ asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip2-success.xml Mon Oct 21 10:17:07 2013
@@ -1,0 +1,115 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "testsip2.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 -->
+<!-- -->
+<!-- Testsip2 default 'uac' scenario. -->
+<!-- -->
+
+<scenario name="Basic Sipstone UAC">
+ <!-- In client mode (testsip2 placing calls), the Call-ID MUST be -->
+ <!-- generated by testsip2. To do so, use [call_id] keyword. -->
+ <send retrans="500">
+ <![CDATA[
+
+ INVITE sip:s@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: testsip2 <sip:testsip2@[local_ip]:[local_port]>;tag=[call_number]
+ To: sut <sip:s@[remote_ip]:[remote_port]>
+ Call-ID: [call_id]
+ CSeq: 1 INVITE
+ Contact: sip:testsip2@[local_ip]:[local_port]
+ Max-Forwards: 70
+ Subject: Performance 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 [media_port] RTP/AVP 0
+ a=rtpmap:0 PCMU/8000
+
+ ]]>
+ </send>
+
+ <recv response="100"
+ optional="true">
+ </recv>
+
+ <recv response="180" optional="true">
+ </recv>
+
+ <!-- By adding rrs="true" (Record Route Sets), the route sets -->
+ <!-- are saved and used for following messages sent. Useful to test -->
+ <!-- against stateful SIP proxies/B2BUAs. -->
+ <recv response="200" rtd="true">
+ </recv>
+
+ <!-- Packet lost can be simulated in any send/recv message by -->
+ <!-- by adding the 'lost = "10"'. Value can be [1-100] percent. -->
+ <send>
+ <![CDATA[
+
+ ACK sip:s@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: testsip2 <sip:testsip2@[local_ip]:[local_port]>;tag=[call_number]
+ To: sut <sip:s@[remote_ip]:[remote_port]>[peer_tag_param]
+ Call-ID: [call_id]
+ CSeq: 1 ACK
+ Contact: sip:testsip2@[local_ip]:[local_port]
+ Max-Forwards: 70
+ Subject: Performance Test
+ Content-Length: 0
+
+ ]]>
+ </send>
+
+ <!-- This delay can be customized by the -d command-line option -->
+ <!-- or by adding a 'milliseconds = "value"' option here. -->
+ <pause/>
+
+ <!-- The 'crlf' option inserts a blank line in the statistics report. -->
+ <send retrans="500">
+ <![CDATA[
+
+ BYE sip:s@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: testsip2 <sip:testsip2@[local_ip]:[local_port]>;tag=[call_number]
+ To: sut <sip:s@[remote_ip]:[remote_port]>[peer_tag_param]
+ Call-ID: [call_id]
+ CSeq: 2 BYE
+ Contact: sip:testsip2@[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/trunk/tests/channels/SIP/acl_call/sipp/testsip2-success.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip2-success.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip2-success.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip3-failure.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip3-failure.xml?view=auto&rev=4268
==============================================================================
--- asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip3-failure.xml (added)
+++ asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip3-failure.xml Mon Oct 21 10:17:07 2013
@@ -1,0 +1,83 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "testsip3.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 -->
+<!-- -->
+<!-- Testsip3 default 'uac' scenario. -->
+<!-- -->
+
+<scenario name="Basic Sipstone UAC">
+ <!-- In client mode (testsip3 placing calls), the Call-ID MUST be -->
+ <!-- generated by testsip3. To do so, use [call_id] keyword. -->
+ <send retrans="500">
+ <![CDATA[
+
+ INVITE sip:s@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: testsip3 <sip:testsip3@[local_ip]:[local_port]>;tag=[call_number]
+ To: sut <sip:s@[remote_ip]:[remote_port]>
+ Call-ID: [call_id]
+ CSeq: 1 INVITE
+ Contact: sip:testsip3@[local_ip]:[local_port]
+ Max-Forwards: 70
+ Subject: Performance 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 [media_port] RTP/AVP 0
+ a=rtpmap:0 PCMU/8000
+
+ ]]>
+ </send>
+
+ <recv response="100"
+ optional="true">
+ </recv>
+
+ <recv response="403">
+ </recv>
+
+ <send>
+ <![CDATA[
+
+ ACK sip:s@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: testsip3 <sip:testsip3@[local_ip]:[local_port]>;tag=[call_number]
+ To: sut <sip:s@[remote_ip]:[remote_port]>[peer_tag_param]
+ Call-ID: [call_id]
+ CSeq: 1 ACK
+ Contact: sip:testsip3@[local_ip]:[local_port]
+ Max-Forwards: 70
+ Subject: Performance Test
+ Content-Length: 0
+
+ ]]>
+ </send>
+
+
+ <!-- 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/trunk/tests/channels/SIP/acl_call/sipp/testsip3-failure.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip3-failure.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip3-failure.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip3-success.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip3-success.xml?view=auto&rev=4268
==============================================================================
--- asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip3-success.xml (added)
+++ asterisk/trunk/tests/channels/SIP/acl_call/sipp/testsip3-success.xml Mon Oct 21 10:17:07 2013
@@ -1,0 +1,115 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "testsip3.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 -->
+<!-- -->
+<!-- Testsip3 default 'uac' scenario. -->
+<!-- -->
+
+<scenario name="Basic Sipstone UAC">
+ <!-- In client mode (testsip3 placing calls), the Call-ID MUST be -->
+ <!-- generated by testsip3. To do so, use [call_id] keyword. -->
+ <send retrans="500">
+ <![CDATA[
+
+ INVITE sip:s@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: testsip3 <sip:testsip3@[local_ip]:[local_port]>;tag=[call_number]
+ To: sut <sip:s@[remote_ip]:[remote_port]>
+ Call-ID: [call_id]
+ CSeq: 1 INVITE
+ Contact: sip:testsip3@[local_ip]:[local_port]
+ Max-Forwards: 70
+ Subject: Performance 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 [media_port] RTP/AVP 0
+ a=rtpmap:0 PCMU/8000
+
+ ]]>
+ </send>
+
+ <recv response="100"
+ optional="true">
+ </recv>
+
+ <recv response="180" optional="true">
+ </recv>
+
+ <!-- By adding rrs="true" (Record Route Sets), the route sets -->
[... 518 lines stripped ...]
More information about the asterisk-commits
mailing list