Skip to content
Snippets Groups Projects
  1. Mar 23, 2016
  2. Mar 14, 2016
  3. Mar 01, 2016
    • George Joseph's avatar
      build-system: Allow building with static pjproject · 3173e91b
      George Joseph authored
      Background here:
      http://lists.digium.com/pipermail/asterisk-dev/2016-January/075266.html
      
      From CHANGES:
       * To help insure that Asterisk is compiled and run with the same known
         version of pjproject, a new option (--with-pjproject-bundled) has been
         added to ./configure.  When specified, the version of pjproject specified
         in third-party/versions.mak will be downloaded and configured.  When you
         make Asterisk, the build process will also automatically build pjproject
         and Asterisk will be statically linked to it.  Once a particular version
         of pjproject is configured and built, it won't be configured or built
         again unless you run a 'make distclean'.
      
         To facilitate testing, when 'make install' is run, the pjsua and pjsystest
         utilities and the pjproject python bindings will be installed in
         ASTDATADIR/third-party/pjproject.
      
         The default behavior remains building with the shared pjproject
         installation, if any.
      
      Building:
      
         All you have to do is include the --with-pjproject-bundled option on
         the ./configure command line (and remove any existing --with-pjproject
         option if specified).  Everything else is automatic.
      
      Behind the scenes:
      
         The top-level Makefile was modified to include 'third-party' in the
         list of MOD_SUBDIRS.
      
         The third-party directory was created to contain any third party
         packages that may be needed in the future.  Its Makefile automatically
         iterates over any subdirectories passing on targets.
      
         The third-party/pjproject directory was created to house the pjproject
         source distribution.  Its Makefile contains targets to download, patch
         configure, generate dependencies, compile libs, apps and python bindings,
         sanitized build.mak and generate a symbols list.
      
         When bootstrap.sh is run, it automatically includes the configure.m4
         file in third-party/pjproject.  This file has a macro to download and
         conifgure pjproject and get and set PJPROJECT_INCLUDE, PJPROJECT_DIR
         and PJPROJECT_BUNDLED.  It also tests for the capabilities like
         PJ_TRANSACTION_GRP_LOCK by parsing preprocessor output as opposed to
         trying to compile.  Of course, bootstrap.sh is only run once and the
         configure file is incldued in the patch.
      
         When configure is run with the new options, the macro in configure.m4
         triggers the download, patch, conifgure and tests.  No compilation is
         performed at this time.  The downloaded tarball is cached in /tmp so
         it doesn't get downloaded again on a distclean.
      
         When make is run in the top-level Asterisk source directory, it will
         automatically descend all the subdirectories in third_party just as it
         does for addons, apps, etc.  The top-level Makefile makes sure that
         the 'third-party' is built before 'main' so that dependencies from the
         other directories are built first.
      
         When main does build, a new shared library (libasteriskpj) is created that
         links statically to the pjproject .a files and exports all their symbols.
         The asterisk binary links to that, just as it does with libasteriskssl.
      
         When Asterisk is installed, the pjsua and pjsystest apps, and the pjproject
         python bindings are installed in ASTDATADIR/third-party/pjproject.  This
         will facilitate testing, including running the testsuite which will be
         updated to check that directory for the pjsua module ahead of the system
         python library.
      
      Modules should continue to depend on pjproject if they use pjproject APIs
      directly.  They should not care about the implementation.  No changes to any
      res_pjsip modules were made.
      
      Change-Id: Ia7a60c28c2e9ba9537c5570f933c1ebcb20a3103
      3173e91b
  4. Feb 10, 2016
    • George Joseph's avatar
      res_pjsip: Handle pjsip_dlg_create_uas deprecation · 168c1873
      George Joseph authored
      Pjproject has deprecated pjsip_dlg_create_uas in 2.5 and replaced it with
      pjsip_dlg_create_uas_and_inc_lock which, as the name implies, automatically
      increments the lock on the returned dialog.  To account for this, configure.ac
      now detects the presence of pjsip_dlg_create_uas_and_inc_lock and res_pjsip.c
      has an #ifdef HAVE_PJSIP_DLG_CREATE_UAS_AND_INC_LOCK to decide whether to use
      the original call or the new one.  If the new one was used, the ref count is
      decremented before returning.
      
      ASTERISK-25751 #close
      Reported-by Josh Colp
      
      Change-Id: I1be776b94761df03bd0693bc7795a75682615ca8
      168c1873
    • Badalyan Vyacheslav's avatar
      Build: Added testing compiler to support the system sanitizes · a23d01e9
      Badalyan Vyacheslav authored
      In older versions of the compiler was not sanitizes.
      Compilers other than GCC can not support the Usan and TSAN
      or have other options for *FLAGS.
      
      ASTERISK-25767 #close
      Reported by: Badalyan Vyacheslav
      Tested by: Badalyan Vyacheslav
      
      Change-Id: Iefce6608221fa87884b82ae3cb5649b7b1804916
      a23d01e9
  5. Feb 04, 2016
    • Mark Michelson's avatar
      Check for OpenSSL defines before trying to use them. · 3b426a8b
      Mark Michelson authored
      The SSL_OP_NO_TLSv1_1 and SSL_OP_NO_TLSv1_2 defines did not exist prior
      to OpenSSL version 1.0.1. A recent commit attempts to, by default, set
      these options, which can cause problems on systems with older OpenSSL
      installations.
      
      This commit adds a configure script check for those defines and will not
      attempt to make use of those if they do not exist. We will print a
      warning urging the user to upgrade their OpenSSL installation if those
      defines are not present.
      
      Change-Id: I6a2eb9a43fd0738b404d8f6f2cf4b5c22d9d752d
      3b426a8b
  6. Jan 21, 2016
  7. Nov 30, 2015
  8. Oct 08, 2015
    • Richard Mudgett's avatar
      configure: Fix check for libunbound to require v1.5.0 as minimum. · ca030845
      Richard Mudgett authored
      Versions of libunbound before v1.4.21 do not compile with Asterisk.
      However, since v1.4.21 has a configure script bug that fails to detect the
      ldns library (which is fixed in v1.4.22) and v1.4.22 is not an easily
      detectable version we will require v1.5.0 as a minimum version of the
      library to work with Asterisk.
      
      ASTERISK-25108 #close
      Reported by: Richard Mudgett
      
      Change-Id: Ieb228bfb01467573fc121c7356a9dde27128894d
      ca030845
  9. Aug 08, 2015
    • David M. Lee's avatar
      Replaces clock_gettime() with ast_tsnow() · 40caf0ad
      David M. Lee authored
      clock_gettime() is, unfortunately, not portable. But I did like that
      over our usual `ts.tv_nsec = tv.tv_usec * 1000` copy/paste code we
      usually do when we want a timespec and all we have is ast_tvnow().
      
      This patch adds ast_tsnow(), which mimics ast_tvnow(), but returns a
      timespec. If clock_gettime() is available, it will use that. Otherwise
      ast_tsnow() falls back to using ast_tvnow().
      
      Change-Id: Ibb1ee67ccf4826b9b76d5a5eb62e90b29b6c456e
      40caf0ad
  10. Jul 29, 2015
    • Mark Duncan's avatar
      res/res_rtp_asterisk: Add ECDH support · 1d081ec9
      Mark Duncan authored
      This will add ECDH support to Asterisk. It will
      detect auto ECDH support in OpenSSL
      (1.0.2b and above) during ./configure. If this is
      available, it will use it,
      otherwise it will fall back to prime256v1 (this
      behavior is consistent with
      other projects such as Apache and nginx).
      
      This fixes WebRTC being broken in Firefox 38+ due
      to Firefox now only supporting
      ciphers with perfect forward secrecy.
      
      ASTERISK-25265 #close
      
      Change-Id: I8c13b33a2a79c0bde2e69e4ba6afa5ab9351465b
      1d081ec9
  11. Jun 10, 2015
  12. May 03, 2015
    • Diederik de Groot's avatar
      Update configure.ac/Makefile for clang · 305ce3de
      Diederik de Groot authored
      Created autoconf/ast_check_raii.m4: contains AST_CHECK_RAII which
      checks compiler requirements for RAII:
      gcc: -fnested-functions support
      clang: -fblocks (and if required -lBlocksRuntime)
      The original check was implemented in configure.ac and now has it's
      own file. This function also sets C_COMPILER_FAMILY to either gcc or
      clang for use by makefile
      
      Created autoconf/ast_check_strsep_array_bounds.m4 (contains
      AST_CHECK_STRSEP_ARRAY_BOUNDS):
      which checks if clang is able to handle the optimized strsep & strcmp
      functions (linux). If not, the standard libc implementation should be
      used instead. Clang + the optimized macro's work with:
      strsep(char *, char []), but not with strsepo(char *, char *).
      Instead of replacing all the occurences throughout the source code,
      not using the optimized macro version seemed easier
      
      See 'define __strcmp_gc(s1, s2, l2) in bits/string2.h':
      llvm-comment: Normally, this array-bounds warning are suppressed for
      macros, so that unused paths like the one that accesses __s1[3] are
      not warned about.  But if you preprocess manually, and feed the
      result to another instance of clang, it will warn about all the
      possible forks of this particular if statement. Instead of switching
      of this optimization, another solution would be to run the preproces-
      sing step with -frewrite-includes, which should preserve enough
      information so that clang should still be able to suppress the diag-
      nostic at the compile step later on.
      
      See also "https://llvm.org/bugs/show_bug.cgi?id=20144"
      See also "https://llvm.org/bugs/show_bug.cgi?id=11536"
      
      Makefile.rules: If C_COMPILER_FAMILY=clang then add two warning
      suppressions:
      -Wno-unused-value
      -Wno-parentheses-equality
      In an earlier review (reviewboard: 4550 and 4554), they were deemed a
      nuisace and less than benefitial.
      
      configure.ac:
      Added AST_CHECK_RAII() see earlier
      Added AST_CHECK_STRSEP_ARRAY_BOUNDS() see earlier
      Removed moved content
      
      ASTERISK-24917
      Change-Id: I12ea29d3bda2254ad3908e279b7effbbac6a97cb
      305ce3de
  13. Apr 15, 2015
    • Joshua Colp's avatar
      res_pjsip: Add external PJSIP resolver implementation using core DNS API. · a3cec44a
      Joshua Colp authored
      This change adds the following:
      
      1. A query set implementation. This is an API that allows queries to be executed in parallel and once all have completed a callback is invoked.
      2. Unit tests for the query set implementation.
      3. An external PJSIP resolver which uses the DNS core API to do NAPTR, SRV, AAAA, and A lookups.
      
      For the resolver it will do NAPTR, SRV, and AAAA/A lookups in parallel. If NAPTR or SRV
      are available it will then do more queries. And so on. Preference is NAPTR > SRV > AAAA/A,
      with IPv6 preferred over IPv4. For transport it will prefer TLS > TCP > UDP if no explicit
      transport has been provided. Configured transports on the system are taken into account to
      eliminate resolved addresses which have no hope of completing.
      
      ASTERISK-24947 #close
      Reported by: Joshua Colp
      
      Change-Id: I56cb03ce4f9d3d600776f36928e0b3e379b5d71e
      a3cec44a
  14. Mar 25, 2015
  15. Mar 12, 2015
  16. Feb 25, 2015
  17. Jan 26, 2015
    • David M. Lee's avatar
      Various fixes for OS X · 965777cc
      David M. Lee authored
      This patch addresses compilation errors on OS X. It's been a while, so
      there's quite a few things.
      
       * Fixed __attribute__ decls in route.h to be portable.
       * Fixed htonll and ntohll to work when they are defined as macros.
       * Replaced sem_t usage with our ast_sem wrapper.
       * Added ast_sem_timedwait to our ast_sem wrapper.
       * Fixed some GCC 4.9 warnings using sig*set() functions.
       * Fixed some format strings for portability.
       * Fixed compilation issues with res_timing_kqueue (although tests still fail
         on OS X).
       * Fixed menuconfig /sbin/launchd detection, which disables res_timing_kqueue
         on OS X).
      
      ASTERISK-24539 #close
      Reported by: George Joseph
      
      ASTERISK-24544 #close
      Reported by: George Joseph
      
      Review: https://reviewboard.asterisk.org/r/4327/
      ........
      
      Merged revisions 431092 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@431093 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      965777cc
  18. Jan 16, 2015
  19. Jan 15, 2015
    • Matthew Jordan's avatar
      configure: If cross-compiling, assume we have working semaphores · f11fb762
      Matthew Jordan authored
      The Asterisk 13 configure.ac checks for HAS_WORKING_SEMAPHORE but does not have
      an option for cross-compiling so it fails with an exit. Since we're cross-
      compiling, we can't exactly go looking for the header. The semaphore.h header
      is relatively common:
      * It's part of the POSIX standard
      * It's part of GNU C Library
      As such, we assume that it will be present when cross-compiling.
      
      As such, this patch defaults "HAS_WORKING_SEMAPHORE" to "1" if cross-compiling
      is detected.
      
      If you're cross-compiling to a platform that doesn't support this, then make
      sure you re-define this to 0.
      
      ASTERISK-24663 #close
      Reported by: abelbeck
      patches:
        asterisk-13-anonymous-semaphores.patch uploaded by abelbeck (License 5903)
      ........
      
      Merged revisions 430646 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@430647 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      f11fb762
  20. Jan 13, 2015
  21. Oct 27, 2014
  22. Oct 19, 2014
  23. Aug 17, 2014
  24. Jul 21, 2014
  25. Jul 17, 2014
  26. Jul 04, 2014
  27. Jul 03, 2014
  28. Jun 20, 2014
  29. Jun 16, 2014
    • Richard Mudgett's avatar
      chan_dahdi: Adds support for major update to libss7. · 0c896d8b
      Richard Mudgett authored
      * SS7 support now requires libss7 v2.0 or later.  The new libss7 is not
      backwards compatible.
      
      * Added SS7 support for connected line and redirecting.
      
      * Most SS7 CLI commands are reworked as well as new SS7 commands added.
      See online CLI help.
      
      * Added several SS7 config option parameters described in
      chan_dahdi.conf.sample.
      
      * ISUP timer support reworked and now requires explicit configuration.
      See ss7.timers.sample.
      
      Special thanks to Kaloyan Kovachev for his support and persistence in
      getting the original patch by adomjan updated and ready for release.
      
      SS7-27 #close
      Reported by: adomjan
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@416416 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      0c896d8b
  30. May 13, 2014
    • Richard Mudgett's avatar
      chan_dahdi/sig_pri: Prevent unnecessary PROGRESS events when overlap dialing is enabled. · 8b6ab478
      Richard Mudgett authored
      When overlap dialing is enabled, the lack of inband audio available
      information in the SETUP_ACKNOWLEDGE events causes an interoperability
      problem with SIP.  sig_pri doesn't know if there is dialtone present when
      a SETUP_ACKNOWLEDGE is received so it assumes it is there and posts an
      AST_CONTROL_PROGRESS frame.  The SIP channel driver then sends out a 183
      Session Progress and blocks the desired 180 Ringing message when the
      ALERTING message comes in.
      
      * Made the configure script detect if the installed version of libpri
      supports the SETUP_ACKNOWLEDGE enhancements.
      
      * Using the new API, made generate an AST_CONTROL_PROGRESS frame on an
      incoming SETUP_ACKNOWLEDGE message when the message indicates inband audio
      is present instead of assuming that dialtone is present.
      
      * Using the new API, made SETUP_ACKNOWLEDGE send out an inband audio
      available indication only if dialtone is expected.  The change also makes
      the fallback behaviour of sending the PROGRESS message better by sending
      it only if dialtone is expected.
      
      * Changed receiving a PROCEEDING message to not generate an
      AST_CONTROL_PROGRESS frame if the progress indication ie indicates
      non-end-to-end-ISDN.  This helps interoperability with SIP.
      
      * Changed sending a PROCEEDING message in response to an
      AST_CONTROL_PROCEEDING frame to not indicate inband audio available.  It
      was silly to do so anyway because the channel driver doesn't know if
      inband audio is even available.  This helps interoperability with SIP.
      
      This patch and a corresponding change in libpri work together to allow
      Asterisk to control the inband audio available progress indication ie on
      the SETUP_ACKNOWLEDGE message when dialtone is present.
      
      AST-1338 #close
      Reported by: Tyler Stewart
      
      Review: https://reviewboard.asterisk.org/r/3521/
      ........
      
      Merged revisions 413714 from http://svn.asterisk.org/svn/asterisk/branches/1.8
      ........
      
      Merged revisions 413765 from http://svn.asterisk.org/svn/asterisk/branches/11
      ........
      
      Merged revisions 413771 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@413772 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      8b6ab478
  31. Apr 23, 2014
    • George Joseph's avatar
      This patch adds support for spinlocks in Asterisk. · 64045f0b
      George Joseph authored
      There are cases in Asterisk where it might be desirable to lock
      a short critical code section but not incur the context switch
      and yield penalty of a mutex or rwlock.  The primary spinlock
      implementations execute exclusively in userspace and therefore
      don't incur those penalties.  Spinlocks are NOT meant to be a
      general replacement for mutexes.  They should be used only for
      protecting short blocks of critical code such as simple compares
      and assignments.  Operations that may block, hold a lock, or
      cause the thread to give up it's timeslice should NEVER be
      attempted in a spinlock.
      
      The first use case for spinlocks is in astobj2 - internal_ao2_ref.
      Currently the manipulation of the reference counter is done with
      an ast_atomic_fetchadd_int which works fine.  When weak reference
      containers are introduced however, there's an additional comparison
      and assignment that'll need to be done while the lock is held.
      A mutex would be way too expensive here, hence the spinlock.
      Given that lock contention in this situation would be infrequent,
      the overhead of the spinlock is only a few more machine instructions
      than the current ast_atomic_fetchadd_int call.
      
      ASTERISK-23553 #close
      Review: https://reviewboard.asterisk.org/r/3405/
      ........
      
      Merged revisions 412976 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@412977 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      64045f0b
  32. Mar 05, 2014
  33. Jan 28, 2014
  34. Jan 08, 2014
  35. Dec 03, 2013
  36. Nov 26, 2013
  37. Nov 16, 2013
Loading