From 2f00333e09481f53d6e7772eb5a13e961e5e5aae Mon Sep 17 00:00:00 2001 From: Donat Zenichev Date: Mon, 9 Mar 2026 15:39:28 +0100 Subject: [PATCH] MT#64611 Remove already applied upstream patches and refresh old ones * remove patches for redis (NULL key) * remove patches for rtpenigne (directional flag) * remove patches for permissions (reload in the middle) * adaptation of kamctl TMPDIR config * adaptation of lcr rate module Change-Id: I64ab5d90b7d5e206d1367d70445b8942bc15b487 --- debian/patches/debian/fix_export.patch | 2 +- debian/patches/debian/no_INSTALL_file.patch | 4 +- .../patches/debian/no_lib64_on_64_bits.patch | 4 +- debian/patches/series | 4 - .../patches/sipwise/add_lcr_rate_module.patch | 22 +-- debian/patches/sipwise/add_pcem_module.patch | 4 +- debian/patches/sipwise/add_tcap_module.patch | 6 +- .../db_redis_protect_length_overflow.patch | 140 ------------------ .../db_redis_support_null_key_values.patch | 31 ---- .../patches/sipwise/dialog-dlg_get_ttag.patch | 14 +- ...rt-profile_get_size-for-all-profiles.patch | 16 +- .../dlg_get_var_error_more_verbose_on_dlg | 6 +- .../do-not-install-default-config.patch | 6 +- .../sipwise/kamctl-TMPDIR-config.patch | 49 ++---- ...t-allow-reloads-in-the-middle-of-ong.patch | 52 ------- .../sipwise/presence_offline_cleanup.patch | 16 +- debian/patches/sipwise/presence_vqr.patch | 4 +- .../patches/sipwise/pv_trans_eval_uri.patch | 4 +- .../sipwise/rtpengine-directional-flag.patch | 11 -- 19 files changed, 64 insertions(+), 331 deletions(-) delete mode 100644 debian/patches/sipwise/db_redis_protect_length_overflow.patch delete mode 100644 debian/patches/sipwise/db_redis_support_null_key_values.patch delete mode 100644 debian/patches/sipwise/permissions-don-t-allow-reloads-in-the-middle-of-ong.patch delete mode 100644 debian/patches/sipwise/rtpengine-directional-flag.patch diff --git a/debian/patches/debian/fix_export.patch b/debian/patches/debian/fix_export.patch index e46e31051..ce79c09f2 100644 --- a/debian/patches/debian/fix_export.patch +++ b/debian/patches/debian/fix_export.patch @@ -7,7 +7,7 @@ Subject: fix_export 1 file changed, 2 insertions(+) diff --git a/src/Makefile b/src/Makefile -index a4be4cc..2362e7c 100644 +index 551839b..b3cc086 100644 --- a/src/Makefile +++ b/src/Makefile @@ -139,6 +139,8 @@ endif diff --git a/debian/patches/debian/no_INSTALL_file.patch b/debian/patches/debian/no_INSTALL_file.patch index 765a36ba7..427344a38 100644 --- a/debian/patches/debian/no_INSTALL_file.patch +++ b/debian/patches/debian/no_INSTALL_file.patch @@ -7,10 +7,10 @@ Subject: no_INSTALL_file 1 file changed, 2 deletions(-) diff --git a/src/Makefile b/src/Makefile -index 744b1e1..a4be4cc 100644 +index 789e35b..551839b 100644 --- a/src/Makefile +++ b/src/Makefile -@@ -860,8 +860,6 @@ install-modules-all: install-every-module install-every-module-doc +@@ -857,8 +857,6 @@ install-modules-all: install-every-module install-every-module-doc install-doc: $(doc_prefix)/$(doc_dir) install-every-module-doc diff --git a/debian/patches/debian/no_lib64_on_64_bits.patch b/debian/patches/debian/no_lib64_on_64_bits.patch index 27944d972..ee9b3e8d3 100644 --- a/debian/patches/debian/no_lib64_on_64_bits.patch +++ b/debian/patches/debian/no_lib64_on_64_bits.patch @@ -7,10 +7,10 @@ Subject: no_lib64_on_64_bits 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/Makefile.defs b/src/Makefile.defs -index d7520fe..a6df36e 100644 +index 0ed3b7d..2ce2b2c 100644 --- a/src/Makefile.defs +++ b/src/Makefile.defs -@@ -454,15 +454,7 @@ endif +@@ -458,15 +458,7 @@ endif $(info target architecture <$(ARCH)>, host architecture <$(HOST_ARCH)>) diff --git a/debian/patches/series b/debian/patches/series index 4632cbff6..517a51bba 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -42,12 +42,8 @@ sipwise/http_client-add-method-parameter-to-http_connect.patch sipwise/lost-add-method-parameter-to-http_connect-calls.patch sipwise/usrloc-don-t-synchronize-on-destroy-for-DB_ONLY.patch sipwise/presence_offline_cleanup.patch -sipwise/rtpengine-directional-flag.patch ### active development -sipwise/permissions-don-t-allow-reloads-in-the-middle-of-ong.patch sipwise/dlg_get_var_error_more_verbose_on_dlg -sipwise/db_redis_protect_length_overflow.patch -sipwise/db_redis_support_null_key_values.patch ### Don't just put stuff in any order ### use gbp pq import/export tooling to help maintain patches diff --git a/debian/patches/sipwise/add_lcr_rate_module.patch b/debian/patches/sipwise/add_lcr_rate_module.patch index ebbb0e15f..d75b04037 100644 --- a/debian/patches/sipwise/add_lcr_rate_module.patch +++ b/debian/patches/sipwise/add_lcr_rate_module.patch @@ -13,10 +13,10 @@ Subject: add_lcr_rate_module create mode 100644 src/modules/lcr_rate/lcr_rate_mod.c diff --git a/src/Makefile.groups b/src/Makefile.groups -index fae0dbd..f54d81d 100644 +index 8ab92ae..42300f8 100644 --- a/src/Makefile.groups +++ b/src/Makefile.groups -@@ -109,6 +109,9 @@ mod_list_sctp=sctp +@@ -107,6 +107,9 @@ mod_list_sctp=sctp # - modules depending on openssl library mod_list_autheph=auth_ephemeral @@ -26,18 +26,18 @@ index fae0dbd..f54d81d 100644 # - modules related to SIMPLE presence extensions mod_list_presence=presence presence_conference presence_dialoginfo \ presence_mwi presence_profile presence_reginfo \ -@@ -287,8 +290,8 @@ mod_list_all=$(sort $(mod_list_basic) $(mod_list_extra) \ - $(mod_list_microhttpd) \ +@@ -286,8 +289,8 @@ mod_list_all=$(sort $(mod_list_basic) $(mod_list_extra) \ $(mod_list_nghttp2) \ $(mod_list_gcrypt) \ -- $(mod_list_rtp_media_server) + $(mod_list_rtp_media_server) \ +- $(mod_list_auth_blockchain) - -+ $(mod_list_rtp_media_server) \ ++ $(mod_list_auth_blockchain) \ + $(mod_list_lcrrate) ### --- Groups defined for source code compilation ### -@@ -345,6 +348,8 @@ module_group_cassandra=$(module_group_cassandra_driver) $(module_group_db) +@@ -344,6 +347,8 @@ module_group_cassandra=$(module_group_cassandra_driver) $(module_group_db) module_group_ignore= $(sort $(filter-out $(module_group_default), $(mod_list_all))) @@ -47,10 +47,10 @@ index fae0dbd..f54d81d 100644 ### --- Groups defined for pacKaging ### diff --git a/src/core/mod_fix.c b/src/core/mod_fix.c -index 900c982..0757a5f 100644 +index efc249a..3169809 100644 --- a/src/core/mod_fix.c +++ b/src/core/mod_fix.c -@@ -598,6 +598,7 @@ int fixup_free_igp_spve(void **param, int param_no) +@@ -605,6 +605,7 @@ int fixup_free_igp_spve(void **param, int param_no) FIXUP_F_SPVE_T(spve_spve, 1, 2, 2, 0) FIXUP_F_SPVE_T(spve_uint, 1, 2, 1, FPARAM_INT) FIXUP_F_SPVE_T(spve_str, 1, 2, 1, FPARAM_STR) @@ -58,7 +58,7 @@ index 900c982..0757a5f 100644 FIXUP_F_SPVE_T(spve_null, 1, 1, 1, 0) /** get the corresp. fixup_free* function. -@@ -644,6 +645,8 @@ free_fixup_function mod_fix_get_fixup_free(fixup_function f) +@@ -651,6 +652,8 @@ free_fixup_function mod_fix_get_fixup_free(fixup_function f) return 0; if(f == fixup_spve_str) return fixup_free_spve_str; @@ -68,7 +68,7 @@ index 900c982..0757a5f 100644 } diff --git a/src/core/mod_fix.h b/src/core/mod_fix.h -index f0e6f0e..cb7182d 100644 +index f58e150..03836dd 100644 --- a/src/core/mod_fix.h +++ b/src/core/mod_fix.h @@ -138,6 +138,8 @@ int fixup_spve_uint(void **param, int param_no); diff --git a/debian/patches/sipwise/add_pcem_module.patch b/debian/patches/sipwise/add_pcem_module.patch index edbc8d6de..3d1093199 100644 --- a/debian/patches/sipwise/add_pcem_module.patch +++ b/debian/patches/sipwise/add_pcem_module.patch @@ -17,10 +17,10 @@ Subject: add_pcem_module create mode 100644 src/modules/pcem/pcem_mod.h diff --git a/src/Makefile.groups b/src/Makefile.groups -index b6fed63..fae0dbd 100644 +index 9a8804a..8ab92ae 100644 --- a/src/Makefile.groups +++ b/src/Makefile.groups -@@ -30,8 +30,8 @@ mod_list_db=acc alias_db auth_db avpops cfg_db db_text db_flatstore \ +@@ -31,8 +31,8 @@ mod_list_db=acc alias_db auth_db avpops cfg_db db_text db_flatstore \ db_cluster dialog dispatcher domain drouting group \ htable topos_htable imc matrix mohqueue msilo mtree p_usrloc pdt permissions \ pipelimit prefix_route registrar sipcapture siptrace speeddial \ diff --git a/debian/patches/sipwise/add_tcap_module.patch b/debian/patches/sipwise/add_tcap_module.patch index 2366b7963..c3da56b29 100644 --- a/debian/patches/sipwise/add_tcap_module.patch +++ b/debian/patches/sipwise/add_tcap_module.patch @@ -11,10 +11,10 @@ Subject: add_tcap_module create mode 100644 src/modules/tcap/tcap_mod.c diff --git a/src/Makefile.groups b/src/Makefile.groups -index f54d81d..6242bb7 100644 +index 42300f8..5db7de0 100644 --- a/src/Makefile.groups +++ b/src/Makefile.groups -@@ -208,6 +208,9 @@ mod_list_erlang=erlang +@@ -203,6 +203,9 @@ mod_list_erlang=erlang # - modules depending on systemd library mod_list_systemd=log_systemd systemdops @@ -24,7 +24,7 @@ index f54d81d..6242bb7 100644 # - modules depending on libnsq (+libev libevbuffsock libcurl libjson-c) library mod_list_nsq=nsq -@@ -351,6 +354,9 @@ module_group_ignore= $(sort $(filter-out $(module_group_default), $(mod_list_all +@@ -350,6 +353,9 @@ module_group_ignore= $(sort $(filter-out $(module_group_default), $(mod_list_all # pkg lcrrate module module_group_klcrrate=$(mod_list_lcrrate) diff --git a/debian/patches/sipwise/db_redis_protect_length_overflow.patch b/debian/patches/sipwise/db_redis_protect_length_overflow.patch deleted file mode 100644 index 159565a6f..000000000 --- a/debian/patches/sipwise/db_redis_protect_length_overflow.patch +++ /dev/null @@ -1,140 +0,0 @@ -From: Sipwise Development Team -Date: Tue, 13 Jan 2026 09:50:54 +0100 -Subject: db_redis_protect_length_overflow - ---- - src/modules/db_redis/db_redis_mod.c | 2 ++ - src/modules/db_redis/redis_dbase.c | 7 +++---- - src/modules/db_redis/redis_table.c | 33 ++++++++++++++++++++++++++++----- - src/modules/db_redis/redis_table.h | 4 ++-- - 4 files changed, 35 insertions(+), 11 deletions(-) - -diff --git a/src/modules/db_redis/db_redis_mod.c b/src/modules/db_redis/db_redis_mod.c -index 11c7b8c..fafafbb 100644 ---- a/src/modules/db_redis/db_redis_mod.c -+++ b/src/modules/db_redis/db_redis_mod.c -@@ -42,6 +42,7 @@ MODULE_VERSION - str redis_keys = str_init(""); - str redis_schema_path = str_init(SHARE_DIR "db_redis/kamailio"); - int db_redis_verbosity = 1; -+unsigned int db_redis_max_key_len = 0; - - static int db_redis_bind_api(db_func_t *dbb); - static int mod_init(void); -@@ -60,6 +61,7 @@ static param_export_t params[] = { - {"keys", PARAM_STRING | PARAM_USE_FUNC, (void *)keys_param}, - {"schema_path", PARAM_STR, &redis_schema_path}, - {"verbosity", PARAM_INT, &db_redis_verbosity}, -+ {"max_key_length", PARAM_INT, &db_redis_max_key_len}, - #ifdef WITH_SSL - {"opt_tls", PARAM_INT, &db_redis_opt_tls}, - {"ca_path", PARAM_STRING, &db_redis_ca_path}, -diff --git a/src/modules/db_redis/redis_dbase.c b/src/modules/db_redis/redis_dbase.c -index b98f401..6725bf5 100644 ---- a/src/modules/db_redis/redis_dbase.c -+++ b/src/modules/db_redis/redis_dbase.c -@@ -876,7 +876,7 @@ static int db_redis_scan_query_keys_pattern(km_redis_con_t *con, - LM_ERR("Failed to add scan command to scan query\n"); - goto err; - } -- if(db_redis_key_add_string(&query_v, index_key->s, index_key->len) -+ if(db_redis_key_add_str(&query_v, index_key) - != 0) { - LM_ERR("Failed to add scan command to scan query\n"); - goto err; -@@ -891,8 +891,7 @@ static int db_redis_scan_query_keys_pattern(km_redis_con_t *con, - LM_ERR("Failed to add match command to scan query\n"); - goto err; - } -- if(db_redis_key_add_string( -- &query_v, match_pattern->s, match_pattern->len) -+ if (db_redis_key_add_str(&query_v, match_pattern) - != 0) { - LM_ERR("Failed to add match pattern to scan query\n"); - goto err; -@@ -907,7 +906,7 @@ static int db_redis_scan_query_keys_pattern(km_redis_con_t *con, - LM_ERR("Failed to print integer for scan query\n"); - goto err; - } -- if(db_redis_key_add_string(&query_v, match_count_str, l) != 0) { -+ if(db_redis_key_add_string(&query_v, match_count_str, (size_t)l) != 0) { - LM_ERR("Failed to add count value to scan query\n"); - goto err; - } -diff --git a/src/modules/db_redis/redis_table.c b/src/modules/db_redis/redis_table.c -index af3700d..2100884 100644 ---- a/src/modules/db_redis/redis_table.c -+++ b/src/modules/db_redis/redis_table.c -@@ -24,14 +24,24 @@ - #include - #include - --#include "db_redis_mod.h" --#include "redis_connection.h" - #include "redis_table.h" - --int db_redis_key_add_string(redis_key_t **list, const char *entry, int len) -+extern unsigned int db_redis_max_key_len; -+ -+int db_redis_key_add_string(redis_key_t **list, const char *entry, size_t len) - { - redis_key_t *k; - -+ if (!entry || !len) { -+ LM_ERR("Empty entry or zero length\n"); -+ return -1; -+ } -+ -+ if (db_redis_max_key_len > 0 && len > db_redis_max_key_len) { -+ LM_ERR("Too big length for key being added: allowed '%u' / given '%zu'\n", -+ db_redis_max_key_len, len); -+ return -1; -+ } - - k = (redis_key_t *)pkg_malloc(sizeof(redis_key_t)); - if(!k) { -@@ -69,13 +79,26 @@ err: - - int db_redis_key_add_str(redis_key_t **list, const str *entry) - { -- return db_redis_key_add_string(list, entry->s, entry->len); -+ if (entry->len < 0) -+ return -1; -+ return db_redis_key_add_string(list, entry->s, (size_t)entry->len); - } - --int db_redis_key_prepend_string(redis_key_t **list, const char *entry, int len) -+int db_redis_key_prepend_string(redis_key_t **list, const char *entry, size_t len) - { - redis_key_t *k; - -+ if (!entry || !len) { -+ LM_ERR("Empty entry or zero length\n"); -+ return -1; -+ } -+ -+ if (db_redis_max_key_len > 0 && len > db_redis_max_key_len) { -+ LM_ERR("Too big length for key being prepended: allowed '%u' / given '%zu'\n", -+ db_redis_max_key_len, len); -+ return -1; -+ } -+ - k = (redis_key_t *)pkg_malloc(sizeof(redis_key_t)); - if(!k) { - LM_ERR("Failed to allocate memory for key list entry\n"); -diff --git a/src/modules/db_redis/redis_table.h b/src/modules/db_redis/redis_table.h -index 6ba4e8c..879b50c 100644 ---- a/src/modules/db_redis/redis_table.h -+++ b/src/modules/db_redis/redis_table.h -@@ -61,9 +61,9 @@ void db_redis_free_tables(km_redis_con_t *con); - int db_redis_parse_schema(km_redis_con_t *con); - int db_redis_parse_keys(km_redis_con_t *con); - --int db_redis_key_add_string(redis_key_t **list, const char *entry, int len); -+int db_redis_key_add_string(redis_key_t **list, const char *entry, size_t len); - int db_redis_key_add_str(redis_key_t **list, const str *entry); --int db_redis_key_prepend_string(redis_key_t **list, const char *entry, int len); -+int db_redis_key_prepend_string(redis_key_t **list, const char *entry, size_t len); - int db_redis_key_list2arr(redis_key_t *list, char ***arr); - redis_key_t *db_redis_key_shift(redis_key_t **list); - void db_redis_key_free(redis_key_t **list); diff --git a/debian/patches/sipwise/db_redis_support_null_key_values.patch b/debian/patches/sipwise/db_redis_support_null_key_values.patch deleted file mode 100644 index f7a420609..000000000 --- a/debian/patches/sipwise/db_redis_support_null_key_values.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- a/src/modules/db_redis/redis_table.c -+++ b/src/modules/db_redis/redis_table.c -@@ -32,11 +32,6 @@ int db_redis_key_add_string(redis_key_t - { - redis_key_t *k; - -- if (!entry || !len) { -- LM_ERR("Empty entry or zero length\n"); -- return -1; -- } -- - if (db_redis_max_key_len > 0 && len > db_redis_max_key_len) { - LM_ERR("Too big length for key being added: allowed '%u' / given '%zu'\n", - db_redis_max_key_len, len); -@@ -56,8 +51,14 @@ int db_redis_key_add_string(redis_key_t - goto err; - } - -- memcpy(k->key.s, entry, len); -- k->key.s[len] = '\0'; -+ /* run memcpy only on non-NULL pointer, because in fact it may happen -+ * it comes here empty and with len = 0, this is then an implicit -+ * conversion of redis key value into the empty "" string. -+ * see `db_redis_val2str()` -+ * This is the allowed behavior, but avoid then running memcpy() on it. */ -+ if (entry && len > 0) -+ memcpy(k->key.s, entry, len); -+ k->key.s[len] = '\0'; /* at least 1 byte is already pre-allocated before */ - k->key.len = len; - - if(!*list) { diff --git a/debian/patches/sipwise/dialog-dlg_get_ttag.patch b/debian/patches/sipwise/dialog-dlg_get_ttag.patch index 045761c6d..a305e7b2a 100644 --- a/debian/patches/sipwise/dialog-dlg_get_ttag.patch +++ b/debian/patches/sipwise/dialog-dlg_get_ttag.patch @@ -9,7 +9,7 @@ Subject: dialog: dlg_get_ttag() 3 files changed, 211 insertions(+) diff --git a/src/modules/dialog/dialog.c b/src/modules/dialog/dialog.c -index 3394ece..4b681b2 100644 +index 778a399..a2f0f8d 100644 --- a/src/modules/dialog/dialog.c +++ b/src/modules/dialog/dialog.c @@ -56,6 +56,7 @@ @@ -20,7 +20,7 @@ index 3394ece..4b681b2 100644 #include "../../core/mod_fix.h" #include "../../core/script_cb.h" #include "../../core/kemi.h" -@@ -200,6 +201,9 @@ static int fixup_dlg_refer(void **param, int param_no); +@@ -202,6 +203,9 @@ static int fixup_dlg_refer(void **param, int param_no); static int fixup_dlg_bridge(void **param, int param_no); static int w_dlg_get(struct sip_msg *, char *, char *, char *); static int w_is_known_dlg(struct sip_msg *); @@ -30,7 +30,7 @@ index 3394ece..4b681b2 100644 static int w_dlg_set_ruri(sip_msg_t *, char *, char *); static int w_dlg_db_load_callid(sip_msg_t *msg, char *ci, char *p2); static int w_dlg_db_load_extra(sip_msg_t *msg, char *p1, char *p2); -@@ -271,6 +275,8 @@ static cmd_export_t cmds[]={ +@@ -277,6 +281,8 @@ static cmd_export_t cmds[]={ 0, ANY_ROUTE }, {"is_known_dlg", (cmd_function)w_is_known_dlg, 0, NULL, 0, ANY_ROUTE }, @@ -39,7 +39,7 @@ index 3394ece..4b681b2 100644 {"dlg_set_timeout", (cmd_function)w_dlg_set_timeout, 1,fixup_igp_null, 0, ANY_ROUTE }, {"dlg_set_timeout", (cmd_function)w_dlg_set_timeout, 3,fixup_igp_all, -@@ -2090,6 +2096,121 @@ static int fixup_dlg_set_var_free(void **param, int param_no) +@@ -2269,6 +2275,121 @@ static int fixup_dlg_set_var_free(void **param, int param_no) return -1; } @@ -161,7 +161,7 @@ index 3394ece..4b681b2 100644 static int ki_dlg_get(sip_msg_t *msg, str *sc, str *sf, str *st) { dlg_cell_t *dlg = NULL; -@@ -2681,6 +2802,11 @@ static sr_kemi_t sr_kemi_dialog_exports[] = { +@@ -2881,6 +3002,11 @@ static sr_kemi_t sr_kemi_dialog_exports[] = { { SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } }, @@ -174,7 +174,7 @@ index 3394ece..4b681b2 100644 SR_KEMIP_XVAL, ki_dlg_get_var, { SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_STR, diff --git a/src/modules/dialog/dlg_hash.c b/src/modules/dialog/dlg_hash.c -index a37adee..a382ad5 100644 +index 492cad9..78aae53 100644 --- a/src/modules/dialog/dlg_hash.c +++ b/src/modules/dialog/dlg_hash.c @@ -910,6 +910,49 @@ static inline struct dlg_cell *internal_get_dlg(unsigned int h_entry, @@ -264,7 +264,7 @@ index a37adee..a382ad5 100644 /*! * \brief Search dialog that corresponds to CallId, From Tag and To Tag diff --git a/src/modules/dialog/dlg_hash.h b/src/modules/dialog/dlg_hash.h -index 20b0371..b847753 100644 +index ac2ccba..a7a70ca 100644 --- a/src/modules/dialog/dlg_hash.h +++ b/src/modules/dialog/dlg_hash.h @@ -399,6 +399,19 @@ dlg_cell_t *dlg_get_by_iuid(dlg_iuid_t *diuid); diff --git a/debian/patches/sipwise/dialog-support-profile_get_size-for-all-profiles.patch b/debian/patches/sipwise/dialog-support-profile_get_size-for-all-profiles.patch index e34a8354e..c6d359f6a 100644 --- a/debian/patches/sipwise/dialog-support-profile_get_size-for-all-profiles.patch +++ b/debian/patches/sipwise/dialog-support-profile_get_size-for-all-profiles.patch @@ -10,10 +10,10 @@ Subject: dialog: support profile_get_size for all profiles 4 files changed, 69 insertions(+) diff --git a/src/modules/dialog/dialog.c b/src/modules/dialog/dialog.c -index 9ccb073..3394ece 100644 +index 42ea5fe..778a399 100644 --- a/src/modules/dialog/dialog.c +++ b/src/modules/dialog/dialog.c -@@ -3151,6 +3151,31 @@ static void internal_rpc_profile_get_size( +@@ -3366,6 +3366,31 @@ static void internal_rpc_profile_get_size( return; } @@ -45,7 +45,7 @@ index 9ccb073..3394ece 100644 /*! * \brief Helper function that outputs the dialogs belonging to a given profile via the RPC interface * \see rpc_profile_print_dlgs -@@ -3235,6 +3260,8 @@ static const char *rpc_dlg_set_state_doc[3] = { +@@ -3450,6 +3475,8 @@ static const char *rpc_dlg_set_state_doc[3] = { 0}; static const char *rpc_profile_get_size_doc[2] = { "Returns the number of dialogs belonging to a profile", 0}; @@ -54,7 +54,7 @@ index 9ccb073..3394ece 100644 static const char *rpc_profile_print_dlgs_doc[2] = { "Lists all the dialogs belonging to a profile", 0}; static const char *rpc_dlg_bridge_doc[2] = { -@@ -3451,6 +3478,11 @@ static void rpc_profile_get_size(rpc_t *rpc, void *c) +@@ -3666,6 +3693,11 @@ static void rpc_profile_get_size(rpc_t *rpc, void *c) } return; } @@ -66,7 +66,7 @@ index 9ccb073..3394ece 100644 static void rpc_profile_print_dlgs(rpc_t *rpc, void *c) { str profile_name = {NULL, 0}; -@@ -3868,6 +3900,8 @@ static rpc_export_t rpc_methods[] = { +@@ -4083,6 +4115,8 @@ static rpc_export_t rpc_methods[] = { {"dlg.end_dlg", rpc_end_dlg_entry_id, rpc_end_dlg_entry_id_doc, 0}, {"dlg.profile_get_size", rpc_profile_get_size, rpc_profile_get_size_doc, 0}, @@ -76,7 +76,7 @@ index 9ccb073..3394ece 100644 RET_ARRAY}, {"dlg.bridge_dlg", rpc_dlg_bridge, rpc_dlg_bridge_doc, 0}, diff --git a/src/modules/dialog/dlg_profile.c b/src/modules/dialog/dlg_profile.c -index 9fc1a97..76aa768 100644 +index 80fac2d..a2ec325 100644 --- a/src/modules/dialog/dlg_profile.c +++ b/src/modules/dialog/dlg_profile.c @@ -129,6 +129,14 @@ int add_profile_definitions(char *profiledef, unsigned int has_value) @@ -111,10 +111,10 @@ index 209c4ea..fd71c30 100644 /*! * \brief Search a dialog profile in the global list diff --git a/src/modules/dialog/doc/dialog_admin.xml b/src/modules/dialog/doc/dialog_admin.xml -index 4ae623a..a417212 100644 +index c70ac2d..09082a4 100644 --- a/src/modules/dialog/doc/dialog_admin.xml +++ b/src/modules/dialog/doc/dialog_admin.xml -@@ -3070,6 +3070,28 @@ dlg_set_state("early"); +@@ -3137,6 +3137,28 @@ dlg_set_state("early"); diff --git a/debian/patches/sipwise/dlg_get_var_error_more_verbose_on_dlg b/debian/patches/sipwise/dlg_get_var_error_more_verbose_on_dlg index e5a29606a..ef8e86bbd 100644 --- a/debian/patches/sipwise/dlg_get_var_error_more_verbose_on_dlg +++ b/debian/patches/sipwise/dlg_get_var_error_more_verbose_on_dlg @@ -7,10 +7,10 @@ Subject: dlg_get_var_error_more_verbose_on_dlg 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/modules/dialog/dialog.c b/src/modules/dialog/dialog.c -index 4b681b2..3a9bd3c 100644 +index a2f0f8d..a35dd11 100644 --- a/src/modules/dialog/dialog.c +++ b/src/modules/dialog/dialog.c -@@ -1979,7 +1979,8 @@ static int w_dlg_get_var( +@@ -2158,7 +2158,8 @@ static int w_dlg_get_var( pv_get_null(msg, NULL, &dst_val); } if(pv_set_spec_value(msg, dst_pv, 0, &dst_val) != 0) { @@ -20,7 +20,7 @@ index 4b681b2..3a9bd3c 100644 if(val) goto error; else -@@ -1990,7 +1991,8 @@ static int w_dlg_get_var( +@@ -2169,7 +2170,8 @@ static int w_dlg_get_var( error: pv_get_null(msg, NULL, &dst_val); if(pv_set_spec_value(msg, dst_pv, 0, &dst_val) != 0) { diff --git a/debian/patches/sipwise/do-not-install-default-config.patch b/debian/patches/sipwise/do-not-install-default-config.patch index 443acf9d5..efae1fbee 100644 --- a/debian/patches/sipwise/do-not-install-default-config.patch +++ b/debian/patches/sipwise/do-not-install-default-config.patch @@ -8,10 +8,10 @@ Subject: do-not-install-default-config 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Makefile b/src/Makefile -index 2362e7c..3b916e9 100644 +index b3cc086..c57b688 100644 --- a/src/Makefile +++ b/src/Makefile -@@ -651,7 +651,7 @@ sunpkg: +@@ -648,7 +648,7 @@ sunpkg: .PHONY: install install: mk_params="compile_for_install=yes" @@ -21,7 +21,7 @@ index 2362e7c..3b916e9 100644 .PHONY: dbinstall diff --git a/utils/kamctl/Makefile b/utils/kamctl/Makefile -index 9736cf2..4249d08 100644 +index 2b9f75c..f7c41e2 100644 --- a/utils/kamctl/Makefile +++ b/utils/kamctl/Makefile @@ -13,7 +13,7 @@ all: diff --git a/debian/patches/sipwise/kamctl-TMPDIR-config.patch b/debian/patches/sipwise/kamctl-TMPDIR-config.patch index bd2db212a..09222bf8f 100644 --- a/debian/patches/sipwise/kamctl-TMPDIR-config.patch +++ b/debian/patches/sipwise/kamctl-TMPDIR-config.patch @@ -5,15 +5,14 @@ Subject: kamctl: TMPDIR config * allow choose where to store temporal files * use g+w for temporal fifo file --- - utils/kamctl/kamctl | 8 ++++++-- - utils/kamctl/kamctl.rpcfifo | 14 ++++++++++---- - utils/kamctl/kamdbctl | 2 +- - utils/kamctl/kamdbctl.db_berkeley | 10 +++++----- - utils/kamctl/kamdbctl.oracle | 2 +- - 5 files changed, 23 insertions(+), 13 deletions(-) + utils/kamctl/kamctl | 8 +- + utils/kamctl/kamctl.rpcfifo | 14 +- + utils/kamctl/kamdbctl | 2 +- + utils/kamctl/kamdbctl.oracle | 2 +- + 5 files changed, 637 insertions(+), 8 deletions(-) diff --git a/utils/kamctl/kamctl b/utils/kamctl/kamctl -index 63a221c..8d5d7c8 100755 +index e0a339c..92c5343 100755 --- a/utils/kamctl/kamctl +++ b/utils/kamctl/kamctl @@ -80,6 +80,10 @@ if [ -z "$STARTUP_CONFIG_FILE" ]; then @@ -27,7 +26,7 @@ index 63a221c..8d5d7c8 100755 ##### ------------------------------------------------ ##### ### load base functions # -@@ -2977,7 +2981,7 @@ kamailio_trap() { +@@ -2971,7 +2975,7 @@ kamailio_trap() { exit fi DATE=`/bin/date +%Y%m%d_%H%M%S` @@ -36,7 +35,7 @@ index 63a221c..8d5d7c8 100755 minfo "Trap file: $LOG_FILE" ctl_cmd_run core.psx > $LOG_FILE echo -n "Trapping Kamailio with gdb: " -@@ -3004,7 +3008,7 @@ kamailio_pstrap() { +@@ -2998,7 +3002,7 @@ kamailio_pstrap() { exit fi DATE=`/bin/date +%Y%m%d_%H%M%S` @@ -99,10 +98,10 @@ index f7408b5..478864a 100644 trap "rm $path; clear; echo monitor ^C-ed; exit 1" 2 attempt=0 diff --git a/utils/kamctl/kamdbctl b/utils/kamctl/kamdbctl -index a0ececd..4648364 100755 +index 9c490f8..c7d6fc8 100755 --- a/utils/kamctl/kamdbctl +++ b/utils/kamctl/kamdbctl -@@ -303,7 +303,7 @@ case $1 in +@@ -294,7 +294,7 @@ case $1 in cp $DB_PATH $1 exit $? fi @@ -111,34 +110,6 @@ index a0ececd..4648364 100755 kamailio_dump $DBNAME $tmp_file ret=$? if [ "$ret" -ne 0 ]; then -diff --git a/utils/kamctl/kamdbctl.db_berkeley b/utils/kamctl/kamdbctl.db_berkeley -index 666122a..457e40c 100644 ---- a/utils/kamctl/kamdbctl.db_berkeley -+++ b/utils/kamctl/kamdbctl.db_berkeley -@@ -436,10 +436,10 @@ kamailio_append() # parms: [DB_PATH] - - ##### - # newappend process is: --# 1. create a new temp DBENV in /tmp/sc- --# 2. appends contents of newdata to /tmp/sc-/db --# 3. move /tmp/sc-/db over to DB_PATH/db.new --# 4. delete temp DBENV dir /tmp/sc- -+# 1. create a new temp DBENV in ${TMPDIR}/sc- -+# 2. appends contents of newdata to ${TMPDIR}/sc-/db -+# 3. move ${TMPDIR}/sc-/db over to DB_PATH/db.new -+# 4. delete temp DBENV dir ${TMPDIR}/sc- - # - kamailio_newappend() # parms: [DB_PATH] - { -@@ -453,7 +453,7 @@ kamailio_newappend() # parms: [DB_PATH] - if [ -f $DBNEW ] ; then - rm $DBNEW - fi -- TMPENV=/tmp/sc-$$ -+ TMPENV=${TMPDIR}/sc-$$ - kamailio_create $TMPENV - cd $OLDPWD - $LOAD_CMD -T -t hash -f $2 -h $TMPENV $1 diff --git a/utils/kamctl/kamdbctl.oracle b/utils/kamctl/kamdbctl.oracle index e6de52f..f1b95c5 100644 --- a/utils/kamctl/kamdbctl.oracle diff --git a/debian/patches/sipwise/permissions-don-t-allow-reloads-in-the-middle-of-ong.patch b/debian/patches/sipwise/permissions-don-t-allow-reloads-in-the-middle-of-ong.patch deleted file mode 100644 index 2b1427e4d..000000000 --- a/debian/patches/sipwise/permissions-don-t-allow-reloads-in-the-middle-of-ong.patch +++ /dev/null @@ -1,52 +0,0 @@ -From: Victor Seva -Date: Tue, 27 May 2025 10:52:57 +0200 -Subject: permissions: don't allow reloads in the middle of ongoind reload - ---- - src/modules/permissions/rpc.c | 13 ++++++++++--- - 1 file changed, 10 insertions(+), 3 deletions(-) - -diff --git a/src/modules/permissions/rpc.c b/src/modules/permissions/rpc.c -index 6519c63..ae78aa4 100644 ---- a/src/modules/permissions/rpc.c -+++ b/src/modules/permissions/rpc.c -@@ -45,7 +45,8 @@ int rpc_check_reload(rpc_t *rpc, void *ctx) - rpc->fault(ctx, 500, "ongoing reload"); - return -1; - } -- *perm_rpc_reload_time = time(NULL); -+ // we are reloading -+ *perm_rpc_reload_time = time(NULL) + 86400; - return 0; - } - -@@ -61,10 +62,13 @@ void rpc_trusted_reload(rpc_t *rpc, void *c) - - if(reload_trusted_table_cmd() != 1) { - rpc->fault(c, 500, "Reload failed."); -- return; -+ goto done; - } - - rpc->rpl_printf(c, "Reload OK"); -+done: -+ // reloading is done -+ *perm_rpc_reload_time = time(NULL); - return; - } - -@@ -101,10 +105,13 @@ void rpc_address_reload(rpc_t *rpc, void *c) - - if(reload_address_table_cmd() != 1) { - rpc->fault(c, 500, "Reload failed."); -- return; -+ goto done; - } - - rpc->rpl_printf(c, "Reload OK"); -+done: -+ // reloading is done -+ *perm_rpc_reload_time = time(NULL); - return; - } - diff --git a/debian/patches/sipwise/presence_offline_cleanup.patch b/debian/patches/sipwise/presence_offline_cleanup.patch index 2aaabc793..39c00d256 100644 --- a/debian/patches/sipwise/presence_offline_cleanup.patch +++ b/debian/patches/sipwise/presence_offline_cleanup.patch @@ -7,10 +7,10 @@ Subject: presence: fix presentity_offline_cleanup 1 file changed, 54 insertions(+), 36 deletions(-) diff --git a/src/modules/presence/presentity.c b/src/modules/presence/presentity.c -index ac3f734..644c9b7 100644 +index ae1b6c6..003b9e1 100644 --- a/src/modules/presence/presentity.c +++ b/src/modules/presence/presentity.c -@@ -2273,6 +2273,8 @@ int mark_presentity_for_delete(presentity_t *pres, str *ruid) +@@ -2278,6 +2278,8 @@ int mark_presentity_for_delete(presentity_t *pres, str *ruid) str *cur_body = NULL, *new_body = NULL; db_query_f query_fn = pa_dbf.query_lock ? pa_dbf.query_lock : pa_dbf.query; @@ -19,7 +19,7 @@ index ac3f734..644c9b7 100644 if(pres->event->agg_nbody == NULL) { /* Nothing clever to do here... just delete */ if(delete_presentity(pres, NULL) < 0) { -@@ -2359,6 +2361,8 @@ int mark_presentity_for_delete(presentity_t *pres, str *ruid) +@@ -2364,6 +2366,8 @@ int mark_presentity_for_delete(presentity_t *pres, str *ruid) goto done; } @@ -28,7 +28,7 @@ index ac3f734..644c9b7 100644 row = RES_ROWS(result); value = ROW_VALUES(row); -@@ -2378,7 +2382,25 @@ int mark_presentity_for_delete(presentity_t *pres, str *ruid) +@@ -2383,7 +2387,25 @@ int mark_presentity_for_delete(presentity_t *pres, str *ruid) update_cols[n_update_cols] = &str_etag_col; update_vals[n_update_cols].type = DB1_STR; update_vals[n_update_cols].nul = 0; @@ -55,7 +55,7 @@ index ac3f734..644c9b7 100644 n_update_cols++; update_cols[n_update_cols] = &str_expires_col; -@@ -2398,9 +2420,13 @@ int mark_presentity_for_delete(presentity_t *pres, str *ruid) +@@ -2403,9 +2425,13 @@ int mark_presentity_for_delete(presentity_t *pres, str *ruid) n_query_cols, n_update_cols) < 0) { LM_ERR("unsuccessful sql update operation"); @@ -69,7 +69,7 @@ index ac3f734..644c9b7 100644 if(pa_dbf.affected_rows) ret = pa_dbf.affected_rows(pa_db); else -@@ -2510,12 +2536,13 @@ int delete_presentity(presentity_t *pres, str *ruid) +@@ -2515,12 +2541,13 @@ int delete_presentity(presentity_t *pres, str *ruid) } } @@ -85,8 +85,8 @@ index ac3f734..644c9b7 100644 + static char query[QUERY_LEN]; if(pa_db == NULL) { - LM_ERR("no database connection setup\n"); -@@ -2526,45 +2553,36 @@ int delete_offline_presentities(str *pres_uri, pres_ev_t *event) + LM_ERR("no database connection set up\n"); +@@ -2531,45 +2558,36 @@ int delete_offline_presentities(str *pres_uri, pres_ev_t *event) LM_ERR("failed to parse presentity uri\n"); goto error; } diff --git a/debian/patches/sipwise/presence_vqr.patch b/debian/patches/sipwise/presence_vqr.patch index bfaf33d13..551d0d215 100644 --- a/debian/patches/sipwise/presence_vqr.patch +++ b/debian/patches/sipwise/presence_vqr.patch @@ -25,10 +25,10 @@ Subject: presence_vqr create mode 100644 src/modules/presence_vqr/presence_vqr.h diff --git a/src/Makefile.groups b/src/Makefile.groups -index 6242bb7..ed8b1c6 100644 +index 5db7de0..09ccf93 100644 --- a/src/Makefile.groups +++ b/src/Makefile.groups -@@ -115,7 +115,7 @@ mod_list_lcrrate=lcr_rate +@@ -113,7 +113,7 @@ mod_list_lcrrate=lcr_rate # - modules related to SIMPLE presence extensions mod_list_presence=presence presence_conference presence_dialoginfo \ presence_mwi presence_profile presence_reginfo \ diff --git a/debian/patches/sipwise/pv_trans_eval_uri.patch b/debian/patches/sipwise/pv_trans_eval_uri.patch index 0ca926b94..fab276591 100644 --- a/debian/patches/sipwise/pv_trans_eval_uri.patch +++ b/debian/patches/sipwise/pv_trans_eval_uri.patch @@ -7,10 +7,10 @@ Subject: pv_trans_eval_uri 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/pv/pv_trans.c b/src/modules/pv/pv_trans.c -index f3432b1..c0bf413 100644 +index 9e29155..dce16c3 100644 --- a/src/modules/pv/pv_trans.c +++ b/src/modules/pv/pv_trans.c -@@ -1635,7 +1635,8 @@ int tr_eval_uri( +@@ -1811,7 +1811,8 @@ int tr_eval_uri( } /* parse uri -- params only when requested */ if(parse_uri(_tr_uri.s, _tr_uri.len - dlen, &_tr_parsed_uri) != 0) { diff --git a/debian/patches/sipwise/rtpengine-directional-flag.patch b/debian/patches/sipwise/rtpengine-directional-flag.patch deleted file mode 100644 index 7b7f974e9..000000000 --- a/debian/patches/sipwise/rtpengine-directional-flag.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/modules/rtpengine/rtpengine.c -+++ b/src/modules/rtpengine/rtpengine.c -@@ -2992,6 +2992,8 @@ - if(ng_flags->to && ng_flags->to_tag.s && ng_flags->to_tag.len) - bencode_dictionary_add_str( - ng_flags->dict, "to-tag", &ng_flags->to_tag); -+ if(ng_flags->flags) -+ bencode_list_add_string(ng_flags->flags, "directional"); - } - } else if(op == OP_SUBSCRIBE_REQUEST || op == OP_UNSUBSCRIBE) { - bencode_dictionary_add_str(