Skip to content
Snippets Groups Projects
  1. Mar 07, 2018
    • Jean Aunis's avatar
      chan_sip: Fix improper RTP framing on outgoing calls · 75a35ee5
      Jean Aunis authored
      The "ptime" SDP parameter received in a SIP response was not honoured.
      Moreover, in the abscence of this "ptime" parameter, locally configured
      framing was lost during response processing.
      
      This patch systematically stores the framing information in the
      ast_rtp_codecs structure, taking it from the response or from the
      configuration as appropriate.
      
      ASTERISK-27674
      
      Change-Id: I828a6a98d27a45a8afd07236a2bd0aa3cbd3fb2c
      75a35ee5
  2. Mar 03, 2018
  3. Feb 20, 2018
    • Joshua Colp's avatar
      chan_sip: Emit a second ringing event to ensure channel is found. · 259c8067
      Joshua Colp authored
      When constructing a dialog-info+xml NOTIFY message a ringing channel
      is found if the state is ringing and further information is placed into
      the message. Due to the migration to the Stasis message bus this did
      not always work as expected.
      
      This change raises a second ringing event in such a way to guarantee
      that the event is received by chan_sip and another lookup is done to
      find the ringing channel.
      
      ASTERISK-24488
      
      Change-Id: I547a458fc59721c918cb48be060cbfc3c88bcf9c
      259c8067
  4. Feb 13, 2018
  5. Feb 03, 2018
    • Oron Peled's avatar
      chan_console: don't read and write at the same time · 5b8fea93
      Oron Peled authored
      It seems that the ALSA backend of PortAudio doesn't know how to both
      read and write at the same time by adding a per-device mutex.
      
      FIXME: currently only a draft version. Need to either auto-detect
      we work with the ALSA backend or add an extra configuration option
      to use this mutex.
      
      ASTERISK-27426 #close
      
      Change-Id: I635eacee45f5413faa18f5a3b606af03b926dacb
      5b8fea93
  6. Jan 24, 2018
    • Corey Farrell's avatar
      Remove redundant module checks and references. · 527cf5a5
      Corey Farrell authored
      This removes references that are no longer needed due to automatic
      references created by module dependencies.
      
      In addition this removes most calls to ast_module_check as they were
      checking modules which are listed as dependencies.
      
      Change-Id: I332a6e8383d4c72c8e89d988a184ab8320c4872e
      527cf5a5
  7. Jan 18, 2018
  8. 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
  9. Jan 11, 2018
  10. Dec 31, 2017
    • Sean Bright's avatar
      ice: Increase foundation buffer size · 15f8b9b8
      Sean Bright authored
      Per RFC 5245, the foundation specified with an ICE candidate can be up
      to 32 characters but we are only allowing for 31.
      
      ASTERISK-27498 #close
      Reported by: Michele Prà
      
      Change-Id: I05ce7a5952721a76a2b4c90366168022558dc7cf
      15f8b9b8
  11. Dec 22, 2017
  12. 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
  13. Dec 19, 2017
    • Corey Farrell's avatar
      chan_sip: Fix memory leaks. · 3c037ef9
      Corey Farrell authored
      In change_redirecting_information variables we use ast_strlen_zero to
      see if a value should be saved.  In the case where the value is not NULL
      but is a zero length string we leaked.
      
      handle_response_subscribe leaked a reference to the ccss monitor
      instance.
      
      Change-Id: Ib11444de69c3d5b2360a88ba2feb54d2c2e9f05f
      3c037ef9
    • Corey Farrell's avatar
      Remove constant conditionals (dead-code). · b3e839de
      Corey Farrell authored
      Some variables are set and never changed, making them constant.  This
      means that code in the 'false' block of the conditional is unreachable.
      
      In chan_skinny and res_config_ldap I used preprocessor directive `#if 0`
      as I'm unsure if the unreachable code could be enabled in the future.
      
      Change-Id: I62e2aac353d739fb3c983cf768933120f5fba059
      b3e839de
    • Oron Peled's avatar
      chan_console: Use correct parameter for 'set active' · c02e2564
      Oron Peled authored
      chan_console supports multiple devices but the CLI only works on a
      single device. 'console set active' selects this device.
      
      Sadly that CLI picks the wrong command-line parameter and will only
      work for a device called 'active'.
      
      ASTERISK-27490 #close
      
      Change-Id: I2f0e5fe63db19845bee862575b739360797dc73d
      c02e2564
  14. 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
  15. Dec 16, 2017
    • Richard Mudgett's avatar
      chan_pjsip.c: Improve ast_request() diagnostic msgs. · 4a461bcd
      Richard Mudgett authored
      Attempting to dial PJSIP/endpoint when the endpoint doesn't exist and
      disable_multi_domain=no results in a misleading empty endpoint name
      message.  The message should say the endpoint was not found.
      
      * Added missing endpoint not found message.
      
      * Added more information to the empty endpoint name msgs if available.
      
      * Eliminated RAII_VAR in request().
      
      Change-Id: I21da85ebd62dcc32115b2ffcb5157416ebae51e4
      4a461bcd
  16. Dec 15, 2017
    • Corey Farrell's avatar
      chan_sip: Add security event for calls to invalid extension. · 6f8b34f9
      Corey Farrell authored
      Log a message to security events when an INVITE is received to an
      invalid extension.
      
      ASTERISK-25869 #close
      
      Change-Id: I0da40cd7c2206c825c2f0d4e172275df331fcc8f
      6f8b34f9
    • Corey Farrell's avatar
      aco: Minimize use of regex. · bf2d3593
      Corey Farrell authored
      Remove nearly all use of regex from ACO users.  Still remaining:
      * app_confbridge has a legitamate use of option name regex.
      * ast_sorcery_object_fields_register is implemented with regex, all
        callers use simple prefix based regex.  I haven't decided the best
        way to fix this in both 13/15 and master.
      
      Change-Id: Ib5ed478218d8a661ace4d2eaaea98b59a897974b
      bf2d3593
  17. Dec 13, 2017
  18. Dec 12, 2017
    • Sean Bright's avatar
      chan_sip: Don't send trailing \0 on keep alive packets · 0c9cc7e9
      Sean Bright authored
      This is a partial fix for ASTERISK~25817 but does not address the
      comments regarding RFC 5626.
      
      Change-Id: I227e2d10c0035bbfa1c6e46ae2318fd1122d8420
      0c9cc7e9
    • Sean Bright's avatar
      chan_sip: Don't crash in Dial on invalid destination · 5039b574
      Sean Bright authored
      Stripping the DNID in a SIP dial string can result in attempting to call
      the argument parsing macros on an empty string, causing a crash.
      
      ASTERISK-26131 #close
      Reported by: Dwayne Hubbard
      Patches:
      	dw-asterisk-master-dnid-crash.patch (license #6257) patch
      	uploaded by Dwayne Hubbard
      
      Change-Id: Ib84c1f740a9ec0539d582b09d847fc85ddca1c5e
      5039b574
    • 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
  19. 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
  20. 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
  21. Dec 01, 2017
    • George Joseph's avatar
      AST-2017-013: chan_skinny: Call pthread_detach when sess threads end · 075faac2
      George Joseph authored
      chan_skinny creates a new thread for each new session.  In trying
      to be a good cleanup citizen, the threads are joinable and the
      unload_module function does a pthread_cancel() and a pthread_join()
      on any sessions that are active at that time.  This has an
      unintended side effect though. Since you can call pthread_join on a
      thread that's already terminated, pthreads keeps the thread's
      storage around until you explicitly call pthread_join (or
      pthread_detach()).   Since only the module_unload function was
      calling pthread_join, and even then only on the ones active at the
      tme, the storage for every thread/session ever created sticks
      around until asterisk exits.
      
      * A thread can detach itself so the session_destroy() function
        now calls pthread_detach() just before it frees the session
        memory allocation.  The module_unload function still takes care
        of the ones that are still active should the module be unloaded.
      
      ASTERISK-27452
      Reported by: Juan Sacco
      
      Change-Id: I9af7268eba14bf76960566f891320f97b974e6dd
      (cherry picked from commit 8f5dff54)
      075faac2
  22. Nov 21, 2017
  23. Nov 15, 2017
  24. 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
  25. Nov 09, 2017
  26. Nov 06, 2017
    • 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
  27. Nov 02, 2017
  28. Oct 24, 2017
    • Corey Farrell's avatar
      chan_sip: Fix SUBSCRIBE with missing "Expires" header. · 6474de5f
      Corey Farrell authored
      When chan_sip receives a SUBSCRIBE request with no "Expires" header it
      processes the request as an unsubscribe.  This is incorrect, per RFC3264
      when the "Expires" header is missing a default expiry should be used.
      
      ASTERISK-18140
      
      Change-Id: Ibf6dcd4fdd07a32c2bc38be1dd557981f08188b5
      6474de5f
  29. Oct 21, 2017
  30. Oct 18, 2017
    • Corey Farrell's avatar
      chan_sip: Fix output of 'sip set debug off'. · c9e19b31
      Corey Farrell authored
      When sip.conf contains 'sipdebug=yes' it is impossible to disable it
      using CLI 'sip set debug off'.  This corrects the output of that CLI
      command to instruct the user to turn sipdebug off in the configuration
      file.
      
      ASTERISK-23462 #close
      
      Change-Id: I1cceade9caa9578e1b060feb832e3495ef5ad318
      c9e19b31
  31. Oct 14, 2017
    • Guido Falsi's avatar
      chan_dahdi: wrap include file which is not present on BSD systems in #ifdef · c4f40b77
      Guido Falsi authored
      The sys/sysmacros.h include file does not exist in BSD systems and
      is not required to build this module there.
      Since an "#if defined(__NetBSD__) || defined(__FreeBSD__)" section
      already exist I moved that include line inside it's #else branch.
      
      ASTERISK-27343 #close
      
      Change-Id: Ibfb64f4e9a0ce8b6eda7a7695cfe57916f175dc1
      c4f40b77
  32. Oct 11, 2017
    • George Joseph's avatar
      chan_vpb: Fix a gcc 7 out-of-bounds complaint · ab4d3653
      George Joseph authored
      chan_vpb was trying to use sizeof(*p->play_dtmf), where
      p->play_dtmf is defined as char[16], to get the length of the array
      but since p->play_dtmf is an actual array, sizeof(*p->play_dtmf)
      returns the size of the first array element, which is 1.  gcc7
      validly complains because the context in which it's used could
      cause an out-of-bounds condition.
      
      Change-Id: If9c4bfdb6b02fa72d39e0c09bf88900663c000ba
      ab4d3653
  33. Oct 05, 2017
    • Daniel Tryba's avatar
      res_pjsip_caller_id chan_sip: Comply to RFC 3323 values for privacy · 59b6e846
      Daniel Tryba authored
      Currently privacy requests are only granted if the Privacy header
      value is exactly "id" (defined in RFC 3325). It ignores any other
      possible value (or a combination there of). This patch reverses the
      logic from testing for "id" to grant privacy, to testing for "none" and
      granting privacy for any other value. "none" must not be used in
      combination with any other value (RFC 3323 section 4.2).
      
      ASTERISK-27284 #close
      
      Change-Id: If438a21f31a962da32d7a33ff33bdeb1e776fe56
      59b6e846
  34. Sep 25, 2017
Loading