From SME Server
Revision as of 23:00, 3 December 2021 by Gieres (talk | contribs)
Jump to navigationJump to search


original contributor: [1]Daniel B. from Firewall Services

last maintainer: [2]JP Pialasse


Devel 10:
Contrib 10:
Contrib 9:
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:
The latest version of freepbx-src is available in the SME repository, click on the version number(s) for more information.


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


  • You may want some hardware cards if you don't want your installation to be IP only. I've tested successfully the TDM400P, TDM410P and b410P (misdn) from Digium, but any card supported by DAHDI (should be anything working with zaptel) should work.


in progresss !!

install needed repo

yum install smeserver-extrarepositories-asterisk smeserver-extrarepositories-node smeserver-extrarepositories-rpmfusion   -y
db yum_repositories setprop node10 status enabled
signal-event yum-modify

configure the repos

 yum  install smeserver-freepbx --enablerepo=smecontribs,asterisk-common,asterisk-13,node10,rpmfusion,epel,smedev,smetest

source :

1. First, increase the php memory limit to at least 128M BEFORE the installation, or it will fail in the middle leaving it in an unstable state ( half mysql db installed, no modules activated).

db configuration setprop php MemoryLimit 128M
expand-template /etc/php.ini
service httpd-e-smith restart
2. Install the 4 yum repos necessary (asterisk-13,asterisk-current,digium-current,digium-13):
yum install smeserver-extrarepositories-asterisk -y
signal-event yum-modify
 signal-event yum-modify

3. Then the actual installation :

yum  install smeserver-freepbx --enablerepo=smecontribs,asterisk-13,asterisk-current,digium-current,digium-13

4. By default en language with ulaw are added. If you want voicemail to work you wil need to add what is needed for your language there. You may want to add some extra format and languages. (you might choose codec {alaw,ulaw,g722,gsm} you want and language {en,en_AU,fr,es}, see

Formerly, You could also manually download them latter through the Freepbx interface (first install Freepbx Sound Languages module,then go to Admin/Sound Languages). But this seems broken as per 2019/01/11, the xml list for the module to work are empty. See known issues if you need to install multiple langauge pack easily manually

yum install asterisk-sounds-core-fr-*  asterisk-sounds-extra-en-* --enablerepo=asterisk-current

5. This is the important step of the installation, the actual configuration and installation of files:

signal-event freepbx-update

6. Then you can start to configure and upgrade trough the interface in the server-manager it might also be necessary to reboot or relaunch asterisk to allow all modules to be launch:

signal-event post-upgrade; signal-event reboot

You may need to first install the ATrpms repository.

yum --enablerepo=smecontribs --enablerepo=atrpms install smeserver-freepbx dahdi-linux-kmdl-$(uname -r)
signal-event freepbx-update 
signal-event post-upgrade; signal-event reboot

source :


FreePBX is composed of 4 main parts: the main FreePBX interface, Recordings, Asterisk-Stats and Flash Operator Panel


This is the main web interface for asterisk configuration. This interface is available at https://server.domain.tld/freepbx/admin, or in the server-manager, under FreePBX menu. You'll need to login as admin (password of your admin's SME account) to access this part. You can grant the access to any user of the system using the userpanel contrib (just grant the user or the group the permission to access freepbx panel)


Recordings, is 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. The login here is your phone (extension) number and your voicemail password. There's also a special admin account. The admin account can access all call logs and recordings. The login is admin, the password is randomly generated, you can find it in /opt/freepbx/recordings/includes/main.conf.php


Starting SME9 we started to integrate the FreePPX backup in the SME Server backup system. The first backup of FreePBX module is now reserved to SME usage. SME will trigger at least once a month a bakcup of your whole PBX and store it in /home/e-smith/files/freepbx/Default_backup/. Up to 2 version will be kept there. Also, every time you trigger the event pre-backup (i.e., before console backup, or workstation backup from server-manager) a backup will be done without you worrying about it (unless FreePBX is disabled). To restore your PBX after migrating to a new SME or after a disaster, just restore your SME as usual, install the smeserver-freepbx contrib and open you server-manager to access to the FreePBX interface. GO to the backup module, choose restore and navigate to /home/e-smith/files/freepbx/Default_backup/ and choose the backup to use. Et voilà !

Asterisk Stats

Asterisk-Stats is an interface to query 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 (SME8)

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 colours, icons, etc). The FOP is available at https://server.domain.tld/panel or in the main interface in the "Panel" tab.

You can grant the access to any user of the system using the userpanel contrib (just grant the user or the group the permission to access fop panel)

DB parameters

Here's the list of DB parameters:

This contrib add 3 entries in the configuration db: freepbx, dahdi and fop. Here's a description of available parameters for each entry

  • freepbx
    • CdrDbName: the name of the database for CDR. The default is asteriskcdrdb. You should let this unless you know what you're doing.
    • 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 separately, and Users will be able to "login" to (ad hoc) devices. If disabled Devices and Users will me administered in a single screen. Removed since SME9. Use FPBX GUI to handle this.
    • 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 useful 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.
  • fop
    • status: (enabled|disabled) Should we start the FOP server with FreePBX ?
    • Password: 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 one on this db parameter) allow users to use drag/drop on the different items (transfer call, initiate a call, hangup etc...). The default password is a random generated one at install time.
    • TCPPort: This is the TCP port used for the communication between the flash applet and FOP daemon. The default is 4445
    • access: The default is to allow only connections from the local network. You can allow external IP if you configure public here (and if you do so, you should limit this access to a list of IP using the AllowHost key).
  • dahdi
    • status: (enabled|disabled) You should let this to enabled, even if you don't have any hardware card because some functions (like meetme) requires the dahdi_dummy driver to be loaded.
Important.png Note:
dahdi_dummy is no longer required as a 'timing' device (since Asterisk 1.6) . This has been solved by using other timing mechanisms automatically. So setting dahdi to disabled does no harm to meetme.

Related pages

You may be interested in the following how-to:

  • How-to configure your card using DAHDI
  • How-to configure your card using mISDN

Update Freepbx

To update your freepbx installation simply follow the procedure inside freepbx web interface. After every version update (from 2.5 to 2.6, etc.) you should run a

signal-event freepbx-update

in order to update file ownership according to SME specifications.

The way the contrib is designed, updating freepbx-src (i.e. from 2.5 to 2.7) won't update your working freepbx installation.


yum remove smeserver-freepbx freepbx-src

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


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 "     - /etc/freepbx.conf"
echo "     - /etc/amportal.conf"
echo "     - /var/lib/asterisk/bin/*"
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 "Removing /etc/freepbx.conf ..."
       rm -rf /etc/freepbx.conf
       echo "Removing /etc/amportal.conf ..."
       rm -rf /etc/amportal.conf     
       echo "Removing /var/lib/asterisk/bin/* ..."
       rm -rf /var/lib/asterisk/bin/*    
       echo "removing the crontab entry for asterisk"
       crontab -u asterisk -r
       echo "Done!"


If you need to re-install everything, you should completely remove the previous installation (remove the rpms and run the cleanup script.)

Known issues

SME8: Sounds

you might have some trouble with sounds not playing, after updates of freepbx. The problem is that freepbx in new release configures asterisk to search for sounds in /usr/share/asterisk/sounds but all rpm for centos will install them in /var/lib/asterisk/sounds

create a symlink for each folder in it and everything will works.

SME8: Dahdi-linux-kmdl

be carrefull to keep the kernel module up to date every time you have a new kernel release ( wait if they are not available)

SME8: FOP could not reload

if after installation you get this message just do a

service freepbx restart

and everything will get fine !

SME9: CDR logging not enabled by default

CDR logging is not enabled by default. To enable one must manually load the module:

Admin -> Asterisk Modules -> Manually loaded Modules -> Add module and enter the module name

SME9: /tmp owned by asterisk:asterisk

update to a version of smeserver-freepbx >=13.3 and this will be fixed

SME9: freepbx modules

if you need to install the digium addons from freepbx, you will first need to install the following RPM:

yum install php-digium_register --enablerepo-digium-current

Firewall addons does not work on SME, it requires Sysadmin RPM.

You may need to manually install the manager module. It should be a default module but I could not find it installed, and nothing appeared in the Module Admin.

fwconsole moduleadmin listonline
fwconsole ma downloadinstall manager

SME9: warnings during yum install

you can safely ignore any of the following warnings during the installation :

Installing : asterisk-sounds-extra-en-ulaw-1.4.11-1_centos6.noarch                                                                                                         22/45 
warning: user asterisk does not exist - using root


Installing : kmod-dahdi-linux-fwload-vpmadt032-2.9.0-1_centos6.2.6.32_279.14.1.el6.x86_64.x86_64                                                                           15/45 
WARNING: /lib/modules/2.6.32-573.26.1.el6.x86_64/weak-updates/dahdi-linux-fwload-vpmadt032/dahdi_vpmadt032_loader.ko needs unknown symbol vpmadtreg_unregister
WARNING: /lib/modules/2.6.32-573.26.1.el6.x86_64/weak-updates/dahdi-linux-fwload-vpmadt032/dahdi_vpmadt032_loader.ko needs unknown symbol vpmadtreg_register
WARNING: /lib/modules/2.6.32-573.8.1.el6.x86_64/weak-updates/dahdi-linux-fwload-vpmadt032/dahdi_vpmadt032_loader.ko needs unknown symbol vpmadtreg_unregister
WARNING: /lib/modules/2.6.32-573.8.1.el6.x86_64/weak-updates/dahdi-linux-fwload-vpmadt032/dahdi_vpmadt032_loader.ko needs unknown symbol vpmadtreg_register
WARNING: /lib/modules/2.6.32-642.1.1.el6.x86_64/weak-updates/dahdi-linux-fwload-vpmadt032/dahdi_vpmadt032_loader.ko needs unknown symbol vpmadtreg_unregister
WARNING: /lib/modules/2.6.32-642.1.1.el6.x86_64/weak-updates/dahdi-linux-fwload-vpmadt032/dahdi_vpmadt032_loader.ko needs unknown symbol vpmadtreg_register

they are only the result of the order choosen by yum for doing the install, and they do not impact the final result.

in /var/log/asterisk/freepbx.log you might see the following

[2016-06-10 12:14:08] ERROR[11265] res_pjsip_config_wizard.c: Unable to load config file 'pjsip_wizard.conf'

you can safely ignore it, or refer to in order to create your own.

SME9: install more language pack manually

In 2019, language sound module stop displayin available language packs. It seems that freepbx team has isue or stop populating their $xml = $this->getRemoteFile("/sounds-" . $base_version . ".xml"); file for fpbx13 : As a result sound lang module will display an empty list.

Just change MYLANG='fR' to your desired language.

mkdir /root/soundpacks
cd /root/soundpacks
wget -r -l 1 -c --no-directories --no-parent -A 'asterisk-*-sounds-'$MYLANG'-*' -R '*.txt,*sha1'
rm -f robots.txt
for OUTPUT in $(ls *-$MYLANG-* )
tar -xzf $OUTPUT -C /var/lib/asterisk/sounds/$MYLANG
chown asterisk:asterisk -R /var/lib/asterisk/sounds/$MYLANG

After that login to freepbx and add a custom language for your lang to be able to use it.

SME9: difficulty to upgrade

if you installed this contrib before 8/4/2017, you should issue the following command to exclude the php packages from asterisk-current repo. They could conflict with upstream packages and block your updates (php-pear(DB) = 1.7.13 Updated By: php-pear-DB-1.7.14-1_centos6.noarch (asterisk-current) Not found).

db yum_repositories setprop asterisk-current Exclude php-*
signal-event yum-modify

Migration from earlier versions

There is currently no upgrade path between versions. Backup/Restore will most likely not work. Apparently this is planned for v14+

In the meantime some notes on manually upgrading. This was based on moving from asterisk 1.8.x and an old version of FreepBX.

First, make sure you backup ABSOLUTELY everything. In different ways and in different places.

A straight copy of /etc/asterisk and /opt/freepbx plus a complete database dump at least.

It will be better if you have a completely clean install, preferably on a VM where you can snapshot the basic install and go back if you need to.

I took a copy of the freepbx DB and imported it completely into a different server. I could then do a side by side comparison of tables and data.

Here are some basic tables that you will need, though they may not all be required depending on your configuration


modules (for reference as to what you already have installed)
sip (most entries required, but manual checking required)
sipsettings (for reference - do not INSERT)
freepbxsettings (for reference - do not INSERT)

Trunks and Routes




Device and User mode


Extension mode

freepbx_users - does not exist in v13

I exported each table and a table from the new install to compare, particularly items like field lengths, and KEYS. Some old tables did not have Primary keys set.

I then copied the 'INSERT INTO' section into phpmyadmin/sql section on the new server.

If you swap from Extension to Device and User mode I found that once I had inserted the data I had to go into FreePBX, open each record, and Submit, finally followed by Apply Config. This seemed to update the DB.


Please see to adapt fail2ban to use blacklisted IP's worldwide.


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

IDProductVersionStatusSummary (10 tasks)
11940SME Contribs10.0RESOLVEDhuge amount of error cron mail
11924SME Contribs10.0RESOLVEDsoundlangs fails because of rpm root owned files
11923SME Contribs10.0CONFIRMEDallow change from php56 to php74
10703SME Contribs9.2CONFIRMEDUnknown column 'description' in 'field list'
10620SME Contribs9.2CONFIRMEDAsterisk not logging to CDR or CEL databases
10504SME Contribs9.2CONFIRMEDFreePBX proxy error on playing music files
10221SME ContribsFuturCONFIRMEDNFR: set php memory to 128M if inferior
10131SME Contribs9.0RESOLVEDafter uninstallation crontab generate a huge amount of error
9945SME Contribs9.1CONFIRMEDserver manager :not found if freepbx disabled
9756SME Contribs9.1RESOLVEDIf freepbx is set to disabled cron generates huge amount of emails


Only released version in smecontrib are listed here.

smeserver-freepbx Changelog: SME 10 (smecontribs)
2022/03/27 Jean-Philippe Pialasse 14-1.sme
- first version 14 [SME: 11613]

2021/11/10 Jean-Philippe Pialasse 13-17.sme
- first import to SME10 [SME: 11613]
- make it Freepbx 14 compatible [SME: 10705

 add dependencies for SME10 mariadb nodejs >= 10 php70*
remove missing rpms asterisk-sounds-extra-en-ulaw asterisk-resample asterisk-addons
remove double owned folders /etc/asterisk /var/lib/asterisk
systemd ready for asterisk(disabled), freepbx, httpd-fpbx
smeserver-freepbx-update event created NEED TEST
php70-php-fpm fragment
update httpd-fpbx template for php-fpm use
update httpd-e-smith to use php-fpm for fpbx
update install script for php74
add a copy of safe_asterisk
create php folders and set rights
improve logrotate

2020/01/20 Jean-Philipe Pialasse 13-16.sme
- add required modules to enable cel and cdr logging and search [SME: 10620]

- add requires lame [SME: 9859]

2018/01/29 Jean-Philipe Pialasse 13-15.sme
- fix warning tampered files in GUI [SME: 10496]

- remove DeviceAndUser property [SME: 10503]
2017/05/03 Jean-Philipe Pialasse 13-14.sme
- update TKT auth parameter for SME 9.2 [SME: 10268]