Hello. I wanna develop an IVR system in order to handle loyalty program balance queries in a more effective way. This is a kind of point collection campaign. Do you have any idea for this purpose? I would like to inform the caller after he has provided his unique customer code. Please, suggest me some solutions.

Hi,

In my opinion the easiest and most reliable solution is creating an IVR script in OzML then host it in your database, in your PBX or on a webserver. For better understanding, take a look at the following code example (it can be found at www.ozekiphone.com). This script demonstrate a very similar field of use to your needs. It explains how to develop an IVR system that can be used to query account balance information after providing your PIN code. Check it:

//*************************************************************************************/
// This file will be executed when the call is connected.
// Filename: incomingcall.php
//*************************************************************************************/
<?xml version="1.0" encoding="UTF-8"?>
<Response>
   <UserInput enteredUrl="http://yourapp.com/dtmf_received.php" 
              digits="4" timeout="10" repeat="true">
        <InitialCommands> 
            <Speak>Please enter your 4 digits PIN code.</Speak>
        </InitialCommands>
    </UserInput>
</Response>

//*************************************************************************************/
// This file will be executed when DTMF input is received.
// dtmf_received.php
//*************************************************************************************/
<?php
    $dtmfdigits = $_REQUEST['DtmfDigits'];
    $sql = mysql_query('SELECT id FROM account WHERE pincode LIKE "' . $dtmfdigits . '";');
    $row = mysql_fetch_assoc($sql);

    if(mysql_num_rows($sql) == 1) {
        $response = "<GoTo>http://yourapp.com/members_area.php?accountid=
                                       " . $row['id'] . "</GoTo>";
    }
    else {
        $response = "<UserInput enteredUrl="http://yourapp.com/dtmf_received.php" 
                                 digits="4" timeout="10" repeat="true">";
        $response .= "<InitialCommands>";
        $response .= "<Speak>";
        $response .= "The PIN code you entered is invalid. Please give it again.";
        $response .= "Please enter your 4 digits PIN code again.";
        $response .= "</Speak>";
        $response .= "</InitialCommands>";
        $response .= "</UserInput>";
    }
?>

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <?php
    echo $response;
    ?>
</Response>

//*************************************************************************************/
// This file will be executed when the PIN code is accepted.
// members_area.php
//*************************************************************************************/
<?php
    $accountid = $_REQUEST['accountid'];
    $sql = mysql_query('SELECT balance FROM account WHERE id = "' . $accountid . '";');
    $row = mysql_fetch_assoc($sql);
?>

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <UserInput Timeout="5" Repeat="true"> 
        <InitialCommands> 
            <Speak>
                The pin code you entered is verified.
                Account balance, press 1.
                To call with our customer representative, press 2.
            </Speak>
        </InitialCommands> 
        <Inputs> 
            <Input Key="1"> 
                <Speak>
                    <?php
                    echo $row['balance'];
                    ?>
                </Speak>
            </Input> 
            <Input Key="2"> 
                <BlindTransfer>2000</BlindTransfer> 
            </Input> 
        </Inputs> 
    </UserInput> 
</Response>

The code above can be found here: http://www.ozekiphone.com/ivr-with-ozml-extension-1122.html This site offers really useful further information.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.