This tutorial explains how to set up Call Interactive, a component which can be used with various IVR apps.

Overview

Call Interactive is a component that can be used by IVR applications to interact with third-party programs through web services. With the help of Call Interactive, custom software applications can control the flow of the calls through the IVR set up in their internal logic.

Call Interactive can be used in various scenarios. For instance, you can use it to:

How to set up the IVR

To be able to use the service, you must first set up an extension. To do this, simply go to the homepage of the IVR extension and follow the steps below:

  1. Click the IVR Setup button.
  2. Then click the Add context icon. If you do not want to add a new one, you may modify any of the contexts already available.
  3. Enter the management page of the new context and edit the Start action.
  4. From the drop-down list, select the actions that the IVR should execute whenever a call is processed.
  5. Choose the Call Interactive action from the list and enter the following parameters:

How it works

Here's how Call Interactive works:

Example

We will exemplify how to navigate through an IVR using a Call Interactive request to a simple PHP script. 

Configure the Script that you want to call from the IVR. For testing purposes, you can copy the following code to a file named test_callinteractive.php that can be accessed over the Web.

<?php
$req_vars = $_GET;

# Here you can add any logic you want in order to decide where to jump
$reply='<?xml version="1.0" encoding="UTF-8"?>
    <Response>
        <Jump context="Welcome" option="0" priority="1">
        </Jump>
    </Response>' ;
if ($req_vars['code']=='1'){
    $reply='<?xml version="1.0" encoding="UTF-8"?>
    <Response>
        <Jump context="Welcome" option="1" priority="1">
        </Jump>
    </Response>' ;
    }
echo $reply
?>

Configure the IVR contexts. Add the entry context named Welcome. In the Start option of the Welcome context, add the following actions:

In the 1 option of the Welcome context, add action: Play Sound ////digits/1
In the 0 option of the Welcome context, add action: Play Sound ////digits/0

Generate the IVR.

Call the IVR from a phone terminal extension.

When you hear record, press any digit. If you press digit 1, the IVR will jump to context Welcome at option 1. Otherwise, it will jump to the same context at option 1.

Here you can read more about what variables and actions are available through Call Interactive.

Tips and tricks

Don't forget to close all tags in the XML response page. To make sure the XML is OK, it is best to start with a simple XML response, like Hangup, and then modify it to process data.

Need help? Ask a question in our GetSatisfaction community.