diff --git a/debian/patches/series b/debian/patches/series index d0373465d..cb547ab0f 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -40,6 +40,7 @@ upstream/dialog-reworked-kemi-export-for-dlg_get_var.patch upstream/dialog-fix-ki_dlg_get_var-introduced-previously.patch upstream/dialog-dlg_get_var-assure-return-null-on-error.patch upstream/dialog-w_dlg_get_var-fix-incompatible-pointer.patch +upstream/topos-skip-adding-contact-header-for-BYE-CANCEL-PRAC.patch ### relevant for upstream sipwise/pua_dialoginfo-refresh_pubruri_avps_flag.patch sipwise/pua_dialoginfo-use-lock-when-use_puburi_avps-is-set.patch diff --git a/debian/patches/sipwise/topos-don-t-insert-contact-header-for-4xx-replies.patch b/debian/patches/sipwise/topos-don-t-insert-contact-header-for-4xx-replies.patch index 6ce8a19a2..0848936e4 100644 --- a/debian/patches/sipwise/topos-don-t-insert-contact-header-for-4xx-replies.patch +++ b/debian/patches/sipwise/topos-don-t-insert-contact-header-for-4xx-replies.patch @@ -8,10 +8,10 @@ unless original msg has contact 1 file changed, 5 insertions(+) diff --git a/src/modules/topos/tps_msg.c b/src/modules/topos/tps_msg.c -index 83d5f5f..6e9393e 100644 +index c01dde7..a3f123b 100644 --- a/src/modules/topos/tps_msg.c +++ b/src/modules/topos/tps_msg.c -@@ -1161,6 +1161,11 @@ int tps_response_sent(sip_msg_t *msg) +@@ -1167,6 +1167,11 @@ int tps_response_sent(sip_msg_t *msg) && msg->contact==NULL) { contact_keep = 1; } diff --git a/debian/patches/upstream/topos-skip-adding-contact-header-for-BYE-CANCEL-PRAC.patch b/debian/patches/upstream/topos-skip-adding-contact-header-for-BYE-CANCEL-PRAC.patch new file mode 100644 index 000000000..e5d080bb7 --- /dev/null +++ b/debian/patches/upstream/topos-skip-adding-contact-header-for-BYE-CANCEL-PRAC.patch @@ -0,0 +1,33 @@ +From: Daniel-Constantin Mierla +Date: Tue, 21 Jun 2022 08:41:53 +0200 +Subject: topos: skip adding contact header for BYE, CANCEL, PRACK + +- GH #3149 +--- + src/modules/topos/tps_msg.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/modules/topos/tps_msg.c b/src/modules/topos/tps_msg.c +index 83d5f5f..c01dde7 100644 +--- a/src/modules/topos/tps_msg.c ++++ b/src/modules/topos/tps_msg.c +@@ -46,6 +46,8 @@ + #include "tps_msg.h" + #include "tps_storage.h" + ++#define TPS_METHODS_NOCONTACT (METHOD_CANCEL|METHOD_BYE|METHOD_PRACK) ++ + extern int _tps_param_mask_callid; + extern int _tps_contact_mode; + extern str _tps_cparam_name; +@@ -582,6 +584,10 @@ int tps_reinsert_contact(sip_msg_t *msg, tps_data_t *ptsd, str *hbody) + { + str hname = str_init("Contact"); + ++ if (get_cseq(msg)->method_id & TPS_METHODS_NOCONTACT) { ++ return 0; ++ } ++ + if(tps_add_headers(msg, &hname, hbody, 0)<0) { + return -1; + }