The <Wait> element waits silently for a specified number of seconds. If <Wait> is the first element in a RESTXML document, Plivo will wait the specified number of seconds before picking up the call.

Element Attributes

The <Wait> element supports the following attributes that modify its behavior:

Attribute Name Allowed Values Default Value
length integer > 0 1 second

Examples

Example 1: Simple Wait

This example demonstrates using <Wait> to wait between two <Speak> elements.

1
2
3
4
5
6
<?xml version="1.0" encoding="UTF-8" ?>
<Response>
    <Speak>I will Wait 7 seconds starting now!</Speak>
    <Wait length="7"/>
    <Speak>I just waited 7 seconds</Speak>
</Response>

Example 2: Delayed pickup

This example demonstrates using <Wait> to delay Plivo for 10 seconds before accepting a call.

1
2
3
4
5
<?xml version="1.0" encoding="UTF-8" ?>
<Response>
    <Wait length="7"/>
    <Speak>Hello.</Speak>
</Response>

Comments are closed.