====== FreePBX Configuration ====== https://wiki.freepbx.org/display/FPG/Configuring+Your+PBX FIXME Incomplete FreePBX is an Asterisk management system with a web interface. See also: **[[https://www.sonoracomm.com/wiki/doku.php?do=search&id=freepbx&highlight=no|Other FreePBX pages in this wiki]]** ===== Using FreePBX ===== The FreePBX administration console: http://ip.of.your.pbx :!: If this is the first visit to the FreePBX web admin page, click "Apply Configuration Changes" and reboot the new PBX again. ==== Default Credentials ==== ^Function ^Username ^Password ^Comment ^ |FreePBX |admin |admin | | |Voicemail & Recordings (ARI) | | |Use the FreePBX admin console to enable | ===== 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 ===== ===== Troubleshooting ===== ==== Asterisk Manager Interface ==== Verify that the username and password in /etc/asterisk/manager.conf and /etc/amportal.conf match. http://www.freepbx.org/support/documentation/faq/changing-the-asterisk-manager-password ==== Pear DB ==== If you see an error during FreePBX installation like: Checking for PEAR DB..FAILED try: pear install DB then re-run: ./install_amp ==== 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. NAT on both ends may not be worth attempting if using SIP, it's just not a NAT-friendly protocol like IAX. === 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://www.freepbx.org/support/documentation/howtos/howto-setup-a-remote-sip-extension If your PBX is behind NAT and you'd still like to try getting remote SIP extensions to work: vim /etc/asterisk/sip_nat.conf localnet=192.168.1.0/255.255.255.0 #your local network externhost=your.fqdn.hostname #your resolvable host name fromdomain=your.fqdn.domain.name #your domain mane nat=yes qualify=yes externrefresh=10 canreinvite=no asterisk -rx reload #reload Asterisk configuration ==== PHP Memory Limit ==== This should be the default: vim -c 457 /etc/php.ini memory_limit = 128M ==== Re-Install Just FreePBX ==== amportal stop rm -f /etc/asterisk/{sip_notify.conf,iax.conf,logger.conf,features.conf,sip.conf,extensions.conf,ccss.conf,chan_dahdi.conf} /usr/sbin/safe_asterisk cd /usr/src/freepbx-2.10.0 ./install_amp Visit the configuration page at: http://IP.of.PBX Click “Apply Settings” Reboot ===== First Steps ===== http://www.freepbx.org/support/documentation/installation/first-steps-after-installation ===== 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:linux:postfix_smarthost|Postfix Authenticated Smarthost]]** If you don't have an MTA installed, **SSMTP** is a simple alternative: See also **[[networking:linux:ssmtp|SSMTP]]** ===== Phone Management ===== Install either the free OSS End Point Manager or the commercial (and more capable) End Point Manager FreePBX module. http://www.the159.com/endpointman/tut.html ===== Extensions ===== Add a regular SIP extension (phone): **Applications -> Extensions -> Add Extension -> Generic SIP Device** ===== Trunks ===== http://www.freepbx.org/support/documentation/howtos/howto-route-dial-patterns-and-trunk-dial-rules ==== Vitelity ==== :!: Add separate inbound and outbound trunks. === Inbound === https://portal.vitelity.net/support/amp.php?trunk=inbound&protocol=sip == General Settings == |Trunk Name |''vitel-inbound'' | |Outbound Caller ID |''Your Name <5201231234>'' | == Outgoing Settings == |Trunk Name |''vitel-inbound'' | == Peer Details == type=friend dtmfmode=auto username=yourvitelityusername secret=yourvitelitypassword context=from-trunk insecure=port,invite canreinvite=no host=inbound23.vitelity.net == Registration String == yourvitelityusername:yourvitelitypassword@inbound23.vitelity.net:5060 === Outbound === https://portal.vitelity.net/support/amp.php?trunk=outbound&protocol=sip == General Settings == |Trunk Name |''vitel-outbound'' | |Outbound Caller ID |''Your Name <5201231234>''| |Maximum Channels |Set to the number of simultaneous calls you expect on a regular basis. | == Dialed Number Manipulation Rules == :!: These dial rules only modify dial strings. :!: Prefix digits are stripped. Prepend digits are added to the dialed digits. :!: Vitelity requires 11 digits (1 + area code). 1520 + |NXXXXXX 1 + |NXXNXXXXXX == Outgoing Settings == |Trunk Name |''vitel-outbound'' | Peer Details: type=friend dtmfmode=auto username=yourvitelityusername secret=yourvitelitypassword fromuser=yourvitelityusername trustrpid=yes sendrpid=yes canreinvite=no host=outbound.vitelity.net == Registration == :!: If your PBX will use IP Routing (recommended by Vitelity), do not enter a registration string. :!: If your PBX is behind a dynamic IP address (which changes occasionally), you do need a registration string since you can't use IP routing. Registration String: yourvitelityusername:yourvitelitypassword@inbound23.vitelity.net:5060 ===== Routes ===== ==== Inbound ==== |Description |''Default'' | |DID Number |The called number; usually your account number | |Set Destination |Usually an extension, ring group or IVR | ==== Outbound ==== |Route Name |''Default'' | |Emergency |Enabled if this route is used to call 911 | === Dial Patterns === * ''International'' * ''Long distance'' * ''Long distance (no 1)'' * ''Local'' * ''Emergency'' (only if e911 service is on this trunk) + |011. + |1NXXNXXXXXX + |NXXNXXXXXX + |NXXXXXX + |911 === Trunk Sequence for Matched Routes === Pick a trunk or two (vitel-outbound).