Class DtmfSettings.Builder

java.lang.Object
com.vonage.client.voice.ncco.DtmfSettings.Builder
Enclosing class:
DtmfSettings

public static final class DtmfSettings.Builder extends Object
Builder for specifying DTMF settings.
Since:
8.9.4
  • Method Details

    • timeOut

      public DtmfSettings.Builder timeOut(int timeOut)
      The result of the callee's activity is sent to the eventUrl webhook endpoint timeOut seconds after the last action. The default value is 3. Max is 10.
      Parameters:
      timeOut - The DTMF input timeout in seconds as an int.
      Returns:
      This builder.
    • maxDigits

      public DtmfSettings.Builder maxDigits(int maxDigits)
      The number of digits the user can press. The maximum value is 20, the default is 4 digits.
      Parameters:
      maxDigits - The number of digits as an int.
      Returns:
      This builder.
    • submitOnHash

      public DtmfSettings.Builder submitOnHash(boolean submitOnHash)
      Set to true so the callee's activity is sent to your webhook endpoint at eventUrl after they press #. If # is not pressed the result is submitted after timeOut seconds. The default value is false. That is, the result is sent to your webhook endpoint after timeOut seconds.
      Parameters:
      submitOnHash - Whether to submit the input after pressing the hash key.
      Returns:
      This builder.
    • build

      public DtmfSettings build()
      Builds the DtmfSettings with this builder's properties.
      Returns:
      A new DtmfSettings instance.