start_input_timers

View as MarkdownOpen in Claude

Manually start the initial_timeout timer on the active collect operation. Useful when start_input_timers was set to false during the initial call.

Returns

dict — Server acknowledgment.

Example

from signalwire.relay import RelayClient
client = RelayClient(
project="your-project-id",
token="your-api-token",
contexts=["default"],
)
@client.on_call
async 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},
"start_input_timers": False,
},
)
# Start timers when ready
await action.start_input_timers()
event = await action.wait()
client.run()