[Asterisk-code-review] Testsuite: Fix tests/channels/pjsip/info empty (testsuite[master])
Anonymous Coward
asteriskteam at digium.com
Thu Jun 30 16:49:38 CDT 2016
Anonymous Coward #1000019 has submitted this change and it was merged.
Change subject: Testsuite: Fix tests/channels/pjsip/info_empty
......................................................................
Testsuite: Fix tests/channels/pjsip/info_empty
The test was actually not negotiating SDP because it had the
Content-Type header on the wrong messages. The initial INVITE
was missing it and the ACK message had it but with no body.
* Fixed the sipp scenario SDP negotiation.
* Updated the test description verbage.
* Updated the test module dependency list.
* Replaced the usage of MusicOnHold with the Echo application.
Change-Id: If03d3c14c99a182326006dc0f770c2bde65efb5d
---
M tests/channels/pjsip/info_empty/configs/ast1/extensions.conf
M tests/channels/pjsip/info_empty/sipp/empty.xml
M tests/channels/pjsip/info_empty/test-config.yaml
3 files changed, 12 insertions(+), 22 deletions(-)
Approvals:
Mark Michelson: Looks good to me, approved
Anonymous Coward #1000019: Verified
Joshua Colp: Looks good to me, but someone else must approve
diff --git a/tests/channels/pjsip/info_empty/configs/ast1/extensions.conf b/tests/channels/pjsip/info_empty/configs/ast1/extensions.conf
index 7476ff3..66040ab 100644
--- a/tests/channels/pjsip/info_empty/configs/ast1/extensions.conf
+++ b/tests/channels/pjsip/info_empty/configs/ast1/extensions.conf
@@ -2,4 +2,5 @@
exten => empty,1,NoOp()
same => n,Answer()
- same => n,MusicOnHold()
+ same => n,Echo()
+ same => n,Hangup()
diff --git a/tests/channels/pjsip/info_empty/sipp/empty.xml b/tests/channels/pjsip/info_empty/sipp/empty.xml
index 5fb32ec..28b0b31 100644
--- a/tests/channels/pjsip/info_empty/sipp/empty.xml
+++ b/tests/channels/pjsip/info_empty/sipp/empty.xml
@@ -4,7 +4,6 @@
<scenario name="INFO Test">
<send retrans="500">
<![CDATA[
-
INVITE sip:empty@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: test <sip:test@[local_ip]:[local_port]>;tag=[call_number]
@@ -14,6 +13,7 @@
Contact: sip:test@[local_ip]:[local_port]
Max-Forwards: 70
Subject: INFO Test
+ Content-Type: application/sdp
Content-Length: [len]
v=0
@@ -21,9 +21,8 @@
s=-
c=IN IP[media_ip_type] [media_ip]
t=0 0
- m=audio 6000 RTP/AVP 0
+ m=audio [media_port] RTP/AVP 0
a=rtpmap:0 PCMU/8000
-
]]>
</send>
@@ -35,7 +34,6 @@
<send>
<![CDATA[
-
ACK sip:empty@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: test <sip:test@[local_ip]:[local_port]>;tag=[call_number]
@@ -45,15 +43,12 @@
Contact: sip:test@[local_ip]:[local_port]
Max-Forwards: 70
Subject: INFO Test
- Content-Type: application/sdp
Content-Length: 0
-
]]>
</send>
<send retrans="500">
<![CDATA[
-
INFO sip:test@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: empty <sip:empty@[local_ip]:[local_port]>;tag=[call_number]
@@ -62,8 +57,7 @@
CSeq: 2 INFO
Contact: sip:test@[local_ip]:[local_port]
Max-Forwards: 70
- Content-Length: [len]
-
+ Content-Length: 0
]]>
</send>
@@ -72,7 +66,6 @@
<send retrans="500">
<![CDATA[
-
INFO sip:test@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: empty <sip:empty@[local_ip]:[local_port]>;tag=[call_number]
@@ -81,8 +74,7 @@
CSeq: 3 INFO
Contact: sip:test@[local_ip]:[local_port]
Max-Forwards: 70
- Content-Length: [len]
-
+ Content-Length: 0
]]>
</send>
@@ -91,7 +83,6 @@
<send retrans="500">
<![CDATA[
-
INFO sip:test@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: empty <sip:empty@[local_ip]:[local_port]>;tag=[call_number]
@@ -100,8 +91,7 @@
CSeq: 17 INFO
Contact: sip:test@[local_ip]:[local_port]
Max-Forwards: 70
- Content-Length: [len]
-
+ Content-Length: 0
]]>
</send>
@@ -112,7 +102,6 @@
<send retrans="500">
<![CDATA[
-
BYE sip:empty@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: test <sip:test@[local_ip]:[local_port]>;tag=[call_number]
@@ -123,7 +112,6 @@
Max-Forwards: 70
Subject: INFO Test
Content-Length: 0
-
]]>
</send>
diff --git a/tests/channels/pjsip/info_empty/test-config.yaml b/tests/channels/pjsip/info_empty/test-config.yaml
index 8e9f286..b1e19e1 100644
--- a/tests/channels/pjsip/info_empty/test-config.yaml
+++ b/tests/channels/pjsip/info_empty/test-config.yaml
@@ -1,9 +1,9 @@
testinfo:
- summary: 'Test that asterisk correctly handles EMTPY INFO in SIP packets when using PJSIP.'
+ summary: 'Test that asterisk correctly handles empty INFO requests when using PJSIP.'
description:
- This test checks that after establishing a call via an INVITE, when
- an INFO packet is recieved with no 'Content-Type' header, the
- emtpy INFO module should respond with a 200 - OK packet.
+ 'This test checks that after establishing a call via an INVITE, when
+ an INFO request is recieved with no "Content-Type" header, the
+ emtpy INFO request gets a 200 OK response.'
test-modules:
test-object:
@@ -20,6 +20,7 @@
minversion: '13.10.0'
dependencies:
- app : 'sipp'
+ - asterisk : 'app_echo'
- asterisk : 'res_pjsip'
tags:
- pjsip
--
To view, visit https://gerrit.asterisk.org/3118
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If03d3c14c99a182326006dc0f770c2bde65efb5d
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
More information about the asterisk-code-review
mailing list