Opentact
  • Opentact Introduction
  • KEY CONCEPTS
    • Basic Concept
      • Voice Capability
        • Managing Inbound Calls
      • SMS Capability
      • Number Capability
    • Phone Number
      • Voice Enablement
      • SMS Enablement
      • TN Profile
        • Blacklist Caller ID
        • Whitelist Caller ID
    • SIP Control APP
      • Specify Remote Call Control URL
      • Specify Dialplan XML
    • SIP Trunking
    • Messaging
      • Quick Start Guide
      • Prepare Phone Numbers for SMS
    • SIP Connection
      • Associate SIP Connection with Phone Number
    • SIP Domain
      • Send Outbound Call with SIP Domain
      • Receive Inbound Call to SIP User
        • Web Call
        • Zoiper SIP Client
    • SIP Users
      • Create a SIPUser
      • Create a SIPUserInvite
    • Telecom Data
  • Opentact API Documentation
    • Opentact API Integration
      • API Environment
      • Opentact API keys
      • Passing Authentication
      • Authentication API
        • Example API Call
        • Authentiction with Gmail
    • TN Profile
      • Add and Remove Blacklist to TN Profile
        • Example API Call
      • Add and Remove Whitelist to TN Profile
        • Example API Call
    • Phone Number
      • Order Phone Number
        • Example API Usage
      • Release a Number
        • Example API Usage
      • Get all Purchased Numbers
      • Number Search
        • Example API Usage
    • SIP Connection
      • Remove Number from SIP Connection
      • Get Number for a SIP Connection
      • Update SIP Connections
      • Create SIP Conenctions
      • Delete SIP Connections
      • List SIP Connections
      • Assign Number to a SIP Connection
    • Messaging
      • Enable SMS on Numbers
      • Disable SMS on Number
      • Send SMS with Pool
      • Send SMS with Number
      • Receiving SMS
      • Retrieve Message Detail Records
      • Receiving Messaging Events
    • Log Retrieval
      • Retrieve Call Log
      • Retrieve SMS Log
    • Calling
      • Bridge two calls
      • Make Single Call
      • Make Bulk Call
        • Example API Call
    • SIP Domain
      • Create SIP Domain
      • Create SIP User
      • Deleting SIP User
      • Modify SIP User
    • Websocket Event Subscription
      • Create Subscription
      • Remove Subscription
      • Get Subscribed Events
        • Example API Call
  • Websocket Events
    • Event Websocket
    • Websocket Authentication
      • How to Authenticate to WSS
      • Authentication Response
      • Explanation of JSON response
    • Event Definition
      • Call Initiated
        • Example Event
      • Call Ringing
        • Example Event
      • Call Live
        • Example Event
      • Callflow
        • Example Event
      • Call Hangup
        • Example Event
      • Call Destroyed
        • Example Event
      • Call Bridged
        • Example Event
      • Call Answered
        • Example Event
      • Account events
        • Example Event
      • SMS events
        • Example Event
      • TN events
        • Example Event
      • Record Events
        • Example Event
      • Transcript
        • Example Event
      • General Event Fields
      • Example Event
  • Opentact XML
    • Overview
    • <Call/>
    • <Callback/>
    • <Geo/>
    • <Scheduler/>
    • <Play/>
    • <Say/>
    • <Hangup/>
    • <Pause/>
    • <Record/>
    • </Dial>
    • </Gather>
    • <Answer/>
    • <Hold/>
    • <Tone/>
    • <Error/>
    • <Default/>
    • <Meta/>
    • <Curl/>
  • How to build your Opentact Application
    • Introduction
    • Inbound Call Control
    • Opentact Events
    • Call Flow Control
      • Specify CallFlow for TN
        • Dynamic Call Flow XML
        • Basic Workflow
      • Handle Inbound Call
    • Send and Receive SMS
      • Life Cycle of SMS Delivery
      • Real-time SMS over Websocket
      • Send SMS via Restful API
    • Send and Receive SIP Calls
      • Create SIP User
      • Make Calls Between SIP User
      • Receive Calls as SIP User
  • Regulatory Compliance
    • 10DLC FAQs
    • Stir Shaken
  • SIP Trunking
    • Use Opentact for SIP Trunking
  • Webhook Event
    • Introduction
    • Test Webhook with Opentact
    • Event Definition
Powered by GitBook
On this page

Was this helpful?

  1. Opentact XML

<Record/>

Opentact XML: Recording Live Calls

The <Record/> tag in Opentact XML provides powerful capabilities for recording live calls, enabling developers to capture and manage audio content dynamically. Below, we'll explore the key attributes and usage examples associated with the <Record/> tag, as well as related commands such as <RecordStart/>, <RecordStop/>, and <RecordWait/>.

`<Record/> Tag Overview:**

The <Record/> tag facilitates the recording of live calls, offering developers the ability to customize recording settings and interact with the recorded content. Here are key attributes and usage examples:

Basic Usage:

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <!-- Record a name and play it back -->
    <Say text="Say your name"/>
    <Record tag="name1"/>
    <Pause length="3000"/>
    <Play record="name1"/>
    <!-- Additional call flow actions -->
</Response>

In this example, the <Record/> tag is used to prompt the caller to say their name, record the input, introduce a brief pause, and then play back the recorded name.

Voice-to-Text Transcription:

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <!-- Enable voice-to-text transcription during recording -->
    <Record asr="true">
        <!-- Additional call flow actions -->
    </Record>
    <!-- Further call flow actions -->
</Response>

Here, the <Record/> tag is configured with the asr attribute set to "true," enabling voice-to-text transcription during the recording process.

Custom Timeout:

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <!-- Record with a custom timeout of 45 seconds -->
    <Record timeout="45000">
        <!-- Additional call flow actions -->
    </Record>
    <!-- Further call flow actions -->
</Response>

The timeout attribute allows users to set a custom wait time for the recording operation, ensuring flexibility in managing call recording duration.

`<RecordStart/> Command:**

The <RecordStart/> command initiates call recording, and developers can associate it with specific tags for identification. This command works seamlessly with related tags like <RecordWait/>.

Example:

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Say>hello there</Say>

    <!-- Start call recording with the tag "voicemail1" -->
    <RecordStart tag="voicemail1"/>
    <Pause length="10000"/>
    
    <!-- Wait for the recording to complete -->
    <RecordWait tag="voicemail1"/>
    
    <!-- Play back the recorded content -->
    <Play record="voicemail1" />

    <Say>goodbye</Say>
    <Hangup/>
</Response>

In this example, the <RecordStart/> command initiates recording with the tag "voicemail1," followed by a pause, waiting for the recording to complete before playing it back.

`<RecordStop/> Command:**

The <RecordStop/> command instructs Opentact to stop an ongoing call recording. Developers can use it in conjunction with related tags for seamless integration.

Example:

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Say>hello there</Say>

    <!-- Start call recording with the tag "voicemail1" -->
    <RecordStart tag="voicemail1"/>
    <Pause length="10000"/>
    
    <!-- Stop the ongoing recording -->
    <RecordStop tag="voicemail1"/>
    
    <!-- Play back the recorded content -->
    <Play record="voicemail1" />

    <Say>goodbye</Say>
    <Hangup/>
</Response>

In this scenario, the <RecordStop/> command is employed to halt the ongoing recording associated with the tag "voicemail1."

`<RecordWait/> Command:**

The <RecordWait/> command allows Opentact to wait for a call recording to complete before proceeding with subsequent actions.

Example:

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Say>hello there</Say>

    <!-- Start call recording with the tag "voicemail1" -->
    <RecordStart tag="voicemail1"/>
    <Pause length="10000"/>
    
    <!-- Wait for the recording to complete -->
    <RecordWait tag="voicemail1"/>
    
    <!-- Play back the recorded content -->
    <Play record="voicemail1" />

    <Say>goodbye</Say>
    <Hangup/>
</Response>

Here, the <RecordWait/> command ensures that the call flow pauses until the associated recording, tagged as "voicemail1," is finished.

These recording-related tags provide a robust set of tools for managing call recordings within Opentact XML, offering customization and flexibility in handling audio content during live calls.

Previous<Pause/>Next</Dial>

Last updated 1 year ago

Was this helpful?