stop_tap

View as MarkdownOpen in Claude

Stop an active media tap stream.

Parameters

control_id
str | NoneDefaults to None

Identifier of the tap to stop. If not provided, the most recently started tap is stopped.

Returns

FunctionResult — self, for chaining.

Example

from signalwire import AgentBase
from signalwire import FunctionResult
agent = AgentBase(name="my-agent", route="/agent")
agent.set_prompt_text("You are a helpful assistant.")
@agent.tool(name="stop_monitoring", description="Stop monitoring the call")
def stop_monitoring(args, raw_data):
return (
FunctionResult("Monitoring stopped.")
.stop_tap(control_id="supervisor_tap")
)
agent.serve()