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.
- Asterisk PBX server installed on the Linux machine. I am using the Asterisk for Raspberry Pi version: http://www.raspberry-asterisk.org/
- HANA XS Database to store the SAP table information.
- Cisco Linksys SPA3102 as a Voice Modem Gateway: http://www.cisco.com/c/en/us/products/unified-communications/spa3102-voice-gateway-router/index.html
- Raspberry Pi Model B as a PBX server: http://www.raspberrypi.org/ with SD card 8GB.
- Active telephone line and an internet connection
Preparing the PBX Server
We will be using a Raspberry Pi as an IVR server.
- 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:
Once you have written the SD card, boot it up and run this command on the console to update with the latest components:
- Configure the static IP-address.
Edit the file /etc/network/interface by typing the following command:
Remove the following line:
iface eth0 inet dhcp
And add the following lines:
iface eth0 inet staticaddress 192.168.0.12
Update those numbers highlighted in blue with your IP address. And finally run the following command to restart the network service:
service networking restart
- Installing IncrediblePBXExecute the following command on the Raspberry Pi console:
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.
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 dpkg -i node_latest_armhf.deb
Check if the installation is successful by typing the following command:
You will see the version if the installation is successful, for my case is:
Installing SAP HANA Database Client for Node
In the Raspberry Pi console, type the following command:
git clone https://github.com/SAP/node-hdb.git
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.
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.