From 3c07afd2698c72b77b075cb848757bdef3883299 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Wed, 4 Feb 2026 08:27:46 -0400 Subject: [PATCH] MT#55283 ignore erroneous use of to-tag The Kamailio control module unconditionally adds the current to-tag to the control message if rtpp-flags parsing is active. This is generally not desirable in the case of an initial subscribe-request, as we want a generated to-tag when the existing to-tag belongs to another dialogue. Special-case this to ignore the included to-tag if none has been given explicitly. Change-Id: I1dc28bfdfd086766e0b6a117c74edd0ebb75d526 --- daemon/call_interfaces.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/daemon/call_interfaces.c b/daemon/call_interfaces.c index 3c8eae0a2..814bec103 100644 --- a/daemon/call_interfaces.c +++ b/daemon/call_interfaces.c @@ -4201,7 +4201,8 @@ const char *call_subscribe_request_ng(ng_command_ctx_t *ctx) { flags.label = flags.set_label; /* get destination monologue */ - if (!flags.to_tag.len) { + // ignore the to-tag if rtpp_flags parsing is active and to-tag wasn't given explicitly + if (!flags.to_tag.len || (flags.rtpp_flags && !flags.to_tag_flag)) { /* generate one */ flags.to_tag = STR_CONST(rand_buf); rand_hex_str(flags.to_tag.s, flags.to_tag.len / 2);