fix msc_vlr_test_call.c

Substantial parts of the CC / MNCC call establishment were so far completely
missing from the msc_vlr_test_call.c tests. With my new insights on CC and MNCC
procedures, complete the tests.

Root reason: since I am going to re-order the sequence of events to enable
codec negotiation via SDP in MNCC, I want to have comprehensive tests of the CC
procedures to see the effect as diffs in the test output.

Change-Id: Ie995e264eb1e3dd9558a1753ff6f9b55c1d084e1
diff --git a/tests/msc_vlr/msc_vlr_tests.h b/tests/msc_vlr/msc_vlr_tests.h
index 9df9cf0..57022b4 100644
--- a/tests/msc_vlr/msc_vlr_tests.h
+++ b/tests/msc_vlr/msc_vlr_tests.h
@@ -31,6 +31,8 @@
 #include <osmocom/msc/msub.h>
 #include <osmocom/msc/msc_a.h>
 #include <osmocom/msc/mncc.h>
+#include <osmocom/msc/call_leg.h>
+#include <osmocom/msc/rtp_stream.h>
 
 extern bool _log_lines;
 #define _log(fmt, args...) do { \
@@ -140,6 +142,23 @@
 	}
 }
 
+extern bool bssap_assignment_expected;
+extern bool bssap_assignment_sent;
+extern bool iu_rab_assignment_expected;
+extern bool iu_rab_assignment_sent;
+
+static inline void expect_bssap_assignment()
+{
+	bssap_assignment_expected = true;
+	bssap_assignment_sent = false;
+}
+
+static inline void expect_iu_rab_assignment()
+{
+	iu_rab_assignment_expected = true;
+	iu_rab_assignment_sent = false;
+}
+
 struct msc_vlr_test_cmdline_opts {
 	bool verbose;
 	int run_test_nr;
@@ -163,10 +182,12 @@
 void ms_sends_classmark_update(const struct osmo_gsm48_classmark *classmark);
 void ms_sends_ciphering_mode_complete(const char *inner_nas_msg);
 void ms_sends_security_mode_complete();
+void ms_sends_assignment_complete(enum mgcp_codecs assigned_codec);
 void gsup_rx(const char *rx_hex, const char *expect_tx_hex);
 void send_sms(struct vlr_subscr *receiver,
 	      struct vlr_subscr *sender,
 	      char *str);
+void crcx_ok(enum rtp_direction dir);
 
 void ran_sends_clear_complete();
 
@@ -248,3 +269,6 @@
 #define VLR_TO_HLR "0a0101"
 #define EUSE_TO_MSC_USSD "0a0103"
 #define MSC_USSD_TO_EUSE "0a0103"
+
+extern bool got_crcx;
+void expect_crcx(enum rtp_direction towards);