Loading Asterisk and Zaptel Quickly

If you run make config in the Asterisk or Zaptel source directories, then the initialization scripts used to control Asterisk or Zaptel will be copied to /etc/rc.d/init.d/. The scripts can be used to easily load and unload Asterisk and Zaptel. They will also run the chkconfig command for you so Asterisk and Zaptel will be started automatically upon system boot. The following shows their usage:

# service zaptel start
# service asterisk start

Each initialization script has several options that can be utilized to control the PBX or the drivers. Tables 3.2 and 3.3 show the commands run by the script as if you had typed them into the command-line interface (CLI) yourself:

Table 3.2. Asterisk initialization script options

service asterisk <option>Manual equivalent
start asterisk
stop killproc asterisk
restart stop; start
reload asterisk -rx "reload"
status ps aux | grep [a]sterisk

Table 3.3. Zaptel initialization script options

service zaptel <option>Manual equivalent
start modprobe zaptel; modprobe <module>; /sbin/ztcfg
stop rmmod ztdummy; rmmod zaptel
restart stop; start
reload /sbin/ztcfg