From f47f18c2f666cea2d20a60afe9255ab93ae243bc Mon Sep 17 00:00:00 2001 From: Marco Capetta Date: Fri, 19 Jan 2018 15:38:21 +0100 Subject: [PATCH] TT#29926 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). Change-Id: I21fd1de2a088ab71042cbee54bd00cd1ea9f5a0b --- debian/patches/series | 1 + debian/patches/sipwise/session_timers | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 debian/patches/sipwise/session_timers diff --git a/debian/patches/series b/debian/patches/series index 438c5c14..d517bc6a 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -28,3 +28,4 @@ build-system-revamp.patch fix-build-with-newer-openssl.patch sipwise/0020-TT-9521-fix-200OK-without-SPD.patch sipwise/usage-reporting.patch +sipwise/session_timers diff --git a/debian/patches/sipwise/session_timers b/debian/patches/sipwise/session_timers new file mode 100644 index 00000000..70aeff88 --- /dev/null +++ b/debian/patches/sipwise/session_timers @@ -0,0 +1,25 @@ +--- a/core/plug-in/session_timer/SessionTimer.cpp ++++ b/core/plug-in/session_timer/SessionTimer.cpp +@@ -346,7 +346,21 @@ void SessionTimer::updateTimer(AmSession + 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);