BSC_Tests: count MGCP operations in as_media

as_media handles the MGCP interaction for most of the tests. However,
it does not make sure if transactions are missing or if too many
transactions are performed (e.g. if an SCCP-Lite tests still creates
the connections pointing to the core network, even if they must not
created by the BSC in this case). So lets make sure that the MGCP
transactions are performed as expected by counting them.

- Add counters to count CRCX and MDCX transactions
- Check those counters after call establishment and handover

Change-Id: Ib073b097a840ca3a8ee99c4ed41f59f574191d98
Related: OS#3292
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 149d5b7..2897a0b 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -2122,10 +2122,19 @@
 	f_vty_handover(0, 0, g_chan_nr, 1);
 	/* temporarily suspend DChan processing on BTS1 to avoid race with RSLEM_register */
 	f_rslem_suspend(RSL1_PROC);
+
+	/* From the MGW perspective, a handover is is characterized by
+	 * performing one MDCX operation with the MGW. So we expect to see
+	 * one more MDCX during handover. */
+	g_media.mgcp_conn[0].mdcx_seen_exp := g_media.mgcp_conn[0].crcx_seen_exp + 1;
+
 	alt {
 	[] as_handover(hs);
-	/* FIXME: somehow determine that the hand-over has completed, by MGCP MDCX? */
 	}
+
+	/* Check the amount of MGCP transactions is still consistant with the
+	 * test expectation */
+	f_check_mgcp_expectations()
 }
 
 testcase TC_ho_int() runs on test_CT {