Building recon

From reSIProcate
Jump to navigation Jump to search

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