Who owns what files in /etc/asterisk when FreePBX is installed?
That's what this page is here to answer.
The basic rule is that all files are owned and modified by FreePBX unless they end _custom.conf. There are a few exceptions to this rule but not many.
If the file is owned by FreePBX you should find this statement at the top of the file making it clear that it is owned by FreePBX
;--------------------------------------------------------------------------------; ; Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ; ; this file must be done via the web gui. There are alternative files to make ; ; custom modifications, details at: http://freepbx.org/configuration_files ; ;--------------------------------------------------------------------------------; ;
So here is the list of files as of version 2.4. Those owned by FreePBX will be in bold underline. If they become owned in a later version that version will be stated to the right of the file name.
agents.conf
alarmreceiver.conf
applications.conf
asterisk.conf
backup.conf
cdr_mysql.conf
; ; Note - if the database server is hosted on the same machine as the ; asterisk server, you can achieve a local Unix socket connection by ; setting hostname=localhost ; ; port and sock are both optional parameters. If hostname is specified ; and is not "localhost", then cdr_mysql will attempt to connect to the ; port specified or use the default port. If hostname is not specified ; or if hostname is "localhost", then cdr_mysql will attempt to connect ; to the socket file specified by sock or otherwise use the default socket ; file. ; [global] hostname=localhost dbname=asteriskcdrdb password=amp109 user=asteriskuser ;port=3306 ;sock=/tmp/mysql.sock
codecs.conf
dnsmgr.conf
dundi.conf
enum.conf
extconfig.conf
extensions.conf
extensions_additional.conf
extensions_custom.conf
extensions_override_freepbx.conf
features.conf
features_applicationmap_additional.conf
features_applicationmap_custom.conf
features_featuremap_additional.conf
features_featuremap_custom.conf
features_general_additional.conf
features_general_custom.conf
globals_custom.conf
iax.conf
iax_additional.conf
iax_custom.conf
iax_custom_post.conf
iax_general_additional.conf
iax_general_custom.conf
iaxprov.conf
iax_registrations.conf
iax_registrations_custom.conf
indications.conf
localprefixes.conf
logger.conf
manager_additional.conf
manager.conf
manager_custom.conf
meetme.conf
meetme_additional.conf
mgcp.conf
modem.conf
modules.conf
musiconhold_additional.conf
musiconhold.conf
musiconhold_custom.conf
oss.conf
parking_additional.inc (should no longer be used as parking was moved to features)
phone.conf
phpagi.conf
privacy.conf
queues.conf
queues_additional.conf
queues_custom.conf
queues_custom_general.conf
queues_general_additional.conf
queues_post_custom.conf
res_mysql.conf
rtp.conf
sip.conf
sip_general_additional.conf
sip_general_custom.conf
Some of the required lines for nat'ing are externip=, nat=, localnet= (you can have more then one occurrence of this line), and optionally fromdomain=. The first three are needed to properly setup a box on protected network behind a firewall that is providing nat to a public IP. If you have a legacy system these lines might have been placed in sip_nat.conf in the past, if so that is ok as long as the lines only exist in one file and not both (or a big debugging mess will occur along with hair loss as you pull it out while tracking it all down). See sip_nat.conf for more info.
configurations with multiple subnets:
For those setups with internal networks that have multiple subnets you will need to add a localnet= line for each subnet that the phone system should have direct access to. If you don't do this the phone system will assume that phones on those other subnets are external and thus provide the External IP of the box in the SIP headers instead of the internal IP. This then becomes a routing problem for the phone as it should not be attempting to talk external IP of the internal box (most firewalls can not handle the looping back of IP traffic).
Example:
Server 192.168.1.2 on a 192.168.1.0/255.255.255.0 network
Phones inside the office are on the 192.168.2.0/255.255.255.0 subnet
Requires these two lines in the either sip_general_custom.conf or sip_nat.conf file
localnet=192.168.1.0/255.255.255.0
localnet=192.168.2.0/255.255.255.0
sip_nat.conf
sip_registrations.conf
sip_registrations_custom.conf
sip_custom.conf
sip_additional.conf
sip_custom_post.conf
sip_notify.conf
skinny.conf
voicemail.conf
[general] #include vm_general.inc #include vm_email.inc [default]
Once you have configured a system with voicemail there will be values after the context [default]. These lines will be generated by FreePBX every time you add/edit/delete a extension.
If you are looking to customize the e-mail message that get's send out with a voice mail please edit the vm_email.inc file. If you need to edit the mail sending parameters edit the vm_general.inc file. 99% of the world needs to edit two lines in the vm_general.inc file at the initial build time.
The most common change to this file is to create a context called [zonemessages]. This context allows you to create timezones so that when you have extensions in multiple time zones they can date time stamp recorded messages properly for any given extension. If you create this context it should be placed after the second #include line and before the [default] line.
[general] #include vm_general.inc #include vm_email.inc [zonemessages] eastern = America/New_York|'vm-received' q 'digits/at' IMp central = America/Chicago|'vm-received' q 'digits/at' IMp mountain = America/Denver|'vm-received' q 'digits/at' IMp pacific = America/Tijuana|'vm-received' q 'digits/at' IMp eastern24 = America/New_York|'vm-received' q 'digits/at' R central24 = America/Chicago|'vm-received' q 'digits/at' R mountain24 = America/Denver|'vm-received' q 'digits/at' R pacific24 = America/Tijuana|'vm-received' q 'digits/at' R deutschland = Europe/Berlin | 'vm-received' Q 'digits/at' kM england = Europe/London | 'vm-received' Q 'digits/at' R germany = Europe/Berlin | 'vm-received' Q 'digits/at' kM alberta = Canada/Mountain | 'vm-received' Q 'digits/at' HM madrid = Europe/Paris|'vm-received' Q 'digits/at' R paris = Europe/Paris|'vm-received' Q 'digits/at' R sthlm = Europe/Stockholm|'vm-recieved' Q 'digits/at' R europa = Europe/Berlin|'vm-received' Q 'digits/at' kM italia = Europe/Rome|'vm-received' Q 'digit/at' HMP military = Zulu | 'vm-received' q 'digits/at' H N 'hours' 'phonetic/z_p' [default]
vm_email.inc
vm_general.inc
zapata.conf
zapata-auto.conf
zapata_additional.conf
zapata_custom_chan_default.conf