SCTP not enabled by remote Transport Error

Hey,

I’m trying to get DataChannels working here. On the server I create two transports 1 send/1 receive. Like so:

await this._mediasoupRouter.createWebRtcTransport(
          {
            listenIps: webrtcTransportConfig.getListenIps(),
            enableUdp: !forceTcp,
            enableTcp: true,
            enableSctp: true,
            numSctpStreams: sctpCapabilities.numStreams,
            preferUdp: true,
            initialAvailableOutgoingBitrate,
            minimumAvailableOutgoingBitrate,
            appData: { producing, consuming, sctpCapabilities },
          },
        );

SctpCapabilities has the required data in it. In the client when the ProducerTransport becomes connected I call a function which tries to create the DataProducer

await producerTransport.produceData({
  ordered: false,
  maxRetransmits: 1,
  label: 'chat',
  priority: 'medium',
  appData: { info: 'chat-data-producer' },
});

This then returns the following error UnsupportedError: SCTP not enabled by remote Transport

Any ideas if I’m doing something wrong.

No idea honestly, but you are doing something wrong somewhere. Perhaps you are not calling transport.produceData() in the proper server side transport or something like that.

hi @cian-w,

I’m facing the same or at least a similar issue, did you find out what was going wrong for you?

edit: found my mistake:
when creating the webrtc transport I did not return the sctpParameters in addition to ice and dtls!
seems to work now…

1 Like

Sorry, I’ve only just seen this now. Yep we had made the same mistake, not returning the SCTP params.

Nice one.