Directory and File Structure
The top level directories used by Asterisk can be configured in the asterisk.conf configuration file.
Here we'll describe what each directory is used for, and what sub-directories Asterisk will place in each by default. Below each heading you can also see the correlating configuration line in asterisk.conf.
Asterisk Configuration Files¶
This location is used to store and read Asterisk configuration files. That is generally files with a .conf extension, but other configuration types as well, for example .lua and .ael.
Asterisk Modules¶
Loadable modules in Shared Object format (.so) installed by Asterisk or the user should go here.
Various Libraries¶
Additional library elements and files containing data used in runtime are put here.
On This Page
Database Directory¶
This location is used to store the data file for Asterisk's internal database. In Asterisk versions using the SQLite3 database, the file will be named astdb.sqlite3.
Encryption Keys¶
When configuring key-based encryption, Asterisk will look in the keys subdirectory of this location for the necessary keys.
System Data Directory¶
By default, Asterisk sounds are stored and read from the sounds subdirectory at this location.
AGI(Asterisk Gateway Interface) Directory¶
When using various AGI applications, Asterisk looks here for the AGI scripts by default.
Spool Directories¶
This directory is used for storing spool files from various core and module-provided components of Asterisk.
Most of them use their own subdirectories, such as the following:
- dictate
- meetme
- monitor
- outgoing
- recording
- system
- tmp
- voicemail
Running Process Directory¶
When Asterisk is running, you'll see two files here, asterisk.ctl and asterisk.pid. That is the control socket and the PID(Process ID) files for Asterisk.
Logging Output¶
When Asterisk is configured to provide log file output, it will be stored in this directory.
System Binary Directory¶
By default, Asterisk looks in this directory for any system binaries that it uses, if you move the Asterisk binary itself or any others that it uses, you'll need to change this location.