mgw: Handle MgcpParameterList more elegantly, less repetition
diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn
index 21460d0..3decaed 100644
--- a/mgw/MGCP_Test.ttcn
+++ b/mgw/MGCP_Test.ttcn
@@ -446,6 +446,11 @@
 		f_dlcx_ignore(ep, call_id);
 	}
 
+	function f_mgcp_par_append(inout template MgcpParameterList list, template MgcpParameter par) {
+		var integer len := lengthof(list);
+		list[len] := par;
+	}
+
 	/* test CRCX with unsupported Parameters */
 	testcase TC_crcx_unsupp_param() runs on dummy_CT {
 		var template MgcpCommand cmd;
@@ -457,13 +462,9 @@
 		f_init();
 
 		cmd := ts_CRCX(get_next_trans_id(), ep, "recvonly", call_id);
-		cmd.params := {
-			t_MgcpParConnMode("recvonly"),
-			ts_MgcpParCallId(call_id),
-			t_MgcpParLocConnOpt("p:20"),
-			/* osmo-bsc_mgcp/mgw doesn't implement notifications */
-			{ "N", "foobar" }
-		}
+		/* osmo-bsc_mgcp/mgw doesn't implement notifications */
+		f_mgcp_par_append(cmd.params, MgcpParameter:{ "N", "foobar" });
+
 		resp := mgcp_transceive_mgw(cmd, rtmpl);
 		setverdict(pass);
 
@@ -521,11 +522,7 @@
 		f_init();
 
 		cmd := ts_CRCX(get_next_trans_id(), ep, "recvonly", call_id);
-		cmd.params := {
-			t_MgcpParConnMode("recvonly"),
-			ts_MgcpParCallId(call_id),
-			t_MgcpParLocConnOpt("p:111")
-		}
+		cmd.params[2] := t_MgcpParLocConnOpt("p:111");
 		resp := mgcp_transceive_mgw(cmd, rtmpl);
 		setverdict(pass);
 
@@ -543,12 +540,8 @@
 		f_init();
 
 		cmd := ts_CRCX(get_next_trans_id(), ep, "recvonly", call_id);
-		cmd.params := {
-			t_MgcpParConnMode("recvonly"),
-			ts_MgcpParCallId(call_id),
-			/* p:20 is permitted only once and not twice! */
-			t_MgcpParLocConnOpt("p:20, a:AMR, p:20")
-		}
+		/* p:20 is permitted only once and not twice! */
+		cmd.params[2] := t_MgcpParLocConnOpt("p:20, a:AMR, p:20");
 		resp := mgcp_transceive_mgw(cmd, rtmpl);
 		setverdict(pass);