Skip to content
Snippets Groups Projects
  1. May 02, 2015
  2. May 01, 2015
    • Corey Farrell's avatar
      Astobj2: Fix initialization order of refdebug and AO2_DEBUG. · 8f3cee12
      Corey Farrell authored
      This ensures that refdebug is initialized before AO2_DEBUG if
      both are enabled, since AO2_DEBUG allocates a container.
      
      This change also makes AO2_DEBUG initialization critical, a
      failure will abort Asterisk startup.  This is needed since
      the failure would be caused by reg_containers allocation
      failure, and that would result in a segmentation fault by
      ao2_container_register later in startup.
      
      ASTERISK-25048 #close
      Reported by: Corey Farrell
      
      Change-Id: I9a243ea3fc5653b48b931ba6d61971cb2e530244
      8f3cee12
    • Matt Jordan's avatar
      main/pbx: Improve performance of dialplan reloads with a large number of hints · 7ac28be0
      Matt Jordan authored
      The PBX core maintains two hash tables for hints: a container of the
      actual hints (hints), along with a container of devices that are watching that
      hint (hintdevices). When a dialplan reload occurs, each hint in the hints
      container is destroyed; this requires a lookup in the container of devices to
      find the device => hint mapping object. In the current code, this performs an
      ao2_callback, iterating over each of the device to hint objects in the
      hintdevices container. For a large number of hints, this is extremely
      expensive: dialplan reloads with 20000 hints could take several minutes
      in just this phase.
      
      This patch improves the performance of this step in the dialplan reloads
      by caching which devices are watching a hint on the hint object itself.
      Since we don't want to create a circular reference, we just cache the
      name of the device. This allows us to perform a smarter ao2_callback on
      the hintdevices container during hint removal, hashing on the name of the
      device and returning an iterator to the matching names. The overall
      performance improvement is rather large, taking this step down to a number of
      seconds as opposed to minutes.
      
      In addition, this patch also registers the hint containers in the PBX
      core with the astobj2 library. This allows for reasonable debugging to
      hash collisions in those containers.
      
      ASTERISK-25040 #close
      Reported by: Matt Jordan
      
      Change-Id: Iedfc97a69d21070c50fca42275d7b3e714e59360
      7ac28be0
    • Matt Jordan's avatar
      01f3d5b7
  3. Apr 30, 2015
    • Corey Farrell's avatar
      Sample Configs: Fix syntax error in pjsip.conf · 6b208d8c
      Corey Farrell authored
      The sample pjsip.conf has a few comment lines that are missing the
      semicolons at the start of the comment, causing the config to fail
      load.
      
      Change-Id: I776a38c916a7df7ee3e072fd0b21dbf4cc457352
      6b208d8c
    • Joshua Colp's avatar
    • Mark Michelson's avatar
      Prevent potential crash on blond transfer. · dc23204a
      Mark Michelson authored
      Scenario:
      Alice calls Bob. Bob performs a blond transfer to Carol. Carol rejects
      the incoming call (or some other immediate circumstance causes Carol not
      to answer the call)
      
      What occurs in this case is that when the bridge between Alice and Bob
      breaks, Alice is told to masquerade into Bob's channel that had placed
      the call to Carol. The actual masquerade goes down without a hitch.
      However, a channel fixup callback that attempts to publish dial events
      over Stasis has a crash. The reason for this crash is that the datastore
      on Bob's channel that placed the outbound call to Carol only had a bare
      pointer to Carol's channel. Since Carol rejected the incoming call,
      Carol's channel has been hung up and freed, meaning accessing her
      channel results in a crash.
      
      The fix here is simple. The dial fixup code has been altered to hold
      references to the involved channels and to drop those references when
      freeing data.
      
      ASTERISK-25025 #close
      Reported by Chet Stevens
      
      Change-Id: I54eedda207b8ec7a69263353b43abe5746aea197
      dc23204a
    • Corey Farrell's avatar
      Build System: Fix issue with addons moduleinfo. · 47fa2ad1
      Corey Farrell authored
      The build system now scans additional sources when generating
      moduleinfo for menuselect.  Unfortunately the extra sources
      for format_mp3 only exist if downloaded.
      
      Use the Makefile macro 'wildcard' to allow moduleinfo generator
      to ignore sources that do not exist.
      
      Change-Id: I596604713b7345ce994f32197f8f6bfd9bcf4170
      47fa2ad1
    • Joshua Colp's avatar
      res_ari_device_states: Fix dependency on res_stasis_device_state. · bb6ddb3d
      Joshua Colp authored
      The res_ari_device_states module depends on res_stasis_device_state,
      not res_stasis_device_states.
      
      Change-Id: I26e02ad37f9e36bcc859867e2fad1b90452ec3de
      bb6ddb3d
    • Mark Michelson's avatar
    • Richard Mudgett's avatar
      chan_dahdi: Add the chan_dahdi.conf force_restart_unavailable_chans option. · 03c51cf5
      Richard Mudgett authored
      Some telco switches occasionally ignore ISDN RESTART requests.  The fix
      for ASTERISK-19608 added an escape clause for B channels in the restarting
      state if the telco ignores a RESTART request.  If the telco fails to
      acknowledge the RESTART then Asterisk will assume the telco acknowledged
      the RESTART on the second call attempt requesting the B channel by the
      telco.  The escape clause is good for dealing with RESTART requests in
      general but it does cause the next call for the restarting B channel to be
      rejected if the telco insists the call must go on that B channel.
      
      chan_dahdi doesn't really need to issue a RESTART request in response to
      receiving a cause 44 (Requested channel not available) code.  Sending the
      RESTART in such a situation is not required (nor prohibited) by the
      standards.  I think chan_dahdi does this for historical reasons to deal
      with buggy peers to get channels unstuck in a similar fashion as the
      chan_dahdi.conf resetinterval option.
      
      * Add the chan_dahdi.conf force_restart_unavailable_chans compatability
      option that when disabled will prevent chan_dahdi from trying to RESTART
      the channel in response to a cause 44 code.
      
      ASTERISK-25034 #close
      Reported by: Richard Mudgett
      
      Change-Id: Ib8b17a438799920f4a2038826ff99a1884042f65
      03c51cf5
    • Joshua Colp's avatar
      res_pjsip_outbound_registration: Fix double unref on error return. · 80aa9aee
      Joshua Colp authored
      When the PJSIP pjsip_regc_send function is invoked and an error
      status returned the caller currently decrements the reference count
      of the client state that it just incremented, assuming the
      registration callback would not have been invoked. In practice
      this is not correct. If the failure happens after the transaction
      has been set up the callback will still be invoked. This will
      cause the reference count to be incorrectly decremented twice, once
      by the registration callback and second by the caller of
      pjsip_regc_send.
      
      This change makes it so that whether the callback is invoked or
      not is known by the caller of pjsip_regc_send. Depending on
      this it can know whether it is responsible for decrementing the
      reference count of the client state or not.
      
      ASTERISK-25037 #close
      Reported by: Joshua Colp
      
      Change-Id: I749dc12f3a22115c49c5d7d95ff42a5fa45319de
      80aa9aee
  4. Apr 29, 2015
  5. Apr 28, 2015
    • Mark Michelson's avatar
      Merge "CHANGES: Add missing spaces." · 36a9bd99
      Mark Michelson authored
      36a9bd99
    • Yousf Ateya's avatar
      chan_iax2: Ensure that IAX flags are 64 bits. · 5ebfed8e
      Yousf Ateya authored
      Flags are 64 bits.  Without LLU suffix the value of 1<<31 is negative.
      Although it doesn't have an effect on the current implementation, it will
      be problem if more flags are added.
      
      Change-Id: Ic290c81cfbbbf062872392d99d3322932cc49487
      5ebfed8e
    • Ashley Sanders's avatar
      chan_pjsip: Creating Channel Causes Asterisk to Crash When Duplicate AOR · 46cf643c
      Ashley Sanders authored
                  Sections Exist in pjsip.conf
      
      This patch modifies the current loading strategy of the pjsip configuration. If
      duplicate sections (e.g. sections containing the same [id/type]) are defined in
      [pjsip.conf], the loader will consider the configuration for the given type as
      invalid when the duplicate section is encountered. The entire configuration
      (including what was previously loaded) for the duplicate [id/type] sections
      will be rejected and destroyed, an error message is logged and the load
      processing for the given stops.
      
      ASTERISK-24996
      Reported By: Ashley Sanders
      
      Change-Id: I35090ca4cd40f1f34881dfe701a329145c347aef
      46cf643c
    • Richard Mudgett's avatar
      chan_vpb: Fix compile error due to use of ASTERISK_FILE_VERSION. · 0bbe2c35
      Richard Mudgett authored
      Change-Id: I51179e2a83937423676da522b766f1126de4059e
      0bbe2c35
    • Mark Michelson's avatar
      res_pjsip_outbound_registration: Add debugging messages. · f47fed2e
      Mark Michelson authored
      When problems occur regarding outbound registrations, it currently
      is difficult to debug. Most off-nominal paths had warning messages,
      but sometimes we want to know what's going on before hitting the
      off-nominal path. This patch adds lots of debugging output that
      should give a clearer picture of what is happening with regards
      to outbound registrations.
      
      ASTERISK-25020
      Reported by Mark Michelson
      
      Change-Id: I577bde7860be0a6c872b5bcb4d5047340bf45d45
      f47fed2e
    • Joshua Colp's avatar
    • Steve Davies's avatar
      res_rtp_asterisk: Resolve 2 discrete memory leaks in DTLS · 5e965848
      Steve Davies authored
      ao2 ref leak in res_rtp_asterisk.c when a DTLS policy is created.
      The resources are linked into a table, but the original alloc refs
      are never released. ast_strdup leak in rtp_engine.c. If
      ast_rtp_dtls_cfg_copy() is called twice on the same destination struct,
      a pointer to an alloc'd string is overwritten before the string is free'd.
      
      ASTERISK-25022
      Reported by: one47
      
      Change-Id: I62a8ceb8679709f6c3769136dc6aa9a68202ff9b
      5e965848
Loading