comparison sip-in/bye_out.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 4e16aeafbfbf
comparison
equal deleted inserted replaced
109:9b87894704eb 110:c1c94b7fc2e2
71 71
72 rc = fill_bye_out_msg(&msg, call); 72 rc = fill_bye_out_msg(&msg, call);
73 if (rc < 0) { 73 if (rc < 0) {
74 syslog(LOG_ERR, "outgoing BYE request msg length exceeded"); 74 syslog(LOG_ERR, "outgoing BYE request msg length exceeded");
75 call->sip_state = SIP_STATE_MSG_SIZE_ERR; 75 call->sip_state = SIP_STATE_MSG_SIZE_ERR;
76 /* TODO: transition from TEARDOWN to DEAD_SIP */ 76 sip_mark_end_time(call, sip_linger_error);
77 transition_dead_sip(call);
77 return; 78 return;
78 } 79 }
79 sip_tx_packet(&msg, &call->udp_sin); 80 sip_tx_packet(&msg, &call->udp_sin);
80 call->sip_state = SIP_STATE_BYE_SENT; 81 call->sip_state = SIP_STATE_BYE_SENT;
81 call->sip_tx_count = 1; 82 call->sip_tx_count = 1;
114 call->sip_state = SIP_STATE_ENDED; 115 call->sip_state = SIP_STATE_ENDED;
115 if (msg->status_code <= 299) 116 if (msg->status_code <= 299)
116 sip_mark_end_time(call, sip_linger_acked); 117 sip_mark_end_time(call, sip_linger_acked);
117 else 118 else
118 sip_mark_end_time(call, sip_linger_error); 119 sip_mark_end_time(call, sip_linger_error);
120 transition_dead_sip(call);
119 } 121 }
120 } 122 }