- GH #3149
(cherry picked from commit 414c7dd608584df18f871b42e05f401e21ba775d)
... | ... |
@@ -46,6 +46,8 @@ |
46 | 46 |
#include "tps_msg.h" |
47 | 47 |
#include "tps_storage.h" |
48 | 48 |
|
49 |
+#define TPS_METHODS_NOCONTACT (METHOD_CANCEL|METHOD_BYE|METHOD_PRACK) |
|
50 |
+ |
|
49 | 51 |
extern int _tps_param_mask_callid; |
50 | 52 |
extern int _tps_contact_mode; |
51 | 53 |
extern str _tps_cparam_name; |
... | ... |
@@ -582,6 +584,10 @@ int tps_reinsert_contact(sip_msg_t *msg, tps_data_t *ptsd, str *hbody) |
582 | 584 |
{ |
583 | 585 |
str hname = str_init("Contact"); |
584 | 586 |
|
587 |
+ if (get_cseq(msg)->method_id & TPS_METHODS_NOCONTACT) { |
|
588 |
+ return 0; |
|
589 |
+ } |
|
590 |
+ |
|
585 | 591 |
if(tps_add_headers(msg, &hname, hbody, 0)<0) { |
586 | 592 |
return -1; |
587 | 593 |
} |