# SCTP over UDP

**URL:** <https://mediasoup.discourse.group/t/sctp-over-udp/623>\
**Category:** mediasoup libraries\
**Created:** [March 6, 2020, 12:04am UTC](https://mediasoup.discourse.group/t/sctp-over-udp/623 "2020-03-06T00:04:40Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![oilkillsbirds](https://avatars.discourse-cdn.com/v4/letter/o/e68b1a/32.png) [@oilkillsbirds](https://mediasoup.discourse.group/u/oilkillsbirds)\
**Post date:** [March 13, 2020, 6:12am UTC](https://mediasoup.discourse.group/t/sctp-over-udp/623/21 "2020-03-13T06:12:34Z")

</div>

I’m getting close. I enable comedia on the transport, usrsctp\_bind() and usrsctp\_connect() from the client, which then sends the INITMSG through onSendSctpData, Mediasoup server sees this and ‘sctpconnectionstate’ changes to “connecting” and receives the correct remote endpoint from the comedia behavior… but then nothing happens, stays stuck in “connecting” sctp state.

Am I missing a final step?

---

<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:** [March 13, 2020, 10:29am UTC](https://mediasoup.discourse.group/t/sctp-over-udp/623/22 "2020-03-13T10:29:35Z")

</div>

Then the mediasoup `PlainTransport` will send SCTP messages to your client to complete the SCTP handshake and your client must reply to them.

---

<div class="post-metadata">

**Author:** ![oilkillsbirds](https://avatars.discourse-cdn.com/v4/letter/o/e68b1a/32.png) [@oilkillsbirds](https://mediasoup.discourse.group/u/oilkillsbirds)\
**Post date:** [March 16, 2020, 8:01pm UTC](https://mediasoup.discourse.group/t/sctp-over-udp/623/23 "2020-03-16T20:01:13Z")

</div>

Yea, something must be missing. I send a 100 byte INIT on connect, Mediasoup receives it and replies with a 100 byte packet, and then a 412 byte packet - both of which I feed into usrsctp\_conninput(…) on the client but then nothing happens. The receive\_cb doesn’t get called, or anything else. Do I need to manually fashion a reply or should usrsctp\_conninput(…) do it’s thing and then the send callback will send what it needs to?

---

<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:** [March 16, 2020, 8:36pm UTC](https://mediasoup.discourse.group/t/sctp-over-udp/623/24 "2020-03-16T20:36:29Z")

</div>

Well, sorry, I cannot give support about usrsctp. You can check how usrsctp is used in mediasoup or check the examples that come with usrsctp.

---

<div class="post-metadata">

**Author:** ![oilkillsbirds](https://avatars.discourse-cdn.com/v4/letter/o/e68b1a/32.png) [@oilkillsbirds](https://mediasoup.discourse.group/u/oilkillsbirds)\
**Post date:** [March 16, 2020, 9:41pm UTC](https://mediasoup.discourse.group/t/sctp-over-udp/623/25 "2020-03-16T21:41:26Z")

</div>

Ok, I understand. I found the issue that occurs when I call usrsctp\_conninput(…) but don’t understand what it means. I imagine this is still in usrsctp land so don’t expect any support on this, but if it’s something you’ve ran into or have a quick answer to it may help me to complete the handshake and quit bugging you

_Bad CSUM on SCTP packet calc\_check:adf1b272 check:25d25106 m:000001ACB7F7B420 mlen:16 iphlen:0_

---

<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:** [March 16, 2020, 9:48pm UTC](https://mediasoup.discourse.group/t/sctp-over-udp/623/26 "2020-03-16T21:48:03Z")

</div>

Never seen that, no idea, but it seems that it’s not a SCTP packet. You could use Wireshark or tshark to captura traffic and inspect what you are passing to usrsctp. Wireshark has a SCTP parser.

[Previous page](https://mediasoup.discourse.group/t/sctp-over-udp/623.md?page=1)
