Difference between revisions of "Building recon"

From reSIProcate
Jump to navigation Jump to search
Line 19: Line 19:
 
         svn switch https://scm.sipfoundry.org/rep/sipX/main
 
         svn switch https://scm.sipfoundry.org/rep/sipX/main
  
  Note:  Ensure you use at least SVN revision 10809 of sipXtapi.  The
+
  Note:  Ensure you use at least SVN revision 10947 of sipXtapi.  The
 
         head revision of both projects are normally kept in sync, so
 
         head revision of both projects are normally kept in sync, so
 
         that is the best place to start.
 
         that is the best place to start.

Revision as of 20:44, 14 November 2008

Setting up the build environment

You build directory structure should be setup as follows:

/resip/                      <- https://svn.resiprocate.org/rep/resiprocate/main
/resip/contrib/openssl       <- https://svn.resiprocate.org/rep/resiprocate/contrib/dtls-srtp/openssl
/resip/contrib/boost_1_34_1  <- BOOST 1.34.1 (required in this location for Windows builds only)
/sipXtapi                    <- https://scm.sipfoundry.org/rep/sipX/main
  1. Go to directory where you want to create build env.
  2. svn checkout https://svn.resiprocate.org/rep/resiprocate/main resip
  3. svn checkout https://scm.sipfoundry.org/rep/sipX/main sipXtapi
  4. cd resip/contrib
  5. svn checkout https://svn.resiprocate.org/rep/resiprocate/contrib/dtls-srtp/openssl openssl
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:  Ensure you use at least SVN revision 10947 of sipXtapi.  The
       head revision of both projects are normally kept in sync, so
       that is the best place to start.


Building dtls-srtp version of OpenSSL on Windows

recon currently uses a branch of OpenSSL that contains modifications to do dtls-srtp.

/resip/contrib/openssl <- https://svn.resiprocate.org/rep/resiprocate/contrib/dtls-srtp/openssl

You will need ActiveState Perl, available from http://www.activestate.com/ActivePerl - there is a free version available for download.


To build openSSL for windows using VS2003

  1. 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
  2. From openssl root run: perl Configure VC-WIN32 enable-tlsext
  3. Run: perl util\mkfiles.pl >MINFO
  4. Run: perl util\mk1mf.pl no-asm debug VC-WIN32 > d32.mak
  5. Run: perl util\mk1mf.pl no-asm VC-WIN32 > 32.mak
  6. Run: nmake -f d32.mak
  7. Run: nmake -f 32.mak

To build openSSL for windows using VS2005

  1. Use VS2005 Command Prompt window
  2. From openssl root run: perl Configure VC-WIN32 enable-tlsext
  3. Run: ms\do_masm
  4. Run: perl util\mkfiles.pl >MINFO
  5. Run: perl util\mk1mf.pl debug VC-WIN32 > d32.mak
  6. Run: perl util\mk1mf.pl VC-WIN32 > 32.mak
  7. Run: nmake -f d32.mak
  8. Run: nmake -f 32.mak


Building recon on Windows

  1. Ensure the build environment is setup as indicated above.
  2. Use the recon_7_1.sln Visual Studio 2003 or recon_8_0.sln Visual Studio 2005 solution file
  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.
  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"
  6. Build solution.
Note:  If you are using VS2005 the first time you open the solution you will get asked to convert the 
       libspeex VS2003 project files to VS2005 format.  Just allow the converstion to run.


Running testUA on Windows

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

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

  • 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
   - answer 'yes' to prompt to build reCon - Conversation Manager
   - make sure you enter the path to the dtls-srtp version of OpenSSL when it asks
     (ie: ....resip/contrib/openssl)
  • make


Running testUA on Generic Linux

  • 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