Skip to content
Snippets Groups Projects
  1. Sep 19, 2015
    • Joshua Colp's avatar
      pbx: Update device and presence state when changing a hint extension. · 2bd27d12
      Joshua Colp authored
      When changing a hint extension without removing the hint first the
      device state and presence state is not updated. This causes the state
      of the hint to be that of the previous extension and not the current
      one. This state is kept until a state change occurs as a result of
      something (presence state change, device state change).
      
      This change updates the hint with the current device and presence
      state of the new extension when it is changed. Any state callbacks
      which may have been added before the hint extension is changed are
      also informed of the new device and presence state if either have
      changed.
      
      ASTERISK-25394 #close
      
      Change-Id: If268f1110290e502c73dd289c9e7e7b27bc8432f
      2bd27d12
  2. Sep 17, 2015
    • Joshua Colp's avatar
    • Mark Michelson's avatar
      res_pjsip_pubsub: Eliminate race during initial NOTIFY. · fe5077b1
      Mark Michelson authored
      There is a slim chance of a race condition occurring where two threads
      can both attempt to manipulate the same area.
      
      Thread A can be handling an incoming initial SUBSCRIBE request. Thread A
      lets the specific subscription handler know that the subscription has
      been established.
      
      At this point, Thread B may detect a state change on the subscribed
      resource and queue up a notification task on Thread C, the subscription
      serializer thread.
      
      Now Thread A attempts to generate the initial NOTIFY request to send to
      the subscriber at the same time that Thread C attempts to generate a
      state change NOTIFY request to send to the subscriber.
      
      The result is that Threads A and C can step on the same memory area,
      resulting in a crash. The crash has been observed as happening when
      attempting to allocate more space to hold the body for the NOTIFY.
      
      The solution presented here is to queue the subscription establishment
      and initial NOTIFY generation onto the subscription serializer thread
      (Thread C in the above scenario). This way, there is no way that a state
      change notification can occur before the initial NOTIFY is sent, and if
      there is a quick succession of NOTIFYs, we can guarantee that the two
      NOTIFY requests will be sent in succession.
      
      Change-Id: I5a89a77b5f2717928c54d6efb9955e5f6f5cf815
      fe5077b1
  3. 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
  4. Sep 11, 2015
  5. Sep 10, 2015
  6. Sep 09, 2015
  7. Sep 08, 2015
  8. 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
  9. Sep 05, 2015
  10. 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
  11. Sep 02, 2015
Loading