From ba4d682b705c0f0793caa287e784d044f3eb12a0 Mon Sep 17 00:00:00 2001 From: Keith Whyte Date: Sun, 3 Jul 2022 04:12:58 +0100 Subject: [PATCH] Change CC_CAUSE returned on unanswered MT Call The timer "mgw X2" (RTP stream establishing timeout) is set by default to 30 seconds. When an MT call is ringing and remains unanswered, it is this timer that will expire, and the call is terminated. Up to now this results in a CC_CAUSE of Resource Unavailable and if osmo-sip-connector is in use, the SIP agent will get 503 Service Unavailable. While "resource unavailable" may be technically correct, in that the MGW did not return an rtp stream in time, returning "No User Responding" (resulting in SIP 480) is probably a more accurate description of what actually happened, allowing the switch to inform the caller. Change-Id: I4a9cfc388ec9ecb743d154a114a6db638eac4701 --- src/libmsc/gsm_04_08_cc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libmsc/gsm_04_08_cc.c b/src/libmsc/gsm_04_08_cc.c index 8132de576..99174de1a 100644 --- a/src/libmsc/gsm_04_08_cc.c +++ b/src/libmsc/gsm_04_08_cc.c @@ -278,6 +278,8 @@ void _gsm48_cc_trans_free(struct gsm_trans *trans) if (trans->cc.mncc_initiated) { mncc_release_ind(trans->net, trans, trans->callref, GSM48_CAUSE_LOC_PRN_S_LU, + (trans->cc.state == GSM_CSTATE_CALL_RECEIVED) ? + GSM48_CC_CAUSE_USER_NOTRESPOND : GSM48_CC_CAUSE_RESOURCE_UNAVAIL); }