From fdaed98f44237ddc277cb4ee4ff1487dac67f097 Mon Sep 17 00:00:00 2001 From: Marco Capetta Date: Thu, 29 Dec 2022 10:14:20 +0100 Subject: [PATCH] MT#55831 NGCP refreshes the session even if STT is not supported Unset Sems internal Session Timers in case B leg doesn't support it (no Timer in Supported header of 200OK message). (real ticket number: TT#29926) Change-Id: Id27748751f36017e12d6ae84bce602a9995f9d34 --- core/plug-in/session_timer/SessionTimer.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/core/plug-in/session_timer/SessionTimer.cpp b/core/plug-in/session_timer/SessionTimer.cpp index e3170c07..a69cca30 100644 --- a/core/plug-in/session_timer/SessionTimer.cpp +++ b/core/plug-in/session_timer/SessionTimer.cpp @@ -346,7 +346,21 @@ void SessionTimer::updateTimer(AmSession* s, const AmSipReply& reply) if (((reply.code < 200) || (reply.code >= 300)) && (!(accept_501_reply && reply.code == 501))) return; - + + // verify if B leg supports Session Timers + remote_timer_aware = + key_in_list(getHeader(reply.hdrs, SIP_HDR_SUPPORTED, SIP_HDR_SUPPORTED_COMPACT), + TIMER_OPTION_TAG); + + if (!remote_timer_aware) { + // timer NOT supported by B leg + DBG("Session Timer NOT supported by leg B, removing internal session timer intervals"); + session_timer_conf.setEnableSessionTimer("no"); + removeTimers(s); + return; + } + + // timer supported by B leg // determine session interval string sess_expires_hdr = getHeader(reply.hdrs, SIP_HDR_SESSION_EXPIRES, SIP_HDR_SESSION_EXPIRES_COMPACT, true);