# Asterisk Audio Sockets / Web Sockets

**URL:** <https://community.asterisk.org/t/asterisk-audio-sockets-web-sockets/101472>\
**Category:** Asterisk APIs\
**Created:** [March 12, 2024, 5:45am UTC](https://community.asterisk.org/t/asterisk-audio-sockets-web-sockets/101472 "2024-03-12T05:45:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chetang.Jha](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/chetang.jha/32/2674_2.png) [@Chetang.Jha](https://community.asterisk.org/u/Chetang.Jha)\
**Post date:** [March 12, 2024, 5:45am UTC](https://community.asterisk.org/t/asterisk-audio-sockets-web-sockets/101472/1 "2024-03-12T05:45:38Z")

</div>

Hello All,

Just want to know difference between Web Socket Server & Asterisk Audio Socket, are these both same ?  
Thanks in advance.

Regards  
CJ

---

<div class="post-metadata">

**Author:** ![jcolp](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/jcolp/32/8848_2.png) [@jcolp](https://community.asterisk.org/u/jcolp)\
**Post date:** [March 12, 2024, 9:18am UTC](https://community.asterisk.org/t/asterisk-audio-sockets-web-sockets/101472/2 "2024-03-12T09:18:30Z")

</div>

No. AudioSocket is its own TCP based thing.

---

<div class="post-metadata">

**Author:** ![ldo](https://avatars.discourse-cdn.com/v4/letter/l/ed8c4c/32.png) [@ldo](https://community.asterisk.org/u/ldo)\
**Post date:** [March 12, 2024, 10:00pm UTC](https://community.asterisk.org/t/asterisk-audio-sockets-web-sockets/101472/3 "2024-03-12T22:00:22Z")

</div>

WebSockets are [part of the Web protocol suite](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API). Asterisk uses them for event notifications in ARI.

Asterisk can play back audio files, and with some trickery these “files” can actually be Unix-family sockets.

I have examples of both [here](https://gitlab.com/ldo/seaskirt_examples/).

---

<div class="post-metadata">

**Author:** ![Chetang.Jha](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/chetang.jha/32/2674_2.png) [@Chetang.Jha](https://community.asterisk.org/u/Chetang.Jha)\
**Post date:** [March 13, 2024, 5:46am UTC](https://community.asterisk.org/t/asterisk-audio-sockets-web-sockets/101472/4 "2024-03-13T05:46:47Z")

</div>

@ldo , Thanks which one the examples uses audio sockets ? that I can refer to ?

Regards  
CJ

---

<div class="post-metadata">

**Author:** ![Chetang.Jha](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/chetang.jha/32/2674_2.png) [@Chetang.Jha](https://community.asterisk.org/u/Chetang.Jha)\
**Post date:** [March 13, 2024, 5:47am UTC](https://community.asterisk.org/t/asterisk-audio-sockets-web-sockets/101472/5 "2024-03-13T05:47:32Z")

</div>

@jcolp,

thanks for the quick response.

Regards  
CJ

---

<div class="post-metadata">

**Author:** ![ldo](https://avatars.discourse-cdn.com/v4/letter/l/ed8c4c/32.png) [@ldo](https://community.asterisk.org/u/ldo)\
**Post date:** [March 13, 2024, 6:34am UTC](https://community.asterisk.org/t/asterisk-audio-sockets-web-sockets/101472/6 "2024-03-13T06:34:59Z")

</div>

The one doing audio playback is called `ami+agi_audio_player_async`. Note the caveats in the comments.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [April 12, 2024, 6:35am UTC](https://community.asterisk.org/t/asterisk-audio-sockets-web-sockets/101472/7 "2024-04-12T06:35:04Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
