I’ve written this article in the Tunisian PHP Magazine November 2004, and I wanted to rewrite again to introduce it in this blog, and to continue writing more articles about PHP Voice and its applications in entreprise, also developping new applications but this a second issue.

The main interest we have to join VoiceXML to PHP is to profit to the maximum from PHP advantages in the development of dynamic web applications. In this article we’ll explore a practical example of using VoiceXML with database interaction in an entreprise portal.

For this first part, I’ll try to introduce the entreprise VoiceXML server and our needs to develop this PHP VoiceXML application


The entreprise VoiceXML server

While connecting to an entreprise server the idea came to make available the latest news in the company, job offers, many useful informations that the company can offer to keep in touch with their customers, partners, or simple visitors … And we’ll start by creating a simle database that fit our needs.

In our company we’ll define :

  • Company name
  • Address
  • Telephone
  • Fax

Then we’ll try to organize services that we’re going to offer
via voice by category :

  • Latest company news
  • products gallery
  • job offers
  • events calendar

Categories will be filled with content something like :

  • We have recently established partnership with company ABC
    to develop our product XYZ
  • Product PROD description, features …
  • Looking for sales manager : We’re looking for a sales
    manager with x years experience …
  • EXPO 2005 : Visit our stand in EXPO 2005 …

This information portal, will allow the company to expose via
a vocal
portal all necessary and useful informations for
their clients, partners and others. The interface can probably allow shopping
online, technical support for customers … but in our case we’ll just limit to
the information portal.

Database architecture

We’ll use in our application two main tables, a very simple structure that we’ll see how we will use it later

CREATE TABLE `services` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;
CREATE TABLE `content` (
`id` int(4) NOT NULL auto_increment,
`title` varchar(255) NOT NULL default '',
`content` mediumtext NOT NULL,
`service` int(11) NOT NULL default '0',
`adddate` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;

And we can very easily write an administration area to manage this database.

As you can see in this part I just wanted to introduce the application, where and how we’ll use it. The structure is very simple but could have many other usage depending on the company needs. Verily an administration frontend to the database will give more ideas.