[Asterisk-code-review] fax/pjsip/t38 initial offer: Add test for T.38 in initial SD... (testsuite[master])
Jenkins2
asteriskteam at digium.com
Mon Jul 9 04:09:25 CDT 2018
Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/9357 )
Change subject: fax/pjsip/t38_initial_offer: Add test for T.38 in initial SDP offer.
......................................................................
fax/pjsip/t38_initial_offer: Add test for T.38 in initial SDP offer.
This is a test which sends an INVITE to Asterisk which includes
an audio and a T.38 stream. The test confirms that the audio stream
is accepted while the T.38 stream is declined, as we do not support
T.38 in an initial INVITE.
ASTERISK-27763
Change-Id: I8dfa4e74750f92a8a9d25078e0b3605f7d34ea3c
---
A tests/fax/pjsip/t38_initial_offer/configs/ast1/extensions.conf
A tests/fax/pjsip/t38_initial_offer/configs/ast1/pjsip.conf
A tests/fax/pjsip/t38_initial_offer/sipp/uac-audio-t38.xml
A tests/fax/pjsip/t38_initial_offer/test-config.yaml
M tests/fax/pjsip/tests.yaml
5 files changed, 163 insertions(+), 0 deletions(-)
Approvals:
Richard Mudgett: Looks good to me, but someone else must approve
Kevin Harwell: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, approved
Jenkins2: Approved for Submit
diff --git a/tests/fax/pjsip/t38_initial_offer/configs/ast1/extensions.conf b/tests/fax/pjsip/t38_initial_offer/configs/ast1/extensions.conf
new file mode 100644
index 0000000..6955acb
--- /dev/null
+++ b/tests/fax/pjsip/t38_initial_offer/configs/ast1/extensions.conf
@@ -0,0 +1,5 @@
+[default]
+
+exten => answer,1,NoOp()
+ same => n,Answer()
+ same => n,Hangup()
diff --git a/tests/fax/pjsip/t38_initial_offer/configs/ast1/pjsip.conf b/tests/fax/pjsip/t38_initial_offer/configs/ast1/pjsip.conf
new file mode 100644
index 0000000..7168d1e
--- /dev/null
+++ b/tests/fax/pjsip/t38_initial_offer/configs/ast1/pjsip.conf
@@ -0,0 +1,22 @@
+[global]
+type=global
+debug=yes
+
+[system]
+type=system
+timer_t1=100
+timer_b=6400
+
+[local-transport-udp]
+type=transport
+bind=127.0.0.1
+protocol=udp
+
+[endpoint-template](!)
+type=endpoint
+context=default
+media_address=127.0.0.1
+
+[alice](endpoint-template)
+allow=!all,g722,ulaw,alaw
+t38_udptl=yes
diff --git a/tests/fax/pjsip/t38_initial_offer/sipp/uac-audio-t38.xml b/tests/fax/pjsip/t38_initial_offer/sipp/uac-audio-t38.xml
new file mode 100644
index 0000000..872b856
--- /dev/null
+++ b/tests/fax/pjsip/t38_initial_offer/sipp/uac-audio-t38.xml
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Basic Sipstone UAC">
+ <send retrans="500">
+ <![CDATA[
+
+ INVITE sip:answer@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: alice <sip:[service]@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number]
+ To: sut <sip:test@[remote_ip]:[remote_port]>
+ Call-ID: [call_id]
+ CSeq: 1 INVITE
+ Contact: sip:test@[local_ip]:[local_port]
+ Max-Forwards: 70
+ Subject: Codec 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 2326 RTP/AVP 9 8 0 101
+ c=IN IP4 132.177.252.162
+ b=TIAS:64000
+ a=rtpmap:9 G722/8000
+ a=rtpmap:8 PCMA/8000
+ a=rtpmap:0 PCMU/8000
+ a=rtpmap:101 telephone-event/8000
+ a=fmtp:101 0-15
+ a=rtcp:2327 IN IP[media_ip_type] [media_ip]
+ a=sendrecv
+ m=image 4389 udptl t38
+ a=T38FaxVersion:0
+ a=T38MaxBitRate:14400
+ a=T38FaxRateManagement:transferredTCF
+ a=T38FaxMaxDatagram:1400
+ a=T38FaxUdpEC:t38UDPRedundancy
+
+ ]]>
+ </send>
+
+ <recv response="100" optional="true">
+ </recv>
+
+ <recv response="181" optional="true">
+ </recv>
+
+ <recv response="180" optional="true">
+ </recv>
+
+ <recv response="183" optional="true">
+ </recv>
+
+ <recv response="200" rtd="true">
+ <action>
+ <ereg regexp="m=audio [0-9]{1,5} RTP/AVP 9 0 8 101+..*"
+ search_in="body" check_it="true" assign_to="1"/>
+ <test assign_to="1" variable="1" compare="equal" value=""/>
+ <ereg regexp="m=image 0 udptl t38+..*"
+ search_in="body" check_it="true" assign_to="2"/>
+ <test assign_to="2" variable="2" compare="equal" value=""/>
+ </action>
+ </recv>
+
+ <send>
+ <![CDATA[
+
+ ACK sip:answer@[remote_ip]:[remote_port] SIP/2.0
+ Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
+ From: alice <sip:[service]@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number]
+ To: sut <sip:test@[remote_ip]:[remote_port]>[peer_tag_param]
+ Call-ID: [call_id]
+ CSeq: 1 ACK
+ Contact: sip:alice-codec-match@[local_ip]:[local_port]
+ Max-Forwards: 70
+ Subject: Performance 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>
+
+ <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
+
+ <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
+
+</scenario>
+
diff --git a/tests/fax/pjsip/t38_initial_offer/test-config.yaml b/tests/fax/pjsip/t38_initial_offer/test-config.yaml
new file mode 100644
index 0000000..33cbe10
--- /dev/null
+++ b/tests/fax/pjsip/t38_initial_offer/test-config.yaml
@@ -0,0 +1,27 @@
+testinfo:
+ summary: 'Test that an offer with audio and t38 has the t38 declined'
+ description: |
+ This tests an inbound initial offer containing audio and t38. As we do
+ not support t38 in an initial offer (only as a re-invite) the t38 stream
+ should be declined.
+
+test-modules:
+ test-object:
+ config-section: test-object-config
+ typename: 'sipp.SIPpTestCase'
+
+test-object-config:
+ memcheck-delay-stop: 7
+ fail-on-any: False
+ test-iterations:
+ -
+ scenarios:
+ - { 'key-args': {'scenario': 'uac-audio-t38.xml', '-i': '127.0.0.1', '-p': '5061', '-s': 'alice'} }
+
+properties:
+ dependencies:
+ - sipp :
+ version : 'v3.0'
+ - asterisk : 'res_pjsip'
+ tags:
+ - pjsip
diff --git a/tests/fax/pjsip/tests.yaml b/tests/fax/pjsip/tests.yaml
index 66822c2..e6022b1 100644
--- a/tests/fax/pjsip/tests.yaml
+++ b/tests/fax/pjsip/tests.yaml
@@ -8,3 +8,4 @@
- test: 't38_1xx_response'
- test: 't38_fast_reject'
- test: 't38_with_auth'
+ - test: 't38_initial_offer'
--
To view, visit https://gerrit.asterisk.org/9357
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I8dfa4e74750f92a8a9d25078e0b3605f7d34ea3c
Gerrit-Change-Number: 9357
Gerrit-PatchSet: 2
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180709/9da8dd57/attachment-0001.html>
More information about the asterisk-code-review
mailing list