Add force strip extmap flag - #2167
Conversation
RTP header extensions are only processed, and unknown ones stripped, if at least one side of the call negotiated header extensions through `a=extmap` attributes. Otherwise RTP is forwarded untouched, including any header extensions an endpoint may include without having announced them. Add a `force strip extmap` flag which selects header extension processing for all streams of a call regardless of whether any extensions were negotiated, so that unannounced header extensions are removed. This is useful when forwarding media from sources that always include header extensions towards endpoints that do not cope with them.
2855efe to
6df5d46
Compare
|
I feel like this should be handled unconditionally, without the need for an extra flag. IOW if one side advertised some RTP extensions and the other side didn't accept them, then they should be removed anyway. There could be reasons not to of course, but intuitively I would say that removing unsupported extensions should be the default behaviour, and possibly leaving them in place should be the optional alternative. |
|
Understood. On the inverse option, leaving unnegotiated extensions in place, I would rather not add it |
|
Before reworking this I built the unconditional version and ran it against the existing That makes the change you are describing a deliberate reversal of what those tests pin
Keeping the opt-in flag as originally submitted is still on the table as well, if you would My own preference is the second if the pass-through was intentional for endpoints that |
RTP header extensions are only processed, and unknown ones removed, if at
least one side of the call negotiated header extensions through
a=extmapattributes in the SDP. Otherwise RTP is forwarded untouched, including any
header extensions an endpoint sends without having announced them.
This adds a
force strip extmapflag that turns on header extensionprocessing for all streams of a call regardless of whether any extensions
were negotiated, so that unannounced header extensions are removed from
forwarded RTP. The flag is remembered for the lifetime of the call, so it
only needs to be given once.
Use case: media coming from a WebRTC selective forwarding unit carries
header extensions that WebRTC clients use among themselves (audio level,
transport-wide congestion control) but which were never part of the SIP
side's SDP. Some SIP endpoints do not cope with unexpected header
extensions, and with this flag rtpengine can strip them selectively on
such routes.
Tests: a case in
t/auto-daemon-tests-rtp-ext.plsends RTP with headerextensions in both directions on a call without any
a=extmapand checksthat they arrive without the extensions.