Skip to content

Commit

Permalink
Add new test scenario and simplify addition of new tests
Browse files Browse the repository at this point in the history
This scenario tests for proper declination behavior for encrypted video streams
when video support is disabled.  This patch also removes the requirement for
manual numbering of SIP ports for each scenario within the codec_negotiation
test.


git-svn-id: https://origsvn.digium.com/svn/testsuite/asterisk/trunk@2995 a5964663-950a-4945-9369-5dd0b5cb08c1
  • Loading branch information
Kinsey Moore committed Jan 19, 2012
1 parent f0531c6 commit 296ccdd
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 52 deletions.
7 changes: 7 additions & 0 deletions tests/channels/SIP/codec_negotiation/configs/ast1/sip.conf
Expand Up @@ -17,3 +17,10 @@ disallow=all
allow=ulaw
allow=h261
allow=t140

[guest2]
type=user
insecure=invite,port
videosupport=no
t38pt_udptl=no
textsupport=no
75 changes: 23 additions & 52 deletions tests/channels/SIP/codec_negotiation/run-test
Expand Up @@ -18,62 +18,33 @@ WORKING_DIR = "sip/codec_negotiation"
TEST_DIR = os.path.dirname(os.path.realpath(__file__))

SIPP_SCENARIOS = [
{
'scenario' : 'single_audio.xml',
'-p' : '5061'
},
{
'scenario' : 'decline_incompat_audio.xml',
'-p' : '5062'
},
{
'scenario' : 'single_video.xml',
'-p' : '5063'
},
{
'scenario' : 'single_video_inverse.xml',
'-p' : '5064'
},
{
'scenario' : 'decline_incompat_video.xml',
'-p' : '5065'
},
{
'scenario' : 'single_text.xml',
'-p' : '5066'
},
{
'scenario' : 'single_text_inverse.xml',
'-p' : '5067'
},
{
'scenario' : 'decline_incompat_text.xml',
'-p' : '5068'
},
{
'scenario' : 'single_image.xml',
'-p' : '5069'
},
{
'scenario' : 'single_image_inverse.xml',
'-p' : '5070'
},
{
'scenario' : 'avt_streams.xml',
'-p' : '5071'
},
{
'scenario' : 'multistream.xml',
'-p' : '5072'
},
{
'scenario' : 'orderstream.xml',
'-p' : '5073'
}
{'scenario' : 'single_audio.xml',},
{'scenario' : 'decline_incompat_audio.xml',},
{'scenario' : 'single_video.xml',},
{'scenario' : 'single_video_inverse.xml',},
{'scenario' : 'decline_incompat_video.xml',},
{'scenario' : 'single_text.xml',},
{'scenario' : 'single_text_inverse.xml',},
{'scenario' : 'decline_incompat_text.xml',},
{'scenario' : 'single_image.xml',},
{'scenario' : 'single_image_inverse.xml',},
{'scenario' : 'avt_streams.xml',},
{'scenario' : 'multistream.xml',},
{'scenario' : 'fax_sim.xml',},
{'scenario' : 'decline_crypto.xml',},
{'scenario' : 'orderstream.xml',},
]

# set port numberings and timeouts
port = 5061
def update_entry(entry):
global port
entry['-p'] = "%d" % port
port += 1

# generate SIPP scenarios with appropriate port numbers and the config to go with it
def main():
[update_entry(i) for i in SIPP_SCENARIOS]
test = SIPpTest(WORKING_DIR, TEST_DIR, SIPP_SCENARIOS)
return test.run()

Expand Down
54 changes: 54 additions & 0 deletions tests/channels/SIP/codec_negotiation/sipp/decline_crypto.xml
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd">

<scenario name="Channel Test">
<send retrans="500">
<![CDATA[
INVITE sip:guest2@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: test1 <sip:guest2@[local_ip]:[local_port]>;tag=[call_number]
To: test <sip:guest2@[remote_ip]:[remote_port]>
Call-ID: [call_id]
CSeq: 1 INVITE
Contact: sip:guest2@[local_ip]:[local_port]
Max-Forwards: 70
Subject: Performance Test
User-Agent: Channel Param Test
Content-Type: application/sdp
Content-Length: [len]
v=0
o=guest1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
s=-
c=IN IP[media_ip_type] [media_ip]
t=0 0
m=video 6002 RTP/SAVP 32 34
a=crypto:1 AES_CM_128_HMAC_SHA1_32 inline:WbTBosdVUZqEb6Htqhn+m3z7wUh4RJVR8nE15GbN
a=rtpmap:32 MPV/90000
a=rtpmap:34 H263/90000
]]>
</send>

<recv response="100"
optional="true">
</recv>

<recv response="180" optional="true">
</recv>

<recv response="183" optional="true">
</recv>

<recv response="488" rtd="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>

0 comments on commit 296ccdd

Please sign in to comment.