# HG changeset patch # User Mychaela Falconia # Date 1665533481 28800 # Node ID 7176dc850d7acea0af7cd89851a6ae1951a7381c # Parent 0ecbc3dc8f93174c7584917a6751d41e3e2b7287 sip-in hold/retr error handling: simply send BYE Because we know that the SIP state is CONNECTED at the time of any such error event, we can call initiate_bye() instead of disconnect_sip(), and thereby get rid of struct gsm_mncc_cause which will never be used in this scenario anyway. diff -r 0ecbc3dc8f93 -r 7176dc850d7a sip-in/mgw_resp.c --- a/sip-in/mgw_resp.c Tue Oct 11 15:58:42 2022 -0800 +++ b/sip-in/mgw_resp.c Tue Oct 11 16:11:21 2022 -0800 @@ -14,7 +14,6 @@ #include #include #include "../include/gsm48_const.h" -#include "../include/mncc.h" #include "../include/tmgw_ctrl.h" #include "../include/tmgw_const.h" #include "call.h" @@ -132,12 +131,6 @@ } } -static struct gsm_mncc_cause mgw_hold_retrieve_error = { - .coding = GSM48_CAUSE_CODING_GSM, - .location = GSM48_CAUSE_LOC_PRN_S_LU, - .value = GSM48_CC_CAUSE_NETWORK_OOO, -}; - static void mdcx_hold_response(call, msg) struct call *call; @@ -155,7 +148,7 @@ tmgw_send_dlcx(call); disconnect_mncc(call, GSM48_CAUSE_LOC_PRN_S_LU, GSM48_CC_CAUSE_NETWORK_OOO); - disconnect_sip(call, &mgw_hold_retrieve_error); + initiate_bye(call); } } @@ -176,7 +169,7 @@ tmgw_send_dlcx(call); disconnect_mncc(call, GSM48_CAUSE_LOC_PRN_S_LU, GSM48_CC_CAUSE_NETWORK_OOO); - disconnect_sip(call, &mgw_hold_retrieve_error); + initiate_bye(call); } }