O'Reilly logo

Practical VoIP Using VOCAL by Luan Dang, Cullen Jennings, David Kelly

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Key Data Structures

Figure 9-2 shows the classes and how they encapsulate and inherit from one another.

Let’s have a look at the classes that appear in Figure 9-2:

BasicProxy

A derived class from the HeartLessProxy. A BasicProxy object should be used in a system that supports the heartbeating mechanism, as discussed in Chapter 17. This class adds three heartbeating threads.

Builder

A base class that receives events from the Worker thread for processing. Builder is a Feature container, which is a State container, which is an Operator container. Builder contains a pointer to the proxy CallContainer. Builder objects are used to construct HeartLessProxy and BasicProxy objects.

CallContainer

A base class that is used as the proxy’s container for CallInfo objects.

Base code classes

Figure 9-2. Base code classes

CallInfo

A base class that stores information about a call. A SipProxyEvent object contains CallInfo. CallInfo data members are thread-safe.

DeviceEvent

Derived from SipProxyEvent and a placeholder for events received from a device. These are used in the SIP User Agent for events such as a phone going on- or off-hook.

Feature

Keeps track of running the state machine that is associated with it.

HeartLessProxy

So named because it doesn’t heartbeat. This class creates a call container, call processing FIFO, SIP stack, and Worker and SIP threads. The main method is the run method, which starts ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required