sipsorcery-org / sipsorcery

A WebRTC, SIP and VoIP library for C# and .NET. Designed for real-time communications apps.
https://sipsorcery-org.github.io/sipsorcery
Other
1.44k stars 438 forks source link

Messaging application using sipsorcery lib #579

Open bodyabos opened 3 years ago

bodyabos commented 3 years ago

I want to create a simple messaging application using this lib. The main point is to make a P2P app that uses a STUN server to make behind NAT communication.

Maybe someone has such experience and can share a code sample.

sipsorcery commented 3 years ago

You haven't provided much detail and I'm not sure SIP or WebRTC are ideal for a text-only chat app. If I was to choose between them I would use WebRTC ahead of SIP due to it's better NAT handling.

Assuming the peers can't communcate directly, due to NAT, you'll need some way to co-ordinate signalling between them so as to set up the SIP or WebRTC session. That signalling server could just as easily coorindate your chat messages, hence the "not so sure" SIP or WebRTC are ideal.

I've only briefly looked at it but maybe matrix.org is close to what you're after. It's a decentralised message exchange protocol. It can be used as the signalling layer for SIP and WebRTC but maybe in your case it could serve as the transport for your chat application.