CallMediaRecognizeDtmfOptions Class

public final class CallMediaRecognizeDtmfOptions
extends CallMediaRecognizeOptions

The Recognize configurations specific for Dtmf.

Constructor Summary

Constructor Description
CallMediaRecognizeDtmfOptions(CommunicationIdentifier targetParticipant, int maxTonesToCollect)

Initializes a CallMediaRecognizeDtmfOptions object.

Method Summary

Modifier and Type Method and Description
static CallMediaRecognizeDtmfOptions fromJson(JsonReader jsonReader)

Reads an instance of CallMediaRecognizeDtmfOptions from the JsonReader.

Duration getInterToneTimeout()

Get the interToneTimeout property: Time to wait between DTMF inputs to stop recognizing.

Integer getMaxTonesToCollect()

Get the maxTonesToCollect property: Maximum number of DTMFs to be collected.

List<DtmfTone> getStopTones()

Get the stopTones property: List of tones that will stop recognizing.

CallMediaRecognizeDtmfOptions setInitialSilenceTimeout(Duration initialSilenceTimeout)

Set the initialSilenceTimeout property: Time to wait for first input after prompt (if any).

CallMediaRecognizeDtmfOptions setInterruptCallMediaOperation(Boolean interruptCallMediaOperation)

Set the interruptCallMediaOperation property: If set recognize can barge into other existing queued-up/currently-processing requests.

CallMediaRecognizeDtmfOptions setInterruptPrompt(Boolean interruptPrompt)

Set the interruptPrompt property: Determines if we interrupt the prompt and start recognizing.

CallMediaRecognizeDtmfOptions setInterToneTimeout(Duration interToneTimeout)

Set the interToneTimeout property: Time to wait between DTMF inputs to stop recognizing.

CallMediaRecognizeDtmfOptions setOperationContext(String operationContext)

Set the operationContext property: The value to identify context of the operation.

CallMediaRecognizeDtmfOptions setPlayPrompt(PlaySource playPrompt)

Set the playPrompt property: The source of the audio to be played for recognition.

CallMediaRecognizeDtmfOptions setRecognizeInputType(RecognizeInputType recognizeInputType)

Set the recognizeInputType property: Determines the type of the recognition.

CallMediaRecognizeDtmfOptions setStopCurrentOperations(Boolean stopCurrentOperations)

Set the stopCurrentOperations property: If set recognize can barge into other existing queued-up/currently-processing requests.

CallMediaRecognizeDtmfOptions setStopTones(List<DtmfTone> stopDtmfTones)

Set the stopTones property: List of tones that will stop recognizing.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from CallMediaRecognizeOptions

Methods inherited from java.lang.Object

Constructor Details

CallMediaRecognizeDtmfOptions

public CallMediaRecognizeDtmfOptions(CommunicationIdentifier targetParticipant, int maxTonesToCollect)

Initializes a CallMediaRecognizeDtmfOptions object.

Parameters:

targetParticipant - Target participant of DTFM tone recognition.
maxTonesToCollect - Maximum number of DTMF tones to be collected.

Method Details

fromJson

public static CallMediaRecognizeDtmfOptions fromJson(JsonReader jsonReader)

Reads an instance of CallMediaRecognizeDtmfOptions from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of CallMediaRecognizeDtmfOptions if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the CallMediaRecognizeDtmfOptions.

getInterToneTimeout

public Duration getInterToneTimeout()

Get the interToneTimeout property: Time to wait between DTMF inputs to stop recognizing. If left unspecified, the default value is set to 2 seconds.

Returns:

the interToneTimeout value.

getMaxTonesToCollect

public Integer getMaxTonesToCollect()

Get the maxTonesToCollect property: Maximum number of DTMFs to be collected.

Returns:

the maxTonesToCollect value.

getStopTones

public List<DtmfTone> getStopTones()

Get the stopTones property: List of tones that will stop recognizing.

Returns:

the stopTones value.

setInitialSilenceTimeout

public CallMediaRecognizeDtmfOptions setInitialSilenceTimeout(Duration initialSilenceTimeout)

Set the initialSilenceTimeout property: Time to wait for first input after prompt (if any).

Overrides:

CallMediaRecognizeDtmfOptions.setInitialSilenceTimeout(Duration initialSilenceTimeout)

Parameters:

initialSilenceTimeout - the initialSilenceTimeout value to set.

Returns:

the CallMediaRecognizeDtmfOptions object itself.

setInterruptCallMediaOperation

public CallMediaRecognizeDtmfOptions setInterruptCallMediaOperation(Boolean interruptCallMediaOperation)

Set the interruptCallMediaOperation property: If set recognize can barge into other existing queued-up/currently-processing requests.

Overrides:

CallMediaRecognizeDtmfOptions.setInterruptCallMediaOperation(Boolean interruptCallMediaOperation)

Parameters:

interruptCallMediaOperation - the interruptCallMediaOperation value to set.

Returns:

the CallMediaRecognizeDtmfOptions object itself.

setInterruptPrompt

public CallMediaRecognizeDtmfOptions setInterruptPrompt(Boolean interruptPrompt)

Set the interruptPrompt property: Determines if we interrupt the prompt and start recognizing.

Overrides:

CallMediaRecognizeDtmfOptions.setInterruptPrompt(Boolean interruptPrompt)

Parameters:

interruptPrompt - the interruptPrompt value to set.

Returns:

the CallMediaRecognizeDtmfOptions object itself.

setInterToneTimeout

public CallMediaRecognizeDtmfOptions setInterToneTimeout(Duration interToneTimeout)

Set the interToneTimeout property: Time to wait between DTMF inputs to stop recognizing.

Parameters:

interToneTimeout - the interToneTimeout value to set.

Returns:

the DtmfConfigurationsInternal object itself.

setOperationContext

public CallMediaRecognizeDtmfOptions setOperationContext(String operationContext)

Set the operationContext property: The value to identify context of the operation.

Overrides:

CallMediaRecognizeDtmfOptions.setOperationContext(String operationContext)

Parameters:

operationContext - the operationContext value to set.

Returns:

the CallMediaRecognizeDtmfOptions object itself.

setPlayPrompt

public CallMediaRecognizeDtmfOptions setPlayPrompt(PlaySource playPrompt)

Set the playPrompt property: The source of the audio to be played for recognition.

Overrides:

CallMediaRecognizeDtmfOptions.setPlayPrompt(PlaySource playPrompt)

Parameters:

playPrompt - the playPrompt value to set.

Returns:

the CallMediaRecognizeDtmfOptions object itself.

setRecognizeInputType

public CallMediaRecognizeDtmfOptions setRecognizeInputType(RecognizeInputType recognizeInputType)

Set the recognizeInputType property: Determines the type of the recognition.

Overrides:

CallMediaRecognizeDtmfOptions.setRecognizeInputType(RecognizeInputType recognizeInputType)

Parameters:

recognizeInputType - the recognizeInputType value to set.

Returns:

the CallMediaRecognizeDtmfOptions object itself.

setStopCurrentOperations

public CallMediaRecognizeDtmfOptions setStopCurrentOperations(Boolean stopCurrentOperations)

Set the stopCurrentOperations property: If set recognize can barge into other existing queued-up/currently-processing requests.

Overrides:

CallMediaRecognizeDtmfOptions.setStopCurrentOperations(Boolean stopCurrentOperations)

Parameters:

stopCurrentOperations - the stopCurrentOperations value to set.

Returns:

the CallMediaRecognizeDtmfOptions object itself.

setStopTones

public CallMediaRecognizeDtmfOptions setStopTones(List<DtmfTone> stopDtmfTones)

Set the stopTones property: List of tones that will stop recognizing.

Parameters:

stopDtmfTones - the stopTones value to set.

Returns:

the CallMediaRecognizeDtmfOptions object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to