FreePBX_Installation - chan-sccp/chan-sccp GitHub Wiki
The installation of Chan-SCCP from source has been simplified to the point that the preferred method is always installation from source. Chan-SCCP Versions since 4.1 automatically take into account the various versions of Asterisk and install correctly based on that.
Note: Centos 5 / 6 Only
You have to update the compiler suite on your system before compiling chan-sccp-b. Gcc >= 4.4 is required. Follow the instructions on Update Compiler - Devtools on CentOS If you skip this step, you will experience problems with both asterisk as well as chan-sccp-b !
Requirements
To be able to compile a new module like chan-sccp against asterisk, we require that the asterisk header files are installed you your system. These header files can be found in a package called 'asterisk-devel' or 'asterisk-dev'. You need to your your platforms package manager to install these files. On Centos this would look like:
yum update
yum upgrade
yum install git asterisk-devel autoconf automake gcc
or when running a specific asterisk version, like asterisk-13 (check with rpm -qa | grep asterisk
)
yum update
yum upgrade
yum install git asterisk13-devel autoconf automake gcc
or asterisk-16:
yum install git asterisk16-devel autoconf automake gcc
Why is this necessary, you might ask? First, you need to install 'git' so that you can download the source from GitHub. You will need the -devel package to match the Asterisk RANDOM key value so that your compiled channel driver will be loadable. Both these rpm's have to be build at the exact same time. Not two separate runs. That will not work. During compilation asterisk puts a RANDOM value in their binaries, and this RANDOM value has to be the same for all modules. So the chan-sccp also has to copy this 'RANDOM' value from the asterisk-devel package, while compiling for the module to be allowed to load. Maybe this helps clarify things If the RANDOM value does not match, asterisk will complain and fail when loading the chan-sccp module. So do make sure that your asterisk??.rpm and asterisk??-devel.rpm are from the same repository and build.
rpm -qa |grep asterisk
should tell you which asterisk version is installed.
DHCP
If you are going to be running a dhcp server on the FreePBX server, you will need to install it and set it up.
yum install dhcp
cat > /etc/dhcp/dhcpd.conf << EOF
default-lease-time 86400;
max-lease-time 172800;
option cisco-tftp code 150 = array of ip-address;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.150 192.168.1.200;
option domain-name-servers 192.168.1.1;
option routers 192.168.1.1;
option cisco-tftp 192.168.1.2;
next-server 192.168.1.2; # this is the 66 option
}
EOF
systemctl start dhcpd
systemctl enable dhcpd
Note: the ip-addresses in the example content above need to be adjusted to your local installation. See: setup-dhcp-service for more information.
TFTP
To provision the phones with their config file, we need to have a tftp server. To make sure a tftp-server is installed we run:
yum install tftp tftp-server* xinetd*
After that we have to update/edit the /etc/xinetd.d/tftpd file to enable the tftp server. You should only have to change the disable line to "no". It should look something like:
service tftp
{
id = tftp
socket_type = dgram
protocol = udp
user = root
wait = no
disable = no
server = /usr/sbin/in.tftpd
server_args = /tftpboot
FLAGS = IPv6 IPv4
}
After the change
Then restart xinetd
systemctl restart xinetd
Source Based Installation
The first step in the source install is downloading the source for the latest stable release or directly from github.
Get the tar file or Git files you need and place them in the source directory with the root of the Asterisk source directory. For most installations, the base directory for installation will be /usr/src. Perform the actions below, which download the initial GIT source tree and copying it into the /usr/src directory.
cd /usr/src
git clone https://github.com/chan-sccp/chan-sccp chan-sccp
cd chan-sccp
Note: Once you have done the initial git clone, you can use 'git pull' later on, to get the latest updates/revisions.
Other than that, continue the "Quick Installation" from point 3 instructions below, to configure and compile. You may also want to recompile the Asterisk sources from time to time to make sure that the libraries associated with the Asterisk source are maintained (This is required when the asterisk source files have changed).
Quick Installation
Installing Chan-SCCP on FreePBX derivative systems is quite simple. The general instructions are:
- download the source for chan-sccp that corresponds to your version of Asterisk and un-tar it
- 'cd' into the source directory
- execute:
./configure --enable-conference --enable-video # check './configure --help' for more options
make -j2
make install
If you are running into an error/warning stating 'astmoddir could not be found' then please check this page, to resolve the issue.
- Setting the asterisk modules to be loaded.
Depends on the version of FreePBX you are using:
If you have installed FreePBX >= 12 (Recent):
Via the FreePBX GUI navigate to Admin->Asterisk Modules, under
- under 'Excluded Modules' add chan_skinny.so
- under 'Manually Loaded Modules' add chan_sccp.so
This looks like:
Otherwise if you have an old FreePBX <= 11 version:
edit the /etc/asterisk/modules.conf file. Add:
noload = chan_skinny.so
load = chan_sccp.so
Note: If you are using (FreePBX 15). Pay attention! This is relevant until core module version at least 15.0.9.47 will be available in FreePBX stable.
This is FreePBX version 15 only related bug, that prevent you from changing settings in "Asterisk Modules" (step 4c). So you simply can't exclude chan_skinny.so (or any other module). To fix this FreePBX core module version 15.0.9.47 was released See. Until core module version in stable FreePBX repository is less than 15.0.9.47, you need to install fixed core module from so called "edge" branch (unstable repository). Simply run this command to upgrade core module from "edge" truck/repository.fwconsole ma --edge upgrade core
More details here.
- create/copy a sccp.conf config file
During the installation of chan-sccp a sample sccp.conf will already have been copied to /etc/asterisk. For other examples files check the /usr/src/chan-sccp/conf directory.
Note: If you are going to be using
sccp_manager
plugin, then you only need a very minimal sccp.conf (with just the [general] section). When you ran chan-sccp's:make install
it will have already installed a minimal sccp.conf example file for you, so you can skip the next part.
- Recent versions of FreePBX, do not permit incoming connections to port 2000/TCP (used for Skinny/SCCP traffic) so you will have to make a reservation this in the freepbx firewall. See FreePBX Firewall on how to add this port.
Note: If you are using a different port in sccp.conf, you will have to update the information appropriately.
- Go to FreePBX_SCCP-modules and install the sccp_manager plugin