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
pull/2063/head
Richard Fuchs 3 months ago
parent d6cf41dfc8
commit 3c07afd269

@ -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);

Loading…
Cancel
Save