REST ClientCalling

collect_start_input_timers

View as MarkdownOpen in Claude

Manually start the input timers for a collection that was started without automatic timer activation. This is useful when you want to play a prompt before starting the timer countdown.

Request

idstringRequiredformat: "uuid"
The unique identifying ID of an existing call.
paramsobjectRequired
An object of parameters that will be utilized by the active command.

Response

Call LegobjectRequired
Returned when the call is a standard PSTN, SIP, or WebRTC call.
OR
Fabric Subscriber Device LegobjectRequired

Returned when the call is a Fabric subscriber device leg. The status field is always null for this type.

Example

from signalwire.rest import RestClient
client = RestClient(
project="your-project-id",
token="your-api-token",
host="your-space.signalwire.com",
)
# Start collection without auto-timers, play prompt, then start timers.
# The response never carries control_id back, so name the collection yourself
# and reuse that same value below.
client.calling.collect(
call_id="call-id-xxx",
control_id="collect-1",
digits={"max": 4, "terminators": "#"},
)
# Play a prompt first
client.calling.play(
call_id="call-id-xxx",
play=[{"type": "tts", "text": "Please enter your 4-digit PIN."}]
)
# Now start the input timers
client.calling.collect_start_input_timers(
call_id="call-id-xxx",
control_id="collect-1",
)