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. How to build your Opentact Application
  2. Call Flow Control
  3. Specify CallFlow for TN

Basic Workflow

PreviousDynamic Call Flow XMLNextHandle Inbound Call

Last updated 1 year ago

Was this helpful?

Inside Call APP, You can see the following list of entries.

Then, you can click on Call Flow XML button on the top:

Each SIP Control APP has a default XML built-in. This built-in XML document is a basic reference call flow XML that you can use as a base line and start to modify.

How to test Call Flow

In the Call Control APP, click on "Numbers".

You can specify a number to be associated with this SIP Control APP:

Then, you can call this number and you should hear an IVR as below:

IVR Example with Opentact

To experience an Interactive Voice Response (IVR) system with Opentact, you can call the provided number. Upon calling, you will hear a customized IVR flow outlined in the following XML:

xmlCopy code<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Say>Thank you for calling Opentact.</Say>
    <Record />
    
    <!-- <Gather numDigits="2" attempts="2" timeout="10000" finishOnKey="*" callback="https://webhook.site/8b27856b-b16b-4933-8be2-befcd24932f6"/> -->
    
    <Gather numDigits="1" attempts="2" timeout="10000" finishOnKey="*">
        <Say>Now please enter 1 for man, 2 for woman.</Say>
        
        <Switch>
            <Case dtmf="1">
                <Say>Hi, man</Say>
                <Callback url="https://webhook.site/8b27856b-b16b-4933-8be2-befcd24932f6"/>
            </Case>
            
            <Case dtmf="2">
                <Say>Hi, woman</Say>
                <Dial>
                    <Sip>1000@192.99.10.113:9000</Sip>
                </Dial>
            </Case>
            
            <Default>
                <Say>Hi, nobody</Say>
                <Callback method="post" url="https://webhook.site/8b27856b-b16b-4933-8be2-befcd24932f6" />
            </Default>
            
            <Error>
                <Say>No DTMF code entered.</Say>
            </Error>
        </Switch>
    </Gather>
    
    <Hangup />
    <!--  <Redirect>${url}</Redirect>-->
    <!--  <Reject />-->
</Response>

Explanation:

  • The call begins with a greeting, thanking the caller for reaching Opentact.

  • A recording feature is initiated, allowing the system to capture any relevant information.

  • A <Gather> block is employed to collect DTMF input. In this case, the caller is prompted to enter '1' for a man or '2' for a woman.

  • A <Switch> statement evaluates the entered DTMF code and directs the call accordingly:

    • If '1' is pressed, Opentact responds with "Hi, man" and triggers a callback to a specified webhook.

    • If '2' is pressed, Opentact responds with "Hi, woman" and initiates a SIP call to the specified SIP address.

    • If neither '1' nor '2' is entered, Opentact responds with "Hi, nobody" and sends a callback with a POST request to a webhook.

  • An <Error> block handles cases where no DTMF code is entered, providing appropriate feedback.

  • The call concludes with a <Hangup> command.

Feel free to interact with the IVR by entering the specified DTMF codes and observing the corresponding actions.