ASCI: Receive messages from MSC-A role related to VGCS/VBS

Voice group call and voice broadcast call messages as well as assignment
result are forwarded to VGCS/VBS call control.

Change-Id: Ie68eedb8fcb064a55cd71b58630d7a8c8b5f29ad
Related: OS#4854
diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c
index 9f2420e..0d8a747 100644
--- a/src/libmsc/msc_a.c
+++ b/src/libmsc/msc_a.c
@@ -1386,6 +1386,10 @@
 #endif
 
 	switch (pdisc) {
+	case GSM48_PDISC_GROUP_CC:
+	case GSM48_PDISC_BCAST_CC:
+		rc = gsm44068_rcv_bcc_gcc(msc_a, NULL, msg);
+		break;
 	case GSM48_PDISC_CC:
 		rc = gsm0408_rcv_cc(msc_a, msg);
 		break;
@@ -1422,11 +1426,23 @@
 
 static void msc_a_up_call_assignment_complete(struct msc_a *msc_a, const struct ran_msg *ac)
 {
-	struct gsm_trans *cc_trans = msc_a->cc.active_trans;
+	struct gsm_trans *cc_trans = msc_a->cc.active_trans, *gcc_trans;
 	struct rtp_stream *rtps_to_ran = msc_a->cc.call_leg ? msc_a->cc.call_leg->rtp[RTP_TO_RAN] : NULL;
 	const struct gsm0808_speech_codec *codec_if_known = ac->assignment_complete.codec_present ?
 							    &ac->assignment_complete.codec : NULL;
 
+	/* For a voice group call, handling is performed by VGCS FSM */
+	gcc_trans = trans_find_by_type(msc_a, TRANS_GCC);
+	if (gcc_trans) {
+		vgcs_vbs_caller_assign_cpl(gcc_trans);
+		return;
+	}
+	gcc_trans = trans_find_by_type(msc_a, TRANS_BCC);
+	if (gcc_trans) {
+		vgcs_vbs_caller_assign_cpl(gcc_trans);
+		return;
+	}
+
 	if (!rtps_to_ran) {
 		LOG_MSC_A(msc_a, LOGL_ERROR, "Rx Assignment Complete, but no RTP stream is set up\n");
 		return;
@@ -1513,6 +1529,18 @@
 		return;
 	}
 
+	/* For a voice group call, release is performed by VGCS FSM */
+	trans = trans_find_by_type(msc_a, TRANS_GCC);
+	if (trans) {
+		vgcs_vbs_caller_assign_fail(trans);
+		return;
+	}
+	trans = trans_find_by_type(msc_a, TRANS_BCC);
+	if (trans) {
+		vgcs_vbs_caller_assign_fail(trans);
+		return;
+	}
+
 	/* Otherwise, a silent call might be active */
 	trans = trans_find_by_type(msc_a, TRANS_SILENT_CALL);
 	if (trans) {