Programming IVR Applications...

March 30, 2011

In previous posts, we’ve compared VoiceXML to HTML and discussed the similarities in the way one would develop applications with both programming languages.  Because we often make this comparison, developers who are new to building voice applications often ask for example VoiceXML code, so we’ve listed some below.  In addition we’ve included links to some other great resources for developers.

The following example comes from the W3C’s Voice Extensible Markup Language (VoiceXML) Version 2.0 specification which can be found at http://www.w3.org/TR/voicexml20/:
VoiceXML is designed for creating audio dialogs that feature synthesized speech, digitized audio, recognition of spoken and DTMF key input, recording of spoken input, telephony, and mixed initiative conversations. Its major goal is to bring the advantages of Web-based development and content delivery to interactive voice response applications.

Here are two short examples of VoiceXML. The first is the venerable “Hello World”:

<?xml version=”1.0″ encoding=”UTF-8″?>
<vxml xmlns=”http://www.w3.org/2001/vxml”
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”
xsi:schemaLocation=”http://www.w3.org/2001/vxml
http://www.w3.org/TR/voicexml20/vxml.xsd”
version=”2.0″>

<form>
<block>Hello World!</block>
</form>
</vxml>

The top-level element is <vxml>, which is mainly a container for dialogs. There are two types of dialogs: forms and menus. Forms present information and gather input; menus offer choices of what to do next. This example has a single form, which contains a block that synthesizes and presents “Hello World!” to the user. Since the form does not specify a successor dialog, the conversation ends.

Our second example asks the user for a choice of drink and then submits it to a server script:

<?xml version=”1.0″ encoding=”UTF-8″?>
<vxml xmlns=”http://www.w3.org/2001/vxml”
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”
xsi:schemaLocation=”http://www.w3.org/2001/vxml
http://www.w3.org/TR/voicexml20/vxml.xsd”
version=”2.0″>

<form>
<field name=”drink”>
<prompt>Would you like coffee, tea, milk, or nothing?</prompt>
<grammar src=”drink.grxml” type=”application/srgs+xml”/>
</field>

<block>
<submit next=”http://www.drink.example.com/drink2.asp”/>
</block>
</form>
</vxml>

A field is an input field. The user must provide a value for the field before proceeding to the next element in the form. A sample interaction is:
C (computer): Would you like coffee, tea, milk, or nothing?
H (human): Orange juice.
C: I did not understand what you said. (a platform-specific default message.)
C: Would you like coffee, tea, milk, or nothing?
H: Tea
C: (continues in document drink2.asp)

For more VoiceXML examples, please visit Plum’s developer documentation page at VoiceXML Documentation

The VoiceXML Forum is another great resource for information about the VoiceXML community.

-

1

-

IVR and Employee Happiness

March 30, 2011

Thinking more about the benefits of IVR in our daily lives, I came across a customer IVR application that was being used as a reward system for their employees.

The IVR application would quiz employees on safety habits in the workplace and report any safety hazards that occurred in the workplace. As a result, the employee would earn reward points that could be used towards a grand prize drawing or to win several other prizes.

This IVR application is a great way to boost morale for employees and to keep a safe environment in the workplace.

Just another thought on how IVR can be used to improve our daily lives.

-

3

-

The Plum IVR Scratch Pad 

May 2, 2011

Recently there’s been an emergence of new communication services that offer simple APIs and scripting languages to create basic IVR applications.  Some of these services include added features that come standard with most VoiceXML platforms including speech recognition and text-to-speech, but why do we need more scripting languages to create IVR when VoiceXML is open and so widely adopted?  Billions have been spent on R&D to create VoiceXML and it is truly the de facto open standard for IVR programing.

These services are offered under the guise of “cloud” communications and attempt to simplify IVR development.  While they do have their merits, they seem to simplify IVR by eliminating features that amount to a weak subset of VoiceXML’s functionality.  Regarding the “cloud” aspect, for years Plum’s ScratchPad has provided a facility for developers to host their VoiceXML code enabling an architecture akin to “cloud” computing.   Programmers can use the ScratchPad to develop applications using the full breadth of VoiceXML’s feature set.

For more information about IVR development and Plum’s ScratchPad, please sign up for a developer account @ IVR Development

-

1

-

IVR and Lost V

May 2, 2011

After watching the last few weeks of Lost, we see alternate timeline Desmond searching for each of the passengers on Oceanic 815.

Up to this point, he’s run into Charlie, Hugo, Ben, Locke, and Claire. However, instead of driving around Los Angeles looking for these passengers, he could just use an IVR system to track all of them down.

Imagine how much easier life would be if he set up an outbound IVR call to dial each of the passengers on that flight (although it would be difficult to get that passenger list…but he works for Charles Widmore now!). He can even use the IVR outbound system to see which of his calls were successful and which of his calls had failed.

For the calls that were successful, then great, he doesn’t have to go talk to these passengers. For the call that were unsuccessful, he could then go and do his creepy thing of following the passengers around.

Just another thought about Lost and IVR as we wind down to the end of the series.

-

3

-

Outbound IVR

March 30, 2011

TMC recently wrote an article about Plum’s new outbound IVR features.  The article can be found here: Outbound IVR

The new outbound IVR features include the following:

▪    Throttling options to control the flow and speed of outbound calls.
▪    Comprehensive downloadable reports and analytics.
▪    Advanced retry and callee detection options.
▪    If an IVR survey has reached its respondent limit, all campaigns running for that survey will be paused and the status indicated when viewing the campaign is “Max Respondents Reached”.

These features can be used to improve all outbound IVR call campaigns including:

Customer Satisfaction Surveys
Political Polling
Payment Collections
Medical Reminders
Appointment Reminders
Emergency Notifications
Prescription Refills
Travel Updates

Please feel free to sign up for a free developer or Plum Survey account at http://www.plumvoice.com/

-

1

-

IVR and Payments

March 30, 2011

Thinking about how far along we’ve come with IVR, I’ve noticed that you can now make credit card payments through an IVR system rather than having a human accept credit card payments. So, a typical IVR system might look like this when taking inputs for credit card payments:

Computer: Your total is $15.99. Please enter your credit card number.

Human: One two three four five six seven eight nine zero one two three four five six.

Computer: You entered one two three four five six seven eight nine zero one two three four five six. Is this correct? Say “Yes” if this is correct or “No” is this is incorrect.

Human: Yes.

Computer: Thank you for your payment.

By having IVR instead of a human take payments from customers, this solves 2 problems:

1) Customers can make payments whenever they want. They would no longer have to make a payment within 9:00am-5:00pm, when a human would be working.

2) IVR offers the opportunity for customers to confirm their credit card number once they enter it. For humans, there’s a slight possibility that the human will incorrectly enter a digit from the credit card number.

Just another thought about how IVR is used to improve our lives.

-

3

-

IVR and Marathon

March 30, 2011

So, today being the Boston Marathon, I thought about how useful IVR could be for an event like this. A couple of years ago, my uncle had run the Boson Marathon and I remember how difficult it was to find him after the race.

So, I thought, why not have an IVR system set up to call the family members of runners to inform them that the runner has finished the race and where the runner is now located.

This solves 2 problems:

1) Suppose the weather is cold and rainy. If the family members don’t want to wait outside the entire time, they can wait in an indoor location and head out once they receive the IVR call.

2) Runners wouldn’t have to wait long for their family members to show up. As exhausted as they might be, I’m sure they’d hate to wait for half an hour.

Just another idea of how IVR can improve our daily lives.

-

3

-

IVR and Submit

March 30, 2011

This morning, I received an IVR post on our developer forum wondering if user input contained within a <field> tag would be captured as long as the <submit> tag was used to submit the input variable to a particular document on his web server.

The answer is yes!

In general, for data transfers within an IVR application, the <submit> tag performs a GET or POST that will trigger a page transition. This means that document level variables will be lost once the new page is fetched and parsed. To preserve some of the current execution context, the <submit> tag can send document level variables as POST or GET variables to your application server script. This application server script gets parsed by your application server, which can then process variables sent to it before generating a VoiceXML document to be parsed by the VoiceXML platform to interact with the caller.

Also, just as a short IVR example to demonstrate this VoiceXML data transfer technique:

example.php:

<?php
header(”Content-type: text/xml”);
echo(”<?xml version=\”1.0\”?>\n”);
?>
<vxml version=”2.0″>
<form>
<field name=”myfield”>
<grammar type=”application/x-jsgf” mode=”dtmf voice”>
1 | 2
</grammar>
<prompt>
Please say one or two.
</prompt>
<filled>
You entered <value expr=”myfield”/>.
<submit next=”submit.php” method=”post” namelist=”myfield”/>
</filled>
</field>
</form>
</vxml>

submit.php:

<?php
header(”Content-type: text/xml”);
echo(”<?xml version=\”1.0\”?>\n”);

$myfield = $_POST[myfield];
?>

<vxml version=”2.0″>
<form>
<block>
<prompt>
We got your variable. It is <?php echo($myfield)?>.
</prompt>
</block>
</form>
</vxml>

Hope this helps you IVR developers out there.

-

3

-

Conferencing in VoiceXML?

March 30, 2011

We’re pondering a new extension to VoiceXML for our IVR platform: conferencing. We currently have it working in the lab and it works on a single server quite well. Our approach to this problem is, we believe, quite clever. We’ve introduced a new tag: <conf>. Simply specify a conference name and you’ll be connected to that conference. Anyone else who selects that same name will, in turn, be connected to the same conference. Behind the scenes, the IVR is actually doing a 32-bit hash on the name in order to come up with a unique ID with which to identify the conference. With a <conf> tag, you can blend conferencing into any call flow at any time, freely and naturally. Plus, it can be enhanced with additional audio control attributes that alter input and output volume (thus allowing you to create virtual townhall meetings) as well as timing controls to limit conference length.

-

2

-

IVR and Video Games Continue...

March 30, 2011

Just recently, I had received an IVR phone call from Gamestop stating that a game that I had pre-ordered now had a collector’s edition available for $99.99 and that it was worth buying. Even though I told myself that there’s no way I’m buying a game for that much money, I thought that the concept of using IVR to inform gamers about video games had a good effect for the following reasons:

1) Because the IVR phone call went to my phone, I’m forced to pick up my phone and listen to the message. Even if I don’t answer my phone, the IVR message from the phone call still gets stored in my voicemail.

2) I was able to remember the contents from that IVR phone call as opposed to an e-mail being sent to my Inbox with this news.

Now if only IVR could be used to remind me about buying tickets…

-

3

-