@Fr-Soltanzadeh commented on this pull request.


> +     if(sess->branch != RTPENGINE_ALL_BRANCHES)
+               bencode_dictionary_add_str(dict, "via-branch", viabranch);
+       if(to_tag && to_tag->len)
+               bencode_dictionary_add_str(dict, "to-tag", to_tag);
+       if(copy_flags & RTP_COPY_MODE_SIPREC) {
+               list = bencode_list(&bencbuf);
+               bencode_dictionary_add(dict, "flags", list);
+               bencode_list_add_string(list, "all");
+               bencode_list_add_string(list, "siprec");
+       } else if((copy_flags & RTP_COPY_LEG_BOTH) == RTP_COPY_LEG_BOTH) {
+               list = bencode_list(&bencbuf);
+               bencode_list_add_string(list, "all");
+       } else if(copy_flags & RTP_COPY_LEG_CALLER && sess->from_tag) {
+               bencode_dictionary_add_str(dict, "from-tag", sess->from_tag);
+       } else if(sess->to_tag) {
+               bencode_dictionary_add_str(dict, "from-tag", sess->to_tag);

If you mean that it should be like:
```
} else if(sess->to_tag) {
                bencode_dictionary_add_str(dict, "to-tag", sess->to_tag);
```
I don't think so. In the case that any of  RTP_COPY_LEG_BOTH, 
RTP_COPY_MODE_SIPREC and RTP_COPY_LEG_CALLER flags are not in copy_flags, it 
means that it is copying rtp stream of the callee. The 'from-tag' for  
RTPEngine indicates which participant stream must be copied and here we want to 
copy callee's stream which is in sess->to_tag variable.
'to-tag' for  RTPEngine means where to send copied rtp streams. 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4071#discussion_r1887958646
You are receiving this because you are subscribed to this thread.

Message ID: <kamailio/kamailio/pull/4071/review/2507944...@github.com>
_______________________________________________
Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to