# HG changeset patch # User Mychaela Falconia # Date 1663725656 28800 # Node ID 72b7d85d6354426932936ed1ac82759d68f94c5c # Parent fe39404092d932c8c566e0d61b123c17780187f4 sip-in: retransmission error handling diff -r fe39404092d9 -r 72b7d85d6354 sip-in/retrans.c --- a/sip-in/retrans.c Tue Sep 20 16:49:24 2022 -0800 +++ b/sip-in/retrans.c Tue Sep 20 18:00:56 2022 -0800 @@ -12,6 +12,7 @@ #include #include #include +#include "../include/gsm48_const.h" #include "../libsip/out_msg.h" #include "call.h" @@ -31,8 +32,14 @@ fill_invite_200_resp(&msg, call); sip_tx_packet(&msg, &call->udp_sin); call->sip_tx_count++; - } else - /* error handling to be implemented */; + } else { + /* TODO: send BYE */ + call->sip_state = SIP_STATE_ENDED; + call->overall_state = OVERALL_STATE_TEARDOWN; + disconnect_mncc(call, GSM48_CAUSE_LOC_PRN_S_LU, + GSM48_CC_CAUSE_INTERWORKING); + disconnect_tmgw(call); + } break; case SIP_STATE_INVITE_ERR: if (call->sip_tx_count < cfg_retrans_count) { @@ -42,7 +49,7 @@ sip_tx_packet(&msg, &call->udp_sin); call->sip_tx_count++; } else - /* error handling to be implemented */; + call->sip_state = SIP_STATE_ENDED; break; } }