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
astetcdir => /etc/asterisk
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.
astmoddir => /usr/lib/asterisk/modules
Loadable modules in Shared Object format (.so) installed by Asterisk or the user should go here.
astvarlibdir => /var/lib/asterisk
Additional library elements and files containing data used in runtime are put here.
TODO: Add specific examples
astdbdir => /var/lib/asterisk
By default, Asterisk sounds are stored and read from the sounds subdirectory at this location.
TODO: What else gets placed in the astdatadir ?
AGI(Asterisk Gateway Interface) Directory