aboutsummaryrefslogtreecommitdiffstats
path: root/mgw/MGCP_Test.ttcn
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-09-21 10:54:42 +0200
committerlaforge <laforge@osmocom.org>2020-09-22 19:32:11 +0000
commitbefd3aaca496b74ea4e00a29ca9a3d6bc64f1d49 (patch)
treea1c17b6d25f585336fbf967a856039f6b8645501 /mgw/MGCP_Test.ttcn
parentbefa21c5c93d3bdb24e8b24f4fa7d381db639a2e (diff)
mgw: Introduce test TC_crcx_osmo_ign
Diffstat (limited to 'mgw/MGCP_Test.ttcn')
-rw-r--r--mgw/MGCP_Test.ttcn30
1 files changed, 30 insertions, 0 deletions
diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn
index 4be034bf..f6dfe57e 100644
--- a/mgw/MGCP_Test.ttcn
+++ b/mgw/MGCP_Test.ttcn
@@ -732,6 +732,35 @@ module MGCP_Test {
setverdict(pass);
}
+ /* Test CRCX with X-Osmo-IGN, using same message as SYS#5063 to make sure it doesn't cause a crash. */
+ testcase TC_crcx_osmo_ign() runs on dummy_CT {
+ var template MgcpCommand cmd;
+ var MgcpResponse resp;
+ var MgcpEndpoint ep := "7@" & c_mgw_domain;
+ var MgcpCallId call_id := '3'H;
+
+ f_init(ep);
+
+ /* CRCX 1 7@mgw MGCP 1.0
+ C: 3
+ L: p:20, a:GSM-EFR, nt:IN
+ M: recvonly
+ X-Osmo-IGN: C
+ */
+
+ cmd := ts_CRCX(get_next_trans_id(), ep, "netwtest", call_id);
+ cmd.params := {ts_MgcpParCallId(call_id),
+ t_MgcpParLocConnOpt("p:20, a:GSM-EFR, nt:IN"),
+ t_MgcpParConnMode("recvonly"),
+ t_MgcpParOsmoIGN("C")};
+ resp := mgcp_transceive_mgw(cmd, tr_CRCX_ACK);
+ extract_conn_id(resp);
+
+ /* clean-up */
+ f_dlcx_ok(ep, call_id);
+ setverdict(pass);
+ }
+
/* test CRCX with early bi-directional mode, expect 527 as
* bi-diretional media can only be established once both local and
* remote side are specified, see MGCP RFC */
@@ -2360,6 +2389,7 @@ module MGCP_Test {
execute(TC_crcx_no_lco());
execute(TC_crcx_noprefix());
execute(TC_crcx_unsupp_mode());
+ execute(TC_crcx_osmo_ign());
execute(TC_crcx_early_bidir_mode());
execute(TC_crcx_unsupp_param());
execute(TC_crcx_missing_callid());