[asterisk-commits] Testsuite: Fix tests/channels/pjsip/headers (testsuite[master])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Jun 30 16:49:08 CDT 2016
Anonymous Coward #1000019 has submitted this change and it was merged.
Change subject: Testsuite: Fix tests/channels/pjsip/headers
......................................................................
Testsuite: Fix tests/channels/pjsip/headers
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 module dependency list.
Change-Id: I500d0dcb2c80b525d7498c223960cdbc89399419
---
M tests/channels/pjsip/headers/configs/ast1/extensions.conf
M tests/channels/pjsip/headers/sipp/inbound-headers.xml
M tests/channels/pjsip/headers/sipp/outbound-headers.xml
M tests/channels/pjsip/headers/sipp/outbound-recv-headers.xml
M tests/channels/pjsip/headers/test-config.yaml
5 files changed, 19 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/headers/configs/ast1/extensions.conf b/tests/channels/pjsip/headers/configs/ast1/extensions.conf
index 5e76f58..e1e1ad8 100644
--- a/tests/channels/pjsip/headers/configs/ast1/extensions.conf
+++ b/tests/channels/pjsip/headers/configs/ast1/extensions.conf
@@ -14,11 +14,13 @@
same => n,UserEvent(InboundResult,result:${IF($[${custom1_var}=hopethisworks]?pass:fail)})
same => n,UserEvent(InboundResult,result:${IF($[${custom2_var}=justtotest:inbound]?pass:fail)})
same => n,Echo()
+ same => n,Hangup()
; The outbound call.
exten => outbound-recv,1,NoOp()
same => n,Dial(PJSIP/outbound-recv,,B(default^outbound-handler^1))
+ same => n,Hangup()
; The outbound call handler.
diff --git a/tests/channels/pjsip/headers/sipp/inbound-headers.xml b/tests/channels/pjsip/headers/sipp/inbound-headers.xml
index 345fc03..c2d10f4 100644
--- a/tests/channels/pjsip/headers/sipp/inbound-headers.xml
+++ b/tests/channels/pjsip/headers/sipp/inbound-headers.xml
@@ -4,7 +4,6 @@
<scenario name="Send INVITE from an inbound channel">
<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:inbound@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number]
@@ -16,6 +15,7 @@
Contact: sip:sipp@[local_ip]:[local_port]
Max-Forwards: 70
Subject: Test
+ Content-Type: application/sdp
Content-Length: [len]
v=0
@@ -23,9 +23,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>
@@ -37,7 +36,6 @@
<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:inbound@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number]
@@ -47,9 +45,7 @@
Contact: sip:sipp@[local_ip]:[local_port]
Max-Forwards: 70
Subject: Test
- Content-Type: application/sdp
Content-Length: 0
-
]]>
</send>
@@ -57,7 +53,6 @@
<send retrans="500">
<![CDATA[
-
BYE sip:[service]@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: sipp <sip:inbound@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number]
@@ -68,7 +63,6 @@
Max-Forwards: 70
Subject: Test
Content-Length: 0
-
]]>
</send>
diff --git a/tests/channels/pjsip/headers/sipp/outbound-headers.xml b/tests/channels/pjsip/headers/sipp/outbound-headers.xml
index 182ff87..4a639e4 100644
--- a/tests/channels/pjsip/headers/sipp/outbound-headers.xml
+++ b/tests/channels/pjsip/headers/sipp/outbound-headers.xml
@@ -16,11 +16,11 @@
Content-Length: [len]
v=0
- o=- 1324901698 1324901698 IN IP4 [local_ip]
+ o=- 1324901698 1324901698 IN IP[local_ip_type] [local_ip]
s=-
- c=IN IP4 [local_ip]
+ c=IN IP[media_ip_type] [media_ip]
t=0 0
- m=audio 2226 RTP/AVP 0 101
+ m=audio [media_port] RTP/AVP 0 101
a=sendrecv
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
@@ -60,7 +60,6 @@
[last_CSeq:]
Contact: <sip:outbound@[local_ip]:[local_port];transport=[transport]>
Allow: INVITE, ACK, MESSAGE, BYE
- Content-Type: application/sdp
Content-Lnegth: 0
]]>
</send>
diff --git a/tests/channels/pjsip/headers/sipp/outbound-recv-headers.xml b/tests/channels/pjsip/headers/sipp/outbound-recv-headers.xml
index 866f8f0..cc14dd0 100644
--- a/tests/channels/pjsip/headers/sipp/outbound-recv-headers.xml
+++ b/tests/channels/pjsip/headers/sipp/outbound-recv-headers.xml
@@ -18,7 +18,6 @@
<send>
<![CDATA[
-
SIP/2.0 180 Ringing
[last_Via:]
[last_From:]
@@ -27,13 +26,11 @@
[last_CSeq:]
Contact: <sip:[local_ip]:[local_port];transport=[transport]>
Content-Length: 0
-
]]>
</send>
<send retrans="500">
<![CDATA[
-
SIP/2.0 200 OK
[last_Via:]
[last_From:]
@@ -45,11 +42,11 @@
Content-Length: [len]
v=0
- o=- 1324901698 1324901698 IN IP4 [local_ip]
+ o=- 1324901698 1324901698 IN IP[local_ip_type] [local_ip]
s=-
- c=IN IP4 [local_ip]
+ c=IN IP[media_ip_type] [media_ip]
t=0 0
- m=audio 2226 RTP/AVP 0 101
+ m=audio [media_port] RTP/AVP 0 101
a=sendrecv
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
@@ -60,7 +57,6 @@
<send retrans="500">
<![CDATA[
-
BYE sip:outbound@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: <sip:outbound-recv@[local_ip]:[local_port]>;tag=[pid]SIPpTag01[call_number]
@@ -71,7 +67,6 @@
Max-Forwards: 70
Subject: Test
Content-Length: 0
-
]]>
</send>
diff --git a/tests/channels/pjsip/headers/test-config.yaml b/tests/channels/pjsip/headers/test-config.yaml
index 6369f72..23268e6 100644
--- a/tests/channels/pjsip/headers/test-config.yaml
+++ b/tests/channels/pjsip/headers/test-config.yaml
@@ -1,8 +1,8 @@
testinfo:
summary: 'Tests the different capabilities of PJSIP_HEADER.'
description:
- Checks to see if PJSIP_HEADER can add, remove, get, and update different SIP headers
- in a PJSIP session.
+ 'Checks to see if PJSIP_HEADER can add, remove, get, and update
+ different SIP headers in a PJSIP session.'
test-modules:
test-object:
@@ -50,6 +50,13 @@
minversion: '12.0.0'
dependencies:
- app : 'sipp'
+ - asterisk : 'app_dial'
+ - asterisk : 'app_echo'
+ - asterisk : 'app_stack'
+ - asterisk : 'app_userevent'
+ - asterisk : 'func_logic'
+ - asterisk : 'func_uri'
- asterisk : 'res_pjsip'
+ - asterisk : 'res_pjsip_header_funcs'
tags:
- pjsip
--
To view, visit https://gerrit.asterisk.org/3117
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I500d0dcb2c80b525d7498c223960cdbc89399419
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-commits
mailing list