Skip to content
Snippets Groups Projects
  1. Sep 12, 2022
  2. Sep 09, 2022
    • Joshua C. Colp's avatar
      pjsip: Add TLS transport reload support for certificate and key. · a0713a9f
      Joshua C. Colp authored
      This change adds support using the pjsip_tls_transport_restart
      function for reloading the TLS certificate and key, if the filenames
      remain unchanged. This is useful for Let's Encrypt and other
      situations. Note that no restart of the transport will occur if
      the certificate and key remain unchanged.
      
      ASTERISK-30186
      
      Change-Id: I9bc95a6bf791830a9491ad9fa43c17d4010028d0
      a0713a9f
  3. May 22, 2022
  4. Mar 25, 2022
    • Hugh McMaster's avatar
      configure.ac: Use pkg-config to detect libxml2 · 64f11e0d
      Hugh McMaster authored
      Use pkg-config to detect libxml2, falling back to xml2-config if the
      former is not available.
      
      This patch ensures Asterisk continues to build on systems without
      xml2-config installed.
      
      The patch also updates the associated 'configure' files.
      
      ASTERISK-29970 #close
      
      Change-Id: I3c90dfe0b0590486cbb8e6d426a7c5c4199410c0
      64f11e0d
  5. Mar 03, 2022
    • George Joseph's avatar
      xml.c, config,c: Add stylesheets and variable list string parsing · b40c4d59
      George Joseph authored
      Added functions to open, close, and apply XML Stylesheets
      to XML documents.  Although the presence of libxslt was already
      being checked by configure, it was only happening if xmldoc was
      enabled.  Now it's checked regardless.
      
      Added ability to parse a string consisting of comma separated
      name/value pairs into an ast_variable list.  The reverse of
      ast_variable_list_join().
      
      Change-Id: I1e1d149be22165a1fb8e88e2903a36bba1a6cf2e
      b40c4d59
  6. Jan 31, 2022
    • Sean Bright's avatar
      build: Rebuild configure and autoconfig.h.in · ce91a0fd
      Sean Bright authored
      autoconfigh.h.in was missed in the original review for this
      issue. Additionally it looks like I have newer pkg-config autoconf
      macros on my development machine.
      
      ASTERISK-29817
      
      Change-Id: I3c85a4de82c5d7d6e0e23dad4c33bb650a86a57b
      ce91a0fd
  7. Jan 19, 2022
    • Michał Górny's avatar
      BuildSystem: Fix misdetection of gethostbyname_r() on NetBSD · 6a879eea
      Michał Górny authored
      Fix the configure script not to detect the presence of gethostbyname_r()
      on NetBSD incorrectly.  NetBSD includes it as an internal libc symbol
      that is not exposed in system headers and that is incompatible with
      other implementations.  In order to avoid misdetecting it, perform
      the symbol check only if the declaration is found in the public header
      first.
      
      ASTERISK-29817
      
      Change-Id: Iafa359b09908251bcd299ff54be003ea129b9eda
      6a879eea
  8. Jan 07, 2022
    • George Joseph's avatar
      bundled_pjproject: Make it easier to hack · bc59b66d
      George Joseph authored
      There are times when you need to troubleshoot issues with bundled
      pjproject or add new features that need to be pushed upstream
      but...
      
      * The source directory created by extracting the pjproject tarball
        is not scanned for code changes so you have to keep forcing
        rebuilds.
      * The source directory isn't a git repo so you can't easily create
        patches, do git bisects, etc.
      * Accidentally doing a make distclean will ruin your day by wiping
        out the source directory, and your changes.
      * etc.
      
      This commit makes that easier.
      See third-party/pjproject/README-hacking.md for the details.
      
      ASTERISK-29824
      
      Change-Id: Idb1251040affdab31d27cd272dda68676da9b268
      bc59b66d
  9. Nov 18, 2021
  10. Nov 08, 2021
  11. Nov 04, 2021
  12. Oct 20, 2021
    • George Joseph's avatar
      BuildSystem: Check for alternate openssl packages · 0adcdbd1
      George Joseph authored
      OpenSSL is one of those packages that often have alternatives
      with later versions.  For instance, CentOS/EL 7 has an
      openssl package at version 1.0.2 but there's an openssl11
      package from the epel repository that has 1.1.1.  This gets
      installed to /usr/include/openssl11 and /usr/lib64/openssl11.
      Unfortunately, the existing --with-ssl and --with-crypto
      ./configure options expect to point to a source tree and
      don't work in this situation.  Also unfortunately, the
      checks in ./configure don't use pkg-config.
      
      In order to make this work with the existing situation, you'd
      have to run...
      ./configure --with-ssl=/usr/lib64/openssl11 \
          --with-crypto=/usr/lib64/openssl11 \
          CFLAGS=-I/usr/include/openssl11
      
      BUT...  those options don't get passed down to bundled pjproject
      so when you run make, you have to include the CFLAGS again
      which is a big pain.
      
      Oh...  To make matters worse, although you can specify
      PJPROJECT_CONFIGURE_OPTS on the ./configure command line,
      they don't get saved so if you do a make clean, which will
      force a re-configure of bundled pjproject, those options
      don't get used.
      
      So...
      
      * In configure.ac... Since pkg-config is installed by install_prereq
        anyway, we now use it to check for the system openssl >= 1.1.0.
        If that works, great.  If not, we check for the openssl11
        package. If that works, great.  If not, we fall back to just
        checking for any openssl.  If pkg-config isn't installed for some
        reason, or --with-ssl=<dir> or --with-crypto=<dir> were specified
        on the ./configure command line, we fall back to the existing
        logic that uses AST_EXT_LIB_CHECK().
      
      * The whole OpenSSL check process has been moved up before
        THIRD_PARTY_CONFIGURE(), which does the initial pjproject
        bundled configure, is run.  This way the results of the above
        checks, which may result in new include or library directories,
        is included.
      
      * Although not strictly needed for openssl, We now save the value of
        PJPROJECT_CONFIGURE_OPTS in the makeopts file so it can be used
        again if a re-configure is triggered.
      
      ASTERISK-29693
      
      Change-Id: I341ab7603e6b156aa15a66f43675ac5029d5fbde
      0adcdbd1
  13. Oct 15, 2021
  14. Sep 08, 2021
    • Sean Bright's avatar
      dns.c: Load IPv6 DNS resolvers if configured. · 695fc3db
      Sean Bright authored
      IPv6 nameserver addresses are stored in different part of the
      __res_state structure, so look there if we appear to have support for
      it.
      
      ASTERISK-28004 #close
      
      Change-Id: I67067077d8a406ee996664518d9c8fbf11f6977d
      695fc3db
  15. Aug 17, 2021
  16. Jan 18, 2021
    • Jaco Kroon's avatar
      AC_HEADER_STDC causes a compile failure with autoconf 2.70 · 060ce101
      Jaco Kroon authored
      From https://www.mail-archive.com/bug-autoconf@gnu.org/msg04408.html
      
      
      
      > ... the long-obsolete AC_HEADER_STDC, previously used internally by
      > AC_INCLUDES_DEFAULT, used AC_EGREP_HEADER.  The AC_HEADER_STDC macro
      > is now a no-op (and is not used at all within Autoconf anymore), so
      > that change is likely what made the first use of AC_EGREP_HEADER the
      > one inside the if condition, causing the observed results.
      
      The implication is that the test does nothing anyway, and due to it
      being a no-op from 2.70 onwards, results in the required not being set
      to yes, resulting in ./configure to fail.
      
      Change-Id: Ic1ff38d87f791fbf1f2a80512f81bb7110392460
      Signed-off-by: default avatarJaco Kroon <jaco@uls.co.za>
      060ce101
  17. Jan 06, 2021
    • Jaco Kroon's avatar
      pbx_lua: Add LUA_VERSIONS environment variable to ./configure. · 4e038c1e
      Jaco Kroon authored
      
      On Gentoo it's possible to have multiple lua versions installed, all
      with a path of /usr, so it's not possible to use the current --with-lua
      option to determisticly pin to a specific version as is required by the
      Gentoo PMS standards.
      
      This environment variable allows to lock to specific versions,
      unversioned check will be skipped if this variable is supplied.
      
      Change-Id: I8c403eda05df25ee0193960262ce849c7d2fd088
      Signed-off-by: default avatarJaco Kroon <jaco@uls.co.za>
      4e038c1e
  18. 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
  19. Oct 28, 2020
    • Alexander Traud's avatar
      BuildSystem: Enable Lua 5.4. · db4320a6
      Alexander Traud authored
      Note to maintainers: Lua 5.4, Lua 5.3, and Lua 5.2 have not been tested
      at runtime with pbx_lua. Until then, use the lowest available version
      of Lua, if you enabled the module pbx_lua at all.
      
      Change-Id: Ie5270448b11fcb4e2a53d899e4fe7fea793ce7e0
      db4320a6
  20. Jun 05, 2020
  21. May 05, 2020
  22. Apr 17, 2020
  23. Apr 16, 2020
  24. Apr 15, 2020
  25. Apr 13, 2020
    • Alexander Traud's avatar
      pjproject_bundled: Repair ./configure --with-ssl without ARG. · 3431949a
      Alexander Traud authored
      ASTERISK-28758
      Reported by: Patrick Wakano
      Reported by: Dmitriy Serov
      
      Change-Id: Ifb6b85c559d116739af00bc48d1f547caa85efac
      3431949a
    • Alexander Traud's avatar
      BuildSystem: Search for Python/C API when possibly needed only. · 610e0581
      Alexander Traud authored
      The Python/C API is used only if the Test Framework was enabled in Asterisk
      'make menuselect'. The Test Framework is available only if the Developer Mode
      was enabled in Asterisk './configure --enable-dev-mode'. And that Python/C API
      is used only if the PJProject was found and not disabled in Asterisk; the user
      did not go for './configure --without-pjproject'.
      
      Furthermore, because version 2 of that Python/C API is required (currently) and
      because some platforms do not offer a generic version 2, the script searches
      for 2.7 explicitly as well.
      
      To avoid version mismatch between the Python/C API and the Python environment,
      the script searches for the latter in the same versions, in the same the order
      as well. Because this Python/C API is just for (some) Asterisk contributors,
      the script also goes for the Python 3 environment as a last resort for all
      other Asterisk users. This allows 'make full' even on minimal installations of
      Ubuntu 18.04 LTS and newer.
      
      Because the Python/C API is Asterisk contributor specific, the Python packages
      are removed from the script './contrib/scripts/install_prereq' as this script
      is intended for Asterisk users. Asterisk contributors have to install much more
      packages in any case, like:
      sudo apt install autoconf automake git git-review python2.7-dev
      
      ASTERISK-28824
      ASTERISK-27717
      
      Change-Id: Id46d357e18869f64dcc217b8fdba821b63eeb876
      610e0581
    • traud's avatar
      BuildSystem: Remove doc/tex and doc/pdf leftovers. · 7cdb493a
      traud authored
      Furthermore, the nowhere used compress is removed.
      
      ASTERISK-28816
      
      Change-Id: I77daab80cfabb56d51c3ea6b1d14bd9b9fbc577c
      7cdb493a
  26. Apr 09, 2020
  27. Mar 25, 2020
  28. Feb 26, 2020
    • Sebastian Kemper's avatar
      check_expr2: fix cross-compile/hardening issues · b7fbb9c4
      Sebastian Kemper authored
      
      When building check_expr2 with ASLR PIE hardening enabled the linker
      fails. This is resolved by adding the regular compiler flags when
      building the object files from ast_expr2f.c and ast_expr2.c.
      
      Note: The STANDALONE define is removed because it is already defined in
      _ASTCFLAGS. YY_NO_INPUT is defined so that the compile survives
      '--enable-dev-mode'.
      
      Also, a Makefile variable "CROSS_COMPILING" is added so that the
      build system doesn't try to run check_expr2 when cross-compiling,
      because that will fail the build as will.
      
      ASTERISK-28685 #close
      
      Signed-off-by: default avatarSebastian Kemper <sebastian_ml@gmx.net>
      Change-Id: If435b7db9f9ad8266245bda51c81c220f9658915
      b7fbb9c4
  29. Feb 18, 2020
    • Ben Ford's avatar
      RTP/ICE: Send on first valid pair. · 168637cc
      Ben Ford authored
      When handling ICE negotiations, it's possible that there can be a delay
      between STUN binding requests which in turn will cause a delay in ICE
      completion, preventing media from flowing. It should be possible to send
      media when there is at least one valid pair, preventing this scenario
      from occurring.
      
      A change was added to PJPROJECT that adds an optional callback
      (on_valid_pair) that will be called when the first valid pair is found
      during ICE negotiation. Asterisk uses this to start the DTLS handshake,
      allowing media to flow. It will only be called once, either on the first
      valid pair, or when ICE negotiation is complete.
      
      ASTERISK-28716
      
      Change-Id: Ia7b68c34f06d2a1d91c5ed51627b66fd0363d867
      168637cc
  30. Dec 16, 2019
  31. Jun 13, 2019
    • Joshua Colp's avatar
      res_rtp_asterisk: Add support for DTLS packet fragmentation. · a8e5cf55
      Joshua Colp authored
      This change adds support for larger TLS certificates by allowing
      OpenSSL to fragment the DTLS packets according to the configured
      MTU. By default this is set to 1200.
      
      This is accomplished by implementing our own BIO method that
      supports MTU querying. The configured MTU is returned to OpenSSL
      which fragments the packet accordingly. When a packet is to be
      sent it is done directly out the RTP instance.
      
      ASTERISK-28018
      
      Change-Id: If2d5032019a28ffd48f43e9e93ed71dbdbf39c06
      a8e5cf55
  32. Apr 04, 2019
    • Sebastian Kemper's avatar
      loader: support for permanent dlopen() · ccac55b8
      Sebastian Kemper authored
      
      Asterisk assumes that dlopen() will always run the constructor of a
      shared library and every dlclose() will run its destructor. But dlopen()
      may be permanent, meaning the constructor will only be run once, as is
      the case with musl libc.
      
      With a permanent dlopen() the Asterisk module loader does not work
      correctly, because it's expectations regarding when the constructors and
      destructors are run are not met. In fact a segmentation fault will occur
      when the first module is "re-opened" that has AST_MODFLAG_GLOBAL_SYMBOLS
      set (the dlopen() does not call the constructor, resource_being_loaded
      is not set to NULL, then strlen is called with NULL instead of a string,
      see issue ASTERISK-28319).
      
      This commit adds code to the loader that will manually run the
      constructors/destructors of the (non-builtin) modules where needed. To
      achieve this a new ao2 container (linked list) is started and filled
      with objects that contain the names of the modules and the pointers to
      their respective info structs.
      
      This behavior can be activated when configuring Asterisk
      (--enable-permanent-dlopen). By default this is disabled, of course.
      
      ASTERISK-28319 #close
      
      Signed-off-by: default avatarSebastian Kemper <sebastian_ml@gmx.net>
      Change-Id: I86693a0ecf25d5ba81c73773a03df4abc3426875
      ccac55b8
  33. Jan 23, 2019
    • Jean Aunis's avatar
      build : Fix cross-compilation errors · d9fae4a8
      Jean Aunis authored
      Bundled pjproject and jansson must be configured with the host and build
      parameters provided to the configure script.
      Autotools do not permit to check for the existence of local header files, so
      the control of hrirs.h must not be done when cross-compiling.
      
      ASTERISK-28250
      
      Change-Id: If0a76e52a87d4ab82b7d4c72d27d8759ca931880
      d9fae4a8
Loading