[asterisk-commits] mmichelson: testsuite/asterisk/trunk r6341 - in /asterisk/trunk/tests/channel...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Jan 28 11:43:56 CST 2015
Author: mmichelson
Date: Wed Jan 28 11:43:53 2015
New Revision: 6341
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=6341
Log:
Add test for AST-2015-001
This ensures that when Asterisk receives an SDP offer with incompatible codecs,
there are no leaked file descriptors.
Review: https://reviewboard.asterisk.org/r/4324
Added:
asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/
asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/configs/
asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/configs/ast1/
asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/configs/ast1/extensions.conf (with props)
asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/configs/ast1/modules.conf (with props)
asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/configs/ast1/pjsip.conf (with props)
asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/sipp/
asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/sipp/uac-488.xml (with props)
asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/test-config.yaml (with props)
Added: asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/configs/ast1/extensions.conf?view=auto&rev=6341
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/configs/ast1/extensions.conf Wed Jan 28 11:43:53 2015
@@ -1,0 +1,5 @@
+[default]
+
+exten => echo,1,Answer()
+same => n,Echo()
+same => n,Hangup()
Propchange: asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:keywords = 'Author Date Id Revision'
Propchange: asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/configs/ast1/modules.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/configs/ast1/modules.conf?view=auto&rev=6341
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/configs/ast1/modules.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/configs/ast1/modules.conf Wed Jan 28 11:43:53 2015
@@ -1,0 +1,17 @@
+[modules]
+
+autoload = yes
+
+; Minimize open fds in this test by not loading other VoIP channel drivers
+noload => chan_iax2.so
+noload => chan_mgcp.so
+noload => chan_unistim.so
+noload => chan_motif.so
+noload => chan_skinny.so
+noload => chan_ooh323.so
+
+; res_hep.so opens an fd on the first SIP call received, and doesn't close it after
+; the call has completed. I could either noload res_hep or set the fd test condition
+; to ignore it. It's easier to just noload.
+
+noload => res_hep.so
Propchange: asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/configs/ast1/modules.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/configs/ast1/modules.conf
------------------------------------------------------------------------------
svn:keywords = 'Author Date Id Revision'
Propchange: asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/configs/ast1/modules.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/configs/ast1/pjsip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/configs/ast1/pjsip.conf?view=auto&rev=6341
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/configs/ast1/pjsip.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/configs/ast1/pjsip.conf Wed Jan 28 11:43:53 2015
@@ -1,0 +1,9 @@
+[main-transport]
+type = transport
+bind = 127.0.0.1
+protocol = udp
+
+[sipp]
+type = endpoint
+context = default
+allow = g722
Propchange: asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
svn:keywords = 'Author Date Id Revision'
Propchange: asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/sipp/uac-488.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/sipp/uac-488.xml?view=auto&rev=6341
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/sipp/uac-488.xml (added)
+++ asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/sipp/uac-488.xml Wed Jan 28 11:43:53 2015
@@ -1,0 +1,52 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+<scenario name="Incompatible">
+ <send retrans="500">
+ <![CDATA[
+
+ INVITE 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]SIPpTag00[call_number]
+ To: sut <sip:[service]@[remote_ip]>
+ Call-ID: [call_id]
+ CSeq: 1 INVITE
+ Contact: sip:sipp@[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:8 PCMA/8000
+ a=rtpmap:0 PCMU/8000
+ a=ptime:20
+
+ ]]>
+ </send>
+
+ <recv response="488" rtd="true">
+ </recv>
+
+ <send>
+ <![CDATA[
+
+ ACK 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]SIPpTag00[call_number]
+ To: sut <sip:[service]@[remote_ip]>[peer_tag_param]
+ Call-ID: [call_id]
+ CSeq: 1 ACK
+ Contact: sip:sipp@[local_ip]:[local_port]
+ Max-Forwards: 70
+ Subject: Performance Test
+ Content-Length: 0
+
+ ]]>
+ </send>
+</scenario>
+
Propchange: asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/sipp/uac-488.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/sipp/uac-488.xml
------------------------------------------------------------------------------
svn:keywords = 'Author Date Id Revision'
Propchange: asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/sipp/uac-488.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/test-config.yaml?view=auto&rev=6341
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/test-config.yaml (added)
+++ asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/test-config.yaml Wed Jan 28 11:43:53 2015
@@ -1,0 +1,35 @@
+testinfo:
+ summary: 'Tests that Asterisk cleans up properly when incompatible codecs are offered.'
+ description: |
+ 'Asterisk has an endpoint configured that only accepts G.722 audio.
+ A SIPp scenario places an offer with only ulaw and alaw in it. We ensure that
+ Asterisk responds with a 488.
+
+ The test also uses the file-descriptors test condition to ensure that
+ we do not leak any RTP ports.'
+
+test-modules:
+ test-object:
+ config-section: sipp-config
+ typename: 'sipp.SIPpTestCase'
+
+sipp-config:
+ test-iterations:
+ -
+ scenarios:
+ - { 'key-args': {'scenario': 'uac-488.xml', '-i': '127.0.0.1', '-p': '5061', '-s': 'echo'}}
+
+
+properties:
+ minversion: '13.2.0'
+ dependencies:
+ - sipp:
+ version: 'v3.0'
+ - asterisk: 'res_pjsip'
+ - asterisk: 'res_pjsip_session'
+ - asterisk: 'res_pjsip_sdp_rtp'
+ tags:
+ - pjsip
+ testconditions:
+ -
+ name: 'file-descriptors'
Propchange: asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/test-config.yaml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/test-config.yaml
------------------------------------------------------------------------------
svn:keywords = 'Author Date Id Revision'
Propchange: asterisk/trunk/tests/channels/pjsip/basic_calls/incoming/off-nominal/incompatible_codecs/test-config.yaml
------------------------------------------------------------------------------
svn:mime-type = text/plain
More information about the asterisk-commits
mailing list