Module: kamailio Branch: master Commit: a6b924be7fd7d4ce6a92ad5a0247077b09a29474 URL: https://github.com/kamailio/kamailio/commit/a6b924be7fd7d4ce6a92ad5a0247077b...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2024-10-23T08:22:14+02:00
topos: extended error log message
- ensure headers are parsed for storage record
---
Modified: src/modules/topos/tps_storage.c
---
Diff: https://github.com/kamailio/kamailio/commit/a6b924be7fd7d4ce6a92ad5a0247077b... Patch: https://github.com/kamailio/kamailio/commit/a6b924be7fd7d4ce6a92ad5a0247077b...
---
diff --git a/src/modules/topos/tps_storage.c b/src/modules/topos/tps_storage.c index 1fe7319b926..e87232285f6 100644 --- a/src/modules/topos/tps_storage.c +++ b/src/modules/topos/tps_storage.c @@ -594,6 +594,10 @@ int tps_storage_record(sip_msg_t *msg, tps_data_t *td, int dialog, int dir) str suid; str *sx = NULL;
+ if(parse_headers(msg, HDR_EOH_F, 0) == -1) { + return -1; + } + 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 */ @@ -649,7 +653,8 @@ int tps_storage_record(sip_msg_t *msg, tps_data_t *td, int dialog, int dir) return 0;
error: - LM_ERR("failed to store\n"); + LM_ERR("failed to store (dlg: %d dir: %d metid: %d)\n", dialog, dir, + get_cseq(msg)->method_id); return ret; }