Skip to Content
Author's profile photo Ferry Gunawan

Build an Interactive Voice Response (IVR) System connected to SAP HANA – Part 1

On the first part of this blog post, I would like to walk through how to build an IVR (Interactive Voice Response) system that is connected to SAP HANA Database or ODATA service. IVR is an automated telephony system that interacts with the callers, gathers information and routes calls to the appropriate recipient.

For the demo, we will make a call to the hotline (IVR) number to inquiry on the amount of the net value. The system will ask you to type the 8 digit billing document number. Once you have entered the number, if the record is exist, the system will tell you the net value.

/wp-content/uploads/2014/07/2_499120.jpg

Required Components

Software:

Hardware:

Preparing the PBX Server


We will be using a Raspberry Pi as an IVR server.

  1. Download the latest image of Asterisk from http://www.raspberry-asterisk.org/downloads/ and write it to the SD card.
    I am using the below version:
    /wp-content/uploads/2014/07/1_499124.jpg
    Once you have written the SD card, boot it up and run this command on the console to update with the latest components:

    raspbx-upgrade

  2. Configure the static IP-address.
    Edit the file /etc/network/interface by typing the following command:

    nano /etc/network/interfaces

    Remove the following line:

    iface eth0 inet dhcp

    And add the following lines:

    iface eth0 inet staticaddress 192.168.0.12
    netmask 255.255.255.0
    gateway 192.168.0.1
    dns-nameservers 192.168.0.1


    Update those numbers highlighted in blue with your IP address. And finally run the following command to restart the network service:

    service networking restart

  3. Installing IncrediblePBX

    Execute the following  command on the Raspberry Pi console:

    cd /
    wget http://incrediblepbx.com/incrediblepbx11-raspbx.gz
    gunzip incrediblepbx11-raspbx.gz
    chmod +x incrediblepbx11-raspbx./incrediblepbx11-raspbx

    It takes about 15~30 minutes to complete. It will ask you to reset all the root password, the FreePBX  and ARI admin password, the extension 701 password, the extension 701 voicemail password, the email delivery address for extension 701 and the telephone reminders password for scheduling reminders by phone. Please proceed to reset all the password.

Installing Node.JS


Just to ensure the Raspberry Pi is up to date and ready to go, please execute the following commands:


sudo apt-get upgrade

sudo apt-get update

Download the latest version of Node.JS:

sudo wget http://node-arm.herokuapp.com/node_latest_armhf.deb

Install it:

sudo dpkg -i node_latest_armhf.deb

Check if the installation is successful by typing the following command:

node -v

You will see the version if the installation is successful, for my case is:

v0.10.29

Installing SAP HANA Database Client for Node

/wp-content/uploads/2014/07/npm_499125.png

The next step that we are going to perform is to install the JavaScript client for node to connect to the SAP HANA database and execute the SQL query.


In the Raspberry Pi console, type the following command:


git clone https://github.com/SAP/node-hdb.git

cd node-hdb

npm install


Setup the Voice Modem Gateway

Setting-up the voice modem gateway Linksys SPA3102 is pretty much simple.

The main important point here is the connection to the IVR server (Raspberry Pi). I will touch in more detail in the Part 2.

The Line port connected to the RJ-11 in the DSL/Cable Modem router. The Phone port connected to your analog phone and the Internet port connected to the DSL/Cable Modem router.

Slide2.JPG

That’s all for Part 1.  We will continue on the Part 2 to perform the following:

  • Configure Linksys SPA3102 voice modem gateway in order to connect to the IVR server.
  • Create and setup the HANA database. We will import the data from the CSV to the HANA table.
  • Create a dialplan. The dialplan specifies how to interpret digit sequences dialed by the user and how to convert those sequences into a meaningful action. In our case, the dialplan will execute the shell script to query the HANA SQL database in order to get the net value of the particular billing document number.
  • Create the Node.JS shell script to connect to HANA database or ODATA service (if the source is ODATA).
  • Test IVR system. To test the IVR configuration that we have done and check if everything is being setup correctly.
  • Demo video.

Stay tune for part 2.

Assigned Tags

      3 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Manna Das
      Manna Das

      Looks interesting, waiting for part 2.

      KR

      MD

      Author's profile photo Ferry Gunawan
      Ferry Gunawan
      Blog Post Author

      Thanks Manna. Writing the blog is in progress... 🙂

      Author's profile photo Ferry Gunawan
      Ferry Gunawan
      Blog Post Author