Skip to content
Snippets Groups Projects
  1. Jan 16, 2018
    • Richard Mudgett's avatar
      res_pjsip: Split type=identify to IP address and SIP header matching priorities · 8494e780
      Richard Mudgett authored
      The type=identify endpoint identification method can match by IP address
      and by SIP header.  However, the SIP header matching has limited
      usefulness because you cannot specify the SIP header matching priority
      relative to the IP address matching.  All the matching happens at the same
      priority and the order of evaluating the identify sections is
      indeterminate.  e.g., If you had two type=identify sections where one
      matches by IP address for endpoint alice and the other matches by SIP
      header for endpoint bob then you couldn't predict which endpoint is
      matched when a request comes in that matches both.
      
      * Extract the SIP header matching criteria into its own "header" endpoint
      identification method so the user can specify the relative priority of the
      SIP header and the IP address matching criteria in the global
      endpoint_identifier_order option.  The "ip" endpoint identification method
      now only matches by IP address.
      
      ASTERISK-27491
      
      Change-Id: I9df142a575b7e1e3471b7cda5d3ea156cef08095
      8494e780
  2. Jan 15, 2018
    • Corey Farrell's avatar
      loader: Add dependency fields to module structures. · 9cfdb81e
      Corey Farrell authored
      * Declare 'requires' and 'enhances' text fields on module info structure.
      * Rename 'nonoptreq' to 'optional_modules'.
      * Update doxygen comments.
      
      Still need to investigate dependencies among modules I cannot compile.
      
      Change-Id: I3ad9547a0a6442409ff4e352a6d897bef2cc04bf
      9cfdb81e
    • Corey Farrell's avatar
      vector: Additional string vector definitions. · 35ae99c7
      Corey Farrell authored
      ast_vector_string_split:
      This function will add items to an ast_vector_string by splitting values
      of a string buffer.  Items are appended to the vector in the order they
      are found.
      
      ast_vector_const_string:
      A vector of 'const char *'.
      
      Change-Id: I1bf02a1efeb2baeea11c59c557d39dd1197494d7
      35ae99c7
  3. Jan 03, 2018
    • Corey Farrell's avatar
      loader: Create ast_module_running_ref. · 55f1d69c
      Corey Farrell authored
      This function returns NULL if the module in question is not running.  I
      did not change ast_module_ref as most callers do not check the result
      and they always call ast_module_unref.
      
      Make use of this function when running registered items from:
      * app_stack API's
      * bridge technologies
      * CLI commands
      * File formats
      * Manager Actions
      * RTP engines
      * Sorcery Wizards
      * Timing Interfaces
      * Translators
      * AGI Commands
      * Fax Technologies
      
      ASTERISK-20346 #close
      
      Change-Id: Ia16fd28e188b2fc0b9d18b8a5d9cacc31df73fcc
      55f1d69c
  4. Dec 30, 2017
  5. Dec 29, 2017
    • Corey Farrell's avatar
      datastore: Add automatic module references. · 0fe7df64
      Corey Farrell authored
      Add a reference to the calling module when it is active to protect
      access to datastore->info.  Remove module references done by
      func_periodic_hook as the datastore now handles it.
      
      ASTERISK-25128 #close
      
      Change-Id: I8357a3711e77591d0d1dd8ab4211a7eedd782c89
      0fe7df64
  6. Dec 22, 2017
  7. Dec 20, 2017
    • Corey Farrell's avatar
      Fix Common Typo's. · 1b80ffa4
      Corey Farrell authored
      Fix instances of:
      * Retreive
      * Recieve
      * other then
      * different then
      * Repeated words ("the the", "an an", "and and", etc).
      * othterwise, teh
      
      ASTERISK-24198 #close
      
      Change-Id: I3809a9c113b92fd9d0d9f9bac98e9c66dc8b2d31
      1b80ffa4
    • Richard Mudgett's avatar
      manager.h: Bump AMI version · 3625e915
      Richard Mudgett authored
      Change-Id: I62e6ddeb261ef012687e1fb6734c554e2499b6bf
      3625e915
  8. Dec 18, 2017
    • Corey Farrell's avatar
      netsock: Remove from Asterisk core. · 064c74e4
      Corey Farrell authored
      This moves netsock.c / netsock.h to the chan_iax2 module.  netsock.h has
      been marked deprecated since 13.0.0, chan_iax2 is the only remaining
      user.
      
      Change-Id: I28c6578043bac18de5ea608e136acec4f83d5dd3
      064c74e4
  9. Dec 15, 2017
    • Corey Farrell's avatar
      aco: Create ways to minimize use of regex. · a455e183
      Corey Farrell authored
      ACO uses regex in many situations where it is completely unneeded.  In
      some cases this doubles the total processing performed by
      aco_process_config.
      
      * Create ACO_IGNORE category type for use in place of skip_category
        regex source string.
      * Create additional aco_category_op values to allow specifying category
        filter using either a single plain string or a NULL terminated array
        of plain strings.
      * Create ACO_PREFIX to allow matching option names to case insensitive
        prefixes.
      
      Change-Id: I66a920dcd8e2b0301f73f968016440a985e72821
      a455e183
    • Corey Farrell's avatar
      loader: Replace priority heap with vector. · 7b549033
      Corey Farrell authored
      This is needed for future changes which will require being able to
      process the load priority out of order.
      
      Change-Id: Ia23421197f09789940510b03ebbbf3bf24d51bea
      7b549033
  10. Dec 14, 2017
    • Richard Mudgett's avatar
      res_rtp_asterisk.c: Disable packet flood detection for video streams. · 98f7e925
      Richard Mudgett authored
      We should not do flood detection on video RTP streams.  Video RTP streams
      are very bursty by nature.  They send out a burst of packets to update the
      video frame then wait for the next video frame update.  Really only audio
      streams can be checked for flooding.  The others are either bursty or
      don't have a set rate.
      
      * Added code to selectively disable packet flood detection for video RTP
      streams.
      
      ASTERISK-27440
      
      Change-Id: I78031491a6e75c2d4b1e9c2462dc498fe9880a70
      98f7e925
  11. Dec 12, 2017
    • Richard Mudgett's avatar
      chan_pjsip/res_pjsip: Add CHANNEL(pjsip,request_uri) · 22810fc6
      Richard Mudgett authored
      This patch does three things associated with the initial incoming INVITE
      request URI.
      
      1) Add access to the full initial incoming INVITE request URI.
      
      2) We were not setting DNID on incoming PJSIP channels.  The DNID is the
      user portion of the initial incoming INVITE Request-URI.  The value is
      accessed by reading CALLERID(dnid).
      
      3) Fix CHANNEL(pjsip,target_uri) documentation.
      
      * The initial incoming INVITE request URI is now available using
      CHANNEL(pjsip,request_uri).
      
      * Set the DNID on PJSIP channel creation so CALLERID(dnid) can return the
      initial incoming INVITE request URI user portion.
      
      * CHANNEL(pjsip,target_uri) now correctly documents that the target URI is
      the contact URI.
      
      * Refactored print_escaped_uri() out of channel_read_pjsip() to handle
      pjsip_uri_print() error condition when the buffer is too small.
      
      ASTERISK-27478
      
      Change-Id: I512e60d1f162395c946451becb37af3333337b33
      22810fc6
  12. Dec 11, 2017
    • Kevin Harwell's avatar
      pjsip_options: wrongly applied "UNKNOWN" status · b088cddc
      Kevin Harwell authored
      A couple of places were setting the status to "UNKNOWN" when qualifies were
      being disabled. Instead this should be set to the "CREATED" status that
      represents when a contact is given (uri available), but the qualify frequency
      is set to zero so we don't know the status.
      
      This patch updates the relevant places with "CREATED". It also updates the
      "CREATED" status description (value shown in CLI/AMI/ARI output) to a value
      of "NonQualified"/"NonQual" as this description is hopefully less confusing.
      
      ASTERISK-27467
      
      Change-Id: Id67509d25df92a72eb3683720ad2a95a27b50c89
      b088cddc
  13. Dec 10, 2017
    • Sean Bright's avatar
      astdb: Improve prefix searches in astdb · 9a9edc6c
      Sean Bright authored
      Using the LIKE operator requires a full table scan of 'astdb', whereas a
      comparison operation is able to use the primary key index.
      
      This patch adds a new function to the AstDB API for quick prefix matches
      and updates res_sorcery_astdb to utilize it. This showed substantial
      performance improvement in my test environment.
      
      Related to ASTERISK~26806, but does not completely resolve it.
      
      Change-Id: I7d37f9ba2aea139dabf2ca72d31fbe34bd9b2fa1
      9a9edc6c
  14. Dec 08, 2017
    • Sean Bright's avatar
      utils: Add convenience function for setting fd flags · 2ffe52a1
      Sean Bright authored
      There are many places in the code base where we ignore the return value
      of fcntl() when getting/setting file descriptior flags. This patch
      introduces a convenience function that allows setting or clearing file
      descriptor flags and will also log an error on failure for later
      analysis.
      
      Change-Id: I8b81901e1b1bd537ca632567cdb408931c6eded7
      2ffe52a1
  15. Dec 04, 2017
    • Richard Mudgett's avatar
      security-events: Fix SuccessfulAuth using_password declaration. · 8536a09b
      Richard Mudgett authored
      The SuccessfulAuth using_password field was declared as a pointer to a
      uint32_t when the field was later read as a uint32_t value.  This resulted
      in unnecessary casts and a non-portable field value reinterpret in
      main/security_events.c:add_json_object().  i.e., It would work on a 32 bit
      architecture but not on a 64 bit big endian architecture.
      
      Change-Id: Ia08bc797613a62f07e5473425f9ccd8d77c80935
      8536a09b
  16. Nov 27, 2017
    • Corey Farrell's avatar
      CLI: Remove compatibility code. · d12a2ab4
      Corey Farrell authored
      Previous commits maintained compatibility with older remote console
      clients as well as maintaining all API's.
      
      Remove the following compatibility code:
      * ast_cli_generatornummatches.
      * Remote command "_command nummatches".
      * Sorting / duplicate removal by remote console.
      
      Change-Id: I59e6ce94fa57ae564888442049695f7e46746437
      d12a2ab4
  17. Nov 21, 2017
    • Corey Farrell's avatar
      CLI: Create ast_cli_completion_add function. · 9587a61f
      Corey Farrell authored
      Some completion generators are very inefficent due to the way CLI
      requests matches one at a time.  ast_cli_completion_add can be called
      multiple times during one invokation of a CLI generator to add all
      results without having to reinitialize the search state for each match.
      
      Change-Id: I73d26d270bbbe1e3e6390799cfc1b639e39cceec
      9587a61f
    • Corey Farrell's avatar
      CLI: Remove calls to ast_cli_generator. · a02cbc2e
      Corey Farrell authored
      The ability to add to localized storage cannot be supported by
      ast_cli_generator.  The only calls to ast_cli_generator should be by
      functions that need to proxy the CLI generator, for example 'cli check
      permissions' or 'core show help'.
      
      * ast_cli_generatornummatches now retrieves the vector of matches and
        reports the number of elements (not including 'best' match).
      * test_substitution retrieves and iterates the vector.
      
      Change-Id: I8cd6b93905363cf7a33a2d2b0e2a8f8446d9f248
      a02cbc2e
  18. Nov 20, 2017
  19. Nov 19, 2017
    • Corey Farrell's avatar
      iostream: Fix ast_iostream_printf declaration. · b4862e46
      Corey Farrell authored
      This adds the printf attribute and changes 'fmt' from 'const void *' to
      'const char *'.  This resolves a warning from some compiler for
      vsnprintf needing a literal string for format.
      
      Change-Id: I71c33a8262590042ee451e1146760c10bb22fb78
      b4862e46
  20. Nov 18, 2017
  21. Nov 14, 2017
    • Joshua Colp's avatar
      pjsip / hep: Provide correct local address for Websockets. · 29e0add1
      Joshua Colp authored
      Previously for PJSIP the local address of WebSocket connections
      was set to the remote address. For logging purposes this is
      not particularly useful.
      
      The WebSocket API has been extended to allow the local
      address to be queried and this is used in PJSIP to set the
      local address to the correct value.
      
      The PJSIP HEP support has also been tweaked so that reliable
      transports always use the local address on the transport
      and do not try to (wrongly) guess. As they are connection
      based it is impossible for the source to be anything else.
      
      ASTERISK-26758
      ASTERISK-27363
      
      Change-Id: Icd305fd038ad755e2682ab2786e381f6bf29e8ca
      29e0add1
  22. Nov 13, 2017
    • Corey Farrell's avatar
      alertpipe: Correct documented return of ast_alertpipe_write. · 14253f95
      Corey Farrell authored
      Change-Id: I4ea49c441890a81384144479dc93ab5a3989486d
      14253f95
    • Sean Bright's avatar
      sorcery: Add ast_sorcery_retrieve_by_prefix() · ffccce76
      Sean Bright authored
      Some consumers of the sorcery API use ast_sorcery_retrieve_by_regex
      only so that they can anchor the potential match as a prefix and not
      because they truly need regular expressions.
      
      Rather than using regular expressions for simple prefix lookups, add
      a new operation - ast_sorcery_retrieve_by_prefix - that does them.
      
      Change-Id: I56f4e20ba1154bd52281f995c27a429a854f6a79
      ffccce76
    • Corey Farrell's avatar
      CLI: Create ast_cli_completion_vector. · 14d60cee
      Corey Farrell authored
      This is a rewrite of ast_cli_completion_matches using a vector to build
      the list.  The original function calls the vector version, NULL
      terminates the vector and extracts the elements array.
      
      One change in behavior the results are now sorted and deduplicated. This
      will solve bugs where some duplicate checking was done before the list
      was sorted.
      
      Change-Id: Iede20c5b4d965fa5ec71fda136ce9425eeb69519
      14d60cee
    • Corey Farrell's avatar
      vectors: Add new macro and a string vector definition. · 49304047
      Corey Farrell authored
      * AST_VECTOR_STEAL_ELEMENTS - steal the array of elements for use
        with non-vector code.
      * struct ast_vector_string - a vector of 'char *'.
      
      Change-Id: I104d1b204be03fccf67e02a195596adcb5ab1e42
      49304047
  23. Nov 11, 2017
    • Richard Mudgett's avatar
      core: Add cache_media_frames debugging option. · 90bb0a3e
      Richard Mudgett authored
      The media frame cache gets in the way of finding use after free errors of
      media frames.  Tools like valgrind and MALLOC_DEBUG don't know when a
      frame is released because it gets put into the cache instead of being
      freed.
      
      * Added the "cache_media_frames" option to asterisk.conf.  Disabling the
      option helps track down media frame mismanagement when using valgrind or
      MALLOC_DEBUG.  The cache gets in the way of determining if the frame is
      used after free and who freed it.  NOTE: This option has no effect when
      Asterisk is compiled with the LOW_MEMORY compile time option enabled
      because the cache code does not exist.
      
      To disable the media frame cache simply disable the cache_media_frames
      option in asterisk.conf and restart Asterisk.
      
      Sample asterisk.conf setting:
      [options]
      cache_media_frames=no
      
      ASTERISK-27413
      
      Change-Id: I0ab2ce0f4547cccf2eb214901835c2d951b78c00
      90bb0a3e
  24. Nov 10, 2017
    • Corey Farrell's avatar
      Build: Make function constructor/destructor attributes mandatory. · e9f8b317
      Corey Farrell authored
      This change causes the configure script to fail if the C compiler does
      not support both function attributes constructor and destructor.  These
      were already required as modules cannot function without these attributes
      and Asterisk requires modules.
      
      This also has AST_GCC_ATTRIBUTE set a variable
      ax_cv_have_func_attribute_$1.  This is the same variable name used by
      autoconf-archive's AX_GCC_FUNC_ATTRIBUTE, used for the same purpose.
      
      Change-Id: Id68e8a1447f2a6d707c54b56350e7bfdb33fb663
      e9f8b317
  25. Nov 08, 2017
  26. Nov 06, 2017
    • Richard Mudgett's avatar
      Fix ast_(v)asprintf() malloc failure usage conditions. · ee08f10d
      Richard Mudgett authored
      When (v)asprintf() fails, the state of the allocated buffer is undefined.
      The library had better not leave an allocated buffer as a result or no one
      will know to free it.  The most likely way it can return failure is for an
      allocation failure.  If the printf conversion fails then you actually have
      a threading problem which is much worse because another thread modified
      the parameter values.
      
      * Made __ast_asprintf()/__ast_vasprintf() set the returned buffer to NULL
      on failure.  That is much more useful than either an uninitialized pointer
      or a pointer that has already been freed.  Many uses won't have to check
      for failure to ensure that the buffer won't be double freed or prevent an
      attempt to free an uninitialized pointer.
      
      * stasis.c: Fixed memory leak in multi_object_blob_to_ami() allocated by
      ast_asprintf().
      
      * ari/resource_bridges.c:ari_bridges_play_helper(): Remove assignment to
      the wrong thing which is now not needed even if assigning to the right
      thing.
      
      Change-Id: Ib5252fb8850ecf0f78ed0ee2ca0796bda7e91c23
      ee08f10d
    • Sean Bright's avatar
      dtls: Add support for ephemeral DTLS certificates. · 04d3785a
      Sean Bright authored
      This mimics the behavior of Chrome and Firefox and creates an ephemeral
      X.509 certificate for each DTLS session.
      
      Currently, the only supported key type is ECDSA because of its faster
      generation time, but other key types can be added in the future as
      necessary.
      
      ASTERISK-27395
      
      Change-Id: I5122e5f4b83c6320cc17407a187fcf491daf30b4
      04d3785a
    • 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
  27. Nov 01, 2017
    • Corey Farrell's avatar
      Modules: Additional improvements to CLI completion. · b9f457ea
      Corey Farrell authored
      Replace 'needsreload' argument with a 'type' argument to specify which
      type of modules you want completion.  This provides more accurate CLI
      completion for load and unload commands.
      
      * 'module unload' now excludes modules that have active references or are
        not running.
      * 'module load' now excludes modules that are already running.
      * 'core set debug [atleast] <level> [module]' shows running modules only.
      
      ASTERISK-27378
      
      Change-Id: Iea3e00054461484196c46f688f02635cc886bad1
      b9f457ea
  28. Oct 30, 2017
    • Joshua Colp's avatar
      core / pjsip: Add support for grouping streams together. · 4c535f5c
      Joshua Colp authored
      In WebRTC streams (or media tracks in their world) can be grouped
      together using the mslabel. This informs the browser that each
      should be synchronized with each other.
      
      This change extends the stream API so this information can
      be stored with streams. The PJSIP support has been extended
      to use the mslabel to determine grouped streams and store
      this association on the streams. Finally when creating the
      SDP the group information is used to cause each media stream
      to use the same mslabel.
      
      ASTERISK-27379
      
      Change-Id: Id6299aa031efe46254edbdc7973c534d54d641ad
      4c535f5c
  29. Oct 25, 2017
    • Joshua Colp's avatar
      res_pjsip: Add 'ip' as a valid option to 'identify_by' on endpoint. · 9e1fbab3
      Joshua Colp authored
      When the identify_by option on an endpoint is set to ip it will
      only be identified using the res_pjsip_endpoint_identifier_ip module.
      This ensures that it is not mistakenly matched using the username of
      the From header. To ensure behavior has not changed the default has
      been changed to "username,ip" for the identify_by option.
      
      ASTERISK-27206
      
      Change-Id: I2170b86a7f7e221b4f00bf14aa1ef1ac5b050bbd
      9e1fbab3
Loading