# SCTP not enabled by remote Transport Error

**URL:** <https://mediasoup.discourse.group/t/sctp-not-enabled-by-remote-transport-error/2047>\
**Category:** mediasoup libraries\
**Created:** [November 19, 2020, 4:18pm UTC](https://mediasoup.discourse.group/t/sctp-not-enabled-by-remote-transport-error/2047 "2020-11-19T16:18:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cian-w](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/cian-w/32/489_2.png) [@cian-w](https://mediasoup.discourse.group/u/cian-w)\
**Post date:** [November 19, 2020, 4:18pm UTC](https://mediasoup.discourse.group/t/sctp-not-enabled-by-remote-transport-error/2047/1 "2020-11-19T16:18:42Z")

</div>

Hey,

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

```auto
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

```auto
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.

---

<div class="post-metadata">

**Author:** ![ibc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/ibc/32/1540_2.png) [@ibc](https://mediasoup.discourse.group/u/ibc)\
**Post date:** [November 19, 2020, 4:24pm UTC](https://mediasoup.discourse.group/t/sctp-not-enabled-by-remote-transport-error/2047/2 "2020-11-19T16:24:23Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![lukasIO](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/lukasio/32/719_2.png) [@lukasIO](https://mediasoup.discourse.group/u/lukasIO)\
**Post date:** [December 23, 2020, 10:23pm UTC](https://mediasoup.discourse.group/t/sctp-not-enabled-by-remote-transport-error/2047/3 "2020-12-23T22:23:16Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![cian-w](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/cian-w/32/489_2.png) [@cian-w](https://mediasoup.discourse.group/u/cian-w)\
**Post date:** [January 4, 2021, 8:02am UTC](https://mediasoup.discourse.group/t/sctp-not-enabled-by-remote-transport-error/2047/4 "2021-01-04T08:02:09Z")

</div>

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

Nice one.
