Building An IVRS Application

by Uttam Pegu on August 24, 2008

The most essential requirement of an IVRS is that it has to work 24 hours a day, 364 days a year! It is not an application like your MS Word or Outlook Express that you run them when you need! Also IVRS does not have any User Interface. The reason for not having User Interface is obvious! It interacts with human through voice and telephone instrument keypad. (These are actually DTMF Digits. I will explain about DTMF, Pulse dialing in another post.) So, a typical IVR application does not require to be executed manually, it starts as a service in Windows Operating System as soon as it boots up. ( Or same way in Linux)
So, in order build an IVRS Application, the following are essential

1. How many channels to be used? How many calls it should handle simultaneously?
2. How should it be connected to PSTN Lines? Connection may be in two modes, analog and digital.
3. Type of Hardware used. It requires two kind of hardware – a. A PC or a Server b. CTI hardware.
4. Voice prompts Recording or TTS (text-To-Speech) Engine.
5. IVRS Software.
6. Power supply and wiring arrangement.

Number of channels greatly depends on number of calls the user is expecting. For example, if it is public utility (Like 100, 101, Railway enquiry etc), the number of calls will be high. If it has to handle large number of calls (more than 16 numbers), it should be connected using DIGITAL technology. And you will have to use a digital CTI cards too. Digital Cards are more expensive than analog CTI cards and they start with minimum channel count of 30. If you are going to use a Digital card, use a Server. There are many CTI cards, both analog and digital, available in various configurations.

Then the voice prompts! These are voices you hear as soon as you dial the IVRS telephone numbers! These are pre-recorded voices which are played as soon as your call is established. Normally one should get recorded the voice prompts and for any dynamic content or data, TTS may be used. But the voice quality of TTS is still poor specially it may be difficult to understand to people whose mother tongue is not English.

Once you finalized the above, it is time to develop your IVRS Software or find a IVRS Software development company! There are many IVRS Software development companies in the world. Many IVRS Software are developed on various platforms, using different languages. The best IVRS (in terms of robustness, features, easy to configure and maintain) are the IVRS software which are developed in C++. If you intend to develop a IVRS Software on your own, buy the CTI hardware, and read the APIs. Also you need to have thorough knowledge of PSTN exchange. Specially to configure DIGITAL CTI card using SS7, MTP3 ISUP, R2MF, ISDN PRI etc are time consuming and let me warn you, they are not easy! Also you have to have these infrastructure to your testing purpose! ( How many of you have an exhange with SS7 ?) So, best advice is, attempt build your own IVRS if you have to use analog CTI cards, and for DIGITAL CTI Cards, better contact some IVR Companies!

Keep reading this for CTI cards, IVR Software, IVR Companies and most importantly, how you can make money through IVR! It’s a hot thing

Popularity: 28% [?]


{ 1 trackback }

IVRS for Making Money - My experience | IVRS WORLD
April 22, 2009 at 12:59 pm

{ 38 comments… read them below or add one }

1 Susant Pujari August 24, 2008 at 5:03 pm

Very good article! Easy to understand, good for beginners like me!
Thanx for the article.

2 A Meshram August 25, 2008 at 3:49 pm

Good Post.
Thanx for such good post.

3 Neeraj K August 25, 2008 at 3:50 pm

Very simple step by step explanation for building IVRS. Though it did not mention exact hardware required.

4 Rakesh August 26, 2008 at 3:01 am

What software or tools should be used for rapid development of IVRS ? Also can you suggest some low cost 4 port analog hardware ? Dialogic cards are quite costly.

5 Uttam Pegu August 26, 2008 at 4:36 am

Hi,
Very soon, I am going to post detailed list of hardware vendors and software tools.

thanx !

6 Dipto December 17, 2008 at 12:22 am

Thanks for the info..its very informative. Please post the list of vendors and software tools.

Regards,
Dipto

7 Vinoth February 3, 2010 at 3:12 pm

Hi Uttam Pegu,
I am a student from Chennai, India. I want to do a project which is Building an IVRS for a College! For example if user press 1 they should have a voice response about the student……if 2 voice response about the various dept. etc. So can you please tell me exactly which modem(like modem name or no) should i use to attend the call automatically and get the keypad number dialled by the user. If possible please provide me a brief idea on my project as soon as possible as its late me doing my project! Thank you.

8 Uttam Pegu February 3, 2010 at 3:37 pm

Hi Vinoth,
You can use any modem for building your IVR project. You may use TAPI for your application.

But it will have only one channel, I would recommend you to buy a 4 port Dialogic or Donjin Analog board, and then download XTEND IVR tool ( free for one port) (http://www.xtendtech.com/ivr/) and make your application quickly!

To buy Donjin, you may contact me, or to buy Dialogic, you may contact Tecnomic, http://www.tecnomic.com/

Hope this helps.

9 Vinoth February 3, 2010 at 3:52 pm

Thank you Uttam Pegu! How to automatically attend a call? Is it done once we have a modem? Then what is the use of XTEND IVR tool? Similarly will the keypad number typed by user be retrieved when we have a modem? Please help me with this!

10 Vinoth February 4, 2010 at 8:16 am

Hi Uttam Pegu,
What is the cost of the Donjin board if i purchase from you and what is the price of Dialogic card? Kindly reply me for this and previous query! Thank you.

11 Uttam Pegu February 4, 2010 at 1:01 pm

Hi Vinoth,
Sorry for the late reply.

To reply “How to automatically attend a call ?”
1. Your program keep listening for incoming RINGING and as soon as your program detects it, it will “pick” the call by OFF HOOKing it!
2. ExtendIVR tool a used to “control” dialogic board for performing above #1 operations in your C++,.NET programs.
3. Yes, you can detect telephone keypad pressed by caller ( DTMF )

Donjin costs half the price of Dialogic! 4 port Dialogic should cost around Rs. 30000 or so. ( my estimate, have not bought any recently.).

12 Jeeva February 5, 2010 at 10:49 am

hi,
I am trying to do an IVR system as my final year MCA project.
“Can I use a voice modem instead of Dialogic card??”
because, dialogic card is costlier to me.If so, please give me details about “how to attend the call using voice modem and also how to recognize the number typed by the caller?? Is there any modem with DTMF decoding facility??”

13 Jeeva February 5, 2010 at 10:50 am

my mail ID is sivaramsrk@gmail.com

14 Uttam Pegu February 5, 2010 at 10:53 am

Hi Jeeva,

1. Yes, you can use voice modem instead of Dialogic card.

2. Your program keep listening for incoming RINGING and as soon as your program detects it, it will “pick” the call by OFF HOOKing it!

All voice modems are capable of decoding DTMF keys and they can even detect caller id.

15 Jeeva February 5, 2010 at 11:04 am

Thank you Mr.Uttam Pegu.
1.Can you name any one Voice modem and its approximate price??
2.Is there any programming interface for that modem??

thank you

16 Jeeva February 5, 2010 at 11:05 am

Thank you Mr.Uttam Pegu.
1.Can you name any one Voice modem and its approximate price??
2.Is there any programming interface for that modem??

thank you

17 Uttam Pegu February 5, 2010 at 12:51 pm

Hi Jeeva,
You may use any voice modem, either built in into your laptop or any external or internal modem to be installed in PC.

TAPI ( Telephony API) is widely used for Modem.

18 Jeeva February 5, 2010 at 1:11 pm

Hiiii Uttam Pegu,

Thank you very much for your kind information…. thank you.

19 Vinoth February 6, 2010 at 3:53 pm

Hi Uttam Pegu,
I have decided to use a voice modem for the IVRS as my company wants to offer me only that for now. So could you please specify me the exact model or name of the voice modem that i can use so that my IVRS works in a good way! Please help me with this!
Thank you.

20 Uttam Pegu February 6, 2010 at 4:00 pm

Hi Vinod,
Please read up my communication with Mr. Jeeva. You may use ANY VOICE MODEM.

But honestly, I am not sure if “IVRS” on Modem works in “good way”, but then, I never tried IVR using modem. I started out with 4port Dialogic board.

All the best!

21 Vinoth February 8, 2010 at 7:57 am

Thank you Mr.Uttam Pegu

22 Jeeva February 8, 2010 at 9:46 am

hii Uttam Pegu,
I have searched the voice modem.. some voice modems have problems in detecting the caller ID,and some modems can not detect the dtmf code… I am in confusion in selecting the modem… so, please help me out and tell me any one suitable modem.. please!!
thank you!

23 Uttam Pegu February 8, 2010 at 12:50 pm

Hi Jeeva,
No gadget can claim to detect DTMF 100% accurately as it depends on lot many things including signal/line conditions! So, you will always have CLI detection in any analog boards, including modems.

All modems are equally suitable or otherwise, thumbrule might be costlier would be better!

24 Jeeva February 8, 2010 at 1:24 pm

Thank you Mr.Uttam Pegu :)

25 Jeeva February 8, 2010 at 1:26 pm

Now I am going to use any one Voice modem !! I will reply you soon whether it works properly or not.

26 Jeeva February 20, 2010 at 1:05 pm

hii uttam pegu,
once again i am coming with a problem…
Now i am using d-link dfm560in-is voice modem for my IVR application.
i use c#.net to develope this… i can attend the call automatically using AT commands… I tried to send a wav file over the modem… but it dint worked….
i have attached my c# code….
is my code correct??? do you help me out!!??
here is my code…..

public AutoResetEvent receiveNow = new AutoResetEvent(false);
public SerialPort sp1 = new SerialPort();
private void Form1_Load(object sender, EventArgs e)
{

//System.IO.FileStream strm= new System.IO.FileStream(“C:\\sk.wav”,System.IO.FileMode.Open);
//System.IO.BinaryReader rdr=new System.IO.BinaryReader(strm);

FileStream fs = new FileStream(“C:\\sk.wav”, FileMode.Open, FileAccess.Read);
BinaryReader br = new BinaryReader(fs);
long numbytes = new FileInfo(“C:\\sk.wav”).Length;
buff = br.ReadBytes(1024);//((int)numbytes);
MessageBox.Show(numbytes.ToString());
//for(i=0;i “) && !buffer.EndsWith(“\r\nERROR\r\n”));
}
catch (Exception ex)
{
throw ex;
}
return buffer;
}

i expect a positive answer from you…..
thank you!!

-Jeeva

27 Jeeva February 20, 2010 at 1:07 pm

sry….
here is my correct code…
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO.Ports;
using System.Threading;
using System.Text.RegularExpressions;
using System.IO;

namespace ivr
{
public partial class Form1 : Form
{
public string s;
public AutoResetEvent receiveNow = new AutoResetEvent(false);
public SerialPort sp1 = new SerialPort();

byte[] buff = new byte[1024];
int i = 0;

public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{

//System.IO.FileStream strm= new System.IO.FileStream(“C:\\sk.wav”,System.IO.FileMode.Open);
//System.IO.BinaryReader rdr=new System.IO.BinaryReader(strm);

FileStream fs = new FileStream(“C:\\sk.wav”, FileMode.Open, FileAccess.Read);
BinaryReader br = new BinaryReader(fs);
long numbytes = new FileInfo(“C:\\sk.wav”).Length;
buff = br.ReadBytes(1024);//((int)numbytes);
MessageBox.Show(numbytes.ToString());
//for(i=0;i 0)
// throw new ApplicationException(“Response received is incomplete.”);
// else
// throw new ApplicationException(“No data received from phone.”);
// }
}
while (!buffer.EndsWith(“\r\nOK\r\n”) && !buffer.EndsWith(“\r\n> “) && !buffer.EndsWith(“\r\nERROR\r\n”));
}
catch (Exception ex)
{
throw ex;
}
return buffer;
}

28 Jeeva February 20, 2010 at 1:12 pm

sorry once again… my code din’t copied correctly!!
so attached it page by page!!

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO.Ports;
using System.Threading;
using System.Text.RegularExpressions;
using System.IO;

namespace ivr
{
public partial class Form1 : Form
{
public string s;
public AutoResetEvent receiveNow = new AutoResetEvent(false);
public SerialPort sp1 = new SerialPort();

byte[] buff = new byte[1024];
int i = 0;

public Form1()
{
InitializeComponent();
}

29 Jeeva February 20, 2010 at 1:12 pm

private void Form1_Load(object sender, EventArgs e)
{

//System.IO.FileStream strm= new System.IO.FileStream(“C:\\sk.wav”,System.IO.FileMode.Open);
//System.IO.BinaryReader rdr=new System.IO.BinaryReader(strm);

FileStream fs = new FileStream(“C:\\sk.wav”, FileMode.Open, FileAccess.Read);
BinaryReader br = new BinaryReader(fs);
long numbytes = new FileInfo(“C:\\sk.wav”).Length;
buff = br.ReadBytes(1024);//((int)numbytes);
MessageBox.Show(numbytes.ToString());
//for(i=0;i<buff.Length;i++)
// MessageBox.Show(BitConverter.ToString(buff) );
MessageBox.Show("file reading finished…");

sp1.PortName="COM3";
sp.BaudRate = 115200;
sp.DataBits = 8;
sp.StopBits = System.IO.Ports.StopBits.One;
sp.Parity = System.IO.Ports.Parity.None;
sp.Handshake = System.IO.Ports.Handshake.None;
sp.DtrEnable = true;
sp1.Open();
sp1.DiscardOutBuffer();
sp1.DiscardInBuffer();
receiveNow.Reset();
MessageBox.Show("port initialization finished…");

30 Jeeva February 20, 2010 at 1:13 pm

sp1.Write(“AT\r”);
s = ReadResponse(sp1, 3000);
MessageBox.Show(s);
sp1.Write(“atz\r”);
s = ReadResponse(sp1, 3000);
MessageBox.Show(s);
sp1.Write(“at+fclass=8\r”);
s = ReadResponse(sp1, 3000);
MessageBox.Show(s);
sp1.Write(“at+vsm=128,8000\r”);
s = ReadResponse(sp1, 3000);
MessageBox.Show(s);

sp1.Write(“at s0=1\r”);
s = ReadResponse(sp1, 3000);
MessageBox.Show(s);
sp1.Write(“at+vtx\n”);
sp1.Write(buff, 1, 1023);
}

31 Jeeva February 20, 2010 at 1:14 pm

public string ReadResponse(SerialPort port, int timeout)
{
string buffer = string.Empty;

do
{
string t = port.ReadExisting();
buffer += t;
}
while (!buffer.EndsWith(“\r\nOK\r\n”) && !buffer.EndsWith(“\r\n> “) && !buffer.EndsWith(“\r\nERROR\r\n”));
}

32 Jeeva February 20, 2010 at 1:14 pm

thats all!! thank you!

33 Uttam Pegu February 23, 2010 at 10:39 am

Hi Jeeva,
I am not sure how one plays WAV file using AT commands!

34 Jeeva February 23, 2010 at 11:04 am

oh! ok thank you!
then…. hw to do all these things??????

35 Uttam Pegu February 23, 2010 at 11:05 am

I think, you will have to use TAPI instead of AT commands.

36 Jeeva February 23, 2010 at 11:10 am

ok
can you give me any links related to TAPI

37 Jeeva March 6, 2010 at 10:26 am

hii Uttam Pegu
I have successfully completed my project using TAPI calsses.
Thank you so much for your kind help!!
Regards,
-Jeeva

38 Uttam Pegu March 6, 2010 at 10:52 am

Hi Jeeva,
Great to know that you have completed your project!

regards

Uttam Pegu

Leave a Comment

Previous post:

Next post: