diff sip-in/call_clear.c @ 110:c1c94b7fc2e2

sip-in call clearing: DEAD_SIP transition implemented
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 28 Sep 2022 18:37:19 -0800
parents 9b87894704eb
children 7a4d4b8d5f04
line wrap: on
line diff
--- a/sip-in/call_clear.c	Wed Sep 28 16:32:13 2022 -0800
+++ b/sip-in/call_clear.c	Wed Sep 28 18:37:19 2022 -0800
@@ -26,3 +26,21 @@
 {
 	call->sip_clear_time = cur_event_time.tv_sec + linger;
 }
+
+void
+transition_dead_sip(call)
+	struct call *call;
+{
+	if (call->overall_state != OVERALL_STATE_TEARDOWN)
+		return;
+	if (call->sip_state != SIP_STATE_ENDED &&
+	    call->sip_state != SIP_STATE_MSG_SIZE_ERR)
+		return;
+	if (call->mncc_state != MNCC_STATE_NO_EXIST)
+		return;
+	if (call->mgw_state != MGW_STATE_NO_EXIST)
+		return;
+	if (call->mgw_xact)
+		return;
+	call->overall_state = OVERALL_STATE_DEAD_SIP;
+}