Module: kamailio
Branch: master
Commit: 1422dde30224398f47b3acdec1741b183386a3b8
URL:
https://github.com/kamailio/kamailio/commit/1422dde30224398f47b3acdec1741b1…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2024-12-14T13:44:56+01:00
pua: support as-feature-event
---
Modified: src/modules/pua/add_events.c
Modified: src/modules/pua/add_events.h
Modified: src/modules/pua/hash.h
---
Diff:
https://github.com/kamailio/kamailio/commit/1422dde30224398f47b3acdec1741b1…
Patch:
https://github.com/kamailio/kamailio/commit/1422dde30224398f47b3acdec1741b1…
---
diff --git a/src/modules/pua/add_events.c b/src/modules/pua/add_events.c
index 97f4035b07d..5b94b44e707 100644
--- a/src/modules/pua/add_events.c
+++ b/src/modules/pua/add_events.c
@@ -109,6 +109,13 @@ int pua_add_events(void)
return -1;
}
+ if(add_pua_event(DFKS_EVENT, "as-feature-event",
+ "application/x-as-feature-event+xml", dfks_process_body)
+ < 0) {
+ LM_ERR("while adding event as-feature-event\n");
+ return -1;
+ }
+
return 0;
}
@@ -382,3 +389,9 @@ int dlg_process_body(publ_info_t *publ, str **fin_body, int ver, str
**tuple)
*fin_body = publ->body;
return 0;
}
+
+int dfks_process_body(publ_info_t *publ, str **fin_body, int ver, str **tuple)
+{
+ *fin_body = publ->body;
+ return 0;
+}
diff --git a/src/modules/pua/add_events.h b/src/modules/pua/add_events.h
index e766b950f1f..12733fe2c53 100644
--- a/src/modules/pua/add_events.h
+++ b/src/modules/pua/add_events.h
@@ -44,5 +44,7 @@ int dlg_process_body(
struct publ_info *publ, str **fin_body, int ver, str **tuple);
int reginfo_process_body(
struct publ_info *publ, str **fin_body, int ver, str **tuple);
+int dfks_process_body(
+ struct publ_info *publ, str **fin_body, int ver, str **tuple);
#endif
diff --git a/src/modules/pua/hash.h b/src/modules/pua/hash.h
index 370695c0664..36f0335cc79 100644
--- a/src/modules/pua/hash.h
+++ b/src/modules/pua/hash.h
@@ -43,6 +43,7 @@
#define DIALOG_EVENT 1 << 5
#define REGINFO_EVENT 1 << 6
#define XCAPDIFF_EVENT 1 << 7
+#define DFKS_EVENT 1 << 8
#define UL_PUBLISH 1 << 0
#define BLA_PUBLISH 1 << 1
@@ -60,6 +61,8 @@
#define REGINFO_SUBSCRIBE 1 << 13
#define XCAPDIFF_PUBLISH 1 << 14
#define XCAPDIFF_SUBSCRIBE 1 << 15
+#define DFKS_PUBLISH 1 << 16
+#define DFKS_SUBSCRIBE 1 << 17
#define NO_UPDATEDB_FLAG 1 << 0
#define UPDATEDB_FLAG 1 << 1
@@ -175,6 +178,9 @@ static inline int get_event_flag(str *event)
case 15:
if(strncmp(event->s, "message-summary", 15) == 0)
return MSGSUM_EVENT;
+ case 16:
+ if(strncmp(event->s, "as-feature-event", 16) == 0)
+ return DFKS_EVENT;
}
LM_ERR("Unknown event string\n");