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
  • Usage of <Call/> Tag:
  • Hints for <Call/> Tag:
  • Customizing Execution Blocks:
  • Dynamic Decision-Making:
  • Enhance Call-Related Workflows:

Was this helpful?

  1. Opentact XML

<Call/>

Customize Execution Blocks with <Call/> Tag in Opentact XML

The <Call/> tag in Opentact XML introduces a powerful capability to filter execution blocks based on call-related values. This feature enables you to tailor the behavior of your call-handling applications dynamically.

Usage of <Call/> Tag:

The <Call/> tag serves as a key element for executing conditional logic within Opentact XML. It allows you to selectively activate or deactivate specific sections of your call-handling workflow based on various call-related parameters.

Hints for <Call/> Tag:

The value attribute associated with the <Call/> tag is a versatile parameter that can accept values of different types. These include:

  • string

  • integer

  • float

  • null

  • boolean (true/false)

Customizing Execution Blocks:

Utilize the <Call/> tag to tailor the execution of specific blocks in your Opentact XML based on the values associated with the ongoing call. This flexibility enhances the adaptability of your call-handling applications.

Dynamic Decision-Making:

By leveraging <Call/> tags with different value types, you can dynamically decide the course of action during call execution. Whether it's routing calls, modifying responses, or triggering specific functionalities, the <Call/> tag adds a layer of intelligence to your call-handling logic.

Enhance Call-Related Workflows:

Integrate <Call/> tags into your Opentact XML to enhance the precision and responsiveness of your call-related workflows. This feature empowers you to create applications that intelligently adapt to varying call conditions.

The value attribute within the <Call/> tag opens up a spectrum of possibilities, allowing you to build sophisticated and context-aware call-handling applications.

<!-- Execute block only for a specific DNIS number -->
<Call field="to" value="18382050099">
    <Say text="Hi there!"/>
</Call>
<Say>Thanks for calling Opentact!</Say>
<Hangup/>

<!-- Execute block only for a specific ANI number -->
<Call field="from" value="+18382050099">
    <Say text="Hi there!"/>
</Call>
<Say>Thanks for calling Opentact!</Say>
<Hangup/>

<!-- Execute block for spam ANI -->
<Call field="spam" value="true" db="ftc,youmail"> 
<!-- db="ftc,youmail" is optional; by default, all databases are used -->
    <!-- Skip spam ANI calls -->
    <Hangup/>
</Call>
<Say>Thanks for calling Opentact!</Say>

<!-- Drop shaken non-signed calls -->
<Call field="attest" value="null">
    <!-- Skip STIR/SHAKEN non-signed calls -->
    <Hangup/>
</Call>
<Say>Thanks for calling Opentact!</Say>

<!-- Drop shaken signed attest < A level calls -->
<Call field="attest" condition="<" value="A">
    <!-- Drop STIR/SHAKEN signed attest < A level calls -->
    <Hangup/>
</Call>
<Say>Thanks for calling Opentact!</Say>

<!-- Execute block for STIR/SHAKEN signed level=A only calls -->
<Call field="attest" value="A">
    <Say>Hey, your call is signed with A attest level!</Say>
</Call>
<Say>Thanks for calling Opentact!</Say>
PreviousOverviewNext<Callback/>

Last updated 1 year ago

Was this helpful?