FreeCalypso > hg > themwi-system-sw
comparison 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 |
comparison
equal
deleted
inserted
replaced
108:0d6435808bcd | 109:9b87894704eb |
---|---|
3 * when we send them a reliable 180 Ringing response. | 3 * when we send them a reliable 180 Ringing response. |
4 */ | 4 */ |
5 | 5 |
6 #include <sys/types.h> | 6 #include <sys/types.h> |
7 #include <sys/socket.h> | 7 #include <sys/socket.h> |
8 #include <sys/time.h> | |
8 #include <netinet/in.h> | 9 #include <netinet/in.h> |
9 #include <ctype.h> | 10 #include <ctype.h> |
10 #include <stdio.h> | 11 #include <stdio.h> |
11 #include <stdint.h> | 12 #include <stdint.h> |
12 #include <stdlib.h> | 13 #include <stdlib.h> |
19 #include "../libsip/out_msg.h" | 20 #include "../libsip/out_msg.h" |
20 #include "call.h" | 21 #include "call.h" |
21 | 22 |
22 extern char *get_single_header(); | 23 extern char *get_single_header(); |
23 extern struct call *find_call_by_sip_id(); | 24 extern struct call *find_call_by_sip_id(); |
25 | |
26 extern unsigned sip_linger_error; | |
24 | 27 |
25 void | 28 void |
26 handle_sip_prack(req, ess, sin) | 29 handle_sip_prack(req, ess, sin) |
27 struct sip_pkt_rx *req; | 30 struct sip_pkt_rx *req; |
28 struct uas_parse_hdrs *ess; | 31 struct uas_parse_hdrs *ess; |
88 call->sip_state = SIP_STATE_MSG_SIZE_ERR; | 91 call->sip_state = SIP_STATE_MSG_SIZE_ERR; |
89 call->overall_state = OVERALL_STATE_TEARDOWN; | 92 call->overall_state = OVERALL_STATE_TEARDOWN; |
90 disconnect_mncc(call, GSM48_CAUSE_LOC_PRN_S_LU, | 93 disconnect_mncc(call, GSM48_CAUSE_LOC_PRN_S_LU, |
91 GSM48_CC_CAUSE_INTERWORKING); | 94 GSM48_CC_CAUSE_INTERWORKING); |
92 disconnect_tmgw(call); | 95 disconnect_tmgw(call); |
96 sip_mark_end_time(call, sip_linger_error); | |
93 /* TODO: transition from TEARDOWN to DEAD_SIP */ | 97 /* TODO: transition from TEARDOWN to DEAD_SIP */ |
94 return; | 98 return; |
95 } | 99 } |
96 out_msg_finish(&resp); | 100 out_msg_finish(&resp); |
97 sip_tx_packet(&resp, sin); | 101 sip_tx_packet(&resp, sin); |