Module: kamailio
Branch: master
Commit: 913dce948729cdd0f9e45e7d71da8c3936719c58
URL: 
https://github.com/kamailio/kamailio/commit/913dce948729cdd0f9e45e7d71da8c3936719c58

Author: herlesupreeth <[email protected]>
Committer: Victor Seva <[email protected]>
Date: 2025-11-13T12:56:34+01:00

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

---

Modified: src/modules/ims_registrar_scscf/registrar_notify.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/913dce948729cdd0f9e45e7d71da8c3936719c58.diff
Patch: 
https://github.com/kamailio/kamailio/commit/913dce948729cdd0f9e45e7d71da8c3936719c58.patch

---

diff --git a/src/modules/ims_registrar_scscf/registrar_notify.c 
b/src/modules/ims_registrar_scscf/registrar_notify.c
index 7d17d7977a5..35520d19ccb 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