Difference between revisions of "Building recon"

From reSIProcate
Jump to navigation Jump to search
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
===Setting up the build environment===
 
===Setting up the build environment===
 
You build directory structure should be setup as follows:
 
You build directory structure should be setup as follows:
  /resip/                      <- https://svn.resiprocate.org/rep/resiprocate/main
+
  /resip/                      <- https://github.com/resiprocate/resiprocate
 
  /resip/contrib/openssl      <- Open SSL 1.0.1 or above (required for DTLS-SRTP support) (required in this location for Windows builds only)
 
  /resip/contrib/openssl      <- Open SSL 1.0.1 or above (required for DTLS-SRTP support) (required in this location for Windows builds only)
 
  /resip/contrib/boost        <- BOOST 1.34.1 or above (required in this location for Windows builds only)
 
  /resip/contrib/boost        <- BOOST 1.34.1 or above (required in this location for Windows builds only)
Line 11: Line 11:
  
 
# Go to directory where you want to create build env.
 
# Go to directory where you want to create build env.
# svn checkout https://svn.resiprocate.org/rep/resiprocate/main resip
+
# git clone https://github.com/resiprocate/resiprocate resip
 
# svn checkout https://scm.sipfoundry.org/rep/sipX/main sipXtapi
 
# svn checkout https://scm.sipfoundry.org/rep/sipX/main sipXtapi
 
# Obtain Open SSL version 1.0.1 or higher and place in contrib/openssl - (for Windows try this distribution: http://slproweb.com/products/Win32OpenSSL.html)
 
# Obtain Open SSL version 1.0.1 or higher and place in contrib/openssl - (for Windows try this distribution: http://slproweb.com/products/Win32OpenSSL.html)
Line 25: Line 25:
 
         that is the best place to start.  The recon readme.txt contains the
 
         that is the best place to start.  The recon readme.txt contains the
 
         minimum SVN revision number of sipXtapi that is required.
 
         minimum SVN revision number of sipXtapi that is required.
 
 
====To build openSSL for windows using VS2003====
 
# Use VS2003 Command Prompt window - Note: 0.9.8g will not build Crypto ASM fns with VS2003 MASM - we will build openssl with no ASM
 
# From openssl root run: perl Configure VC-WIN32 enable-tlsext
 
# Run: perl util\mkfiles.pl >MINFO
 
# Run: perl util\mk1mf.pl no-asm debug VC-WIN32 > d32.mak
 
# Run: perl util\mk1mf.pl no-asm VC-WIN32 > 32.mak
 
# Run: nmake -f d32.mak
 
# Run: nmake -f 32.mak
 
 
====To build openSSL for windows using VS2005/2008/2010====
 
# Use VS2005/2008/2010 Command Prompt window
 
# From openssl root run: perl Configure VC-WIN32 enable-tlsext
 
# Run: ms\do_masm
 
# Run: perl util\mkfiles.pl >MINFO
 
# Run: perl util\mk1mf.pl debug VC-WIN32 > d32.mak
 
# Run: perl util\mk1mf.pl VC-WIN32 > 32.mak
 
# For VS2010 only:  Edit e_os.h file in the root dir, find the line with EADDRINUSE in it and comment it out.
 
# Run: nmake -f d32.mak
 
# Run: nmake -f 32.mak
 
  
 
===Building recon on Windows===
 
===Building recon on Windows===
 
# Ensure the build environment is setup as indicated above.
 
# Ensure the build environment is setup as indicated above.
# Use
+
# Open the appropriate recon_XX_X.sln Visual Studio solution file. Allow the sipXtapi project files to migrate/upgrade to the proper visual studio version.
##recon_7_1.sln Visual Studio 2003 solution file or
 
##recon_8_0.sln Visual Studio 2005 solution file or
 
##recon_9_0.sln Visual Studio 2008 solution file or
 
##recon_10_0.sln Visual Studio 2010 solution file
 
 
# Open the sipXmediaAdapterLib project settings and enable the following defines by removing the 'xx' characters from the Preprocessor defines.  You should do this for both Debug and Release project settings.  Note:  newer version of sipXtapi projects default to this configuration already, so this step may not be necessary.
 
# Open the sipXmediaAdapterLib project settings and enable the following defines by removing the 'xx' characters from the Preprocessor defines.  You should do this for both Debug and Release project settings.  Note:  newer version of sipXtapi projects default to this configuration already, so this step may not be necessary.
 
## DISABLE_DEFAULT_PHONE_MEDIA_INTERFACE_FACTORY
 
## DISABLE_DEFAULT_PHONE_MEDIA_INTERFACE_FACTORY
Line 61: Line 36:
 
## Modify your base Visual Studio settings for include paths - add an include path to \resip\contrib\pcre
 
## Modify your base Visual Studio settings for include paths - add an include path to \resip\contrib\pcre
 
## Modify the Additional Include Directories settings of the sipXmediaAdapterLib, sipXmedaLib and sipXportLib projects to include: ";..\..\resip\contrib\pcre"
 
## Modify the Additional Include Directories settings of the sipXmediaAdapterLib, sipXmedaLib and sipXportLib projects to include: ";..\..\resip\contrib\pcre"
## Modify the Additional Library Directories link settings of the sipXportLib project to point to ..\..\resip\contrib\pcre\Debug or ..\..\resip\contrib\pcre\Release appropriately.
+
## Modify the Additional Library Directories link settings of the sipXportLib project to point to ..\..\resip\resip\recon\Win32\SSL-Debug\ or ..\..\resip\resip\recon\Win32\SSL-Release\ appropriately.
 
# Build solution.
 
# Build solution.
  

Latest revision as of 20:50, 12 July 2018

Setting up the build environment[edit]

You build directory structure should be setup as follows:

/resip/                      <- https://github.com/resiprocate/resiprocate
/resip/contrib/openssl       <- Open SSL 1.0.1 or above (required for DTLS-SRTP support) (required in this location for Windows builds only)
/resip/contrib/boost         <- BOOST 1.34.1 or above (required in this location for Windows builds only)
/sipXtapi                    <- https://scm.sipfoundry.org/rep/sipX/main
Note:  One recon user suggested the use of the free boost_1_34_1_setup.exe 
       from Boostpro (http://www.boostpro.com) as an easy way of downloading 
       and building the right Boost version for Windows.
  1. Go to directory where you want to create build env.
  2. git clone https://github.com/resiprocate/resiprocate resip
  3. svn checkout https://scm.sipfoundry.org/rep/sipX/main sipXtapi
  4. Obtain Open SSL version 1.0.1 or higher and place in contrib/openssl - (for Windows try this distribution: http://slproweb.com/products/Win32OpenSSL.html)
Note:  sipXtapi SVN repository has recently changed locations from: 
       https://scm.sipfoundry.org/rep/sipX/branches/sipXtapi     to 
       https://scm.sipfoundry.org/rep/sipX/main.  If you are migrating a local
       check out use the following command, or TortoiseSVN, to update your local 
       copy to the new location:
       svn switch https://scm.sipfoundry.org/rep/sipX/main
Note:  The head revision of both projects are normally kept in sync, so
       that is the best place to start.  The recon readme.txt contains the
       minimum SVN revision number of sipXtapi that is required.

Building recon on Windows[edit]

  1. Ensure the build environment is setup as indicated above.
  2. Open the appropriate recon_XX_X.sln Visual Studio solution file. Allow the sipXtapi project files to migrate/upgrade to the proper visual studio version.
  3. Open the sipXmediaAdapterLib project settings and enable the following defines by removing the 'xx' characters from the Preprocessor defines. You should do this for both Debug and Release project settings. Note: newer version of sipXtapi projects default to this configuration already, so this step may not be necessary.
    1. DISABLE_DEFAULT_PHONE_MEDIA_INTERFACE_FACTORY
    2. ENABLE_TOPOLOGY_FLOWGRAPH_INTERFACE_FACTORY
  4. Open the sipXmediaAdapterLib and sipXmediaLib project settings and add DISABLE_STREAM_PLAYER to the Preprocessor defines. You should do this for both Debug and Release project settings. Note: newer version of sipXtapi projects default to this configuration already, so this step may not be necessary.
  5. Provide an include path to pcre for the sipXmediaLib projects by doing one of the following:
    1. Modify your base Visual Studio settings for include paths - add an include path to \resip\contrib\pcre
    2. Modify the Additional Include Directories settings of the sipXmediaAdapterLib, sipXmedaLib and sipXportLib projects to include: ";..\..\resip\contrib\pcre"
    3. Modify the Additional Library Directories link settings of the sipXportLib project to point to ..\..\resip\resip\recon\Win32\SSL-Debug\ or ..\..\resip\resip\recon\Win32\SSL-Release\ appropriately.
  6. Build solution.
Note:  If you are using VS2005 or above the first time you open the solution you will get asked to convert the 
       libspeex VS2003 project files to the correct format.  Just allow the converstion to run.


Running testUA on Windows[edit]

By default you will be able to run testUA from the VS debugger, but if you decide to run testUA.exe on another machine you will need the following:

  • codec_*.dll from sipXtapi/sipXmediaLib/bin directory
  • ca.pem file in working directory - contains acceptable root certificate authority (CA) certificates for TURN over TLS
  • VS 2003/2005 - C-runtime libaries present on the destination system


Building sipXtapi on Generic Linux[edit]

Note: sipXtackLib is no longer required with the addition of the DISABLE_STREAM_PLAYER define

  • Go to sipXtapi root
  • To build sipXportLib:
   cd sipXtapi/sipXportLib
   autoreconf -fi
   ./configure --prefix=/tmp/stage
   make
  • To build sipXsdpLib:
   cd sipXtapi/sipXsdpLib
   autoreconf -fi
   ./configure --prefix=/tmp/stage
   make
  • To build sipXmediaLib:
   cd sipXtapi/sipXmediaLib
   autoreconf -fi
   ./configure --prefix=/tmp/stage --enable-local-audio --disable-stream-player
   make
  • To build sipXmediaAdapterLib:
   cd sipXtapi/sipXmediaAdapterLib
   autoreconf -fi
   ./configure --prefix=/tmp/stage --enable-topology-graph --disable-stream-player
   make


Building recon on Generic Linux[edit]

  • Ensure the build environment is setup as indicated above.
  • Build sipXtapi as described above first.
  • If you don't need to cross compile openssl - proceed to next step, otherwise:
   Go to resip/contrib/openssl
   ./Configure {place-target-platform-here} --openssldir=/usr enable-tlsext
   make depend
   make
  • Go to resip/
  ./configure \
     LDFLAGS="-L/path/to/dtls-srtp-patched-openssl -L/path/to/sipXtapi/libs" \
     --with-ssl \
     --with-recon
  make

Running testUA on Generic Linux[edit]

  • Go to resip/resip/recon/test
  • To run testUA ensure the codec plugins are in the same directory as the executable:
   cp ../../../../sipXtapi/sipXmediaLib/bin/*.so ./
  • ca.pem file in working directory - contains acceptable root certificate authority (CA) certificates for TURN over TLS
  • ./testUA