Rate this page:

Events

Add the following line to your scenario code to use the events:

require(Modules.AI);

Constants

DialogflowError

Copy URL

Event is triggered when a Dialogflow instance causes error.

Parameters

  • cause:

    string

    The cause of the event

  • Link to the Dialogflow instance

DialogflowPlaybackFinished

Copy URL

The event is triggered when a playback of a single phrase has finished successfully or in case of playback error.

Parameters

DialogflowPlaybackMarkerReached

Copy URL

The event is triggered when DialogflowInstance.addMarker is reached.

Parameters

DialogflowPlaybackStarted

Copy URL

Dialogflow playback started The event is triggered when a playback of a single phrase has started.

Parameters

  • Link to the Dialogflow instance

  • duration:

    number

    Playback duration

DialogflowQueryResult

Copy URL

Event is triggered when a Dialogflow instance returns a query result.

Parameters

DialogflowRecognitionResult

Copy URL

Event is triggered when a Dialogflow instance returns a recognition result.

Parameters

  • Link to the Dialogflow instance

  • isFinal:

    boolean

    The default of 0.0 is a sentinel value indicating confidence was not set. If it's false, the StreamingRecognitionResult represents an interim result that may change. If it's true, the recognizer will not return any further hypotheses about this piece of the audio.

DialogflowResponse

Copy URL

Event is triggered when a Dialogflow instance returns an intent response.

Parameters

DialogflowStopped

Copy URL

Event is triggered when a Dialogflow instance was stopped.

Parameters

  • cause:

    string

    The cause of the event

  • Link to the Dialogflow instance

VoicemailDetected

Copy URL

Event is triggered when an answering machine or voicemail is detected.

Parameters

  • call:

    Call

    Call that triggered the event

  • confidence:

    number

    Recognition confidence. Values range from 0 (completely uncertain) to 100 (completely certain). The value is not guaranteed to be accurate, consider it while handling the event.

VoicemailNotDetected

Copy URL

Event is triggered when an answering machine or voicemail is not detected.

Parameters

  • call:

    Call

    Call that triggered the event