# Voice chat using elixir

**URL:** <https://forum.elixirforum.com/t/voice-chat-using-elixir/36635>\
**Category:** Discussions\
**Tags:** socket, real-time, mongooseim\
**Created:** [January 5, 2021, 4:32am UTC](https://forum.elixirforum.com/t/voice-chat-using-elixir/36635 "2021-01-05T04:32:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![infecting](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/infecting/32/21348_2.png) [@infecting](https://forum.elixirforum.com/u/infecting)\
**Post date:** [January 5, 2021, 4:32am UTC](https://forum.elixirforum.com/t/voice-chat-using-elixir/36635/1 "2021-01-05T04:32:15Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![hudsonbay](https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/h/8797f3/32.png) [@hudsonbay](https://forum.elixirforum.com/u/hudsonbay)\
**Post date:** [January 5, 2021, 6:07am UTC](https://forum.elixirforum.com/t/voice-chat-using-elixir/36635/2 "2021-01-05T06:07:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Copser](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/copser/32/15864_2.png) [@Copser](https://forum.elixirforum.com/u/Copser)\
**Post date:** [January 5, 2021, 7:05am UTC](https://forum.elixirforum.com/t/voice-chat-using-elixir/36635/3 "2021-01-05T07:05:04Z")

</div>

Hey, I think you should consider using [phoenix channels](https://hexdocs.pm/phoenix/channels.html) 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](https://hexdocs.pm/phoenix/channels.html#tying-it-all-together).

The communication should be real-time so a good place to start will be the official [Webrtc](https://webrtc.org/) documentation or maybe a better one is [this tutorial](https://www.html5rocks.com/en/tutorials/webrtc/basics/) 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](https://xirsys.com/) can give you a free tear which can be used for development, and it’s solid.

---

<div class="post-metadata">

**Author:** ![JeyHey](https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/j/ce73a5/32.png) [@JeyHey](https://forum.elixirforum.com/u/JeyHey)\
**Post date:** [January 5, 2021, 9:13am UTC](https://forum.elixirforum.com/t/voice-chat-using-elixir/36635/4 "2021-01-05T09:13:57Z")

</div>

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)
