Browse code

rtpengine: allow to-tag usage for all commands

Richard Fuchs authored on 28/09/2022 13:33:56
Showing 1 changed files
... ...
@@ -2689,8 +2689,11 @@ static bencode_item_t *rtpp_function_call(bencode_buffer_t *bencbuf, struct sip_
2689 2689
 			|| op == OP_UNBLOCK_MEDIA || op == OP_START_FORWARDING || op == OP_STOP_FORWARDING
2690 2690
 			|| op == OP_SILENCE_MEDIA || op == OP_UNSILENCE_MEDIA)
2691 2691
 	{
2692
-		if (ng_flags.directional)
2692
+		if (ng_flags.directional) {
2693 2693
 			bencode_dictionary_add_str(ng_flags.dict, "from-tag", &ng_flags.from_tag);
2694
+			if (ng_flags.to && ng_flags.to_tag.s && ng_flags.to_tag.len)
2695
+				bencode_dictionary_add_str(ng_flags.dict, "to-tag", &ng_flags.to_tag);
2696
+		}
2694 2697
 	}
2695 2698
 	else if ((msg->first_line.type == SIP_REQUEST && op != OP_ANSWER)
2696 2699
 		|| (msg->first_line.type == SIP_REPLY && op == OP_DELETE)