tap
Start a media tap that streams call audio to an external endpoint. Supports
WebSocket (wss://, ws://) and RTP (rtp://) destinations.
Parameters
opts
Tap configuration object.
opts.uri
Destination URI for the media stream. Supported formats:
"rtp://IP:port"— RTP stream"ws://example.com"— WebSocket stream"wss://example.com"— Secure WebSocket stream
opts.controlId
Identifier for this tap. Pass the same ID to stopTap() to end this
specific tap. If omitted, a default ID is generated.
opts.direction
Audio direction to tap.
"speak"— what the party says"hear"— what the party hears"both"— both directions
opts.codec
Audio codec for the stream.
"PCMU"— G.711 mu-law"PCMA"— G.711 A-law
opts.rtpPtime
Packetization time in milliseconds for RTP streams.
opts.statusUrl
URL to receive tap status change webhooks.
Returns
FunctionResult — this, for chaining.