Purpose
This mini howto describes the steps I had executed to execute in order to re-compile a debug version of Freeswitch on an CentOS 5 base ISO install of sipXecs.
...
Step 1: Add a new CentOS 5 yum repository
...
On a shell as user "root" edit create a new repository text file under /etc/yum.repos.d/CentOS5.repo to add this content:
CentOS5base
name=CentOS-5-Base
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=i386&repo=os
gpgcheck=0
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5CentOS5updates
name=CentOS-5-Updates
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=i386&repo=updates
gpgcheck=0
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5CentOS5plus
name=CentOS-5-Plus
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=i386&repo=centosplus
gpgcheck=0
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
...
Step 2: Rename the Freeswitch executable path
...
We want to keep Keep the original Freeswitch binary intact and create a debug version instead.
...
_FS_EXEC="/usr/local/freeswitch_debug/bin/freeswitch _
if [ ! -x /usr/local/freeswitch_debug/bin/freeswitch ]
echo "Error: FreeSWITCH executable is not at /usr/local/freeswitch_debug/bin/freeswitch" >&2
...
Step 3: Install the necessary RPMs in order to compile freeswitch
...
yum --enablerepo CentOS5base install gcc-c++.i386
yum --enablerepo CentOS5base install ncurses-devel.i386
...
Step 4: Download the freeswitch code and get ready to compile it
...
cd /tmp
wget http://latest.freeswitch.org/freeswitch-1.0.5-latest.tar.gz
...
./configure --prefix=/usr/local/freeswitch_debug
...
Step 5: Build and re-install your debug version of Freeswitch
...
cd /tmp/freeswitch-1.0.5-<date>-0400
...
# Restart the debug version of the Freeswitch process.
sipxproc -s FreeSWITCH
...
Step 6: Optionally use the Freeswitch console to get more debug output
...
One can turn full debug level tracing using the console and redirect the output on the console.
...