RecordAction class
Action builder class designed to simplify building record actions.
Constructors
Record |
Creates a new instance of the action builder. |
Methods
initial |
Maximum initial silence allowed before the recording is stopped. The default value is 5 seconds. |
max |
Maximum duration of recording. The default value is 180 seconds. |
max |
Maximum silence allowed after the speech is detected. The default value is 5 seconds. |
play |
Indicates whether to play beep sound before starting a recording action. |
play |
A prompt to be played before the recording. |
recording |
The format expected for the recording. The RecordingFormat enum describes the supported values. The default value is “wma”. |
stop |
Stop digits that user can press on dial pad to stop the recording. |
to |
Returns the JSON object for the action. |
Constructor Details
RecordAction(CallSession)
Creates a new instance of the action builder.
new RecordAction(session?: CallSession)
Parameters
- session
- CallSession
Method Details
initialSilenceTimeoutInSeconds(number)
Maximum initial silence allowed before the recording is stopped. The default value is 5 seconds.
function initialSilenceTimeoutInSeconds(time: number)
Parameters
- time
-
number
Returns
maxDurationInSeconds(number)
Maximum duration of recording. The default value is 180 seconds.
function maxDurationInSeconds(time: number)
Parameters
- time
-
number
Returns
maxSilenceTimeoutInSeconds(number)
Maximum silence allowed after the speech is detected. The default value is 5 seconds.
function maxSilenceTimeoutInSeconds(time: number)
Parameters
- time
-
number
Returns
playBeep(boolean)
Indicates whether to play beep sound before starting a recording action.
function playBeep(flag: boolean)
Parameters
- flag
-
boolean
Returns
playPrompt(IAction | IIsAction)
A prompt to be played before the recording.
function playPrompt(action: IAction | IIsAction)
Parameters
Returns
recordingFormat(string)
The format expected for the recording. The RecordingFormat enum describes the supported values. The default value is “wma”.
function recordingFormat(fmt: string)
Parameters
- fmt
-
string
Returns
stopTones(string[])
Stop digits that user can press on dial pad to stop the recording.
function stopTones(dtmf: string[])
Parameters
- dtmf
-
string[]