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
Veeam Data Platform v13.1 - Get Your Free Trial Icon
Veeam Data Platform v13.1 - Get Your Free Trial

Secure by design, portable by default. Recover clean, fast, anywhere. Start a free trial.

Try Veeam Data Platform today. Experience the unified platform that's secure by design, portable by default, and proven to recover clean, fast, and anywhere.
Try it 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