[asterisk-commits] codecs/opus/fmtp with spaces: Add test for fmtp parsing with... (testsuite[master])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Dec 8 11:07:49 CST 2016
Kevin Harwell has submitted this change and it was merged. ( https://gerrit.asterisk.org/4577 )
Change subject: codecs/opus/fmtp_with_spaces: Add test for fmtp parsing with spaces.
......................................................................
codecs/opus/fmtp_with_spaces: Add test for fmtp parsing with spaces.
This adds a test that places an incoming call into Asterisk
using opus with spaces separating the attributes in the fmtp
line.
ASTERISK-26579
Change-Id: I6389a14f5f95705b2968cd72469340cbd10321c6
---
A tests/codecs/opus/fmtp_with_spaces/configs/ast1/extensions.conf
A tests/codecs/opus/fmtp_with_spaces/configs/ast1/pjsip.conf
A tests/codecs/opus/fmtp_with_spaces/sipp/playback_with_initial_sdp.xml
A tests/codecs/opus/fmtp_with_spaces/test-config.yaml
M tests/codecs/opus/tests.yaml
5 files changed, 131 insertions(+), 0 deletions(-)
Approvals:
Kevin Harwell: Looks good to me, approved
Mark Michelson: Looks good to me, but someone else must approve
Anonymous Coward #1000019: Verified
diff --git a/tests/codecs/opus/fmtp_with_spaces/configs/ast1/extensions.conf b/tests/codecs/opus/fmtp_with_spaces/configs/ast1/extensions.conf
new file mode 100644
index 0000000..a52330b
--- /dev/null
+++ b/tests/codecs/opus/fmtp_with_spaces/configs/ast1/extensions.conf
@@ -0,0 +1,4 @@
+[default]
+exten => playback,1,Answer()
+same => n,Playback(hello-world)
+same => n,Hangup()
diff --git a/tests/codecs/opus/fmtp_with_spaces/configs/ast1/pjsip.conf b/tests/codecs/opus/fmtp_with_spaces/configs/ast1/pjsip.conf
new file mode 100644
index 0000000..9568339
--- /dev/null
+++ b/tests/codecs/opus/fmtp_with_spaces/configs/ast1/pjsip.conf
@@ -0,0 +1,15 @@
+[local-transport-template](!)
+type=transport
+bind=127.0.0.1
+
+[local-transport-udp](local-transport-template)
+protocol=udp
+
+[endpoint-template-ipv4](!)
+type=endpoint
+context=default
+allow=!all,opus
+media_address=127.0.0.1
+
+[alice-ipv4-udp](endpoint-template-ipv4)
+transport=local-transport-udp
diff --git a/tests/codecs/opus/fmtp_with_spaces/sipp/playback_with_initial_sdp.xml b/tests/codecs/opus/fmtp_with_spaces/sipp/playback_with_initial_sdp.xml
new file mode 100644
index 0000000..0f8e7a4
--- /dev/null
+++ b/tests/codecs/opus/fmtp_with_spaces/sipp/playback_with_initial_sdp.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="INVITE to playback with SDP in initial INVITE">
+ <send retrans="500">
+ <![CDATA[
+
+ INVITE sip:playback@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+ To: test <sip:test@[remote_ip]:[remote_port]>
+ Call-ID: [call_id]
+ CSeq: 1 INVITE
+ Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+ Max-Forwards: 70
+ Subject: Test
+ User-Agent: Test
+ Content-Type: application/sdp
+ Content-Length: [len]
+
+ v=0
+ o=phoneA 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 107 101
+ a=rtpmap:107 opus/48000/2
+ a=fmtp:107 useinbandfec=0; cbr=1; minptime=10; maxptime=40
+ a=rtpmap:101 telephone-event/8000
+ a=fmtp:101 0-16
+ a=ptime:20
+
+ ]]>
+ </send>
+
+ <recv response="100"
+ optional="true">
+ </recv>
+
+ <recv response="200" rtd="true">
+ </recv>
+
+ <send>
+ <![CDATA[
+
+ ACK sip:playback@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: test1 <sip:[service]@[local_ip]:[local_port]>;tag=[call_number]
+ To: test <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+ Call-ID: [call_id]
+ CSeq: 1 ACK
+ Contact: <sip:test@[local_ip]:[local_port];transport=[transport]>
+ Max-Forwards: 70
+ Subject: Test
+ Content-Length: 0
+
+ ]]>
+ </send>
+
+ <recv request="BYE">
+ </recv>
+
+ <send>
+ <![CDATA[
+
+ SIP/2.0 200 OK
+ [last_Via:]
+ [last_From:]
+ [last_To:]
+ [last_Call-ID:]
+ [last_CSeq:]
+ Contact: <sip:[local_ip]:[local_port];transport=[transport]>
+ 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>
+
diff --git a/tests/codecs/opus/fmtp_with_spaces/test-config.yaml b/tests/codecs/opus/fmtp_with_spaces/test-config.yaml
new file mode 100644
index 0000000..d78ce24
--- /dev/null
+++ b/tests/codecs/opus/fmtp_with_spaces/test-config.yaml
@@ -0,0 +1,26 @@
+testinfo:
+ summary: 'Tests incoming call with opus that has spaces in fmtp'
+ description: |
+ 'Run a SIPp scenario that sends a call to res_pjsip with an opus offer that has spaces in fmtp'
+
+test-modules:
+ test-object:
+ config-section: test-object-config
+ typename: 'sipp.SIPpTestCase'
+
+test-object-config:
+ fail-on-any: False
+ test-iterations:
+ -
+ scenarios:
+ - { 'key-args': {'scenario': 'playback_with_initial_sdp.xml', '-i': '127.0.0.1', '-p': '5061', '-s': 'alice-ipv4-udp'} }
+
+properties:
+ minversion: ['13.13.1', '14.2.1']
+ dependencies:
+ - sipp :
+ version : 'v3.0'
+ - asterisk : 'app_playback'
+ - asterisk : 'res_pjsip'
+ tags:
+ - pjsip
diff --git a/tests/codecs/opus/tests.yaml b/tests/codecs/opus/tests.yaml
index 209627b..cf5152d 100644
--- a/tests/codecs/opus/tests.yaml
+++ b/tests/codecs/opus/tests.yaml
@@ -2,3 +2,4 @@
tests:
- test: 'encode'
- test: 'decode'
+ - test: 'fmtp_with_spaces'
--
To view, visit https://gerrit.asterisk.org/4577
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I6389a14f5f95705b2968cd72469340cbd10321c6
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
More information about the asterisk-commits
mailing list