<Pause>
<Pause>
the current execution for a few seconds.
Join our Discord community - we're here to help.
Description
The <Pause>
verb waits silently for a specific number of seconds.
Example
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Say>Welcome to Cloudonix!</Say>
<Pause length="5"/>
<Say>I just waited for 5 seconds, where were you?</Say>
</Response>
Attributes
The following attributes are supported:
Attribute Name | Allowed Values | Default Value |
---|---|---|
answer | true , false | false |
length | a number that equal to 0 or greater | 1 |
If <Pause>
is the first verb in a the first CXML application in a session, the Cloudonix platform
will not answer the call until after the <Pause>
has ended, and the wait time will not be considered in
the session's billable time - as reported in the call data record.
This behavior can be overridden by setting the answer
attribute.
Attribute: answer
Set to true
to have the call answered before pausing.
When the <Pause>
verb is run before the call was answered (i.e. before the Cloudonix platform has sent
a SIP 200 OK message to the caller) - for example when it is the first verb of the first CXML application in a session,
then the <Pause>
verb will not cause the call to be answered and instead the application will wait in the "early media"
stage - i.e. the "ringing" status.
This time will be reported in the call data record as part of the duration
for the session (the total time the
Cloudonix platform handled the call) but not as part of the billsec
value for the session (the total "billable time"
of the session).
For example, <Pause>
can be used to introduce a pause before answering in voicemail system, to let a caller
hangup if they are not interested in leaving a message:
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Say answer="false">You have reached the voicemail for 888-5555. Please hangup if you are not going to leave a message.</Say>
<Pause length="3"/>
<Record action="https://voicemail.example.com/voicemail-recording"></Record>
<Say>Thank you for leaving a message</Say>
</Response>
In this example, neither the <Say>
verb nor the <Pause>
verb have answered the call, instead the <Record>
verb
answered the call (and by default causes a beep to be played before starting to record). The call's "billable time"
was from the time <Record>
started until after the second <Say>
ended.