Table of Contents

Build a PBX with YUM Using CentOS, Asterisk and a GUI

Documentation

https://wiki.asterisk.org/wiki/display/AST/Asterisk+10+Documentation

https://wiki.asterisk.org/wiki/display/AST/Asterisk+Packages

Hosted VPS

http://tutorialsbay.com/how-to-isntall-asterisk-freepbx-on-a-vps/

If you are starting from a preinstalled CentOS server:

yum groupremove 'DNS Name Server'
yum groupremove 'Editors'
yum groupremove 'Legacy Network Server'
yum groupremove 'Mail Server'
yum groupremove 'Network Servers'
yum groupremove 'System Tools'
yum groupremove 'Text-based Internet'
yum groupremove 'Web Server'
yum groupremove 'Windows File Server'

yum remove yum-updatesd cups cups-lpd redhat-lsb autofs pcsc-lite smartmontools cpuspeed avahi

ln -sf /usr/share/zoneinfo/America/Phoenix /etc/localtime

Now skip the next section…

Minimal CentOS 5 Install

Do a Minimal Install of Centos 5 x64.

I generally disable IPv6 since I've never used it on a PBX.

After the reboot:

yum update -y

then reboot again.

Security

http://www.freepbx.org/support/documentation/howtos/howto-setup-a-remote-sip-extension

Disable selinux:

setenforce 0

vim /etc/selinux/config

SELINUX=disabled

Firewall

FIXME

vim /etc/sysconfig/iptables

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 8088 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 4445 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 5060:5061 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 10000:20000 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 4569 -j ACCEPT

service iptables reload

iptables -nL

RepoForge Repository

Here we add the RepoForge Repository (x64) needed to install mpg123:

wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
rpm -ivh rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
rm -f rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm

Now e disable the repo so it doesn't pollute anything later:

vim /etc/yum.repos.d/rpmforge.repo

enabled=0

Install Asterisk

:!: Digium now provides separate repositories for different Asterisk versions (1.4, 1.6, 1.8 and 10).

:!: Once you install an Asterisk version, its repo will be enabled permanently.

Check for updates and additional (64-bit) packages here and Asterisk 10 packages here.

yum install --enablerepo=rpmforge dnsmasq mpg123

rpm -Uvh http://packages.asterisk.org/centos/5/current/x86_64/RPMS/asterisknow-version-2.0.0-4_centos5.noarch.rpm

http://www.voip-info.org/wiki/view/Asterisk+addon+asterisk-addons

The asterisk-addons and asterisk-sounds-extra packages are optional. They include MySQL support for call detail records and MP3 support for Music on Hold (MOH) as well as additional pre-recorded sounds.

The following command also installs ulaw formatted sounds to reduce transcoding and documentation (at the expense of disk space).

yum install --enablerepo=asterisk-10 asterisk asterisk-configs asterisk-addons \
asterisk-sounds-core-en-ulaw asterisk-sounds-extra-en-gsm asterisk-sounds-extra-en-ulaw \
dahdi-tools dahdi-tools-doc

:!: Once installed, you can search for additional asterisk-related packages using a web browser to the repo URLs or at the command line with YUM:

yum search asterisk

Upgrading

yum update

PBX Management

:!: If you're 'virtual', take a snapshot or backup now!

Asterisk GUI

Install

yum install asterisk-gui

reboot

Configuration Backup

cp -avr /etc/asterisk /etc/asterisk.orig

Configure

Be sure the firewall is open on port 8088.

Replace xxx.xxx.xxx.xxx with the IP of your PBX.

http://xxx.xxx.xxx.xxx:8088/static/config/index.html

:!: The default username and password are admin / password.

:!: After logging in and changing the password, reboot.

reboot

See Asterisk-GUI Configuration.

FreePBX

Install

yum install asterisk-addons freepbx*

reboot

Configure

Be sure the firewall is open on ports 80 and 443.

Replace xxx.xxx.xxx.xxx with the IP of your PBX.

http://xxx.xxx.xxx.xxx

:!: The default username and password are admin / admin.

:!: See FreePBX Configuration.

Timing Sources

https://wiki.asterisk.org/wiki/display/AST/Timing+Interfaces

List existing modules:

ls /usr/lib/asterisk/modules

asterisk -vvvvvvvvr

*CLI> module show like timing

Show current timing source from the Asterisk CLI:

asterisk -vvvvvvvvr

*CLI> timing test

Modify order of timing sources:

vim /etc/asterisk/modules.conf

[modules]
preload => res_timing_timerfd.so
preload => res_timing_dahdi.so
preload => res_timing_pthread.so