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. Always sent, since the tap verb’s own default is
"speak". Throws an Error for any other value.
"speak"— what the party says"listen"— 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.