Any example of PSTN integration with Mediasoup?

Subj. Through Twilio or otherwise, how do i do that? My intent is to make a dial-in number where people can dial and enter a PIN to get connected to a webrtc conference call in Mediasoup

No, no examples AFAIK. Now, this is something you have to figure out. You need to mix audio from other participants to be sent to the PSTN participant, and need SIP integration by using mediasoup PlainTransport. And you may also need audio codec transcoding from PSTN codec to opus and vice-versa.

The mixing is the hard part. We, mediasoup authors, have done it many times using different 3rd party RTP stacks (by creating custom handlers for mediasoup-client and running it in Node.js server side). But sincerely we cannot provide all our expertise about all topics by free, so I hope someone else can help because, lately, people make questions and just us, the mediasoup authors, answer.

I have an example here on a SIP gateway. Note that this uses v2 of mediasoup, but shouldn’t be to hard to fix.

But it also uses Kurento! Using two different media servers in one project is kind of too much if you ask me :slight_smile:

mediasoup is not a mixer but a SFU. You need an audio mixer and also audio encoder/decoder in order to integrate PSTN into a SFU. You do need such a media endpoint that behaves as a mixer, encoder and decoder, name it Kurento or a custom code using existing RTP stacks. But you need something. Or use Chromium in server side to run a website with JavaScript + WebRTC and some magic to associate virtual mic device and speaker decide with Linux sound devices.

and yeah this is what i am gonna do :slight_smile: