Module: kamailio
Branch: master
Commit: c75e4a087f73a0976e343789593a888524aa752b
URL:
https://github.com/kamailio/kamailio/commit/c75e4a087f73a0976e343789593a888…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-05-09T08:35:15+02:00
siptrace: exported sip_trace_msg() to kemi
---
Modified: src/modules/siptrace/siptrace.c
---
Diff:
https://github.com/kamailio/kamailio/commit/c75e4a087f73a0976e343789593a888…
Patch:
https://github.com/kamailio/kamailio/commit/c75e4a087f73a0976e343789593a888…
---
diff --git a/src/modules/siptrace/siptrace.c b/src/modules/siptrace/siptrace.c
index 77b7978f85f..0a2d9b327e1 100644
--- a/src/modules/siptrace/siptrace.c
+++ b/src/modules/siptrace/siptrace.c
@@ -1225,6 +1225,18 @@ static int w_sip_trace_msg(sip_msg_t *msg, char *vmsg, char *saddr,
char *taddr,
return 1;
}
+/**
+ *
+ */
+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,
+ (corrid && corrid->len>0)?corrid:NULL);
+
+ return 1;
+}
+
/**
* link call-id, method, from-tag and to-tag
*/
@@ -2600,6 +2612,11 @@ static sr_kemi_t sr_kemi_siptrace_exports[] = {
{ SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE,
SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
},
+ { str_init("siptrace"), str_init("sip_trace_msg"),
+ SR_KEMIP_INT, ki_sip_trace_msg,
+ { SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_STR,
+ SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_NONE }
+ },
{ {0, 0}, {0, 0}, 0, NULL, { 0, 0, 0, 0, 0, 0 } }
};