Module: kamailio
Branch: master
Commit: 40e09d8625184f19ff5666a2848cbb8c6212db26
URL:
https://github.com/kamailio/kamailio/commit/40e09d8625184f19ff5666a2848cbb8…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2019-09-30T20:17:10+02:00
siptrace: trace transaction when message flag is set
---
Modified: src/modules/siptrace/siptrace.c
---
Diff:
https://github.com/kamailio/kamailio/commit/40e09d8625184f19ff5666a2848cbb8…
Patch:
https://github.com/kamailio/kamailio/commit/40e09d8625184f19ff5666a2848cbb8…
---
diff --git a/src/modules/siptrace/siptrace.c b/src/modules/siptrace/siptrace.c
index 24089020fc..544fb5392a 100644
--- a/src/modules/siptrace/siptrace.c
+++ b/src/modules/siptrace/siptrace.c
@@ -1026,8 +1026,13 @@ static int w_sip_trace3(sip_msg_t *msg, char *dest, char
*correlation_id, char *
if (trace_type_p != NULL) {
trace_type = *(enum siptrace_type_t *)(trace_type_p);
} else {
- /* fallback to default */
- trace_type = SIPTRACE_MESSAGE;
+ /* fallback to default - transaction tracking when flag is set,
+ * otherwise only the current message*/
+ if(msg->flags & trace_flag) {
+ trace_type = SIPTRACE_TRANSACTION;
+ } else {
+ trace_type = SIPTRACE_MESSAGE;
+ }
}
return sip_trace_helper(msg, (dest)?&dest_info:NULL,