From c75e4a087f73a0976e343789593a888524aa752b Mon Sep 17 00:00:00 2001 From: Daniel-Constantin Mierla Date: Tue, 9 May 2023 08:35:15 +0200 Subject: [PATCH] siptrace: exported sip_trace_msg() to kemi --- src/modules/siptrace/siptrace.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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 } } };