stop

View as MarkdownOpen in Claude

Stop detection immediately.

Returns

dict — Server acknowledgment.

Example

1from signalwire.relay import RelayClient
2
3client = RelayClient(
4 project="your-project-id",
5 token="your-api-token",
6 host="your-space.signalwire.com",
7 contexts=["default"],
8)
9
10@client.on_call
11async def handle_call(call):
12 await call.answer()
13 action = await call.detect(
14 {"type": "machine", "params": {"initial_timeout": 5.0}}
15 )
16
17 # Stop detection early
18 await action.stop()
19
20client.run()