Skip to content
Snippets Groups Projects
  1. Feb 24, 2017
  2. 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
    • Sean Bright's avatar
      res_config_pgsql: Fix thread safety problems · 0f4b349d
      Sean Bright authored
      * A missing AST_LIST_UNLOCK() in find_table()
      
      * The ESCAPE_STRING() macro uses pgsqlConn under the hood and we were
        not consistently locking before calling it.
      
      * There were a handful of other places where pgsqlConn was accessed
        directly without appropriate locking.
      
      Change-Id: Iea63f0728f76985a01e95b9912c3c5c6065836ed
      0f4b349d
    • Joshua Colp's avatar
      25688ab7
    • Joshua Colp's avatar
      channel: Add support for writing to a specific stream. · 6cc890b8
      Joshua Colp authored
      This change adds an ast_write_stream function which allows
      writing a frame to a specific media stream. It also moves
      ast_write() to using this underneath by writing media
      frames provided to it to the default streams of the channel.
      Existing functionality (such as audiohooks, framehooks, etc)
      are limited to being applied to the default stream only.
      
      Unit tests have also been added which test the behavior of
      both non-multistream and multistream channels to confirm that
      the write() and write_stream() callbacks are invoked
      appropriately.
      
      ASTERISK-26793
      
      Change-Id: I4df20d1b65bd4d787fce0b4b478e19d2dfea245c
      6cc890b8
  3. Feb 22, 2017
  4. Feb 21, 2017
    • zuul's avatar
    • Sean Bright's avatar
      pbx_dundi: DUNDi weight parameter not processed correctly · fc70ca94
      Sean Bright authored
      The DUNDi weight field is not always converted from network byte order
      to host byte order. This can result in incorrect weight values and
      incorrect selection of DUNDi destinations.
      
      ASTERISK-18731 #close
      Reported by: Peter Racz
      Patches:
      	dundi_weight.patch (license #6290) patch uploaded by Peter Racz
      
      Change-Id: Iba3e1a700ff539db57211a7bbc26f7b22ea9a1be
      fc70ca94
    • Mark Michelson's avatar
      Add initial SDP state code. · a738772e
      Mark Michelson authored
      This establishes the basic allocation/destruction of an SDP state
      object, plus some of the simpler getter methods involved. Subsequent
      tasks will deal with adding a state machine, creating SDPs from
      capabilities and options, and merging SDPs into a joint SDP.
      
      Change-Id: Ie3757ce186f04b65e9d1883f5aace53f24e53709
      a738772e
    • Joshua Colp's avatar
      Merge changes from topic 'sdp_state_beginnings' · 16b0bb39
      Joshua Colp authored
      * changes:
        Add SDP translator and PJMEDIA implementation.
        Add initial SDP options.
      16b0bb39
    • Joshua Colp's avatar
      cf7abc9d
    • Sean Bright's avatar
      realtime: Fix ast_load_realtime_multientry handling · ab04a018
      Sean Bright authored
      ast_load_realtime_multientry() returns an ast_config structure whose
      ast_categorys are keyed with the empty strings. Several modules were
      giving semantic meaning to the category names causing problems at
      runtime.
      
      * app_directory: Treated the category name as the mailbox name, and
        would fail to direct calls to the appropriate extension after an
        entry was chosen.
      
      * app_queue: Queues, queue members, and queue rules were all affected
        and needed to be updated.
      
      * pbx_realtime: Pattern matching would never succeed because the
        extension entered by the user was always compared to the empty
        string.
      
      Change-Id: Ie7e44986344b0b76ea8f6ddb5879f5040c6ca8a7
      ab04a018
    • Sean Bright's avatar
      realtime: Centralize some common realtime backend code · 6e6c96d7
      Sean Bright authored
      All of the realtime backends create artificial ast_categorys to pass
      back into the core as query results. These categories have no filename
      or line number information associated with them and the backends differ
      slightly on how they create them. So create a couple helper macros to
      help make things more consistent.
      
      Also updated the call sites to remove redundant error messages about
      memory allocation failure.
      
      Note that res_config_ldap sets the category filename to the 'table name'
      but that is not read by anything in the core, so I've dropped it.
      
      Change-Id: I3a1fd91e0c807dea1ce3b643b0a6fe5be9002897
      6e6c96d7
    • zuul's avatar
      144b09ab
    • Joshua Colp's avatar
      build: Execute ldconfig to build cache. · 28c8e4f5
      Joshua Colp 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.
      
      This change does the minimally invasive thing and executes
      ldconfig so that the libraries in the lib directory are found
      and their location cached. By doing so Asterisk starts up fine.
      
      If DESTDIR is specified, however, the old logic is executed as
      the install process may not have permission to alter the ldconfig
      cache.
      
      ASTERISK-26705
      
      Change-Id: If4eca46ac510c6fea5568256280ffdb3888d7bb4
      28c8e4f5
    • Richard Mudgett's avatar
      res_pjsip_authenticator_digest.c: Fix sorcery's immutable contract violation. · 6f15500c
      Richard Mudgett authored
      The inbound authentication object is supposed to be immutable when it is
      stored in sorcery.  However, the immutable property is violated if the
      authentication object does not have a realm set.
      
      The immutable contract violation has a different effect depending upon
      what sorcery back end is used.  If it is the config file back end you
      would get the same object back until res_pjsip is reloaded.  If it is the
      real-time or AstDB back end you would get a new object on each query.  If
      it is cached you would get the same object back until it is refreshed from
      the database.
      
      Once an inbound authentication object has its realm set it may or may not
      get updated again if the default_realm changes.
      
      If the same authentication object is used for inbound and outbound
      authentication then the immutable violation can make it very hard to
      determine why the outbound authentication now fails.  The only diagnostic
      message is a complaint about no realms matching when it had worked
      earlier.  It fails because of the difference in behaviour for an empty
      realm setting between inbound and outbound authentication objects.
      
      * Fixed the sorcery object immutable violation by creating a new object
      and setting the default_realm on it instead.  The new object is a shallow
      copy for speed.
      
      * The auth_store thread storage no longer holds an auth ref.  It
      interferes with the shallow copy and never needed a ref anyway.
      
      ASTERISK-26799 #close
      
      Change-Id: I2328a52f61b78ed5fbba38180b7f183ee7e08956
      6f15500c
    • Richard Mudgett's avatar
      res_pjsip: Update artificial auth whenever default_realm changes. · 6400f5f3
      Richard Mudgett authored
      There was code attempting to update the artificial authentication object
      whenever the default_realm changed.  However, once the artificial
      authentication object was created it would never get updated.  The
      artificial authentication object would require a system restart for a
      change to the default_realm to take effect.
      
      ASTERISK-26799
      
      Change-Id: Id59036e9529c2d3ed728af2ed904dc36e7094802
      6400f5f3
    • Richard Mudgett's avatar
      res_pjsip: Update authentication realm documentation. · 0b660c99
      Richard Mudgett authored
      Using the same auth section for inbound and outbound authentication is not
      recommended.  There is a difference in meaning for an empty realm setting
      between inbound and outbound authentication uses.
      
      An empty inbound auth realm represents the global section's default_realm
      value when the authentication object is used to challenge an incoming
      request.  An empty outgoing auth realm is treated as a don't care wildcard
      when the authentication object is used to respond to an incoming
      authentication challenge.
      
      ASTERISK-26799
      
      Change-Id: Id3952f7cfa1b6683b9954f2c5d2352d2f11059ce
      0b660c99
Loading