tapAudio

View as Markdown

tapAudio

  • tapAudio(params): Promise<CallTap> - See CallTap for more details.

Intercept call audio and stream it to the specified WebSocket endpoint.

This is an experimental method. The destination must be a hosted WebSocket/RTP server, with an address that SignalWire can reach.

A current limitation of this method is that the destination device does not receive any metadata regarding the origin of the stream.

Parameters

NameTypeDescription
paramsObject-
params.deviceTapDeviceDestination device. Can be either WebSocket or RTP.
params.direction"listen" | "speak" | "both"Direction to tap. Can be "listen" (what the caller hears), "speak" (what the caller says), or "both".

Returns

Promise<CallTap> - See CallTap for more details.

Example

1const tap = await call.tapAudio({
2 direction: "both",
3 device: {
4 type: "ws",
5 uri: "wss://example.domain.com/endpoint",
6 },
7});
8
9await tap.stop();