From 049db98d1c6261afc9191a6aed6556f86cb6dc77 Mon Sep 17 00:00:00 2001 From: Donat Zenichev Date: Mon, 13 Jul 2026 13:36:53 +0200 Subject: [PATCH] MT#62266 SessionTimer: track timers support (UPDATE method) Only for UPDATE method for now, track whether remote side actually declares it supports timers, if not remove. This may affect things, in case remote side expects timers should have been declared only once during the session origination, but all in all remote side must always add the `Supported: timer` header to keep us explicitly aware. Additionally: improve logs. Change-Id: I80d4efbe38701b95549d02830392b93019cc2b85 --- core/plug-in/session_timer/SessionTimer.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/core/plug-in/session_timer/SessionTimer.cpp b/core/plug-in/session_timer/SessionTimer.cpp index 2bfa8a1c..6eae4d2c 100644 --- a/core/plug-in/session_timer/SessionTimer.cpp +++ b/core/plug-in/session_timer/SessionTimer.cpp @@ -269,6 +269,15 @@ void SessionTimer::updateTimer(AmSession* s, const AmSipRequest& req) { remote_timer_aware = key_in_list(getHeader(req.hdrs, SIP_HDR_SUPPORTED, SIP_HDR_SUPPORTED_COMPACT), TIMER_OPTION_TAG); + /* disable timers for this leg if not declare explicitly (UPDATE only) */ + if (req.method == SIP_METH_UPDATE && !remote_timer_aware) { + /* timer is not supported by originator's leg */ + DBG("Session timer not supported by request originator's leg, remove session timer intervals"); + session_timer_conf.setEnableSessionTimer(false); + removeTimers(s); + return; + } + // determine session interval string sess_expires_hdr = getHeader(req.hdrs, SIP_HDR_SESSION_EXPIRES, @@ -361,8 +370,8 @@ void SessionTimer::updateTimer(AmSession* s, const AmSipReply& reply) 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"); + /* timer is not supported by responder's leg */ + DBG("Session timer not supported by responder's leg, remove session timer intervals"); session_timer_conf.setEnableSessionTimer(false); removeTimers(s); return;