diff sip-in/prack.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 0d6435808bcd
children c1c94b7fc2e2
line wrap: on
line diff
--- a/sip-in/prack.c	Wed Sep 28 14:29:10 2022 -0800
+++ b/sip-in/prack.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 <ctype.h>
 #include <stdio.h>
@@ -22,6 +23,8 @@
 extern char *get_single_header();
 extern struct call *find_call_by_sip_id();
 
+extern unsigned sip_linger_error;
+
 void
 handle_sip_prack(req, ess, sin)
 	struct sip_pkt_rx *req;
@@ -90,6 +93,7 @@
 			disconnect_mncc(call, GSM48_CAUSE_LOC_PRN_S_LU,
 					GSM48_CC_CAUSE_INTERWORKING);
 			disconnect_tmgw(call);
+			sip_mark_end_time(call, sip_linger_error);
 			/* TODO: transition from TEARDOWN to DEAD_SIP */
 			return;
 		}