aboutsummaryrefslogtreecommitdiffstats
path: root/mgw
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2018-06-05 17:28:02 +0200
committerPhilipp Maier <pmaier@sysmocom.de>2018-06-06 17:16:21 +0200
commit45635f43798566ea370acd0b0af27a9a62ec1a25 (patch)
tree41df85b9179457828deeaba0c899c89a658b67d7 /mgw
parentac8fc7f859823f2cd4924362467974d787665ef6 (diff)
MGCP_Test: Test non LCO crcx
When a CRCX without an LCO option (codec) is sent, then older versions of osmo-mgw will omit the port number in the SDP part of the response. Also no default codec is selected and reported back. This testcase pinpoints the problem. Change-Id: Ie16cdab936ce468fe378d4ec9e1c61f81c07fb4e Related: OS#2658
Diffstat (limited to 'mgw')
-rw-r--r--mgw/MGCP_Test.ttcn37
-rw-r--r--mgw/expected-results.xml3
2 files changed, 40 insertions, 0 deletions
diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn
index 1892a423..26a07012 100644
--- a/mgw/MGCP_Test.ttcn
+++ b/mgw/MGCP_Test.ttcn
@@ -307,12 +307,48 @@ module MGCP_Test {
f_dlcx_ok(ep, call_id);
}
+ function f_crcx_no_lco(charstring ep_prefix) runs on dummy_CT {
+ var MgcpEndpoint ep := ep_prefix & "2@" & c_mgw_domain;
+ var template MgcpCommand cmd;
+ var MgcpResponse resp;
+ var MgcpCallId call_id := '1234'H;
+
+ f_init(ep);
+
+ /* create the connection on the MGW */
+ cmd := ts_CRCX_no_lco(get_next_trans_id(), ep, "recvonly", call_id);
+ resp := mgcp_transceive_mgw(cmd, tr_CRCX_ACK);
+ extract_conn_id(resp);
+
+ /* clean-up */
+ f_dlcx_ok(ep, call_id);
+
+ /* See also OS#2658: Even when we omit the LCO information, we
+ expect the MGW to pick a sane payload type for us. This
+ payload type should be visible in the SDP of the response. */
+ if (resp.sdp.media_list[0].attributes[0].rtpmap.attr_value != "0 PCMU/8000/1") {
+ setverdict(fail, "SDP contains unexpected codec");
+ }
+
+ /* See also OS#2658: We also expect the MGW to assign a port
+ number to us. */
+ if (isbound(resp.sdp.media_list[0].media_field.ports.port_number) == false) {
+ setverdict(fail, "SDP does not contain a port number");
+ }
+ }
+
/* test valid CRCX without SDP */
testcase TC_crcx() runs on dummy_CT {
f_crcx(c_mgw_ep_rtpbridge);
setverdict(pass);
}
+ /* test valid CRCX without SDP and LCO */
+ testcase TC_crcx_no_lco() runs on dummy_CT {
+ f_crcx_no_lco(c_mgw_ep_rtpbridge);
+ setverdict(pass);
+ }
+
/* test valid CRCX without SDP (older method without endpoint prefix) */
testcase TC_crcx_noprefix() runs on dummy_CT {
f_crcx("");
@@ -881,6 +917,7 @@ module MGCP_Test {
control {
execute(TC_selftest());
execute(TC_crcx());
+ execute(TC_crcx_no_lco());
execute(TC_crcx_noprefix());
execute(TC_crcx_unsupp_mode());
execute(TC_crcx_early_bidir_mode());
diff --git a/mgw/expected-results.xml b/mgw/expected-results.xml
index b85a2b14..03c8fd27 100644
--- a/mgw/expected-results.xml
+++ b/mgw/expected-results.xml
@@ -4,6 +4,9 @@
<skipped>no verdict</skipped>
</testcase>
<testcase classname='MGCP_Test' name='TC_crcx' time='MASKED'/>
+ <testcase classname='MGCP_Test' name='TC_crcx_no_lco' time='MASKED'>
+ <error type='DTE'>Dynamic test case error: Using the value of an optional field containing omit.</error>
+ </testcase>
<testcase classname='MGCP_Test' name='TC_crcx_noprefix' time='MASKED'/>
<testcase classname='MGCP_Test' name='TC_crcx_unsupp_mode' time='MASKED'/>
<testcase classname='MGCP_Test' name='TC_crcx_early_bidir_mode' time='MASKED'/>