#1808·mediasoup

TODO for new built-in SCTP stack

Author: ibcCreated May 26, 2026Updated Jun 28, 2026

Once the new built-in SCTP stack is merged, there are more tasks to do. Here some of them (if not all).

TODO

  • Release new version of mediasoup Rust packages.
  • In the doc add all new options such as maxSendMessageSize, sctpXxx, etc, deprecate (or remove) maxMessageSize and maxSctpMessageSize and document also the new default values in pipeToRouter().
  • Fix the documentation in the website which says: "The underlaying SCTP association uses a common send buffer for all data consumers, hence the value given by this method indicates the data buffered for all data consumers in the transport."
  • Test Chrome/Canary with I-DATA (message interleaving):
    bash
    /Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary \
      --force-fieldtrials="WebRTC-DataChannelMessageInterleaving/Enabled/" \
      --enable-logging=stderr \
      --v=1 \
  • Rename all "Packet", "Chunk", "Parameter", "Error Cause", "Association", etc to lowcase everywhere (in code and comments).
  • Rename all "I_DATA" etc to `I-DATA" everywhere (in code and comments).
  • In Transport::OnAssociationClosed() we may want to change MS_WARN_TAG(sctp) to MS_DEBUG_TAG(sctp) or even MS_DEBUG_DEV() when association is closed because client sends ABORT chunk (which is expected if client closes the browser abruptly).
  • Replicate missing tests of dcsctp.
  • Packet::ValidateCRC32cChecksum() is never called.
  • Vulnerability when using SCTP over plain/pipe transport: https://github.com/versatica/mediasoup/security/advisories/GHSA-p7x2-g5cq-fhmq
  • Check if it would make sense to pass more fields in SctpOptions given to the Association in Transport.cpp.
  • In transport.dump() (maybe also in getStats()) we must properly obtain current OS and MIS according to the number of SCTP streams negotiated via INIT + INIT_ACK (if association is connected).
  • Use the AssociationMetrics. Expose them in transport stats, etc.
  • Need Node/Rust tests for dataConsumer->setBufferedAmountLowThreshold() and so on. In Rust there is smoke.rs.
  • Consider notifying the upper layer (Node, Rust) in Transport::OnAssociationTotalBufferedAmountLow(). However take into account that we don't expose SctpOptions::totalBufferedAmountLowThreshold to the upper layer. Or maybe sctpTotalBufferedAmountLowThreshold could be a new option in XxxxxTransportOptions.
  • In sctpParametersTypes.ts, sctpParametersFbsUtils.ts and sctp_parameters.rs, deprecated fields MIS, OS, maxMessageSize still exist for backwards compatibility. Must be removed in the future.
  • In ReassemblyQueue class, once we upgrade mediasoup to C++23, replace std::vector<std::function<void()>> deferredActions with std::vector<std::move_only_function<void()>> deferredActions (see all related "TODO: SCTP" comments in ReassemblyQueue.cpp and ReassemblyQueue.hpp).
  • TODO in mediasoup-client: https://github.com/versatica/mediasoup-client/issues/374