Skip to contentSkip to navigationSkip to topbar
On this page

TwiML™ Voice: <Pause>


The <Pause> verb waits silently for a specific number of seconds. If <Pause> is the first verb in a TwiML document, Twilio will wait the specified number of seconds before picking up the call.


Verb Attributes

attributes page anchor

The <Pause> verb supports the following attributes that modify its behavior:

Attribute NameAllowed ValuesDefault Value
lengthinteger > 01 second

length

attributes-length page anchor

The 'length' attribute specifies how many seconds Twilio will wait silently before continuing on.


You can't nest any verbs within <Pause>, but you can nest the <Pause> verb within the following verbs:

  • <Gather>

Example 1: Pause

examples-1 page anchor

This example demonstrates using <Pause> to wait between two <Say> verbs.

Pause exampleLink to code sample: Pause example
1
const VoiceResponse = require('twilio').twiml.VoiceResponse;
2
3
4
const response = new VoiceResponse();
5
response.say('I will pause 10 seconds starting now!');
6
response.pause({
7
length: 10
8
});
9
response.say('I just paused 10 seconds');
10
11
console.log(response.toString());

Output

1
<?xml version="1.0" encoding="UTF-8"?>
2
<Response>
3
<Say>I will pause 10 seconds starting now!</Say>
4
<Pause length="10"/>
5
<Say>I just paused 10 seconds</Say>
6
</Response>

Example 2: Delayed pickup

examples-2 page anchor

This example demonstrates using <Pause> to delay Twilio for 5 seconds before accepting a call.

1
const VoiceResponse = require('twilio').twiml.VoiceResponse;
2
3
4
const response = new VoiceResponse();
5
response.pause({
6
length: 5
7
});
8
response.say('Hi there.');
9
10
console.log(response.toString());

Output

1
<?xml version="1.0" encoding="UTF-8"?>
2
<Response>
3
<Pause length="5"/>
4
<Say>Hi there.</Say>
5
</Response>

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.