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

<Callback/>

Introduction to <Callback> Tag in Opentact XML

The <Callback> tag in Opentact XML plays a crucial role in dynamically obtaining call flow information from a specified URL. This powerful feature allows users to customize the call handling process by fetching the call flow XML remotely.

How <Callback> Works:

When included in a Call Control XML, the <Callback> tag is used to define the URL from which Opentact should retrieve the call flow XML. This URL typically points to an endpoint that generates and returns the desired call flow instructions.

Example Usage:

<Callback url="https://api.opentact.org/rest/call_flow" />

In this example, Opentact will make a request to the specified URL (https://api.opentact.org/rest/call_flow) to fetch the call flow XML. The retrieved XML will then be processed for call handling.

Handling Errors:

The content within the <Callback> tag is primarily focused on error handling scenarios. If, for any reason, Opentact encounters issues fetching or parsing the response from the specified URL, it will execute the defined error block within the <Callback>.

Example Error Handling:

<Callback url="https://api.callify.io/opentact/callflow">
    <Error>
        <Say text="An error occurred"/>
        <Hangup/>
    </Error>
</Callback>

In this scenario, if an error occurs during the callback process, Opentact will say "An error occurred" and subsequently hang up the call.

Parameters:

The <Callback> tag can include various parameters, influencing how Opentact interacts with the specified URL. These parameters ensure flexibility and customization in the call flow retrieval process.

The <Callback> XML tab has the following parameters:

Tag Name
Required
Description

url

YES

This is the URL that Opentact will query to obtain the Dialplan XML.

body

NO

Default is false. If set to true, Opentact will include Call Control APP data in the query's body.

timeout

NO

This is the max time before Opentact will time out. If no response is received within the timeout value, Opentact will execute the <Error> block.

tag

NO

If specified, this tag value will be sent to the callback url in the tag field.

method

YES

Thid value must be one of : "POST", "GET", "PATCH" and "DELETE"

When Opentact trigger an outbound query to the callback URL, the following fields will be included:

Field Name
Description

call

Call UUID

sca

Call Control APP UUID

state

State of the Call. Most likely it is "live"

from

The caller ID of the call

tn

The number being called to

tag

This is the tag specified in the xml.

Previous<Call/>Next<Geo/>

Last updated 1 year ago

Was this helpful?