Page tree

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:

  • Integrate with Customer Support applications: The customer provides a subscription ID over the phone, which is verified by the remote logic; based on the result, the customer may be directed to a call queue.
  • Integrate with phone payment applications: The customer provides information on the billing format they prefer; the remote software application processes the request and answers with text-to-speech or pre-recorded files, based on the result of the call.
  • Make a transfer to a specific resource based on the customer behavior: Based on the customer walk through the IVR, a remote application can decide the steps the customer must take over the phone.

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:
    • Request method - The HTTP method is recommended for sending the request (only POST and GET are available).
    • Request ID - The unique identifier of the request, useful for reference only.
    • Make request to - The URL called by the IVR. This URL points to a script that sends back a response in XML format at the end of the execution. The response is optional.

How it works

Here's how Call Interactive works:

  • The user calls the IVR
  • The IVR answers; depending on the setup, it may remember the user input
  • The IVR processes the user's request and calls a predefined URL; this URL contains some variables retrieved from the IVR and may containthe user input
  • The script represented by the URL executes its logic and outputs the response in an XML format
  • The XML response is then parsed by the IVR and the actions are executed

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:

  • Play Sound welcome
  • Record 1 digits to variable code Stop recording after 9 seconds of inactivity. Play before starting recording ////dictate/record

  • Call Interactive:
  • Request Method - GET
  • Make request to - must be set to an URL of the following form: http://<ip|host>/<PATH_TO_TEST_SCRIPT>/test_callinteractive.php?code=$code

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.

#trackbackRdf ($trackbackUtils.getContentIdentifier($page) $page.title $trackbackUtils.getPingUrl($page))
  • No labels

Except where otherwise noted, content in this space is licensed under a Creative Commons Attribution 4.0 International.