Level up your Twilio API skills in TwilioQuest, an educational game for Mac, Windows, and Linux. Download Now

Menu

Expand
Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Gather Input On Call

Gather input on call widget

Description:

Gather Input On Call allows you to gather a user’s input while they are on call. Use this Widget to collect DTMF information. This can then be saved (great for collecting data) or sent to another Widget (such as a Split Based On... Widget) to send the user down the right path.

There is no required configuration for the Gather Widget.

Optional Configuration

Name

Description

Supported Values

Default

Say or Play a Message

A choice indicating whether to play a pre-recorded message or say text (just as with Say/Play).

Say a Message, Play a Message

Say a Message

Text To Say

(if Say) The text to say. Templates are supported so you can say things like “Hello {{first_name}}”

Language

(if Say) Language and regional dialect for the message being said.

See dropdown list on the widget

en

Message Voice

(if Say) Select the voice of your choosing from a dropdown.

Varies based on language selected

alice

URL of Audio File

(if Play) The URL of of media to play, i.e. https://api.twilio.com/cowbell.mp3.

Number of Loops

Choose how many times you would like the message to loop.

1

Stop Gathering After ___ Seconds

Time to wait for the caller to press a key.

1s - 30s

5s

Speech Recognition Language

Language the speech engine will try to recognize.

See complete list en-US

Speech Recognition Hints

A list of comma-separated hint values.

Stop Gathering On Keypress?

If Twilio should listen for a specific keypress to stop gathering digits. If set to "No," all keypresses will be gathered and submited once the the Stop Gathering After timeout is reached or the expected Number of Digits are collected.

Yes/No

Yes

Stop Gathering On Keypress ___

A value that will submit the received data as soon as it’s pressed. Note: This is a control key and its value is not submitted with the rest of the gathered digits.

0-9,#,* or blank

#

Stop Gathering After Number Of Digits

The number of digits you are expecting and will submit as soon as that number is reached.

0-9, or blank



Variables:

Account SID widgets.MY_WIDGET_NAME.AccountSid
API Version widgets.MY_WIDGET_NAME.ApiVersion
Called widgets.MY_WIDGET_NAME.Called
Caller widgets.MY_WIDGET_NAME.Caller
Call Status widgets.MY_WIDGET_NAME.CallStatus
Direction widgets.MY_WIDGET_NAME.Direction
From widgets.MY_WIDGET_NAME.From
From City widgets.MY_WIDGET_NAME.FromCity
From Country widgets.MY_WIDGET_NAME.FromCountry
From State widgets.MY_WIDGET_NAME.FromState
From ZIP widgets.MY_WIDGET_NAME.FromZip
Caller City widgets.MY_WIDGET_NAME.CallerCity
Caller Country widgets.MY_WIDGET_NAME.CallerCountry
Caller State widgets.MY_WIDGET_NAME.CallerState
Caller ZIP widgets.MY_WIDGET_NAME.CallerZip
Call SID widgets.MY_WIDGET_NAME.CallSid
Called City widgets.MY_WIDGET_NAME.CalledCity
Called Country widgets.MY_WIDGET_NAME.CalledCountry
Called State widgets.MY_WIDGET_NAME.CalledState
Called ZIP widgets.MY_WIDGET_NAME.CalledZip
To widgets.MY_WIDGET_NAME.To
To City widgets.MY_WIDGET_NAME.ToCity
To Country widgets.MY_WIDGET_NAME.ToCountry
To State widgets.MY_WIDGET_NAME.ToState
To ZIP widgets.MY_WIDGET_NAME.ToZip
Confidence widgets.MY_WIDGET_NAME.Confidence
Digits widgets.MY_WIDGET_NAME.Digits
Speech Result widgets.MY_WIDGET_NAME.SpeechResult
Unstable Speech Result widgets.MY_WIDGET_NAME.UnstableSpeechResult

Rate this page:

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.