RecordAction class

Action builder class designed to simplify building record actions.

Constructors

RecordAction(CallSession)

Creates a new instance of the action builder.

Methods

initialSilenceTimeoutInSeconds(number)

Maximum initial silence allowed before the recording is stopped. The default value is 5 seconds.

maxDurationInSeconds(number)

Maximum duration of recording. The default value is 180 seconds.

maxSilenceTimeoutInSeconds(number)

Maximum silence allowed after the speech is detected. The default value is 5 seconds.

playBeep(boolean)

Indicates whether to play beep sound before starting a recording action.

playPrompt(IAction | IIsAction)

A prompt to be played before the recording.

recordingFormat(string)

The format expected for the recording. The RecordingFormat enum describes the supported values. The default value is “wma”.

stopTones(string[])

Stop digits that user can press on dial pad to stop the recording.

toAction()

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

action

IAction | IIsAction

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[]

Returns

toAction()

Returns the JSON object for the action.

function toAction()

Returns