[sr-dev] git:master:57b1d537: siptrace: add X-Siptrace headers when configured core callback mode and SIP URI traffic mirroring

Daniel-Constantin Mierla miconda at gmail.com
Thu Mar 10 10:49:04 CET 2022


Module: kamailio
Branch: master
Commit: 57b1d5375927b987b162fcf0e2c99a39b717bd65
URL: https://github.com/kamailio/kamailio/commit/57b1d5375927b987b162fcf0e2c99a39b717bd65

Author: Dennis Yurasov <dennis-y at yandex-team.ru>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2022-03-10T10:48:59+01:00

siptrace: add X-Siptrace headers when configured core callback mode and SIP URI traffic mirroring

- Added X-Siptrace headers in core callback mode for SIP URI traffic duplication,
  headers also available in event route for filtering purporses.

---

Modified: src/modules/siptrace/siptrace.c

---

Diff:  https://github.com/kamailio/kamailio/commit/57b1d5375927b987b162fcf0e2c99a39b717bd65.diff
Patch: https://github.com/kamailio/kamailio/commit/57b1d5375927b987b162fcf0e2c99a39b717bd65.patch

---

diff --git a/src/modules/siptrace/siptrace.c b/src/modules/siptrace/siptrace.c
index d7416506dd..2c2fc48404 100644
--- a/src/modules/siptrace/siptrace.c
+++ b/src/modules/siptrace/siptrace.c
@@ -2070,6 +2070,11 @@ static int siptrace_exec_evcb_msg(siptrace_data_t *sto)
 		return -1;
 	}
 
+	if(_siptrace_mode & SIPTRACE_MODE_URI) {
+		if(sip_trace_xheaders_write(sto) != 0)
+			return -1;
+	}
+
 	memset(&msg, 0, sizeof(sip_msg_t));
 	msg.buf = sto->body.s;
 	msg.len = sto->body.len;




More information about the sr-dev mailing list