Voice chat using elixir

Not sure what category to dump this in so sorry if this is in the wrong section. Recently I have been doing some basic research on voice chat servers because I find them interesting. However, I haven’t found a lot of material on underlying technology of voice chat servers (non webrtc), especially with elixir (most of the stuff I have seen is involving SIP phone stuff). I am looking to make some sort of voice chat using an elixir backend, but im not sure exactly what libraries could be used for such a task. I am going to give the information I have been able to find in the last hour or so and if I could get any feedback/direction that would be greatly appreciated.

  1. MongooseIM (this looks the most intriguing)
  2. Cowboy (this may be naive but it looks like they have some sort of socket data)
  3. Jingle (this looks like SIP though so not 100% sure. I may also be undereducated about SIP though)

But Cowboy is a web server. Think of it as Caddy, Nginx, Apache, etc. Elixir runs over Cowboy

Hey, I think you should consider using phoenix channels and do the communication over a socket. Phoenix comes with an integrated (batteries included) javascript package called phoenix-socket which you will also need to register a user to a socket channel. There are some nice tutorials on the channels documentation.

The communication should be real-time so a good place to start will be the official Webrtc documentation or maybe a better one is this tutorial which can give you some nice examples on how to approach this from the client-side.

You will also need Turn servers because the WebRTC communication will also be per to per so Xirsys can give you a free tear which can be used for development, and it’s solid.

For voice chat you need the following components:

  • a signaling channel (this can be a phoenix channel)
  • a STUN and TURN server (do you want this in Elixir/Erlang as well? If you do, MongooseIM supports the protocol. If not you can use Coturn.)
  • a voip client (here I would recommend WebRTC)