首页>>厂商>>IVR系统平台厂商>>Pronexus

[英文]多线程IVR开发
Multithreading in IVR Development

Fouad Jennawi 2010/10/29

Multithreading is one of the very interesting subjects of programming; end users know it as the reason that keeps their computers highly responsive, and developers use it as one of the techniques to improve the performance of the products that they are developing.


Pronexus VBVoice™ Interactive Voice Response (IVR) software is multi-threaded by design. It separates, on one hand, processing channels from each other and, on the other hand, from the application code. However, the IVR application code is usually done on one thread; the thread that instantiated the VBVoice controls which is called the main thread. This same thread also instantiates and handles the GUI (Graphical User Interface) code.

As application developers started doing more asynchronous coding using multithreading, Pronexus was asked to simplify this process. This is when the WorkerThread control was added to the VBVoice’s collection of controls. WorkerThread not only offers management of a pool of user threads but it also synchronizes them with both the main thread (the thread that all application code is executing) and the particular channel thread.

Simplicity is the key here; the IVR solution developer wraps his code to be executed in a worker thread in a class that implements IVBVRunnable interface. During a call, in the WorkerThread Enter event, the application creates an object that contains the set of parameters to be passed to the worker thread and an instance of wrapper class. VBVoice will kick in the worker thread with the custom code while playing music to the caller and listening to actions, such as hanging up or keying in digits. Later, when the custom code is done, the control exits by firing its Exit event and providing any results from the worker thread plus some useful flags.

The key benefits of the WorkerThread control are:

1.IVR developers don't need to have extensive knowledge of multithreading programming and sophisticated thread synchronization which can get tricky.
2.WorkerThread suggests the recommended way of writing custom thread code which saves time.
3.It offers the best synchronization to telephony functionality.
4.It simplifies debugging, as you only have to set the WorkerThread timeout to a high value and put a break point in your custom code.
5.It is extensible, as application developers can add more threads if they need to and implement other ways of synchronization to the worker thread as well as the main thread.

Responses to “Multithreading in IVR Development”
1.Sean says:
October 28, 2010 at 1:17 pm
In my experience, IVR programmers should consider multithreading for example for any applications which will do database lookups. In particular with high-density IVR systems, channel stability can be impacted by blocking the main thread. In a telephony platform, milliseconds count, and delays on the main thread cause instability. A multithread approach in application design will ensure you have the foundation of a robust IVR.

2.KO says:
October 28, 2010 at 2:34 pm
There is a case study that talks to some of the benefits that you mention. Check out http://tinyurl.com/callcenter-casestudy. To give you an idea, a large call center was able to reduce code lines (and therefore time and costs) by 50% using multithreading to develop their dialer application.

CTI论坛报道



相关阅读:
Pronexus推出VBVoice7 免费提供IVR开发工具包 2010-09-08
Pronexus推出IVR解决方案定位器 2010-08-17
Vocantas采用VBVoice为大型公共事业机构开发IVR 2010-03-16
CabCALL采用支持HMP的VBVoice开发IVR订车方案 2010-03-15
VBVoice 5.6构建强有力的电话和语音解决方案 2010-01-27

分类信息:  CTI文摘_与_IVR技术