Module: kamailio
Branch: master
Commit: 824e81319b60054feb81c37b3a8be80523f8c95d
URL:
https://github.com/kamailio/kamailio/commit/824e81319b60054feb81c37b3a8be80…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-10-23T08:22:14+02:00
topos: catch ACK without contact that needs no storage updates
---
Modified: src/modules/topos/tps_storage.c
---
Diff:
https://github.com/kamailio/kamailio/commit/824e81319b60054feb81c37b3a8be80…
Patch:
https://github.com/kamailio/kamailio/commit/824e81319b60054feb81c37b3a8be80…
---
diff --git a/src/modules/topos/tps_storage.c b/src/modules/topos/tps_storage.c
index 946092c04f9..1fe7319b926 100644
--- a/src/modules/topos/tps_storage.c
+++ b/src/modules/topos/tps_storage.c
@@ -594,6 +594,12 @@ int tps_storage_record(sip_msg_t *msg, tps_data_t *td, int dialog,
int dir)
str suid;
str *sx = NULL;
+ if(get_cseq(msg)->method_id == METHOD_ACK) {
+ if(parse_headers(msg, HDR_CONTACT_F, 0) < 0 || msg->contact == NULL) {
+ /* ACK with no Contact - nothing to store */
+ return 0;
+ }
+ }
if(_tps_context_value.len > 0) {
sx = &_tps_context_value;
} else if(_tps_context_param.len > 0) {