finds.dev← search

// the find

wiringai/mod_earshot

★ 57 · C · MIT · updated Oct 2026

FreeSWITCH module that streams live call audio to AI voice agents over WebSocket and plays their voice back — full-duplex.

A FreeSWITCH module, written in C, that streams a live call's audio to a WebSocket endpoint and plays the endpoint's audio back on the same leg, full duplex. It is aimed at teams already running FreeSWITCH who want to connect an OpenAI Realtime, Deepgram, ElevenLabs, or Gemini Live agent without putting a separate media server in front of it.

- Turn-taking runs in the module. VAD emits speech_started and speech_stopped, a ready gate holds playback until the far end is up, and barge-in flushes queued agent audio. Agents without their own turn detection get it for free.

- Agent-driven call control is opt-in per action, and the README says arguments are validated: app-exec, path traversal, and exec-triggering variables are rejected. test/test_cmdguard.c covers this layer, which is the right place to test it.

- The WebSocket transport is libwebsockets on a shared service-loop pool, not one thread per session. For a module that runs inside the switch and holds many concurrent calls, that is the correct design.

- Metrics are typed ESL events keyed on SIP Call-ID and channel UUID, so one call can be followed across FreeSWITCH, the agent, and the logs without custom plumbing. Time-to-first-audio and per-turn response latency are the numbers that matter for voice agents.

- Of the ten adapters, Twilio is only echo-tested and Pipecat is validated against its protobuf schema, not a live call. The live-validation checkmarks have no linked recording or test run, and the README says CI runs mock tests only.

- This is C running inside the switch process, so a bug in a session path can take down FreeSWITCH, not just one call. The only packaging described is a .deb from cpack. Anyone on another distro or a custom FreeSWITCH build has to compile against the FS dev headers and libwebsockets themselves.

- The drop-in compatibility with mod_audio_stream dialplans is asserted in the README without a linked test or compatibility matrix. Migration from that module is the first thing a switch operator will try, and at 57 stars with the name still marked as a working name, the identifiers may still change.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →