Skip to content
Snippets Groups Projects
  1. Jun 28, 2016
  2. Jun 23, 2016
  3. Jun 22, 2016
  4. Jun 21, 2016
    • Joshua Colp's avatar
    • Richard Mudgett's avatar
      res_pjproject.c: Replace inlined DEBUG_ATLEAST() with macro. · f572b264
      Richard Mudgett authored
      Change-Id: I8799fb0a347ad76e747dafd0eacf1ea1086b9a8c
      f572b264
    • zuul's avatar
      9e0df5a1
    • George Joseph's avatar
      res_pjsip_pubsub: Address SEGV when attempting to terminate a subscription · b57cd014
      George Joseph authored
      Occasionally under load we'll attempt to send a final NOTIFY on a
      subscription that's already been terminated and a SEGV will occur
      down in pjproject's evsub_destroy function.  This is a result of a
      race condition between all the paths that can generate a notify
      and/or destroy the underlying pjproject evsub object:
      
       * The client can send a SUBSCRIBE with Expires: 0.
       * The client can send a SUBSCRIBE/refresh.
       * The subscription timer can expire.
       * An extension state can change.
       * An MWI event can be generated.
       * The pjproject transaction timer (timer_b) can expire.
      
      Normally when our pubsub_on_evsub_state is called with a terminate,
      we push a task to the serializer and return at which point the dialog
      is unlocked.  This is usually not a problem because the task runs
      immediately and locks the dialog again.  When the system is heavily
      loaded though, there may be a delay between the unlock and relock
      during which another event may occur such as the subscription timer
      or timer_b expiring, an extension state change, etc.  These may also
      cause a terminate to be processed and if so, we could cause pjproject
      to try to destroy the evsub structure twice.  There's no way for us to
      tell that the evsub was already destroyed and the evsub's group lock
      can't tolerate this and SEGVs.
      
      The remedy is twofold.
      
       * A patch has been submitted to Teluu and added to the bundled
         pjproject which adds add/decrement operations on evsub's group lock.
      
       * In res_pjsip_pubsub:
         * configure.ac and pjproject-bundled's configure.m4 were updated
           to check for the new evsub group lock APIs.
         * We now add a reference to the evsub group lock when we create
           the subscription and remove the reference when we clean up the
           subscription.  This prevents evsub from being destroyed before
           we're done with it.
         * A state has been added to the subscription tree structure so
           termination progress can be tracked through the asyncronous tasks.
         * The pubsub_on_evsub_state callback has been split so it's not doing
           double duty.  It now only handles the final cleanup of the
           subscription tree.  pubsub_on_rx_refresh now handles both client
           refreshes and client terminates.  It was always being called for
           both anyway.
         * The serialized_on_server_timeout task was removed since
           serialized_pubsub_on_rx_refresh was almost identical.
         * Missing state checks and ao2_cleanups were added.
         * Some debug levels were adjusted to make seeing only off-nominal
           things at level 1 and nominal or progress things at level 2+.
      
      ASTERISK-26099 #close
      Reported-by: Ross Beer.
      
      Change-Id: I779d11802cf672a51392e62a74a1216596075ba1
      b57cd014
    • Alexander Traud's avatar
      res_rtp_asterisk: Use latest DTLS version available by underlying platform. · 6eb0354f
      Alexander Traud authored
      Do not use DTLSv1_method() but DTLS_method() when available in OpenSSL of the
      underlying platform. This change enables DTLS 1.2 since OpenSSL 1.0.2, for
      WebRTC (DTLS-SRTP via SIP-over-WebSockets). This change enables AEAD-based
      cipher-suites.
      
      ASTERISK-26130 #close
      
      Change-Id: I41f24448d6d2953e8bdb97c9f4a6bc8a8f055fd0
      6eb0354f
    • Scott Griepentrog's avatar
      PJSIP: provide transport type with received messages · 596d0b0b
      Scott Griepentrog authored
      The receipt of a SIP MESSAGE may occur over any transport including TCP
      and TLS. When the message is received, the original URI is added to the
      message in the field PJSIP_RECVADDR, but this is insufficient to ensure
      a reply message can reach the originating endpoint. This patch adds the
      PJSIP_TRANSPORT field populated with the transport type.
      
      ASTERISK-26132 #close
      
      Change-Id: I28c4b1e40d573a056c81deb213ecf53e968f725e
      596d0b0b
    • Alexander Traud's avatar
      BuildSystem: Avoid obsolete warning with HELP_STRING on autoconf. · 9e222efb
      Alexander Traud authored
      Some configure scripts used both AC_HELP_STRING and its replacement
      AS_HELP_STRING. For consistency and to avoid obsolete warnings, those were
      changed to AS_HELP_STRING.
      
      ASTERISK-26046
      
      Change-Id: I8aad4fd2bdee40aa2a31ce3339a1eb33ff4f5b0f
      9e222efb
    • zuul's avatar
  5. Jun 20, 2016
    • zuul's avatar
      Merge "app_voicemail.c: Fix IMAP compile error." · bbaa9c81
      zuul authored
      bbaa9c81
    • Joshua Colp's avatar
      res_pjsip_session: Handle race condition at shutdown with timer. · e94aae00
      Joshua Colp authored
      When shutting down res_pjsip_session will get unloaded before res_pjsip.
      The act of unloading unregisters all the PJSIP services and sets
      their module IDs to -1. In some cases it is possible for a timer to
      occur after this happens which calls into res_pjsip_session. The
      res_pjsip_session module can then try to get the session from the
      INVITE session using the module ID. Since the module ID is now -1
      this fails.
      
      This change stores a copy of the module ID and uses it for the timer
      callback scenario. If the module ID is -1 the callback immediately
      returns but if the module ID is valid then it continues as normal.
      
      This works as the original ID of the module is guaranteed to still
      be valid when used with the INVITE session.
      
      ASTERISK-26127 #close
      
      Change-Id: I88df72525c4e9ef9f19c13aedddd3ac4a335c573
      e94aae00
    • zuul's avatar
      ef1e0a65
    • Richard Mudgett's avatar
      app_voicemail.c: Fix IMAP compile error. · 0a300082
      Richard Mudgett authored
      Fix compile error introduced by the patch for
      ASTERISK-26045
      
      Change-Id: I5b02876266f2824f4cec2b54d6ff4db5de5778d3
      0a300082
    • Alexei Gradinari's avatar
      fix: memory leaks, resource leaks, out of bounds and bugs · 820ed3d4
      Alexei Gradinari authored
      ASTERISK-26119 #close
      
      Change-Id: Iecbf7d0f360a021147344c4e83ab242fd1e7512c
      820ed3d4
    • Mark Michelson's avatar
      ARI: Ensure announcer channels are destroyed. · 11caa10c
      Mark Michelson authored
      Announcer channels were not being destroyed because the
      stasis_app_control structure that referenced them was not being
      destroyed. The control structure was not being destroyed because it was
      not being unlinked from its container. It was not being unlinked from
      its container because the after bridge callback for the announcer
      channel was not being run. The after bridge callback was not being run
      because the after bridge datastore was not being removed from the
      channel on destruction. The channel was not being destroyed because the
      hangup that used to destroy the channel was now only reducing the
      reference count to one. The reference count of the channel was only
      being reduced to one because the stasis_app_control structure was
      holding the final reference...
      
      The control structure used to not keep a reference to the channel, so
      that loop described above did not happen.
      
      The solution is to manually remove the control structure from its
      container when the playback on a bridge is complete.
      
      ASTERISK-26083 #close
      Reported by Joshua Colp
      
      Change-Id: I0ddc0f64484ea0016245800b409b567dfe85cfb4
      11caa10c
    • Alexander Traud's avatar
      http: leverage 'bindaddr' for TLS in http.conf · f72ffc1f
      Alexander Traud authored
      The internal HTTP/WebSocket server supports both TCP and TLS, which can be
      activated separately via the file http.conf. The source code intends to re-use
      the TCP parameter 'bindaddr' for TLS, even if 'tlsbindaddr' is not specified
      explicitly. This did not work because of a typo. This change resolves this typo.
      
      ASTERISK-26126 #close
      
      Change-Id: I5efb0409ae12044dfb3495b6b97b6d40a8c9c51f
      f72ffc1f
  6. Jun 17, 2016
  7. Jun 16, 2016
  8. Jun 15, 2016
    • Richard Mudgett's avatar
      res_pjsip_transport_management.c: Misc cleanups to survive shutdown. · 3c80f84c
      Richard Mudgett authored
      * In unload_module(), reordered destroying things to minimize the window
      that the global transports container could be used by other threads on
      shutdown.  When shutting down you need to stop things in the opposite
      order of creation.
      
      * Put the global transports container into an AO2_GLOBAL_OBJ_STATIC to
      eliminate the crash potential by other threads using the container on
      shutdown.
      
      * Made struct monitored_transport.sip_received not use
      ast_atomic_fetchadd_int() since it is used as a boolean value that is only
      set TRUE.  It was previously incremented for every received SIP message
      and could theoretically overflow.
      
      * In monitored_transport_state_callback(), allocated the monitored
      transport object without a lock since the lock was unused.
      
      * In keepalive_global_loaded(), removed releasing the transports container
      if the keepalive_thread could not be started.  I set it up to be tried
      again if the user reloads the configuration.
      
      Change-Id: I8d12d16ef564290fa6d25a32334bb5ce8fdf87ff
      3c80f84c
  9. Jun 14, 2016
  10. Jun 13, 2016
Loading