Looking Through the Code
From a coding point of view, the UA is constructed from classes and threads.
Classes
Here is a look at some of the classes behind the VOCAL UA . These classes can be easily divided into base classes and event classes, as shown in the following diagrams. Figure 10-3 shows the UA classes.
The classes in the gray shading are base classes. Here are descriptions of the event classes:
- DeviceThread
Works with the hardware devices such as the sound card.
- DigitCollector
Receives digit input while the user is dialing and processes the digits according to the dialing plan.
- FeatureThread
The main thread that executes the state machine.
- LoadGenThread
Tracks statistics when the UA is being run in Load Generation mode. This is used for bulk testing to make large numbers of calls.
- NullHwDevice
Used for testing when neither a sound card nor a Quicknet card is available.
- QuickNetDevice
A device thread that works with Quicknet cards (http://www.quicknet.com).
Figure 10-3. UA class diagram
- RegistrationManager
Keeps track of the UA’s registration with the network and its expiry.
- ResGwDevice
Residential Gateway Device, a base class. Anything that was a UA that did audio would need to deal with certain operations. We derive certain devices from that, such as the Quicknet card and sound card, or if there is nothing, we derive the NullHardware class. If you have ...
Get Practical VoIP Using VOCAL now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.