Guide to installing chan_sccp and SCCP Manager on FreePBX 16

Hi All,

Here is my latest guide to doing this. WHY would anyone want to do this and why am I documenting it?

  1. Someone may have an old Cisco 7940 or 6921 phone stuck on old sccp code they can’t update to sip code
  2. chan_sccp was supposedly modified to support SIP very late in it’s development.
  3. chan_sccp also supports all the Callmanager functions that Cisco phones require. In other words not only does it support the VoIP protocol, it supports Cisco’s weird “enterprise” registration protocol which is different than industry standard
  4. chan_sccp works on all versions of Asterisk including 21. These instructions are for version 20 but “reports of chan_sccp’s death are greatly exaggerated”
  5. Dave Burgess who used to post a lot on this and started the driver, passed and this is a bit of a tribute to him
  6. The chan_sccp manager is a complete implementation of a FreePBX module. Reviewing the code is a good teaching experience on how to write your own custom FreePBX module
  7. The chan_sccp Manager module integrates both endpoint provisioning AND extension configuring inside of Asterisk by FreePBX. This is different than how FreePBX’s modules handle pjsip where the endpoint and Asterisk configuration are handled by separate modules.
  8. The chan_sccp channel driver is a complete, working implementation of an Asterisk channel driver. Reviewing the code is a good teaching experience on how to write your own custom VoIP channel driver
  9. Lastly, the instructions on the chan_sccp site don’t really work all that well unless you are doing a very stripped build from scratch FreePBX install. These instructions approach are as a bolt-on to the existing FreePBX 16 distro

Start with the SNG7-PBX16-64bit-2302-1.iso and install it on your preferred hardware. I used a qemu VM

Open an SSH terminal session as root and:

yum groupinstall "Development Tools"
yum install sangoma-devel16
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
echo '%_topdir %(echo $HOME)/rpmbuild' > ~/.rpmmacros

At this point you might want to shutdown take a backup or snapshot if you are on a VM

asterisk-version-switch
select asterisk 20
y

asterisk -r  

use the asterisk version obtained for yumdownloader and rpm command

cd ~/rpmbuild/SOURCES
yumdownloader --source asterisk20-20.5.2
rpm --nomd5 -ivh ~/rpmbuild/SOURCES/asterisk20-20.5.2-1.sng7.src.rpm
yum-builddep ~/rpmbuild/SPECS/asterisk20.spec
rpmbuild -bp ~/rpmbuild/SPECS/asterisk20.spec
rpmbuild -bp ~/rpmbuild/SPECS/asterisk20.spec
rpmbuild -ba ~/rpmbuild/SPECS/asterisk20.spec
rpm -Uvh ~/rpmbuild/RPMS/x86_64/asterisk20-20*.rpm --force
rpm -Uvh ~/rpmbuild/RPMS/x86_64/asterisk20-[a-l]*.rpm --force
rpm -Uvh ~/rpmbuild/RPMS/x86_64/asterisk20-[n-r]*.rpm --force
rpm -Uvh ~/rpmbuild/RPMS/x86_64/asterisk20-t*.rpm --force
rpm -Uvh ~/rpmbuild/RPMS/x86_64/asterisk20-voicemail-20*.rpm --force
fwconsole chown
fwconsole restart

Now you have an Asterisk system that has all of the needed headers and so on for building, plus Asterisk binaries that are branded to the system. Next step is compiling the chan driver which will have the same branding thus Asterisk will load it

cd ~/rpmbuild/SOURCES
git clone https://github.com/chan-sccp/chan-sccp chan-sccp
cd chan-sccp
./configure --enable-conference --enable-video     # check './configure --help' for more options
make -j2
make install
fwconsole restart

(this puts the installed chan_sccp.so to '/usr/lib64/asterisk/modules)
Access FreePBX
do initial login and cancel activation then apply config and abort firewall and go to FreePBX desktop

Go to Admin, Asterisk Modules

add chan_skinny.so to Excluded Modules, logout at command prompt,

/sbin/reboot

When system reboots SSH into system

asterisk -r

freepbx*CLI>

module show like chan

Make sure the chan_sccp.so module is showing as loaded:

chan_sccp.so                   Skinny Client Control Protocol (SCCP). R 0          Running          extended

exit

Another way of doing this is login to FreePBX and click Reports, Asterisk Info. SCCP should be listed

If you are concerned the module loaded is the “wrong” module you will find the /usr/lib64/asterisk/modules/chan_sccp.so is
the only instance of this file in the system

If you are concerned chan_sccp.so might NOT load in FreePBX you can

Via the FreePBX GUI navigate to Admin->Asterisk Modules,

under ‘Manually Loaded Modules’ add chan_sccp.so

But for some reason FreePBX seems to load this. Not sure why maybe there’s a wildcard somewhere in a config file or there’s a module dependency in some other module that loads chan_sccp.

In FreePBX, click Connectivity, Firewall. If the Firewall is not enabled then you don’t have to do anything If the Firewall IS enabled then add a port for it via instructions here:

https://github-wiki-see.page/m/chan-sccp/chan-sccp/wiki/FreePBX_Firewall

During the installation of chan-sccp a sample sccp.conf will already have been copied to /etc/asterisk.

For other examples files check the ~/rpmbuild/SOURCES/chan-sccp/conf directory.

Some sample phones are defined in there. You can define more in there or install the module to manage extensions in chan_sccp from the module mentioned here:

Next install the module mentioned in those instructions:

First make sure you are running php 7, at the command line:

php --version

Load the database tables by doing:

cd ~/rpmbuild/SOURCES/chan-sccp/conf/

make sure that mysql-v5_enum.sql exists

mysql asterisk < mysql-v5_enum.sql

This creates the tables:

sccpdevice
sccpdeviceconfig
sccpline

cd ~/rpmbuild/SOURCES

wget https://github.com/chan-sccp/sccp_manager/archive/refs/tags/Legacy-v2.tar.gz

(do this to make sure to backup the source)

Note from the message here:

His recommendation is to install the Develop version not Stable of chan_sccp manager so do that.

Note that the tftp server must be installed and active or the develop version blows up on installation

To install it:

yum install tftp tftp-server* xinetd*

edit /etc/xinetd.d/tftp file and change disable line to no

systemctl restart xinetd

The legacy SCCP module installs the MySQL tables:
sccpbuttonconfig
sccpsettings
sccpuser

the dev one also installs tables

sccplineconfig
sccpdevmodel

log in to FreePBX
Go to Admin → Module Admin
Click Upload Modules.
Enter the following url: https://github.com/chan-sccp/sccp_manager/archive/refs/tags/Legacy-v2.tar.gz
or
https://github.com/chan-sccp/sccp_manager/archive/refs/heads/develop.zip
(the second one is preferred)
Click Download From Web.
Click Manage Local Modules.
Find and click SCCP Manager. Check Install. Click Process button.
Confirm installation.
Close Status window.
Apply Config to FreePBX.

There will be a new button at the top “sccp connectivity”

Ignore the error message about "Module “SCCP Manager” is unsigned and should be re-downloaded. I put a ticket in about this here:

https://github.com/chan-sccp/sccp_manager/issues/97

If running the Legacy manager, click on SCCP Info and note and resolve the error messages:

MySql
Increase Mysql Group Concat Max. Length
Step 1: Go to mysql path
nano /etc/my.cnf
Step 2: And add the following line below [mysqld] as shown below

[mysqld] 
group_concat_max_len = 4096

or more

Step 3: Save and restart
systemctl restart mariadb.service
Or
service mysqld restart

In the Develop manager, the only error after the above is resolved is:

TFTP_Mapping off TFTP mapping is available but the mapping file is not included in tftpd-hpa default settings.
To enable Provision mode, add option
-m /etc/asterisk/sccpManagerRewrite.rules
to the tftpd defaults, (location dependant on the system), and restart the tftpd server

add -m /etc/asterisk/sccpManagerRewrite.rules after the -s /tftpboot in /etc/xinetd.d/tftp and restart it

systemctl restart xinetd

in /etc/asterisk/sccp.conf remove all of the phone definition section (actual definitions)

logout of FreePBX
/sbin/reboot

Read everything in https://github.com/chan-sccp/sccp_manager?tab=readme-ov-file
then read everything in the link on that page:
https://github.com/chan-sccp/chan-sccp/wiki/Using-SCCP_Manager-to-Manage-chan-sccp

Done. Hopefully this helps someone!

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.