Skip to main content
The Wait element waits silently for a specified number of seconds. If <Wait> is the first element in a XML document, Vobiz will wait the specified number of seconds before picking up the call.

Attributes

length (integer) Time to wait, in seconds. Allowed values: integer greater than 0 Defaults to 1. silence (boolean) If set to true, Vobiz ends the wait and continues to the next XML element immediately if no voice or sound is detected for minSilence milliseconds. If set to false, Vobiz waits for the full length period, regardless of any sound or voice detected. Allowed values: true or false Defaults to false. minSilence (integer) The minimum duration of silence, in milliseconds, required to trigger early exit. Only used when silence is set to true. The length value must be greater than minSilence for this attribute to work as expected. Allowed values: integer > 0 Defaults to 2,000. beep (boolean) Detects a voicemail machine beep, so an application can leave a voicemail message. Only used when silence and minSilence are not active. Allowed values: true, false Defaults to false.

Nesting rules

Wait takes no child elements and no text content; it is a self-closing element (<Wait/>). It can appear as a top-level child of <Response> or nested inside PreAnswer. Wait posts no parameters of its own to any URL.

Examples

Pause before speaking

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Wait length="3"/>
    <Speak>Sorry to keep you waiting.</Speak>
</Response>

Delay answering an inbound call

When Wait is the first element, Vobiz holds the call ringing for length seconds before answering. This avoids billing the first few seconds and can deter auto-diallers.
<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Wait length="5"/>
    <Speak>Thank you for calling.</Speak>
</Response>

Exit early on silence

With silence="true", Vobiz ends the wait as soon as it detects minSilence milliseconds of quiet, up to a maximum of length seconds. Useful for waiting out a greeting before proceeding.
<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Wait length="10" silence="true" minSilence="2000"/>
    <Speak>Continuing now.</Speak>
</Response>

Leave a voicemail after the beep (AMD)

With beep="true", Vobiz waits for the answering-machine beep before continuing, so your message records after the tone. See Machine detection.
<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Wait length="15" beep="true"/>
    <Speak>Hi, this is a reminder about your appointment tomorrow at 10 AM.</Speak>
    <Hangup/>
</Response>

Edge cases and tips

  • silence and beep are mutually exclusive. beep is only evaluated when silence (and minSilence) are not active. Do not rely on both behaviors in the same Wait.
  • length must exceed minSilence. Because length is in seconds and minSilence is in milliseconds, ensure length * 1000 > minSilence, or the silence early-exit never has room to trigger.
  • First-element behavior is special. Only a leading Wait delays answering. A Wait placed after another element pauses an already-answered call.
  • Detection is best-effort. Beep and silence detection depend on audio quality and carrier behavior; always pair them with a fallback flow.