Package com.vonage.client.voice.ncco
Class RecordAction.Builder
java.lang.Object
com.vonage.client.voice.ncco.RecordAction.Builder
- Enclosing class:
RecordAction
Builder for a RecordAction. All fields are optional.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the RecordAction.endOnSilence(Integer endOnSilence) eventMethod(EventMethod eventMethod) eventUrl(Collection<String> eventUrl) format(RecordingFormat format) split(SplitRecording split) transcription(TranscriptionSettings transcription) Set this parameter to a non-null value to transcribe the recording.
-
Method Details
-
format
- Parameters:
format- Record the Call in a specificRecordingFormat.The default value is
RecordingFormat.MP3, orRecordingFormat.WAVwhen recording more than 2 channels.- Returns:
- This builder.
-
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
- 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 toSplitRecording.CONVERSATIONto 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.splitwill be set toSplitRecording.CONVERSATIONduring 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
Builds the RecordAction.- Returns:
- A new RecordAction object from the stored builder options.
-