Skip to main content

Tone dialing

Bots in the telephone channel can process DTMF signals — numbers or characters coded as tones.

Message request

To request DTMF signals from the customer, add a dtmf reply to the bot response in the appropriate state. The bot will expect the next reply made by the customer to be a DTMF message.

Regular speech input received in the context of such states will be ignored.

Message processing

Use a pattern to parse the numeric input. If the customer fails to send a DTMF message before the specified timeout, the noDtmfAnswerEvent event is triggered.

How to use

state: Input
a: Enter your PIN.
$response.replies = $response.replies || [];
"type": "dtmf",
"max": 4, // The maximum number of digits expected from the customer
"timeout": 15000 // The customer input timeout, in milliseconds

state: Digits
q: $regexp<\d+>
a: You have entered {{$parseTree.text}}.

state: NoInput
event: noDtmfAnswerEvent
a: You haven’t entered anything.