[sr-dev] git:master:07b19ef0: ims_registrar_scscf: add a new contact state for notifications
Daniel-Constantin Mierla
miconda at gmail.com
Fri Mar 11 10:28:27 CET 2022
Module: kamailio
Branch: master
Commit: 07b19ef0604a48148f1bb14787516334820e5a3a
URL: https://github.com/kamailio/kamailio/commit/07b19ef0604a48148f1bb14787516334820e5a3a
Author: Kristiyan Peychev <kristiyan.peychev at flolive.net>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2022-03-11T10:28:22+01:00
ims_registrar_scscf: add a new contact state for notifications
Add the `deregistered` state to IMS_Registrar_events_enum_t, allowing the
registrar to distinguish between UE unregsitration, which do not require
a notification to be sent, and network-originated deregistration requests.
---
Modified: src/modules/ims_registrar_scscf/registrar_notify.c
Modified: src/modules/ims_registrar_scscf/registrar_notify.h
---
Diff: https://github.com/kamailio/kamailio/commit/07b19ef0604a48148f1bb14787516334820e5a3a.diff
Patch: https://github.com/kamailio/kamailio/commit/07b19ef0604a48148f1bb14787516334820e5a3a.patch
---
diff --git a/src/modules/ims_registrar_scscf/registrar_notify.c b/src/modules/ims_registrar_scscf/registrar_notify.c
index 761b014624..4dd6223431 100644
--- a/src/modules/ims_registrar_scscf/registrar_notify.c
+++ b/src/modules/ims_registrar_scscf/registrar_notify.c
@@ -495,6 +495,7 @@ int event_reg(udomain_t* _d, impurecord_t* r_passed, ucontact_t* c_passed, int e
//richard: we only use reg unreg expired and refresh
case IMS_REGISTRAR_CONTACT_UNREGISTERED:
+ case IMS_REGISTRAR_CONTACT_DEREGISTERED:
case IMS_REGISTRAR_CONTACT_UNREGISTERED_IMPLICIT:
case IMS_REGISTRAR_CONTACT_REGISTERED:
case IMS_REGISTRAR_CONTACT_REFRESHED:
@@ -1967,7 +1968,8 @@ str get_reginfo_partial(impurecord_t *r, ucontact_t *c, int event_type, unsigned
if (//richard we only use expired and unregistered
(event_type == IMS_REGISTRAR_CONTACT_EXPIRED ||
- event_type == IMS_REGISTRAR_CONTACT_UNREGISTERED)
+ event_type == IMS_REGISTRAR_CONTACT_UNREGISTERED ||
+ event_type == IMS_REGISTRAR_CONTACT_DEREGISTERED)
) {
//check if impu record has any other active contacts - if not then set this to terminated - if so then keep this active
//check if asserted is present in any of the path headers
@@ -2011,6 +2013,7 @@ str get_reginfo_partial(impurecord_t *r, ucontact_t *c, int event_type, unsigned
event = r_expired;
expires = 0;
break;
+ case IMS_REGISTRAR_CONTACT_DEREGISTERED:
case IMS_REGISTRAR_CONTACT_UNREGISTERED:
state = r_terminated;
event = r_unregistered;
diff --git a/src/modules/ims_registrar_scscf/registrar_notify.h b/src/modules/ims_registrar_scscf/registrar_notify.h
index 6bfc6d3ce3..04d4958488 100644
--- a/src/modules/ims_registrar_scscf/registrar_notify.h
+++ b/src/modules/ims_registrar_scscf/registrar_notify.h
@@ -116,7 +116,8 @@ typedef enum {
IMS_REGISTRAR_CONTACT_EXPIRED, /**< A contact has expired and will be removed */
IMS_REGISTRAR_CONTACT_UNREGISTERED, /**< User unregistered with Expires 0 */
IMS_REGISTRAR_CONTACT_UNREGISTERED_IMPLICIT, /**< User unregistered implicitly, ie not via explicit deregister */
- IMS_REGISTRAR_SUBSEQUENT_SUBSCRIBE
+ IMS_REGISTRAR_SUBSEQUENT_SUBSCRIBE,
+ IMS_REGISTRAR_CONTACT_DEREGISTERED, /**< User's registration was terminated with RTR */
} IMS_Registrar_events_enum_t;
extern IMS_Registrar_events_enum_t IMS_Registrar_events;
More information about the sr-dev
mailing list