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.
The <Pause>
verb supports the following attributes that modify its behavior:
Attribute Name | Allowed Values | Default Value |
---|---|---|
length | integer > 0 | 1 second |
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:
This example demonstrates using <Pause>
to wait between two <Say>
verbs.
1const VoiceResponse = require('twilio').twiml.VoiceResponse;234const response = new VoiceResponse();5response.say('I will pause 10 seconds starting now!');6response.pause({7length: 108});9response.say('I just paused 10 seconds');1011console.log(response.toString());
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>
This example demonstrates using <Pause>
to delay Twilio for 5 seconds before accepting a call.
1const VoiceResponse = require('twilio').twiml.VoiceResponse;234const response = new VoiceResponse();5response.pause({6length: 57});8response.say('Hi there.');910console.log(response.toString());
1<?xml version="1.0" encoding="UTF-8"?>2<Response>3<Pause length="5"/>4<Say>Hi there.</Say>5</Response>