Skip to content
Snippets Groups Projects
  1. Nov 19, 2017
    • Corey Farrell's avatar
      Build: Fix OSX build issues. · b4f7f825
      Corey Farrell authored
      OSX does not support 'readlink -f' or 'sed -r'.  Replace readlink with
      the GNU make macro 'realpath'.  Replace sed with grep in one place, cut
      in the other.
      
      ASTERISK-27332
      
      Change-Id: I5d34ecca905384decb22ead45c913ae5e8aff748
      b4f7f825
  2. Nov 17, 2017
    • Corey Farrell's avatar
      menuselect: Remove ineffective weak attribute detection. · b9f4bb59
      Corey Farrell authored
      menuselect detects compiler support for multiple styles of weak
      functions.  This is a remnant from 2013 when OPTIONAL_API required weak
      functions.  It is no longer correct for menuselect to switch
      dependencies from optional to required based on lack of weak function
      support.
      
      Note an issue remains - dependencies should switch from optional to
      required based on OPTIONAL_API being enabled or disabled.  I don't think
      this is possible.  menuselect needs to know at startup if OPTIONAL_API
      is enabled or disabled, so the only way to fix this is to remove
      OPTIONAL_API from menuselect and create a configure option.  I've left
      the code that switches in place but it's preprocessed out.
      
      Additionally removed:
      - WEAKREF variable from Asterisk makeopts.in.
      - Related disabled code from test_utils.
      - Pointless AC_REVISION call from menuselect/configure.ac.
      
      Change-Id: Ifa702e5f98eb45f338b2f131a93354632a8fb389
      b9f4bb59
  3. Nov 06, 2017
    • Corey Farrell's avatar
      configure: Add autoconf check for libopusfile. · 4013bfa5
      Corey Farrell authored
      This check is being added to make it easier for end-users of third party
      open source Opus modules.  This was removed by ASTERISK-26426 but only
      the module needed to be removed.
      
      Change-Id: I62b9cd0c4fa8a77596ab0e042948a643a1152677
      4013bfa5
  4. Oct 25, 2017
    • Corey Farrell's avatar
      Build System: Fix --disable-xmldoc option. · 5553adb8
      Corey Farrell authored
      The configure option to disable XML documentation does not currently
      work.  This patch makes it effective, but also causes an ABI change by
      removing the ast_xmldoc_* symbols.  Disabling xmldoc also prevents docs
      from being automatically generated, but they can still be manually
      generated with 'make doc/core-en_US.xml'.
      
      ASTERISK-26639
      
      Change-Id: Ifac562340c09f80c83e0203de098fcac93bf8c44
      5553adb8
  5. Oct 20, 2017
  6. Aug 08, 2017
    • George Joseph's avatar
      Make --with-pjproject-bundled the default for Asterisk 15 · 305bd0d9
      George Joseph authored
      '--with-pjproject-bundled' is now the default when running
      ./configure. It can be disabled with '--without-pjproject-bundled'.
      
      To make building without an internet connection easier, a new
      ./configure option '--with-download-cache' was added that sets
      the cache for externals (like pjproject, the codecs and the DPMA),
      AND the sounds files.  It can also be specified as an environment
      variable named "AST_DOWNLOAD_CACHE".  The existing
      '--with-sounds-cache' option / SOUNDS_CACHE_DIR env variable and
      '--with-externals-cache' option / EXTERNALS_CACHE_DIR env variable
      remain and if specified, will override '--with-downloads-cache'.
      
      ASTERISK-27189
      
      Change-Id: Ifa9783fddf44aafadb060c9feba713dfa81d38ce
      305bd0d9
  7. Aug 02, 2017
  8. Jun 08, 2017
    • David M. Lee's avatar
      CFLAGS for BIND8 support · fcb1a0d7
      David M. Lee authored
      Some systems (like macOS) require BIND_8_COMPAT to be defined so that
      the nameser libraries are, well, BIND8 compatible.
      
      Change-Id: If79fc27a64f90de1835b5aa3aadfa9be22bd16b0
      fcb1a0d7
  9. Mar 27, 2017
  10. Mar 23, 2017
    • Kevin Harwell's avatar
      pjproject_bundled: raise timeout value used when downloading · 12dde3b5
      Kevin Harwell authored
      After configuring Asterisk with '--with-pjproject-bundled' the configure/build
      process attempts to download pjproject from its download site. Currently, a
      timeout of 10 seconds is used that will stop the download process if pjproject
      has not been fully downloaded in that time. For some systems this was not enough
      time and the process was timing out too early.
      
      This patch raises the download timeout value to '60'. Also, this patch fixes
      another bug where the DOWNLOAD_TIMEOUT variable was not being properly exported
      due to a naming error. DOWNLOAD_MAX_TIMEOUT is now properly renamed to
      DOWNLOAD_TIMEOUT.
      
      ASTERISK-26814 #close
      
      Change-Id: Ia56e4e8a3d39db76bc8a1852b2cf07ec10b39842
      12dde3b5
  11. Feb 15, 2017
  12. Nov 18, 2016
    • George Joseph's avatar
      pjproject_bundled: Improve reliability of pjproject download · d3f070c7
      George Joseph authored
      The download process now has a timeout which will cause wget to retry
      if it stops retrieving data for 5 seconds and fetch and curl to timeout
      if the whole retrieval take smore than 30 seconds.
      
      If the tarball retrieval works, the MD5SUM file is retrieved from
      the downloads site and the md5 checksum is verified.
      
      If either the tarball retrieval or MD5SUM retrieval fails, or the
      checksums don't match, the entire process is retried once.  If it
      fails again, any incomplete tarball is deleted.
      
      .DELETE_ON_ERROR: was also added to the Makefile.  Not only does
      this delete the tarball on failure, it till also delete corrupted
      library files from the pjproject source directory should they
      fail to build correctly.
      
      Tested all the way back to FreeBSD 9, CentOS 6, Debian 6 and
      Ubuntu 14.
      
      Change-Id: Iea7d33b96a31622ab1b6e54baebaf271959514e1
      d3f070c7
  13. Oct 12, 2016
  14. Oct 10, 2016
    • George Joseph's avatar
      bundled_pjproject: Add tests for programs used by the Makefile, et al. · 5fb848ee
      George Joseph authored
      Added tests for bzip2, tar, patch, sed and nm to configure.ac.
      
      Set DOWNLOAD_TO_STDOUT to a working command line regardless of
      whether the download program is wget, curl or fetch.
      
      Added a 'configure.m4' file to the third-party directory which takes
      care of calling any third-party project setup.  Had to move some
      pjproject_bundled stuff up in configure.ac so it was called before
      the third-party configure macro.
      
      The pjproject tarball is now downloaded to the externals_cache_dir if
      it was specified on the ./configure command line
      
      Removed regeneration of the pjproject aconfigure file.  It was only
      needed for an old patch that no longer applies.
      
      Converted the tests for symbols to explicit tests since we know that
      they're now available in the bundled version.  Saves a little time
      during configure.
      
      ASTERISK-26416 #close
      Reported-by: Corey Farrell
      
      Change-Id: Id1d94251c0155f8dd41b7de7067f35cfbaafbb9b
      (cherry picked from commit e6b0053d)
      (cherry picked from commit a0d02f38)
      5fb848ee
  15. Sep 29, 2016
  16. Sep 27, 2016
    • George Joseph's avatar
      format_ogg_opus: New format · 40aa2813
      George Joseph authored
      Add Ogg/Opus playback support.
      
      This uses libopusfile in order to be able to read .opus files and play
      them back.
      
      Writing/recording support is not present at this time.
      
      ASTERISK-26409
      
      Change-Id: I8815d23345108d8ca7c0bd640f6a1ce6b4f56955
      (cherry picked from commit daee8bbd5209b4158bc1785eede845a26e6cbeaa)
      40aa2813
  17. Sep 15, 2016
    • Tzafrir Cohen's avatar
      sd_notify (systemd status notifications) support · 07b95f7c
      Tzafrir Cohen authored
      sd_notify() is used to notify systemd of changes to the status of the
      process. This allows the systemd daemon to know when the process
      finished loading (and thus only start another program after Asterisk has
      finished loading).
      
      To use this, use a systemd unit with 'Type=notify' for Asterisk.
      
      This commit also adds the function ast_sd_notify(), a wrapper around
      sd_notify that does nothing if not built with systemd support.
      
      Also adds support for libsystemd detection in the configure script.
      
      Change-Id: Ied6a59dafd5ef331c5c7ae8f3ccd2dfc94be7811
      07b95f7c
  18. Sep 06, 2016
    • George Joseph's avatar
      build: Add download capability for external packages · 6caf6bcd
      George Joseph authored
      The DPMA and g729a, silk, siren7 and siren14 codecs hosted at
      http://downloads.digium.com/pub/telephony/ are now listed in the
      "External" sections of the "Resource Modules" and "Codec Translators"
      pages in menuselect.  Any that are selected will automatically be
      downloaded and installed when "make install" is run.  Their LICENSE and
      README (if avaialble) files will be installed to
      ASTVARLIBDIR/documentation/thirdparty/<product_name>.
      
      Example use with codecs:
      
      The codecs/codecs.xml file is a menuselect style xml file that lists
      the codecs to be included.  Their support levels are 'external', which
      triggers the download and install, and defaultenabled is no.  Also
      because codec_g729a is actually in a directory named codec_g729 on the
      download server, the newly added 'member_data' element is used to
      override the default of the directory name being the package name.  You
      can use the 'directory_name' attribute to keep default base URL
      (http://downloads.digium.com/pub/telephony/) but use the new directory,
      or you use the 'remote_url' attribute to specify a full URL to the
      download directory.  In this case, you must still follow the same
      subdirectory naming conventions as that used for the packages located
      at 'http://downloads.digium.com/pub/telephony'.
      
      A new configure option '--with-externals-cache' was added and like
      '--with-sounds-cache' it allows the installer to cache tarballs so
      they're not downloaded every time.
      
      To assist with the download and install process, each external package
      now has a manifest.xml file that, among other things, contains a package
      version and checksums for each file in the tarball.  The manifest is
      saved to both the cache directory and ASTMODDIR and together with the
      manifest.xml on the downloads site, tells the install scripts whether
      a download and/or update is needed.
      
      bash and xmlstarlet are required for downloader operation.  If they're
      not installed, the external items in menuselect will be unavailable.
      
      Change-Id: Id3dcf1289ffd3cb0bbd7dfab3cafbb87be60323a
      6caf6bcd
  19. Aug 24, 2016
  20. May 09, 2016
    • George Joseph's avatar
      pjproject_bundled: Check for python-dev and TEST_FRAMEWORK · facce6f6
      George Joseph authored
      The pjsua and pjsystest apps are now built only if TEST_FRAMEWORK is set.
      The python bindings are now built only if TEST_FRAMEWORK is set and a
      python development package is installed.
      
      libresample was also disabled.
      
      ASTERISK-25993 #close
      Reported-by: Joshua Colp
      
      Change-Id: If4e91c503a02f113d5b71bc8b972081fa3ff6f03
      facce6f6
  21. 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
  22. Jan 21, 2016
  23. 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
  24. 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
  25. Mar 25, 2015
  26. Mar 12, 2015
  27. Oct 27, 2014
  28. Oct 19, 2014
  29. Sep 18, 2014
  30. Aug 23, 2013
  31. Aug 01, 2013
  32. Jul 03, 2013
    • David M. Lee's avatar
      ARI authentication. · 9ba976b1
      David M. Lee authored
      This patch adds authentication support to ARI.
      
      Two authentication methods are supported. The first is HTTP Basic
      authentication, as specified in RFC 2617[1]. The second is by simply
      passing the username and password as an ?api_key query parameter
      (which allows swagger-ui[2] to authenticate more easily).
      
      ARI usernames and passwords are configured in the ari.conf file
      (formerly known as stasis_http.conf). The user may be set to
      `read_only`, which will prohibit the user from issuing POST, DELETE,
      etc. Also, the user's password may be specified in either plaintext,
      or encrypted using the crypt() function.
      
      Several other notes about the patch.
      
       * A few command line commands for seeing ARI config and status were
         also added.
       * The configuration parsing grew big enough that I extracted it to
         its own file.
      
       [1]: http://www.ietf.org/rfc/rfc2617.txt [2]:
       https://github.com/wordnik/swagger-ui
      
      (closes issue ASTERISK-21277)
      Review: https://reviewboard.asterisk.org/r/2649/
      
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393530 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      9ba976b1
  33. Jun 03, 2013
    • David M. Lee's avatar
      Correct autoconf script for finding UUID support. · 6d805dc0
      David M. Lee authored
      The library that provides UUID support varies greatly from system to
      system. On most Linux distros, it's in libuuid. On OpenBSD, it's in
      libe2fs-uuid. On OS X, it is in libsystem.
      
      This patch plays hide-and-seek with UUID support, looking for it in the
      three places we know about. It also corrects the Makefile so that it uses
      the configured library name and include path.
      
      (closes issue ASTERISK-21816)
      Reported by: Brad Latus (snuffy)
      Tested by: Brad Latus (snuffy)
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390352 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      6d805dc0
  34. Mar 12, 2013
  35. Jan 18, 2013
  36. Jan 11, 2013
    • Automerge script's avatar
      Merged revisions 378915,378918 via svnmerge from · 2c1720b4
      Automerge script authored
      file:///srv/subversion/repos/asterisk/trunk
      
      ................
        r378915 | dlee | 2013-01-11 16:31:42 -0600 (Fri, 11 Jan 2013) | 21 lines
        
        Add JSON API for Asterisk.
        
        This provides a JSON API by pulling in and wrapping the Jansson JSON
        library[1]. The Asterisk API basically mirrors the Jansson
        functionality, with a few minor tweaks.
        
         * Some names have been asteriskified to protect the innocent.
         * Jansson provides both reference-stealing and reference-borrowing
           versions of several API's. The Asterisk API is exclusively
           reference-stealing for operations that put elements into arrays and
           objects.
         * No support for doubles, since we usually don't need that.
         * Coming along for the ride is the ast_test_validate macro, which made
           the unit tests much easier to write.
        
         [1]: http://www.digip.org/jansson/
        
        (issue ASTERISK-20887)
        (closes issue ASTERISK-20888)
        Review: https://reviewboard.asterisk.org/r/2264/
      ................
        r378918 | file | 2013-01-11 17:05:38 -0600 (Fri, 11 Jan 2013) | 11 lines
        
        Retain XMPP filters across reconnections so external modules continue to function as expected.
        
        Previously if an XMPP client reconnected any filters added by an external module were lost.
        This issue exhibited itself with chan_motif not receiving and reacting to Jingle signaling.
        
        (closes issue ASTERISK-20916)
        Reported by: kuj
        ........
        
        Merged revisions 378917 from http://svn.asterisk.org/svn/asterisk/branches/11
      ................
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@378927 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      2c1720b4
    • David M. Lee's avatar
      Add JSON API for Asterisk. · 7695ea26
      David M. Lee authored
      This provides a JSON API by pulling in and wrapping the Jansson JSON
      library[1]. The Asterisk API basically mirrors the Jansson
      functionality, with a few minor tweaks.
      
       * Some names have been asteriskified to protect the innocent.
       * Jansson provides both reference-stealing and reference-borrowing
         versions of several API's. The Asterisk API is exclusively
         reference-stealing for operations that put elements into arrays and
         objects.
       * No support for doubles, since we usually don't need that.
       * Coming along for the ride is the ast_test_validate macro, which made
         the unit tests much easier to write.
      
       [1]: http://www.digip.org/jansson/
      
      (issue ASTERISK-20887)
      (closes issue ASTERISK-20888)
      Review: https://reviewboard.asterisk.org/r/2264/
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378915 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      7695ea26
  37. Oct 18, 2012
    • Richard Mudgett's avatar
      build_tools: Allow Asterisk to report git SHAs in version string. · b0c3d288
      Richard Mudgett authored
      Make git more attractive for managing work-in-progress.  Especially
      convenient when a potential patch set needs to be tested on multiple
      platforms since one can use git to keep all the test environments in sync
      independent of a subversion server.
      
      Now the Asterisk version will show the exact git SHA5 that was used when
      building (still appended by "M" if there are local modifications) from a
      git clone of the Asterisk repository so the developer can more easily know
      what is actually under test.
      
      You will now get this:
      
        $ asterisk -V
        Asterisk GIT-1698298
      
      Instead of this:
      
        $ asterisk -V
        Asterisk UNKNOWN__and_probably_unsupported
      
      This has zero impact for those not using git with the exception of an
      extra test in the configure script to gather git's path.  This is
      necessary to prevent "sudo make install" from failing since git may not be
      in the path in make's shell environment.
      
      (closes issue ASTERISK-20483)
      Reported by: Shaun Ruffell
      Patches:
            0001-build_tools-Allow-Asterisk-to-report-git-SHAs-in-ver.patch (license #5417) patch uploaded by Shaun Ruffell
            Modified
      ........
      
      Merged revisions 375189 from http://svn.asterisk.org/svn/asterisk/branches/1.8
      ........
      
      Merged revisions 375190 from http://svn.asterisk.org/svn/asterisk/branches/10
      ........
      
      Merged revisions 375191 from http://svn.asterisk.org/svn/asterisk/branches/11
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375192 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      b0c3d288
  38. Oct 13, 2012
  39. Sep 18, 2012
Loading