Recipes← all recipesView on GitHub

Listen to a live call

Voicesilent call monitoring

Attach to a call in progress and hear both sides without joining it.

Also called call monitoring, silent monitor, live call listening

tapmedia-streaming

The claim

Call audio forked to a WebSocket you own, in real time, with nothing added to the call. Nobody is conferenced in and nothing is announced, because a tap copies media rather than joining the room.

Why it holds

This is how you build a monitoring console. Speaking to the people on the call is a different mechanism entirely, and it is a conference.

How it works

tap takes a uri, and that is its only required field. The scheme decides the transport: ws://, wss:// or rtp://.

- tap:
    uri: "wss://your-host.example.com/ws/audio"
    direction: both
    codec: PCMU
    control_id: supervisor-audio

tap comes before connect. connect owns the bridge until the far leg ends, so a tap placed after it does not start until the conversation is over. That ordering is the same trap record_call and live_transcribe have.

direction decides whose audio you receive. listen is what the party hears, speak is what they say, and both is the conversation. A console that only gets speak records half a call and sounds broken.

codec is PCMU or PCMA. Whatever is on the other end of the socket has to decode it, and PCMU is the default for a reason.

control_id is the handle stop_tap needs. Without one the tap runs for the life of the call and there is no way to end it early.

Limitations

You have to run the socket. A tap with nowhere to connect is a call that works and a console that is silent. The failure is on your side of the wire.

The audio is raw PCMU frames, not a file and not a transcript. Turning it into words is start-live-transcription, which is a different verb and does not need a socket at all.

What to change first

Move tap below connect and call the number. The console stays silent for the whole conversation, and the tap starts as the call ends.