Module: kamailio
Branch: master
Commit: fe4c47bb47e466af2eddc0a8987c13cb976e5a3b
URL:
https://github.com/kamailio/kamailio/commit/fe4c47bb47e466af2eddc0a8987c13c…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2023-05-17T09:22:10+02:00
siptrace: fix destination target parameter on ki_sip_trace_msg
fixes #3457
---
Modified: src/modules/siptrace/siptrace.c
---
Diff:
https://github.com/kamailio/kamailio/commit/fe4c47bb47e466af2eddc0a8987c13c…
Patch:
https://github.com/kamailio/kamailio/commit/fe4c47bb47e466af2eddc0a8987c13c…
---
diff --git a/src/modules/siptrace/siptrace.c b/src/modules/siptrace/siptrace.c
index 0a2d9b327e1..538e3b6a70b 100644
--- a/src/modules/siptrace/siptrace.c
+++ b/src/modules/siptrace/siptrace.c
@@ -1231,7 +1231,14 @@ static int w_sip_trace_msg(sip_msg_t *msg, char *vmsg, char *saddr,
char *taddr,
static int ki_sip_trace_msg(sip_msg_t *msg, str *vmsg, str *saddr, str *taddr,
str *duri, str *corrid)
{
- trace_send_hep_duplicate(vmsg, saddr, taddr, (duri &&
duri->len>0)?&duri:NULL,
+ dest_info_t dest;
+ if(duri && duri->len>0) {
+ if (siptrace_parse_uri(duri, &dest) < 0) {
+ LM_ERR("failed to parse mirroring destination uri\n");
+ return -1;
+ }
+ }
+ trace_send_hep_duplicate(vmsg, saddr, taddr, (duri &&
duri->len>0)?&dest:NULL,
(corrid && corrid->len>0)?corrid:NULL);
return 1;