Freepbx各配置文件关系及用途

Freepbx各配置文件关系及用途

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

o This file contains the crontab line(s) that will get executed for backup job scheduling.

cdr_mysql.conf

o if you want to use the userfield in the CDR reporting you will need to add this line to

the file: userfield=1

then restart Freepbx by typing amportal restart Default file should look like this:

;

; 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 \ ; port specified or use the default port. If hostname is not specified ; or if hostname is \ ; 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

o if you need to modify existing code code/context in extensions.conf please place your

modifications in extensions_override_freepbx.conf as asterisk uses the code for the first context referance and ignores additional occurances.

extensions_additional.conf

o o

DO NOT EDIT THIS FILE, it get's regenerated each and every time you apply changes. If you need to expand on functionality of a section of code check to see if there is a

include context line in the code (will end in _custom.conf) if so create that context in extensions_custom.conf and it will get called.

o If you need to replace the functionality in extensions_additional.conf please place it

in extensions_override_freepbx.conf but read the notes about this file first.

extensions_custom.conf

o this is the file that you place all your custom contexts, and additional code

enhancements to the FreePBX dial plan. This file will not be overwritten.

extensions_override_freepbx.conf

o If extensions.conf (or extensions_additional.conf) has a context or macro that you

NEED to modify, you place that code here as asterisk will only execute the first occurrences of that code and ignores other occurrences. This file will not be overwritten. Be very careful as replacing an existing piece of code this way is the fastest possible way to break your system. If you are doing this you should probably think about filing for a feature request or bug fix to get it addressed properly.

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

联系客服:779662525#qq.com(#替换为@)