Skip to main content

Pause

Definition

The Pause verb is used to pause the execution of the next verb in the FlexML instructions for a specified duration.

Pause stops the next verb in the FlexML instructions from executing before the number of seconds has elapsed. The Pause verb is the same as the Wait verb.

Supported Attributes

These attributes can be used to modify the Pause verb. They are inserted as name-value pairs in the start-tag.

AttributeData TypeDescription
lengthintegerThe pause duration in seconds. Integers entered into this field must be greater than or equal to 1. The default value is 1.
minNoiseintegerThe amount of time in milliseconds when some audio is received from the other end and considered to be noise. This field and value are only applicable when noise is set to true.
minSilenceintegerThe amount of time in milliseconds where no voice or audio is received from the other end to be considered silence. This field and value are only applicable when silence is set to true.
noisebooleanDetermines whether or not noise detection is on. If set to true, Pause will end after a period of noise is detected. If set to false or there is no noise noise detected, Pause will wait the full amount of time specified in the length attribute. The default value is false.
silencebooleanDetermines whether or not silence detection is on. If set to true, Pause will end after a period of silence is detected. If set to false or there is no silence detected, Pause will wait the full amount of time specified in the length attribute. The default value is false.

Example

In this example, the called party will hear a welcome message, followed by a 15-second pause. Then the thank you message will play.

<Response>
<Say>Welcome</Say>
<Pause length="15"/>
<Say>Thank you for your time.</Say>
</Response>

Example: Pause inside Gather

This example shows Pause used inside a Gather verb.

<Response>
<Gather>
<Play>https://example.com/intro.wav</Play>
<Pause length="3"/>
<Say>Please enter your PIN.</Say>
</Gather>
</Response>

Example with Noise and Silence Detection

info

If both noise and silence are set to true, the length attribute is related to the combined length of noise and silence detected. The noise is applied before silence, the maximum length of period of waiting for silence will be calculated as the total length specified minus the period of time spent on noise detection (this will include the silence before the period of noise and the noise itself).

In this example, the calling party will hear a welcome message and will be asked to say something. After that the wait for the audio input from the calling party (with a maximum delay of 15 seconds before giving up) will start.

<Response>
<Say>Welcome</Say>
<Say>Please announce yourself</Say>
<Pause noise="true" minNoise="2000" silence="true" minSilence="2500" length="15" />
</Response>

Let's say, the calling party starts talking five seconds after the call started and speaks for four seconds. This means that waiting for the audio took nine seconds totally (five of initial silence + four of audio), the remaining time will be spent on waiting for silence, and is equal to six seconds maximum. If 2.5-seconds silence follows, the whole pause will be 11.5 seconds. After that FlexML switches to the next instructions.

Nesting Rules

  • You cannot nest other verbs or nouns within the Pause verb.
  • You can nest the Pause verb within the PreAnswer and Gather FlexML verbs.