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

<Meta/>

The <Meta> sub-command is used to define custom metadata, acting as user-defined variables. These metadata values are passed to the callback URL, providing additional context or information about the call.

Examples:

Simple Examples:

<Meta name="name" value="value"/> <!-- string -->
<Meta name="is_active" value="true"/> <!-- boolean -->
<Meta name="count" value="123"/> <!-- integer -->
<Meta name="price" value="123.99"/> <!-- float -->
<Meta name="description">
  A Complex example.
  line 2
  line 3
</Meta>

Usage Example:

<Tone>
  <Meta name="category" value="music"/>
</Tone>

Attributes:

  • name (string):

    • Meta name.

  • value:

    • Meta value, which can be a string, number (integer or float), boolean, or a multiline string.

The <Meta> sub-command allows you to attach custom metadata to certain commands, enhancing the information passed to the callback URL associated with the call. This feature is useful for conveying specific details or context relevant to your application or workflow.

Suppose you have a phone directory service, and when a user calls to inquire about a contact, you want to pass additional information about the requested contact to your callback URL. You can use <Meta> to attach relevant details, such as the contact's category, company, and urgency level.

<Response>
  <Say>Please enter the contact's extension.</Say>
  <Gather>
    <!-- User enters the contact's extension -->
    <DTMF value="1234">
      <!-- Retrieve contact details from your database -->
      <Meta name="category" value="Customer Support"/>
      <Meta name="company" value="ABC Corp"/>
      <Meta name="urgency_level" value="high"/>

      <!-- Perform actions based on the contact details -->
      <Dial>
        <To>customer_support@yourcompany.com</To>
      </Dial>
    </DTMF>

    <!-- Handle cases where the entered extension is not found -->
    <Default>
      <Say>The entered extension is not valid. Please try again.</Say>
      <Hangup/>
    </Default>
  </Gather>

  <!-- Additional call flow after the Dial -->
  <Say>Thank you for using our phone directory service.</Say>
  <Hangup/>
</Response>

In this example, when a user enters the extension for a contact, <Meta> is used to attach metadata about the contact, such as its category, company, and urgency level. This information can be valuable for further processing or logging, providing a richer context to your application when handling the call.

Previous<Default/>Next<Curl/>

Last updated 1 year ago

Was this helpful?