Skip to content
Snippets Groups Projects
  1. Sep 15, 2015
    • Mark Michelson's avatar
      scheduler: Use queue for allocating sched IDs. · 5c713fdf
      Mark Michelson authored
      It has been observed that on long-running busy systems, a scheduler
      context can eventually hit INT_MAX for its assigned IDs and end up
      overflowing into a very low negative number. When this occurs, this can
      result in odd behaviors, because a negative return is interpreted by
      callers as being a failure. However, the item actually was successfully
      scheduled. The result may be that a freed item remains in the scheduler,
      resulting in a crash at some point in the future.
      
      The scheduler can overflow because every time that an item is added to
      the scheduler, a counter is bumped and that counter's current value is
      assigned as the new item's ID.
      
      This patch introduces a new method for assigning scheduler IDs. Instead
      of assigning from a counter, a queue of available IDs is maintained.
      When assigning a new ID, an ID is pulled from the queue. When a
      scheduler item is released, its ID is pushed back onto the queue. This
      way, IDs may be reused when they become available, and the growth of ID
      numbers is directly related to concurrent activity within a scheduler
      context rather than the uptime of the system.
      
      Change-Id: I532708eef8f669d823457d7fefdad9a6078b99b2
      5c713fdf
  2. Sep 11, 2015
  3. Sep 10, 2015
  4. Sep 09, 2015
  5. Sep 08, 2015
  6. Sep 07, 2015
    • Alexander Anikin's avatar
      chan_ooh323: call ast_rtp_instance_stop on ooh323_destroy · 480c443e
      Alexander Anikin authored
          Call ast_rtp_instance_stop on ooh323_destroy to free resources
          allocated by rtp instance
      
          ASTERISK-25299 #close
          Report by: Alexandr Dranchuk
      
      Change-Id: I455096bd7da016b871afe90af86067c2c7c9f33f
      480c443e
    • Matt Jordan's avatar
      res/res_pjsip: Purge contacts when an AoR is deleted · c3e6debd
      Matt Jordan authored
      When an AoR is deleted by an external mechanism, such as through ARI, we
      currently do not remove dynamic contacts that were created for that AoR as a
      result of a received REGISTER request. As a result, re-creating the AoR will
      cause the dynamic contact to be interpreted as a persistent contact, leading
      to some rather strange state being created for the contacts/endpoints.
      
      This patch adds a sorcery observer for the 'aor' object. When a delete is
      issued on the underlying sorcery object, the observer is called, and all
      contacts created and persisted in sorcery for that AoR are also removed. Note
      that we don't want to perform this action when an AO2 object that is an AoR is
      destroyed, as the AoR can still exist in the backing storage (and we would
      thus be removing valid contacts from an AoR that still "exists".)
      
      ASTERISK-25381 #close
      
      Change-Id: I6697e51ef6b2858b5d63401f35dc378bb0f90328
      c3e6debd
  7. Sep 05, 2015
  8. Sep 04, 2015
    • David M. Lee's avatar
      Fix when remote candidates exceed PJ_ICE_MAX_CAND · 61c6c6aa
      David M. Lee authored
      We were passing the wrong count into pj_ice_sess_create_check_list(),
      causing the create to fail if we ever received more than PJ_ICE_MAX_CAND
      candidates.
      
      Change-Id: I0303d8e1ecb20a8de9fe629a3209d216c4028378
      61c6c6aa
    • Mark Michelson's avatar
      res_pjsip: Change default from user value. · ac62928d
      Mark Michelson authored
      When Asterisk sends an outbound SIP request, if there is no direct
      reason to place a specific value for the username in the From header,
      Asterisk would generate a UUID. For example, this would happen when
      sending outbound OPTIONS requests when qualifying or when sending
      outbound INVITE requests when originating (if no explicit caller ID were
      provided). The issue is that some SIP providers reject these sorts of
      requests with a "Name too long" error response.
      
      This patch aims to fix this by changing the default outbound username in
      From headers to "asterisk". This value can be overridden by changing the
      default_from_user option in the global options if desired.
      
      ASTERISK-25377 #close
      Reported by Mark Michelson
      
      Change-Id: I6a4d34a56ff73ff4f661b0075aeba5461b7f3190
      ac62928d
    • Scott Griepentrog's avatar
      endpoint snapshot: avoid second cleanup on alloc failure · 6002472a
      Scott Griepentrog authored
      In ast_endpoint_snapshot_create(), a failure to init the
      string fields results in two attempts to ao2_cleanup the
      same pointer.  Removed RAII_VAR to eliminate problem.
      
      ASTERISK-25375 #close
      Reported by: Scott Griepentrog
      
      Change-Id: If4d9dfb1bbe3836b623642ec690b6d49b25e8979
      6002472a
    • Martin Tomec's avatar
      res/pjsip: Mark WSS transport as secure · d32e516c
      Martin Tomec authored
      Pjsip is refusing to use unsecure transport with "sips" in url.
      WSS should be considered as secure transport.
      
      ASTERISK-24602 #comment Partially fixed by setting WSS as secure
      
      Change-Id: Iddac406c6deba6240c41a603b8859dfefe1a5353
      d32e516c
  9. Sep 02, 2015
    • Joshua Colp's avatar
    • Mark Michelson's avatar
      res_pjsip: Fix contact refleak on stateful responses. · ad9cb6c2
      Mark Michelson authored
      When sending a stateful response, creation of the transaction can fail,
      most commonly because we are trying to create a transaction from a
      retransmitted request. When creation of the transaction fails, we end up
      leaking a reference to a contact that was bumped when the response was
      created.
      
      This patch adds the missing deref and fixes the reference leak.
      
      Change-Id: I2f97ad512aeb1b17e87ca29ae0abacb4d6395f07
      ad9cb6c2
    • Joshua Colp's avatar
      pbx: Fix crash when issuing "core show hints" with long pattern match. · cc136320
      Joshua Colp authored
      When issuing the "core show hints" CLI command a combination of both
      the hint extension and context is created. This uses a fixed size
      buffer expecting that the extension will not exceed maximum extension
      length. When the extension is actually a pattern match this constraint
      does not hold true, and the extension may exceed the maximum extension
      length. In this case extra characters are written past the end of the
      fixed size buffer.
      
      This change makes it so the construction of the combined hint extension
      and context can not exceed the size of the buffer.
      
      ASTERISK-25367 #close
      
      Change-Id: Idfa1b95d0d4dc38e675be7c1de8900b3f981f499
      cc136320
  10. Sep 01, 2015
    • Mark Michelson's avatar
      res_pjsip_pubsub: re-re-fix persistent subscription storage. · d58c8d73
      Mark Michelson authored
      A recent change to res_pjsip_pubsub switched to using pjsip_msg_print as
      a means of writing an appropriate packet to persistent storage. While
      this partially solved the issue, it had its own problems.
      pjsip_msg_print will always add a Content-Length header to the message
      it prints. Frequent restarts of Asterisk can result in persistent
      subscriptions being written with five or more Content-Length headers. In
      addition, sometimes some apparent corruption of individual headers could
      be seen.
      
      This aims to fix the problem by not running a parsed message through an
      interpreter but rather by taking the raw message and saving it. The
      logic for what to save is going to be different depending on whether a
      SUBSCRIBE was received from the wire or if it was pulled from
      persistence. When receiving a packet from the wire, when using a
      streaming transport, the rdata->pkt_info.packet may contain multiple SIP
      messages or fragments. However, the rdata->msg_info.msg_buf will always
      contain the current SIP message to be processed. When pulling from
      persistence, though, the rdata->msg_info.msg_buf will be NULL since no
      transport actually handled the packet. However, since we know that we
      will always ever pull one SIP message from persistence, we are free to
      save directly from rdata->pkt_info.packet instead.
      
      ASTERISK-25365 #close
      Reported by Mark Michelson
      
      Change-Id: I33153b10d0b4dc8e3801aaaee2f48173b867855b
      d58c8d73
  11. Aug 31, 2015
Loading