<Pause/>

Introduction to <Pause/> Tag in Opentact XML

The <Pause/> tag in Opentact XML introduces a valuable mechanism for inserting pauses within a call flow, providing developers with precise control over the timing of call-related actions. This tag allows users to temporarily suspend the call for a specified duration, enhancing the flexibility of call handling. Let's explore the key features and usage examples of the <Pause/> tag:

Basic Usage:

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <!-- The <Pause/> tag with a default length of 1 second -->
    <Pause/>
    <!-- Further call flow actions can follow here -->
</Response>

In this example, the <Pause/> tag is utilized with the default length of 1 second. It introduces a brief pause within the call flow, offering a momentary break before proceeding to subsequent actions.

Custom Pause Duration:

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <!-- The <Pause/> tag with a custom length of 5 seconds -->
    <Pause length="5000"/>
    <!-- Subsequent call flow actions -->
</Response>

Here, the <Pause/> tag is configured with a custom length of 5 seconds, extending the duration of the pause to accommodate specific requirements.

Dynamic Pauses with DTMF Input:

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Say>Leave a message after the tone or enter a # to stop recording</Say>
    <Record>
        <!-- Inserting a dynamic pause with a length of 60 seconds -->
        <Pause length="60000" dtmf_stop="#"/>
    </Record>
    <!-- Additional call flow actions -->
</Response>

In this scenario, the <Pause/> tag is incorporated within a recording operation, allowing callers to interact during the pause. The pause will last for 60 seconds unless the caller enters the specified DTMF code ("#"), enabling dynamic control over the call duration.

Additional Details:

  • The length attribute allows users to specify the duration of the pause in milliseconds. The default length is 1000 milliseconds (1 second).

  • The dtmf_stop attribute provides the option to halt the pause prematurely upon receiving specific DTMF input from the caller.

The <Pause/> tag provides a nuanced approach to managing call timing, offering versatility for creating engaging and interactive call flows tailored to specific scenarios.

Last updated