RelayActionsCollectAction
stop
Stop the play-and-collect operation.
Returns
dict — Server acknowledgment.
Example
from signalwire.relay import RelayClientclient = RelayClient(project="your-project-id",token="your-api-token",contexts=["default"],)@client.on_callasync def handle_call(call):await call.answer()action = await call.play_and_collect(media=[{"type": "tts", "params": {"text": "Press 1 for sales, 2 for support."}}],collect={"digits": {"max": 1, "digit_timeout": 5.0}},)# Cancel the operationawait action.stop()client.run()