FreePBX

From SME Server
Revision as of 09:14, 18 March 2009 by VIP-ire (talk | contribs)
Jump to navigation Jump to search


Maintainer

Daniel B.
Firewall Services
mailto:daniel@firewall-services.com


Version

Contrib 10:
Contrib 9:
smeserver-freepbx
The latest version of smeserver-freepbx is available in the SME repository, click on the version number(s) for more information.


Contrib 10:
Contrib 9:
freepbx-src
The latest version of freepbx-src is available in the SME repository, click on the version number(s) for more information.


Description

FreePBX is a full-featured PBX web application. If you’ve looked into Asterisk, you know that it doesn’t come with any "built in" programming. You can’t plug a phone into it and make it work without editing configuration files, writing dialplans, and various messing about.

FreePBX simplifies this by giving you pre-programmed functionality accessible by a user-friendly web interfaces that allows you to have a fully functional PBX pretty much straight away with no programming required. Some of the features that FreePBX supports out of the box are:

  • Unlimited number of Voicemail boxes
  • "Follow Me" functionality
  • Ring Groups with calls confirmation (so if, eg, a cellphone is out of range and diverts to voicemail, all the other phones keep ringing)
  • Unlimited number of Conferences (limited by available CPU power - about 300 simultaneous users in conferences on a P4 3ghz - 600 with a dual core!)
  • Paging and Intercom functionality for man SIP phones that support it.
  • Music on Hold (via MP3s, or streamed off the internet)
  • Call Queues
  • And many other features


Requirements

  • SME Server 7.X

Installation

  Warning:
FreePBX will manage all asterisk configuration. If you have allready configured asterisk by hands, you should backup everything. Of course, you'll latter be able to customize some parts of the diaplan, but in special files. Also, FreePBX is NOT compatible with SAIL (it's an alternative)



  • Install the rpms
yum --enablerepo=smecontribs install smeserver-freepbx

You may also want to install dahdi drivers (it's the new name for zaptel) if you have an hardware card supported

yum --enablerepo=smecontribs install dahdi-tools dahdi-linux dahdi-linux-kmdl-$(uname -r)


  • Finish the installation

To finish the installation, you should issue the command

signal-event freepbx-update

The first time this event runs, ot'll install FreePBX. You'll installation's log in /root/freepbx_install.log

You should now be able to start using FreePBX on https://server.domain.tld/freepbx/admin

Components

FreePBX is composed of 4 main parts:

  • FreePBX itself, the main web interface for asterisk configuration. This interface is available at https://server.domain.tld/freepbx/admin
  • Recordings, it's a web based portal for users. You may configure some features of your phone here (followme, call forward, call waiting etc...), check you call history, or download/listen to your voicemail. This interface is available at https://server.domain.tld/recordings
  • Asterisk-Stats: This interface will let you analyse you CDR (Call Detail Reports) database. It's available on the main FreePBX interface at https://server/domain.tls/freepbx, on the "Reports" tab
  • Flash Operator Panel: Flash Operator Panel is a switchboard type application for the Asterisk PBX. It runs on a web browser with the flash plugin. It is able to display information about your PBX activity in real time. The layout is configurable (button sizes and colors, icons, etc). The FOP is available at https://server.domain.tld/panel or in the main interface in the "Panel" tab.

By default, only the admin user can access /freepbx/admin and /panel. You can grant this access to other users using smeserver-userpanels contrib.

DB parameters

Here's the list of DB parameters:

  • CdrDbName: the name of the database for CDR. The default is asteriskcdrdb. You should let this unless you know what you're doing
  • CdrDbPassword: the password to access the CDR database. A random value is generated at install time.
  • DbName: the name of the database for FreePBX. The default is freepbxdb. You should let this unless you know what you're doing
  • DbPassword: the password to access FreePBX database. A random value is generated at install time.
  • DbUser: the username to access both databases. Default is freepbxuser
  • DeviceAndUser: (enabled|disabled) You can enable the 'deviceanduser' display view of FreePBX. DeviceAndUser is enabled, Devices and Users will be administered seperately, and Users will be able to "login" to (adhoc) devices. If disabled Devices and Users will me administered in a single screen.
  • Fop: (enabled|disable) FOP requires a small daemon to be started. You can disable it if you don't want to use FOP.
  • FopPassword: This is the additional password for FOP. There's a first password needed to access FOP (by default, only admin is allowed). This first password is your SME account password. The second password (the onde on this db parameter) allow users to use drag/drop on the differents items (transfert call, initite a call, hangup etc...). The default password is a random generated one at install time.
  • ManagerPassword: This is the asterisk manager password used by freepbx (the login is 'admin'). The default one is randomly generated at install time.
  • UDPPorts: Lists of ports used by asterisk. This settings is only usefull if you want to open asterisk on the public interface (you can also restrict it with AllowHost parameter)
  • access: (private|public). if you want to open asterisk on the public interface, you can set this to public.
  • status: (enabled|disabled). Should asterisk (with FreePBX provided helper script) should be started automatically.


Uninstall

yum remove smeserver-freepbx freepbx-src

If you want to cleanup everything (MySQL databases, DB, etc...), you can use this script:


#!/bin/bash

clear
echo "----------------------------"
echo "!!!!!     WARNING     !!!!!"
echo "----------------------------"
echo ""
echo "This script will remove from your server:"
echo "     - freepbx and asterisk cdr MySQL databases"
echo "     - freepbx MySQL User"
echo "     - freepbx DB entries (freepbx, httpd-fpbx and dahdi)"
echo "     - /opt/freepbx"
echo ""
echo -n "Are you sure you want to remove FreePBX permanently ? (y/n) [n] "
read confirm
if [ "$confirm" = "y" -o "$confirm" = "Y" ]; then
       echo "Droping MySQL databases..."
       DBNAME=$(/sbin/e-smith/db configuration getprop freepbx DbName)
       CDRDBNAME=$(/sbin/e-smith/db configuration getprop freepbx CdrDbName)
       mysql -e "DROP DATABASE $DBNAME"
       mysql -e "DROP DATABASE $CDRDBNAME"
       echo "Deleting MySQL User..."
       DBUSER=$(/sbin/e-smith/db configuration getprop freepbx DbUser)
       mysql -u root -e "REVOKE ALL PRIVILEGES ON *.* FROM '$DBUSER'@'localhost';"
       mysql -u root -e "DROP USER '$DBUSER'@'localhost';" > /dev/null 2>&1
       echo "Removing SME DB entries..."
       /sbin/e-smith/db configuration delete freepbx
       /sbin/e-smith/db configuration delete httpd-fpbx
       /sbin/e-smith/db configuration delete dahdi
       echo "Removing /opt/freepbx ..."
       rm -rf /opt/freepbx
       echo "Done!"
fi 


Source

The source for this contrib can be found in the smeserver CVS on sourceforge.

Bugs

Please raise bugs under the SME-Contribs section in bugzilla and select the smeserver-freepbx component or use this link