A TypeScript implementation of the Asterisk AudioSocket protocol with no runtime dependencies. AudioSocket bridges a live call into your own process over a plain TCP socket, which makes it the simplest way to get call audio into an application without touching Asterisk internals.

The library handles the framing, which is a three byte header followed by a payload, and the message types you actually meet: the call UUID, audio, hangup and error.

It also handles the part that catches people out. Asterisk forwards every frame to the channel the moment it arrives and does not buffer for you, so writing a whole sentence at once means the far end keeps a few frames and discards the rest. The playback helper paces one frame per 20 ms against a deadline and re-clamps rather than bursting to catch up.

MIT licensed, published on npm.

Features

  • Protocol framing plus paced playback that will not overrun the far end

Project Samples

Project Activity

See All Activity >

Follow asterisk-audiosocket

asterisk-audiosocket Web Site

Other Useful Business Software
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of asterisk-audiosocket!

Additional Project Details

Registered

2026-08-11