dtmf
To request users to dial a DTMF message — numbers or characters in tone mode — use the dtmf reply type.
Supported in the phone channel only.
Properties
| Property | Type | Required | Description | 
|---|---|---|---|
| timeout | Integer | Yes | The user input timeout, in milliseconds. | 
| max | Integer | Yes | The maximum number of digits expected from the user. | 
tip
If the user fails to enter required numbers, the 
noDtmfAnswerEvent event will be triggered when the timeout expires.Syntax
{
  "type": "dtmf",
  "timeout": 5000,
  "max": 3
}
How to use
Consider an example when the bot calls a user to confirm an order.
state: OrderConfirmation
    a: Hello! We have received your order {{$session.orderItem}}. To confirm it, switch to tone mode.
    a: If you want to confirm the order, press 1.
    a: If you want to cancel it, press 2.
    script:
        $response.replies = $response.replies || [];
        $response.replies.push({
            "type": "dtmf",
            "timeout": 10000,
            "max": 1
        });
    state: Confirm
        q: 1
        a: Your order has been confirmed. We will contact you later to clarify delivery details.
        # ...
    state: Cancel
        q: 2
        a: Your order has been canceled.
        # ...
    state: NoInput
        event: noDtmfAnswerEvent
        a: Transferring the call to an agent.
        # ...