diff sip-in/mncc_handle.c @ 65:7c0309df59f8

sip-in: handling of ALERTING state
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 18 Sep 2022 15:44:22 -0800
parents e5aee661e3b2
children 5beb51de1bae
line wrap: on
line diff
--- a/sip-in/mncc_handle.c	Sun Sep 18 15:29:30 2022 -0800
+++ b/sip-in/mncc_handle.c	Sun Sep 18 15:44:22 2022 -0800
@@ -23,7 +23,14 @@
 	struct call *call;
 	struct gsm_mncc *msg;
 {
-	/* handling to be implemented */
+	if (call->mncc_state != MNCC_STATE_STARTED) {
+		syslog(LOG_ERR, "MNCC_ALERT_IND in wrong MNCC state 0x%x",
+			call->mncc_state);
+		return;
+	}
+	call->mncc_state = MNCC_STATE_ALERTING;
+	call->overall_state = OVERALL_STATE_ALERTING;
+	signal_invite_ringing(call);
 }
 
 static void