stop_tap

View as MarkdownOpen in Claude

Stop an active media tap stream.

Parameters

control_id
Optional[str]Defaults to None

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

Returns

FunctionResult — self, for chaining.

Example

1from signalwire import AgentBase
2from signalwire import FunctionResult
3
4agent = AgentBase(name="my-agent", route="/agent")
5agent.set_prompt_text("You are a helpful assistant.")
6
7@agent.tool(name="stop_monitoring", description="Stop monitoring the call")
8def stop_monitoring(args, raw_data):
9 return (
10 FunctionResult("Monitoring stopped.")
11 .stop_tap(control_id="supervisor_tap")
12 )
13
14agent.serve()