diff sip-in/sip_ack.c @ 109:9b87894704eb

sip-in: first step toward final call clearing
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 28 Sep 2022 16:32:13 -0800
parents 9e9034ef476c
children c1c94b7fc2e2
line wrap: on
line diff
--- a/sip-in/sip_ack.c	Wed Sep 28 14:29:10 2022 -0800
+++ b/sip-in/sip_ack.c	Wed Sep 28 16:32:13 2022 -0800
@@ -5,6 +5,7 @@
 
 #include <sys/types.h>
 #include <sys/socket.h>
+#include <sys/time.h>
 #include <netinet/in.h>
 #include <stdio.h>
 #include <stdint.h>
@@ -18,6 +19,8 @@
 
 extern struct call *find_call_by_sip_id();
 
+extern unsigned sip_linger_acked;
+
 void
 handle_sip_ack(req, ess, sin)
 	struct sip_pkt_rx *req;
@@ -51,6 +54,7 @@
 		break;
 	case SIP_STATE_INVITE_ERR:
 		call->sip_state = SIP_STATE_ENDED;
+		sip_mark_end_time(call, sip_linger_acked);
 		break;
 	}
 }