-
Notifications
You must be signed in to change notification settings - Fork 2
Build and Installation
This page documents the normal source build for GABPBX.
Do not edit generated configure or make scripts for a normal build. Use the
standard build method.
./configure
make menuselect
make
make installFor an already configured tree, this is also valid:
make installmake install builds pending objects first and then installs them.
For first-time lab installs only:
make samplesBe careful: make samples can overwrite existing files under /etc/gabpbx.
Use lowercase -j:
make -j$(nproc)Uppercase -J is not the GNU make parallel-build option.
default.exports is required by module link rules when GNU ld version scripts
are used. The file contains:
{
local:
*;
};
The rule in Makefile.rules calls:
build_tools/make_linker_version_script
That helper needs default.exports as the default symbol visibility script. If
the file is missing, builds can fail with:
cp: cannot stat '/opt/gabpbx/default.exports': No such file or directory
make[1]: *** [Makefile.rules:134: chan_agent.so] Error 1
The repository must track default.exports. .gitignore should ignore
generated *.exports files but explicitly allow the base file:
*.exports
!default.exportschan_sofia requires Sofia-SIP installed in the layout used by the current
make rules:
/usr/local/include/sofia-sip-1.13
/usr/local/lib
Library:
lsofia-sip-ua
In the GABPBX development layout, the Sofia-SIP source is normally available beside the GABPBX tree:
../sofia-sip
On this source server the absolute path is:
/home/sources/voip/futurepbx/sofia-sip
Build and install it into /usr/local:
cd ../sofia-sip
./configure --prefix=/usr/local
make
make install
ldconfigIf you are building from another checkout path, replace ../sofia-sip with the
real Sofia-SIP source path.
If Sofia-SIP is not installed, chan_sofia fails like this:
[CC] chan_sofia.c -> chan_sofia.o
chan_sofia.c:120:10: fatal error: sofia-sip/nua.h: No such file or directory
120 | #include <sofia-sip/nua.h>
| ^~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [/opt/gabpbx/Makefile.rules:108: chan_sofia.o] Error 1
make: *** [Makefile:369: channels] Error 2
This means the compiler cannot find Sofia-SIP headers. The missing header comes from Sofia-SIP's NUA API:
sofia-sip/nua.h
After installing Sofia-SIP, verify:
test -f /usr/local/include/sofia-sip-1.13/sofia-sip/nua.h
test -f /usr/local/lib/libsofia-sip-ua.so || test -f /usr/local/lib/libsofia-sip-ua.a
ldconfig -p | grep sofia-sip-uaThen run the normal GABPBX build again:
cd /opt/gabpbx
./configure
make menuselect
make -j$(nproc)
make installInside make menuselect, enable chan_sofia before running the final build:
Channel Drivers -> chan_sofia
Runtime rule:
noload => chan_sip.so
load => chan_sofia.soDo not load chan_sip and chan_sofia together.
codec_opus requires libopus and pkg-config.
Debian/Ubuntu package:
apt install libopus-dev pkg-configEnable:
Codec Translators -> codec_opus
Verify after startup:
*CLI> module show like opus
*CLI> opus show
Install only the libraries needed by the modules you select in menuselect.
Common useful packages on Debian/Ubuntu:
apt install build-essential pkg-config ncurses-dev libssl-dev zlib1g-dev
apt install libxml2-dev libsqlite3-dev libpq-dev unixodbc-dev
apt install libopus-dev libsrtp2-dev libspandsp-dev
apt install libspeex-dev libspeexdsp-devModule mapping:
| Dependency | Used by |
|---|---|
Sofia-SIP source installed to /usr/local
|
chan_sofia |
libopus-dev |
codec_opus |
libsrtp2-dev and res_srtp.so
|
SRTP/encryption |
libspandsp-dev |
fax/T.38 support through SpanDSP modules |
libpq-dev |
PostgreSQL realtime/CDR/CEL modules |
unixodbc-dev |
ODBC realtime/CDR/CEL/function modules |
libsqlite3-dev |
SQLite realtime/CDR modules |
libspeex-dev, libspeexdsp-dev
|
Speex codec and DSP functions |
test -f default.exports
test -d /usr/local/include/sofia-sip-1.13
test -f /usr/local/lib/libsofia-sip-ua.so || test -f /usr/local/lib/libsofia-sip-ua.a
pkg-config --libs opus*CLI> core show version
*CLI> module show
*CLI> module show like sofia
*CLI> module show like opus
*CLI> sip show settings
*CLI> sip show peers
SIP — chan_sofia
Subsystems
Realtime & data
Operations