collectStartInputTimers

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

dialobjectRequired
OR
updateobjectRequired
OR
calling.endobjectRequired
OR
calling.disconnectobjectRequired
OR
calling.ai_holdobjectRequired
OR
calling.ai_unholdobjectRequired
OR
calling.ai_messageobjectRequired
OR
calling.ai.stopobjectRequired
OR
calling.playobjectRequired
OR
calling.play.pauseobjectRequired
OR
calling.play.resumeobjectRequired
OR
calling.play.stopobjectRequired
OR
calling.play.volumeobjectRequired
OR
calling.recordobjectRequired
OR
calling.record.pauseobjectRequired
OR
calling.record.resumeobjectRequired
OR
calling.record.stopobjectRequired
OR
calling.collectobjectRequired
OR
calling.collect.stopobjectRequired
OR
calling.collect.start_input_timersobjectRequired
OR
calling.detectobjectRequired
OR
calling.detect.stopobjectRequired
OR
calling.tapobjectRequired
OR
calling.tap.stopobjectRequired
OR
calling.streamobjectRequired
OR
calling.stream.stopobjectRequired
OR
calling.denoiseobjectRequired
OR
calling.denoise.stopobjectRequired
OR
calling.transcribeobjectRequired
OR
calling.transcribe.stopobjectRequired
OR
calling.live_transcribeobjectRequired
OR
calling.live_translateobjectRequired
OR
calling.transferobjectRequired
OR
calling.send_fax.stopobjectRequired
OR
calling.receive_fax.stopobjectRequired
OR
calling.referobjectRequired
OR
calling.user_eventobjectRequired

Response

Call LegobjectRequired
OR
Fabric Subscriber Device LegobjectRequired

Response Example

Response
1{
2 "id": "0e9c80d7-a149-4917-892d-420043709f45",
3 "from": "+12069708643",
4 "to": "+15550198765",
5 "direction": "outbound-api",
6 "source": "realtime_api",
7 "charge": 0,
8 "created_at": "2024-05-06T12:20:00Z",
9 "charge_details": [
10 {
11 "description": "Outbound Voice",
12 "charge": 0.004
13 }
14 ],
15 "status": "queued",
16 "type": "relay_pstn_call"
17}

Example

1import { RestClient } from "@signalwire/sdk";
2
3const client = new RestClient({
4 project: "your-project-id",
5 token: "your-api-token",
6 host: "your-space.signalwire.com"
7});
8
9// Start collection without auto-timers, play prompt, then start timers
10const result = await client.calling.collect("call-id-xxx", {
11 digits: { max: 4, terminators: "#" },
12});
13const controlId = result.control_id;
14
15// Play a prompt first
16await client.calling.play("call-id-xxx", {
17 play: [{ type: "tts", text: "Please enter your 4-digit PIN." }]
18});
19
20// Now start the input timers
21await client.calling.collectStartInputTimers("call-id-xxx", {
22 control_id: controlId,
23});