New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SDP filtering issues with sdpops module #2755
Comments
The code needs to be updated to be able to catch The solution right now is to use If you do not want video media stream, there is a function to remove it all together: |
Actually instead of |
thanks a lot @miconda and yes... for now I will try to write a workaround using remove_line_by_prefix inside my kamailio config files, thx for your suggestions. |
- line oriented matching of codec addributes - support to remove a=rtcp-fb per codec, GH #2755
It should be fixed by the commit referenced above. I did some basic tests, but if still fails, reopen. |
- line oriented matching of codec addributes - support to remove a=rtcp-fb per codec, GH kamailio#2755
In order to filter some specific codecs from the SDP I am using this functions from the sdpops module
and since they use the same code base for filtering, the problem I am going to describe affects all of them.
Let's say I have this data inside my SDP
The sdp_keep_codecs_by_id (and I assume all other analog filter functions) correctly detects 2 SDP sessions, one for the audio and one for the video.
Now, let's say we want to allow only PCMA,PCMU,GSM,telephone-event ( id 8,0,3,100,99,101 ), this means that 96 and 97 codecs have to be stripped.
For this reason the functions sdp_remove_str_codec_id_attrs() and sdp_remove_str_codec_id() are executed passing the correct id we want to filter.
The sdp_remove_str_codec_id_attrs() will then remove the corresponding lines from the SDP but ONLY IF relative to rtpmap and fmtp.
This means that a=rtcp* lines will not be filtered even if they are relative to a filtered codec and this is not what the user expects.
Interestingly the sdp_remove_str_codec_id_attrs() function deletes the lines only if there is a match with the sdp_payload_attr linked list.
kamailio/src/core/parser/sdp/sdp.h
Line 90 in 758c85a
This linked list is built at core level and only exposes rtp_payload and fmtp_string as described here.
kamailio/src/core/parser/sdp/sdp.h
Line 39 in 758c85a
So, in other words, the sdpops module has no clue of "a=rtcp-fb*" attributes and cannot be implemented to filter them in a neat way.
Another issue arises for the "m=video 9078 RTP/AVPF 96 97" line.
Here, since we are filtering 96 and 97, the line remains without ids, maybe it would be better to delete the whole line?
The final result relative to the video session, after applying my filter, is the following
The text was updated successfully, but these errors were encountered: