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
Ship Agents Faster Icon
Ship Agents Faster

Transform your applications and workflows into powerful agentic systems at global scale.

Gemini Enterprise Agent Platform lets you rapidly build, scale, govern and optimize production-ready agents grounded in your organization's data. The platform enables developers to build custom or pre-built agents for virtually any use case. New customers get $300 in free credits.
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