Most unix/linux distribution already goes with all the dependency requirement for OpenSBC and OpenSIPStack to build properly out of the box. Technically, its just a matter of running the ‘configure’ script before running a ‘make bothnoshared’.
Compile opensipstack first before compiling opensbc using the steps below.
unix-shell>#./configure
There might be instances when file run permissions are not properly set for the configure script either due to previous commits from a windows source or your CVS client was not able to properly preserve the file attributes. If you are unable to run the configure script properly, you may do one of two things. Do a ‘chmod +x ./configure’ or you may regenerate the file by issuing an autoconf within the opensipstack directory. The latter should regenerate a fresh copy of the configure script from the configure.ac autoconf template.
If all goes well with the configuration boot strap all that required to be done is
unix-shell>#make bothnoshared
or for Solaris and FreeBSD users
unix-shell>#gmake bothnoshared
CAVEAT: Most operating systems already has expat installed. If the configure script complains about not finding the expat library, please install expat 2.0 (or higher) development package. OpenSIPStack goes with a built-in expat source but this is intended for use with windows builds.
CAVEAT: For OpenSolaris users, you might need to define the CC variable to
use gcc instead of default ‘cc’ compiler that ships with solaris.
solaris-shell>#gmake bothnoshared CC=gcc
OpenSIPStack and OpenSBC goes with project files for Visual C++ 7.10 and Visual C++ 8.0. If you don’t have access to any of these compilers Visual C++ Express Edition is available for free here. When using Visual Studio 8.0, make sure you open the solution name opensipstack.sln and not opensipstack-7.10.sln to avoid Visual Studio 8.0 from converting the solution to the recognized format. Compile the Release build first followed by the Debug build. The sequence is important. There are known issues with the Debug build regarding Custom Build Steps.
CAVEAT: Take note that as of version 1.1.4 Visual Studio 7.10 projects files are no longer supported. If you are using these project files, you may need to manually modify the project files to include missing .cxx files.
When the compile process has started there will be five Custom Build Steps that will be performed.
—— Build started: Project: OpenSIPStack, Configuration: Release Win32 ——
Copying Flex.exe ...
Copying Bison.simple ...
Copying Bison.hairy ...
Copying Bison ...
Copying Expat.dll ...
Copying Sqlite3.dll ...
These Custom Build Steps will copy the Sqlite and Expat Libraries to $(SystemRoot)/system32/. Flex and Bison files would be copied in C:/Tools. Important Warning!!!: If you already have sqlite3.dll and expat.dll in system32 and some other applications rely on these two files, it is best that you EXCLUDE these files from the Custom Buid Process. All custom build files are located in “Make/Custom Build” folder in the project explorer tab of Visual C++ 8.0. Version conflicts may arise if your copy is of different from the Expat and SQLite3 DLL’s that goes with opensipstack. You need to either upgrade your local copy or try changing the header files in the opensipstack/external folder to your specific version and hope for the best.
After the Custom Build Steps have been performed, the configuration bootstrap will start searching for existing SDK and libraries installed in your system. My compiler displays this information after the configure script has finished searching.
Searching C:\
Located IPv6 Support at C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\PocketPC2003\Include\
Located DNS Resolver at C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\
Located QoS Support at C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\
Searching X:\
Located OPAL at X:\dev\opensipstack\
Located MYACMLIB at X:\dev\opensipstack\external\codecs\
Located VOICEAGE at X:\dev\opensipstack\external\codecs\
Located SQLITE at X:\dev\opensipstack\external\CppSQLite\3.1\Common\
Located CPPSQLITE at X:\dev\opensipstack\external\CppSQLite\3.1\Common\
Located Expat XML at X:\dev\opensipstack\external\Expat-2.0.0\
Located LibJingle at X:\dev\opensipstack\external\jingle\talk\
If all goes well, with the configuration, OpenSIPStack should start compiling, hopefully, without any problem.
Most Recently, a new build configuration for Windows 64-bit has been added to the Visual C++ 8.0 project. Aside from some benign warning about data truncation,
1>.\src\pwlib\src\ptlib\common\regex\regcomp.c(122) :
warning C4267: ‘=’ : conversion from ‘size_t’ to ‘sopno’, possible loss of data
there shouldn’t be any trouble compiling OpenSBC in a 64-bit setting.
CAVEAT: Windows.h missing
is a compile error commonly reported in the mailing list. This may
happen in Visual Stdio 2005 Express edition of visual C++. Windows.h
goes with the Platform SDK and is available via a separate installation here http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/.
CAVEAT: Windows Vista
might not allow the configure script to copy SQLite.dll and Expat.dll
to the system folder. To circumvent this, right click on the Visual
Studio 2005 icon in the menu and click “Run as Administrator”. This
would give Visual studio temporary write access to the system folders.
OpenSBC accepts the following command line switches.
Running OpenSBC in console
#./opensbc -xc
Running OpenSBC as a daemon
#./opensbc -d -p pidfile.txt
Running OpenSBC using a specific config file
#./opensbc -d -p pidfile.txt -i opensbc.ini
Running OpenSBC using a custom HTTP Admin port
#./opensbc -d -p pidfile.txt -i opensbc.ini -P 4040
Stopping OpenSBC Process
#./opensbc -k -p pidfile.txt
#./opensbc -s -p pidfile.txt
Running OpenSBC in Windows
OpenSBC accepts the following command line arguments in windows