Figure 3-1 shows the layers of interaction between Asterisk and the Linux kernel with respect to hardware control. On the Asterisk side is the Zapata channel module, chan_zap. Asterisk uses this interface to communicate with the Linux kernel, where the drivers for the hardware are loaded.
Figure 3-1. Layers of device interaction with Asterisk
The Zaptel interface is a kernel loadable module that presents an abstraction layer between the hardware drivers and the Zapata module in Asterisk. It is this concept that allows the device drivers to be modified without any changes being made to the Asterisk source itself. The device drivers are used to communicate with the hardware directly and to pass the information between Zaptel and the hardware.
While Asterisk itself compiles on a variety of platforms, the Zaptel drivers are Linux-specific—they are written to interface directly with the Linux kernel. There are no official Zaptel drivers for other operating systems, although work has been going on to write drivers for FreeBSD.
We will discuss the Zaptel compile-time options momentarily, in “The zconfig.h File.” First, let’s take a look at compiling and installing the drivers. (The configuration of Zaptel drivers will be discussed in the next chapter.)
Before compiling the Zaptel drivers on a system running a Linux 2.4 kernel , you should verify that /usr/src/ contains ...