This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
voice:pbx:freepbx_config [2013/09/25 16:58] gcooper |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== FreePBX Configuration ====== | ||
- | FreePBX is an Asterisk management system with a web interface. | ||
- | |||
- | See also **[[https:// | ||
- | |||
- | ===== Using FreePBX ===== | ||
- | |||
- | The FreePBX administration console: < | ||
- | |||
- | :!: If this is the first visit to the FreePBX web admin page, click "Apply Configuration Changes" | ||
- | |||
- | ==== Default Credentials ==== | ||
- | |||
- | ^Function | ||
- | |FreePBX | ||
- | |Voicemail & Recordings (ARI) |< | ||
- | |||
- | ===== Configuration ===== | ||
- | |||
- | ==== Important Initial Settings ==== | ||
- | |||
- | :!: Save each change and click Apply Configuration after done making changes. | ||
- | |||
- | **FreePBX -> Admin -> Administrators -> admin ->** | ||
- | |||
- | * **Password -> newfreepbxadminpassword** | ||
- | |||
- | **FreePBX -> Settings -> Advanced Settings -> Asterisk Manager ->** | ||
- | |||
- | * **Asterisk Manager Password -> your-asterisk-manager-password** | ||
- | |||
- | **FreePBX -> Settings -> Advanced Settings -> System Setup ->** | ||
- | |||
- | * **User Portal Admin Username -> newariadminusername** | ||
- | * **User Portal Admin Password -> newariadminpassword** | ||
- | |||
- | **FreePBX -> Admin -> Module Admin -> Check Online -> Upgrade All -> Process** | ||
- | |||
- | ===== Security ===== | ||
- | |||
- | ==== Firewall ==== | ||
- | |||
- | The following ports may need to be opened: | ||
- | |||
- | ^Protocol^Ports^Description^ | ||
- | |TCP|80|HTTP| | ||
- | |TCP|443|HTTPS| | ||
- | |TCP|4445|Flash Operator Panel| | ||
- | |UDP|5060-5061|SIP| | ||
- | |UDP|10000-20000|RTP| | ||
- | |UDP|4569|IAX| | ||
- | |||
- | Firewall options: | ||
- | |||
- | === iptables === | ||
- | |||
- | < | ||
- | system-config-firewall-tui | ||
- | </ | ||
- | |||
- | === Arno's Firewall === | ||
- | |||
- | **[[networking: | ||
- | |||
- | ==== Fail2Ban ==== | ||
- | |||
- | See **[[networking: | ||
- | |||
- | For a base CentOS 6.2 box, after installing Fail2Ban via the EPEL repo, you can just copy and paste the following in one go to get a basic Fail2Ban installation set up for your PBX: | ||
- | |||
- | < | ||
- | cat << EOF >> / | ||
- | # Fail2Ban local configuration file | ||
- | # | ||
- | # This file overrides the fail2ban.conf file | ||
- | |||
- | [Definition] | ||
- | logtarget = / | ||
- | |||
- | EOF | ||
- | |||
- | cat << EOF >> / | ||
- | # Fail2Ban local configuration file | ||
- | # | ||
- | # This file overrides the jail.conf file | ||
- | |||
- | [DEFAULT] | ||
- | ignoreip = 127.0.0.1 209.193.64.0/ | ||
- | bantime | ||
- | findtime | ||
- | maxretry = 3 | ||
- | backend = auto | ||
- | |||
- | |||
- | [asterisk-iptables] | ||
- | enabled | ||
- | filter | ||
- | action | ||
- | # | ||
- | logpath | ||
- | maxretry = 5 | ||
- | bantime = 600 | ||
- | |||
- | [ssh-iptables] | ||
- | enabled | ||
- | filter | ||
- | action | ||
- | # | ||
- | logpath | ||
- | maxretry = 3 | ||
- | |||
- | [apache-tcpwrapper] | ||
- | enabled | ||
- | filter | ||
- | action | ||
- | # | ||
- | logpath | ||
- | maxretry = 3 | ||
- | |||
- | [vsftpd-iptables] | ||
- | enabled | ||
- | filter | ||
- | action | ||
- | # | ||
- | logpath | ||
- | maxretry = 3 | ||
- | bantime | ||
- | |||
- | [apache-badbots] | ||
- | enabled | ||
- | filter | ||
- | action | ||
- | # | ||
- | logpath | ||
- | bantime | ||
- | maxretry = 1 | ||
- | |||
- | EOF | ||
- | |||
- | cat << EOF >> / | ||
- | # Fail2Ban configuration file | ||
- | # | ||
- | # Asterisk Filter - / | ||
- | |||
- | [INCLUDES] | ||
- | |||
- | # Read common prefixes. If any customizations available -- read them from | ||
- | # common.local | ||
- | #before = common.conf | ||
- | |||
- | [Definition] | ||
- | |||
- | #_daemon = asterisk | ||
- | |||
- | # Option: | ||
- | # Notes.: | ||
- | # host must be matched by a group named " | ||
- | # be used for standard IP/hostname matching and is only an alias for | ||
- | # (?::: | ||
- | # Values: | ||
- | # | ||
- | |||
- | failregex = Registration from ' | ||
- | Registration from ' | ||
- | Registration from ' | ||
- | Registration from ' | ||
- | Registration from ' | ||
- | NOTICE.* < | ||
- | NOTICE.* .*: No registration for peer ' | ||
- | NOTICE.* .*: Host < | ||
- | VERBOSE.* logger.c: -- .*IP/< | ||
- | |||
- | # Option: | ||
- | # Notes.: | ||
- | # Values: | ||
- | # | ||
- | ignoreregex = | ||
- | |||
- | EOF | ||
- | |||
- | service fail2ban restart | ||
- | </ | ||
- | |||
- | ===== Troubleshooting ===== | ||
- | |||
- | ==== Asterisk Manager Interface ==== | ||
- | |||
- | Verify that the username and password in / | ||
- | |||
- | http:// | ||
- | |||
- | ==== Pear DB ==== | ||
- | |||
- | If you see an error during FreePBX installation like: | ||
- | |||
- | < | ||
- | Checking for PEAR DB..FAILED | ||
- | </ | ||
- | |||
- | try: | ||
- | |||
- | < | ||
- | pear install DB | ||
- | </ | ||
- | |||
- | then re-run: | ||
- | |||
- | < | ||
- | ./ | ||
- | </ | ||
- | |||
- | ==== Remote Extensions ==== | ||
- | |||
- | :!: If you enable remote access to your PBX, **secure it!** | ||
- | |||
- | :!: NAT is a real hurdle for SIP. The best way to deal with NAT issues is to not use NAT if at all possible. | ||
- | |||
- | === IAX Protocol === | ||
- | |||
- | :!: Using phones with IAX protocol support is a good alternative if the PBX is behind NAT. | ||
- | |||
- | :!: IAX protocol is pretty much Asterisk-specific. | ||
- | |||
- | If your PBX is behind NAT, forward the single UDP port 4569 from your NAT firewall in to the PBX. | ||
- | |||
- | === SIP Protocol === | ||
- | |||
- | http:// | ||
- | |||
- | If your PBX is behind NAT and you'd still like to try getting remote SIP extensions to work: | ||
- | |||
- | < | ||
- | vim / | ||
- | |||
- | localnet=192.168.1.0/ | ||
- | externhost=your.fqdn.hostname | ||
- | fromdomain=your.fqdn.domain.name | ||
- | nat=yes | ||
- | qualify=yes | ||
- | externrefresh=10 | ||
- | canreinvite=no | ||
- | |||
- | asterisk -rx reload | ||
- | </ | ||
- | |||
- | ==== PHP Memory Limit ==== | ||
- | |||
- | This should be the default: | ||
- | |||
- | < | ||
- | vim -c 457 / | ||
- | </ | ||
- | |||
- | < | ||
- | memory_limit = 128M | ||
- | </ | ||
- | |||
- | ==== Re-Install Just FreePBX ==== | ||
- | |||
- | < | ||
- | amportal stop | ||
- | |||
- | rm -f / | ||
- | |||
- | / | ||
- | |||
- | cd / | ||
- | ./ | ||
- | </ | ||
- | |||
- | Visit the configuration page at: http:// | ||
- | |||
- | Click “Apply Settings” | ||
- | |||
- | Reboot | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | ===== First Steps ===== | ||
- | |||
- | http:// | ||
- | |||
- | ===== Add-On Modules ===== | ||
- | |||
- | FreePBX offers numerous add-on modules. | ||
- | |||
- | * You probably don't want or need to install them all | ||
- | * Simpler user interface | ||
- | * Enhanced security | ||
- | * If you are looking for a feature and don't find it | ||
- | * **FreePBX -> Admin -> Module Admin -> Check Online** | ||
- | |||
- | Commonly installed modules: | ||
- | |||
- | * Ring Groups | ||
- | * IVR | ||
- | * Backup and Restore | ||
- | * Follow Me | ||
- | * Asterisk Info | ||
- | * Asterisk Logfiles | ||
- | * Asterisk SIP Settings | ||
- | * OSS Endpoint Manager | ||
- | |||
- | ===== NAT ===== | ||
- | |||
- | Install the Sip Settings FreePBX module, if it's not already installed, then: | ||
- | |||
- | **Settings -> Asterisk SIP Settings** | ||
- | |||
- | ===== Send E-Mail ===== | ||
- | |||
- | If you have **Postfix** installed (default in CentOS 6), it's easy to use that: | ||
- | |||
- | See also **[[networking: | ||
- | |||
- | If you don't have an MTA installed, **SSMTP** is a simple alternative: | ||
- | |||
- | See also **[[networking: | ||
- | |||
- | ===== Phone Management ===== | ||
- | |||
- | Install either the free OSS End Point Manager or the commercial (and more capable) End Point Manager FreePBX module. | ||
- | |||
- | http:// | ||
- | |||
- | ===== Extensions ===== | ||
- | |||
- | Add a regular SIP extension (phone): | ||
- | |||
- | **Applications -> Extensions -> Add Extension -> Generic SIP Device** | ||
- | |||
- | ===== Trunks ===== | ||
- | |||
- | http:// | ||
- | |||
- | http:// | ||
- | |||
- | ==== InPhonex ==== | ||
- | |||
- | Trunk Description: | ||
- | Outbound Caller ID: 5201231234 | ||
- | |||
- | Dial Rules only modify dial strings. | ||
- | |||
- | 1520+NXXXXXX | ||
- | 1+NXXNXXXXXX | ||
- | |||
- | Trunk Name: inphonex-outbound | ||
- | Peer Details: | ||
- | |||
- | type=peer | ||
- | insecure=very | ||
- | host=sip.inphonex.com | ||
- | username=yourinphonexusername | ||
- | secret=yourinphonexpassword | ||
- | qualify=yes | ||
- | sendrpid=yes | ||
- | context=from-pstn | ||
- | fromuser=yourinphonexusername | ||
- | fromdomain=sip.inphonex.com | ||
- | canreinvite=no | ||
- | |||
- | User Context: inphonex-inbound | ||
- | |||
- | User Details: | ||
- | |||
- | type=friend | ||
- | context=from-pstn | ||
- | username=yourinphonexusername | ||
- | user=yourinphonexusername | ||
- | insecure=very | ||
- | host=sip.inphonex.com | ||
- | fromdomain=sip.inphonex.com | ||
- | |||
- | Registration String: | ||
- | |||
- | yourinphonexusername: | ||
- | |||
- | ==== Vitelity ==== | ||
- | |||
- | Trunk Description: | ||
- | Outbound Caller ID: 5201231234 | ||
- | |||
- | Dial Rules only modify dial strings. | ||
- | |||
- | 1520+NXXXXXX | ||
- | 1+NXXNXXXXXX | ||
- | |||
- | Trunk Name: vitelity-outbound | ||
- | Peer Details: | ||
- | |||
- | type=friend | ||
- | dtmfmode=auto | ||
- | host=outbound.vitelity.net | ||
- | username=yourvitelityusername | ||
- | fromuser=yourvitelityusername | ||
- | trustrpid=yes | ||
- | sendrpid=yes | ||
- | secret=yourvitelitypassword | ||
- | allow=all | ||
- | canreinvite=no | ||
- | |||
- | User Context: vitelity-inbound | ||
- | |||
- | User Details: | ||
- | |||
- | type=friend | ||
- | dtmfmode=auto | ||
- | host=inbound23.vitelity.net | ||
- | context=inbound | ||
- | username=yourvitelityusername | ||
- | secret=yourvitelitypassword | ||
- | allow=all | ||
- | insecure=very | ||
- | canreinvite=no | ||
- | |||
- | Registration String: | ||
- | |||
- | yourvitelityusername: | ||
- | |||
- | ===== Outbound Routes ===== | ||
- | |||
- | Route Name: Default | ||
- | Emergency: enabled | ||
- | Dial Patterns: | ||
- | |||
- | 011. | ||
- | 1NXXNXXXXXX | ||
- | NXXNXXXXXX | ||
- | NXXXXXX | ||
- | |||
- | Pick a trunk or two. | ||
- | |||
- | **Inbound Routes** | ||
- | |||
- | Route Name: Default | ||
- | Set Destination: |