Class CallMediaRecognizeDtmfOptions

java.lang.Object
com.azure.communication.callautomation.models.CallMediaRecognizeOptions
com.azure.communication.callautomation.models.CallMediaRecognizeDtmfOptions
All Implemented Interfaces:
com.azure.json.JsonSerializable<CallMediaRecognizeOptions>

public final class CallMediaRecognizeDtmfOptions extends CallMediaRecognizeOptions
The Recognize configurations specific for Dtmf.
  • 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

    • 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.
    • 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.
    • 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.
    • 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.
    • setRecognizeInputType

      public CallMediaRecognizeDtmfOptions setRecognizeInputType(RecognizeInputType recognizeInputType)
      Set the recognizeInputType property: Determines the type of the recognition.
      Overrides:
      setRecognizeInputType in class CallMediaRecognizeOptions
      Parameters:
      recognizeInputType - the recognizeInputType 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:
      setPlayPrompt in class CallMediaRecognizeOptions
      Parameters:
      playPrompt - the playPrompt 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:
      setInterruptCallMediaOperation in class CallMediaRecognizeOptions
      Parameters:
      interruptCallMediaOperation - the interruptCallMediaOperation 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:
      setStopCurrentOperations in class CallMediaRecognizeOptions
      Parameters:
      stopCurrentOperations - the stopCurrentOperations value to set.
      Returns:
      the CallMediaRecognizeDtmfOptions object itself.
    • setOperationContext

      public CallMediaRecognizeDtmfOptions setOperationContext(String operationContext)
      Set the operationContext property: The value to identify context of the operation.
      Overrides:
      setOperationContext in class CallMediaRecognizeOptions
      Parameters:
      operationContext - the operationContext 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:
      setInterruptPrompt in class CallMediaRecognizeOptions
      Parameters:
      interruptPrompt - the interruptPrompt value to set.
      Returns:
      the CallMediaRecognizeDtmfOptions object itself.
    • setInitialSilenceTimeout

      public CallMediaRecognizeDtmfOptions setInitialSilenceTimeout(Duration initialSilenceTimeout)
      Set the initialSilenceTimeout property: Time to wait for first input after prompt (if any).
      Overrides:
      setInitialSilenceTimeout in class CallMediaRecognizeOptions
      Parameters:
      initialSilenceTimeout - the initialSilenceTimeout value to set.
      Returns:
      the CallMediaRecognizeDtmfOptions object itself.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Throws:
      IOException
    • fromJson

      public static CallMediaRecognizeDtmfOptions fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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.