Module: kamailio
Branch: 6.0
Commit: 5ae059af990782f7f38b6738d01fa59e961e54f7
URL: 
https://github.com/kamailio/kamailio/commit/5ae059af990782f7f38b6738d01fa59e961e54f7

Author: herlesupreeth <[email protected]>
Committer: Victor Seva <[email protected]>
Date: 2026-01-15T09:50:40+01:00

ims_registrar_scscf: check event type before populating Subscription-State in 
NOTIFY from S-CSCF

(cherry picked from commit 913dce948729cdd0f9e45e7d71da8c3936719c58)

---

Modified: src/modules/ims_registrar_scscf/registrar_notify.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/5ae059af990782f7f38b6738d01fa59e961e54f7.diff
Patch: 
https://github.com/kamailio/kamailio/commit/5ae059af990782f7f38b6738d01fa59e961e54f7.patch

---

diff --git a/src/modules/ims_registrar_scscf/registrar_notify.c 
b/src/modules/ims_registrar_scscf/registrar_notify.c
index 5ce22bc1cab..bcb9c72d7a1 100644
--- a/src/modules/ims_registrar_scscf/registrar_notify.c
+++ b/src/modules/ims_registrar_scscf/registrar_notify.c
@@ -1709,7 +1709,9 @@ void create_notifications(udomain_t *_t, impurecord_t 
*r_passed,
 
                create_notification = 0;
 
-               if(r->reg_state == IMPU_REGISTERED && s->expires > act_time) {
+               if((event_type != IMS_REGISTRAR_CONTACT_EXPIRED
+                                  && event_type != 
IMS_REGISTRAR_CONTACT_UNREGISTERED)
+                               && s->expires > act_time) {
                        subscription_state.s = (char *)pkg_malloc(32 * 
sizeof(char *));
                        subscription_state.len = 0;
                        if(subscription_state.s) {
@@ -1726,8 +1728,8 @@ void create_notifications(udomain_t *_t, impurecord_t 
*r_passed,
 
                } else {
                        STR_PKG_DUP(subscription_state, subs_terminated, "pkg 
subs state");
-                       LM_DBG("Expires is past than current time or impu is 
not registered! Subscription state: "
-                                  "[%.*s]\n",
+                       LM_DBG("Expires is past than current time or UE 
deregistered! "
+                                  "Subscription state: [%.*s]\n",
                                        subscription_state.len, 
subscription_state.s);
                }
 

_______________________________________________
Kamailio - Development Mailing List -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to