Class RecordAction.Builder

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

public static class RecordAction.Builder extends Object
Builder for a RecordAction. All fields are optional.
  • Method Details

    • format

      Parameters:
      format - Record the Call in a specific RecordingFormat.

      The default value is RecordingFormat.MP3, or RecordingFormat.WAV when recording more than 2 channels.

      Returns:
      This builder.
    • endOnSilence

      public RecordAction.Builder endOnSilence(Integer endOnSilence)
      Parameters:
      endOnSilence - Stop recording after n seconds of silence. Once the recording is stopped the recording data is sent to event_url. The range of possible values is between 3 and 10 inclusively.
      Returns:
      This builder.
    • endOnKey

      Parameters:
      endOnKey - Stop recording when a digit is pressed on the handset. Possible values are: *, # or any single digit e.g. 9
      Returns:
      This builder.
    • timeOut

      Parameters:
      timeOut - The maximum length of a recording in seconds. One the recording is stopped the recording data is sent to event_url. The range of possible values is between 3 seconds and 7200 seconds (2 hours)
      Returns:
      This builder.
    • beepStart

      Parameters:
      beepStart - Set to true to play a beep when a recording starts
      Returns:
      This builder.
    • eventUrl

      Parameters:
      eventUrl - The URL to the webhook endpoint that is called asynchronously when a recording is finished. If the message recording is hosted by Vonage, this webhook contains the URL you need to download the recording and other meta data.
      Returns:
      This builder.
    • eventUrl

      public RecordAction.Builder eventUrl(String... eventUrl)
      Parameters:
      eventUrl - The URL to the webhook endpoint that is called asynchronously when a recording is finished. If the message recording is hosted by Vonage, this webhook contains the URL you need to download the recording and other meta data.
      Returns:
      This builder.
    • eventMethod

      Parameters:
      eventMethod - The HTTP method used to make the request to eventUrl. The default value is POST.
      Returns:
      This builder.
    • split

      Parameters:
      split - Record the sent and received audio in separate channels of a stereo recording-set to SplitRecording.CONVERSATION to enable this.
      Returns:
      This builder.
    • channels

      Parameters:
      channels - The number of channels to record (maximum 32). If the number of participants exceeds channels any additional participants will be added to the last channel in file. split will be set to SplitRecording.CONVERSATION during the build process if channels is greater than 1.
      Returns:
      This builder.
    • transcription

      Set this parameter to a non-null value to transcribe the recording.
      Parameters:
      transcription - The transcription settings.
      Returns:
      This builder.
      Since:
      8.2.0
    • build

      public RecordAction build()
      Builds the RecordAction.
      Returns:
      A new RecordAction object from the stored builder options.