Skip to content
Snippets Groups Projects
  1. Nov 18, 2015
    • Matt Jordan's avatar
      res_statsd: Add functions that support variable arguments · 3354b325
      Matt Jordan authored
      Often, the metric names of statistics we are generating for StatsD have some
      dynamic component to them. This can be the name of a particular resource, or
      some internal status label in Asterisk. With the current set of functions,
      callers of the statsd API must first build the metric name themselves, then
      pass this to the API functions. This results in a large amount of boilerplate
      code and usage of either fixed length static buffers or dynamic memory
      allocation, neither of which is desireable.
      
      This patch adds two new functions to the StatsD API that support a printf
      style format specifier for constructing the metric name. A dynamic string,
      allocated in threadstorage, is used to build the metric name. This eases
      the burden on users of the StatsD API.
      
      Change-Id: If533c72d1afa26d807508ea48b4d8c7b32f414ea
      3354b325
    • tcambron's avatar
      StatsD: Add res_statsd compatibility · 1e0040b8
      tcambron authored
      Added a new api to res_statsd.c to allow it to receive a
      character pointer for the value argument. This allows for a
      '+' and a '-' to easily be sent with the value.
      
      ASTERISK-25419
      Reported By: Ashley Sanders
      
      Change-Id: Id6bb53600943d27347d2bcae26c0bd5643567611
      1e0040b8
    • Matt Jordan's avatar
  2. Nov 17, 2015
  3. Nov 16, 2015
    • Matt Jordan's avatar
      res/res_pjsip: Fix off nominal crash with requests that fail and have a timer · f62b642f
      Matt Jordan authored
      When a request is sent using pjsip_endpt_send_request and fails, a condition
      exists where the request wrapper, which is an AO2 object, may be de-ref'd
      more times than it should. This occurs when the request's callback is called,
      and, in the callback, the timer on the PJSIP heap is cancelled. When that
      occurs, the request wrapper's lifetime is decremented. When
      pjsip_endpt_send_request fails, we unilaterally decrement the lifetime of
      the request wrapper again, even though we've already cancelled the reference
      associated with the timer.
      
      This patch checks the return result of pj_timer_heap_cancel_if_active before
      removing the reference associated with the timer. We now only decrement it
      in this case if a timer is cancelled as a result of the function call.
      
      Change-Id: I21332343a1a019c1117076f9bf2df27be2850102
      f62b642f
    • Mark Michelson's avatar
      Confbridge: Add a user timeout option · fdd2afcd
      Mark Michelson authored
      This option adds the ability to specify a timeout, in seconds, for a
      participant in a ConfBridge. When the user's timeout has been reached,
      the user is ejected from the conference with the CONFBRIDGE_RESULT
      channel variable set to "TIMEOUT".
      
      The rationale for this change is that there have been times where we
      have seen channels get "stuck" in ConfBridge because a network issue
      results in a SIP BYE not being received by Asterisk. While these
      channels can be hung up manually via CLI/AMI/ARI, adding some sort of
      automatic cleanup of the channels is a nice feature to have.
      
      ASTERISK-25549 #close
      Reported by Mark Michelson
      
      Change-Id: I2996b6c5e16a3dda27595f8352abad0bda9c2d98
      fdd2afcd
    • Alec Davis's avatar
      app_queue: (try_calling): mutex 'qe->chan' freed more times than we've locked! · 7debb986
      Alec Davis authored
      commit aae45acb (Mark Michelson 2015-04-15 10:38:02 -0500 6525)
      refer ASTERISK-24958
      
      above commit removed ast_channel_lock(qe->chan);
      but failed to remove corresponding ast_channel_unlock(qe->chan);
      
      ASTERISK-25561 #close
      Reported Alec Davis
      
      Change-Id: Ie05f4e2d08912606178bf1fded57cc022c7a2e1a
      7debb986
  4. Nov 14, 2015
    • Joshua Colp's avatar
      hashtab: Add NULL check when destroying iterator. · afd9a89e
      Joshua Colp authored
      The hashtab API is pretty NULL tolerant which has resulted
      in remaining callers not doing much checks themselves.
      Unfortunately the function to destroy an iterator does not
      do a NULL check and will result in a crash if passed NULL.
      This change fixes that.
      
      ASTERISK-25552 #close
      
      Change-Id: Ic1bf8eec3639e5a440f1c941d3ae3893ac6ed619
      afd9a89e
  5. Nov 13, 2015
    • Richard Mudgett's avatar
      res_pjsip_rfc3326.c: Fix crash when channel goes away. · c0f2f8de
      Richard Mudgett authored
      If an authenticated incoming caller does not respond to our 200 OK INVITE
      response with an ACK then PJSIP will hangup the call.  Unfortunately,
      there is a chance that the session's channel will go away between one use
      of the channel pointer and another when building the BYE request because
      the BYE is being built by the monitor thread and not the call's serializer
      thread.
      
      * Added a check to ensure that the thread trying to add the Reason header
      is the call's serializer thread.  This ensures that the channel will not
      go away on us.
      
      Change-Id: I866388d2b97ea2032eaae3f3ab3f1ca6cbd2df89
      c0f2f8de
    • Mark Michelson's avatar
      Taskprocessors: Increase high-water mark · 4f43b85c
      Mark Michelson authored
      In practical tests, we have seen certain taskprocessors, specifically
      Stasis subscription taskprocessors, cross the recently-added high-water
      mark and emit a warning. This high-water mark warning is only intended
      to be emitted when things have tanked on the system and things are
      heading south quickly. In the practical tests, the Stasis taskprocessors
      sometimes had a max depth of 180 tasks in them, and Asterisk wasn't in
      any danger at all.
      
      As such, this ups the high-water mark to 500 tasks instead. It also
      redefines the SIP threadpool request denial number to be a multiple of
      the taskprocessor high-water mark.
      
      Change-Id: Ic8d3e9497452fecd768ac427bb6f58aa616eebce
      4f43b85c
    • Alexander Traud's avatar
      format: Register format-attribute module with cached formats. · d8d39913
      Alexander Traud authored
      In Asterisk 13, cached formats are created before their corresponding format-
      attribute module is registered. Cached formats are involved when a local
      extension is called. Therefore, ast_format_generate_sdp_fmtp did not work
      on local extensions. This change affects the Opus Codec, H.263 (Plus), H.264,
      and format-attribute modules provided externally.
      
      ASTERISK-25160 #close
      
      Change-Id: I1ea1f0483e5261e2a050112e4ebdfc22057d1354
      d8d39913
  6. Nov 12, 2015
  7. Nov 11, 2015
  8. Nov 10, 2015
  9. Nov 09, 2015
  10. Nov 06, 2015
    • Walter Doekes's avatar
      func_callerid: Document that CALLERID(pres) is available. · 6d1bdb9d
      Walter Doekes authored
      CALLERPRES() says that it's deprecated in favor of CALLERID(num-pres)
      and CALLERID(name-pres).  But for channel driver that don't make a
      distinction between the two (e.g. SIP), it makes more sense to get/set
      both at once.  This change reveals the availability of CALLERID(pres),
      CONNECTEDLINE(pres), REDIRECTING(orig-pres), REDIRECTING(to-pres) and
      REDIRECTING(from-pres).
      
      ASTERISK-25373 #close
      
      Change-Id: I5614ae4ab7d3bbe9c791c1adf147e10de8698d7a
      6d1bdb9d
    • Walter Doekes's avatar
      docs: Fix a few typo's in app docs (more then, resourse). · 84103366
      Walter Doekes authored
      Change-Id: Iba57efadf6c0b822e762c7a001bc89611d98afd7
      84103366
    • Walter Doekes's avatar
      xmldoc: Improve xmldoc wrapping of 'core show ...' output. · 0d425f2e
      Walter Doekes authored
      Previously, the wrapping did both lookahead and lookback, which,
      together with color escape sequences, caused some lines to be wrapped
      way earlier than other lines.  This led to inconsistent output.
      
      This simplifies the wrapping code and makes it more sane: if maxcolumns
      is hit, we simply jump back to the last space and wrap there.
      
      ASTERISK-25527 #close
      
      Change-Id: I56d01c6f9a812642b1b05535c98d4db48d17c957
      0d425f2e
    • Alexander Traud's avatar
      res_pjsip_sdp_rtp: Enable Opus to be negotiated via SIP/SDP. · 33752e08
      Alexander Traud authored
      In SIP/SDP, Opus has two channels always (see RFC 7587 section 7). The actual
      amount of channels is negotiated in-band. Therefore now, the Opus codec and its
      attribute rtpmap are registered with two channels.
      
      ASTERISK-24779 #close
      Reported by: PowerPBX
      Tested by: Alexander Traud
      patches:
        asterisk-24779.patch submitted by Sean Bright (license #5060)
      
      Change-Id: Ic7ac13cafa1d3450b4fa4987350924b42cbb657b
      33752e08
  11. Nov 05, 2015
    • Jonathan Rose's avatar
      taskprocessor: Add high water mark warnings · 6ff48319
      Jonathan Rose authored
      If a taskprocessor's queue grows large, this can indicate that there
      may be a problem with tasks not leaving the processor or else that
      the number of available task processors for a given type of task is
      too low. This patch makes it so that if a taskprocessor's task queue
      grows above 100 queued tasks that it will emit a warning message.
      Warning messages are emitted only once per task processor.
      
      ASTERISK-25518 #close
      Reported by: Jonathan Rose
      
      Change-Id: Ib1607c35d18c1d6a0575b3f0e3ff5d932fd6600c
      6ff48319
  12. Nov 04, 2015
    • Matt Jordan's avatar
      main/dial: Protect access to the format_cap structure of the requesting channel · 506aea26
      Matt Jordan authored
      When a dial attempt is made that involves a requesting channel, we previously
      were not:
      a) Protecting access to the native format capabilities structure on the
         requesting channel. That is inherently unsafe.
      b) Reference bumping the lifetime of the format capabilities structure.
      
      In both cases, something else could sneak in, blow away the format
      capabilities, and we'd be holding onto an invalid format_cap structure. When
      the newly created channel attempts to construct its format capabilities, things
      go poorly.
      
      This patch:
      a) Ensures that we get a reference to the native format capabilities while
         the requesting channel is locked
      b) Holds a reference to the native format capabilities during the creation
         of the new channel.
      
      ASTERISK-25522 #close
      
      Change-Id: I0bfb7ba8b9711f4158cbeaae96edf9626e88a54f
      506aea26
    • Corey Farrell's avatar
      Fix cli display of build options. · d098d004
      Corey Farrell authored
      A previous commit reduced the AST_BUILDOPTS compiler define to
      only include options that affected ABI.  This included some options
      that were previously displayed by cli "core show settings".  This
      change corrects the CLI display while still restricting buildopts.h
      to ABI effecting options only.
      
      ASTERISK-25434 #close
      Reported by: Rusty Newton
      
      Change-Id: Id07af6bedd1d7d325878023e403fbd9d3607e325
      d098d004
    • Matt Jordan's avatar
      res_pjsip/location: Destroy contact_status objects on contact deletion · afec1b1b
      Matt Jordan authored
      The contact_status Sorcery objects are currently not destroyed when a contact
      is deleted. This causes the contact's last known RTT/status to be 'sticky'
      when the contact itself may no longer exist. This patch causes the
      contact_status objects associated with both dynamic and static contacts to
      be destroyed if the AoR holding those contacts is also destroyed (or via
      other paths where a contact may be deleted.)
      
      Change-Id: I7feec8b9278cac3c5263a4c0483f4a0f3b62426e
      afec1b1b
    • Matt Jordan's avatar
Loading