Example build and test environment for sipXconfig on Gentoo Linux
From SIPfoundry sipXecs IP PBX, The Open Source SIP PBX for Linux - Calivia
Create the build environment
If you want to use the Gentoo Linux environment to add a new gateway, you will have to create the proper build environment for the ant command to complete successfully. Here is a simple step-by-step example (We assume that you already successfully emerged sipxconfig and the other components of sipX):
| Code: Copy the sipXconfig source files to a proper location |
ebuild /usr/local/portage/net-misc/sipxconfig/sipxconfig-2.9.ebuild unpack cd /var/tmp/portage/ cp -a sipxconfig-2.9 /usr/src |
| Code: Create the build environment |
cd /usr/src/sipxconfig-2.9/work/sipxconfig-2.9 autoreconf -i -f ./configure JAVAC_DEBUG=on JAVAC_OPTIMIZED=off \ SIPXPBXUSER=sipxpbx \ --prefix=/usr/local/sipx \ --localstatedir=/var \ --with-sipxportinc=/usr/local/sipx/include \ --with-sipxportlib=/usr/local/sipx/lib \ --with-sipxmediainc=/usr/local/sipx/include \ --with-sipxmedialib=/usr/local/sipx/lib \ --with-sipxtackinc=/usr/local/sipx/include \ --with-sipxtacklib=/usr/local/sipx/lib |
Note: Just ./configure could work too.
Building sipXconfig
Running ant:
ant default test-all
or without unit tests:
ant default
Note: We have left out style from the ant command. The ant commant fails if style checks are performed (If you know why, please add it here)
Test your new features by running sipXconfig
| Code: Copy the new sipxconfig jar file into the correct environment |
cp /usr/src/sipxconfig-2.9/work/sipxconfig-2.9/neoconf/dist/sipxconfig.jar /usr/share/sipxpbx/lib cp /usr/src/sipxconfig-2.9/work/sipxconfig-2.9/web/dist/sipxconfig.war /usr/share/sipxpbx/lib |
The sipxconfig.war file is expanded into the Web Apache Root when sipxconfig is started. This file includes the sipxconfig.css stylesheet and some other html pages.
As an example, we assume you are working on implementing a Mediatrix 1204 gateway:
| Code: Copy the model description xml file into the correct environment |
cp /usr/src/sipxconfig-2.9/work/sipxconfig-2.9/neoconf/etc/mediatrix/mediatrix1204-gateway.xml /etc/sipxpbx/mediatrix |
You can now start sipXpbx:
/etc/init.d/sipxpbx start
Note: You do not need to re-compile sipxconfig as long as you work on the model xml file. The file is parsed when sipxconfig starts and therefore updates are reflected immediately.
Alternatively you can only start configServer:
| Code: Start sipXconfig only |
/usr/local/sipx/bin/sipxconfig.sh |
Note: Alternatively, sipxconfig can be built and run as described in SipX ConfigServer Quick and Dirty.
