meowcaller-js
v0.3.0
Published
WhatsApp VoIP library for Baileys call signaling, SRTP media, and audio/video adapters
Maintainers
Readme
meowcaller-js
WhatsApp VoIP library for Baileys. Handles signaling, DTLS relay transport, SRTP media, and call lifecycle — all in JavaScript.
Install
npm install meowcaller-jsRequires Node.js 20+. Uses node-datachannel (prebuilt native addon) for DTLS transport.
Quick Start
Receive a call
import { makeWASocket, useMultiFileAuthState } from '@whiskeysockets/baileys';
import { Client, SinkFunc, SourceFunc } from 'meowcaller-js';
const { state } = await useMultiFileAuthState('auth');
const wa = makeWASocket({ auth: state, printQRInTerminal: true });
const client = new Client(wa);
client.connect();
client.onIncomingCall((call) => {
console.log('Call from', call.peer());
call.onStateChange((phase) => console.log('phase:', phase));
call.onEnd((reason) => console.log('ended:', reason));
call.receive(SinkFunc((frame) => {
// frame: Float32Array — 960 samples at 16 kHz
}));
call.play(SourceFunc(async () => null));
call.answer();
});Place a call
const call = await client.call({}, '+15551234567');
call.onReady(() => {
console.log('media is flowing');
call.play(SourceFunc(async () => new Float32Array(960)));
});
call.onEnd((reason) => console.log('ended:', reason));List active calls
const calls = client.listCalls();
console.log(`${calls.length} active call(s)`);Documentation
Full API reference, examples, and guides: benslogs.dev/meowcaller-js/docs
Implementation Status
| Feature | Status |
|---------|--------|
| Outbound calls | Signaling ported |
| Inbound calls | Signaling ported |
| Audio calls | Signaling + DTLS/SCTP/DataChannel media relay |
| Video calls | Signaling + H.264 depacketizer |
| DTLS relay | Implemented via node-datachannel (libdatachannel) |
| Opus codec | Implemented via libopus-wasm (16 kHz mono, 60 ms frames) |
| MLow codec | Stub — needs WASM port |
Differences from meowcaller
- Async/await instead of goroutines and channels
- EventEmitter patterns instead of Go callbacks
- Call registry for listing and cleaning up active sessions
- Source/sink adapters for piping audio in and out
- Node.js native DTLS via
node-datachannel(prebuilt, no CGO) - Tests, CI, auto-publish on push
License
MIT
