Skip to content
Snippets Groups Projects
  1. Mar 16, 2021
    • Joshua C. Colp's avatar
      xml: Embed module information into core XML documentation. · 149e5e5b
      Joshua C. Colp authored
      This change embeds the MODULEINFO block of modules
      into the core XML documentation. This provides a shared
      mechanism for use by both menuselect and Asterisk for
      information and a definitive source of truth.
      
      ASTERISK-29335
      
      Change-Id: Ifbfd5c700049cf320a3e45351ac65dd89bc99d90
      149e5e5b
  2. Dec 09, 2020
    • lvl's avatar
      Introduce astcachedir, to be used for temporary bucket files · b0842713
      lvl authored
      As described in the issue, /tmp is not a suitable location for a
      large amount of cached media files, since most distributions make
      /tmp a RAM-based tmpfs mount with limited capacity.
      
      I opted for a location that can be configured separately, as opposed
      to using a subdirectory of spooldir, given the different storage
      profile (transient files vs files that might stay there indefinitely).
      
      This commit just makes the cache directory configurable, and changes
      the default location from /tmp to /var/cache/asterisk.
      
      ASTERISK-29143
      
      Change-Id: Ic54e95199405abacd9e509cef5f08fa14c510b5d
      b0842713
  3. Aug 14, 2020
    • cmaj's avatar
      Makefile: Fix certified version numbers · 3040edcb
      cmaj authored
      Adds sed before awk to produce reasonable ASTERISKVERSIONNUM
      on certified versions of Asterisk eg. 16.8-cert3 is 160803
      instead of the previous 00800.
      
      ASTERISK-29021 #close
      
      Change-Id: Icf241df0ff6db09011b8c936a317a84b0b634e16
      3040edcb
  4. May 01, 2020
    • Ben Ford's avatar
      res_stir_shaken: Implemented signature verification. · 9acf840f
      Ben Ford authored
      There are a lot of moving parts in this patch, but the focus of it is on
      the verification of the signature using a public key located at the
      public key URL provided in the JSON payload. First, we check the
      database to see if we have already downloaded the key. If so, check to
      see if it has expired. If it has, redownload from the URL. If we don't
      have an entry in the database, just go ahead and download the public
      key. The expiration is tested each time we download the file. After
      that, read the public key from the file and use it to verify the
      signature. All sanity checking is done when the payload is first
      received, so the verification is complete once this point is reached.
      
      The XML has also been added since a new config option was added to
      general (curl_timeout). The maximum amount of time to wait for a
      download can be configured through this option, with a low value by
      default.
      
      Change-Id: I3ba4c63880493bf8c7d17a9cfca1af0e934d1a1c
      9acf840f
  5. Mar 25, 2020
    • Jaco Kroon's avatar
      build: enable building with uClibc · a699e016
      Jaco Kroon authored
      This patch has been included in Gentoo distribution for at least since
      asterisk 1.8, but there are references in the logs going back as far as
      1.0.0 - not sure if this is still required in any way, it does apply,
      and it doesn't (as far as we can determine) cause build failures.
      
      Change-Id: I46d8845e30200205e80580680bf060aa3012ba54
      a699e016
  6. Jul 16, 2019
    • George Joseph's avatar
      Build: Separate header install/uninstall · c781806e
      George Joseph authored
      Asterisk headers are no longer installed and uninstalled
      automatically when performing a "make install" or a
      "make uninstall".  To install/uninstall the headers, use
      "make install-headers" and "make uninstall-headers".
      The headers also continue to be uninstalled when performing a
      "make uninstall-all".
      
      Also corrects an issue where /usr/include/asterisk.h was never
      being removed at all.
      
      Change-Id: Ia7399f3a0203a4825fc4a9f43b9034dae9a2b643
      c781806e
  7. Aug 16, 2018
    • Rodrigo Ramírez Norambuena's avatar
      make config: os-release output error. · 01c90fef
      Rodrigo Ramírez Norambuena authored
      Fix not show the error
      "/bin/sh: /etc/os-release: No such file or directory" when the command
      'make config' is run in a System without systemv.
      
      The instruction 'make config' pre execute the syntax
      "$(shell . /etc/os-release && echo $$ID)" to identified if system is a
      Slackware and Opensuse.
      
      This change prevent show the message and is send to the /dev/null
      
      Change-Id: I7f43e281a8d9405b2519fc653de82d9b8b645fdf
      01c90fef
  8. Jul 26, 2018
    • Corey Farrell's avatar
      Build System: Create 'make install-configs' target. · 852e157b
      Corey Farrell authored
      This target requires specifying CONFIG_SRC=path_to_configs.  This can be
      used to install custom configs for the Asterisk build while still
      performing directory replacements on asterisk.conf.
      
      Modify internal INSTALL_CONFIGS so first argument requires full path to
      the config sources relative to Asterisk source root.
      
      Change-Id: Idcd841df3c8d5bfe23d566bb9e2e448e9df4f8ab
      852e157b
  9. Jul 18, 2018
  10. Apr 09, 2018
    • Corey Farrell's avatar
      Build System: Enable python3 compatibility. · 879e592b
      Corey Farrell authored
      * Consistently use spaces in rest-api-templates/asterisk_processor.py.
      * Exclude third-party from docs/full-en_US.xml.
      * Add docs/full-en_US.xml to .gitignore.
      * Use list() to convert python3 view.
      * Use python3 print function.
      * Replace cmp() with equivalent equation.
      * Replace reference to out of scope subtype variable with name
        parameter.
      * Use unescaping triple bracket notation in mustache templates where
        needed.  This causes behavior of Python2 to be maintained when using
        Python3.
      * Fix references to has_websocket / is_websocket in
        res_ari_resource.c.mustache.
      * Update calculation of has_websocket to use any().
      * Use unicode mode for writing output file in transform.py.
      * Replace 'from swagger_model import *' with explicit import of required
        symbols.
      
      I have not tested spandspflow2pcap.py or voicemailpwcheck.py, only the
      print syntax has been fixed.
      
      Change-Id: If5c5b556a2800d41a3e2cfef080ac2e151178c33
      879e592b
  11. Mar 23, 2018
  12. Mar 09, 2018
    • Alexander Traud's avatar
      BuildSystem: Add NetBSD. · 5b525c97
      Alexander Traud authored
      Headers, libraries, and rpath.
      
      ASTERISK-27728
      ASTERISK-11015
      Reported by: Curt Sampson
      
      Change-Id: I50aa5fcd095937df32a2e33307caac7e79a8b5b7
      5b525c97
  13. Mar 07, 2018
    • Richard Mudgett's avatar
      BuildSystem regression: Fix errors reported by clean targets. · 1fe913f7
      Richard Mudgett authored
      Doing a 'make clean', 'make distclean', or 'make dist-clean' gets errors
      about an invalid shell option: "/bin/sh: 0: Illegal option -".
      
      The clean targets do not include the makeopts file which defines GREP and
      LDCONFIG because the file may not exist and the distclean/dist-clean
      targets will delete it anyway.
      
      ASTERISK-27715
      
      Change-Id: I33d40acdb03862bc89aeb6fb1ff497894a8ea7f5
      1fe913f7
  14. Mar 05, 2018
  15. Mar 03, 2018
  16. Mar 02, 2018
  17. Feb 13, 2018
  18. Jan 19, 2018
  19. Jan 16, 2018
    • Alexander Traud's avatar
      BuildSystem: Avoid $EUID and use id -u instead. · a046305f
      Alexander Traud authored
      Makefile included a call to ${EUID} which requires the shell bash. To keep
      compatibility with other shells like dash or ksh, use id -u instead.
      
      ASTERISK-27589
      
      Change-Id: Ia6e74f5bc9aab4e6dc62b7439f647b7964e6f657
      a046305f
  20. Dec 22, 2017
  21. Nov 09, 2017
    • Corey Farrell's avatar
      Build System: Disable parallel make in the root Makefile. · 23b0ef3e
      Corey Farrell authored
      This ensures that the root Makefile runs only a single target at a time.
      SUBMAKE will still honor requested parallelism, so 'make -j8' will build
      one directory at a time but allow 8 jobs at once when building a sub
      directory.
      
      This will fix some display glitches related to rebuild of XML
      documentation.  It will also prevent some edge case errors where
      bundled pjproject needs to be rebuild before other parts of Asterisk.
      
      Change-Id: I4f2ec6fbbec1ada0ccb1109a28ea303524239b1e
      23b0ef3e
  22. 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
  23. 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
  24. Mar 30, 2017
    • Walter Doekes's avatar
      build: Fix deb build issues with fakeroot · a7d94f50
      Walter Doekes authored
      If DESTDIR is set, don't call ldconfig. Assume that DESTDIR is used to
      create a binary archive. The ldconfig call should be delegated to the
      archive postinst script. This fixes the case where fakeroot wraps 'make
      install' causing $EUID to be 0 even though it doesn't have permission to
      call ldconfig.
      
      The previous logic in configure.ac to detect and correct libdir
      has been removed as it was not completely accurate.  CentOS 64-bit
      users should again specifiy --libdir=/usr/lib64 when configuring
      to prevent install to /usr/lib.
      
      Updated Makefile:check-old-libdir to check for orphans in
      lib64 when installing to lib as well as orphans in lib when installing
      to lib64.
      
      Updated Makefile and main/Makefile uninstall targets to remove the
      orphans using the new logic.
      
      ASTERISK-26705
      
      Change-Id: I51739d4a03e60bff38be719b8d2ead0007afdd51
      a7d94f50
  25. Mar 27, 2017
  26. Feb 27, 2017
    • George Joseph's avatar
      build: Warn if asterisk is installed in both 32 and 64 bit sys dirs · 4692a32e
      George Joseph authored
      ... and clean them both up on uninstall.
      
      We've fixed the issue where 'make install' was installing to
      /usr/lib on 64-bit systems that use /usr/lib64.  Now we need
      to clean up the remnants in /usr/lib.
      
      * 'make install' now prints a warning if DESTDIR/ASTLIBDIR
        contains 'lib64' and libasterisk* shared libraries or modules
        are also found in DESTDIR/ASTLIBDIR with 'lib64' transformed
        to 'lib'.
      
      * 'make uninstall' ALWAYS cleans up both DESTDIR/ASTLIBDIR and
        DESTDIR/ASTLIBDIR with 'lib64' transformed to 'lib'.
      
      ASTERISK-26705
      
      Change-Id: I6edddeb3c07a51e7c7ba7cac3c05e4bf3ec3f01f
      4692a32e
  27. Feb 23, 2017
    • George Joseph's avatar
      build: Execute ldconfig to build cache. (take two) · b0067bcf
      George Joseph authored
      On some platforms a multiarch approach is used for libraries.
      The build system does not take this into account and still
      places libraries into the lib directory if no --libdir is
      specified to configure. On initial startup this results in
      libasteriskssl.so not being found, as it is not in the multiarch
      lib directory.  To make matters worse, options were being passed
      to ldconfig on both Linux and FreeBSD that actually prevented
      the rebuild of the cache.
      
       * Fedora has a /usr/share/config.site that automatically tells
         autoconf to use /usr/lib64 but CentOS does not. This logic was
         copied to configure.ac and modified so systems like Ubuntu,
         which still use /usr/lib for 64-bit systems, aren't affected.
      
      Now that we have them in the correct directory...
      
      In order for the system loader to find libasteriskssl and
      libasteriskpj, one of 3 things has to happen...
      
        - The linker cache must be rebuilt including the directory
          where the libasterisk* libraries were installed.  Only root
          can rebuild the cache.  This was busted.
        - We have to link the asterisk binary with an rpath pointing
          to the directrory where the libasterisk* libraries were
          installed.  This makes things very complicated and will happen
          over the collective dead bodies of everyone who's had to
          package a distribution with an rpath.
        - Finally, you can start asterisk with LD_LIBRARY_PATH set to the
          directrory where the libasterisk* libraries were installed.
      
      There are no other options. So...
      
       * The invokation of ldconfig has been moved from main/Makefile
         to ASTTOPDIR/Makefile, the options have been removed, and
         DESTDIR/ASTLIBDIR appended.  If you aren't root, you will be
         warned after the "Asterisk Installation Compete" banner that
         you must re-run 'make install' as root, manually run
         'ldconfig DESTDIR/ASTLIBDIR' as root, or run asterisk with
         LD_LIBRARY_PATH.
      
      ASTERISK-26705
      
      Change-Id: I2a64b7c33a7d3e9bde20f47e3d3ab771977af982
      b0067bcf
  28. 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
  29. 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
  30. Jul 19, 2016
  31. Jul 18, 2016
  32. May 19, 2016
  33. 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
  34. Jan 27, 2016
    • George Joseph's avatar
      build_system: Prevent goals needing makeopts from running when it's missing · c53903d4
      George Joseph authored
      The Makefile only optionally includes makeopts so when goals like uninstall that
      dont depend on anything else are run after a distclean, rules like
      'rm -f "$(DESTDIR)$(ASTMODDIR)/"*' get run as 'rm -f ""/*' which attempts
      to remove everything in the root directory.
      
      Although there's a rule defined for makeopts which prints a message and does
      an 'exit 1', since '-include makepopts' was specified (with the -), the exit
      was ignored letting the rest of the rules run.
      
      This patch makes makeopts required unless the goal has the string 'clean' in it.
      
      ASTERISK-25730 #close
      Reported-by: George Joseph
      
      Change-Id: I1bce59a7ea4f48e7a468e22b2abbb13c63417ac7
      c53903d4
  35. Jan 21, 2016
  36. Nov 04, 2015
    • Corey Farrell's avatar
      Fix cli display of build options. · b0bf1899
      Corey Farrell authored
      A previous commit reduced the AST_BUILDOPTS compiler define to
      only include options that affected ABI.  This included some options
      that were previously displayed by cli "core show settings".  This
      change corrects the CLI display while still restricting buildopts.h
      to ABI effecting options only.
      
      ASTERISK-25434 #close
      Reported by: Rusty Newton
      
      Change-Id: Id07af6bedd1d7d325878023e403fbd9d3607e325
      b0bf1899
  37. Oct 31, 2015
    • Matt Jordan's avatar
      Makefile: Add a rule 'basic-pbx' that installs the Basic PBX configs · 80cf4960
      Matt Jordan authored
      This patch adds a rule for installing the Super Awesome Company based 'Basic
      PBX' configuration files. As part of adding this rule, a bit of the content
      that makes up installing the configuration files under the 'samples' target
      was refactored into a make subroutine for usage by additional later config
      make targets.
      
      Change-Id: I6c2e27906f73e2919a2b691da0be20ae70302404
      80cf4960
  38. Sep 25, 2015
Loading